meta-digi-dey: webkit: add recipe to install webkit version of 'connectcore-demo'
The Webkit version of the ConnectCore demo implements some new functionality: - The COG browser is automatically started when the device boots loading the demo in the primary display. - A new Multimedia section is available to reproduce some demo videos and WebGL examples in the device's browser. Signed-off-by: David Escalona <david.escalona@digi.com>
This commit is contained in:
parent
d695a78524
commit
a84f588cd1
|
|
@ -0,0 +1,12 @@
|
|||
# Copyright (C) 2022 Digi International.
|
||||
|
||||
require recipes-digi/dey-examples/connectcore-demo-example.inc
|
||||
|
||||
RDEPENDS:${PN} += " \
|
||||
cog \
|
||||
video-examples \
|
||||
webglsamples \
|
||||
"
|
||||
|
||||
RREPLACES:${PN} = "connectcore-demo-example"
|
||||
RCONFLICTS:${PN} = "connectcore-demo-example"
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
#!/bin/sh
|
||||
#===============================================================================
|
||||
#
|
||||
# Copyright (C) 2022 by Digi International Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 as published by
|
||||
# the Free Software Foundation.
|
||||
#
|
||||
#
|
||||
# !Description: Initialize the ConnectCore demo example
|
||||
#
|
||||
#===============================================================================
|
||||
|
||||
# Source function library
|
||||
. /etc/init.d/functions
|
||||
|
||||
readonly COG_BINARY="/usr/bin/cog"
|
||||
readonly DEMOSERVER_BINARY="/srv/www/demoserver.py"
|
||||
readonly STOP_TIMEOUT="5"
|
||||
|
||||
stop_process() {
|
||||
# try to stop gracefully
|
||||
killproc "${1}" >/dev/null 2>&1
|
||||
for i in $(seq ${STOP_TIMEOUT}); do
|
||||
pid=$(pidofproc "${1}") || break
|
||||
if [ "${i}" -eq ${STOP_TIMEOUT} ]; then
|
||||
kill -KILL "${pid}" >/dev/null 2>&1
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
${DEMOSERVER_BINARY} > /dev/null 2>&1 &
|
||||
DISPLAY=:0.0 XDG_RUNTIME_DIR=/run/user/0 WAYLAND_DISPLAY=wayland-0 ${COG_BINARY} \
|
||||
--allow-file-access-from-file-urls=true \
|
||||
--allow-universal-access-from-file-urls=false \
|
||||
--enable-offline-web-application-cache=false \
|
||||
--enable-page-cache=false \
|
||||
--allow-modal-dialogs=true \
|
||||
/srv/www/index.html > /dev/null 2>&1 &
|
||||
;;
|
||||
stop)
|
||||
stop_process "${COG_BINARY}"
|
||||
stop_process "${DEMOSERVER_BINARY}"
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
[Unit]
|
||||
Description=Initialization of the ConnectCore demo example
|
||||
After=weston@root.service busybox-httpd.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/etc/connectcore-demo-example start
|
||||
ExecStop=/etc/connectcore-demo-example stop
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Loading…
Reference in New Issue