Merge lp:~zeller-benjamin/qtcreator-plugin-ubuntu/housecleaning into lp:qtcreator-plugin-ubuntu

Proposed by Benjamin Zeller
Status: Merged
Approved by: Zoltan Balogh
Approved revision: 380
Merged at revision: 383
Proposed branch: lp:~zeller-benjamin/qtcreator-plugin-ubuntu/housecleaning
Merge into: lp:qtcreator-plugin-ubuntu
Diff against target: 1697 lines (+0/-1421)
31 files modified
share/qtcreator/ubuntu/menu.json (+0/-116)
share/qtcreator/ubuntu/qml/DevicesPage/DevicePage.qml (+0/-40)
share/qtcreator/ubuntu/scripts/device_flashdaily (+0/-37)
share/qtcreator/ubuntu/scripts/device_flashdaily_bootstrap (+0/-37)
share/qtcreator/ubuntu/scripts/device_reboot (+0/-20)
share/qtcreator/ubuntu/scripts/device_reboot2bootloader (+0/-21)
share/qtcreator/ubuntu/scripts/device_reboot2recovery (+0/-20)
share/qtcreator/ubuntu/scripts/device_rootshell (+0/-20)
share/qtcreator/ubuntu/scripts/device_set_persist-sys-usb-config (+0/-20)
share/qtcreator/ubuntu/scripts/device_shutdown (+0/-20)
share/qtcreator/ubuntu/scripts/device_time_clone (+0/-29)
share/qtcreator/ubuntu/scripts/functions.inc (+0/-16)
share/qtcreator/ubuntu/scripts/qtc_cmakeproject_click_create (+0/-102)
share/qtcreator/ubuntu/scripts/qtc_cmakeproject_click_createanddeploy (+0/-48)
share/qtcreator/ubuntu/scripts/qtc_device_close_all_apps (+0/-48)
share/qtcreator/ubuntu/scripts/qtc_device_deploy_package (+0/-68)
share/qtcreator/ubuntu/scripts/qtc_device_restart_appslense (+0/-22)
share/qtcreator/ubuntu/scripts/qtc_device_run_app (+0/-124)
share/qtcreator/ubuntu/scripts/qtc_device_run_app_click (+0/-47)
share/qtcreator/ubuntu/scripts/qtc_project_click_create (+0/-116)
share/qtcreator/ubuntu/scripts/qtc_project_click_createanddeploy (+0/-39)
share/qtcreator/ubuntu/scripts/qtc_project_create_package (+0/-51)
share/qtcreator/ubuntu/scripts/qtc_project_debuild (+0/-20)
share/qtcreator/ubuntu/scripts/qtc_project_detect_qmldeps (+0/-34)
share/qtcreator/ubuntu/scripts/qtc_project_packaging (+0/-118)
share/qtcreator/ubuntu/scripts/qtc_read_bazaar_settings (+0/-39)
src/ubuntu/ubuntuconstants.h (+0/-16)
src/ubuntu/ubuntudevice.cpp (+0/-81)
src/ubuntu/ubuntudevice.h (+0/-7)
src/ubuntu/ubuntudevicesmodel.cpp (+0/-40)
src/ubuntu/ubuntudevicesmodel.h (+0/-5)
To merge this branch: bzr merge lp:~zeller-benjamin/qtcreator-plugin-ubuntu/housecleaning
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Zoltan Balogh Approve
Review via email: mp+258189@code.launchpad.net

Commit message

Remove either unused or dangerous functions and scripts.

Description of the change

Remove either unused or dangerous functions and scripts.

To post a comment you must log in.
Revision history for this message
Zoltan Balogh (bzoltan) wrote :

OK

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
381. By Benjamin Zeller

Remove clone time to device script

382. By Benjamin Zeller

