Skip to contentSkip to conversation

qtwebbrowser: add QT web browser

PATCH Superseded Eric Ruei 2 participants 4 messages Jun 8, 2017 – Jun 12, 2017

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Eric Ruei

author
#0 lore raw

PATCH v3 1/3 qtwebbrowser: add QT web browser

- This is a touch-friendly web broswer based on qtwebengine and QML

---
 .../recipes-qt/examples/qtwebbrowser_1.0.bb        | 34 ++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 meta-arago-extras/recipes-qt/examples/qtwebbrowser_1.0.bb
meta-arago-extras/recipes-qt/examples/qtwebbrowser_1.0.bb new file +34 -0
new file mode 100644
index 0000000..c484bd9
@@ -0,0 +1,34 @@
+SUMMARY = "Qt Touch-Friendly WebBroswer"
+HOMEPAGE = "http://blog.qt.io/blog/2016/07/18/qt-webbrowser-1-0/"
+SECTION = "multimedia"
+LICENSE = "GPL-3.0 & GFDL-1.3"
+LIC_FILES_CHKSUM = " \
+    file://LICENSE.GPLv3;md5=a40e2bb02b1ac431f461afd03ff9d1d6 \
+    file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \
+"
+DEPENDS += "qtwebengine"
+
+PR = "r0"
+
+BRANCH = "dev"
+SRCREV = "023733af5523a5ad84359926224fa106001215f4"
+
+SRC_URI = "git://code.qt.io/qt-apps/qtwebbrowser.git;protocol=git;branch=${BRANCH} \
+"
+
+S = "${WORKDIR}/git"
+
+inherit qt-provider
+
+# Install qtwebbrowser under /usr/bin
+do_install() {
+    install -d ${D}${bindir}
+    install -d ${D}${datadir}/qt5/examples/webengine/webbrowser/src
+    install -m 0755 src/qtwebbrowser ${D}${bindir}/qtwebbrowser
+    cp -R --no-dereference --preserve=mode,links ${S}/* ${D}${datadir}/qt5/examples/webengine/webbrowser/.
+}
+
+FILES_${PN} +=  " \
+${bindir}/qtwebbrowser \
+${datadir}/qt5/examples/webengine/webbrowser/* \
+"
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH v3 2/3 packagegroup-arago-tisdk-qte: add qtwebbrowser demo application to the list and sort it

---
 .../recipes-core/packagegroups/packagegroup-arago-tisdk-qte.bb           | 1 +
 1 file changed, 1 insertion(+)
meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-qte.bb +1 -0
index f2f87be..530d93d 100644
@@ -24,6 +24,7 @@ QT5_DEMOS = "\
     qtscript-examples \
     qtsvg-examples \
     ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'qtwayland-examples', '', d)} \
+    qtwebbrowser \
     qtwebengine-examples \
     qtwebkit-examples-examples \
 "
Signature · 1 line
1.9.1
author
#2 lore raw

PATCH v3 3/3 qtwebbrowser: disable Fullscreen mode

In reply to Eric Ruei

We need to disable full-screen mode because there is no way to exit when the browser is launched from matrix-gui

---
 ...0001-qtwebbrowser-disable-FullScreen-mode.patch | 32 ++++++++++++++++++++++
 .../recipes-qt/examples/qtwebbrowser_1.0.bbappend  |  7 +++++
 2 files changed, 39 insertions(+)
 create mode 100755 meta-arago-distro/recipes-qt/examples/qtwebbrowser/0001-qtwebbrowser-disable-FullScreen-mode.patch
 create mode 100755 meta-arago-distro/recipes-qt/examples/qtwebbrowser_1.0.bbappend
meta-arago-distro/recipes-qt/examples/qtwebbrowser/0001-qtwebbrowser-disable-FullScreen-mode.patch new file +32 -0
new file mode 100755
index 0000000..fcf768b
@@ -0,0 +1,32 @@
+From 720056bbce57184c1f352abb160942dbff2c1cd0 Mon Sep 17 00:00:00 2001
+From: Eric Ruei <[email protected]>
+Date: Tue, 6 Jun 2017 14:40:08 -0400
+Subject: [PATCH] qtwebbrowser: disable FullScreen mode
+
+We need to disable full-screen mode because there is no way to exit
+when the browser is launched from matrix-gui
+
+Upstream-Status: Inappropriate
+It is a TI-specific workaround per matrix-gui operation
+
+Signed-off-by: Eric Ruei <[email protected]>
+---
+ src/main.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/main.cpp b/src/main.cpp
+index 2181f15..5f146b6 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -101,7 +101,7 @@ int main(int argc, char **argv)
+     if (view.size().isEmpty())
+         view.setGeometry(0, 0, 800, 600);
+ #else
+-    view.showFullScreen();
++    view.show();
+ #endif
+ 
+     app.exec();
+-- 
+1.9.1
+
meta-arago-distro/recipes-qt/examples/qtwebbrowser_1.0.bbappend new file +7 -0
new file mode 100755
index 0000000..3b7e80f
@@ -0,0 +1,7 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += " \
+    file://0001-qtwebbrowser-disable-FullScreen-mode.patch \
+"
+
+PR_append = ".arago0"
Signature · 1 line
1.9.1
#3 lore raw
In reply to Eric Ruei

Thanks, Eric, looks good. Please see below for a small comment.

Quoted 38 lines · Eric Ruei

- This is a touch-friendly web broswer based on qtwebengine and QML

---
 .../recipes-qt/examples/qtwebbrowser_1.0.bb        | 34 ++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 meta-arago-extras/recipes-qt/examples/qtwebbrowser_1.0.bb
meta-arago-extras/recipes-qt/examples/qtwebbrowser_1.0.bb new file +24 -0
new file mode 100644
index 0000000..c484bd9
@@ -0,0 +1,34 @@
+SUMMARY = "Qt Touch-Friendly WebBroswer"
+HOMEPAGE = "http://blog.qt.io/blog/2016/07/18/qt-webbrowser-1-0/"
+SECTION = "multimedia"
+LICENSE = "GPL-3.0 & GFDL-1.3"
+LIC_FILES_CHKSUM = " \
+    file://LICENSE.GPLv3;md5=a40e2bb02b1ac431f461afd03ff9d1d6 \
+    file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \
+"
+DEPENDS += "qtwebengine"
+
+PR = "r0"
+
+BRANCH = "dev"
+SRCREV = "023733af5523a5ad84359926224fa106001215f4"
+
+SRC_URI = "git://code.qt.io/qt-apps/qtwebbrowser.git;protocol=git;branch=${BRANCH} \
+"
+
+S = "${WORKDIR}/git"
+
+inherit qt-provider
+
+# Install qtwebbrowser under /usr/bin
+do_install() {

meta-arago-extras/recipes-qt/examples/qtwebbrowser_1.0.bb line 34

Quoted 10 lines
meta-arago-extras/recipes-qt/examples/qtwebbrowser_1.0.bb new file +10 -0
+    install -d ${D}${bindir}
+    install -d ${D}${datadir}/qt5/examples/webengine/webbrowser/src
+    install -m 0755 src/qtwebbrowser ${D}${bindir}/qtwebbrowser
+    cp -R --no-dereference --preserve=mode,links ${S}/* ${D}${datadir}/qt5/examples/webengine/webbrowser/.
+}
+
+FILES_${PN} +=  " \
+${bindir}/qtwebbrowser \
+${datadir}/qt5/examples/webengine/webbrowser/* \
+"

Can you please split the resulting package into ${PN} with only the binary and ${PN}-examples with the sources? All you need to change is the FILES_ statements above. You can pull both into the packagegroup in patch #2. Thanks.

Quoted 7 lines
Signature · 6 lines
1.9.1

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago