crank-demo: fix autostarting app on top of weston
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
parent
d3a8d312fd
commit
31d9863fea
|
|
@ -58,21 +58,6 @@ check_is_running() {
|
|||
return 1
|
||||
}
|
||||
|
||||
wait_for_wayland() {
|
||||
local count=20
|
||||
local wayland_socket="/run/user/0/${DEMO_DISPLAY}"
|
||||
|
||||
[ -S "${wayland_socket}" -o ! -d "/usr/share/wayland/" ] && return 0
|
||||
while [ ! -S "${wayland_socket}" ]; do
|
||||
sleep 1
|
||||
count=$((count-1))
|
||||
if [ "${count}" = 0 ]; then
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
return 0
|
||||
}
|
||||
|
||||
stop() {
|
||||
check_is_running || return
|
||||
|
||||
|
|
@ -93,7 +78,6 @@ stop() {
|
|||
start() {
|
||||
check_is_running && { log warning "start: ${CRANK_DEMO} ALREADY running"; exit 0; }
|
||||
|
||||
wait_for_wayland
|
||||
env ${DEMO_ENV} ${SB_LAUNCHER_SCRIPT} ${DEMO_OPTS} ${DEMO} >/dev/null 2>&1 &
|
||||
if [ $? -eq 0 ]; then
|
||||
echo $! > ${PID_FILE}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ Documentation=https://www.cranksoftware.com/
|
|||
|
||||
# Make sure we are started after graphic service is available
|
||||
After=##WESTON_SERVICE##
|
||||
Requires=##WESTON_SERVICE##
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ SRC_URI = " \
|
|||
"
|
||||
SRC_URI[sha256sum] = "90a7fc258cdaa5f9afcf57224da8bbc5a330b957db88335f555369123a1432ab"
|
||||
|
||||
WESTON_SERVICE ?= "weston@root.service"
|
||||
WESTON_SERVICE ?= "weston.service"
|
||||
WESTON_SERVICE:ccmp15 ?= "weston-launch.service"
|
||||
|
||||
CRANK_DEMOS_TARBALL_PATH ?= ""
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
ENGINE="/usr/share/crank/sbengine"
|
||||
|
||||
exec "env LD_LIBRARY_PATH=${ENGINE}/lib SB_PLUGINS=${ENGINE}/plugins ${ENGINE}/bin/sbengine $*"
|
||||
exec env LD_LIBRARY_PATH=${ENGINE}/lib SB_PLUGINS=${ENGINE}/plugins ${ENGINE}/bin/sbengine "$@"
|
||||
|
|
|
|||
Loading…
Reference in New Issue