summaryrefslogtreecommitdiffstats
path: root/recipes-demo/flutter-homescreen/files
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2023-06-02 10:52:32 -0400
committerScott Murray <scott.murray@konsulko.com>2023-06-02 11:00:52 -0400
commitcce52591f8e00ae41ae380a597d620b0856d004d (patch)
tree5df72538fd9b18f550ef7cedf42cc9990cc3ac7a /recipes-demo/flutter-homescreen/files
parentde1dccae31b3c7c62f0e19102b7223d747f413ed (diff)
Do not hard-code Flutter version and runtime type
Rework the flutter-homescreen and flutter-cluster-dashboard systemd units to get the Flutter version and runtime type from the environment file installed by the new agl-flutter-env recipe, and update their JSON configuration files to remove the hardcoding of their bundle paths. Bug-AGL: SPEC-4819 Change-Id: I841db2cbb3acfe4aad173e9b8aa25ff2e201c2e2 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Diffstat (limited to 'recipes-demo/flutter-homescreen/files')
-rw-r--r--recipes-demo/flutter-homescreen/files/flutter-homescreen.json1
-rw-r--r--recipes-demo/flutter-homescreen/files/flutter-homescreen.service4
2 files changed, 3 insertions, 2 deletions
diff --git a/recipes-demo/flutter-homescreen/files/flutter-homescreen.json b/recipes-demo/flutter-homescreen/files/flutter-homescreen.json
index 29308d3ea..63babcfab 100644
--- a/recipes-demo/flutter-homescreen/files/flutter-homescreen.json
+++ b/recipes-demo/flutter-homescreen/files/flutter-homescreen.json
@@ -1,7 +1,6 @@
{
"view" : [ {
"window_type" : "BG",
- "bundle_path" : "/usr/share/flutter/flutter_homescreen/3.3.7/release",
"width" : 1920,
"height": 1080,
"fullscreen": true
diff --git a/recipes-demo/flutter-homescreen/files/flutter-homescreen.service b/recipes-demo/flutter-homescreen/files/flutter-homescreen.service
index 300fb22d3..a57fc5cc5 100644
--- a/recipes-demo/flutter-homescreen/files/flutter-homescreen.service
+++ b/recipes-demo/flutter-homescreen/files/flutter-homescreen.service
@@ -3,7 +3,9 @@ Requires=agl-compositor.service
After=agl-compositor.service
[Service]
-ExecStart=/usr/bin/flutter-auto --j=/usr/share/flutter/flutter-homescreen.json --xdg-shell-app-id=homescreen
+EnvironmentFile=/etc/default/flutter
+EnvironmentFile=-/etc/default/flutter-homescreen
+ExecStart=/usr/bin/flutter-auto --b=/usr/share/flutter/flutter_homescreen/${FLUTTER_VERSION}/${FLUTTER_RUNTIME} --j=/usr/share/flutter/flutter-homescreen.json --xdg-shell-app-id=homescreen
Restart=on-failure
[Install]
#dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
PACKAGECONFIG:remove = "templates"

SYSTEMD_AUTO_ENABLE:${PN} = "enable"

FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

SRC_URI += " \
    file://lxc.service \
    file://lxc-net.service \
    "

do_install:append () {
    for service in lxc.service lxc-net.service; do
        install -D -m 0644 ${WORKDIR}/$service ${D}${systemd_system_unitdir}/$service
        sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' ${D}${systemd_system_unitdir}/$service
    done
}

# NOTE:
# This needs to be replaced with a rework of the upstream packaging
# to do a proper split of core from the template support.
RDEPENDS:${PN} = ""