add dependency to 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${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 RDEPENDS_${PN} += " \
28     qtmultimedia-qmlplugins \
29     qtmultimedia-rtlfm-radio-plugin \
30     qtquickcontrols-qmlplugins \
31     qtquickcontrols2-qmlplugins \
32     qtsvg-plugins \
33     "
34
35 do_install_prepend() {
36     mkdir -p ${B}/package
37
38     echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
39 <widget xmlns=\"http://www.w3.org/ns/widgets\" id=\"controls\" version=\"0.1\"> \
40   <name>Controls</name> \
41   <content src=\"controls\" type=\"application/x-executable\"/> \
42   <description>Controls app.</description> \
43   <author>Qt</author> \
44   <icon src=\"controls.png\"/> \
45   <license>Apache 2.0</license> \
46 </widget> \
47 " > ${B}/apps/Controls/config.xml
48
49     cd ${B}/apps/Controls/
50     zip ${B}/package/controls.wgt config.xml controls
51
52     echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
53 <widget xmlns=\"http://www.w3.org/ns/widgets\" id=\"dashboard\" version=\"0.1\"> \
54   <name>Dashboard</name> \
55   <content src=\"dashboard\" type=\"application/x-executable\"/> \
56   <description>Dashboard app.</description> \
57   <author>Qt</author> \
58   <icon src=\"dashboard.png\"/> \
59   <license>Apache 2.0</license> \
60 </widget> \
61 " > ${B}/apps/Dashboard/config.xml
62
63     cd ${B}/apps/Dashboard/
64     zip ${B}/package/dashboard.wgt config.xml dashboard
65
66
67     echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
68 <widget xmlns=\"http://www.w3.org/ns/widgets\" id=\"phone\" version=\"0.1\"> \
69   <name>Phone</name> \
70   <content src=\"phone\" type=\"application/x-executable\"/> \
71   <description>Phone app.</description> \
72   <author>Qt</author> \
73   <icon src=\"phone.png\"/> \
74   <license>Apache 2.0</license> \
75 </widget> \
76 " > ${B}/apps/Phone/config.xml
77
78     cd ${B}/apps/Phone/
79     zip ${B}/package/phone.wgt config.xml phone
80
81
82
83     echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
84 <widget xmlns=\"http://www.w3.org/ns/widgets\" id=\"radio\" version=\"0.1\"> \
85   <name>Radio</name> \
86   <content src=\"radio\" type=\"application/x-executable\"/> \
87   <description>Radio app.</description> \
88   <author>Qt</author> \
89   <icon src=\"radio.png\"/> \
90   <license>Apache 2.0</license> \
91 </widget> \
92 " > ${B}/apps/Radio/config.xml
93
94     cd ${B}/apps/Radio/
95     zip ${B}/package/radio.wgt config.xml radio
96
97 }
98
99 do_install() {
100     install -d ${D}/home/root/app-data/radio
101     install -m 0644 ${WORKDIR}/presets-CES.conf ${D}/home/root/app-data/radio/
102     install -m 0644 ${WORKDIR}/presets-ALS.conf ${D}/home/root/app-data/radio/
103     install -m 0644 ${WORKDIR}/presets-FOSDEM.conf ${D}/home/root/app-data/radio/
104     install -m 0644 ${WORKDIR}/presets-${AGL_RADIO_PRESETS_LOCALE}.conf ${D}/home/root/app-data/radio/presets.conf
105
106     install -d ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
107     install -m 0644 ${S}/imports/AGL/Demo/Controls/qmldir ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
108     install -m 0644 ${S}/imports/AGL/Demo/Controls/ImageButton.qml ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
109     install -m 0644 ${S}/imports/AGL/Demo/Controls/ToggleButton.qml ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
110     install -m 0644 ${S}/imports/AGL/Demo/Controls/Key.qml ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
111     install -m 0644 ${S}/imports/AGL/Demo/Controls/AbstractKeyboard.qml ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
112     install -m 0644 ${S}/imports/AGL/Demo/Controls/Symbols.qml ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
113     install -m 0644 ${S}/imports/AGL/Demo/Controls/Alphabet.qml ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
114     install -m 0644 ${S}/imports/AGL/Demo/Controls/Keyboard.qml ${D}${libdir}/qt5/qml/AGL/Demo/Controls/
115     install -d ${D}${libdir}/qt5/qml/AGL/Demo/Controls/images/
116     install -m 0644 ${S}/imports/AGL/Demo/Controls/images/Keyboard_Back.svg ${D}${libdir}/qt5/qml/AGL/Demo/Controls/images/
117     install -m 0644 ${S}/imports/AGL/Demo/Controls/images/Keyboard_Shift.svg ${D}${libdir}/qt5/qml/AGL/Demo/Controls/images/
118     install -m 0644 ${S}/imports/AGL/Demo/Controls/images/Keyboard_Space.svg ${D}${libdir}/qt5/qml/AGL/Demo/Controls/images/
119     install -m 0644 ${S}/imports/AGL/Demo/Controls/images/Keyboard_Arrow.svg ${D}${libdir}/qt5/qml/AGL/Demo/Controls/images/
120
121     install -d ${D}${libdir}/qt5/qml/QtQuick/Controls.2/AGL
122     install -m 0644 ${S}/imports/qtquickcontrols2aglstyle/*.qml ${D}${libdir}/qt5/qml/QtQuick/Controls.2/AGL
123
124     install -d ${D}${libdir}/qt5/qml/QtQuick/Controls.2/AGL/images/
125     install -m 0644 ${S}/imports/qtquickcontrols2aglstyle/images/* ${D}${libdir}/qt5/qml/QtQuick/Controls.2/AGL/images/
126 }
127
128 # plain copy in own folder for now
129 #do_install() {
130 #    mkdir -p ${D}/usr/AGL/CES2017/
131 #    cp -rf ./* ${D}/usr/AGL/CES2017/
132 #}
133
134 FILES_${PN} += "/usr/AGL/ \
135         /home/root/app-data/radio/presets-*.conf \
136         /home/root/app-data/radio/presets.conf \
137         /usr/lib/qt5/qml/AGL/Demo/Controls/qmldir \
138         /usr/lib/qt5/qml/AGL/Demo/Controls/ImageButton.qml \
139         /usr/lib/qt5/qml/AGL/Demo/Controls/ToggleButton.qml \
140         /usr/lib/qt5/qml/AGL/Demo/Controls/Key.qml \
141         /usr/lib/qt5/qml/AGL/Demo/Controls/AbstractKeyboard.qml \
142         /usr/lib/qt5/qml/AGL/Demo/Controls/Symbols.qml \
143         /usr/lib/qt5/qml/AGL/Demo/Controls/Alphabet.qml \
144         /usr/lib/qt5/qml/AGL/Demo/Controls/Keyboard.qml \
145         /usr/lib/qt5/qml/AGL/Demo/Controls/images/Keyboard_Back.svg \
146         /usr/lib/qt5/qml/AGL/Demo/Controls/images/Keyboard_Shift.svg \
147         /usr/lib/qt5/qml/AGL/Demo/Controls/images/Keyboard_Space.svg \
148         /usr/lib/qt5/qml/AGL/Demo/Controls/images/Keyboard_Arrow.svg \
149         /usr/lib/qt5/qml/QtQuick/Controls.2/AGL \
150         /usr/lib/qt5/qml/QtQuick/Controls.2/AGL/images \
151         "