summaryrefslogtreecommitdiffstats
path: root/meta-agl-demo/recipes-graphics/web-runtime
diff options
context:
space:
mode:
authorToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
committerToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
commit5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch)
treeb4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /meta-agl-demo/recipes-graphics/web-runtime
parent706ad73eb02caf8532deaf5d38995bd258725cb8 (diff)
agl-basesystem
Diffstat (limited to 'meta-agl-demo/recipes-graphics/web-runtime')
-rwxr-xr-xmeta-agl-demo/recipes-graphics/web-runtime/web-runtime/web-runtime18
-rw-r--r--meta-agl-demo/recipes-graphics/web-runtime/web-runtime/web-runtime-webkit.qml13
-rw-r--r--meta-agl-demo/recipes-graphics/web-runtime/web-runtime/web-runtime.qml14
-rw-r--r--meta-agl-demo/recipes-graphics/web-runtime/web-runtime_0.1.bb37
4 files changed, 82 insertions, 0 deletions
diff --git a/meta-agl-demo/recipes-graphics/web-runtime/web-runtime/web-runtime b/meta-agl-demo/recipes-graphics/web-runtime/web-runtime/web-runtime
new file mode 100755
index 00000000..39f3781b
--- /dev/null
+++ b/meta-agl-demo/recipes-graphics/web-runtime/web-runtime/web-runtime
@@ -0,0 +1,18 @@
+#!/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
+export LD_PRELOAD=/usr/lib/libEGL.so
+/usr/bin/runxdg "$port" "$token"
+rm -rf $AFM_APP_INSTALL_DIR
diff --git a/meta-agl-demo/recipes-graphics/web-runtime/web-runtime/web-runtime-webkit.qml b/meta-agl-demo/recipes-graphics/web-runtime/web-runtime/web-runtime-webkit.qml
new file mode 100644
index 00000000..8025ab12
--- /dev/null
+++ b/meta-agl-demo/recipes-graphics/web-runtime/web-runtime/web-runtime-webkit.qml
@@ -0,0 +1,13 @@
+import QtQuick 2.1
+import QtQuick.Controls 1.1
+import QtWebKit 3.0
+
+ApplicationWindow {
+ width: 1080
+ height: 1488
+ visible: true
+ WebView {
+ url: Qt.application.arguments[1]
+ anchors.fill: parent
+ }
+}
diff --git a/meta-agl-demo/recipes-graphics/web-runtime/web-runtime/web-runtime.qml b/meta-agl-demo/recipes-graphics/web-runtime/web-runtime/web-runtime.qml
new file mode 100644
index 00000000..3efe5159
--- /dev/null
+++ b/meta-agl-demo/recipes-graphics/web-runtime/web-runtime/web-runtime.qml
@@ -0,0 +1,14 @@
+import QtQuick 2.1
+import QtQuick.Controls 1.1
+import QtWebEngine 1.1
+
+ApplicationWindow {
+ width: 1080
+ height: 1488
+ visible: true
+ flags: Qt.WindowFullScreen | Qt.FramelessWindowHint
+ WebEngineView {
+ url: Qt.application.arguments[1]
+ anchors.fill: parent
+ }
+}
diff --git a/meta-agl-demo/recipes-graphics/web-runtime/web-runtime_0.1.bb b/meta-agl-demo/recipes-graphics/web-runtime/web-runtime_0.1.bb
new file mode 100644
index 00000000..ea5acbbf
--- /dev/null
+++ b/meta-agl-demo/recipes-graphics/web-runtime/web-runtime_0.1.bb
@@ -0,0 +1,37 @@
+inherit allarch
+
+SUMMARY = "Provides the 'web-runtime' command"
+DESCRIPTION = "The command 'web-runtime' is an abstraction that allows to "
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+SRC_URI = "\
+ file://web-runtime;md5sum=2245be1e6029b30966f0842e3fee75ea \
+ file://web-runtime.qml;md5sum=922aeae6d596d7c83af01abca266f0df \
+ file://web-runtime-webkit.qml;md5sum=4daf9df39078634c27a7923d37e82e3d \
+"
+
+RDEPENDS_${PN} = "\
+ qtdeclarative-tools \
+ qtwayland-qmlplugins \
+ qtquickcontrols-qmlplugins \
+ qtwebengine \
+ runxdg \
+ bash \
+"
+
+PROVIDES += "virtual/webruntime"
+# add also RPROVIDES to satisfy the packagegroup
+RPROVIDES_${PN} += "virtual/webruntime"
+
+do_configure() {
+ :
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${WORKDIR}/web-runtime ${D}${bindir}/web-runtime
+ install -m 0644 ${WORKDIR}/web-runtime.qml ${D}${bindir}/web-runtime.qml
+ install -m 0644 ${WORKDIR}/web-runtime-webkit.qml ${D}${bindir}/web-runtime-webkit.qml
+}