aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonan Le Martret <ronan.lemartret@iot.bzh>2017-02-15 17:11:30 +0100
committerronan Le Martret <ronan@iot.bzh>2017-02-17 10:23:40 +0000
commit5f52a2cf2a739ab14c74d54f383e527a2c3676b9 (patch)
treec2e574671ca6ebe6cb18e89218519d547839fd8c
parent5679bb5985dfbb5b952ce954f3cd552f2b1aab8d (diff)
Fixed demo recipes to auto-install wgt app at first boot
* link to gerrit review 8473 (meta-agl-extra) Change-Id: I8d8c03654d4eee14bb28449d29afd4c75fac6385 Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh> (cherry picked from commit 7bb3630d56eaf54bbb59bfac22ddca695f8d9dcd)
-rw-r--r--recipes-demo-hmi/CES2017-demo/CES2017-demo.bb42
-rwxr-xr-xrecipes-demo-hmi/navigation/navigation_git.bb11
-rwxr-xr-xrecipes-demo-hmi/navigation/poiapp_git.bb9
3 files changed, 22 insertions, 40 deletions
diff --git a/recipes-demo-hmi/CES2017-demo/CES2017-demo.bb b/recipes-demo-hmi/CES2017-demo/CES2017-demo.bb
index 514aea0be..7d64f83ec 100644
--- a/recipes-demo-hmi/CES2017-demo/CES2017-demo.bb
+++ b/recipes-demo-hmi/CES2017-demo/CES2017-demo.bb
@@ -10,6 +10,8 @@ PN = "ces2017-demo"
inherit qmake5
DEPENDS = "homescreen zip-native qtmultimedia qtquickcontrols2"
+inherit aglwgt
+
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=815ca599c9df247a0c7f619bab123dad"
# ALS, CES, FOSDEM available
@@ -39,6 +41,8 @@ RDEPENDS_${PN} += " \
"
do_install_prepend() {
+ mkdir -p ${B}/package
+
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
<widget xmlns=\"http://www.w3.org/ns/widgets\" id=\"controls\" version=\"0.1\"> \
<name>Controls</name> \
@@ -51,9 +55,7 @@ do_install_prepend() {
" > ${B}/apps/Controls/config.xml
cd ${B}/apps/Controls/
- zip controls.wgt config.xml controls
-
-
+ zip ${B}/package/controls.wgt config.xml controls
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
<widget xmlns=\"http://www.w3.org/ns/widgets\" id=\"dashboard\" version=\"0.1\"> \
@@ -67,8 +69,7 @@ do_install_prepend() {
" > ${B}/apps/Dashboard/config.xml
cd ${B}/apps/Dashboard/
- zip dashboard.wgt config.xml dashboard
-
+ zip ${B}/package/dashboard.wgt config.xml dashboard
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
@@ -83,7 +84,7 @@ do_install_prepend() {
" > ${B}/apps/Phone/config.xml
cd ${B}/apps/Phone/
- zip phone.wgt config.xml phone
+ zip ${B}/package/phone.wgt config.xml phone
@@ -99,40 +100,17 @@ do_install_prepend() {
" > ${B}/apps/Radio/config.xml
cd ${B}/apps/Radio/
- zip radio.wgt config.xml radio
-
-
- cat > ${B}/apps/installAllApps.sh <<-EOF
- #!/bin/sh
- cd /usr/AGL/apps
- for file in \`find . -maxdepth 1 -name '*.wgt'\`; do
-
- /usr/bin/afm-util install \$file
- done
- sync
-
- #it's Workaround
- cyad -s -k MANIFESTS -t allow -c User::App::navigation -u '*' -p 'http://tizen.org/privilege/internal/dbus'
- cyad -s -k MANIFESTS -t allow -c User::App::poi -u '*' -p 'http://tizen.org/privilege/internal/dbus'
- EOF
+ zip ${B}/package/radio.wgt config.xml radio
+
}
do_install() {
- install -d ${D}/usr/AGL/${PN}
- install -d ${D}/usr/AGL/apps
- install -m 0644 ${B}/apps/Controls/controls.wgt ${D}/usr/AGL/apps/
- install -m 0644 ${B}/apps/Dashboard/dashboard.wgt ${D}/usr/AGL/apps/
- install -m 0644 ${B}/apps/Phone/phone.wgt ${D}/usr/AGL/apps/
- install -m 0644 ${B}/apps/Radio/radio.wgt ${D}/usr/AGL/apps/
install -d ${D}/home/root/app-data/radio
install -m 0644 ${WORKDIR}/presets-CES.conf ${D}/home/root/app-data/radio/
install -m 0644 ${WORKDIR}/presets-ALS.conf ${D}/home/root/app-data/radio/
install -m 0644 ${WORKDIR}/presets-FOSDEM.conf ${D}/home/root/app-data/radio/
install -m 0644 ${WORKDIR}/presets-${AGL_RADIO_PRESETS_LOCALE}.conf ${D}/home/root/app-data/radio/presets.conf
- install -m 0755 ${B}/apps/installAllApps.sh ${D}/usr/AGL/apps/
- ln -sf ../apps/installAllApps.sh ${D}/usr/AGL/${PN}/installAllApps.sh
-
install -d ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
install -m 0644 ${S}/imports/AGL/Demo/Controls/qmldir ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
install -m 0644 ${S}/imports/AGL/Demo/Controls/ImageButton.qml ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
@@ -162,8 +140,6 @@ do_install() {
#}
FILES_${PN} += "/usr/AGL/ \
- /usr/AGL/apps/* \
- /usr/AGL/${PN}/* \
/home/root/app-data/radio/presets-*.conf \
/home/root/app-data/radio/presets.conf \
/usr/lib/qt5/qml/AGL/Demo/Controls/qmldir \
diff --git a/recipes-demo-hmi/navigation/navigation_git.bb b/recipes-demo-hmi/navigation/navigation_git.bb
index 2bdd1cc00..a4513da50 100755
--- a/recipes-demo-hmi/navigation/navigation_git.bb
+++ b/recipes-demo-hmi/navigation/navigation_git.bb
@@ -26,6 +26,7 @@ SRC_URI="git://github.com/AGLExport/gpsnavi.git;branch=agl \
SECURITY_CFLAGS = ""
inherit autotools pkgconfig
+inherit aglwgt
S = "${WORKDIR}/git"
@@ -36,11 +37,17 @@ do_compile_prepend() {
do_install_append() {
install -d ${D}/usr/AGL/apps
- install -m 0644 ${B}/navigation.wgt ${D}/usr/AGL/apps/
+ mkdir -p ${B}/package/
+ mv ${B}/navigation.wgt ${B}/package/
install -m 0755 ${WORKDIR}/download_mapdata_jp.sh ${D}/usr/AGL/apps/
install -m 0755 ${WORKDIR}/download_mapdata_uk.sh ${D}/usr/AGL/apps/
install -d ${D}/var/mapdata
}
+#it's Workaround
+EXTRA_WGT_POSTINSTALL = "\
+ cyad -s -k MANIFESTS -t allow -c User::App::navigation -u '*' -p 'http://tizen.org/privilege/internal/dbus';\
+ cyad -s -k MANIFESTS -t allow -c User::App::poi -u '*' -p 'http://tizen.org/privilege/internal/dbus';\
+"
-FILES_${PN} += " /usr/AGL/apps/* /var/mapdata "
+FILES_${PN} += " /usr/AGL/apps/*.sh /var/mapdata "
diff --git a/recipes-demo-hmi/navigation/poiapp_git.bb b/recipes-demo-hmi/navigation/poiapp_git.bb
index c6fa5d094..b91d87d89 100755
--- a/recipes-demo-hmi/navigation/poiapp_git.bb
+++ b/recipes-demo-hmi/navigation/poiapp_git.bb
@@ -7,6 +7,7 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=947b2d60ca3872e172034438e9801200"
inherit cmake_qt5 pkgconfig
+inherit aglwgt
DEPENDS += " qtbase libdbus-c++ json-c \
"
@@ -22,10 +23,8 @@ do_install_append() {
mkdir -p ${WORKDIR}/widget
install -m 0644 ${WORKDIR}/config.xml ${WORKDIR}/widget
install -m 0755 ${D}/usr/bin/yelp-client ${WORKDIR}/widget/poi
- zip -ju ${WORKDIR}/widget/poi.wgt ${WORKDIR}/widget/poi ${WORKDIR}/widget/config.xml
- install -d ${D}/usr/AGL/apps
- install -m 0644 ${WORKDIR}/widget/poi.wgt ${D}/usr/AGL/apps/
-}
+ mkdir -p ${B}/package
+ zip -ju ${B}/package/poi.wgt ${WORKDIR}/widget/poi ${WORKDIR}/widget/config.xml
-FILES_${PN} += " /usr/AGL/apps/poi.wgt "
+}