From 6cbe18653ab705592671001daab88a7c58c81a69 Mon Sep 17 00:00:00 2001 From: Philippe Schenker Date: Thu, 29 Sep 2022 15:26:03 +0200 Subject: wayland-app-launch: remove shell-script weston uses now systemd-notify to notify systemd when it is up and running. This is the reason why we do no longer need wayland-app-launch.sh with the synchronization point in it. Remove wayland-app-launch.sh script. Remove also the init directory feature as it is no longer needed. qtsmarthome works now from any directory. Related-to: ELB-4784 Signed-off-by: Philippe Schenker --- .../wayland-app-launch/wayland-app-launch.inc | 9 ++++----- .../wayland-app-launch/wayland-app-launch.service.in | 6 +++--- .../wayland-app-launch/wayland-app-launch.sh.in | 15 --------------- .../wayland-qtdemo-launch-analogclock_1.0.bb | 3 +-- .../wayland-qtdemo-launch-cinematicexperience_1.0.bb | 3 +-- .../wayland-qtdemo-launch-qtsmarthome_1.0.bb | 5 ++--- 6 files changed, 11 insertions(+), 30 deletions(-) delete mode 100644 recipes-graphics/wayland-app-launch/wayland-app-launch/wayland-app-launch.sh.in diff --git a/recipes-graphics/wayland-app-launch/wayland-app-launch.inc b/recipes-graphics/wayland-app-launch/wayland-app-launch.inc index 946b4cc..588ca4b 100644 --- a/recipes-graphics/wayland-app-launch/wayland-app-launch.inc +++ b/recipes-graphics/wayland-app-launch/wayland-app-launch.inc @@ -11,21 +11,20 @@ S = "${WORKDIR}" SRC_URI = " \ file://wayland-app-launch.service.in \ - file://wayland-app-launch.sh.in \ " FILESEXTRAPATHS:prepend := "${THISDIR}/wayland-app-launch:" APPLICATION_ENVIRONMENT ??= "" do_compile () { - sed -e "s:@@wayland-application@@:${WAYLAND_APPLICATION}:" -e "s:@@initial-path@@:${INITIAL_PATH}:" 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}" 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 5c585d3..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 @@ -4,14 +4,14 @@ After=weston.service Requires=weston.service [Service] -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 87349aa..0000000 --- a/recipes-graphics/wayland-app-launch/wayland-app-launch/wayland-app-launch.sh.in +++ /dev/null @@ -1,15 +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 - -cd @@initial-path@@ -@@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 index d11611e..73c7dd1 100644 --- 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 @@ -2,8 +2,7 @@ # be launched right after weston started INITIAL_APP_PKGS ?= "qtbase-examples qtwayland" -INITIAL_PATH ?= "" -APPLICATION_ENVIRONMENT ?= '\"QT_QPA_PLATFORM=wayland-egl\"' +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 bd27da8..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 @@ -2,8 +2,7 @@ # be launched right after weston started INITIAL_APP_PKGS ?= "cinematicexperience qtwayland" -INITIAL_PATH ?= "" -APPLICATION_ENVIRONMENT ?= '\"QT_QPA_PLATFORM=wayland-egl\"' +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 index b85fdf0..2e1a2b0 100644 --- 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 @@ -2,8 +2,7 @@ # be launched right after weston started INITIAL_APP_PKGS ?= "qtsmarthome qtwayland" -INITIAL_PATH ?= "/usr/share/qtsmarthome-1.0/" -APPLICATION_ENVIRONMENT ?= '\"QT_QPA_PLATFORM=wayland-egl\"' -WAYLAND_APPLICATION ?= "${INITIAL_PATH}/smarthome" +APPLICATION_ENVIRONMENT ?= 'QT_QPA_PLATFORM=wayland-egl' +WAYLAND_APPLICATION ?= "/usr/share/qtsmarthome-1.0/smarthome" require wayland-app-launch.inc -- cgit v1.2.3