7d64f83ec968ff5398dd06de4583cfaa02f8ac7b
[AGL/meta-agl-demo.git] / recipes-demo-hmi / CES2017-demo / CES2017-demo.bb
1 SUMMARY     = "App Launcher for the AGL Demonstrator @ CES2017"
2 DESCRIPTION = "App Lanucher app in QML format for the AGL Demonstrator @ CESS2017"
3 HOMEPAGE    = "https://git.automotivelinux.org/gerrit/#/admin/projects/AGL/DemoApps/CES2017"
4 LICENSE     = "MPL-2.0"
5 SECTION     = "apps"
6 PV          = "1.0+git${SRCPV}"
7 S           = "${WORKDIR}/git/"
8 PN          = "ces2017-demo"
9
10 inherit qmake5
11 DEPENDS = "homescreen zip-native qtmultimedia qtquickcontrols2"
12
13 inherit aglwgt
14
15 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=815ca599c9df247a0c7f619bab123dad"
16
17 # ALS, CES, FOSDEM available
18 AGL_RADIO_PRESETS_LOCALE ?= "CES"
19
20 SRC_URI     = "git://gerrit.automotivelinux.org/gerrit/AGL/DemoApps/CES2017;protocol=http \
21                file://presets-ALS.conf \
22                file://presets-CES.conf \
23                file://presets-FOSDEM.conf \
24               "
25 SRCREV      = "${AUTOREV}"
26
27 # Pinned branch/SRCREV for Charming Chinook
28 SRC_URI_chinook = "git://gerrit.automotivelinux.org/gerrit/AGL/DemoApps/CES2017;protocol=http;branch=chinook \
29                    file://presets-ALS.conf \
30                    file://presets-CES.conf \
31                    file://presets-FOSDEM.conf \
32                   "
33 SRCREV_chinook = "354195c83841240ddd5f2c5daad97d66cc9e1d28"
34
35 RDEPENDS_${PN} += " \
36     qtmultimedia-qmlplugins \
37     qtmultimedia-rtlfm-radio-plugin \
38     qtquickcontrols-qmlplugins \
39     qtquickcontrols2-qmlplugins \
40     qtsvg-plugins \
41     "
42
43 do_install_prepend() {
44     mkdir -p ${B}/package
45
46     echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
47 <widget xmlns=\"http://www.w3.org/ns/widgets\" id=\"controls\" version=\"0.1\"> \
48   <name>Controls</name> \
49   <content src=\"controls\" type=\"application/x-executable\"/> \
50   <description>Controls app.</description> \
51   <author>Qt</author> \
52   <icon src=\"controls.png\"/> \
53   <license>Apache 2.0</license> \
54 </widget> \
55 " > ${B}/apps/Controls/config.xml
56
57     cd ${B}/apps/Controls/
58     zip ${B}/package/controls.wgt config.xml controls
59
60     echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
61 <widget xmlns=\"http://www.w3.org/ns/widgets\" id=\"dashboard\" version=\"0.1\"> \
62   <name>Dashboard</name> \
63   <content src=\"dashboard\" type=\"application/x-executable\"/> \
64   <description>Dashboard app.</description> \
65   <author>Qt</author> \
66   <icon src=\"dashboard.png\"/> \
67   <license>Apache 2.0</license> \
68 </widget> \
69 " > ${B}/apps/Dashboard/config.xml
70
71     cd ${B}/apps/Dashboard/
72     zip ${B}/package/dashboard.wgt config.xml dashboard
73
74
75     echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
76 <widget xmlns=\"http://www.w3.org/ns/widgets\" id=\"phone\" version=\"0.1\"> \
77   <name>Phone</name> \
78   <content src=\"phone\" type=\"application/x-executable\"/> \
79   <description>Phone app.</description> \
80   <author>Qt</author> \
81   <icon src=\"phone.png\"/> \
82   <license>Apache 2.0</license> \
83 </widget> \
84 " > ${B}/apps/Phone/config.xml
85
86     cd ${B}/apps/Phone/
87     zip ${B}/package/phone.wgt config.xml phone
88
89
90
91     echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
92 <widget xmlns=\"http://www.w3.org/ns/widgets\" id=\"radio\" version=\"0.1\"> \
93   <name>Radio</name> \
94   <content src=\"radio\" type=\"application/x-executable\"/> \
95   <description>Radio app.</description> \
96   <author>Qt</author> \
97   <icon src=\"radio.png\"/> \
98   <license>Apache 2.0</license> \
99 </widget> \
100 " > ${B}/apps/Radio/config.xml
101
102     cd ${B}/apps/Radio/
103     zip ${B}/package/radio.wgt config.xml radio
104
105 }
106
107 do_install() {
108     install -d ${D}/home/root/app-data/radio
109     install -m 0644 ${WORKDIR}/presets-CES.conf ${D}/home/root/app-data/radio/
110     install -m 0644 ${WORKDIR}/presets-ALS.conf ${D}/home/root/app-data/radio/
111     install -m 0644 ${WORKDIR}/presets-FOSDEM.conf ${D}/home/root/app-data/radio/
112     install -m 0644 ${WORKDIR}/presets-${AGL_RADIO_PRESETS_LOCALE}.conf ${D}/home/root/app-data/radio/presets.conf
113
114     install -d ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
115     install -m 0644 ${S}/imports/AGL/Demo/Controls/qmldir ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
116     install -m 0644 ${S}/imports/AGL/Demo/Controls/ImageButton.qml ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
117     install -m 0644 ${S}/imports/AGL/Demo/Controls/ToggleButton.qml ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
118     install -m 0644 ${S}/imports/AGL/Demo/Controls/Key.qml ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
119     install -m 0644 ${S}/imports/AGL/Demo/Controls/AbstractKeyboard.qml ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
120     install -m 0644 ${S}/imports/AGL/Demo/Controls/Symbols.qml ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
121     install -m 0644 ${S}/imports/AGL/Demo/Controls/Alphabet.qml ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
122     install -m 0644 ${S}/imports/AGL/Demo/Controls/Keyboard.qml ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
123     install -d ${D}${libdir}/qt5/qml/AGL/Demo/Controls/images/
124     install -m 0644 ${S}/imports/AGL/Demo/Controls/images/Keyboard_Back.svg ${D}${libdir}/qt5/qml/AGL/Demo/Controls/images/
125     install -m 0644 ${S}/imports/AGL/Demo/Controls/images/Keyboard_Shift.svg ${D}${libdir}/qt5/qml/AGL/Demo/Controls/images/
126     install -m 0644 ${S}/imports/AGL/Demo/Controls/images/Keyboard_Space.svg ${D}${libdir}/qt5/qml/AGL/Demo/Controls/images/
127     install -m 0644 ${S}/imports/AGL/Demo/Controls/images/Keyboard_Arrow.svg ${D}${libdir}/qt5/qml/AGL/Demo/Controls/images/
128
129     install -d ${D}${libdir}/qt5/qml/QtQuick/Controls.2/AGL
130     install -m 0644 ${S}/imports/qtquickcontrols2aglstyle/*.qml ${D}${libdir}/qt5/qml/QtQuick/Controls.2/AGL
131
132     install -d ${D}${libdir}/qt5/qml/QtQuick/Controls.2/AGL/images/
133     install -m 0644 ${S}/imports/qtquickcontrols2aglstyle/images/* ${D}${libdir}/qt5/qml/QtQuick/Controls.2/AGL/images/
134 }
135
136 # plain copy in own folder for now
137 #do_install() {
138 #    mkdir -p ${D}/usr/AGL/CES2017/
139 #    cp -rf ./* ${D}/usr/AGL/CES2017/
140 #}
141
142 FILES_${PN} += "/usr/AGL/ \
143         /home/root/app-data/radio/presets-*.conf \
144         /home/root/app-data/radio/presets.conf \
145         /usr/lib/qt5/qml/AGL/Demo/Controls/qmldir \
146         /usr/lib/qt5/qml/AGL/Demo/Controls/ImageButton.qml \
147         /usr/lib/qt5/qml/AGL/Demo/Controls/ToggleButton.qml \
148         /usr/lib/qt5/qml/AGL/Demo/Controls/Key.qml \
149         /usr/lib/qt5/qml/AGL/Demo/Controls/AbstractKeyboard.qml \
150         /usr/lib/qt5/qml/AGL/Demo/Controls/Symbols.qml \
151         /usr/lib/qt5/qml/AGL/Demo/Controls/Alphabet.qml \
152         /usr/lib/qt5/qml/AGL/Demo/Controls/Keyboard.qml \
153         /usr/lib/qt5/qml/AGL/Demo/Controls/images/Keyboard_Back.svg \
154         /usr/lib/qt5/qml/AGL/Demo/Controls/images/Keyboard_Shift.svg \
155         /usr/lib/qt5/qml/AGL/Demo/Controls/images/Keyboard_Space.svg \
156         /usr/lib/qt5/qml/AGL/Demo/Controls/images/Keyboard_Arrow.svg \
157         /usr/lib/qt5/qml/QtQuick/Controls.2/AGL \
158         /usr/lib/qt5/qml/QtQuick/Controls.2/AGL/images \
159         "