[oe-commits] Eric Bénard : qt-demo-init: correctly handle qtdemo for qt4-x11

git version control git at git.openembedded.org
Mon Nov 29 10:43:45 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 3bd272a80f647987f0dff52b842da93773bf3903
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=3bd272a80f647987f0dff52b842da93773bf3903

Author: Eric Bénard <eric at eukrea.com>
Date:   Fri Nov 26 11:19:24 2010 +0100

qt-demo-init: correctly handle qtdemo for qt4-x11

Signed-off-by: Eric Bénard <eric at eukrea.com>

---

 recipes/qt4/qt-demo-init/qtdemo-init |   21 ++++++++++++++++++---
 recipes/qt4/qt-demo-init_0.1.bb      |    2 +-
 2 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/recipes/qt4/qt-demo-init/qtdemo-init b/recipes/qt4/qt-demo-init/qtdemo-init
index 8eb8771..ee84be2 100644
--- a/recipes/qt4/qt-demo-init/qtdemo-init
+++ b/recipes/qt4/qt-demo-init/qtdemo-init
@@ -3,7 +3,7 @@
 set -e
 
 if [ -f /usr/bin/qtdemo ]; then
-	QTDEMO=qtdemo
+	QTDEMO="qtdemo > /var/log/Xsession.log 2>&1"
 else
 	QTDEMO="qtdemoE -qws"
 fi
@@ -18,14 +18,29 @@ case "$1" in
 		if [ ! -f /etc/pointercal ]; then
 			/usr/bin/ts_calibrate
 		fi
-		QWS_MOUSE_PROTO=tslib:$TSLIB_TSDEVICE $QTDEMO &
+		if [ $QTDEMO == qtdemo ]; then
+			Xorg &
+			export DISPLAY=:0
+			$QTDEMO &
+		else
+			QWS_MOUSE_PROTO=tslib:$TSLIB_TSDEVICE $QTDEMO &
+		fi
 	else
+		if [ $QTDEMO == qtdemo ]; then
+			Xorg &
+			export DISPLAY=:0
+		fi
 		$QTDEMO &
 	fi
 	;;
   stop)
 	echo "Stopping qtdemo"
-	killall qtdemoE
+	if [ $QTDEMO == qtdemo ]; then
+		killall Xorg
+		killall qtdemo
+	else
+		killall qtdemoE
+	fi
 	;;
   restart)
 	$0 stop
diff --git a/recipes/qt4/qt-demo-init_0.1.bb b/recipes/qt4/qt-demo-init_0.1.bb
index 223ea7e..89eec6c 100644
--- a/recipes/qt4/qt-demo-init_0.1.bb
+++ b/recipes/qt4/qt-demo-init_0.1.bb
@@ -1,7 +1,7 @@
 DESCRIPTION = "Init script for qtdemo"
 LICENSE = "MIT"
 SRC_URI = "file://qtdemo-init"
-PR = "r0"
+PR = "r1"
 
 PACKAGE_ARCH = "all"
 





More information about the Openembedded-commits mailing list