summaryrefslogtreecommitdiff
path: root/recipes-graphics/wayland-app-launch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-graphics/wayland-app-launch')
-rw-r--r--recipes-graphics/wayland-app-launch/wayland-app-launch.inc15
-rw-r--r--recipes-graphics/wayland-app-launch/wayland-app-launch/wayland-app-launch.service.in15
-rw-r--r--recipes-graphics/wayland-app-launch/wayland-app-launch/wayland-app-launch.sh.in14
-rw-r--r--recipes-graphics/wayland-app-launch/wayland-qtdemo-launch-analogclock_1.0.bb8
-rw-r--r--recipes-graphics/wayland-app-launch/wayland-qtdemo-launch-cinematicexperience_1.0.bb5
-rw-r--r--recipes-graphics/wayland-app-launch/wayland-qtdemo-launch-qtsmarthome_1.0.bb8
6 files changed, 34 insertions, 31 deletions
diff --git a/recipes-graphics/wayland-app-launch/wayland-app-launch.inc b/recipes-graphics/wayland-app-launch/wayland-app-launch.inc
index cd72391..588ca4b 100644
--- a/recipes-graphics/wayland-app-launch/wayland-app-launch.inc
+++ b/recipes-graphics/wayland-app-launch/wayland-app-launch.inc
@@ -5,28 +5,27 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda
inherit allarch systemd
-RDEPENDS_${PN} += "weston-init ${INITIAL_APP_PKGS}"
+RDEPENDS:${PN} += "weston-init ${INITIAL_APP_PKGS}"
S = "${WORKDIR}"
SRC_URI = " \
file://wayland-app-launch.service.in \
- file://wayland-app-launch.sh.in \
"
-FILESEXTRAPATHS_prepend := "${THISDIR}/wayland-app-launch:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/wayland-app-launch:"
APPLICATION_ENVIRONMENT ??= ""
do_compile () {
- sed -e "s:@@wayland-application@@:${WAYLAND_APPLICATION}:" wayland-app-launch.sh.in > wayland-app-launch.sh
- sed -e "s:@@application-environment@@:${APPLICATION_ENVIRONMENT}:" wayland-app-launch.service.in > wayland-app-launch.service
+ sed -e "s:@@wayland-application@@:${WAYLAND_APPLICATION}:" \
+ -e "s:@@application-environment@@:${APPLICATION_ENVIRONMENT}:" \
+ wayland-app-launch.service.in > wayland-app-launch.service
}
do_install () {
- install -d ${D}/${bindir} ${D}${systemd_unitdir}/system/
+ install -d ${D}${systemd_unitdir}/system/
install -m 0644 ${WORKDIR}/wayland-app-launch.service ${D}${systemd_unitdir}/system
- install -m 0755 ${S}/wayland-app-launch.sh ${D}/${bindir}
}
SYSTEMD_PACKAGES = "${PN}"
-SYSTEMD_SERVICE_${PN} = "wayland-app-launch.service"
+SYSTEMD_SERVICE:${PN} = "wayland-app-launch.service"
diff --git a/recipes-graphics/wayland-app-launch/wayland-app-launch/wayland-app-launch.service.in b/recipes-graphics/wayland-app-launch/wayland-app-launch/wayland-app-launch.service.in
index 4be53a4..31499c1 100644
--- a/recipes-graphics/wayland-app-launch/wayland-app-launch/wayland-app-launch.service.in
+++ b/recipes-graphics/wayland-app-launch/wayland-app-launch/wayland-app-launch.service.in
@@ -1,14 +1,17 @@
[Unit]
Description=Start a wayland application
-After=weston@root.service
-Requires=weston@root.service
+After=weston.service
+Requires=weston.service
[Service]
-Restart=on-failure
-Type=forking
+Type=simple
+User=root
+PAMName=login
+Environment=WAYLAND_DISPLAY=/run/wayland-0
Environment=@@application-environment@@
-ExecStart=/usr/bin/wayland-app-launch.sh
+ExecStart=@@wayland-application@@
+Restart=on-failure
RestartSec=1
[Install]
-WantedBy=multi-user.target
+WantedBy=graphical.target
diff --git a/recipes-graphics/wayland-app-launch/wayland-app-launch/wayland-app-launch.sh.in b/recipes-graphics/wayland-app-launch/wayland-app-launch/wayland-app-launch.sh.in
deleted file mode 100644
index ebebfbf..0000000
--- a/recipes-graphics/wayland-app-launch/wayland-app-launch/wayland-app-launch.sh.in
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-if test -z "$XDG_RUNTIME_DIR"; then
- export XDG_RUNTIME_DIR=/run/user/`id -u`
- if ! test -d "$XDG_RUNTIME_DIR"; then
- mkdir --parents $XDG_RUNTIME_DIR
- chmod 0700 $XDG_RUNTIME_DIR
- fi
-fi
-
-# wait for weston
-while [ ! -e $XDG_RUNTIME_DIR/wayland-0 ] ; do sleep 0.1; done
-sleep 1
-
-@@wayland-application@@ &
diff --git a/recipes-graphics/wayland-app-launch/wayland-qtdemo-launch-analogclock_1.0.bb b/recipes-graphics/wayland-app-launch/wayland-qtdemo-launch-analogclock_1.0.bb
new file mode 100644
index 0000000..73c7dd1
--- /dev/null
+++ b/recipes-graphics/wayland-app-launch/wayland-qtdemo-launch-analogclock_1.0.bb
@@ -0,0 +1,8 @@
+# set the following variable to your one and only application which should
+# be launched right after weston started
+
+INITIAL_APP_PKGS ?= "qtbase-examples qtwayland"
+APPLICATION_ENVIRONMENT ?= 'QT_QPA_PLATFORM=wayland-egl'
+WAYLAND_APPLICATION ?= "/usr/share/examples/gui/analogclock/analogclock"
+
+require wayland-app-launch.inc
diff --git a/recipes-graphics/wayland-app-launch/wayland-qtdemo-launch-cinematicexperience_1.0.bb b/recipes-graphics/wayland-app-launch/wayland-qtdemo-launch-cinematicexperience_1.0.bb
index f36556b..7eff903 100644
--- a/recipes-graphics/wayland-app-launch/wayland-qtdemo-launch-cinematicexperience_1.0.bb
+++ b/recipes-graphics/wayland-app-launch/wayland-qtdemo-launch-cinematicexperience_1.0.bb
@@ -1,9 +1,8 @@
# set the following variable to your one and only application which should
# be launched right after weston started
-INITIAL_APP_PKGS ?= "weston"
-INITIAL_PATH ?= ""
-APPLICATION_ENVIRONMENT ?= '\"QT_QPA_PLATFORM=wayland-egl\"'
+INITIAL_APP_PKGS ?= "cinematicexperience qtwayland"
+APPLICATION_ENVIRONMENT ?= 'QT_QPA_PLATFORM=wayland-egl'
WAYLAND_APPLICATION ?= "/usr/share/cinematicexperience-1.0/Qt5_CinematicExperience --fullscreen"
require wayland-app-launch.inc
diff --git a/recipes-graphics/wayland-app-launch/wayland-qtdemo-launch-qtsmarthome_1.0.bb b/recipes-graphics/wayland-app-launch/wayland-qtdemo-launch-qtsmarthome_1.0.bb
new file mode 100644
index 0000000..2e1a2b0
--- /dev/null
+++ b/recipes-graphics/wayland-app-launch/wayland-qtdemo-launch-qtsmarthome_1.0.bb
@@ -0,0 +1,8 @@
+# set the following variable to your one and only application which should
+# be launched right after weston started
+
+INITIAL_APP_PKGS ?= "qtsmarthome qtwayland"
+APPLICATION_ENVIRONMENT ?= 'QT_QPA_PLATFORM=wayland-egl'
+WAYLAND_APPLICATION ?= "/usr/share/qtsmarthome-1.0/smarthome"
+
+require wayland-app-launch.inc