Change the systemd service to user unit, add dependencies, update
the bash script for launching openivi-html5 and fix the visibility
issue to prevent blank screen at startup.
AGL-Bug: SPEC-629
Change-Id: Ibc64088a39a1d7cc2899cb0ff43e8312cde95bc8
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
[Unit]
Description=HTML5 runtime for OpenIVI Mobility applications
[Unit]
Description=HTML5 runtime for OpenIVI Mobility applications
-Requires=dbus.service
-After=dbus.service lightmediascanner.service rygel.service weston.service
+Requires=afm-user-daemon.service InputEventManager.service
+After=afm-user-daemon.service InputEventManager.service
+ConditionKernelCommandLine=!agl.nogfx
+Type=dbus
+BusName=org.agl.openivi
ExecStart=/usr/bin/openivi-html5.sh
ExecStart=/usr/bin/openivi-html5.sh
-Restart=always
-RestartSec=2
+Restart=on-failure
+RestartSec=5
TimeoutStopSec=1
[Install]
TimeoutStopSec=1
[Install]
-WantedBy=multi-user.target
-# Ensure that Weston has been fully loaded
-sleep 8
-
-/usr/bin/openivi-html5 -f -u $HOMESCREEN &
+QT_IVI_SURFACE_ID=4194304 QT_WAYLAND_SHELL_INTEGRATION=ivi-shell /usr/bin/openivi-html5 -f -u $HOMESCREEN &
# qmlscene create 2 surfaces
# 0x80000000 : for off screen buffer ?
# qmlscene create 2 surfaces
# 0x80000000 : for off screen buffer ?
-SYSTEMD_SERVICE_${PN} = "openivi-html5.service"
-
-RDEPENDS_${PN} = "qtbase qtwebkit"
+RDEPENDS_${PN} = "qtbase qtwebkit inputeventmanager windowmanager"
DEPENDS = "qtbase-native qtbase qtwebkit"
EXTRA_OECMAKE = " -DCMAKE_DISABLE_FIND_PACKAGE_X11=TRUE "
DEPENDS = "qtbase-native qtbase qtwebkit"
EXTRA_OECMAKE = " -DCMAKE_DISABLE_FIND_PACKAGE_X11=TRUE "
install -p -D ${WORKDIR}/openivi-html5.sh ${D}${bindir}/openivi-html5.sh
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
install -p -D ${WORKDIR}/openivi-html5.sh ${D}${bindir}/openivi-html5.sh
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
- install -p -D ${WORKDIR}/openivi-html5.service ${D}${systemd_unitdir}/system/openivi-html5.service
+ install -d ${D}${systemd_user_unitdir}
+ install -p -D ${WORKDIR}/openivi-html5.service ${D}${systemd_user_unitdir}/openivi-html5.service
+ install -d ${D}${sysconfdir}/systemd/user/default.target.wants
+ ln -sf ${systemd_user_unitdir}/openivi-html5.service ${D}${sysconfdir}/systemd/user/default.target.wants
-FILES_${PN} += " ${prefix}/bin/openivi-html5.sh"
+FILES_${PN} += " ${prefix}/bin/openivi-html5.sh ${systemd_user_unitdir} ${sysconfdir}"