ivi-homescreen_aglflutter.inc: Add a config.json for the shell client
[AGL/meta-agl-devel.git] / meta-agl-flutter / recipes-graphics / toyota / ivi-homescreen_aglflutter.inc
index a2ad49f..48ba9d1 100644 (file)
@@ -5,8 +5,11 @@
 # licenses for the stated ffmpeg dependency.
 PACKAGECONFIG:remove = "gstreamer"
 
+FILESEXTRAPATHS:append := "${THISDIR}/files:"
+SRC_URI += "file://config.json"
+
 # AGL specifics
-IVI_HOMESCREEN_APP_OVERRIDE = "--b=/usr/share/flutter/gallery"
+IVI_HOMESCREEN_APP_OVERRIDE = "--b=/usr/share/flutter/gallery --j=/usr/share/flutter/config.json"
 
 SERVICE_UNIT        = "Requires=agl-compositor.service\nAfter=agl-compositor.service"
 SERVICE_INSTALL     = "WantedBy=agl-session.target"
@@ -18,8 +21,9 @@ SERVICE_RESTART           = "Restart=on-failure"
 # we need to install as user session, not root.
 do_install:append() {
     install -d ${D}${systemd_user_unitdir}/agl-session.target.wants
+    install -D -m 0644 ${WORKDIR}/config.json ${D}${datadir}/flutter/config.json
     install -m0644 ${WORKDIR}/homescreen.service ${D}${systemd_user_unitdir}/homescreen.service
     ln -s ../homescreen.service ${D}${systemd_user_unitdir}/agl-session.target.wants/homescreen.service
 }
 
-FILES:${PN} += " ${systemd_user_unitdir}"
+FILES:${PN} += " ${systemd_user_unitdir} ${datadir}/flutter/config.json"