web-runtime: Use runxdg for running QtWebEngine 87/15787/2
authorJosé Bollo <jose.bollo@iot.bzh>
Wed, 14 Mar 2018 21:30:47 +0000 (22:30 +0100)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Wed, 1 Aug 2018 11:07:58 +0000 (11:07 +0000)
Bug-AGL: SPEC-1346

Change-Id: I4783d06b008864a4703afe7364c5bec413590fc0
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
recipes-graphics/web-runtime/web-runtime/web-runtime
recipes-graphics/web-runtime/web-runtime_0.1.bb

index 80685eb..ad79155 100755 (executable)
@@ -1,2 +1,17 @@
-#!/bin/sh
-exec /usr/bin/qt5/qmlscene "$1" /usr/bin/web-runtime.qml
+#!/bin/bash
+export -n QT_WAYLAND_SHELL_INTEGRATION
+port=$(echo -n "$1" | sed 's,.*local.*:\([^/]*\)/.*,\1,')
+token=$(echo -n "$1" | sed 's,.*token=,,')
+export AFM_APP_INSTALL_DIR=$(mktemp -d)
+cat << EOC >  $AFM_APP_INSTALL_DIR/runxdg.toml
+[application]
+role = "WebBrowser"
+method = "POSIX"
+path = "/usr/bin/qt5/qmlscene"
+params = [
+     "$1",
+     "/usr/bin/web-runtime.qml"
+]
+EOC
+/usr/bin/runxdg "$port" "$token"
+rm -rf $AFM_APP_INSTALL_DIR
index bdfcbec..ea5acbb 100644 (file)
@@ -16,6 +16,9 @@ RDEPENDS_${PN} = "\
   qtdeclarative-tools \
   qtwayland-qmlplugins \
   qtquickcontrols-qmlplugins \
+  qtwebengine \
+  runxdg \
+  bash \
 "
 
 PROVIDES += "virtual/webruntime"