Merge lp:~zeller-benjamin/qtcreator-plugin-ubuntu/snapcraft-step1 into lp:qtcreator-plugin-ubuntu
- snapcraft-step1
- Merge into trunk
Proposed by
Benjamin Zeller
Status: | Merged |
---|---|
Approved by: | Zoltan Balogh |
Approved revision: | 471 |
Merged at revision: | 470 |
Proposed branch: | lp:~zeller-benjamin/qtcreator-plugin-ubuntu/snapcraft-step1 |
Merge into: | lp:qtcreator-plugin-ubuntu |
Diff against target: |
1485 lines (+1183/-19) 26 files modified
UbuntuPlugin.pro (+9/-2) share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName.pro (+32/-0) share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/Main.qml (+54/-0) share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.desktop (+9/-0) share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.pro (+48/-0) share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.qrc (+5/-0) share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.wrapper (+63/-0) share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/main.cpp (+14/-0) share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/snapcraft.yaml (+23/-0) share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/wizard.json (+108/-0) share/qtcreator/ubuntu/qml/publishpage.qml (+2/-2) share/qtcreator/ubuntu/scripts/usdk-target-build (+1/-0) src/plugin.pri (+1/-0) src/ubuntu/clicktoolchain.cpp (+1/-1) src/ubuntu/clicktoolchain.h (+1/-1) src/ubuntu/snap/snapcraftpackagestep.cpp (+468/-0) src/ubuntu/snap/snapcraftpackagestep.h (+105/-0) src/ubuntu/snap/snaphelper.cpp (+30/-0) src/ubuntu/snap/snaphelper.h (+22/-0) src/ubuntu/ubuntuconstants.h (+1/-0) src/ubuntu/ubuntujsextension.cpp (+46/-0) src/ubuntu/ubuntujsextension.h (+37/-0) src/ubuntu/ubuntupackagingmodel.cpp (+86/-5) src/ubuntu/ubuntupackagingmodel.h (+1/-0) src/ubuntu/ubuntuplugin.cpp (+9/-3) src/ubuntu/wizards/ubuntuprojectapplicationwizard.cpp (+7/-5) |
To merge this branch: | bzr merge lp:~zeller-benjamin/qtcreator-plugin-ubuntu/snapcraft-step1 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Zoltan Balogh | Approve | ||
ubuntu-sdk-build-bot | continuous-integration | Needs Fixing | |
Review via email: mp+306498@code.launchpad.net |
Commit message
Support packaging snapcraft projects from the IDE (Step 1)
Description of the change
Support packaging snapcraft projects from the IDE (Step 1)
To post a comment you must log in.
- 471. By Benjamin Zeller
-
merge trunk
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
review:
Needs Fixing
(continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:471
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
review:
Needs Fixing
(continuous-integration)
Revision history for this message
Zoltan Balogh (bzoltan) wrote : | # |
Nice
Revision history for this message
Zoltan Balogh (bzoltan) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'UbuntuPlugin.pro' | |||
2 | --- UbuntuPlugin.pro 2016-09-05 17:14:46 +0000 | |||
3 | +++ UbuntuPlugin.pro 2016-09-22 15:50:47 +0000 | |||
4 | @@ -106,7 +106,10 @@ | |||
5 | 106 | src/ubuntu/device/container/ubuntulocaldeployconfiguration.cpp \ | 106 | src/ubuntu/device/container/ubuntulocaldeployconfiguration.cpp \ |
6 | 107 | src/ubuntu/device/container/ubuntulocalrunconfigurationfactory.cpp \ | 107 | src/ubuntu/device/container/ubuntulocalrunconfigurationfactory.cpp \ |
7 | 108 | src/ubuntu/device/container/ubuntulocalrunconfiguration.cpp \ | 108 | src/ubuntu/device/container/ubuntulocalrunconfiguration.cpp \ |
9 | 109 | src/ubuntu/processoutputdialog.cpp | 109 | src/ubuntu/processoutputdialog.cpp \ |
10 | 110 | $$PWD/src/ubuntu/ubuntujsextension.cpp \ | ||
11 | 111 | src/ubuntu/snap/snapcraftpackagestep.cpp \ | ||
12 | 112 | src/ubuntu/snap/snaphelper.cpp | ||
13 | 110 | 113 | ||
14 | 111 | HEADERS += \ | 114 | HEADERS += \ |
15 | 112 | src/ubuntu/ubuntuplugin.h \ | 115 | src/ubuntu/ubuntuplugin.h \ |
16 | @@ -175,7 +178,10 @@ | |||
17 | 175 | src/ubuntu/device/container/ubuntulocaldeployconfiguration.h \ | 178 | src/ubuntu/device/container/ubuntulocaldeployconfiguration.h \ |
18 | 176 | src/ubuntu/device/container/ubuntulocalrunconfigurationfactory.h \ | 179 | src/ubuntu/device/container/ubuntulocalrunconfigurationfactory.h \ |
19 | 177 | src/ubuntu/device/container/ubuntulocalrunconfiguration.h \ | 180 | src/ubuntu/device/container/ubuntulocalrunconfiguration.h \ |
21 | 178 | src/ubuntu/processoutputdialog.h | 181 | src/ubuntu/processoutputdialog.h \ |
22 | 182 | $$PWD/src/ubuntu/ubuntujsextension.h \ | ||
23 | 183 | src/ubuntu/snap/snapcraftpackagestep.h \ | ||
24 | 184 | src/ubuntu/snap/snaphelper.h | ||
25 | 179 | 185 | ||
26 | 180 | #remote device support | 186 | #remote device support |
27 | 181 | SOURCES += \ | 187 | SOURCES += \ |
28 | @@ -214,6 +220,7 @@ | |||
29 | 214 | src/ubuntu/device/remote/ubuntudirectuploadstep.h \ | 220 | src/ubuntu/device/remote/ubuntudirectuploadstep.h \ |
30 | 215 | src/ubuntu/device/remote/ubuntudeploystepfactory.h | 221 | src/ubuntu/device/remote/ubuntudeploystepfactory.h |
31 | 216 | 222 | ||
32 | 223 | |||
33 | 217 | FORMS += \ | 224 | FORMS += \ |
34 | 218 | src/ubuntu/device/remote/ubunturemoterunconfigurationwidget.ui \ | 225 | src/ubuntu/device/remote/ubunturemoterunconfigurationwidget.ui \ |
35 | 219 | 226 | ||
36 | 220 | 227 | ||
37 | === added directory 'share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake' | |||
38 | === added directory 'share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName' | |||
39 | === added file 'share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName.pro' | |||
40 | --- share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName.pro 1970-01-01 00:00:00 +0000 | |||
41 | +++ share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName.pro 2016-09-22 15:50:47 +0000 | |||
42 | @@ -0,0 +1,32 @@ | |||
43 | 1 | # This is the basic qmake template for the Ubuntu-SDK | ||
44 | 2 | # it handles creation and installation of the manifest | ||
45 | 3 | # file and takes care of subprojects | ||
46 | 4 | TEMPLATE = subdirs | ||
47 | 5 | |||
48 | 6 | SUBDIRS += %{ProjectNameL} | ||
49 | 7 | |||
50 | 8 | # enables/disabled the extra targets to build a snapcraft package | ||
51 | 9 | # also tells the IDE this is a snapcraft project | ||
52 | 10 | CONFIG += snapcraft | ||
53 | 11 | |||
54 | 12 | snapcraft { | ||
55 | 13 | |||
56 | 14 | SNAPCRAFT_FILE=snapcraft.yaml | ||
57 | 15 | |||
58 | 16 | #the Ubuntu SDK IDE uses the snap target to create the package | ||
59 | 17 | snappy.target = snap | ||
60 | 18 | snappy.commands = cd $$OUT_PWD | ||
61 | 19 | snappy.commands += && rm -rf \'$$OUT_PWD/snap-deploy\' | ||
62 | 20 | snappy.commands += && make INSTALL_ROOT=$$OUT_PWD/snap-deploy install | ||
63 | 21 | snappy.commands += && cd $$OUT_PWD/snap-deploy | ||
64 | 22 | snappy.commands += && snapcraft | ||
65 | 23 | |||
66 | 24 | OTHER_FILES+=$$SNAPCRAFT_FILE | ||
67 | 25 | QMAKE_EXTRA_TARGETS += snappy | ||
68 | 26 | |||
69 | 27 | packaging.files = $$SNAPCRAFT_FILE | ||
70 | 28 | packaging.path = / | ||
71 | 29 | |||
72 | 30 | INSTALLS+=packaging | ||
73 | 31 | } | ||
74 | 32 | |||
75 | 0 | 33 | ||
76 | === added file 'share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/Main.qml' | |||
77 | --- share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/Main.qml 1970-01-01 00:00:00 +0000 | |||
78 | +++ share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/Main.qml 2016-09-22 15:50:47 +0000 | |||
79 | @@ -0,0 +1,54 @@ | |||
80 | 1 | import QtQuick 2.4 | ||
81 | 2 | import Ubuntu.Components 1.3 | ||
82 | 3 | |||
83 | 4 | /*! | ||
84 | 5 | \brief MainView with a Label and Button elements. | ||
85 | 6 | */ | ||
86 | 7 | |||
87 | 8 | MainView { | ||
88 | 9 | // objectName for functional testing purposes (autopilot-qt5) | ||
89 | 10 | objectName: "mainView" | ||
90 | 11 | |||
91 | 12 | applicationName: "%{ProjectNameL}.%{DeveloperId}" | ||
92 | 13 | |||
93 | 14 | width: units.gu(100) | ||
94 | 15 | height: units.gu(75) | ||
95 | 16 | |||
96 | 17 | Page { | ||
97 | 18 | header: PageHeader { | ||
98 | 19 | id: pageHeader | ||
99 | 20 | title: i18n.tr("%{ProjectNameL}") | ||
100 | 21 | StyleHints { | ||
101 | 22 | foregroundColor: UbuntuColors.orange | ||
102 | 23 | backgroundColor: UbuntuColors.porcelain | ||
103 | 24 | dividerColor: UbuntuColors.slate | ||
104 | 25 | } | ||
105 | 26 | } | ||
106 | 27 | |||
107 | 28 | Label { | ||
108 | 29 | id: label | ||
109 | 30 | objectName: "label" | ||
110 | 31 | anchors { | ||
111 | 32 | horizontalCenter: parent.horizontalCenter | ||
112 | 33 | top: pageHeader.bottom | ||
113 | 34 | topMargin: units.gu(2) | ||
114 | 35 | } | ||
115 | 36 | |||
116 | 37 | text: i18n.tr("Hello..") | ||
117 | 38 | } | ||
118 | 39 | |||
119 | 40 | Button { | ||
120 | 41 | objectName: "button" | ||
121 | 42 | anchors { | ||
122 | 43 | horizontalCenter: parent.horizontalCenter | ||
123 | 44 | top: label.bottom | ||
124 | 45 | topMargin: units.gu(2) | ||
125 | 46 | } | ||
126 | 47 | width: parent.width | ||
127 | 48 | text: i18n.tr("Tap me!") | ||
128 | 49 | onClicked: { | ||
129 | 50 | label.text = i18n.tr("..world!") | ||
130 | 51 | } | ||
131 | 52 | } | ||
132 | 53 | } | ||
133 | 54 | } | ||
134 | 0 | 55 | ||
135 | === added file 'share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.desktop' | |||
136 | --- share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.desktop 1970-01-01 00:00:00 +0000 | |||
137 | +++ share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.desktop 2016-09-22 15:50:47 +0000 | |||
138 | @@ -0,0 +1,9 @@ | |||
139 | 1 | [Desktop Entry] | ||
140 | 2 | Version=1.0 | ||
141 | 3 | Name=%{ProjectNameL} | ||
142 | 4 | Exec=%{ProjectNameL} | ||
143 | 5 | TryExec=%{ProjectNameL} | ||
144 | 6 | Icon=${SNAP}/meta/gui/%{ProjectNameL}.png | ||
145 | 7 | Terminal=false | ||
146 | 8 | Type=Application | ||
147 | 9 | X-Ubuntu-Touch=true | ||
148 | 0 | 10 | ||
149 | === added file 'share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.png' | |||
150 | 1 | Binary files share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.png 1970-01-01 00:00:00 +0000 and share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.png 2016-09-22 15:50:47 +0000 differ | 11 | Binary files share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.png 1970-01-01 00:00:00 +0000 and share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.png 2016-09-22 15:50:47 +0000 differ |
151 | === added file 'share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.pro' | |||
152 | --- share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.pro 1970-01-01 00:00:00 +0000 | |||
153 | +++ share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.pro 2016-09-22 15:50:47 +0000 | |||
154 | @@ -0,0 +1,48 @@ | |||
155 | 1 | TEMPLATE = app | ||
156 | 2 | TARGET = %{ProjectNameL} | ||
157 | 3 | |||
158 | 4 | QT += qml quick | ||
159 | 5 | |||
160 | 6 | # enables/disabled the extra targets to build a snapcraft package | ||
161 | 7 | # also tells the IDE this is a snapcraft project | ||
162 | 8 | CONFIG += snapcraft | ||
163 | 9 | |||
164 | 10 | SOURCES += main.cpp | ||
165 | 11 | |||
166 | 12 | RESOURCES += %{ProjectNameL}.qrc | ||
167 | 13 | |||
168 | 14 | QML_FILES += $$files(*.qml,true) \ | ||
169 | 15 | $$files(*.js,true) | ||
170 | 16 | |||
171 | 17 | CONF_FILES += %{ProjectNameL}.png | ||
172 | 18 | |||
173 | 19 | AP_TEST_FILES += tests/autopilot/run \ | ||
174 | 20 | $$files(tests/*.py,true) | ||
175 | 21 | |||
176 | 22 | #show all the files in QtCreator | ||
177 | 23 | OTHER_FILES += $${CONF_FILES} \ | ||
178 | 24 | $${QML_FILES} \ | ||
179 | 25 | $${AP_TEST_FILES} \ | ||
180 | 26 | %{ProjectNameL}.desktop \ | ||
181 | 27 | %{ProjectNameL}.wrapper | ||
182 | 28 | |||
183 | 29 | snapcraft { | ||
184 | 30 | #specify where the config files are installed to | ||
185 | 31 | config_files.path = /setup/gui | ||
186 | 32 | config_files.files += $${CONF_FILES} | ||
187 | 33 | INSTALLS+=config_files | ||
188 | 34 | |||
189 | 35 | #install the desktop file | ||
190 | 36 | desktop_file.path = /setup/gui | ||
191 | 37 | desktop_file.files = $$PWD/%{ProjectNameL}.desktop | ||
192 | 38 | desktop_file.CONFIG += no_check_exist | ||
193 | 39 | INSTALLS+=desktop_file | ||
194 | 40 | |||
195 | 41 | # Default rules for deployment. | ||
196 | 42 | |||
197 | 43 | wrapper.files = %{ProjectNameL}.wrapper | ||
198 | 44 | wrapper.path = /deploy/bin | ||
199 | 45 | |||
200 | 46 | target.path = /deploy/bin | ||
201 | 47 | INSTALLS+=target wrapper | ||
202 | 48 | } | ||
203 | 0 | 49 | ||
204 | === added file 'share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.qrc' | |||
205 | --- share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.qrc 1970-01-01 00:00:00 +0000 | |||
206 | +++ share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.qrc 2016-09-22 15:50:47 +0000 | |||
207 | @@ -0,0 +1,5 @@ | |||
208 | 1 | <RCC> | ||
209 | 2 | <qresource prefix="/"> | ||
210 | 3 | <file>Main.qml</file> | ||
211 | 4 | </qresource> | ||
212 | 5 | </RCC> | ||
213 | 0 | 6 | ||
214 | === added file 'share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.wrapper' | |||
215 | --- share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.wrapper 1970-01-01 00:00:00 +0000 | |||
216 | +++ share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.wrapper 2016-09-22 15:50:47 +0000 | |||
217 | @@ -0,0 +1,63 @@ | |||
218 | 1 | #!/bin/bash | ||
219 | 2 | |||
220 | 3 | if [ "$SNAP_ARCH" == "amd64" ]; then | ||
221 | 4 | ARCH="x86_64-linux-gnu" | ||
222 | 5 | elif [ "$SNAP_ARCH" == "armhf" ]; then | ||
223 | 6 | ARCH="arm-linux-gnueabihf" | ||
224 | 7 | else | ||
225 | 8 | ARCH="$SNAP_ARCH-linux-gnu" | ||
226 | 9 | fi | ||
227 | 10 | |||
228 | 11 | export LD_LIBRARY_PATH=$SNAP/usr/lib/$ARCH:$LD_LIBRARY_PATH | ||
229 | 12 | |||
230 | 13 | # XKB config | ||
231 | 14 | export XKB_CONFIG_ROOT=$SNAP/usr/share/X11/xkb | ||
232 | 15 | |||
233 | 16 | if [ "$DESKTOP_SESSION" == "unity8" ]; then | ||
234 | 17 | # Qt Platform to Mir | ||
235 | 18 | export QT_QPA_PLATFORM=ubuntumirclient | ||
236 | 19 | # Mir runtime | ||
237 | 20 | export MIR_SOCKET=$XDG_RUNTIME_DIR/mir_socket | ||
238 | 21 | export MIR_CLIENT_PLATFORM_PATH=$SNAP/usr/lib/$ARCH/mir/client-platform | ||
239 | 22 | fi | ||
240 | 23 | |||
241 | 24 | # Qt Libs | ||
242 | 25 | export LD_LIBRARY_PATH=$SNAP/usr/lib/$ARCH/qt5/libs:$LD_LIBRARY_PATH | ||
243 | 26 | export LD_LIBRARY_PATH=$SNAP/usr/lib/$ARCH/pulseaudio:$LD_LIBRARY_PATH | ||
244 | 27 | |||
245 | 28 | # Qt Modules | ||
246 | 29 | export QT_PLUGIN_PATH=$SNAP/usr/lib/$ARCH/qt5/plugins | ||
247 | 30 | export QML2_IMPORT_PATH=$QML2_IMPORT_PATH:$SNAP/usr/lib/$ARCH/qt5/qml | ||
248 | 31 | export QML2_IMPORT_PATH=$QML2_IMPORT_PATH:$SNAP/lib/$ARCH | ||
249 | 32 | |||
250 | 33 | # Mesa Libs | ||
251 | 34 | export LD_LIBRARY_PATH=$SNAP/usr/lib/$ARCH/mesa:$LD_LIBRARY_PATH | ||
252 | 35 | export LD_LIBRARY_PATH=$SNAP/usr/lib/$ARCH/mesa-egl:$LD_LIBRARY_PATH | ||
253 | 36 | |||
254 | 37 | # XDG Config | ||
255 | 38 | export XDG_CONFIG_DIRS=$SNAP/etc/xdg:$XDG_CONFIG_DIRS | ||
256 | 39 | export XDG_CONFIG_DIRS=$SNAP/usr/xdg:$XDG_CONFIG_DIRS | ||
257 | 40 | # Note: this doesn't seem to work, QML's LocalStorage either ignores | ||
258 | 41 | # or fails to use $SNAP_USER_DATA if defined here | ||
259 | 42 | export XDG_DATA_DIRS=$SNAP_USER_DATA:$XDG_DATA_DIRS | ||
260 | 43 | export XDG_DATA_DIRS=$SNAP/usr/share:$XDG_DATA_DIRS | ||
261 | 44 | |||
262 | 45 | # needed for fontconfig | ||
263 | 46 | export XDG_DATA_HOME=$SNAP/usr/share | ||
264 | 47 | |||
265 | 48 | # Font Config | ||
266 | 49 | export FONTCONFIG_PATH=$SNAP/etc/fonts/config.d | ||
267 | 50 | export FONTCONFIG_FILE=$SNAP/etc/fonts/fonts.conf | ||
268 | 51 | |||
269 | 52 | # Tell libGL where to find the drivers | ||
270 | 53 | export LIBGL_DRIVERS_PATH=$SNAP/usr/lib/$ARCH/dri | ||
271 | 54 | |||
272 | 55 | # Necessary for the SDK to find the translations directory | ||
273 | 56 | export APP_DIR=$SNAP | ||
274 | 57 | |||
275 | 58 | # ensure the snappy gl libs win | ||
276 | 59 | export LD_LIBRARY_PATH="$SNAP_LIBRARY_PATH:$LD_LIBRARY_PATH" | ||
277 | 60 | |||
278 | 61 | cd $SNAP | ||
279 | 62 | exec $SNAP/bin/%{ProjectNameL} | ||
280 | 63 | |||
281 | 0 | 64 | ||
282 | === added file 'share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/main.cpp' | |||
283 | --- share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/main.cpp 1970-01-01 00:00:00 +0000 | |||
284 | +++ share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/main.cpp 2016-09-22 15:50:47 +0000 | |||
285 | @@ -0,0 +1,14 @@ | |||
286 | 1 | #include <QGuiApplication> | ||
287 | 2 | #include <QQmlApplicationEngine> | ||
288 | 3 | #include <QQuickView> | ||
289 | 4 | |||
290 | 5 | int main(int argc, char *argv[]) | ||
291 | 6 | { | ||
292 | 7 | QGuiApplication app(argc, argv); | ||
293 | 8 | |||
294 | 9 | QQuickView view; | ||
295 | 10 | view.setSource(QUrl(QStringLiteral("qrc:///Main.qml"))); | ||
296 | 11 | view.setResizeMode(QQuickView::SizeRootObjectToView); | ||
297 | 12 | view.show(); | ||
298 | 13 | return app.exec(); | ||
299 | 14 | } | ||
300 | 0 | 15 | ||
301 | === added file 'share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/snapcraft.yaml' | |||
302 | --- share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/snapcraft.yaml 1970-01-01 00:00:00 +0000 | |||
303 | +++ share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/snapcraft.yaml 2016-09-22 15:50:47 +0000 | |||
304 | @@ -0,0 +1,23 @@ | |||
305 | 1 | name: %{ProjectNameL} | ||
306 | 2 | version: 0.01 | ||
307 | 3 | summary: Example application | ||
308 | 4 | description: Shows a basic UITK based UI | ||
309 | 5 | confinement: strict | ||
310 | 6 | |||
311 | 7 | apps: | ||
312 | 8 | %{ProjectNameL}: | ||
313 | 9 | command: %{ProjectNameL}.wrapper | ||
314 | 10 | plugs: [unity7, opengl] | ||
315 | 11 | |||
316 | 12 | parts: | ||
317 | 13 | %{ProjectNameL}: | ||
318 | 14 | plugin: dump | ||
319 | 15 | source: deploy/ | ||
320 | 16 | stage-packages: | ||
321 | 17 | - ubuntu-sdk-libs | ||
322 | 18 | - qtubuntu-desktop | ||
323 | 19 | - qtmir-desktop | ||
324 | 20 | - mir-graphics-drivers-desktop | ||
325 | 21 | |||
326 | 22 | |||
327 | 23 | |||
328 | 0 | 24 | ||
329 | === added file 'share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/wizard.json' | |||
330 | --- share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/wizard.json 1970-01-01 00:00:00 +0000 | |||
331 | +++ share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/wizard.json 2016-09-22 15:50:47 +0000 | |||
332 | @@ -0,0 +1,108 @@ | |||
333 | 1 | { | ||
334 | 2 | "version": 1, | ||
335 | 3 | "supportedProjectTypes": [ "Qt4ProjectManager.Qt4Project" ], | ||
336 | 4 | "id": "A.QtQuick Snappy Application", | ||
337 | 5 | "category": "B.Snapcraft", | ||
338 | 6 | "trDescription": "Creates a experimental C++ Ubuntu snappy application project with a sample UI containing a Label and a Button.", | ||
339 | 7 | "trDisplayName": "QtQuick App with QML Ubuntu UI", | ||
340 | 8 | "trDisplayCategory": "Snapcraft", | ||
341 | 9 | "icon": "../share/ubuntu.png", | ||
342 | 10 | "enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}", | ||
343 | 11 | |||
344 | 12 | "options": | ||
345 | 13 | [ | ||
346 | 14 | { "key": "ProjectFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" }, | ||
347 | 15 | { "key": "ProjectNameL", "value": "%{JS: \"%{ProjectName}\".toLowerCase()}" }, | ||
348 | 16 | { "key": "CppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" }, | ||
349 | 17 | { "key": "IsTopLevelProject", "value": "%{JS: !'%{Exists:ProjectExplorer.Profile.Ids}'}" } | ||
350 | 18 | ], | ||
351 | 19 | |||
352 | 20 | "pages": | ||
353 | 21 | [ | ||
354 | 22 | { | ||
355 | 23 | "trDisplayName": "Project Location", | ||
356 | 24 | "trShortTitle": "Location", | ||
357 | 25 | "typeId": "Project" | ||
358 | 26 | }, | ||
359 | 27 | { | ||
360 | 28 | "trDisplayName": "Developer ID", | ||
361 | 29 | "trShortTitle": "Developer ID", | ||
362 | 30 | "typeId": "Fields", | ||
363 | 31 | "data" : | ||
364 | 32 | [ | ||
365 | 33 | { | ||
366 | 34 | "name": "DeveloperId", | ||
367 | 35 | "trDisplayName": "Developer ID:", | ||
368 | 36 | "mandatory": true, | ||
369 | 37 | "type": "LineEdit", | ||
370 | 38 | "data": { | ||
371 | 39 | "validator": "^[A-Za-z0-9-]+$", | ||
372 | 40 | "trText": "%{JS: Ubuntu.developerId()}" | ||
373 | 41 | } | ||
374 | 42 | } | ||
375 | 43 | ] | ||
376 | 44 | }, | ||
377 | 45 | { | ||
378 | 46 | "trDisplayName": "Kit Selection", | ||
379 | 47 | "trShortTitle": "Kits", | ||
380 | 48 | "typeId": "Kits", | ||
381 | 49 | "enabled": "%{IsTopLevelProject}", | ||
382 | 50 | "data": { "projectFilePath": "%{ProjectFile}" } | ||
383 | 51 | }, | ||
384 | 52 | { | ||
385 | 53 | "trDisplayName": "Project Management", | ||
386 | 54 | "trShortTitle": "Summary", | ||
387 | 55 | "typeId": "Summary" | ||
388 | 56 | } | ||
389 | 57 | ], | ||
390 | 58 | "generators": | ||
391 | 59 | [ | ||
392 | 60 | { | ||
393 | 61 | "typeId": "File", | ||
394 | 62 | "data": | ||
395 | 63 | [ | ||
396 | 64 | { | ||
397 | 65 | "source": "appName.pro", | ||
398 | 66 | "target": "%{ProjectFile}", | ||
399 | 67 | "openAsProject": true | ||
400 | 68 | }, | ||
401 | 69 | { | ||
402 | 70 | "source": "snapcraft.yaml", | ||
403 | 71 | "openInEditor": true | ||
404 | 72 | }, | ||
405 | 73 | { | ||
406 | 74 | "source": "appName/main.cpp", | ||
407 | 75 | "target": "%{ProjectDirectory}/%{ProjectNameL}/%{CppFileName}", | ||
408 | 76 | "openInEditor": true | ||
409 | 77 | }, | ||
410 | 78 | { | ||
411 | 79 | "source": "appName/Main.qml", | ||
412 | 80 | "target": "%{ProjectDirectory}/%{ProjectNameL}/Main.qml", | ||
413 | 81 | "openInEditor": true | ||
414 | 82 | }, | ||
415 | 83 | { | ||
416 | 84 | "source": "appName/appName.desktop", | ||
417 | 85 | "target": "%{ProjectDirectory}/%{ProjectNameL}/%{ProjectNameL}.desktop" | ||
418 | 86 | }, | ||
419 | 87 | { | ||
420 | 88 | "source": "appName/appName.png", | ||
421 | 89 | "target": "%{ProjectDirectory}/%{ProjectNameL}/%{ProjectNameL}.png" | ||
422 | 90 | }, | ||
423 | 91 | { | ||
424 | 92 | "source": "appName/appName.pro", | ||
425 | 93 | "target": "%{ProjectDirectory}/%{ProjectNameL}/%{ProjectNameL}.pro" | ||
426 | 94 | }, | ||
427 | 95 | { | ||
428 | 96 | "source": "appName/appName.qrc", | ||
429 | 97 | "target": "%{ProjectDirectory}/%{ProjectNameL}/%{ProjectNameL}.qrc" | ||
430 | 98 | }, | ||
431 | 99 | { | ||
432 | 100 | "source": "appName/appName.wrapper", | ||
433 | 101 | "target": "%{ProjectDirectory}/%{ProjectNameL}/%{ProjectNameL}.wrapper", | ||
434 | 102 | "userExecutable": true | ||
435 | 103 | } | ||
436 | 104 | |||
437 | 105 | ] | ||
438 | 106 | } | ||
439 | 107 | ] | ||
440 | 108 | } | ||
441 | 0 | 109 | ||
442 | === modified file 'share/qtcreator/ubuntu/qml/publishpage.qml' | |||
443 | --- share/qtcreator/ubuntu/qml/publishpage.qml 2015-11-26 09:55:54 +0000 | |||
444 | +++ share/qtcreator/ubuntu/qml/publishpage.qml 2016-09-22 15:50:47 +0000 | |||
445 | @@ -80,7 +80,7 @@ | |||
446 | 80 | spacing: units.gu(2) | 80 | spacing: units.gu(2) |
447 | 81 | Button { | 81 | Button { |
448 | 82 | visible: publishModel.showValidationUi | 82 | visible: publishModel.showValidationUi |
450 | 83 | text: "Validate existing click package" | 83 | text: "Validate existing package" |
451 | 84 | onClicked: { | 84 | onClicked: { |
452 | 85 | publishModel.on_pushButtonReviewersTools_clicked(); | 85 | publishModel.on_pushButtonReviewersTools_clicked(); |
453 | 86 | } | 86 | } |
454 | @@ -88,7 +88,7 @@ | |||
455 | 88 | Button { | 88 | Button { |
456 | 89 | visible: publishModel.showValidationUi | 89 | visible: publishModel.showValidationUi |
457 | 90 | enabled: publishModel.canBuild | 90 | enabled: publishModel.canBuild |
459 | 91 | text: "Build and validate click package" | 91 | text: "Build and validate package" |
460 | 92 | onClicked: { | 92 | onClicked: { |
461 | 93 | publishModel.on_pushButtonClickPackage_clicked(); | 93 | publishModel.on_pushButtonClickPackage_clicked(); |
462 | 94 | } | 94 | } |
463 | 95 | 95 | ||
464 | === modified file 'share/qtcreator/ubuntu/scripts/usdk-target-build' | |||
465 | --- share/qtcreator/ubuntu/scripts/usdk-target-build 2016-08-01 10:15:22 +0000 | |||
466 | +++ share/qtcreator/ubuntu/scripts/usdk-target-build 2016-09-22 15:50:47 +0000 | |||
467 | @@ -147,6 +147,7 @@ | |||
468 | 147 | "qttools5-dev:{TARGET}", | 147 | "qttools5-dev:{TARGET}", |
469 | 148 | "ubuntu-sdk-qmake-extras:{TARGET}", | 148 | "ubuntu-sdk-qmake-extras:{TARGET}", |
470 | 149 | "ubuntu-ui-toolkit-doc:{TARGET}", | 149 | "ubuntu-ui-toolkit-doc:{TARGET}", |
471 | 150 | "snapcraft" | ||
472 | 150 | ], | 151 | ], |
473 | 151 | "ubuntu-sdk-16.10": [ | 152 | "ubuntu-sdk-16.10": [ |
474 | 152 | ] | 153 | ] |
475 | 153 | 154 | ||
476 | === modified file 'src/plugin.pri' | |||
477 | --- src/plugin.pri 2015-06-05 10:25:56 +0000 | |||
478 | +++ src/plugin.pri 2016-09-22 15:50:47 +0000 | |||
479 | @@ -71,3 +71,4 @@ | |||
480 | 71 | LIBS += -L$$[QT_INSTALL_LIBS]/qtcreator | 71 | LIBS += -L$$[QT_INSTALL_LIBS]/qtcreator |
481 | 72 | LIBS += -L$$[QT_INSTALL_LIBS]/qtcreator/plugins | 72 | LIBS += -L$$[QT_INSTALL_LIBS]/qtcreator/plugins |
482 | 73 | } | 73 | } |
483 | 74 | |||
484 | 74 | 75 | ||
485 | === modified file 'src/ubuntu/clicktoolchain.cpp' | |||
486 | --- src/ubuntu/clicktoolchain.cpp 2016-08-18 06:42:19 +0000 | |||
487 | +++ src/ubuntu/clicktoolchain.cpp 2016-09-22 15:50:47 +0000 | |||
488 | @@ -1,5 +1,5 @@ | |||
489 | 1 | /* | 1 | /* |
491 | 2 | * Copyright 2014 Canonical Ltd. | 2 | * Copyright 2016 Canonical Ltd. |
492 | 3 | * | 3 | * |
493 | 4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
494 | 5 | * it under the terms of the GNU Lesser General Public License as published by | 5 | * it under the terms of the GNU Lesser General Public License as published by |
495 | 6 | 6 | ||
496 | === modified file 'src/ubuntu/clicktoolchain.h' | |||
497 | --- src/ubuntu/clicktoolchain.h 2016-08-18 06:42:19 +0000 | |||
498 | +++ src/ubuntu/clicktoolchain.h 2016-09-22 15:50:47 +0000 | |||
499 | @@ -1,5 +1,5 @@ | |||
500 | 1 | /* | 1 | /* |
502 | 2 | * Copyright 2014 Canonical Ltd. | 2 | * Copyright 2016 Canonical Ltd. |
503 | 3 | * | 3 | * |
504 | 4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
505 | 5 | * it under the terms of the GNU Lesser General Public License as published by | 5 | * it under the terms of the GNU Lesser General Public License as published by |
506 | 6 | 6 | ||
507 | === added directory 'src/ubuntu/snap' | |||
508 | === added file 'src/ubuntu/snap/snapcraftpackagestep.cpp' | |||
509 | --- src/ubuntu/snap/snapcraftpackagestep.cpp 1970-01-01 00:00:00 +0000 | |||
510 | +++ src/ubuntu/snap/snapcraftpackagestep.cpp 2016-09-22 15:50:47 +0000 | |||
511 | @@ -0,0 +1,468 @@ | |||
512 | 1 | /* | ||
513 | 2 | * Copyright 2016 Canonical Ltd. | ||
514 | 3 | * | ||
515 | 4 | * This program is free software; you can redistribute it and/or modify | ||
516 | 5 | * it under the terms of the GNU Lesser General Public License as published by | ||
517 | 6 | * the Free Software Foundation; version 2.1. | ||
518 | 7 | * | ||
519 | 8 | * This program is distributed in the hope that it will be useful, | ||
520 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
521 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
522 | 11 | * GNU Lesser General Public License for more details. | ||
523 | 12 | * | ||
524 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
525 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
526 | 15 | * | ||
527 | 16 | * Author: Benjamin Zeller <benjamin.zeller@canonical.com> | ||
528 | 17 | */ | ||
529 | 18 | |||
530 | 19 | #include "snapcraftpackagestep.h" | ||
531 | 20 | |||
532 | 21 | #include <ubuntu/ubuntuconstants.h> | ||
533 | 22 | #include <ubuntu/ubuntupackageoutputparser.h> | ||
534 | 23 | |||
535 | 24 | #include <projectexplorer/target.h> | ||
536 | 25 | #include <projectexplorer/task.h> | ||
537 | 26 | #include <projectexplorer/kitinformation.h> | ||
538 | 27 | #include <projectexplorer/project.h> | ||
539 | 28 | #include <projectexplorer/projectexplorerconstants.h> | ||
540 | 29 | #include <projectexplorer/buildconfiguration.h> | ||
541 | 30 | #include <projectexplorer/toolchain.h> | ||
542 | 31 | #include <utils/qtcassert.h> | ||
543 | 32 | #include <utils/fileutils.h> | ||
544 | 33 | |||
545 | 34 | #include <QTimer> | ||
546 | 35 | #include <QRegularExpression> | ||
547 | 36 | |||
548 | 37 | namespace Ubuntu { | ||
549 | 38 | namespace Internal { | ||
550 | 39 | |||
551 | 40 | const char * PACKAGE_NAME_REGEX = "^Snapped ([\\S]+\\.snap)$"; | ||
552 | 41 | |||
553 | 42 | SnapcraftPackageStep::SnapcraftPackageStep(ProjectExplorer::BuildStepList *bsl) | ||
554 | 43 | : ProjectExplorer::BuildStep (bsl, Constants::UBUNTU_SNAP_PACKAGESTEP_ID) | ||
555 | 44 | { | ||
556 | 45 | |||
557 | 46 | } | ||
558 | 47 | |||
559 | 48 | SnapcraftPackageStep::SnapcraftPackageStep(ProjectExplorer::BuildStepList *bsl, SnapcraftPackageStep *other) | ||
560 | 49 | : ProjectExplorer::BuildStep (bsl, other) | ||
561 | 50 | { | ||
562 | 51 | |||
563 | 52 | } | ||
564 | 53 | |||
565 | 54 | SnapcraftPackageStep::~SnapcraftPackageStep() | ||
566 | 55 | { | ||
567 | 56 | cleanup(); | ||
568 | 57 | } | ||
569 | 58 | |||
570 | 59 | QString SnapcraftPackageStep::packagePath() const | ||
571 | 60 | { | ||
572 | 61 | if(m_snapPackageName.isEmpty()) | ||
573 | 62 | return QString(); | ||
574 | 63 | return snapWorkingDir() | ||
575 | 64 | + QDir::separator() | ||
576 | 65 | + m_snapPackageName; | ||
577 | 66 | } | ||
578 | 67 | |||
579 | 68 | QString SnapcraftPackageStep::snapWorkingDir() const | ||
580 | 69 | { | ||
581 | 70 | return m_buildDir+QStringLiteral("/snap-deploy"); | ||
582 | 71 | } | ||
583 | 72 | |||
584 | 73 | bool SnapcraftPackageStep::init(QList<const ProjectExplorer::BuildStep *> &earlierSteps) | ||
585 | 74 | { | ||
586 | 75 | Q_UNUSED(earlierSteps) | ||
587 | 76 | return true; | ||
588 | 77 | } | ||
589 | 78 | |||
590 | 79 | void SnapcraftPackageStep::run(QFutureInterface<bool> &fi) | ||
591 | 80 | { | ||
592 | 81 | internalInit(); | ||
593 | 82 | |||
594 | 83 | if (m_tasks.size()) { | ||
595 | 84 | foreach (const ProjectExplorer::Task& task, m_tasks) { | ||
596 | 85 | addTask(task); | ||
597 | 86 | } | ||
598 | 87 | emit addOutput(tr("Configuration is invalid. Aborting build") | ||
599 | 88 | ,ProjectExplorer::BuildStep::MessageOutput); | ||
600 | 89 | |||
601 | 90 | reportRunResult(fi, false); | ||
602 | 91 | cleanup(); | ||
603 | 92 | return; | ||
604 | 93 | } | ||
605 | 94 | |||
606 | 95 | m_state = Idle; | ||
607 | 96 | m_futureInterface = &fi; | ||
608 | 97 | m_futureInterface->setProgressRange(0,2); | ||
609 | 98 | QTimer::singleShot(0,this,SLOT(doNextStep())); | ||
610 | 99 | } | ||
611 | 100 | |||
612 | 101 | void SnapcraftPackageStep::cleanup() | ||
613 | 102 | { | ||
614 | 103 | if (m_process) { | ||
615 | 104 | m_process->disconnect(this); | ||
616 | 105 | m_process->kill(); | ||
617 | 106 | m_process->deleteLater(); | ||
618 | 107 | m_process = 0; | ||
619 | 108 | } | ||
620 | 109 | |||
621 | 110 | //not owned by us | ||
622 | 111 | m_futureInterface = 0; | ||
623 | 112 | |||
624 | 113 | if (m_outputParserChain) { | ||
625 | 114 | delete m_outputParserChain; | ||
626 | 115 | m_outputParserChain = 0; | ||
627 | 116 | } | ||
628 | 117 | |||
629 | 118 | //reset params | ||
630 | 119 | m_SnapReviewParam = m_MakeParam = ProjectExplorer::ProcessParameters(); | ||
631 | 120 | m_currParam = nullptr; | ||
632 | 121 | } | ||
633 | 122 | |||
634 | 123 | /*! | ||
635 | 124 | * \brief UbuntuPackageStep::setupAndStartProcess | ||
636 | 125 | * Setups the interal QProcess and connects the required SIGNALS | ||
637 | 126 | * also makes sure the process has a clean output parser | ||
638 | 127 | */ | ||
639 | 128 | void SnapcraftPackageStep::setupAndStartProcess(ProjectExplorer::ProcessParameters ¶ms) | ||
640 | 129 | { | ||
641 | 130 | if (m_process) { | ||
642 | 131 | m_process->disconnect(this); | ||
643 | 132 | m_process->kill(); | ||
644 | 133 | m_process->deleteLater(); | ||
645 | 134 | } | ||
646 | 135 | |||
647 | 136 | m_currParam = ¶ms; | ||
648 | 137 | |||
649 | 138 | QDir wd(params.effectiveWorkingDirectory()); | ||
650 | 139 | if (!wd.exists()) | ||
651 | 140 | wd.mkpath(wd.absolutePath()); | ||
652 | 141 | |||
653 | 142 | QString effectiveCommand = params.effectiveCommand(); | ||
654 | 143 | if (!QFileInfo(effectiveCommand).exists()) { | ||
655 | 144 | onProcessFailedToStart(); | ||
656 | 145 | return; | ||
657 | 146 | } | ||
658 | 147 | |||
659 | 148 | m_process = new Utils::QtcProcess(); | ||
660 | 149 | connect(m_process,SIGNAL(finished(int)),this,SLOT(doNextStep())); | ||
661 | 150 | connect(m_process,SIGNAL(readyReadStandardOutput()),this,SLOT(onProcessStdOut())); | ||
662 | 151 | connect(m_process,SIGNAL(readyReadStandardError()),this,SLOT(onProcessStdErr())); | ||
663 | 152 | |||
664 | 153 | m_process->setCommand(params.effectiveCommand(),params.effectiveArguments()); | ||
665 | 154 | m_process->setEnvironment(params.environment()); | ||
666 | 155 | m_process->setWorkingDirectory(wd.absolutePath()); | ||
667 | 156 | |||
668 | 157 | emit addOutput(tr("Starting: \"%1 %2\"").arg(params.effectiveCommand(),params.effectiveArguments()), | ||
669 | 158 | BuildStep::MessageOutput); | ||
670 | 159 | |||
671 | 160 | ProjectExplorer::IOutputParser *parser = target()->kit()->createOutputParser(); | ||
672 | 161 | |||
673 | 162 | //add special parser on click review step | ||
674 | 163 | if(m_state == SnapReview) { | ||
675 | 164 | UbuntuPackageOutputParser *packageStepParser = new UbuntuPackageOutputParser; | ||
676 | 165 | //packageStepParser->setTreatAllErrorsAsWarnings(m_treatClickErrorsAsWarnings); | ||
677 | 166 | connect(this,SIGNAL(currentSubStepFinished()),packageStepParser,SLOT(setEndOfData())); | ||
678 | 167 | if (parser) | ||
679 | 168 | parser->appendOutputParser(packageStepParser); | ||
680 | 169 | else | ||
681 | 170 | parser = packageStepParser; | ||
682 | 171 | |||
683 | 172 | } | ||
684 | 173 | |||
685 | 174 | if(m_outputParserChain) { | ||
686 | 175 | delete m_outputParserChain; | ||
687 | 176 | m_outputParserChain = 0; | ||
688 | 177 | } | ||
689 | 178 | |||
690 | 179 | if(parser) { | ||
691 | 180 | m_outputParserChain = parser; | ||
692 | 181 | m_outputParserChain->setWorkingDirectory(params.effectiveWorkingDirectory()); | ||
693 | 182 | |||
694 | 183 | connect(m_outputParserChain,SIGNAL(addOutput(QString,ProjectExplorer::BuildStep::OutputFormat)), | ||
695 | 184 | this,SLOT(outputAdded(QString,ProjectExplorer::BuildStep::OutputFormat))); | ||
696 | 185 | connect(m_outputParserChain,SIGNAL(addTask(ProjectExplorer::Task)), | ||
697 | 186 | this,SLOT(taskAdded(ProjectExplorer::Task))); | ||
698 | 187 | } | ||
699 | 188 | |||
700 | 189 | m_process->start(); | ||
701 | 190 | if(!m_process->waitForStarted()) { | ||
702 | 191 | onProcessFailedToStart(); | ||
703 | 192 | return; | ||
704 | 193 | } | ||
705 | 194 | } | ||
706 | 195 | |||
707 | 196 | /*! | ||
708 | 197 | * \brief UbuntuPackageStep::checkLastProcessSuccess | ||
709 | 198 | * Checks if the last process has run without any errors | ||
710 | 199 | */ | ||
711 | 200 | bool SnapcraftPackageStep::processFinished(FinishedCheckMode mode) | ||
712 | 201 | { | ||
713 | 202 | //make sure all data has been read | ||
714 | 203 | QString line = QString::fromLocal8Bit(m_process->readAllStandardError()); | ||
715 | 204 | if (!line.isEmpty()) | ||
716 | 205 | stdError(line); | ||
717 | 206 | |||
718 | 207 | line = QString::fromLocal8Bit(m_process->readAllStandardOutput()); | ||
719 | 208 | if (!line.isEmpty()) | ||
720 | 209 | stdOutput(line); | ||
721 | 210 | |||
722 | 211 | emit currentSubStepFinished(); | ||
723 | 212 | |||
724 | 213 | bool success = true; | ||
725 | 214 | |||
726 | 215 | if (m_outputParserChain) { | ||
727 | 216 | m_outputParserChain->flush(); | ||
728 | 217 | |||
729 | 218 | if(m_outputParserChain->hasFatalErrors()) | ||
730 | 219 | success = false; | ||
731 | 220 | } | ||
732 | 221 | |||
733 | 222 | if(success) { | ||
734 | 223 | QString command; | ||
735 | 224 | if(m_currParam) | ||
736 | 225 | command = QDir::toNativeSeparators(m_currParam->effectiveCommand()); | ||
737 | 226 | else | ||
738 | 227 | command = tr("Unknown command"); | ||
739 | 228 | |||
740 | 229 | if (m_process->exitStatus() == QProcess::NormalExit && m_process->exitCode() == 0) { | ||
741 | 230 | emit addOutput(tr("The process \"%1\" exited normally.").arg(command), | ||
742 | 231 | BuildStep::MessageOutput); | ||
743 | 232 | } else if (m_process->exitStatus() == QProcess::NormalExit) { | ||
744 | 233 | emit addOutput(tr("The process \"%1\" exited with code %2.") | ||
745 | 234 | .arg(command, QString::number(m_process->exitCode())), | ||
746 | 235 | BuildStep::ErrorMessageOutput); | ||
747 | 236 | if(mode == CheckReturnCode) | ||
748 | 237 | //error | ||
749 | 238 | success = false; | ||
750 | 239 | else { | ||
751 | 240 | emit addOutput(tr("Ignoring return code for this step"),BuildStep::ErrorMessageOutput); | ||
752 | 241 | } | ||
753 | 242 | } else { | ||
754 | 243 | emit addOutput(tr("The process \"%1\" crashed.").arg(command), BuildStep::ErrorMessageOutput); | ||
755 | 244 | |||
756 | 245 | //error | ||
757 | 246 | success = false; | ||
758 | 247 | } | ||
759 | 248 | } | ||
760 | 249 | |||
761 | 250 | //the process failed, lets clean up | ||
762 | 251 | if (!success) { | ||
763 | 252 | if(m_futureInterface) | ||
764 | 253 | reportRunResult(*m_futureInterface, false); | ||
765 | 254 | cleanup(); | ||
766 | 255 | } | ||
767 | 256 | return success; | ||
768 | 257 | } | ||
769 | 258 | |||
770 | 259 | void SnapcraftPackageStep::stdOutput(const QString &line) | ||
771 | 260 | { | ||
772 | 261 | m_lastLine = line; | ||
773 | 262 | |||
774 | 263 | if (m_outputParserChain) | ||
775 | 264 | m_outputParserChain->stdOutput(line); | ||
776 | 265 | emit addOutput(line, BuildStep::NormalOutput, BuildStep::DontAppendNewline); | ||
777 | 266 | } | ||
778 | 267 | |||
779 | 268 | void SnapcraftPackageStep::stdError(const QString &line) | ||
780 | 269 | { | ||
781 | 270 | if (m_outputParserChain) | ||
782 | 271 | m_outputParserChain->stdError(line); | ||
783 | 272 | emit addOutput(line, BuildStep::ErrorOutput, BuildStep::DontAppendNewline); | ||
784 | 273 | } | ||
785 | 274 | |||
786 | 275 | |||
787 | 276 | void SnapcraftPackageStep::onProcessStdOut() | ||
788 | 277 | { | ||
789 | 278 | m_process->setReadChannel(QProcess::StandardOutput); | ||
790 | 279 | while (m_process->canReadLine()) { | ||
791 | 280 | QString line = QString::fromLocal8Bit(m_process->readLine()); | ||
792 | 281 | stdOutput(line); | ||
793 | 282 | } | ||
794 | 283 | } | ||
795 | 284 | |||
796 | 285 | void SnapcraftPackageStep::onProcessStdErr() | ||
797 | 286 | { | ||
798 | 287 | m_process->setReadChannel(QProcess::StandardError); | ||
799 | 288 | while (m_process->canReadLine()) { | ||
800 | 289 | QString line = QString::fromLocal8Bit(m_process->readLine()); | ||
801 | 290 | stdError(line); | ||
802 | 291 | } | ||
803 | 292 | } | ||
804 | 293 | |||
805 | 294 | void SnapcraftPackageStep::outputAdded(const QString &string, ProjectExplorer::BuildStep::OutputFormat format) | ||
806 | 295 | { | ||
807 | 296 | emit addOutput(string, format, BuildStep::DontAppendNewline); | ||
808 | 297 | } | ||
809 | 298 | |||
810 | 299 | void SnapcraftPackageStep::taskAdded(const ProjectExplorer::Task &task) | ||
811 | 300 | { | ||
812 | 301 | emit addTask(task); | ||
813 | 302 | } | ||
814 | 303 | |||
815 | 304 | void SnapcraftPackageStep::onProcessFailedToStart() | ||
816 | 305 | { | ||
817 | 306 | if(m_futureInterface) | ||
818 | 307 | reportRunResult(*m_futureInterface, false); | ||
819 | 308 | |||
820 | 309 | QString command = tr("Unknown command"); | ||
821 | 310 | QString args; | ||
822 | 311 | |||
823 | 312 | if (m_currParam) { | ||
824 | 313 | command = QDir::toNativeSeparators(m_currParam->effectiveCommand()); | ||
825 | 314 | args = m_currParam->prettyArguments(); | ||
826 | 315 | } | ||
827 | 316 | |||
828 | 317 | emit addOutput(tr("Could not start process \"%1\" %2") | ||
829 | 318 | .arg(command, args), | ||
830 | 319 | BuildStep::ErrorMessageOutput); | ||
831 | 320 | |||
832 | 321 | cleanup(); | ||
833 | 322 | |||
834 | 323 | } | ||
835 | 324 | |||
836 | 325 | QString SnapcraftPackageStep::makeCommand(ProjectExplorer::ToolChain *tc, const Utils::Environment &env) const | ||
837 | 326 | { | ||
838 | 327 | if (tc) | ||
839 | 328 | return tc->makeCommand(env); | ||
840 | 329 | return QString(); | ||
841 | 330 | } | ||
842 | 331 | |||
843 | 332 | |||
844 | 333 | ProjectExplorer::BuildStepConfigWidget *SnapcraftPackageStep::createConfigWidget() | ||
845 | 334 | { | ||
846 | 335 | return nullptr; | ||
847 | 336 | } | ||
848 | 337 | |||
849 | 338 | void SnapcraftPackageStep::cancel() | ||
850 | 339 | { | ||
851 | 340 | |||
852 | 341 | } | ||
853 | 342 | |||
854 | 343 | bool SnapcraftPackageStep::immutable() const | ||
855 | 344 | { | ||
856 | 345 | return true; | ||
857 | 346 | } | ||
858 | 347 | |||
859 | 348 | bool SnapcraftPackageStep::runInGuiThread() const | ||
860 | 349 | { | ||
861 | 350 | return true; | ||
862 | 351 | } | ||
863 | 352 | |||
864 | 353 | void SnapcraftPackageStep::doNextStep() | ||
865 | 354 | { | ||
866 | 355 | switch (m_state) { | ||
867 | 356 | case Idle: { | ||
868 | 357 | m_state = MakeSnap; | ||
869 | 358 | m_currParam = nullptr; | ||
870 | 359 | setupAndStartProcess(m_MakeParam); | ||
871 | 360 | break; | ||
872 | 361 | } | ||
873 | 362 | case MakeSnap: { | ||
874 | 363 | if (!processFinished(CheckReturnCode)) | ||
875 | 364 | return; | ||
876 | 365 | |||
877 | 366 | m_currParam = nullptr; | ||
878 | 367 | |||
879 | 368 | QRegularExpression exp((QLatin1String(PACKAGE_NAME_REGEX))); | ||
880 | 369 | QRegularExpressionMatch m = exp.match(m_lastLine); | ||
881 | 370 | if(m.hasMatch()) { | ||
882 | 371 | m_snapPackageName = m.captured(1); | ||
883 | 372 | emit addOutput(tr("The click package has been created in %1").arg(snapWorkingDir()) , | ||
884 | 373 | ProjectExplorer::BuildStep::MessageOutput); | ||
885 | 374 | } | ||
886 | 375 | |||
887 | 376 | m_futureInterface->setProgressValueAndText(1,tr("Reviewing snap package")); | ||
888 | 377 | m_state = SnapReview; | ||
889 | 378 | |||
890 | 379 | m_SnapReviewParam.setArguments(QString::fromLatin1(Constants::CLICK_REVIEWERSTOOLS_ARGS).arg(packagePath())); | ||
891 | 380 | m_SnapReviewParam.resolveAll(); | ||
892 | 381 | setupAndStartProcess(m_SnapReviewParam); | ||
893 | 382 | break; | ||
894 | 383 | } | ||
895 | 384 | case SnapReview: { | ||
896 | 385 | //we need to ignore the return code for now, | ||
897 | 386 | //until we have proper support for ignoring specific errors | ||
898 | 387 | if (!processFinished(IgnoreReturnCode)) | ||
899 | 388 | return; | ||
900 | 389 | |||
901 | 390 | if(m_futureInterface) | ||
902 | 391 | reportRunResult(*m_futureInterface, true); | ||
903 | 392 | cleanup(); | ||
904 | 393 | break; | ||
905 | 394 | } | ||
906 | 395 | } | ||
907 | 396 | } | ||
908 | 397 | |||
909 | 398 | void SnapcraftPackageStep::internalInit() | ||
910 | 399 | { | ||
911 | 400 | m_tasks.clear(); | ||
912 | 401 | |||
913 | 402 | QString projectDir = target()->project()->projectDirectory().toString(); | ||
914 | 403 | m_buildDir.clear(); | ||
915 | 404 | Utils::Environment env = Utils::Environment::systemEnvironment(); | ||
916 | 405 | Utils::MacroExpander *mExp = 0; | ||
917 | 406 | |||
918 | 407 | |||
919 | 408 | ProjectExplorer::BuildConfiguration *bc = target()->activeBuildConfiguration(); | ||
920 | 409 | if (!bc) { | ||
921 | 410 | ProjectExplorer::Task t(ProjectExplorer::Task::Error | ||
922 | 411 | ,tr("No valid BuildConfiguration set for step: %1").arg(displayName()) | ||
923 | 412 | ,Utils::FileName(),-1 | ||
924 | 413 | ,ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM); | ||
925 | 414 | m_tasks.append(t); | ||
926 | 415 | |||
927 | 416 | //SnapcraftPackageStep::run will stop if tasks exist | ||
928 | 417 | return; | ||
929 | 418 | |||
930 | 419 | } | ||
931 | 420 | |||
932 | 421 | m_buildDir = bc->buildDirectory().toString(); | ||
933 | 422 | env = bc->environment(); | ||
934 | 423 | mExp = bc->macroExpander(); | ||
935 | 424 | |||
936 | 425 | { | ||
937 | 426 | QStringList arguments { | ||
938 | 427 | QStringLiteral("snap") | ||
939 | 428 | }; | ||
940 | 429 | |||
941 | 430 | ProjectExplorer::ProcessParameters* params = &m_MakeParam; | ||
942 | 431 | params->setMacroExpander(mExp); | ||
943 | 432 | |||
944 | 433 | //setup process parameters | ||
945 | 434 | params->setWorkingDirectory(m_buildDir); | ||
946 | 435 | params->setCommand( | ||
947 | 436 | makeCommand(ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit()), | ||
948 | 437 | env)); | ||
949 | 438 | params->setArguments(Utils::QtcProcess::joinArgs(arguments)); | ||
950 | 439 | |||
951 | 440 | Utils::Environment tmpenv = env; | ||
952 | 441 | // Force output to english for the parsers. Do this here and not in the toolchain's | ||
953 | 442 | // addToEnvironment() to not screw up the users run environment. | ||
954 | 443 | tmpenv.set(QLatin1String("LC_ALL"), QLatin1String("C")); | ||
955 | 444 | params->setEnvironment(tmpenv); | ||
956 | 445 | |||
957 | 446 | params->resolveAll(); | ||
958 | 447 | } | ||
959 | 448 | |||
960 | 449 | //builds the snap review arguments | ||
961 | 450 | { | ||
962 | 451 | ProjectExplorer::ProcessParameters* params = &m_SnapReviewParam; | ||
963 | 452 | params->setMacroExpander(mExp); | ||
964 | 453 | |||
965 | 454 | //setup process parameters | ||
966 | 455 | params->setWorkingDirectory(m_buildDir); | ||
967 | 456 | params->setCommand(QLatin1String(Constants::CLICK_REVIEWERSTOOLS_BINARY)); | ||
968 | 457 | |||
969 | 458 | Utils::Environment tmpEnv = env; | ||
970 | 459 | // Force output to english for the parsers. Do this here and not in the toolchain's | ||
971 | 460 | // addToEnvironment() to not screw up the users run environment. | ||
972 | 461 | tmpEnv.set(QLatin1String("LC_ALL"), QLatin1String("C")); | ||
973 | 462 | params->setEnvironment(tmpEnv); | ||
974 | 463 | } | ||
975 | 464 | } | ||
976 | 465 | |||
977 | 466 | |||
978 | 467 | } // namespace Internal | ||
979 | 468 | } // namespace Ubuntu | ||
980 | 0 | 469 | ||
981 | === added file 'src/ubuntu/snap/snapcraftpackagestep.h' | |||
982 | --- src/ubuntu/snap/snapcraftpackagestep.h 1970-01-01 00:00:00 +0000 | |||
983 | +++ src/ubuntu/snap/snapcraftpackagestep.h 2016-09-22 15:50:47 +0000 | |||
984 | @@ -0,0 +1,105 @@ | |||
985 | 1 | /* | ||
986 | 2 | * Copyright 2016 Canonical Ltd. | ||
987 | 3 | * | ||
988 | 4 | * This program is free software; you can redistribute it and/or modify | ||
989 | 5 | * it under the terms of the GNU Lesser General Public License as published by | ||
990 | 6 | * the Free Software Foundation; version 2.1. | ||
991 | 7 | * | ||
992 | 8 | * This program is distributed in the hope that it will be useful, | ||
993 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
994 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
995 | 11 | * GNU Lesser General Public License for more details. | ||
996 | 12 | * | ||
997 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
998 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
999 | 15 | * | ||
1000 | 16 | * Author: Benjamin Zeller <benjamin.zeller@canonical.com> | ||
1001 | 17 | */ | ||
1002 | 18 | |||
1003 | 19 | #ifndef UBUNTU_INTERNAL_SNAPCRAFTPACKAGESTEP_H | ||
1004 | 20 | #define UBUNTU_INTERNAL_SNAPCRAFTPACKAGESTEP_H | ||
1005 | 21 | |||
1006 | 22 | |||
1007 | 23 | #include <projectexplorer/buildstep.h> | ||
1008 | 24 | #include <projectexplorer/ioutputparser.h> | ||
1009 | 25 | #include <projectexplorer/processparameters.h> | ||
1010 | 26 | #include <utils/qtcprocess.h> | ||
1011 | 27 | |||
1012 | 28 | namespace ProjectExplorer{ | ||
1013 | 29 | class ToolChain; | ||
1014 | 30 | } | ||
1015 | 31 | |||
1016 | 32 | namespace Ubuntu { | ||
1017 | 33 | namespace Internal { | ||
1018 | 34 | |||
1019 | 35 | class SnapcraftPackageStep : public ProjectExplorer::BuildStep | ||
1020 | 36 | { | ||
1021 | 37 | Q_OBJECT | ||
1022 | 38 | public: | ||
1023 | 39 | |||
1024 | 40 | enum State { | ||
1025 | 41 | Idle, | ||
1026 | 42 | MakeSnap, | ||
1027 | 43 | SnapReview | ||
1028 | 44 | }; | ||
1029 | 45 | |||
1030 | 46 | enum FinishedCheckMode { | ||
1031 | 47 | CheckReturnCode, | ||
1032 | 48 | IgnoreReturnCode | ||
1033 | 49 | }; | ||
1034 | 50 | |||
1035 | 51 | SnapcraftPackageStep(ProjectExplorer::BuildStepList *bsl); | ||
1036 | 52 | SnapcraftPackageStep(ProjectExplorer::BuildStepList *bsl, SnapcraftPackageStep *other); | ||
1037 | 53 | virtual ~SnapcraftPackageStep(); | ||
1038 | 54 | |||
1039 | 55 | QString packagePath () const; | ||
1040 | 56 | QString snapWorkingDir () const; | ||
1041 | 57 | |||
1042 | 58 | // BuildStep interface | ||
1043 | 59 | virtual bool init(QList<const ProjectExplorer::BuildStep *> &earlierSteps) override; | ||
1044 | 60 | virtual void run(QFutureInterface<bool> &fi) override; | ||
1045 | 61 | virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override; | ||
1046 | 62 | virtual void cancel() override; | ||
1047 | 63 | virtual bool immutable() const override; | ||
1048 | 64 | virtual bool runInGuiThread() const override; | ||
1049 | 65 | |||
1050 | 66 | signals: | ||
1051 | 67 | void currentSubStepFinished(); | ||
1052 | 68 | |||
1053 | 69 | protected slots: | ||
1054 | 70 | void doNextStep (); | ||
1055 | 71 | void onProcessFailedToStart(); | ||
1056 | 72 | void onProcessStdOut(); | ||
1057 | 73 | void onProcessStdErr(); | ||
1058 | 74 | void outputAdded(const QString &string, ProjectExplorer::BuildStep::OutputFormat format); | ||
1059 | 75 | void taskAdded (const ProjectExplorer::Task & task); | ||
1060 | 76 | |||
1061 | 77 | private: | ||
1062 | 78 | void internalInit (); | ||
1063 | 79 | void cleanup(); | ||
1064 | 80 | QString makeCommand(ProjectExplorer::ToolChain *tc, const Utils::Environment &env) const; | ||
1065 | 81 | void setupAndStartProcess(ProjectExplorer::ProcessParameters ¶ms); | ||
1066 | 82 | void stdOutput(const QString &line); | ||
1067 | 83 | void stdError(const QString &line); | ||
1068 | 84 | bool processFinished(FinishedCheckMode mode); | ||
1069 | 85 | |||
1070 | 86 | private: | ||
1071 | 87 | State m_state = SnapcraftPackageStep::Idle; | ||
1072 | 88 | QList<ProjectExplorer::Task> m_tasks; | ||
1073 | 89 | QFutureInterface<bool> *m_futureInterface; | ||
1074 | 90 | |||
1075 | 91 | Utils::QtcProcess *m_process = nullptr; | ||
1076 | 92 | ProjectExplorer::IOutputParser *m_outputParserChain = nullptr; | ||
1077 | 93 | |||
1078 | 94 | QString m_buildDir; | ||
1079 | 95 | QString m_lastLine; | ||
1080 | 96 | QString m_snapPackageName; | ||
1081 | 97 | ProjectExplorer::ProcessParameters m_MakeParam; | ||
1082 | 98 | ProjectExplorer::ProcessParameters m_SnapReviewParam; | ||
1083 | 99 | ProjectExplorer::ProcessParameters *m_currParam = nullptr; | ||
1084 | 100 | }; | ||
1085 | 101 | |||
1086 | 102 | } // namespace Internal | ||
1087 | 103 | } // namespace Ubuntu | ||
1088 | 104 | |||
1089 | 105 | #endif // UBUNTU_INTERNAL_SNAPCRAFTPACKAGESTEP_H | ||
1090 | 0 | 106 | ||
1091 | === added file 'src/ubuntu/snap/snaphelper.cpp' | |||
1092 | --- src/ubuntu/snap/snaphelper.cpp 1970-01-01 00:00:00 +0000 | |||
1093 | +++ src/ubuntu/snap/snaphelper.cpp 2016-09-22 15:50:47 +0000 | |||
1094 | @@ -0,0 +1,30 @@ | |||
1095 | 1 | #include "snaphelper.h" | ||
1096 | 2 | |||
1097 | 3 | #include <projectexplorer/project.h> | ||
1098 | 4 | #include <qmakeprojectmanager/qmakeproject.h> | ||
1099 | 5 | #include <qmakeprojectmanager/qmakeprojectmanagerconstants.h> | ||
1100 | 6 | |||
1101 | 7 | namespace Ubuntu { | ||
1102 | 8 | namespace Internal { | ||
1103 | 9 | |||
1104 | 10 | SnapHelper::SnapHelper() | ||
1105 | 11 | { | ||
1106 | 12 | |||
1107 | 13 | } | ||
1108 | 14 | |||
1109 | 15 | bool SnapHelper::isSnappyProject(ProjectExplorer::Project *project) | ||
1110 | 16 | { | ||
1111 | 17 | if (!project) | ||
1112 | 18 | return false; | ||
1113 | 19 | |||
1114 | 20 | QString mimeType = project->projectManager()->mimeType(); | ||
1115 | 21 | if(mimeType != QLatin1String(QmakeProjectManager::Constants::PROFILE_MIMETYPE)) | ||
1116 | 22 | return false; | ||
1117 | 23 | |||
1118 | 24 | QmakeProjectManager::QmakeProject *qPro = static_cast<QmakeProjectManager::QmakeProject *>(project); | ||
1119 | 25 | QmakeProjectManager::QmakeProFileNode *node = qPro->rootProjectNode(); | ||
1120 | 26 | return node->variableValue(QmakeProjectManager::ConfigVar).contains(QStringLiteral("snapcraft"), Qt::CaseInsensitive); | ||
1121 | 27 | } | ||
1122 | 28 | |||
1123 | 29 | } // namespace Internal | ||
1124 | 30 | } // namespace Ubuntu | ||
1125 | 0 | 31 | ||
1126 | === added file 'src/ubuntu/snap/snaphelper.h' | |||
1127 | --- src/ubuntu/snap/snaphelper.h 1970-01-01 00:00:00 +0000 | |||
1128 | +++ src/ubuntu/snap/snaphelper.h 2016-09-22 15:50:47 +0000 | |||
1129 | @@ -0,0 +1,22 @@ | |||
1130 | 1 | #ifndef UBUNTU_INTERNAL_SNAPHELPER_H | ||
1131 | 2 | #define UBUNTU_INTERNAL_SNAPHELPER_H | ||
1132 | 3 | |||
1133 | 4 | namespace ProjectExplorer { | ||
1134 | 5 | class Project; | ||
1135 | 6 | } | ||
1136 | 7 | |||
1137 | 8 | namespace Ubuntu { | ||
1138 | 9 | namespace Internal { | ||
1139 | 10 | |||
1140 | 11 | class SnapHelper | ||
1141 | 12 | { | ||
1142 | 13 | public: | ||
1143 | 14 | SnapHelper(); | ||
1144 | 15 | |||
1145 | 16 | static bool isSnappyProject (ProjectExplorer::Project* project); | ||
1146 | 17 | }; | ||
1147 | 18 | |||
1148 | 19 | } // namespace Internal | ||
1149 | 20 | } // namespace Ubuntu | ||
1150 | 21 | |||
1151 | 22 | #endif // UBUNTU_INTERNAL_SNAPHELPER_H | ||
1152 | 0 | 23 | ||
1153 | === modified file 'src/ubuntu/ubuntuconstants.h' | |||
1154 | --- src/ubuntu/ubuntuconstants.h 2016-07-20 14:56:52 +0000 | |||
1155 | +++ src/ubuntu/ubuntuconstants.h 2016-09-22 15:50:47 +0000 | |||
1156 | @@ -344,6 +344,7 @@ | |||
1157 | 344 | const char UBUNTU_DEPLOY_UPLOADSTEP_ID[] = "UbuntuProjectManager.UploadStep"; | 344 | const char UBUNTU_DEPLOY_UPLOADSTEP_ID[] = "UbuntuProjectManager.UploadStep"; |
1158 | 345 | const char UBUNTU_DEPLOY_MAKESTEP_ID[] = "UbuntuProjectManager.UbuntuCMake.DeployMakeStep"; | 345 | const char UBUNTU_DEPLOY_MAKESTEP_ID[] = "UbuntuProjectManager.UbuntuCMake.DeployMakeStep"; |
1159 | 346 | const char UBUNTU_CLICK_PACKAGESTEP_ID[] = "UbuntuProjectManager.ClickPackageStep"; | 346 | const char UBUNTU_CLICK_PACKAGESTEP_ID[] = "UbuntuProjectManager.ClickPackageStep"; |
1160 | 347 | const char UBUNTU_SNAP_PACKAGESTEP_ID[] = "UbuntuProjectManager.SnapPackageStep"; | ||
1161 | 347 | const char UBUNTU_DEPLOY_DESTDIR[] = ".ubuntu-sdk-deploy"; | 348 | const char UBUNTU_DEPLOY_DESTDIR[] = ".ubuntu-sdk-deploy"; |
1162 | 348 | const char UBUNTU_CLICK_SUCCESS_PACKAGE_REGEX[] = "^.*'(.*)'.$"; | 349 | const char UBUNTU_CLICK_SUCCESS_PACKAGE_REGEX[] = "^.*'(.*)'.$"; |
1163 | 349 | 350 | ||
1164 | 350 | 351 | ||
1165 | === added file 'src/ubuntu/ubuntujsextension.cpp' | |||
1166 | --- src/ubuntu/ubuntujsextension.cpp 1970-01-01 00:00:00 +0000 | |||
1167 | +++ src/ubuntu/ubuntujsextension.cpp 2016-09-22 15:50:47 +0000 | |||
1168 | @@ -0,0 +1,46 @@ | |||
1169 | 1 | /* | ||
1170 | 2 | * Copyright 2016 Canonical Ltd. | ||
1171 | 3 | * | ||
1172 | 4 | * This program is free software; you can redistribute it and/or modify | ||
1173 | 5 | * it under the terms of the GNU Lesser General Public License as published by | ||
1174 | 6 | * the Free Software Foundation; version 2.1. | ||
1175 | 7 | * | ||
1176 | 8 | * This program is distributed in the hope that it will be useful, | ||
1177 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1178 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1179 | 11 | * GNU Lesser General Public License for more details. | ||
1180 | 12 | * | ||
1181 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
1182 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1183 | 15 | * | ||
1184 | 16 | * Author: Benjamin Zeller <benjamin.zeller@canonical.com> | ||
1185 | 17 | */ | ||
1186 | 18 | #include "ubuntujsextension.h" | ||
1187 | 19 | #include <ubuntu/ubuntubzr.h> | ||
1188 | 20 | |||
1189 | 21 | namespace Ubuntu { | ||
1190 | 22 | namespace Internal { | ||
1191 | 23 | |||
1192 | 24 | UbuntuJsExtension::UbuntuJsExtension(QObject *parent) : QObject(parent) | ||
1193 | 25 | { | ||
1194 | 26 | |||
1195 | 27 | } | ||
1196 | 28 | |||
1197 | 29 | QString UbuntuJsExtension::developerId() const | ||
1198 | 30 | { | ||
1199 | 31 | QString maintainer = QStringLiteral("username"); | ||
1200 | 32 | UbuntuBzr *bzr = UbuntuBzr::instance(); | ||
1201 | 33 | |||
1202 | 34 | if(!bzr->isInitialized()) { | ||
1203 | 35 | bzr->initialize(); | ||
1204 | 36 | bzr->waitForFinished(); | ||
1205 | 37 | } | ||
1206 | 38 | |||
1207 | 39 | if(bzr->isInitialized()) { | ||
1208 | 40 | maintainer = bzr->launchpadId(); | ||
1209 | 41 | } | ||
1210 | 42 | |||
1211 | 43 | return maintainer; | ||
1212 | 44 | } | ||
1213 | 45 | |||
1214 | 46 | }} | ||
1215 | 0 | 47 | ||
1216 | === added file 'src/ubuntu/ubuntujsextension.h' | |||
1217 | --- src/ubuntu/ubuntujsextension.h 1970-01-01 00:00:00 +0000 | |||
1218 | +++ src/ubuntu/ubuntujsextension.h 2016-09-22 15:50:47 +0000 | |||
1219 | @@ -0,0 +1,37 @@ | |||
1220 | 1 | /* | ||
1221 | 2 | * Copyright 2016 Canonical Ltd. | ||
1222 | 3 | * | ||
1223 | 4 | * This program is free software; you can redistribute it and/or modify | ||
1224 | 5 | * it under the terms of the GNU Lesser General Public License as published by | ||
1225 | 6 | * the Free Software Foundation; version 2.1. | ||
1226 | 7 | * | ||
1227 | 8 | * This program is distributed in the hope that it will be useful, | ||
1228 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1229 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1230 | 11 | * GNU Lesser General Public License for more details. | ||
1231 | 12 | * | ||
1232 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
1233 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1234 | 15 | * | ||
1235 | 16 | * Author: Benjamin Zeller <benjamin.zeller@canonical.com> | ||
1236 | 17 | */ | ||
1237 | 18 | #ifndef UBUNTUJSEXTENSION_H | ||
1238 | 19 | #define UBUNTUJSEXTENSION_H | ||
1239 | 20 | |||
1240 | 21 | #include <QObject> | ||
1241 | 22 | |||
1242 | 23 | namespace Ubuntu { | ||
1243 | 24 | namespace Internal { | ||
1244 | 25 | |||
1245 | 26 | class UbuntuJsExtension : public QObject | ||
1246 | 27 | { | ||
1247 | 28 | Q_OBJECT | ||
1248 | 29 | public: | ||
1249 | 30 | explicit UbuntuJsExtension(QObject *parent = 0); | ||
1250 | 31 | |||
1251 | 32 | Q_INVOKABLE QString developerId() const; | ||
1252 | 33 | }; | ||
1253 | 34 | |||
1254 | 35 | }} | ||
1255 | 36 | |||
1256 | 37 | #endif // UBUNTUJSEXTENSION_H | ||
1257 | 0 | 38 | ||
1258 | === modified file 'src/ubuntu/ubuntupackagingmodel.cpp' | |||
1259 | --- src/ubuntu/ubuntupackagingmodel.cpp 2016-09-05 17:14:46 +0000 | |||
1260 | +++ src/ubuntu/ubuntupackagingmodel.cpp 2016-09-22 15:50:47 +0000 | |||
1261 | @@ -30,6 +30,8 @@ | |||
1262 | 30 | #include "ubuntuproject.h" | 30 | #include "ubuntuproject.h" |
1263 | 31 | 31 | ||
1264 | 32 | #include <ubuntu/device/remote/ubuntudevice.h> | 32 | #include <ubuntu/device/remote/ubuntudevice.h> |
1265 | 33 | #include <ubuntu/snap/snaphelper.h> | ||
1266 | 34 | #include <ubuntu/snap/snapcraftpackagestep.h> | ||
1267 | 33 | 35 | ||
1268 | 34 | #include <projectexplorer/projectexplorer.h> | 36 | #include <projectexplorer/projectexplorer.h> |
1269 | 35 | #include <projectexplorer/project.h> | 37 | #include <projectexplorer/project.h> |
1270 | @@ -159,7 +161,6 @@ | |||
1271 | 159 | m_ubuntuProcess.append(QStringList() << QString::fromLatin1(Constants::CLICK_REVIEWERSTOOLS_LOCATION).arg(sClickPackagePath)); | 161 | m_ubuntuProcess.append(QStringList() << QString::fromLatin1(Constants::CLICK_REVIEWERSTOOLS_LOCATION).arg(sClickPackagePath)); |
1272 | 160 | m_ubuntuProcess.start(QString(QLatin1String(Constants::UBUNTUPACKAGINGWIDGET_CLICK_REVIEWER_TOOLS_AGAINST_PACKAGE)).arg(sClickPackagePath)); | 162 | m_ubuntuProcess.start(QString(QLatin1String(Constants::UBUNTUPACKAGINGWIDGET_CLICK_REVIEWER_TOOLS_AGAINST_PACKAGE)).arg(sClickPackagePath)); |
1273 | 161 | } | 163 | } |
1274 | 162 | |||
1275 | 163 | } | 164 | } |
1276 | 164 | 165 | ||
1277 | 165 | void UbuntuPackagingModel::onMessage(QString msg) | 166 | void UbuntuPackagingModel::onMessage(QString msg) |
1278 | @@ -294,6 +295,16 @@ | |||
1279 | 294 | if(!project) | 295 | if(!project) |
1280 | 295 | return; | 296 | return; |
1281 | 296 | 297 | ||
1282 | 298 | if (SnapHelper::isSnappyProject(project)) { | ||
1283 | 299 | if(m_reviewToolsInstalled) | ||
1284 | 300 | m_postPackageTask = Verify; | ||
1285 | 301 | else | ||
1286 | 302 | m_postPackageTask = None; | ||
1287 | 303 | |||
1288 | 304 | buildSnapPackage(); | ||
1289 | 305 | return; | ||
1290 | 306 | } | ||
1291 | 307 | |||
1292 | 297 | QString mimeType = project->projectManager()->mimeType(); | 308 | QString mimeType = project->projectManager()->mimeType(); |
1293 | 298 | if(mimeType == QLatin1String(CMakeProjectManager::Constants::CMAKEPROJECTMIMETYPE) | 309 | if(mimeType == QLatin1String(CMakeProjectManager::Constants::CMAKEPROJECTMIMETYPE) |
1294 | 299 | || mimeType == QLatin1String(Ubuntu::Constants::UBUNTUPROJECT_MIMETYPE) | 310 | || mimeType == QLatin1String(Ubuntu::Constants::UBUNTUPROJECT_MIMETYPE) |
1295 | @@ -303,6 +314,7 @@ | |||
1296 | 303 | m_postPackageTask = Verify; | 314 | m_postPackageTask = Verify; |
1297 | 304 | else | 315 | else |
1298 | 305 | m_postPackageTask = None; | 316 | m_postPackageTask = None; |
1299 | 317 | |||
1300 | 306 | buildClickPackage(); | 318 | buildClickPackage(); |
1301 | 307 | } else { | 319 | } else { |
1302 | 308 | m_UbuntuMenu_connection = QObject::connect(UbuntuMenu::instance(),SIGNAL(finished_action(const QProcess*,QString)),this,SLOT(onFinishedAction(const QProcess*,QString))); | 320 | m_UbuntuMenu_connection = QObject::connect(UbuntuMenu::instance(),SIGNAL(finished_action(const QProcess*,QString)),this,SLOT(onFinishedAction(const QProcess*,QString))); |
1303 | @@ -330,10 +342,11 @@ | |||
1304 | 330 | if (success) { | 342 | if (success) { |
1305 | 331 | //the step that created the click package is always in the last list and always the last step | 343 | //the step that created the click package is always in the last list and always the last step |
1306 | 332 | UbuntuPackageStep *pckStep = qobject_cast<UbuntuPackageStep*>(m_packageBuildSteps.last()->steps().last()); | 344 | UbuntuPackageStep *pckStep = qobject_cast<UbuntuPackageStep*>(m_packageBuildSteps.last()->steps().last()); |
1308 | 333 | if (pckStep && !pckStep->packagePath().isEmpty()) { | 345 | SnapcraftPackageStep *snapPckStep = qobject_cast<SnapcraftPackageStep*>(m_packageBuildSteps.last()->steps().last()); |
1309 | 346 | if ((pckStep && !pckStep->packagePath().isEmpty()) || (snapPckStep && !snapPckStep->packagePath().isEmpty())) { | ||
1310 | 334 | m_ubuntuProcess.stop(); | 347 | m_ubuntuProcess.stop(); |
1311 | 335 | 348 | ||
1313 | 336 | QString sClickPackagePath = pckStep->packagePath(); | 349 | QString sClickPackagePath = pckStep ? pckStep->packagePath() : snapPckStep->packagePath(); |
1314 | 337 | if (sClickPackagePath.isEmpty()) { | 350 | if (sClickPackagePath.isEmpty()) { |
1315 | 338 | clearPackageBuildList(); | 351 | clearPackageBuildList(); |
1316 | 339 | return; | 352 | return; |
1317 | @@ -381,19 +394,34 @@ | |||
1318 | 381 | void UbuntuPackagingModel::buildAndInstallPackageRequested() | 394 | void UbuntuPackagingModel::buildAndInstallPackageRequested() |
1319 | 382 | { | 395 | { |
1320 | 383 | m_postPackageTask = Install; | 396 | m_postPackageTask = Install; |
1321 | 397 | |||
1322 | 398 | if (SnapHelper::isSnappyProject(ProjectExplorer::SessionManager::startupProject())) { | ||
1323 | 399 | QMessageBox::information(Core::ICore::mainWindow(), qApp->applicationName(), | ||
1324 | 400 | tr("Installing is currently not supported for snappy projects.")); | ||
1325 | 401 | return; | ||
1326 | 402 | } | ||
1327 | 403 | |||
1328 | 384 | buildClickPackage(); | 404 | buildClickPackage(); |
1329 | 385 | } | 405 | } |
1330 | 386 | 406 | ||
1331 | 387 | void UbuntuPackagingModel::buildAndVerifyPackageRequested() | 407 | void UbuntuPackagingModel::buildAndVerifyPackageRequested() |
1332 | 388 | { | 408 | { |
1333 | 389 | m_postPackageTask = Verify; | 409 | m_postPackageTask = Verify; |
1335 | 390 | buildClickPackage(); | 410 | |
1336 | 411 | if (SnapHelper::isSnappyProject(ProjectExplorer::SessionManager::startupProject())) | ||
1337 | 412 | buildSnapPackage(); | ||
1338 | 413 | else | ||
1339 | 414 | buildClickPackage(); | ||
1340 | 391 | } | 415 | } |
1341 | 392 | 416 | ||
1342 | 393 | void UbuntuPackagingModel::buildPackageRequested() | 417 | void UbuntuPackagingModel::buildPackageRequested() |
1343 | 394 | { | 418 | { |
1344 | 395 | m_postPackageTask = None; | 419 | m_postPackageTask = None; |
1346 | 396 | buildClickPackage(); | 420 | |
1347 | 421 | if (SnapHelper::isSnappyProject(ProjectExplorer::SessionManager::startupProject())) | ||
1348 | 422 | buildSnapPackage(); | ||
1349 | 423 | else | ||
1350 | 424 | buildClickPackage(); | ||
1351 | 397 | } | 425 | } |
1352 | 398 | 426 | ||
1353 | 399 | void UbuntuPackagingModel::targetChanged() | 427 | void UbuntuPackagingModel::targetChanged() |
1354 | @@ -561,6 +589,59 @@ | |||
1355 | 561 | } | 589 | } |
1356 | 562 | } | 590 | } |
1357 | 563 | 591 | ||
1358 | 592 | void UbuntuPackagingModel::buildSnapPackage() | ||
1359 | 593 | { | ||
1360 | 594 | ProjectExplorer::Project* project = ProjectExplorer::SessionManager::startupProject(); | ||
1361 | 595 | if(!project) { | ||
1362 | 596 | QMessageBox::warning(Core::ICore::mainWindow(),tr("No Project"),tr("No valid project loaded.")); | ||
1363 | 597 | return; | ||
1364 | 598 | } | ||
1365 | 599 | |||
1366 | 600 | if(ProjectExplorer::BuildManager::isBuilding()) { | ||
1367 | 601 | QMessageBox::information(Core::ICore::mainWindow(),tr("Build running"),tr("There is currently a build running, please wait for it to be finished")); | ||
1368 | 602 | return; | ||
1369 | 603 | } | ||
1370 | 604 | |||
1371 | 605 | if(!ProjectExplorer::ProjectExplorerPlugin::instance()->saveModifiedFiles()) | ||
1372 | 606 | return; | ||
1373 | 607 | |||
1374 | 608 | if(!SnapHelper::isSnappyProject(project)) | ||
1375 | 609 | return; | ||
1376 | 610 | |||
1377 | 611 | ProjectExplorer::Target* target = project->activeTarget(); | ||
1378 | 612 | if(!target) | ||
1379 | 613 | return; | ||
1380 | 614 | |||
1381 | 615 | ProjectExplorer::BuildConfiguration* bc = target->activeBuildConfiguration(); | ||
1382 | 616 | if(!bc) { | ||
1383 | 617 | QMessageBox::information(Core::ICore::mainWindow(),tr("Error"),tr("Please add a valid buildconfiguration to your project")); | ||
1384 | 618 | return; | ||
1385 | 619 | } | ||
1386 | 620 | |||
1387 | 621 | if(!bc->isEnabled()) { | ||
1388 | 622 | QString disabledReason = bc->disabledReason(); | ||
1389 | 623 | QMessageBox::information(Core::ICore::mainWindow(),tr("Disabled"),tr("The currently selected Buildconfiguration is disabled. %1").arg(disabledReason)); | ||
1390 | 624 | return; | ||
1391 | 625 | } | ||
1392 | 626 | |||
1393 | 627 | clearPackageBuildList(); | ||
1394 | 628 | |||
1395 | 629 | m_packageBuildSteps.append(QSharedPointer<ProjectExplorer::BuildStepList> (new ProjectExplorer::BuildStepList(bc,ProjectExplorer::Constants::BUILDSTEPS_BUILD))); | ||
1396 | 630 | ProjectExplorer::BuildStepList *buildSteps = bc->stepList(Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD)); | ||
1397 | 631 | if (buildSteps && buildSteps->count() > 0) { | ||
1398 | 632 | //add the normal buildsteps | ||
1399 | 633 | m_packageBuildSteps.last()->cloneSteps(buildSteps); | ||
1400 | 634 | } | ||
1401 | 635 | |||
1402 | 636 | //append the snap packaging step | ||
1403 | 637 | SnapcraftPackageStep *package = new SnapcraftPackageStep(m_packageBuildSteps.last().data()); | ||
1404 | 638 | m_packageBuildSteps.last()->appendStep(package); | ||
1405 | 639 | |||
1406 | 640 | m_buildManagerConnection = connect(ProjectExplorer::BuildManager::instance(),SIGNAL(buildQueueFinished(bool)),this,SLOT(buildFinished(bool))); | ||
1407 | 641 | |||
1408 | 642 | ProjectExplorer::BuildManager::buildList(m_packageBuildSteps.last().data(),tr("Build Project")); | ||
1409 | 643 | } | ||
1410 | 644 | |||
1411 | 564 | /*! | 645 | /*! |
1412 | 565 | * \brief UbuntuPackagingWidget::clearAdditionalBuildSteps | 646 | * \brief UbuntuPackagingWidget::clearAdditionalBuildSteps |
1413 | 566 | * Clears the last used additional buildsteps | 647 | * Clears the last used additional buildsteps |
1414 | 567 | 648 | ||
1415 | === modified file 'src/ubuntu/ubuntupackagingmodel.h' | |||
1416 | --- src/ubuntu/ubuntupackagingmodel.h 2015-02-13 12:04:38 +0000 | |||
1417 | +++ src/ubuntu/ubuntupackagingmodel.h 2016-09-22 15:50:47 +0000 | |||
1418 | @@ -95,6 +95,7 @@ | |||
1419 | 95 | 95 | ||
1420 | 96 | private: | 96 | private: |
1421 | 97 | void buildClickPackage (); | 97 | void buildClickPackage (); |
1422 | 98 | void buildSnapPackage (); | ||
1423 | 98 | void clearPackageBuildList (); | 99 | void clearPackageBuildList (); |
1424 | 99 | void updateFrameworkList (); | 100 | void updateFrameworkList (); |
1425 | 100 | void resetValidationResult (); | 101 | void resetValidationResult (); |
1426 | 101 | 102 | ||
1427 | === modified file 'src/ubuntu/ubuntuplugin.cpp' | |||
1428 | --- src/ubuntu/ubuntuplugin.cpp 2016-09-05 17:14:46 +0000 | |||
1429 | +++ src/ubuntu/ubuntuplugin.cpp 2016-09-22 15:50:47 +0000 | |||
1430 | @@ -49,9 +49,11 @@ | |||
1431 | 49 | #include <ubuntu/device/remote/ubunturemotedeployconfiguration.h> | 49 | #include <ubuntu/device/remote/ubunturemotedeployconfiguration.h> |
1432 | 50 | #include <ubuntu/device/remote/ubuntudeploystepfactory.h> | 50 | #include <ubuntu/device/remote/ubuntudeploystepfactory.h> |
1433 | 51 | 51 | ||
1437 | 52 | #include "wizards/ubuntuprojectapplicationwizard.h" | 52 | #include <ubuntu/wizards/ubuntuprojectapplicationwizard.h> |
1438 | 53 | #include "wizards/ubuntufirstrunwizard.h" | 53 | #include <ubuntu/wizards/ubuntufirstrunwizard.h> |
1439 | 54 | #include "wizards/ubuntuprojectmigrationwizard.h" | 54 | #include <ubuntu/wizards/ubuntuprojectmigrationwizard.h> |
1440 | 55 | |||
1441 | 56 | #include "ubuntujsextension.h" | ||
1442 | 55 | 57 | ||
1443 | 56 | #include <coreplugin/modemanager.h> | 58 | #include <coreplugin/modemanager.h> |
1444 | 57 | #include <projectexplorer/kitmanager.h> | 59 | #include <projectexplorer/kitmanager.h> |
1445 | @@ -60,6 +62,7 @@ | |||
1446 | 60 | #include <projectexplorer/processparameters.h> | 62 | #include <projectexplorer/processparameters.h> |
1447 | 61 | #include <coreplugin/featureprovider.h> | 63 | #include <coreplugin/featureprovider.h> |
1448 | 62 | #include <coreplugin/coreplugin.h> | 64 | #include <coreplugin/coreplugin.h> |
1449 | 65 | #include <coreplugin/jsexpander.h> | ||
1450 | 63 | #include <utils/mimetypes/mimedatabase.h> | 66 | #include <utils/mimetypes/mimedatabase.h> |
1451 | 64 | #include <utils/mimetypes/mimeglobpattern_p.h> | 67 | #include <utils/mimetypes/mimeglobpattern_p.h> |
1452 | 65 | #include <cmakeprojectmanager/cmaketoolmanager.h> | 68 | #include <cmakeprojectmanager/cmaketoolmanager.h> |
1453 | @@ -233,6 +236,9 @@ | |||
1454 | 233 | addAutoReleasedObject(new Internal::UbuntuManifestEditorFactory); | 236 | addAutoReleasedObject(new Internal::UbuntuManifestEditorFactory); |
1455 | 234 | addAutoReleasedObject(new Internal::UbuntuApparmorEditorFactory); | 237 | addAutoReleasedObject(new Internal::UbuntuApparmorEditorFactory); |
1456 | 235 | 238 | ||
1457 | 239 | //Ubuntu expander | ||
1458 | 240 | Core::JsExpander::registerQObjectForJs(QStringLiteral("Ubuntu"), new UbuntuJsExtension); | ||
1459 | 241 | |||
1460 | 236 | //trigger kit autodetection and update after projectexplorer loaded the kits | 242 | //trigger kit autodetection and update after projectexplorer loaded the kits |
1461 | 237 | connect(ProjectExplorer::KitManager::instance(),SIGNAL(kitsLoaded()) | 243 | connect(ProjectExplorer::KitManager::instance(),SIGNAL(kitsLoaded()) |
1462 | 238 | ,this,SLOT(onKitsLoaded())); | 244 | ,this,SLOT(onKitsLoaded())); |
1463 | 239 | 245 | ||
1464 | === modified file 'src/ubuntu/wizards/ubuntuprojectapplicationwizard.cpp' | |||
1465 | --- src/ubuntu/wizards/ubuntuprojectapplicationwizard.cpp 2016-09-05 17:14:46 +0000 | |||
1466 | +++ src/ubuntu/wizards/ubuntuprojectapplicationwizard.cpp 2016-09-22 15:50:47 +0000 | |||
1467 | @@ -18,11 +18,13 @@ | |||
1468 | 18 | 18 | ||
1469 | 19 | #include "ubuntuprojectapplicationwizard.h" | 19 | #include "ubuntuprojectapplicationwizard.h" |
1470 | 20 | #include "ubuntufirstrunwizard.h" | 20 | #include "ubuntufirstrunwizard.h" |
1476 | 21 | #include "../ubuntushared.h" | 21 | |
1477 | 22 | #include "../ubuntuconstants.h" | 22 | #include <ubuntu/ubuntushared.h> |
1478 | 23 | #include "../ubuntuproject.h" | 23 | #include <ubuntu/ubuntushared.h> |
1479 | 24 | #include "../ubuntubzr.h" | 24 | #include <ubuntu/ubuntuconstants.h> |
1480 | 25 | #include "../ubuntuclicktool.h" | 25 | #include <ubuntu/ubuntuproject.h> |
1481 | 26 | #include <ubuntu/ubuntubzr.h> | ||
1482 | 27 | #include <ubuntu/ubuntuclicktool.h> | ||
1483 | 26 | 28 | ||
1484 | 27 | #include <utils/qtcassert.h> | 29 | #include <utils/qtcassert.h> |
1485 | 28 | #include <utils/pathchooser.h> | 30 | #include <utils/pathchooser.h> |
FAILED: Continuous integration, rev:470 /jenkins. ubuntu. com/ubuntu- sdk/job/ qtcreator- ide-ci- amd64/344/ /jenkins. ubuntu. com/ubuntu- sdk/job/ generic- update- mp/6756/ console
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild: /jenkins. ubuntu. com/ubuntu- sdk/job/ qtcreator- ide-ci- amd64/344/ rebuild
https:/