meta-app-framework: Add Flutter app icon installation 55/28155/2
authorScott Murray <scott.murray@konsulko.com>
Wed, 7 Dec 2022 08:53:51 +0000 (17:53 +0900)
committerScott Murray <scott.murray@konsulko.com>
Sat, 10 Dec 2022 07:50:07 +0000 (07:50 +0000)
Add logic to agl-app.bbclass to install an icon for Flutter apps if
there is one present as ${AGL_APP_ID}.svg in a "package" directory
in their source repository.

Bug-AGL: SPEC-4634

Change-Id: If48cb5b085f74a713e293d6554c45d265f69f686
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/28155
Tested-by: Jenkins Job builder account
ci-image-build: Jenkins Job builder account
ci-image-boot-test: Jenkins Job builder account

meta-app-framework/classes/agl-app.bbclass

index 6565fdf..491a36e 100644 (file)
@@ -68,6 +68,14 @@ do_install:append () {
        Environment=AGL_APP_WAM_DIR=${AGL_APP_WAM_DIR}
        EOF
     fi
+
+    if [ "${AGL_APP_TEMPLATE}" = "agl-app-flutter" ]; then
+       # Install icon if present
+       if [ -f ${S}/package/${AGL_APP_ID}.svg ]; then
+          install -d ${D}${datadir}/icons/hicolor/scalable
+          install -m 0644 ${S}/package/${AGL_APP_ID}.svg ${D}${datadir}/icons/hicolor/scalable/
+       fi
+   fi
 }
 
 FILES:${PN}:append = " ${systemd_system_unitdir} ${datadir}/icons"