qt5: configure EGLFS platform automatically for non-X11 images

By default QT5 applications use 'xcb' platform plugin but this can be
changed using the QT_QPA_PLATFORM environment variable. On non-X11
images the 'xcb' platform plugin obviously does not work, so just
configure 'eglfs' for non-X11 images.

https://jira.digi.com/browse/DEL-2017

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2015-12-21 19:52:20 +01:00
parent 4ca14779ca
commit e3b4c006f5
4 changed files with 15 additions and 8 deletions

View File

@ -0,0 +1,2 @@
# Use EGLFS platform plugin for images without X11
[ -f "/etc/init.d/xserver-nodm" ] || export QT_QPA_PLATFORM="eglfs"

View File

@ -1,3 +1,12 @@
# Copyright (C) 2015 Digi International
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
SRC_URI_append = " file://qt5.sh"
PACKAGECONFIG_append = " accessibility examples icu sql-sqlite"
do_install_append() {
install -d ${D}${sysconfdir}/profile.d
install -m 0755 ${WORKDIR}/qt5.sh ${D}${sysconfdir}/profile.d/
}

View File

@ -1 +0,0 @@
export QT_GSTREAMER_CAMERABIN_VIDEOSRC="imxv4l2src"

View File

@ -1,14 +1,11 @@
# Copyright (C) 2015 Digi International
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
SRC_URI_append_ccimx6 = " file://qt5.sh"
PACKAGECONFIG_append = " gstreamer"
do_install_append_ccimx6() {
install -d ${D}${sysconfdir}/profile.d
install -m 0755 ${WORKDIR}/qt5.sh ${D}${sysconfdir}/profile.d/
pkg_postinst_${PN}_ccimx6() {
mkdir -p $D${sysconfdir}/profile.d
echo '# Use FSL gstreamer plugin video source' >> $D${sysconfdir}/profile.d/qt5.sh
echo 'export QT_GSTREAMER_CAMERABIN_VIDEOSRC="imxv4l2src"' >> $D${sysconfdir}/profile.d/qt5.sh
}
PACKAGE_ARCH = "${MACHINE_ARCH}"