Add qtmultimedia radio plugin to demo images
[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"
7 S           = "${WORKDIR}/git/"
8 PN          = "ces2017-demo"
9
10 inherit qmake5
11 DEPENDS = " qtbase qtdeclarative qtquickcontrols2 qtmultimedia homescreen zip-native"
12
13 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=815ca599c9df247a0c7f619bab123dad"
14
15 SRC_URI     = "git://gerrit.automotivelinux.org/gerrit/AGL/DemoApps/CES2017;protocol=http"
16 SRCREV      = "${AUTOREV}"
17
18
19 RDEPENDS_${PN} += " \
20     qtmultimedia-qmlplugins \
21     qtmultimedia-rtlfm-radio-plugin \
22     qtquickcontrols-qmlplugins \
23     qtquickcontrols2-qmlplugins \
24     qtsvg-plugins \
25     "
26
27 do_install_prepend() {
28     echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
29 <widget xmlns=\"http://www.w3.org/ns/widgets\" id=\"controls\" version=\"0.1\"> \
30   <name>Controls</name> \
31   <content src=\"controls\" type=\"application/x-executable\"/> \
32   <description>Controls app.</description> \
33   <author>Qt</author> \
34   <icon src=\"controls.png\"/> \
35   <license>Apache 2.0</license> \
36 </widget> \
37 " > ${B}/apps/Controls/config.xml
38
39     cd ${B}/apps/Controls/
40     zip controls.wgt config.xml controls
41
42
43
44     echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
45 <widget xmlns=\"http://www.w3.org/ns/widgets\" id=\"dashboard\" version=\"0.1\"> \
46   <name>Dashboard</name> \
47   <content src=\"dashboard\" type=\"application/x-executable\"/> \
48   <description>Dashboard app.</description> \
49   <author>Qt</author> \
50   <icon src=\"dashboard.png\"/> \
51   <license>Apache 2.0</license> \
52 </widget> \
53 " > ${B}/apps/Dashboard/config.xml
54
55     cd ${B}/apps/Dashboard/
56     zip dashboard.wgt config.xml dashboard
57
58
59
60     echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
61 <widget xmlns=\"http://www.w3.org/ns/widgets\" id=\"home\" version=\"0.1\"> \
62   <name>Home</name> \
63   <content src=\"home\" type=\"application/x-executable\"/> \
64   <description>Home app.</description> \
65   <author>Qt</author> \
66   <icon src=\"home.png\"/> \
67   <license>Apache 2.0</license> \
68 </widget> \
69 " > ${B}/apps/Home/config.xml
70
71     cd ${B}/apps/Home/
72     zip home.wgt config.xml home
73
74
75
76     echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
77 <widget xmlns=\"http://www.w3.org/ns/widgets\" id=\"hvac\" version=\"0.1\"> \
78   <name>HVAC</name> \
79   <content src=\"hvac\" type=\"application/x-executable\"/> \
80   <description>HVAC app.</description> \
81   <author>Qt</author> \
82   <icon src=\"hvac.png\"/> \
83   <license>Apache 2.0</license> \
84 </widget> \
85 " > ${B}/apps/HVAC/config.xml
86
87     cd ${B}/apps/HVAC/
88     zip hvac.wgt config.xml hvac
89
90
91
92     echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
93 <widget xmlns=\"http://www.w3.org/ns/widgets\" id=\"mediaplayer\" version=\"0.1\"> \
94   <name>MediaPlayer</name> \
95   <content src=\"mediaplayer\" type=\"application/x-executable\"/> \
96   <description>MediaPlayer app.</description> \
97   <author>Qt</author> \
98   <icon src=\"mediaplayer.png\"/> \
99   <license>Apache 2.0</license> \
100 </widget> \
101 " > ${B}/apps/MediaPlayer/config.xml
102
103     cd ${B}/apps/MediaPlayer/
104     zip mediaplayer.wgt config.xml mediaplayer
105
106
107
108     echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
109 <widget xmlns=\"http://www.w3.org/ns/widgets\" id=\"phone\" version=\"0.1\"> \
110   <name>Phone</name> \
111   <content src=\"phone\" type=\"application/x-executable\"/> \
112   <description>Phone app.</description> \
113   <author>Qt</author> \
114   <icon src=\"phone.png\"/> \
115   <license>Apache 2.0</license> \
116 </widget> \
117 " > ${B}/apps/Phone/config.xml
118
119     cd ${B}/apps/Phone/
120     zip phone.wgt config.xml phone
121
122
123
124     echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
125 <widget xmlns=\"http://www.w3.org/ns/widgets\" id=\"radio\" version=\"0.1\"> \
126   <name>Radio</name> \
127   <content src=\"radio\" type=\"application/x-executable\"/> \
128   <description>Radio app.</description> \
129   <author>Qt</author> \
130   <icon src=\"radio.png\"/> \
131   <license>Apache 2.0</license> \
132 </widget> \
133 " > ${B}/apps/Radio/config.xml
134
135     cd ${B}/apps/Radio/
136     zip radio.wgt config.xml radio
137
138
139
140     echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
141 <widget xmlns=\"http://www.w3.org/ns/widgets\" id=\"settings\" version=\"0.1\"> \
142   <name>Settings</name> \
143   <content src=\"settings\" type=\"application/x-executable\"/> \
144   <description>Settings app.</description> \
145   <author>Qt</author> \
146   <icon src=\"settings.png\"/> \
147   <license>Apache 2.0</license> \
148 </widget> \
149 " > ${B}/apps/Settings/config.xml
150
151     cd ${B}/apps/Settings/
152     zip settings.wgt config.xml settings
153
154
155     cat > ${B}/apps/installAllApps.sh <<-EOF
156         #!/bin/sh
157         /usr/bin/afm-util install controls.wgt
158         /usr/bin/afm-util install dashboard.wgt
159         /usr/bin/afm-util install home.wgt
160         /usr/bin/afm-util install hvac.wgt
161         /usr/bin/afm-util install mediaplayer.wgt
162         /usr/bin/afm-util install phone.wgt
163         /usr/bin/afm-util install radio.wgt
164         /usr/bin/afm-util install settings.wgt
165         EOF
166 }
167
168 do_install() {
169     install -d ${D}/usr/AGL/${PN}
170     install -m 0644 ${B}/apps/Controls/controls.wgt ${D}/usr/AGL/${PN}/
171     install -m 0644 ${B}/apps/Dashboard/dashboard.wgt ${D}/usr/AGL/${PN}/
172     install -m 0644 ${B}/apps/Home/home.wgt ${D}/usr/AGL/${PN}/
173     install -m 0644 ${B}/apps/HVAC/hvac.wgt ${D}/usr/AGL/${PN}/
174     install -m 0644 ${B}/apps/MediaPlayer/mediaplayer.wgt ${D}/usr/AGL/${PN}/
175     install -m 0644 ${B}/apps/Phone/phone.wgt ${D}/usr/AGL/${PN}/
176     install -m 0644 ${B}/apps/Radio/radio.wgt ${D}/usr/AGL/${PN}/
177     install -m 0644 ${B}/apps/Settings/settings.wgt ${D}/usr/AGL/${PN}/
178
179     install -m 0755 ${B}/apps/installAllApps.sh ${D}/usr/AGL/${PN}/
180
181     install -d ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
182     install -m 0644 ${S}/imports/AGL/Demo/Controls/qmldir ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
183     install -m 0644 ${S}/imports/AGL/Demo/Controls/ImageButton.qml ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
184     install -m 0644 ${S}/imports/AGL/Demo/Controls/ToggleButton.qml ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
185
186     install -d ${D}${libdir}/qt5/qml/QtQuick/Controls.2/AGL
187     install -m 0644 ${S}/imports/qtquickcontrols2aglstyle/*.qml ${D}${libdir}/qt5/qml/QtQuick/Controls.2/AGL
188
189     install -d ${D}${libdir}/qt5/qml/QtQuick/Controls.2/AGL/images/
190     install -m 0644 ${S}/imports/qtquickcontrols2aglstyle/images/* ${D}${libdir}/qt5/qml/QtQuick/Controls.2/AGL/images/
191 }
192
193 # plain copy in own folder for now
194 #do_install() {
195 #    mkdir -p ${D}/usr/AGL/CES2017/
196 #    cp -rf ./* ${D}/usr/AGL/CES2017/
197 #}
198
199 FILES_${PN} += "/usr/AGL/ \
200         /usr/lib/qt5/qml/AGL/Demo/Controls/qmldir \
201         /usr/lib/qt5/qml/AGL/Demo/Controls/ImageButton.qml \
202         /usr/lib/qt5/qml/AGL/Demo/Controls/ToggleButton.qml \
203         /usr/lib/qt5/qml/QtQuick/Controls.2/AGL \
204         /usr/lib/qt5/qml/QtQuick/Controls.2/AGL/images \
205         "