diff options
author | Ronan Le Martret <ronan.lemartret@iot.bzh> | 2017-02-15 17:02:52 +0100 |
---|---|---|
committer | Stephane Desneux <stephane.desneux@iot.bzh> | 2017-03-27 15:33:40 +0200 |
commit | 3051f4733706d78b31356cd8c3464f25613996eb (patch) | |
tree | 181251e64c09dbf1dc19c785269d901011f5e3f9 /meta-app-framework | |
parent | 802f845b9d31b8b72067930abd2a23f1a321c691 (diff) |
Allowed wgt app to auto-install at the first boot
* link to gerrit review 8467 (meta-agl)
Change-Id: I87832b52dde60134908d29261ca8f8049338e815
Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
Diffstat (limited to 'meta-app-framework')
-rw-r--r-- | meta-app-framework/classes/aglwgt.bbclass | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/meta-app-framework/classes/aglwgt.bbclass b/meta-app-framework/classes/aglwgt.bbclass index 94f75f2a7..14f00a74c 100644 --- a/meta-app-framework/classes/aglwgt.bbclass +++ b/meta-app-framework/classes/aglwgt.bbclass @@ -30,12 +30,32 @@ python () { d.setVarFlag('do_aglwgt_deploy', 'fakeroot', '1') } + +POST_INSTALL_LEVEL ?= "10" +POST_INSTALL_SCRIPT ?= "${POST_INSTALL_LEVEL}-${PN}.sh" + +EXTRA_WGT_POSTINSTALL ?= "" + do_aglwgt_deploy() { - install -d ${D}/usr/AGL/apps - install -m 0644 ${B}/package/*.wgt ${D}/usr/AGL/apps/ + install -d ${D}/usr/AGL/apps + install -m 0644 ${B}/package/*.wgt ${D}/usr/AGL/apps/ + APP_FILES="" + for file in ${D}/usr/AGL/apps/*.wgt;do + APP_FILES+=" "$(basename $file); + done + install -d ${D}/${sysconfdir}/agl-postinsts + cat > ${D}/${sysconfdir}/agl-postinsts/${POST_INSTALL_SCRIPT} <<EOF +#!/bin/sh -e +for file in ${APP_FILES}; do + /usr/bin/afm-install install /usr/AGL/apps/\$file +done +sync +${EXTRA_WGT_POSTINSTALL} +EOF + chmod a+x ${D}/${sysconfdir}/agl-postinsts/${POST_INSTALL_SCRIPT} } -FILES_${PN} += "/usr/AGL/apps/*.wgt" +FILES_${PN} += "/usr/AGL/apps/*.wgt ${sysconfdir}/agl-postinsts/${POST_INSTALL_SCRIPT}" addtask aglwgt_deploy before do_package after do_install addtask aglwgt_package before do_aglwgt_deploy after do_compile |