summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuchinton <suchinton.2001@gmail.com>2024-07-17 22:39:29 +0530
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2024-07-24 09:14:03 +0000
commitf9afa3f3024c36950d9fb9fbb53da3bd119bcc72 (patch)
treec444f8bd4f2404a4808c5360e5f5653c21bc840b
parent94a19893064724d89893252735883cdb0415835f (diff)
Pre-compile resources and remove unused dependenciessalmon_18.90.0salmon/18.90.018.90.0
V1: - Use rcc to compile qrc resource file on host, and remove post install step to compile on target. - Remove PySide6 as dependency for demo control panel as python3-qtwidgets is no longer used to provide toggle button, and pyside6-rcc is not provided. V2: - Replace PySide6 with PyQt6 at the resouce compile step - Add dynamic layer for meta-qt6 to provide QtWidgets and QtSvg - Update runtime dependencies to provide bash and python3-rich for CLI interface Bug-AGL: SPEC-5195 Change-Id: Ic390369a37f266b94b82397ba61a4f95ec0ed492 Signed-off-by: Suchinton <suchinton.2001@gmail.com> Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl-demo/+/30107 ci-image-build: Jenkins Job builder account ci-image-boot-test: Jenkins Job builder account Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org> Tested-by: Jenkins Job builder account
-rw-r--r--meta-agl-demo-control-panel/conf/layer.conf4
-rw-r--r--meta-agl-demo-control-panel/dynamic-layers/meta-qt6/recipes-python/pyqt6/python3-pyqt6_%.bbappend4
-rw-r--r--meta-agl-demo-control-panel/recipes-demo/agl-demo-control-panel/agl-demo-control-panel_git.bb17
3 files changed, 17 insertions, 8 deletions
diff --git a/meta-agl-demo-control-panel/conf/layer.conf b/meta-agl-demo-control-panel/conf/layer.conf
index fc185f946..ea256107e 100644
--- a/meta-agl-demo-control-panel/conf/layer.conf
+++ b/meta-agl-demo-control-panel/conf/layer.conf
@@ -5,6 +5,10 @@ BBPATH =. "${LAYERDIR}:"
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
+BBFILES_DYNAMIC += " \
+ qt6-layer:${LAYERDIR}/dynamic-layers/meta-qt6/*/*/*.bbappend \
+"
+
BBFILE_COLLECTIONS += "agldemocontrolpanel"
BBFILE_PATTERN_agldemocontrolpanel = "^${LAYERDIR}/"
BBFILE_PRIORITY_agldemocontrolpanel = "70"
diff --git a/meta-agl-demo-control-panel/dynamic-layers/meta-qt6/recipes-python/pyqt6/python3-pyqt6_%.bbappend b/meta-agl-demo-control-panel/dynamic-layers/meta-qt6/recipes-python/pyqt6/python3-pyqt6_%.bbappend
new file mode 100644
index 000000000..defe585ac
--- /dev/null
+++ b/meta-agl-demo-control-panel/dynamic-layers/meta-qt6/recipes-python/pyqt6/python3-pyqt6_%.bbappend
@@ -0,0 +1,4 @@
+PYQT_MODULES:append = " \
+ QtWidgets \
+ QtSvg \
+" \ No newline at end of file
diff --git a/meta-agl-demo-control-panel/recipes-demo/agl-demo-control-panel/agl-demo-control-panel_git.bb b/meta-agl-demo-control-panel/recipes-demo/agl-demo-control-panel/agl-demo-control-panel_git.bb
index d28628264..f9cb152be 100644
--- a/meta-agl-demo-control-panel/recipes-demo/agl-demo-control-panel/agl-demo-control-panel_git.bb
+++ b/meta-agl-demo-control-panel/recipes-demo/agl-demo-control-panel/agl-demo-control-panel_git.bb
@@ -12,12 +12,18 @@ S = "${WORKDIR}/git"
inherit systemd allarch update-alternatives
+DEPENDS += "qtbase-native"
+
SYSTEMD_SERVICE:${PN} = "${BPN}.service"
do_configure[noexec] = "1"
do_compile[noexec] = "1"
do_install() {
+ # compile qrc
+ # RECIPE_SYSROOT_NATIVE
+ ${RECIPE_SYSROOT_NATIVE}/usr/libexec/rcc -g python ${S}/assets/res.qrc | sed '0,/PySide6/s//PyQt6/' > ${S}/res_rc.py
+
# There's no provision for a Pythonic install into /usr/lib, so dump
# into a directory /usr/libexec.
install -d ${D}${libexecdir}/${BPN}
@@ -40,12 +46,6 @@ do_install() {
${D}${sysconfdir}/agl-demo-control-panel/config.ini.gateway-demo
}
-# For now generate resource wrapper on first boot, as it looks non-trivial
-# to get python3-pyqt5-native working to run pyrcc5 during build.
-pkg_postinst_ontarget:${PN} () {
- /usr/bin/pyrcc5 -o ${libexecdir}/${BPN}/res_rc.py ${libexecdir}/${BPN}/assets/res.qrc
- true
-}
ALTERNATIVE_LINK_NAME[agl-demo-control-panel.ini] = "${sysconfdir}/agl-demo-control-panel/config.ini"
@@ -55,10 +55,11 @@ RDEPENDS:${PN} += " \
python3-modules \
python3-packaging \
python3-can \
+ python3-rich \
python3-pyqt6 \
- python3-pyside6 \
agl-users \
weston \
+ bash \
"
PACKAGE_BEFORE_PN += "${PN}-conf"
@@ -82,4 +83,4 @@ RDEPENDS:${PN}-conf-gateway-demo = "${PN}"
RPROVIDES:${PN}-conf-gateway-demo = "agl-demo-control-panel.ini"
ALTERNATIVE:${PN}-conf-gateway-demo = "agl-demo-control-panel.ini"
ALTERNATIVE_TARGET_${PN}-conf-gateway-demo = "${sysconfdir}/agl-demo-control-panel/config.ini.gateway-demo"
-ALTERNATIVE_PRIORITY_${PN}-conf-gateway-demo = "30"
+ALTERNATIVE_PRIORITY_${PN}-conf-gateway-demo = "30" \ No newline at end of file