diff options
Diffstat (limited to 'meta-boot2qt/recipes-qt/boot2qt-addons/boot2qt-demos_git.bb')
-rw-r--r-- | meta-boot2qt/recipes-qt/boot2qt-addons/boot2qt-demos_git.bb | 134 |
1 files changed, 134 insertions, 0 deletions
diff --git a/meta-boot2qt/recipes-qt/boot2qt-addons/boot2qt-demos_git.bb b/meta-boot2qt/recipes-qt/boot2qt-addons/boot2qt-demos_git.bb new file mode 100644 index 0000000..3726482 --- /dev/null +++ b/meta-boot2qt/recipes-qt/boot2qt-addons/boot2qt-demos_git.bb | |||
@@ -0,0 +1,134 @@ | |||
1 | ############################################################################ | ||
2 | ## | ||
3 | ## Copyright (C) 2018 The Qt Company Ltd. | ||
4 | ## Contact: https://www.qt.io/licensing/ | ||
5 | ## | ||
6 | ## This file is part of the Boot to Qt meta layer. | ||
7 | ## | ||
8 | ## $QT_BEGIN_LICENSE:GPL$ | ||
9 | ## Commercial License Usage | ||
10 | ## Licensees holding valid commercial Qt licenses may use this file in | ||
11 | ## accordance with the commercial license agreement provided with the | ||
12 | ## Software or, alternatively, in accordance with the terms contained in | ||
13 | ## a written agreement between you and The Qt Company. For licensing terms | ||
14 | ## and conditions see https://www.qt.io/terms-conditions. For further | ||
15 | ## information use the contact form at https://www.qt.io/contact-us. | ||
16 | ## | ||
17 | ## GNU General Public License Usage | ||
18 | ## Alternatively, this file may be used under the terms of the GNU | ||
19 | ## General Public License version 3 or (at your option) any later version | ||
20 | ## approved by the KDE Free Qt Foundation. The licenses are as published by | ||
21 | ## the Free Software Foundation and appearing in the file LICENSE.GPL3 | ||
22 | ## included in the packaging of this file. Please review the following | ||
23 | ## information to ensure the GNU General Public License requirements will | ||
24 | ## be met: https://www.gnu.org/licenses/gpl-3.0.html. | ||
25 | ## | ||
26 | ## $QT_END_LICENSE$ | ||
27 | ## | ||
28 | ############################################################################ | ||
29 | |||
30 | DESCRIPTION = "Boot to Qt Demos" | ||
31 | LICENSE = "BSD | The-Qt-Company-DCLA-2.1" | ||
32 | LIC_FILES_CHKSUM = "file://about-b2qt/AboutBoot2Qt.qml;md5=b0a1a6eef4a172b0a8cb4dad9a167d91;beginline=1;endline=49" | ||
33 | |||
34 | inherit qmake5 | ||
35 | |||
36 | QT_GIT_PROJECT="" | ||
37 | |||
38 | SRC_URI = " \ | ||
39 | ${QT_GIT}qt-apps/boot2qt-demos.git;branch=${BRANCH};name=demos \ | ||
40 | ${QT_GIT}qt/qtcanvas3d.git;branch=${QT_BRANCH};name=qtcanvas3d;destsuffix=qtcanvas3d \ | ||
41 | ${QT_GIT}qt/qtquickcontrols.git;branch=${QT_BRANCH};name=qtquickcontrols;destsuffix=qtquickcontrols \ | ||
42 | ${QT_GIT}qt-apps/qtwebbrowser.git;branch=${BROWSER_BRANCH};name=qtwebbrowser;destsuffix=git/basicsuite/qtwebbrowser/tqtc-qtwebbrowser \ | ||
43 | https://s3-eu-west-1.amazonaws.com/qt-files/examples/Videos/Qt_video_720p.webm;name=video1 \ | ||
44 | https://s3-eu-west-1.amazonaws.com/qt-files/examples/Videos/Qt+World+Summit+2015+Recap.mp4;name=video2 \ | ||
45 | " | ||
46 | |||
47 | PV = "5.11.0+git${SRCPV}" | ||
48 | |||
49 | BRANCH = "5.10" | ||
50 | BROWSER_BRANCH = "dev" | ||
51 | QT_BRANCH = "5.10" | ||
52 | SRCREV_demos = "f9c7da64cea85d44998e62f4e0d3ec217a22f0d2" | ||
53 | SRCREV_qtcanvas3d = "32404e27101c5ec81b4ab965faf38263429bbc5a" | ||
54 | SRCREV_qtquickcontrols = "c6713e212ef0b97c45d6466b73220567e94a05f1" | ||
55 | SRCREV_qtwebbrowser = "7c570ee4297946f3ed70565a630d690070533cbd" | ||
56 | SRCREV_FORMAT = "demos_qtcanvas3d_qtquickcontrols_qtwebbrowser" | ||
57 | |||
58 | SRC_URI[video1.md5sum] = "56de4dcfd5201952dce9af9c69fcec9b" | ||
59 | SRC_URI[video1.sha256sum] = "809123419acac99353439e52c870e2e497dfa8f434ef0777e6c7303e6ad27f89" | ||
60 | SRC_URI[video2.md5sum] = "e03422de1dba27189872e7d579e7da1b" | ||
61 | SRC_URI[video2.sha256sum] = "651e0b4d2b3272dc10bfc9edba4f0c1a7084cd087c75e8a098f7ba3454c7e485" | ||
62 | |||
63 | S = "${WORKDIR}/git/basicsuite" | ||
64 | |||
65 | DEPENDS = "qtbase qtdeclarative qtxmlpatterns qtquickcontrols qtgraphicaleffects qtsensors qtmultimedia qtcanvas3d \ | ||
66 | ${@bb.utils.contains('DISTRO_FEATURES', 'webengine', 'qtwebengine', '', d)}" | ||
67 | |||
68 | do_install_append() { | ||
69 | # we only need plugins from the demos | ||
70 | rm -rf ${D}/data/user/camera | ||
71 | rm -rf ${D}/data/user/sensorexplorer | ||
72 | rm -rf ${D}/data/user/qtwebbrowser | ||
73 | |||
74 | # we need all qml and content files | ||
75 | cp -r ${S}/* ${D}/data/user/qt/ | ||
76 | |||
77 | # but none of the source files | ||
78 | find ${D}/data/user/qt/ \( -name '*.cpp' -or -name '*.h' -or -name '*.pro' \) -delete | ||
79 | rm -rf ${D}/data/user/qt/qtwebbrowser/tqtc-qtwebbrowser | ||
80 | rm -rf ${D}/data/user/qt/qtwebbrowser/qmldir | ||
81 | |||
82 | if [ -d ${WORKDIR}/git/images ]; then | ||
83 | install -d 0755 ${D}/data/images | ||
84 | install -m 0644 ${WORKDIR}/git/images/* ${D}/data/images/ | ||
85 | fi | ||
86 | |||
87 | install -d -m 0755 ${D}/data/videos | ||
88 | install -m 0644 ${WORKDIR}/Qt_video_720p.webm ${D}/data/videos | ||
89 | install -m 0644 ${WORKDIR}/Qt+World+Summit+2015+Recap.mp4 ${D}/data/videos | ||
90 | |||
91 | cp ${WORKDIR}/qtcanvas3d/examples/canvas3d/canvas3d/threejs/planets/*.qml ${D}/data/user/qt/canvas3d-planets | ||
92 | cp ${WORKDIR}/qtcanvas3d/examples/canvas3d/canvas3d/threejs/planets/*.js ${D}/data/user/qt/canvas3d-planets | ||
93 | cp -r ${WORKDIR}/qtcanvas3d/examples/canvas3d/canvas3d/threejs/planets/images ${D}/data/user/qt/canvas3d-planets | ||
94 | cp ${WORKDIR}/qtcanvas3d/examples/canvas3d/canvas3d/threejs/controls/ControlEventSource.qml ${D}/data/user/qt/canvas3d-planets | ||
95 | cp ${WORKDIR}/qtcanvas3d/examples/canvas3d/canvas3d/3rdparty/*.js ${D}/data/user/qt/canvas3d-planets | ||
96 | |||
97 | # get rid of qrc:/ prefixes and the custom slider | ||
98 | sed -i 's/qrc:\(\/\)\?//g' ${D}/data/user/qt/canvas3d-planets/*.qml | ||
99 | sed -i 's/qrc:\(\/\)\?//g' ${D}/data/user/qt/canvas3d-planets/*.js | ||
100 | sed -i 's/StyledSlider/Slider/g' ${D}/data/user/qt/canvas3d-planets/planets.qml | ||
101 | sed -i '/import QtCanvas3D/a import QtQuick.Controls 1.2' ${D}/data/user/qt/canvas3d-planets/planets.qml | ||
102 | |||
103 | # Qt Quick Extras | ||
104 | cp -r ${WORKDIR}/qtquickcontrols/examples/quickcontrols/extras/dashboard/qml ${D}/data/user/qt/enterprise-dashboard/ | ||
105 | cp -r ${WORKDIR}/qtquickcontrols/examples/quickcontrols/extras/dashboard/images ${D}/data/user/qt/enterprise-dashboard/ | ||
106 | |||
107 | cp -r ${WORKDIR}/qtquickcontrols/examples/quickcontrols/extras/gallery/qml ${D}/data/user/qt/enterprise-gallery/ | ||
108 | cp -r ${WORKDIR}/qtquickcontrols/examples/quickcontrols/extras/gallery/images ${D}/data/user/qt/enterprise-gallery/ | ||
109 | cp -r ${WORKDIR}/qtquickcontrols/examples/quickcontrols/extras/gallery/fonts ${D}/data/user/qt/enterprise-gallery/ | ||
110 | |||
111 | cp -r ${WORKDIR}/qtquickcontrols/examples/quickcontrols/extras/flat/images ${D}/data/user/qt/enterprise-flat-controls/ | ||
112 | cp ${WORKDIR}/qtquickcontrols/examples/quickcontrols/extras/flat/*.qml ${D}/data/user/qt/enterprise-flat-controls/ | ||
113 | |||
114 | sed -i '/import QtQuick.Window/c\' ${D}/data/user/qt/enterprise-dashboard/qml/dashboard.qml ${D}/data/user/qt/enterprise-gallery/qml/gallery.qml | ||
115 | sed -i 's/Window /Rectangle /1' ${D}/data/user/qt/enterprise-dashboard/qml/dashboard.qml ${D}/data/user/qt/enterprise-gallery/qml/gallery.qml | ||
116 | sed -i 's/ApplicationWindow /Rectangle /1' ${D}/data/user/qt/enterprise-flat-controls/main.qml | ||
117 | sed -i '/title: "Qt Quick Extras Demo"/c\' ${D}/data/user/qt/enterprise-dashboard/qml/dashboard.qml ${D}/data/user/qt/enterprise-gallery/qml/gallery.qml | ||
118 | sed -i '/title: "Flat Example"/c\' ${D}/data/user/qt/enterprise-flat-controls/main.qml | ||
119 | sed -i 's/"Light Flat UI Demo"/"Qt Quick Controls"/1' ${D}/data/user/qt/enterprise-flat-controls/main.qml | ||
120 | sed -i '/{ name: "Exit", action: null }/c\' ${D}/data/user/qt/enterprise-flat-controls/main.qml | ||
121 | |||
122 | sed -i -e 's/qrc:/../g' ${D}/data/user/qt/enterprise-dashboard/qml/* ${D}/data/user/qt/enterprise-gallery/qml/* | ||
123 | sed -i 's/qrc:\///g' ${D}/data/user/qt/enterprise-flat-controls/Content.qml | ||
124 | } | ||
125 | |||
126 | FILES_${PN} += " \ | ||
127 | /data/images/ \ | ||
128 | /data/videos/ \ | ||
129 | /data/user \ | ||
130 | " | ||
131 | |||
132 | FILES_${PN}-dbg += " \ | ||
133 | /data/user/qt/qmlplugins/*/.debug/ \ | ||
134 | " | ||