summaryrefslogtreecommitdiffstats
path: root/meta-app-framework
diff options
context:
space:
mode:
Diffstat (limited to 'meta-app-framework')
-rw-r--r--meta-app-framework/classes/aglwgt.bbclass26
-rwxr-xr-xmeta-app-framework/recipes-core/af-main/af-main/afm-install44
-rw-r--r--meta-app-framework/recipes-core/af-main/af-main_1.0.bb12
-rw-r--r--meta-app-framework/recipes-core/af-main/af-main_1.0.inc2
-rw-r--r--meta-app-framework/recipes-core/af-main/nativesdk-af-main_1.0.bb2
5 files changed, 80 insertions, 6 deletions
diff --git a/meta-app-framework/classes/aglwgt.bbclass b/meta-app-framework/classes/aglwgt.bbclass
index 94f75f2..afe9a55 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="${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
diff --git a/meta-app-framework/recipes-core/af-main/af-main/afm-install b/meta-app-framework/recipes-core/af-main/af-main/afm-install
new file mode 100755
index 0000000..6d37bae
--- /dev/null
+++ b/meta-app-framework/recipes-core/af-main/af-main/afm-install
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+pretty() {
+ sed \
+ -e '/^method return .*/d' \
+ -e 's/^Error org.freedesktop.DBus.Error.Failed: "\?\(.*\)"\?$/ERROR: \1/' \
+ -e 's/^ string "\(.*\)"/\1/' \
+ -e 's/},/&\n/'
+}
+
+send() {
+ dbus-send --system --print-reply \
+ --dest=org.AGL.afm.system \
+ /org/AGL/afm/system \
+ org.AGL.afm.system.$1 \
+ "string:$2" |
+ pretty
+}
+
+case "$1" in
+
+ add|install)
+ f=$(realpath $2)
+ send install '{"wgt":"'"$f"'","force":true}'
+ ;;
+
+ -h|--help|help)
+ cat << EOC
+
+The commands are:
+
+ add wgt
+ install wgt install the wgt file
+
+EOC
+ ;;
+
+ *)
+ echo "unknown command $1" >&2
+ exit 1
+ ;;
+esac
+
+
diff --git a/meta-app-framework/recipes-core/af-main/af-main_1.0.bb b/meta-app-framework/recipes-core/af-main/af-main_1.0.bb
index 834e293..6a1d36a 100644
--- a/meta-app-framework/recipes-core/af-main/af-main_1.0.bb
+++ b/meta-app-framework/recipes-core/af-main/af-main_1.0.bb
@@ -12,7 +12,7 @@ BBCLASSEXTEND = "native"
SECTION = "base"
DEPENDS = "openssl libxml2 xmlsec1 systemd libzip json-c security-manager libcap-native af-binder"
-DEPENDS_class-native = "openssl libxml2 xmlsec1 libzip"
+DEPENDS_class-native = "openssl libxml2 xmlsec1 libzip json-c"
afm_name = "afm"
afm_confdir = "${sysconfdir}/${afm_name}"
@@ -64,6 +64,11 @@ SRC_URI += "\
file://add-qt-wayland-shell-integration.patch \
"
+# tools used to install wgt at first boot
+SRC_URI += "\
+ file://afm-install \
+"
+
do_install_append() {
install -d ${D}${bindir}
install -m 0755 ${WORKDIR}/init-afm-dirs.sh ${D}${bindir}
@@ -74,6 +79,11 @@ do_install_append() {
install -p -D ${WORKDIR}/init-afm-dirs.service ${D}${systemd_unitdir}/system/init-afm-dirs.service
ln -sf ${systemd_unitdir}/system/init-afm-dirs.service ${D}${sysconfdir}/systemd/system/default.target.wants
fi
+ install -m 0755 ${WORKDIR}/afm-install ${D}${bindir}
+}
+
+do_install_append_qemux86-64() {
+ sed -i -e '/LD_PRELOAD=\/usr\/lib\/libEGL.so/d' ${D}${systemd_user_unitdir}/afm-user-daemon.service
}
do_install_append_smack () {
diff --git a/meta-app-framework/recipes-core/af-main/af-main_1.0.inc b/meta-app-framework/recipes-core/af-main/af-main_1.0.inc
index 0d07fc2..c04661a 100644
--- a/meta-app-framework/recipes-core/af-main/af-main_1.0.inc
+++ b/meta-app-framework/recipes-core/af-main/af-main_1.0.inc
@@ -14,7 +14,7 @@ SRC_URI = "${SRC_URI_git} \
${SRC_URI_files} \
"
-SRCREV = "c6b2074e18ce7a37a59bc1c3831407b42b18c889"
+SRCREV = "7cf2890d871e76c082528565f59e1d0d1055b7f9"
S = "${WORKDIR}/git"
diff --git a/meta-app-framework/recipes-core/af-main/nativesdk-af-main_1.0.bb b/meta-app-framework/recipes-core/af-main/nativesdk-af-main_1.0.bb
index ba70c59..021c9ac 100644
--- a/meta-app-framework/recipes-core/af-main/nativesdk-af-main_1.0.bb
+++ b/meta-app-framework/recipes-core/af-main/nativesdk-af-main_1.0.bb
@@ -4,7 +4,7 @@ inherit nativesdk cmake pkgconfig
SECTION = "base"
-DEPENDS = "nativesdk-openssl nativesdk-libxml2 nativesdk-xmlsec1 nativesdk-libzip"
+DEPENDS = "nativesdk-openssl nativesdk-libxml2 nativesdk-xmlsec1 nativesdk-libzip nativesdk-json-c"
afm_name = "afm"
afm_confdir = "${sysconfdir}/${afm_name}"