Enable installing navigation application
[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 = " qtbase qtdeclarative qtquickcontrols2 qtvirtualkeyboard 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=\"hvac\" version=\"0.1\"> \
62   <name>HVAC</name> \
63   <content src=\"hvac\" type=\"application/x-executable\"/> \
64   <description>HVAC app.</description> \
65   <author>Qt</author> \
66   <icon src=\"hvac.png\"/> \
67   <license>Apache 2.0</license> \
68 </widget> \
69 " > ${B}/apps/HVAC/config.xml
70
71     cd ${B}/apps/HVAC/
72     zip hvac.wgt config.xml hvac
73
74
75
76     echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
77 <widget xmlns=\"http://www.w3.org/ns/widgets\" id=\"mediaplayer\" version=\"0.1\"> \
78   <name>MediaPlayer</name> \
79   <content src=\"mediaplayer\" type=\"application/x-executable\"/> \
80   <description>MediaPlayer app.</description> \
81   <author>Qt</author> \
82   <icon src=\"mediaplayer.png\"/> \
83   <license>Apache 2.0</license> \
84 </widget> \
85 " > ${B}/apps/MediaPlayer/config.xml
86
87     cd ${B}/apps/MediaPlayer/
88     zip mediaplayer.wgt config.xml mediaplayer
89
90
91
92     echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
93 <widget xmlns=\"http://www.w3.org/ns/widgets\" id=\"phone\" version=\"0.1\"> \
94   <name>Phone</name> \
95   <content src=\"phone\" type=\"application/x-executable\"/> \
96   <description>Phone app.</description> \
97   <author>Qt</author> \
98   <icon src=\"phone.png\"/> \
99   <license>Apache 2.0</license> \
100 </widget> \
101 " > ${B}/apps/Phone/config.xml
102
103     cd ${B}/apps/Phone/
104     zip phone.wgt config.xml phone
105
106
107
108     echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
109 <widget xmlns=\"http://www.w3.org/ns/widgets\" id=\"radio\" version=\"0.1\"> \
110   <name>Radio</name> \
111   <content src=\"radio\" type=\"application/x-executable\"/> \
112   <description>Radio app.</description> \
113   <author>Qt</author> \
114   <icon src=\"radio.png\"/> \
115   <license>Apache 2.0</license> \
116 </widget> \
117 " > ${B}/apps/Radio/config.xml
118
119     cd ${B}/apps/Radio/
120     zip radio.wgt config.xml radio
121
122
123
124     echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
125 <widget xmlns=\"http://www.w3.org/ns/widgets\" id=\"settings\" version=\"0.1\"> \
126   <name>Settings</name> \
127   <content src=\"settings\" type=\"application/x-executable\"/> \
128   <description>Settings app.</description> \
129   <author>Qt</author> \
130   <icon src=\"settings.png\"/> \
131   <license>Apache 2.0</license> \
132 </widget> \
133 " > ${B}/apps/Settings/config.xml
134
135     cd ${B}/apps/Settings/
136     zip settings.wgt config.xml settings
137
138
139     cat > ${B}/apps/installAllApps.sh <<-EOF
140         #!/bin/sh
141         /usr/bin/afm-util install controls.wgt
142         /usr/bin/afm-util install dashboard.wgt
143         /usr/bin/afm-util install hvac.wgt
144         /usr/bin/afm-util install mediaplayer.wgt
145         /usr/bin/afm-util install phone.wgt
146         /usr/bin/afm-util install radio.wgt
147         /usr/bin/afm-util install settings.wgt
148         /usr/bin/afm-util install navigation.wgt
149         EOF
150 }
151
152 do_install() {
153     install -d ${D}/usr/AGL/${PN}
154     install -m 0644 ${B}/apps/Controls/controls.wgt ${D}/usr/AGL/${PN}/
155     install -m 0644 ${B}/apps/Dashboard/dashboard.wgt ${D}/usr/AGL/${PN}/
156     install -m 0644 ${B}/apps/HVAC/hvac.wgt ${D}/usr/AGL/${PN}/
157     install -m 0644 ${B}/apps/MediaPlayer/mediaplayer.wgt ${D}/usr/AGL/${PN}/
158     install -m 0644 ${B}/apps/Phone/phone.wgt ${D}/usr/AGL/${PN}/
159     install -m 0644 ${B}/apps/Radio/radio.wgt ${D}/usr/AGL/${PN}/
160     install -m 0644 ${B}/apps/Settings/settings.wgt ${D}/usr/AGL/${PN}/
161
162     install -m 0755 ${B}/apps/installAllApps.sh ${D}/usr/AGL/${PN}/
163
164     install -d ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
165     install -m 0644 ${S}/imports/AGL/Demo/Controls/qmldir ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
166     install -m 0644 ${S}/imports/AGL/Demo/Controls/ImageButton.qml ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
167     install -m 0644 ${S}/imports/AGL/Demo/Controls/ToggleButton.qml ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
168
169     install -d ${D}${libdir}/qt5/qml/QtQuick/Controls.2/AGL
170     install -m 0644 ${S}/imports/qtquickcontrols2aglstyle/*.qml ${D}${libdir}/qt5/qml/QtQuick/Controls.2/AGL
171
172     install -d ${D}${libdir}/qt5/qml/QtQuick/Controls.2/AGL/images/
173     install -m 0644 ${S}/imports/qtquickcontrols2aglstyle/images/* ${D}${libdir}/qt5/qml/QtQuick/Controls.2/AGL/images/
174 }
175
176 # plain copy in own folder for now
177 #do_install() {
178 #    mkdir -p ${D}/usr/AGL/CES2017/
179 #    cp -rf ./* ${D}/usr/AGL/CES2017/
180 #}
181
182 FILES_${PN} += "/usr/AGL/ \
183         /usr/lib/qt5/qml/AGL/Demo/Controls/qmldir \
184         /usr/lib/qt5/qml/AGL/Demo/Controls/ImageButton.qml \
185         /usr/lib/qt5/qml/AGL/Demo/Controls/ToggleButton.qml \
186         /usr/lib/qt5/qml/QtQuick/Controls.2/AGL \
187         /usr/lib/qt5/qml/QtQuick/Controls.2/AGL/images \
188         "