From 71db09dfeb4ff55f1a95219be550708d4524c47d Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Wed, 27 Jul 2022 19:19:58 -0400 Subject: ivi-homescreen: improve AGL integration Changes: - For now add local patches for three changes that Marius has submitted upstream that fix issues with respect to running as a normal application against agl-compositor and configuration via the JSON configuration file. The first of these patches has been merged upstream, but bumping the level of meta-flutter to get it brings other rework that it seems perhaps better to wait on a tagged upstream release for. - Add another patch to add a '--app-id' command-line option to the embedder. This avoids needing to use a JSON configuration file for simple (i.e. non-homescreen) applications when running multiple apps against agl-compositor. The use of the example JSON file for the ivi-homescreen recipe itself has been left alone for now since it provides a reference for doing so. - Rename the embedder binary from "homescreen" to "flutter" to avoid collision with the existing Qt homescreen application in meta-agl-demo. This allows integrating Flutter applications into images using the Qt homescreen for testing in the period while a Flutter replacement is worked on. Discussion about possibly renaming the embedder to something more generic along these lines has started with upstream. - Split the embedder binary into a separate package from the ivi-homescreen package that contains the systemd unit file. We do not want the "homescreen" systemd unit when using the embedder in other images that use applaunchd, so this split seems the most straightforward way to avoid pulling it in. - Remove installing the "homescreen" system level systemd unit, as it does not get used in agl-image-flutter (it is installed as a user unit instead). Bug-AGL: SPEC-4485 Signed-off-by: Scott Murray Change-Id: I9f02f4312cf8c77ab224a3de8114c7fc3f4f6d36 --- .../0004-Add-app-id-command-line-argument.patch | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 meta-agl-flutter/recipes-graphics/toyota/files/0004-Add-app-id-command-line-argument.patch (limited to 'meta-agl-flutter/recipes-graphics/toyota/files/0004-Add-app-id-command-line-argument.patch') diff --git a/meta-agl-flutter/recipes-graphics/toyota/files/0004-Add-app-id-command-line-argument.patch b/meta-agl-flutter/recipes-graphics/toyota/files/0004-Add-app-id-command-line-argument.patch new file mode 100644 index 00000000..6b9d4c3a --- /dev/null +++ b/meta-agl-flutter/recipes-graphics/toyota/files/0004-Add-app-id-command-line-argument.patch @@ -0,0 +1,38 @@ +From 6a62efbebcdf17e3af57f04603aa5f0d61b0c1e2 Mon Sep 17 00:00:00 2001 +From: Scott Murray +Date: Wed, 27 Jul 2022 18:23:32 -0400 +Subject: [PATCH] Add app-id command-line argument + +Add a command-line argument for specifying the app id, so that basic +applications do not need to supply a full JSON configuration just to +do so. + +Signed-off-by: Scott Murray +--- + shell/main.cc | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/shell/main.cc b/shell/main.cc +index 6fdd907..662b7d1 100644 +--- a/shell/main.cc ++++ b/shell/main.cc +@@ -151,6 +151,16 @@ int main(int argc, char** argv) { + FML_DLOG(INFO) << "Cursor Theme: " << config.cursor_theme; + RemoveArgument(config.view.vm_args, "--t=" + config.cursor_theme); + } ++ if (cl.HasOption("app-id")) { ++ cl.GetOptionValue("app-id", &config.app_id); ++ if (config.app_id.empty()) { ++ FML_LOG(ERROR) ++ << "--app-id option requires an argument (e.g. --app-id=gallery)"; ++ return EXIT_FAILURE; ++ } ++ FML_DLOG(INFO) << "Application ID: " << config.app_id; ++ RemoveArgument(config.view.vm_args, "--app-id=" + config.app_id); ++ } + } + + auto vm_arg_count = config.view.vm_args.size(); +-- +2.35.3 + -- cgit 1.2.3-korg