From 1ac5c704bb4b7fd72d9e382ccf23f4d186da0f86 Mon Sep 17 00:00:00 2001 From: Stephane Desneux Date: Thu, 23 Jun 2016 16:00:59 +0000 Subject: add layer meta-app-framework meta-app-framework is a layer containing the AGL App Framework recipes 4 new layers are added for application framework: * meta-intel-iot-security/meta-security-smack * meta-intel-iot-security/meta-security-framework * meta-agl/meta-agl-security * meta-agl/meta-app-framework Configuration file changes to support AppFw: * activation of Smack and Cynara * modify the tar command to be used to support Smack extended attributes Change-Id: Idc8abdc8869787feb4b534ee45bf7b5d3dde3632 Signed-off-by: Stephane Desneux --- .../web-runtime/web-runtime/web-runtime | 2 ++ .../web-runtime/web-runtime/web-runtime-webkit.qml | 13 +++++++++ .../web-runtime/web-runtime/web-runtime.qml | 13 +++++++++ .../recipes-core/web-runtime/web-runtime_0.1.bb | 34 ++++++++++++++++++++++ 4 files changed, 62 insertions(+) create mode 100755 meta-app-framework/recipes-core/web-runtime/web-runtime/web-runtime create mode 100644 meta-app-framework/recipes-core/web-runtime/web-runtime/web-runtime-webkit.qml create mode 100644 meta-app-framework/recipes-core/web-runtime/web-runtime/web-runtime.qml create mode 100644 meta-app-framework/recipes-core/web-runtime/web-runtime_0.1.bb (limited to 'meta-app-framework/recipes-core/web-runtime') diff --git a/meta-app-framework/recipes-core/web-runtime/web-runtime/web-runtime b/meta-app-framework/recipes-core/web-runtime/web-runtime/web-runtime new file mode 100755 index 000000000..ca712e155 --- /dev/null +++ b/meta-app-framework/recipes-core/web-runtime/web-runtime/web-runtime @@ -0,0 +1,2 @@ +#!/bin/sh +exec /usr/bin/qt5/qmlscene "$1" /usr/bin/web-runtime-webkit.qml diff --git a/meta-app-framework/recipes-core/web-runtime/web-runtime/web-runtime-webkit.qml b/meta-app-framework/recipes-core/web-runtime/web-runtime/web-runtime-webkit.qml new file mode 100644 index 000000000..d18b672cd --- /dev/null +++ b/meta-app-framework/recipes-core/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: 1024 + height: 768 + visible: true + WebView { + url: Qt.application.arguments[1] + anchors.fill: parent + } +} diff --git a/meta-app-framework/recipes-core/web-runtime/web-runtime/web-runtime.qml b/meta-app-framework/recipes-core/web-runtime/web-runtime/web-runtime.qml new file mode 100644 index 000000000..afe8a77d0 --- /dev/null +++ b/meta-app-framework/recipes-core/web-runtime/web-runtime/web-runtime.qml @@ -0,0 +1,13 @@ +import QtQuick 2.1 +import QtQuick.Controls 1.1 +import QtWebEngine 1.1 + +ApplicationWindow { + width: 1024 + height: 768 + visible: true + WebEngineView { + url: Qt.application.arguments[1] + anchors.fill: parent + } +} diff --git a/meta-app-framework/recipes-core/web-runtime/web-runtime_0.1.bb b/meta-app-framework/recipes-core/web-runtime/web-runtime_0.1.bb new file mode 100644 index 000000000..9df4dff2d --- /dev/null +++ b/meta-app-framework/recipes-core/web-runtime/web-runtime_0.1.bb @@ -0,0 +1,34 @@ +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=00cdb6980e03cf8c8f7d60dd978c61d7 \ + file://web-runtime.qml;md5sum=5d6a379e9b7e5654319e5ba638824a58 \ + file://web-runtime-webkit.qml;md5sum=4daf9df39078634c27a7923d37e82e3d \ +" + +RDEPENDS_${PN} = "qtwebkit-qmlplugins" + +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 +} + +do_install_append_rcar-gen2() { + # workaround for porter board: force the use of libEGL provided by mesa at runtime + # otherwise, the proprietary libEGL is used and a problem then occurs due to a missing EGL function + sed -i 's|^\(exec /usr/bin/qt5/qmlscene\)|LD_PRELOAD=/usr/lib/libEGL.so \1|g' ${D}${bindir}/web-runtime +} + + -- cgit 1.2.3-korg From 6dbefa1e2b6aa9ab52353360405905515793a3a3 Mon Sep 17 00:00:00 2001 From: José Bollo Date: Tue, 8 Nov 2016 11:38:51 +0100 Subject: web-runtime: provide IVI tuning for porter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added to the environment: export QT_WAYLAND_SHELL_INTEGRATION="ivi-shell" This allows HTML5 applications to run on top of the IVI-shell. Note to AGL integrators: this is a temporary patch that can be removed at the end. Change-Id: Ic2b5f75327af6cbd1af4c7bd1eeb5cc3a2b743fd Signed-off-by: José Bollo Signed-off-by: Stephane Desneux --- meta-app-framework/recipes-core/web-runtime/web-runtime/web-runtime | 1 + meta-app-framework/recipes-core/web-runtime/web-runtime_0.1.bb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'meta-app-framework/recipes-core/web-runtime') diff --git a/meta-app-framework/recipes-core/web-runtime/web-runtime/web-runtime b/meta-app-framework/recipes-core/web-runtime/web-runtime/web-runtime index ca712e155..0b8604439 100755 --- a/meta-app-framework/recipes-core/web-runtime/web-runtime/web-runtime +++ b/meta-app-framework/recipes-core/web-runtime/web-runtime/web-runtime @@ -1,2 +1,3 @@ #!/bin/sh +export QT_WAYLAND_SHELL_INTEGRATION="ivi-shell" exec /usr/bin/qt5/qmlscene "$1" /usr/bin/web-runtime-webkit.qml diff --git a/meta-app-framework/recipes-core/web-runtime/web-runtime_0.1.bb b/meta-app-framework/recipes-core/web-runtime/web-runtime_0.1.bb index 9df4dff2d..fa149875c 100644 --- a/meta-app-framework/recipes-core/web-runtime/web-runtime_0.1.bb +++ b/meta-app-framework/recipes-core/web-runtime/web-runtime_0.1.bb @@ -7,7 +7,7 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" SRC_URI = "\ - file://web-runtime;md5sum=00cdb6980e03cf8c8f7d60dd978c61d7 \ + file://web-runtime;md5sum=6114c0bdd20290912a423fa01beb50f0 \ file://web-runtime.qml;md5sum=5d6a379e9b7e5654319e5ba638824a58 \ file://web-runtime-webkit.qml;md5sum=4daf9df39078634c27a7923d37e82e3d \ " -- cgit 1.2.3-korg From 8f6992c0c44362d2f614c9df8283cb15029f2e8a Mon Sep 17 00:00:00 2001 From: José Bollo Date: Mon, 21 Nov 2016 15:37:32 +0100 Subject: Improves places for QT_WAYLAND_SHELL_INTEGRATION MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This define is currently needed by all applications launched by the framework. This commits allows that. Change-Id: Ia56268c1bca58f2da7c0152fa735751603d799bc Signed-off-by: José Bollo Signed-off-by: Stephane Desneux --- .../af-main/add-qt-wayland-shell-integration.patch | 24 ++++++++++++++++++++++ .../recipes-core/af-main/af-main_1.0.bb | 7 +++++-- .../web-runtime/web-runtime/web-runtime | 1 - 3 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 meta-app-framework/recipes-core/af-main/af-main/add-qt-wayland-shell-integration.patch (limited to 'meta-app-framework/recipes-core/web-runtime') diff --git a/meta-app-framework/recipes-core/af-main/af-main/add-qt-wayland-shell-integration.patch b/meta-app-framework/recipes-core/af-main/af-main/add-qt-wayland-shell-integration.patch new file mode 100644 index 000000000..f8940f24a --- /dev/null +++ b/meta-app-framework/recipes-core/af-main/af-main/add-qt-wayland-shell-integration.patch @@ -0,0 +1,24 @@ +diff --git a/conf/afm-user-daemon.service b/conf/afm-user-daemon.service +index 6b5c1d8..e0f6799 100644 +--- a/conf/afm-user-daemon.service ++++ b/conf/afm-user-daemon.service +@@ -7,6 +7,7 @@ BusName=org.AGL.afm.user + ExecStart=/usr/bin/afm-user-daemon --user-dbus=unix:path=%t/bus + Environment=AFM_APP_INSTALL_DIR=%%r + Environment=LD_PRELOAD=/usr/lib/libEGL.so ++Environment=QT_WAYLAND_SHELL_INTEGRATION=ivi-shell + Restart=on-failure + RestartSec=5 + +diff --git a/docs/quick-tutorial.md b/docs/quick-tutorial.md +index 081dfe5..f55d4d0 100644 +--- a/docs/quick-tutorial.md ++++ b/docs/quick-tutorial.md +@@ -29,6 +29,7 @@ Using the CLI tool + + ### Setup Environment + Connect your AGL target board to the network and copy some sample widgets on it through SSH (set BOARDIP with your board IP address) : ++ + ``` + $ cd afm-widget-examples + $ BOARDIP=1.2.3.4 diff --git a/meta-app-framework/recipes-core/af-main/af-main_1.0.bb b/meta-app-framework/recipes-core/af-main/af-main_1.0.bb index d8d7af46f..1b4e2092f 100644 --- a/meta-app-framework/recipes-core/af-main/af-main_1.0.bb +++ b/meta-app-framework/recipes-core/af-main/af-main_1.0.bb @@ -42,8 +42,11 @@ FILES_${PN} += "\ RDEPENDS_${PN}_append_smack = " smack-userspace" DEPENDS_append_smack = " smack-userspace-native" -# short hack here -SRC_URI += " file://Hack-to-allow-the-debugging.patch" +# short hacks here +SRC_URI += "\ + file://Hack-to-allow-the-debugging.patch \ + file://add-qt-wayland-shell-integration.patch \ +" do_install_append() { if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then diff --git a/meta-app-framework/recipes-core/web-runtime/web-runtime/web-runtime b/meta-app-framework/recipes-core/web-runtime/web-runtime/web-runtime index 0b8604439..ca712e155 100755 --- a/meta-app-framework/recipes-core/web-runtime/web-runtime/web-runtime +++ b/meta-app-framework/recipes-core/web-runtime/web-runtime/web-runtime @@ -1,3 +1,2 @@ #!/bin/sh -export QT_WAYLAND_SHELL_INTEGRATION="ivi-shell" exec /usr/bin/qt5/qmlscene "$1" /usr/bin/web-runtime-webkit.qml -- cgit 1.2.3-korg