Add affected bug

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'share/qtcreator/ubuntu/menu.json'
2--- share/qtcreator/ubuntu/menu.json 2015-04-16 11:06:32 +0000
3+++ share/qtcreator/ubuntu/menu.json 2015-05-05 14:31:31 +0000
4@@ -313,122 +313,6 @@
5 ]
6 }
7 ]
8- },
9- {
10- "name": "Device Control",
11- "id": "Ubuntu.Menu.Device",
12- "submenu": [
13- {
14- "name": "SSH to Device",
15- "id": "Ubuntu.Menu.Device.SSH",
16- "keysequence": "Ctrl+F10",
17- "deviceRequired": true,
18- "actions": [
19- "x-terminal-emulator -e \"ssh -i ~/.ssh/ubuntudevice_%SERIALNUMBER%_id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null %USERNAME%@%IP% -p%PORT%\""
20- ]
21- },
22- {
23- "name": "Close All Applications on Device",
24- "id": "Ubuntu.Menu.Device.CloseAllApps",
25- "deviceRequired": true,
26- "actions": [
27- "%SCRIPTDIRECTORY%/qtc_device_close_all_apps %SERIALNUMBER%"
28- ]
29- },
30- {
31- "name": "Flash daily image on device",
32- "id": "Ubuntu.Menu.Device.FlashDaily",
33- "deviceRequired": true,
34- "actions": [
35- "%SCRIPTDIRECTORY%/device_flashdaily %SERIALNUMBER%"
36- ]
37- },
38- {
39- "name": "Flash daily image on device (with bootstrap)",
40- "id": "Ubuntu.Menu.Device.FlashDailyBootstrap",
41- "deviceRequired": true,
42- "actions": [
43- "%SCRIPTDIRECTORY%/device_flashdaily_bootstrap %SERIALNUMBER%"
44- ]
45- }
46- ]
47- },
48- {
49- "name": "Device Package Management",
50- "id": "Ubuntu.Menu.Device.AptGet",
51- "submenu": [
52- {
53- "name": "Install Package",
54- "id": "Ubuntu.Menu.Device.AptGet.Install",
55- "deviceRequired": true,
56- "actions": [
57- {
58- "queryDialog": {
59- "title": "Install Package",
60- "message": "Package Name:",
61- "value": "<packagename>"
62- }
63- },
64- "adb -s %SERIALNUMBER% root",
65- "adb -s %SERIALNUMBER% wait-for-device",
66- "adb -s %SERIALNUMBER% shell apt-get -y install %0"
67- ]
68- },
69- {
70- "name": "Install Package Build Dependencies",
71- "id": "Ubuntu.Menu.Device.AptGet.BuildDep",
72- "deviceRequired": true,
73- "actions": [
74- "adb -s %SERIALNUMBER% root",
75- "adb -s %SERIALNUMBER% wait-for-device",
76- {
77- "queryDialog": {
78- "title": "Install Package Build Dependencies",
79- "message": "Package Name:",
80- "value": "<packagename>"
81- }
82- },
83- "adb -s %SERIALNUMBER% shell apt-get -y build-dep %0"
84- ]
85- }
86- ]
87- },
88- {
89- "name": "Android Debugging",
90- "id": "Ubuntu.Menu.Device.ADB",
91- "submenu": [
92- {
93- "name": "adb shell",
94- "id": "Ubuntu.Menu.Device.ADB.shell",
95- "deviceRequired": true,
96- "actions": [
97- "x-terminal-emulator -e \"adb -s %SERIALNUMBER% shell\""
98- ]
99- },
100- {
101- "name": "adb root",
102- "id": "Ubuntu.Menu.Device.ADB.root",
103- "deviceRequired": true,
104- "actions": [
105- "adb -s %SERIALNUMBER% root"
106- ]
107- },
108- {
109- "name": "adb devices",
110- "id": "Ubuntu.Menu.Device.ADB.devices",
111- "actions": [
112- "adb devices"
113- ]
114- },
115- {
116- "name": "adb shell setprop persist.sys.usb.config ptp,adb",
117- "id": "Ubuntu.Menu.Device.ADB.setUsbConfigPtpAdb",
118- "deviceRequired": true,
119- "actions": [
120- "%SCRIPTDIRECTORY%/device_set_persist-sys-usb-config %SERIALNUMBER%"
121- ]
122- }
123- ]
124 }
125 ]
126 }
127
128=== modified file 'share/qtcreator/ubuntu/qml/DevicesPage/DevicePage.qml'
129--- share/qtcreator/ubuntu/qml/DevicesPage/DevicePage.qml 2015-04-10 15:06:01 +0000
130+++ share/qtcreator/ubuntu/qml/DevicesPage/DevicePage.qml 2015-05-05 14:31:31 +0000
131@@ -506,14 +506,6 @@
132 anchors.right: parent.right
133
134 ListItem.Standard {
135- text:"Clone time config from Host to Device"
136- control: Button{
137- text: "Execute"
138- enabled: !deviceItemView.deviceBusy && !deviceItemView.detectionError
139- onClicked: devicesModel.triggerCloneTimeConfig(deviceId)
140- }
141- }
142- ListItem.Standard {
143 text:"Enable port forwarding"
144 control: Button{
145 text: "Execute"
146@@ -537,38 +529,6 @@
147 onClicked: devicesModel.triggerSSHConnection(deviceId)
148 }
149 }
150- ListItem.Standard {
151- text:"Restart"
152- control: Button{
153- text: "Execute"
154- enabled: !deviceItemView.deviceBusy && !deviceItemView.detectionError
155- onClicked: devicesModel.triggerReboot(deviceId)
156- }
157- }
158- ListItem.Standard {
159- text:"Restart to bootloader"
160- control: Button{
161- text: "Execute"
162- enabled: !deviceItemView.deviceBusy && !deviceItemView.detectionError
163- onClicked: devicesModel.triggerRebootBootloader(deviceId)
164- }
165- }
166- ListItem.Standard {
167- text:"Restart to recovery"
168- control: Button{
169- text: "Execute"
170- enabled: !deviceItemView.deviceBusy && !deviceItemView.detectionError
171- onClicked: devicesModel.triggerRebootRecovery(deviceId)
172- }
173- }
174- ListItem.Standard {
175- text:"Shut down"
176- control: Button{
177- text: "Execute"
178- enabled: !deviceItemView.deviceBusy && !deviceItemView.detectionError
179- onClicked: devicesModel.triggerShutdown(deviceId)
180- }
181- }
182 }
183 }
184
185
186=== removed file 'share/qtcreator/ubuntu/scripts/device_flashdaily'
187--- share/qtcreator/ubuntu/scripts/device_flashdaily 2015-05-05 07:27:20 +0000
188+++ share/qtcreator/ubuntu/scripts/device_flashdaily 1970-01-01 00:00:00 +0000
189@@ -1,37 +0,0 @@
190-#!/bin/bash
191-# Copyright 2013 Canonical Ltd.
192-#
193-# This program is free software; you can redistribute it and/or modify
194-# it under the terms of the GNU Lesser General Public License as published by
195-# the Free Software Foundation; version 2.1.
196-#
197-# This program is distributed in the hope that it will be useful,
198-# but WITHOUT ANY WARRANTY; without even the implied warranty of
199-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
200-# GNU Lesser General Public License for more details.
201-#
202-# You should have received a copy of the GNU Lesser General Public License
203-# along with this program. If not, see <http://www.gnu.org/licenses/>.
204-#
205-# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
206-
207-. `dirname $0`/functions.inc
208-
209-if [[ `does_device_hw_match_image_hw` != "1" ]]; then
210- IMAGE_HARDWARE=`device_image_hardware`
211- DEVICE_HARDWARE=`device_hardware`
212- echo
213- echo " WARNING! Device image hardware version"
214- echo " does not match the detected device hardware."
215- echo
216- echo -n " Device Image Version: "
217- echo ${IMAGE_HARDWARE}
218- echo -n " Device Version: "
219- echo ${DEVICE_HARDWARE}
220- echo
221- echo " In order to flash your device, you must do it manually:"
222- echo " ubuntu-device-flash --channel=devel-proposed --serial=${SERIALNUMBER}"
223- echo
224-else
225- x-terminal-emulator -e "bash -ic 'ubuntu-device-flash --channel=devel-proposed --serial=${SERIALNUMBER}'"
226-fi
227
228=== removed file 'share/qtcreator/ubuntu/scripts/device_flashdaily_bootstrap'
229--- share/qtcreator/ubuntu/scripts/device_flashdaily_bootstrap 2015-05-05 07:27:20 +0000
230+++ share/qtcreator/ubuntu/scripts/device_flashdaily_bootstrap 1970-01-01 00:00:00 +0000
231@@ -1,37 +0,0 @@
232-#!/bin/bash
233-# Copyright 2013 Canonical Ltd.
234-#
235-# This program is free software; you can redistribute it and/or modify
236-# it under the terms of the GNU Lesser General Public License as published by
237-# the Free Software Foundation; version 2.1.
238-#
239-# This program is distributed in the hope that it will be useful,
240-# but WITHOUT ANY WARRANTY; without even the implied warranty of
241-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
242-# GNU Lesser General Public License for more details.
243-#
244-# You should have received a copy of the GNU Lesser General Public License
245-# along with this program. If not, see <http://www.gnu.org/licenses/>.
246-#
247-# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
248-
249-. `dirname $0`/functions.inc
250-
251-if [[ `does_device_hw_match_image_hw` != "1" ]]; then
252- IMAGE_HARDWARE=`device_image_hardware`
253- DEVICE_HARDWARE=`device_hardware`
254- echo
255- echo " WARNING! Device image hardware version"
256- echo " does not match the detected device hardware."
257- echo
258- echo -n " Device Image Version: "
259- echo \"${IMAGE_HARDWARE}\"
260- echo -n " Device Version: "
261- echo \"${DEVICE_HARDWARE}\"
262- echo
263- echo " In order to flash your device, you must do it manually:"
264- echo " ubuntu-device-flash --channel=devel-proposed --serial=${SERIALNUMBER} --bootstrap"
265- echo
266-else
267- x-terminal-emulator -e "bash -ic 'ubuntu-device-flash --channel=devel-proposed --serial=${SERIALNUMBER} --bootstrap'"
268-fi
269
270=== removed file 'share/qtcreator/ubuntu/scripts/device_reboot'
271--- share/qtcreator/ubuntu/scripts/device_reboot 2013-08-08 07:26:20 +0000
272+++ share/qtcreator/ubuntu/scripts/device_reboot 1970-01-01 00:00:00 +0000
273@@ -1,20 +0,0 @@
274-#!/bin/bash
275-# Copyright 2013 Canonical Ltd.
276-#
277-# This program is free software; you can redistribute it and/or modify
278-# it under the terms of the GNU Lesser General Public License as published by
279-# the Free Software Foundation; version 2.1.
280-#
281-# This program is distributed in the hope that it will be useful,
282-# but WITHOUT ANY WARRANTY; without even the implied warranty of
283-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
284-# GNU Lesser General Public License for more details.
285-#
286-# You should have received a copy of the GNU Lesser General Public License
287-# along with this program. If not, see <http://www.gnu.org/licenses/>.
288-#
289-# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
290-
291-. `dirname $0`/functions.inc
292-
293-device_reboot
294
295=== removed file 'share/qtcreator/ubuntu/scripts/device_reboot2bootloader'
296--- share/qtcreator/ubuntu/scripts/device_reboot2bootloader 2013-08-08 07:26:20 +0000
297+++ share/qtcreator/ubuntu/scripts/device_reboot2bootloader 1970-01-01 00:00:00 +0000
298@@ -1,21 +0,0 @@
299-#!/bin/bash
300-# Copyright 2013 Canonical Ltd.
301-#
302-# This program is free software; you can redistribute it and/or modify
303-# it under the terms of the GNU Lesser General Public License as published by
304-# the Free Software Foundation; version 2.1.
305-#
306-# This program is distributed in the hope that it will be useful,
307-# but WITHOUT ANY WARRANTY; without even the implied warranty of
308-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
309-# GNU Lesser General Public License for more details.
310-#
311-# You should have received a copy of the GNU Lesser General Public License
312-# along with this program. If not, see <http://www.gnu.org/licenses/>.
313-#
314-# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
315-
316-. `dirname $0`/functions.inc
317-
318-device_reboot_bootloader
319-
320
321=== removed file 'share/qtcreator/ubuntu/scripts/device_reboot2recovery'
322--- share/qtcreator/ubuntu/scripts/device_reboot2recovery 2013-08-08 07:26:20 +0000
323+++ share/qtcreator/ubuntu/scripts/device_reboot2recovery 1970-01-01 00:00:00 +0000
324@@ -1,20 +0,0 @@
325-#!/bin/bash
326-# Copyright 2013 Canonical Ltd.
327-#
328-# This program is free software; you can redistribute it and/or modify
329-# it under the terms of the GNU Lesser General Public License as published by
330-# the Free Software Foundation; version 2.1.
331-#
332-# This program is distributed in the hope that it will be useful,
333-# but WITHOUT ANY WARRANTY; without even the implied warranty of
334-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
335-# GNU Lesser General Public License for more details.
336-#
337-# You should have received a copy of the GNU Lesser General Public License
338-# along with this program. If not, see <http://www.gnu.org/licenses/>.
339-#
340-# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
341-
342-. `dirname $0`/functions.inc
343-
344-device_reboot_recovery
345
346=== removed file 'share/qtcreator/ubuntu/scripts/device_rootshell'
347--- share/qtcreator/ubuntu/scripts/device_rootshell 2013-08-08 07:26:20 +0000
348+++ share/qtcreator/ubuntu/scripts/device_rootshell 1970-01-01 00:00:00 +0000
349@@ -1,20 +0,0 @@
350-#!/bin/bash
351-# Copyright 2013 Canonical Ltd.
352-#
353-# This program is free software; you can redistribute it and/or modify
354-# it under the terms of the GNU Lesser General Public License as published by
355-# the Free Software Foundation; version 2.1.
356-#
357-# This program is distributed in the hope that it will be useful,
358-# but WITHOUT ANY WARRANTY; without even the implied warranty of
359-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
360-# GNU Lesser General Public License for more details.
361-#
362-# You should have received a copy of the GNU Lesser General Public License
363-# along with this program. If not, see <http://www.gnu.org/licenses/>.
364-#
365-# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
366-
367-. `dirname $0`/functions.inc
368-
369-adb_shell
370
371=== removed file 'share/qtcreator/ubuntu/scripts/device_set_persist-sys-usb-config'
372--- share/qtcreator/ubuntu/scripts/device_set_persist-sys-usb-config 2013-08-08 07:26:20 +0000
373+++ share/qtcreator/ubuntu/scripts/device_set_persist-sys-usb-config 1970-01-01 00:00:00 +0000
374@@ -1,20 +0,0 @@
375-#!/bin/bash
376-# Copyright 2013 Canonical Ltd.
377-#
378-# This program is free software; you can redistribute it and/or modify
379-# it under the terms of the GNU Lesser General Public License as published by
380-# the Free Software Foundation; version 2.1.
381-#
382-# This program is distributed in the hope that it will be useful,
383-# but WITHOUT ANY WARRANTY; without even the implied warranty of
384-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
385-# GNU Lesser General Public License for more details.
386-#
387-# You should have received a copy of the GNU Lesser General Public License
388-# along with this program. If not, see <http://www.gnu.org/licenses/>.
389-#
390-# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
391-
392-. `dirname $0`/functions.inc
393-
394-adb_shell setprop persist.sys.usb.config ptp,adb
395
396=== removed file 'share/qtcreator/ubuntu/scripts/device_shutdown'
397--- share/qtcreator/ubuntu/scripts/device_shutdown 2013-08-08 07:26:20 +0000
398+++ share/qtcreator/ubuntu/scripts/device_shutdown 1970-01-01 00:00:00 +0000
399@@ -1,20 +0,0 @@
400-#!/bin/bash
401-# Copyright 2013 Canonical Ltd.
402-#
403-# This program is free software; you can redistribute it and/or modify
404-# it under the terms of the GNU Lesser General Public License as published by
405-# the Free Software Foundation; version 2.1.
406-#
407-# This program is distributed in the hope that it will be useful,
408-# but WITHOUT ANY WARRANTY; without even the implied warranty of
409-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
410-# GNU Lesser General Public License for more details.
411-#
412-# You should have received a copy of the GNU Lesser General Public License
413-# along with this program. If not, see <http://www.gnu.org/licenses/>.
414-#
415-# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
416-
417-. `dirname $0`/functions.inc
418-
419-device_shutdown
420
421=== removed file 'share/qtcreator/ubuntu/scripts/device_time_clone'
422--- share/qtcreator/ubuntu/scripts/device_time_clone 2013-08-08 07:26:20 +0000
423+++ share/qtcreator/ubuntu/scripts/device_time_clone 1970-01-01 00:00:00 +0000
424@@ -1,29 +0,0 @@
425-#!/bin/bash
426-# Copyright 2013 Canonical Ltd.
427-#
428-# This program is free software; you can redistribute it and/or modify
429-# it under the terms of the GNU Lesser General Public License as published by
430-# the Free Software Foundation; version 2.1.
431-#
432-# This program is distributed in the hope that it will be useful,
433-# but WITHOUT ANY WARRANTY; without even the implied warranty of
434-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
435-# GNU Lesser General Public License for more details.
436-#
437-# You should have received a copy of the GNU Lesser General Public License
438-# along with this program. If not, see <http://www.gnu.org/licenses/>.
439-#
440-# Author: Zoltán Balogh <zoltan.balogh@canonical.com>
441-# Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
442-
443-. `dirname $0`/functions.inc
444-
445-LOCAL_DATE=`date +%Y%m%d`
446-LOCAL_TIME=`date +%T`
447-TIMEZONE=`cat /etc/timezone`
448-
449-adb_shell sed -i "s#.*/.*#${TIMEZONE=}#" /etc/timezone
450-adb_shell dpkg-reconfigure --frontend noninteractive tzdata > /dev/null
451-adb_shell date +%Y%m%d -s "${LOCAL_DATE}" > /dev/null
452-adb_shell date +%T -s "${LOCAL_TIME}" > /dev/null
453-
454
455=== modified file 'share/qtcreator/ubuntu/scripts/functions.inc'
456--- share/qtcreator/ubuntu/scripts/functions.inc 2014-11-11 12:00:41 +0000
457+++ share/qtcreator/ubuntu/scripts/functions.inc 2015-05-05 14:31:31 +0000
458@@ -108,22 +108,6 @@
459 fi
460 }
461
462-function device_reboot {
463- adb_shell reboot
464-}
465-
466-function device_reboot_bootloader {
467- adb -s ${SERIALNUMBER} reboot-bootloader
468-}
469-
470-function device_reboot_recovery {
471- adb -s ${SERIALNUMBER} reboot recovery
472-}
473-
474-function device_shutdown {
475- adb_shell shutdown -h now
476-}
477-
478 function wait_for_network_state_switch_on {
479 local RESULT=`device_network_state_connected`
480 while [[ "$RESULT" -eq "0" ]]; do
481
482=== removed file 'share/qtcreator/ubuntu/scripts/qtc_cmakeproject_click_create'
483--- share/qtcreator/ubuntu/scripts/qtc_cmakeproject_click_create 2014-02-05 22:28:56 +0000
484+++ share/qtcreator/ubuntu/scripts/qtc_cmakeproject_click_create 1970-01-01 00:00:00 +0000
485@@ -1,102 +0,0 @@
486-#!/bin/bash
487-# Copyright 2014 Canonical Ltd.
488-#
489-# This program is free software; you can redistribute it and/or modify
490-# it under the terms of the GNU Lesser General Public License as published by
491-# the Free Software Foundation; version 2.1.
492-#
493-# This program is distributed in the hope that it will be useful,
494-# but WITHOUT ANY WARRANTY; without even the implied warranty of
495-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
496-# GNU Lesser General Public License for more details.
497-#
498-# You should have received a copy of the GNU Lesser General Public License
499-# along with this program. If not, see <http://www.gnu.org/licenses/>.
500-#
501-# Author: Benjamin Zeller <benjamin.zeller@canonical.com>
502-
503-USAGE="Usage: $0 targetArch targetFramework targetSeries projectDir projectName"
504-
505-if [ $# -lt 3 ]; then
506- echo "$USAGE"
507- exit 1
508-fi
509-
510-ARCH=$1
511-shift
512-FRAMEWORK=$1
513-shift
514-SERIES=$1
515-shift
516-PROJECTDIR=$1
517-shift
518-PROJECTNAME=$1
519-shift
520-
521-echo "Building package for ${PROJECTNAME}"
522-
523-SCRIPTPATH=$(dirname $0)
524-BUILDDIR="${FRAMEWORK}-${ARCH}"
525-INSTALLDIR="click_package"
526-
527-#make sure the project was already built, if not build it
528-if [ ! -d ${BUILDDIR} ]
529-then
530- mkdir ${BUILDDIR}
531-fi
532-
533-cd ${BUILDDIR}
534-
535-#make sure the binaries are up to date and installed in our click directory
536-set -e
537-${SCRIPTPATH}/qtc_chroot_cmake ${ARCH} ${FRAMEWORK} ${SERIES} ${PROJECTDIR}
538-${SCRIPTPATH}/qtc_fixmoc ${ARCH} ${FRAMEWORK} ${SERIES}
539-${SCRIPTPATH}/qtc_chroot_make ${ARCH} ${FRAMEWORK} ${SERIES}
540-
541-#cleanup the install dir
542-rm -rf ${INSTALLDIR}
543-
544-#install the click package tree
545-${SCRIPTPATH}/qtc_chroot_make ${ARCH} ${FRAMEWORK} ${SERIES} DESTDIR=${INSTALLDIR} install
546-
547-#make sure the manifest file contains our arch
548-sed -i 's/"architecture".*,/"architecture": "'${ARCH}'",/g' ${INSTALLDIR}/manifest.json
549-set +e
550-
551-pushd .
552-cd ${INSTALLDIR}
553-
554-DESKTOPFILE=$(${SCRIPTPATH}/qtc_find_desktopfile ${PROJECTNAME})
555-if [[ ! $? -eq 0 ]]
556-then
557-echo " /!\\ no desktop file found /!\\"
558-echo " You will have to create one."
559-exit 1
560-fi
561-
562-echo "Found a desktopfile: ${DESKTOPFILE}"
563-
564-${SCRIPTPATH}/qtc_fix_desktop_comment ${DESKTOPFILE}
565-popd
566-
567-#create the package
568-click build ${INSTALLDIR} > /tmp/click.log 2> /tmp/click.err
569-
570-# lets check the results
571-if [[ ${?} -eq 0 ]]; then
572- echo
573- echo "Package has been created to"
574- PACKAGENAME=`cat /tmp/click.log|sed "s/.*\('.*'\).*/\1/" | sed "s/'//g" | sed "s/.\///" | xargs -ICLICKPACKAGE echo $(pwd)/CLICKPACKAGE`
575- echo "$PACKAGENAME"
576-else
577- echo
578- echo "There was some failure when creating the package."
579- echo "See /tmp/click.err for details."
580- echo
581-
582- cd ..
583- exit 1
584-fi
585-
586-#back into working dir
587-cd ..
588
589=== removed file 'share/qtcreator/ubuntu/scripts/qtc_cmakeproject_click_createanddeploy'
590--- share/qtcreator/ubuntu/scripts/qtc_cmakeproject_click_createanddeploy 2014-02-05 22:28:56 +0000
591+++ share/qtcreator/ubuntu/scripts/qtc_cmakeproject_click_createanddeploy 1970-01-01 00:00:00 +0000
592@@ -1,48 +0,0 @@
593-#!/bin/bash
594-# Copyright 2013 Canonical Ltd.
595-#
596-# This program is free software; you can redistribute it and/or modify
597-# it under the terms of the GNU Lesser General Public License as published by
598-# the Free Software Foundation; version 2.1.
599-#
600-# This program is distributed in the hope that it will be useful,
601-# but WITHOUT ANY WARRANTY; without even the implied warranty of
602-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
603-# GNU Lesser General Public License for more details.
604-#
605-# You should have received a copy of the GNU Lesser General Public License
606-# along with this program. If not, see <http://www.gnu.org/licenses/>.
607-#
608-# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
609-
610-. `dirname $0`/functions.inc
611-shift
612-
613-FOLDERNAME=$1
614-shift
615-TARGET_DEVICE=$1
616-shift
617-TARGET_DEVICE_PORT=$1
618-shift
619-TARGET_DEVICE_HOME=$1
620-shift
621-TARGET_DEVICE_USERNAME=$1
622-shift
623-
624-
625-set +e
626-echo "Lets create the click package for the project using cmake."
627-echo "${@}"
628-${SCRIPTPATH}/qtc_cmakeproject_click_create $@ > /tmp/qtc_click_create.log
629-
630-if [[ $? -eq 0 ]]; then
631- set -e
632- PACKAGENAME=`cat /tmp/qtc_click_create.log|tail -n1`
633- echo "$PACKAGENAME has been created."
634-else
635- cat /tmp/qtc_click_create.log
636- exit -1
637-fi
638-
639-${SCRIPTPATH}/qtc_project_click_deploy ${SERIALNUMBER} ${PACKAGENAME} ${TARGET_DEVICE} ${TARGET_DEVICE_PORT} ${TARGET_DEVICE_HOME} ${TARGET_DEVICE_USERNAME}
640-
641
642=== removed file 'share/qtcreator/ubuntu/scripts/qtc_device_close_all_apps'
643--- share/qtcreator/ubuntu/scripts/qtc_device_close_all_apps 2013-08-08 07:26:20 +0000
644+++ share/qtcreator/ubuntu/scripts/qtc_device_close_all_apps 1970-01-01 00:00:00 +0000
645@@ -1,48 +0,0 @@
646-#!/bin/bash
647-# Copyright 2013 Canonical Ltd.
648-#
649-# This program is free software; you can redistribute it and/or modify
650-# it under the terms of the GNU Lesser General Public License as published by
651-# the Free Software Foundation; version 2.1.
652-#
653-# This program is distributed in the hope that it will be useful,
654-# but WITHOUT ANY WARRANTY; without even the implied warranty of
655-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
656-# GNU Lesser General Public License for more details.
657-#
658-# You should have received a copy of the GNU Lesser General Public License
659-# along with this program. If not, see <http://www.gnu.org/licenses/>.
660-#
661-# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
662-
663-. `dirname $0`/functions.inc
664-
665-APPLICATION=$2
666-
667-if [[ -z ${APPLICATION} ]]; then
668- echo "Close all instances of running applications."
669- adb_shell kill -s 9 \`pidof qmlscene\`
670-else
671- echo "Close the ${APPLICATION}."
672- set +e
673- IS_MOUNTED=`adb_shell mount | grep proc`
674- set -e
675- if [[ -z ${IS_MOUNTED} ]]; then
676- adb_shell mount -t proc proc /proc
677- fi
678-
679- PID_OF_APP=`adb_shell COLUMNS=1000 ps -ef|grep qmlscene|grep ${APPLICATION}|awk '{print $2}'`
680- if [[ -z $PID_OF_APP ]]; then
681- echo " *no running instances of application*"
682- exit 1
683- fi
684-
685- echo " * application pid(s) is ${PID_OF_APP}."
686-
687- adb_shell kill -s 9 ${PID_OF_APP}
688-
689- if [[ -z ${IS_MOUNTED} ]]; then
690- adb_shell umount /proc
691- fi
692- echo "Application has been closed."
693-fi
694
695=== removed file 'share/qtcreator/ubuntu/scripts/qtc_device_deploy_package'
696--- share/qtcreator/ubuntu/scripts/qtc_device_deploy_package 2013-09-16 12:16:38 +0000
697+++ share/qtcreator/ubuntu/scripts/qtc_device_deploy_package 1970-01-01 00:00:00 +0000
698@@ -1,68 +0,0 @@
699-#!/bin/bash
700-# Copyright 2013 Canonical Ltd.
701-#
702-# This program is free software; you can redistribute it and/or modify
703-# it under the terms of the GNU Lesser General Public License as published by
704-# the Free Software Foundation; version 2.1.
705-#
706-# This program is distributed in the hope that it will be useful,
707-# but WITHOUT ANY WARRANTY; without even the implied warranty of
708-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
709-# GNU Lesser General Public License for more details.
710-#
711-# You should have received a copy of the GNU Lesser General Public License
712-# along with this program. If not, see <http://www.gnu.org/licenses/>.
713-#
714-# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
715-
716-. `dirname $0`/functions.inc
717-
718-PACKAGE=$2
719-TARGET_DEVICE=$3
720-TARGET_DEVICE_PORT=$4
721-TARGET_DEVICE_HOME=$5
722-
723-echo
724-echo "Deploying package to device with serial number of ${SERIALNUMBER}."
725-echo "Using SSH identity from ${SSHIDENTITY}."
726-echo
727-
728-USAGE="$0 [serialnumber] [package] [target_device] [target_device_port] [target_device_home]"
729-
730-if [[ -z $PACKAGE || -z $TARGET_DEVICE || -z $TARGET_DEVICE_PORT || -z $TARGET_DEVICE_HOME ]]; then
731- echo ${USAGE}
732- exit
733-fi
734-
735-# lets make the ssh port forwarding back on, as the developer might have rebooted the device
736-echo "do port forwarding"
737-set +e
738-${SCRIPTPATH}/device_portforward ${TARGET_DEVICE_PORT} 3768
739-set -e
740-echo "done"
741-# check if we have .pro files or cpp/h files, if we do lets exit, as this deployment method is for QML projects
742-H_FILES=`find . -name *.h`
743-CPP_FILES=`find . -name *.cpp`
744-
745-if [[ -z ${H_FILES} && -z ${CPP_FILES} ]]; then
746- echo "Detected: QML project"
747-else
748- echo "Detected: Hybrid project"
749- echo " -> This deployment method is meant for QML projects only."
750- echo " Use Tools > Ubuntu Touch > C++"
751- exit 1
752-fi
753-
754-# Case lowered due to bug #1213902
755-PLAIN_PACKAGE=`basename ${PACKAGE,,}`
756-SCRIPTPATH=`dirname $0`
757-
758-SCP="scp -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -P${TARGET_DEVICE_PORT}"
759-SSH="ssh -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p${TARGET_DEVICE_PORT} ${TARGET_DEVICE}"
760-
761-# -- actions --
762-$SCP ${PACKAGE} ${TARGET_DEVICE}:${TARGET_DEVICE_HOME}
763-adb_shell gdebi --n ${TARGET_DEVICE_HOME}/${PLAIN_PACKAGE}
764-
765-# Commented out due to bug #1213902
766-#$SCRIPTPATH/qtc_device_restart_appslense ${SERIALNUMBER}
767
768=== removed file 'share/qtcreator/ubuntu/scripts/qtc_device_restart_appslense'
769--- share/qtcreator/ubuntu/scripts/qtc_device_restart_appslense 2013-08-08 07:26:20 +0000
770+++ share/qtcreator/ubuntu/scripts/qtc_device_restart_appslense 1970-01-01 00:00:00 +0000
771@@ -1,22 +0,0 @@
772-#!/bin/bash
773-# Copyright 2013 Canonical Ltd.
774-#
775-# This program is free software; you can redistribute it and/or modify
776-# it under the terms of the GNU Lesser General Public License as published by
777-# the Free Software Foundation; version 2.1.
778-#
779-# This program is distributed in the hope that it will be useful,
780-# but WITHOUT ANY WARRANTY; without even the implied warranty of
781-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
782-# GNU Lesser General Public License for more details.
783-#
784-# You should have received a copy of the GNU Lesser General Public License
785-# along with this program. If not, see <http://www.gnu.org/licenses/>.
786-#
787-# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
788-
789-. `dirname $0`/functions.inc
790-
791-# -- actions --
792-adb_shell kill -s 9 \`pidof unity-applications-daemon\`
793-adb_shell bash -c "/usr/lib/arm-linux-gnueabihf/unity-lens-applications/unity-applications-daemon > /dev/null &"
794
795=== removed file 'share/qtcreator/ubuntu/scripts/qtc_device_run_app'
796--- share/qtcreator/ubuntu/scripts/qtc_device_run_app 2014-05-21 11:37:19 +0000
797+++ share/qtcreator/ubuntu/scripts/qtc_device_run_app 1970-01-01 00:00:00 +0000
798@@ -1,124 +0,0 @@
799-#!/bin/bash
800-# Copyright 2013 Canonical Ltd.
801-#
802-# This program is free software; you can redistribute it and/or modify
803-# it under the terms of the GNU Lesser General Public License as published by
804-# the Free Software Foundation; version 2.1.
805-#
806-# This program is distributed in the hope that it will be useful,
807-# but WITHOUT ANY WARRANTY; without even the implied warranty of
808-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
809-# GNU Lesser General Public License for more details.
810-#
811-# You should have received a copy of the GNU Lesser General Public License
812-# along with this program. If not, see <http://www.gnu.org/licenses/>.
813-#
814-# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
815-
816-. `dirname $0`/functions.inc
817-
818-APP_LAUNCHER=$2
819-FOLDERNAME=$3
820-DESKTOP_FILENAME=$4
821-MAIN_QML=$5
822-TARGET_DEVICE_HOME=$6
823-TARGET_DEVICE=$7
824-TARGET_DEVICE_PORT=$8
825-# potential prefix that should be prepended to the target app path
826-shift
827-APP_LAUNCH_PREFIX=$8
828-shift
829-EXTRA_COMMAND_LINE_ARGS=$8
830-
831-APP_ID=$(echo ${DESKTOP_FILENAME}|sed "s/\.desktop//")
832-
833-USAGE="$0 [serialnumber] [app_launcher] [foldername] [desktop_filename] [main_qml] [target_device_home] [target_device] [target_device_port] [optional_app_launch_prefix] [optional_extra_command_line_args]"
834-
835-
836-if [[ -z ${FOLDERNAME} ]]; then
837- echo ${USAGE}
838- exit
839-fi
840-
841-if [[ ! -e "${FOLDERNAME}/${DESKTOP_FILENAME}" ]]; then
842- echo "Reading desktop file from manifest"
843- DESKTOP_FILENAME=$(grep desktop ${FOLDERNAME}/manifest.json | cut -d: -f2 | sed "s/\"//g" | tr -d ' ')
844- echo "Trying ${PWD}/${FOLDERNAME}/${DESKTOP_FILENAME}"
845-
846- if [[ ! -e "${FOLDERNAME}/${DESKTOP_FILENAME}" ]]; then
847- echo "No desktop file found";
848- exit 1;
849- fi
850-fi
851-
852-if [[ -z ${APP_LAUNCHER} ]]; then
853- APP_LAUNCHER=qmlscene
854-fi
855-
856-if [[ -z ${MAIN_QML} ]]; then
857- MAIN_QML=main.qml
858-fi
859-
860-if [[ -z ${TARGET_DEVICE_PORT} ]]; then
861- TARGET_DEVICE_PORT=2222
862-fi
863-
864-if [[ -z ${TARGET_DEVICE} ]]; then
865- TARGET_DEVICE=phablet@127.0.0.1
866-fi
867-
868-if [[ -z ${TARGET_DEVICE_HOME} ]]; then
869- TARGET_DEVICE_HOME=/home/phablet/dev_tmp
870-fi
871-
872-SSH_CRED="ssh -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p${TARGET_DEVICE_PORT}"
873-SCP="scp -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -P${TARGET_DEVICE_PORT}"
874-SSH="ssh -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p${TARGET_DEVICE_PORT} ${TARGET_DEVICE}"
875-RSYNC="rsync --delete -avzP -e"
876-
877-# get dbus session addrss from the device
878-DBUS_SESSION_BUS_ADDRESS=`$SSH "cat ~/.cache/upstart/dbus-session|grep DBUS_SESSION_BUS_ADDRESS"`
879-
880-#read additional arguments from the desktop file
881-echo "Trying to read additional arguments from ${FOLDERNAME}/${DESKTOP_FILENAME}"
882-ARGS_FROM_DESKTOP=
883-IFS=', ' read -a ARGUMENTS <<< $(cat "${FOLDERNAME}/${DESKTOP_FILENAME}" | grep Exec | cut -d = -f 2)
884-LIMIT=${#ARGUMENTS[@]}
885-for ((a=1; a <= LIMIT ; a++)) # Double parentheses, and naked "LIMIT"
886-do
887- #if we have a relative path, prefix it with the target home path
888- if [[ ${ARGUMENTS[$a]} == "-I" ]]
889- then
890- IMPORT_PATH=${ARGUMENTS[$a+1]}
891- if [[ "${IMPORT_PATH}" != /* ]]
892- then
893- IMPORT_PATH=$(echo "${IMPORT_PATH}" | sed "s;\./;;" | sed "s;^;${TARGET_DEVICE_HOME}\/${APP_ID}\/;")
894- else
895- echo "Please use only relative paths for imports in the desktop file"
896- exit 1
897- fi
898- ARGS_FROM_DESKTOP="-I ${IMPORT_PATH} ${ARGS_FROM_DESKTOP}"
899- fi
900-done
901-echo "IMPORT: ${ARGS_FROM_DESKTOP}"
902-
903-DESKTOP_FILE_TARGET="${TARGET_DEVICE_HOME}/../.local/share/applications/$(basename ${DESKTOP_FILENAME})"
904-
905-COMMAND="cp ${TARGET_DEVICE_HOME}/${FOLDERNAME}/${DESKTOP_FILENAME} ${DESKTOP_FILE_TARGET} && test -f /etc/ubuntu-touch-session.d/\$(getprop ro.product.device).conf && for myenv in \$(cat /etc/ubuntu-touch-session.d/\$(getprop ro.product.device).conf); do `echo \"export\" \\\$myenv`; done ; export ${DBUS_SESSION_BUS_ADDRESS=}; APP_ID=${APP_ID} ${APP_LAUNCHER} ${ARGS_FROM_DESKTOP} ${APP_LAUNCH_PREFIX}${TARGET_DEVICE_HOME}/${APP_ID}/${MAIN_QML} --desktop_file_hint=${DESKTOP_FILE_TARGET} ${EXTRA_COMMAND_LINE_ARGS}"
906-echo "Going to execute: ${COMMAND}"
907-
908-# make sure that the device has the target directory
909-$SSH mkdir -p ${TARGET_DEVICE_HOME}
910-$SSH mkdir -p ${TARGET_DEVICE_HOME}/${APP_ID}
911-
912-# transfer the package to the device
913-$RSYNC "${SSH_CRED}" ${FOLDERNAME}/ ${TARGET_DEVICE}:${TARGET_DEVICE_HOME}/${APP_ID}
914-
915-echo "Starting the application .... "
916-
917-# fix the desktopfile Exec path
918-$SSH sed -i "s/^Exec=.*//g" ${TARGET_DEVICE_HOME}/${APP_ID}/${DESKTOP_FILENAME}
919-$SSH "echo 'Exec=/usr/bin/${COMMAND}' >> ${TARGET_DEVICE_HOME}/${APP_ID}/${DESKTOP_FILENAME}"
920-
921-# run the application on the device
922-$SSH "bash -ic 'source /etc/profile; ${COMMAND}'"
923
924=== removed file 'share/qtcreator/ubuntu/scripts/qtc_device_run_app_click'
925--- share/qtcreator/ubuntu/scripts/qtc_device_run_app_click 2014-05-21 16:02:55 +0000
926+++ share/qtcreator/ubuntu/scripts/qtc_device_run_app_click 1970-01-01 00:00:00 +0000
927@@ -1,47 +0,0 @@
928-#!/bin/bash
929-# Copyright 2014 Canonical Ltd.
930-#
931-# This program is free software; you can redistribute it and/or modify
932-# it under the terms of the GNU Lesser General Public License as published by
933-# the Free Software Foundation; version 2.1.
934-#
935-# This program is distributed in the hope that it will be useful,
936-# but WITHOUT ANY WARRANTY; without even the implied warranty of
937-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
938-# GNU Lesser General Public License for more details.
939-#
940-# You should have received a copy of the GNU Lesser General Public License
941-# along with this program. If not, see <http://www.gnu.org/licenses/>.
942-#
943-# Author: Benjamin Zeller <benjamin.zeller@canonical.com>
944-
945-. `dirname $0`/functions.inc
946-
947-FOLDERNAME=$2
948-TARGET_DEVICE=$3
949-TARGET_DEVICE_PORT=$4
950-TARGET_DEVICE_HOME=$5
951-
952-USAGE="$0 [serialnumber] [foldername] [target_device] [target_device_port] [target_device_home]"
953-
954-set +e
955-
956-#first build on the device
957-${SCRIPTPATH}/qtc_project_click_create ${FOLDERNAME} > /tmp/qtc_click_create.log
958-
959-if [[ $? -eq 0 ]]; then
960- set -e
961- PACKAGENAME=$(cat /tmp/qtc_click_create.log | tail -n1)
962- echo "$PACKAGENAME has been created."
963-else
964- cat /tmp/qtc_click_create.log
965- exit -1
966-fi
967-
968-SCP="scp -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -P${TARGET_DEVICE_PORT}"
969-SSH="ssh -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p${TARGET_DEVICE_PORT} ${TARGET_DEVICE}"
970-
971-adb -s ${SERIALNUMBER} push "${SCRIPTPATH}/qtc_device_applaunch.py" /tmp
972-adb -s ${SERIALNUMBER} push "${PACKAGENAME}" /tmp
973-$SSH "bash -ic 'source /etc/profile; /tmp/qtc_device_applaunch.py /tmp/$(basename ${PACKAGENAME})'"
974-
975
976=== removed file 'share/qtcreator/ubuntu/scripts/qtc_device_run_click'
977=== removed file 'share/qtcreator/ubuntu/scripts/qtc_project_click_create'
978--- share/qtcreator/ubuntu/scripts/qtc_project_click_create 2014-02-05 18:28:02 +0000
979+++ share/qtcreator/ubuntu/scripts/qtc_project_click_create 1970-01-01 00:00:00 +0000
980@@ -1,116 +0,0 @@
981-#!/bin/bash
982-# Copyright 2013 Canonical Ltd.
983-#
984-# This program is free software; you can redistribute it and/or modify
985-# it under the terms of the GNU Lesser General Public License as published by
986-# the Free Software Foundation; version 2.1.
987-#
988-# This program is distributed in the hope that it will be useful,
989-# but WITHOUT ANY WARRANTY; without even the implied warranty of
990-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
991-# GNU Lesser General Public License for more details.
992-#
993-# You should have received a copy of the GNU Lesser General Public License
994-# along with this program. If not, see <http://www.gnu.org/licenses/>.
995-#
996-# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
997-
998-SCRIPTPATH=`dirname $0`
999-
1000-PROJECTPATH=$1
1001-
1002-if [[ -z ${PROJECTPATH} ]]; then
1003- PROJECTPATH=`pwd`
1004-fi
1005-
1006-echo
1007-echo "Click packaging project in ${PROJECTPATH}."
1008-echo
1009-
1010-pushd ${PROJECTPATH} >> /dev/null
1011- echo
1012- echo "Searching for desktop file.."
1013- QMLPROJECT=`ls *.qmlproject|sed "s/\.qmlproject//"`
1014-
1015- DESKTOPFILE=$( ${SCRIPTPATH}/qtc_find_desktopfile ${QMLPROJECT} )
1016- if [[ ! $? -eq 0 ]]
1017- then
1018- echo " /!\\ no desktop file found /!\\"
1019- echo " You will have to create one."
1020- exit 1
1021- fi
1022-
1023- echo "Found a desktopfile: ${DESKTOPFILE}"
1024-
1025- # lets check if the manifest.json exists
1026- if [[ -f manifest.json ]]; then
1027- echo
1028- echo "Found manifest.json."
1029- else
1030- echo
1031- echo " /!\\ manifest.json does not exist /!\\"
1032- echo " You will have to create one using the Packaging tab."
1033- exit -1
1034- fi
1035-
1036- # determine MAINQML
1037-
1038- MAINQML=`cat ${QMLPROJECT}.qmlproject|grep mainFile|sed "s/.*\(\".*\"\).*/\1/"|sed "s/\"//g"`
1039- echo "Main file is ${MAINQML}"
1040-
1041- #------------------
1042-
1043- # lets copy the original desktop file
1044- cp ${DESKTOPFILE} /tmp/${DESKTOPFILE}
1045-
1046- #fix the comment in desktop file
1047- ${SCRIPTPATH}/qtc_fix_desktop_comment ${DESKTOPFILE}
1048-
1049- # read the arguments to qmlscene
1050- QMLSCENE_ARGS=`cat ${DESKTOPFILE} | grep -o "qmlscene.*\$\@" | sed "s/\(qmlscene\|\$\@\)//g"`
1051-
1052- # lets replace the Exec line
1053- sed -i "s/^Exec=[ a-z0-9A-Z\/]*qmlscene.*/Exec=qmlscene ${QMLSCENE_ARGS} \$@ ${MAINQML}/g" ${DESKTOPFILE}
1054-
1055- # lets build the package
1056- cd ..
1057-
1058- # copy project files to build directory
1059-
1060- RESULTPATH=`pwd`
1061- BUILDPATH=${PROJECTPATH}_build
1062- rm -Rf ${BUILDPATH}
1063- mkdir -p ${BUILDPATH}
1064-
1065- # read .excludes file from the projectpath
1066- PROJECT_EXCLUDES="--exclude .bzr --exclude .git --exclude .hg --exclude .svn --exclude *.qmlproject --exclude *.user --exclude tests --exclude Makefile --exclude .excludes"
1067- if [[ -f ${PROJECTPATH}/.excludes ]]; then
1068- for EXCLUDE in `cat ${PROJECTPATH}/.excludes`; do
1069- PROJECT_EXCLUDES+=" --exclude ${EXCLUDE}"
1070- done
1071- fi
1072-
1073- # we are printing also a filelist to the stdout which files are going to be inside the package
1074- echo
1075- rsync -avh ${PROJECT_EXCLUDES} ${PROJECTPATH}/* ${BUILDPATH}/
1076-
1077- # build the build path
1078- click build ${BUILDPATH} > /tmp/click.log 2> /tmp/click.err
1079-
1080- # lets check the results
1081- if [[ ${?} -eq 0 ]]; then
1082- echo
1083- echo "Package has been created to"
1084- PACKAGENAME=`cat /tmp/click.log|sed "s/.*\('.*'\).*/\1/" | sed "s/'//g" | sed "s/.\///" | xargs -ICLICKPACKAGE echo ${RESULTPATH}/CLICKPACKAGE`
1085- echo "$PACKAGENAME"
1086- else
1087- echo
1088- echo "There was some failure when creating the package."
1089- echo "See /tmp/click.err for details."
1090- echo
1091- fi
1092- cd - > /dev/null
1093-
1094- # restore the original desktop file
1095- mv /tmp/${DESKTOPFILE} ${DESKTOPFILE}
1096-popd > /dev/null
1097
1098=== removed file 'share/qtcreator/ubuntu/scripts/qtc_project_click_createanddeploy'
1099--- share/qtcreator/ubuntu/scripts/qtc_project_click_createanddeploy 2014-02-05 22:28:56 +0000
1100+++ share/qtcreator/ubuntu/scripts/qtc_project_click_createanddeploy 1970-01-01 00:00:00 +0000
1101@@ -1,39 +0,0 @@
1102-#!/bin/bash
1103-# Copyright 2013 Canonical Ltd.
1104-#
1105-# This program is free software; you can redistribute it and/or modify
1106-# it under the terms of the GNU Lesser General Public License as published by
1107-# the Free Software Foundation; version 2.1.
1108-#
1109-# This program is distributed in the hope that it will be useful,
1110-# but WITHOUT ANY WARRANTY; without even the implied warranty of
1111-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1112-# GNU Lesser General Public License for more details.
1113-#
1114-# You should have received a copy of the GNU Lesser General Public License
1115-# along with this program. If not, see <http://www.gnu.org/licenses/>.
1116-#
1117-# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
1118-
1119-. `dirname $0`/functions.inc
1120-
1121-FOLDERNAME=$2
1122-
1123-set +e
1124-echo "Lets create the click package for the project."
1125-${SCRIPTPATH}/qtc_project_click_create ${FOLDERNAME} > /tmp/qtc_click_create.log
1126-
1127-if [[ $? -eq 0 ]]; then
1128- set -e
1129- PACKAGENAME=`cat /tmp/qtc_click_create.log|tail -n1`
1130- echo "$PACKAGENAME has been created."
1131-else
1132- cat /tmp/qtc_click_create.log
1133- exit -1
1134-fi
1135-
1136-echo "${SCRIPTPATH}/qtc_project_click_deploy"
1137-${SCRIPTPATH}/qtc_project_click_deploy $1 ${PACKAGENAME} $3 $4 $5 $6
1138-
1139-
1140-
1141
1142=== removed file 'share/qtcreator/ubuntu/scripts/qtc_project_create_package'
1143--- share/qtcreator/ubuntu/scripts/qtc_project_create_package 2013-08-08 07:26:20 +0000
1144+++ share/qtcreator/ubuntu/scripts/qtc_project_create_package 1970-01-01 00:00:00 +0000
1145@@ -1,51 +0,0 @@
1146-#!/bin/bash
1147-# Copyright 2013 Canonical Ltd.
1148-#
1149-# This program is free software; you can redistribute it and/or modify
1150-# it under the terms of the GNU Lesser General Public License as published by
1151-# the Free Software Foundation; version 2.1.
1152-#
1153-# This program is distributed in the hope that it will be useful,
1154-# but WITHOUT ANY WARRANTY; without even the implied warranty of
1155-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1156-# GNU Lesser General Public License for more details.
1157-#
1158-# You should have received a copy of the GNU Lesser General Public License
1159-# along with this program. If not, see <http://www.gnu.org/licenses/>.
1160-#
1161-# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
1162-set -e
1163-
1164-SCRIPTPATH=`dirname $0`
1165-# -- actions --
1166-if [[ ! -d debian ]]; then
1167- ${SCRIPTPATH}/qtc_project_packaging .
1168-fi
1169-
1170-${SCRIPTPATH}/qtc_project_debuild
1171-
1172-QMLDEPS=`${SCRIPTPATH}/qtc_project_detect_qmldeps`
1173-
1174-if [[ -d debian ]]; then
1175- awk "NR < `egrep "^Depends:" -in debian/control|sed "s/:.*//g"|head -1`+1" debian/control|sed "s/^Depends:.*/${QMLDEPS}qmlscene/g" > debian/control.new
1176- awk "NR >= `egrep "^Description:" -in debian/control|sed "s/:.*//g"|head -1`" debian/control >> debian/control.new
1177- mv debian/control.new debian/control
1178-fi
1179-#sed -i "s/^Depends:.*/${QMLDEPS}qmlscene/g" debian/control
1180-
1181-
1182-# Detect if we have QML project only
1183-set +e
1184-H_FILES=`find . -type f |grep .h$`
1185-CPP_FILES=`find . -type f |grep .cpp$`
1186-PRO_FILES=`find . -type f |grep .pro$`
1187-set -e
1188-
1189-if [[ -z ${H_FILES} && -z ${CPP_FILES} && -z ${PRO_FILES} ]]; then
1190- echo "Detected: QML project"
1191- sed -i "s/^Architecture: any$/Architecture: all/g" debian/control
1192-else
1193- echo "Detected: CPP project"
1194-fi
1195-
1196-dpkg-buildpackage -us -uc -nc
1197
1198=== removed file 'share/qtcreator/ubuntu/scripts/qtc_project_debuild'
1199--- share/qtcreator/ubuntu/scripts/qtc_project_debuild 2013-08-08 07:26:20 +0000
1200+++ share/qtcreator/ubuntu/scripts/qtc_project_debuild 1970-01-01 00:00:00 +0000
1201@@ -1,20 +0,0 @@
1202-#!/bin/bash
1203-# Copyright 2013 Canonical Ltd.
1204-#
1205-# This program is free software; you can redistribute it and/or modify
1206-# it under the terms of the GNU Lesser General Public License as published by
1207-# the Free Software Foundation; version 2.1.
1208-#
1209-# This program is distributed in the hope that it will be useful,
1210-# but WITHOUT ANY WARRANTY; without even the implied warranty of
1211-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1212-# GNU Lesser General Public License for more details.
1213-#
1214-# You should have received a copy of the GNU Lesser General Public License
1215-# along with this program. If not, see <http://www.gnu.org/licenses/>.
1216-#
1217-# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
1218-set -e;
1219-
1220-# -- actions --
1221-debuild -i -I -S -sa -us -uc -nc
1222\ No newline at end of file
1223
1224=== removed file 'share/qtcreator/ubuntu/scripts/qtc_project_detect_qmldeps'
1225--- share/qtcreator/ubuntu/scripts/qtc_project_detect_qmldeps 2013-08-08 07:26:20 +0000
1226+++ share/qtcreator/ubuntu/scripts/qtc_project_detect_qmldeps 1970-01-01 00:00:00 +0000
1227@@ -1,34 +0,0 @@
1228-#!/bin/bash
1229-# Copyright 2013 Canonical Ltd.
1230-#
1231-# This program is free software; you can redistribute it and/or modify
1232-# it under the terms of the GNU Lesser General Public License as published by
1233-# the Free Software Foundation; version 2.1.
1234-#
1235-# This program is distributed in the hope that it will be useful,
1236-# but WITHOUT ANY WARRANTY; without even the implied warranty of
1237-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1238-# GNU Lesser General Public License for more details.
1239-#
1240-# You should have received a copy of the GNU Lesser General Public License
1241-# along with this program. If not, see <http://www.gnu.org/licenses/>.
1242-#
1243-# Author: Zoltán Balogh <zoltan.balogh@canonical.com>
1244-# Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
1245-
1246-PROJECT_PATH=$1
1247-if [[ -z ${PROJECT_PATH=} ]]; then
1248- PROJECT_PATH=./
1249-fi
1250-
1251-if [[ -d debian ]]; then
1252- OLD_DEPENDS=`grep -m 1 "^Depends:" debian/control -A\`echo \\\`cat debian/control |egrep "^Description:|^Depends:" -in|sed "s/:.*//g"|sort -r|tail -2|tr '\n' '-'\\\`1|bc\`|sed "s/[ ]*//g;s/,/\n/g;s/Depends://g"|sed "/^$/d"|egrep -v "qmlscene|qt-components-ubuntu|misc:Depends"`
1253-fi
1254-
1255-QT_INSTALL_QML=`qmake -query QT_INSTALL_QML`
1256-REGEXP_FOR_QML_MODULES=`find $PROJECT_PATH -name "*.qml"|xargs egrep "^[ \t]*import"|egrep -v "\""|sed -e 's/[ \t]*import/import/'|awk '{print $2 "\.*[0-9]*\/*[qmldir]*$|"}'|sort|uniq|tr -d '\n'|sed "s/|$//"`
1257-DEPS_BY_PLUGINS=`find $QT_INSTALL_QML -name "qmldir"|xargs egrep -l "$REGEXP_FOR_QML_MODULES"|xargs dpkg -S|awk '{print $1}'| sort|uniq |sed "s/:.*[:,]//g"`
1258-DEPS_BY_QML_MODULES=`find $QT_INSTALL_QML -name "qmldir"|egrep "$REGEXP_FOR_QML_MODULES"|xargs dpkg -S|grep $QT_INSTALL_QML|awk '{print $1}'| sort|uniq |sed "s/:.*[:,]//g"`
1259-echo -n Depends: \${misc:Depends},
1260-echo -n $DEPS_BY_PLUGINS $DEPS_BY_QML_MODULES $OLD_DEPENDS|tr ' ' '\n'|sort|uniq|tr '\n' ','|sed "s/qtdeclarative5-ubuntu-ui-toolkit-plugin/qtdeclarative5-ubuntu-ui-toolkit-plugin|qt-components-ubuntu/"|sed "s/:,/,/g"
1261-
1262
1263=== removed file 'share/qtcreator/ubuntu/scripts/qtc_project_packaging'
1264--- share/qtcreator/ubuntu/scripts/qtc_project_packaging 2013-08-30 04:23:30 +0000
1265+++ share/qtcreator/ubuntu/scripts/qtc_project_packaging 1970-01-01 00:00:00 +0000
1266@@ -1,118 +0,0 @@
1267-#!/bin/bash
1268-# Copyright 2013 Canonical Ltd.
1269-#
1270-# This program is free software; you can redistribute it and/or modify
1271-# it under the terms of the GNU Lesser General Public License as published by
1272-# the Free Software Foundation; version 2.1.
1273-#
1274-# This program is distributed in the hope that it will be useful,
1275-# but WITHOUT ANY WARRANTY; without even the implied warranty of
1276-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1277-# GNU Lesser General Public License for more details.
1278-#
1279-# You should have received a copy of the GNU Lesser General Public License
1280-# along with this program. If not, see <http://www.gnu.org/licenses/>.
1281-#
1282-# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
1283-
1284-DEBEMAIL=`grep -G "^DEBEMAIL" ~/.bashrc`
1285-DEBFULLNAME=`grep -G "^DEBFULLNAME" ~/.bashrc`
1286-
1287-if [[ ! -z "$DEBEMAIL" ]]; then
1288- export $DEBEMAIL
1289-else
1290- CMD=`grep -G "export DEBEMAIL=" ~/.bashrc|sed "s/\"//g"`
1291- if [[ ! -z $CMD ]]; then
1292- $CMD
1293- fi
1294-fi
1295-if [[ ! -z $DEBFULLNAME ]]; then
1296- export $DEBFULLNAME
1297-else
1298- CMD=`grep -G "export DEBFULLNAME=" ~/.bashrc|sed "s/\"//g"|sed "s/export DEBFULLNAME=//g"`
1299- if [[ ! -z $CMD ]]; then
1300- export DEBFULLNAME="$CMD"
1301- fi
1302-fi
1303-
1304-set -e
1305-
1306-PROJECT=$1
1307-
1308-if [[ ! -d "$PROJECT" ]]; then
1309- echo "Project not found ($PROJECT)."
1310- exit 123
1311-fi
1312-
1313-cd $PROJECT
1314-if [[ -d debian ]]; then
1315- echo "Packaging already exists for project. Skipping.."
1316- exit
1317-fi
1318-
1319-PACKAGENAME=`basename $PWD|tr '[A-Z]' '[a-z]'`
1320-
1321-set +e
1322-#detect project type
1323-H_FILES=`find . -type f |grep .h$`
1324-CPP_FILES=`find . -type f |grep .cpp$`
1325-PRO_FILES=`find . -type f |grep .pro$`
1326-
1327-PROJECTTYPE=""
1328-PACKAGETYPE=""
1329-if [[ -z ${H_FILES} && -z ${CPP_FILES} && -z ${PRO_FILES} ]]; then
1330- echo "Detected: QML project"
1331- PROJECTTYPE="QML"
1332- PACKAGETYPE="-s"
1333-else
1334- echo "Detected CPP project"
1335- PROJECTTYPE="CPP"
1336- IS_LIB=`echo ${PRO_FILES}|xargs cat |grep "TEMPLATE"|grep "lib"`
1337- if [[ -z ${IS_LIB} ]]; then
1338- echo " - Application"
1339- PACKAGETYPE="-s"
1340- else
1341- echo " - QML Extension Library"
1342- PACKAGETYPE="-s"
1343- fi
1344-fi
1345-
1346-set -e
1347-
1348-# create packaging
1349-
1350-echo "\n" | dh_make -n -p ${PACKAGENAME}_0.1 ${PACKAGETYPE} --createorig
1351-
1352-if [[ ! -d debian ]]; then
1353- echo "Debian folder was not created!"
1354- exit 2
1355-fi
1356-
1357-pushd debian
1358-# remove unfilled files
1359-rm *.ex *.EX README* docs
1360-popd
1361-
1362-# add installable files
1363-INSTALL_PATH=/usr/share/${PACKAGENAME}
1364-DESKTOPFILE=/usr/share/applications
1365-find . -mindepth 1 -maxdepth 3 -printf "%p ${INSTALL_PATH}\n"|grep -v ".user\|debian\|.desktop" | sed "s/^\.\///g" > debian/install
1366-
1367-if [[ -z ${IS_LIB} ]]; then
1368-find *.desktop -printf "%p ${DESKTOPFILE}\n" >> debian/install
1369-fi
1370-
1371-# check if we have .pro files or cpp/h files, if not then change architecture to any
1372-if [[ "$PROJECTTYPE" == QML ]]; then
1373- echo "Detected: QML project"
1374- sed -i "s/^Architecture: any$/Architecture: all/g" debian/control
1375- # update package dependencies
1376- SCRIPTPATH=`dirname $0`
1377- QMLDEPS=`${SCRIPTPATH}/qtc_project_detect_qmldeps`
1378- sed -i "s/^Depends:.*/${QMLDEPS}qmlscene/g" debian/control
1379-else
1380- echo "Detected: CPP project"
1381-fi
1382-
1383-UBUNTU_RELEASE=`cat /etc/lsb-release|grep DISTRIB_CODENAME|sed 's/DISTRIB_CODENAME=//'`
1384-sed -i "s/unstable; urgency=low/{$UBUNTU_RELEASE}; urgency=low/g" debian/changelog
1385
1386=== removed file 'share/qtcreator/ubuntu/scripts/qtc_read_bazaar_settings'
1387--- share/qtcreator/ubuntu/scripts/qtc_read_bazaar_settings 2013-08-08 07:26:20 +0000
1388+++ share/qtcreator/ubuntu/scripts/qtc_read_bazaar_settings 1970-01-01 00:00:00 +0000
1389@@ -1,39 +0,0 @@
1390-#!/bin/bash
1391-# Copyright 2013 Canonical Ltd.
1392-#
1393-# This program is free software; you can redistribute it and/or modify
1394-# it under the terms of the GNU Lesser General Public License as published by
1395-# the Free Software Foundation; version 2.1.
1396-#
1397-# This program is distributed in the hope that it will be useful,
1398-# but WITHOUT ANY WARRANTY; without even the implied warranty of
1399-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1400-# GNU Lesser General Public License for more details.
1401-#
1402-# You should have received a copy of the GNU Lesser General Public License
1403-# along with this program. If not, see <http://www.gnu.org/licenses/>.
1404-#
1405-# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
1406-
1407-DEBEMAIL=`grep -G "^DEBEMAIL" ~/.bashrc`
1408-DEBFULLNAME=`grep -G "^DEBFULLNAME" ~/.bashrc`
1409-
1410-if [[ ! -z "$DEBEMAIL" ]]; then
1411- export $DEBEMAIL
1412-else
1413- CMD=`grep -G "export DEBEMAIL=" ~/.bashrc|sed "s/\"//g"`
1414- if [[ ! -z $CMD ]]; then
1415- $CMD
1416- fi
1417-fi
1418-if [[ ! -z $DEBFULLNAME ]]; then
1419- export $DEBFULLNAME
1420-else
1421- CMD=`grep -G "export DEBFULLNAME=" ~/.bashrc|sed "s/\"//g"|sed "s/export DEBFULLNAME=//g"`
1422- if [[ ! -z $CMD ]]; then
1423- export DEBFULLNAME="$CMD"
1424- fi
1425-fi
1426-
1427-echo $DEBFULLNAME
1428-echo $DEBEMAIL
1429
1430=== modified file 'src/ubuntu/ubuntuconstants.h'
1431--- src/ubuntu/ubuntuconstants.h 2015-04-17 08:28:01 +0000
1432+++ src/ubuntu/ubuntuconstants.h 2015-05-05 14:31:31 +0000
1433@@ -173,8 +173,6 @@
1434 const char UBUNTU_INITIAL_EMULATOR_NAME[] = "<emulator>";
1435
1436 const char UBUNTUBZR_INITIALIZE[] ="%0/qtc_bzr_info";
1437-const char UBUNTUPACKAGINGWIDGET_ONFINISHED_ACTION_CLICK_CREATE[] = "%0/qtc_project_click_create";
1438-const char UBUNTUPACKAGINGWIDGET_ONFINISHED_ACTION_CLICK_CMAKECREATE[] = "%0/qtc_cmakeproject_click_create";
1439 const char UBUNTUPACKAGINGWIDGET_OPENMANIFEST[] ="%0/manifest.json";
1440 const char UBUNTUPACKAGINGWIDGET_APPARMOR[] ="%0/%1.json";
1441 const char UBUNTUPACKAGINGWIDGET_EXCLUDES[] ="%0/.excludes";
1442@@ -207,18 +205,6 @@
1443 const char ERROR_MSG_EMULATOR_EXISTS[] = "The emulator already exists.";
1444 const char MSG_EMULATOR_IS_CREATED[] = "Check the logs for details.";
1445
1446-
1447-
1448-
1449-
1450-const char UBUNTUDEVICESWIDGET_REBOOT[] = "Reboot device..";
1451-const char UBUNTUDEVICESWIDGET_REBOOT_SCRIPT[] = "%0/device_reboot";
1452-const char UBUNTUDEVICESWIDGET_SHUTDOWN[] = "Shutdown device..";
1453-const char UBUNTUDEVICESWIDGET_SHUTDOWN_SCRIPT[] = "%0/device_shutdown";
1454-const char UBUNTUDEVICESWIDGET_REBOOT_TO_BOOTLOADER[] = "Reboot to bootloader..";
1455-const char UBUNTUDEVICESWIDGET_REBOOT_TO_BOOTLOADER_SCRIPT[] = "%0/device_reboot2bootloader";
1456-const char UBUNTUDEVICESWIDGET_REBOOT_TO_RECOVERY[] = "Reboot to recovery..";
1457-const char UBUNTUDEVICESWIDGET_REBOOT_TO_RECOVERY_SCRIPT[] = "%0/device_reboot2recovery";
1458 const char UBUNTUWIDGETS_LOCAL_PACKAGE_INSTALLED_SCRIPT[] = "%0/local_package_installed %1";
1459 const char UBUNTUDEVICESWIDGET_LOCAL_INSTALL_EMULATOR[] = "%0/local_install_emulator %1";
1460 const char UBUNTUDEVICESWIDGET_DETECTOPENSSH[] = "Detecting if openssh-server is installed..";
1461@@ -244,8 +230,6 @@
1462 const char UBUNTUDEVICESWIDGET_DETECTDEVICEVERSION_SCRIPT[] = "%0/device_version %1";
1463 const char UBUNTUDEVICESWIDGET_SSH_INSTALL[] = "Installing openssh-server..";
1464 const char UBUNTUDEVICESWIDGET_SSH_INSTALL_SCRIPT[] = "%0/openssh_install %1";
1465-const char UBUNTUDEVICESWIDGET_CLONETIME[] = "Cloning time configuration from host to device..";
1466-const char UBUNTUDEVICESWIDGET_CLONETIME_SCRIPT[] = "%0/device_time_clone %1";
1467 const char UBUNTUDEVICESWIDGET_SSH_REMOVE[] = "Removing openssh-server..";
1468 const char UBUNTUDEVICESWIDGET_SSH_REMOVE_SCRIPT[] = "%0/openssh_remove %1";
1469
1470
1471=== modified file 'src/ubuntu/ubuntudevice.cpp'
1472--- src/ubuntu/ubuntudevice.cpp 2015-04-10 15:06:01 +0000
1473+++ src/ubuntu/ubuntudevice.cpp 2015-05-05 14:31:31 +0000
1474@@ -384,10 +384,6 @@
1475 emit featureDetected();
1476 break;
1477 }
1478- case UbuntuDevice::CloneTimeConfig:
1479- endAction(QString::fromLatin1(Constants::UBUNTUDEVICESWIDGET_ONFINISHED_TIME_CONF_COPIED));
1480- setProcessState(UbuntuDevice::Done);
1481- break;
1482 case UbuntuDevice::EnableRWImage:
1483 endAction(QString::fromLatin1(Constants::UBUNTUDEVICESWIDGET_ONFINISHED_WRITABLE_ENABLED));
1484 detectDeviceWritableImage();
1485@@ -657,20 +653,6 @@
1486 emit featureDetected();
1487 }
1488
1489-void UbuntuDeviceHelper::cloneTimeConfig()
1490-{
1491- if(m_dev->m_processState < UbuntuDevice::FirstNonCriticalTask && m_dev->m_processState != UbuntuDevice::NotStarted)
1492- return;
1493-
1494- setProcessState(UbuntuDevice::CloneTimeConfig);
1495- beginAction(QString::fromLatin1(Constants::UBUNTUDEVICESWIDGET_CLONETIME));
1496- stopProcess();
1497-
1498- startProcess(QString::fromLatin1(Constants::UBUNTUDEVICESWIDGET_CLONETIME_SCRIPT)
1499- .arg(Ubuntu::Constants::UBUNTU_SCRIPTPATH)
1500- .arg(m_dev->serialNumber()));
1501-}
1502-
1503 void UbuntuDeviceHelper::enableRWImage()
1504 {
1505 if(m_dev->m_processState < UbuntuDevice::FirstNonCriticalTask && m_dev->m_processState != UbuntuDevice::NotStarted)
1506@@ -1026,72 +1008,11 @@
1507
1508 }
1509
1510-void UbuntuDevice::cloneTimeConfig()
1511-{
1512- m_helper->cloneTimeConfig();
1513-}
1514-
1515 void UbuntuDevice::enablePortForward()
1516 {
1517 m_helper->enablePortForward();
1518 }
1519
1520-void UbuntuDevice::shutdown()
1521-{
1522- QProcess p;
1523- QStringList args = QStringList()
1524- << serialNumber();
1525-
1526- //no need to redetect this should happen automagically
1527- p.startDetached(QString::fromLatin1(Constants::UBUNTUDEVICESWIDGET_SHUTDOWN_SCRIPT).arg(Ubuntu::Constants::UBUNTU_SCRIPTPATH)
1528- , args
1529- , QCoreApplication::applicationDirPath());
1530-}
1531-
1532-void UbuntuDevice::reboot()
1533-{
1534- QProcess p;
1535- QStringList args = QStringList()
1536- << serialNumber();
1537-
1538- //no need to redetect this should happen automagically
1539- bool started = p.startDetached(QString::fromLatin1(Constants::UBUNTUDEVICESWIDGET_REBOOT_SCRIPT).arg(Ubuntu::Constants::UBUNTU_SCRIPTPATH)
1540- , args
1541- , QCoreApplication::applicationDirPath());
1542-
1543- if(!started && debug) {
1544- qDebug()<<"Could not start process "
1545- <<QString::fromLatin1(Constants::UBUNTUDEVICESWIDGET_REBOOT_SCRIPT).arg(Ubuntu::Constants::UBUNTU_SCRIPTPATH)
1546- <<args
1547- <<p.errorString();
1548- }
1549-
1550-}
1551-
1552-void UbuntuDevice::rebootToRecovery()
1553-{
1554- QProcess p;
1555- QStringList args = QStringList()
1556- << serialNumber();
1557-
1558- //no need to redetect this should happen automagically
1559- p.startDetached(QString::fromLatin1(Constants::UBUNTUDEVICESWIDGET_REBOOT_TO_RECOVERY_SCRIPT).arg(Ubuntu::Constants::UBUNTU_SCRIPTPATH)
1560- , args
1561- , QCoreApplication::applicationDirPath());
1562-}
1563-
1564-void UbuntuDevice::rebootToBootloader()
1565-{
1566- QProcess p;
1567- QStringList args = QStringList()
1568- << serialNumber();
1569-
1570- //no need to redetect this should happen automagically
1571- p.startDetached(QString::fromLatin1(Constants::UBUNTUDEVICESWIDGET_REBOOT_TO_BOOTLOADER_SCRIPT).arg(Ubuntu::Constants::UBUNTU_SCRIPTPATH)
1572- , args
1573- , QCoreApplication::applicationDirPath());
1574-}
1575-
1576 void UbuntuDevice::deployPublicKey()
1577 {
1578 m_helper->deployPublicKey();
1579@@ -1264,8 +1185,6 @@
1580 return tr("Detecting if developer tools are installed");
1581 case FirstNonCriticalTask:
1582 return tr("");
1583- case CloneTimeConfig:
1584- return tr("Cloning time configuration");
1585 case EnableRWImage:
1586 return tr("Enabling writeable image");
1587 case DisableRWImage:
1588
1589=== modified file 'src/ubuntu/ubuntudevice.h'
1590--- src/ubuntu/ubuntudevice.h 2015-04-10 15:06:01 +0000
1591+++ src/ubuntu/ubuntudevice.h 2015-05-05 14:31:31 +0000
1592@@ -72,7 +72,6 @@
1593 void beginAction(QString msg);
1594 void endAction(QString msg);
1595 void resetToDefaults();
1596- void cloneTimeConfig ();
1597 void enableRWImage ();
1598 void disableRWImage ();
1599 void enablePortForward ();
1600@@ -141,7 +140,6 @@
1601 DetectDeviceWriteableImage,
1602 DetectDeveloperTools,
1603 FirstNonCriticalTask,
1604- CloneTimeConfig,
1605 EnableRWImage,
1606 DisableRWImage,
1607 InstallDevTools,
1608@@ -164,12 +162,7 @@
1609
1610 void cloneNetwork ();
1611 void openTerminal ();
1612- void cloneTimeConfig ();
1613 void enablePortForward ();
1614- void shutdown ();
1615- void reboot ();
1616- void rebootToRecovery ();
1617- void rebootToBootloader ();
1618 void deployPublicKey ();
1619 void setDeveloperModeEnabled ( const bool enabled = true );
1620 void setWriteableImageEnabled ( const bool enabled = true );
1621
1622=== modified file 'src/ubuntu/ubuntudevicesmodel.cpp'
1623--- src/ubuntu/ubuntudevicesmodel.cpp 2015-04-10 15:06:01 +0000
1624+++ src/ubuntu/ubuntudevicesmodel.cpp 2015-05-05 14:31:31 +0000
1625@@ -294,14 +294,6 @@
1626 return QAbstractListModel::flags(index) | Qt::ItemIsEditable;
1627 }
1628
1629-void UbuntuDevicesModel::triggerCloneTimeConfig(const int devId)
1630-{
1631- int row = findDevice(devId);
1632- if(row < 0)
1633- return;
1634- m_knownDevices[row]->device()->cloneTimeConfig();
1635-}
1636-
1637 void UbuntuDevicesModel::triggerPortForwarding(const int devId)
1638 {
1639 int row = findDevice(devId);
1640@@ -326,38 +318,6 @@
1641 m_knownDevices[row]->device()->openTerminal();
1642 }
1643
1644-void UbuntuDevicesModel::triggerReboot(const int devId)
1645-{
1646- int row = findDevice(devId);
1647- if(row < 0)
1648- return;
1649- m_knownDevices[row]->device()->reboot();
1650-}
1651-
1652-void UbuntuDevicesModel::triggerRebootBootloader(const int devId)
1653-{
1654- int row = findDevice(devId);
1655- if(row < 0)
1656- return;
1657- m_knownDevices[row]->device()->rebootToBootloader();
1658-}
1659-
1660-void UbuntuDevicesModel::triggerRebootRecovery(const int devId)
1661-{
1662- int row = findDevice(devId);
1663- if(row < 0)
1664- return;
1665- m_knownDevices[row]->device()->rebootToRecovery();
1666-}
1667-
1668-void UbuntuDevicesModel::triggerShutdown(const int devId)
1669-{
1670- int row = findDevice(devId);
1671- if(row < 0)
1672- return;
1673- m_knownDevices[row]->device()->shutdown();
1674-}
1675-
1676 void UbuntuDevicesModel::triggerKitAutocreate(const int devId)
1677 {
1678 int row = findDevice(devId);
1679
1680=== modified file 'src/ubuntu/ubuntudevicesmodel.h'
1681--- src/ubuntu/ubuntudevicesmodel.h 2015-04-10 15:06:01 +0000
1682+++ src/ubuntu/ubuntudevicesmodel.h 2015-05-05 14:31:31 +0000
1683@@ -115,14 +115,9 @@
1684 void stateChanged(QString arg);
1685
1686 public slots:
1687- void triggerCloneTimeConfig ( const int devId );
1688 void triggerPortForwarding ( const int devId );
1689 void triggerSSHSetup ( const int devId );
1690 void triggerSSHConnection ( const int devId );
1691- void triggerReboot ( const int devId );
1692- void triggerRebootBootloader( const int devId );
1693- void triggerRebootRecovery ( const int devId );
1694- void triggerShutdown ( const int devId );
1695 void triggerKitAutocreate ( const int devId );
1696 void triggerKitRemove ( const int devId, const QVariant &kitid );
1697 void triggerRedetect ( const int devId );

Subscribers

People subscribed via source and target branches