Merge lp:~juhapekka-piiroinen/ubuntu-qtcreator-plugins/merge-flipped-and-scope-and-fixed-with-flipped-image into lp:ubuntu-qtcreator-plugins
- merge-flipped-and-scope-and-fixed-with-flipped-image
- Merge into trunk
Proposed by
Juhapekka Piiroinen
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 224 | ||||
Proposed branch: | lp:~juhapekka-piiroinen/ubuntu-qtcreator-plugins/merge-flipped-and-scope-and-fixed-with-flipped-image | ||||
Merge into: | lp:ubuntu-qtcreator-plugins | ||||
Diff against target: |
1705 lines (+648/-440) 41 files modified
ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/projectypes.json (+6/-6) ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/config.h (+7/-0) ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/data/displayName_lower.scope (+2/-2) ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/data/unity-scope-displayName_lower.service.in (+1/-1) ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.c (+87/-0) ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.h (+21/-0) ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName.c (+72/-20) ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName.pro (+30/-10) ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/openclipart-rss.c (+0/-131) ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/openclipart-rss.h (+0/-18) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/menu.json (+39/-17) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_flashdaily (+21/-7) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_flashdaily_bootstrap (+21/-7) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_hasnetwork (+4/-13) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_network_clone (+7/-14) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_portforward (+6/-7) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_reboot (+4/-7) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_reboot2bootloader (+5/-7) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_reboot2recovery (+4/-7) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_rootshell (+4/-7) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_search (+1/-1) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_set_persist-sys-usb-config (+2/-2) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_shutdown (+4/-7) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_time_clone (+9/-9) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_version (+5/-7) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/functions.inc (+137/-0) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_connect (+7/-9) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_install (+3/-5) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_publickey (+33/-23) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_remove (+4/-7) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_version (+5/-9) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_buildanddeploypackage (+7/-11) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_buildpackage (+8/-15) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_close_all_apps (+27/-15) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_deploy_package (+10/-9) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_developertools (+6/-16) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_restart_appslense (+3/-5) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_run_app (+4/-8) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_launch_gallery (+16/-0) ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_read_bazaar_settings (+15/-0) ubuntu-qtcreator-plugins/src/plugins/ubuntu/ubuntudeviceswidget.cpp (+1/-1) |
||||
To merge this branch: | bzr merge lp:~juhapekka-piiroinen/ubuntu-qtcreator-plugins/merge-flipped-and-scope-and-fixed-with-flipped-image | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu SDK team | Pending | ||
Review via email: mp+171397@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/projectypes.json' |
2 | --- ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/projectypes.json 2013-06-24 14:33:43 +0000 |
3 | +++ ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/projectypes.json 2013-06-25 19:33:25 +0000 |
4 | @@ -133,12 +133,12 @@ |
5 | { |
6 | "fileName": "config.h" |
7 | }, |
8 | - { |
9 | - "fileName": "openclipart-rss.h" |
10 | - }, |
11 | - { |
12 | - "fileName": "openclipart-rss.c" |
13 | - } |
14 | + { |
15 | + "fileName": "displayName-parser.c" |
16 | + }, |
17 | + { |
18 | + "fileName": "displayName-parser.h" |
19 | + } |
20 | ] |
21 | } |
22 | |
23 | |
24 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/config.h' |
25 | --- ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/config.h 2013-06-23 09:18:37 +0000 |
26 | +++ ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/config.h 2013-06-25 19:33:25 +0000 |
27 | @@ -1,2 +1,9 @@ |
28 | +#ifndef __CONFIG_H__ |
29 | +#define __CONFIG_H__ |
30 | + |
31 | +#define GROUP_NAME "com.canonical.Unity.Scope.%DISPLAYNAME_CAPITAL%" |
32 | +#define UNIQUE_NAME "/com/canonical/unity/scope/%DISPLAYNAME_LOWER%" |
33 | + |
34 | #define CATEGORY_ICON_PATH "/usr/share/icons/unity-icon-theme/places/svg/service-%DISPLAYNAME_LOWER%.svg" |
35 | |
36 | +#endif /* __CONFIG_H__ */ |
37 | |
38 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/data/displayName_lower.scope' |
39 | --- ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/data/displayName_lower.scope 2013-06-23 09:18:37 +0000 |
40 | +++ ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/data/displayName_lower.scope 2013-06-25 19:33:25 +0000 |
41 | @@ -1,6 +1,6 @@ |
42 | [Scope] |
43 | -DBusName=com.canonical.Unity.Scope.%DISPLAYNAME_CAPITAL% |
44 | -DBusPath=/com/canonical/unity/scope/%DISPLAYNAME_LOWER% |
45 | +GroupName=com.canonical.Unity.Scope.%DISPLAYNAME_CAPITAL% |
46 | +UniqueName=/com/canonical/unity/scope/%DISPLAYNAME_LOWER% |
47 | Icon= |
48 | QueryBinary= |
49 | Keywords=%DISPLAYNAME_LOWER%; |
50 | |
51 | === renamed file 'ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/data/unity-scope-displayName_lower.service' => 'ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/data/unity-scope-displayName_lower.service.in' |
52 | --- ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/data/unity-scope-displayName_lower.service 2013-06-23 09:18:37 +0000 |
53 | +++ ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/data/unity-scope-displayName_lower.service.in 2013-06-25 19:33:25 +0000 |
54 | @@ -1,3 +1,3 @@ |
55 | [D-BUS Service] |
56 | Name=com.canonical.Unity.Scope.%DISPLAYNAME_CAPITAL% |
57 | -Exec=/usr/lib/*/unity-scope-%DISPLAYNAME_LOWER%/%DISPLAYNAME% |
58 | +Exec= |
59 | |
60 | === added file 'ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.c' |
61 | --- ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.c 1970-01-01 00:00:00 +0000 |
62 | +++ ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.c 2013-06-25 19:33:25 +0000 |
63 | @@ -0,0 +1,87 @@ |
64 | +/* |
65 | + * Feed parser backend |
66 | + * |
67 | + * In this module you'll be implementing the feed parser backend. |
68 | + * This code will not be Unity-specific, and it will vary depending |
69 | + * on the type of data returned by your source. Common feed types |
70 | + * returned when doing search queries to sources are JSON, RSS, XML. |
71 | + * |
72 | + * You'll simply need to implement a parser for the type of feed your |
73 | + * source returns and send the results back to Unity via the get_results() |
74 | + * function. |
75 | + */ |
76 | + |
77 | +#include <stdio.h> |
78 | +#include <stdlib.h> |
79 | +#include <string.h> |
80 | +#include <glib.h> |
81 | +#include "%DISPLAYNAME_LOWER%-parser.h" |
82 | + |
83 | +/* |
84 | + * This is the URI against which you'll be submitting your |
85 | + * search query from the Dash, which you'll need to adapt |
86 | + * to your source. |
87 | + */ |
88 | +#define BASE_URI "http://%DISPLAYNAME_LOWER%.org/api/search/?query=" |
89 | + |
90 | +/** |
91 | + * @brief Cleans up (frees the memory allocated memory) |
92 | + * of the given results structure |
93 | + * @param data Structure that contains the data to free |
94 | + */ |
95 | +void |
96 | +result_cleanup(gpointer data) { |
97 | + /* This is specific to a type of result, so you'll |
98 | + * need to adapt it to the results sent by your |
99 | + * source. |
100 | + */ |
101 | + result_t *result = (result_t *)data; |
102 | + if (result->link) { |
103 | + free(result->link); |
104 | + } |
105 | + if (result->icon_url) { |
106 | + free(result->icon_url); |
107 | + } |
108 | + if (result->title) { |
109 | + free(result->title); |
110 | + } |
111 | + if (result->description) { |
112 | + free(result->description); |
113 | + } |
114 | + if (result->creation_date) { |
115 | + free(result->creation_date); |
116 | + } |
117 | + if (result->author) { |
118 | + free(result->author); |
119 | + } |
120 | +} |
121 | + |
122 | +/** |
123 | + * @brief get_results Get and parse the results from a search query |
124 | + * @param search_term String submitted as the search term |
125 | + * @return Search results |
126 | + */ |
127 | +GSList * |
128 | +get_results(const char *search_term) { |
129 | + GString *url = NULL; |
130 | + GSList *results = NULL; |
131 | + |
132 | + /* Check if an actual search term was submitted, return otherwise */ |
133 | + if (search_term == NULL) { |
134 | + g_warning("get_results: search_term cannot be null"); |
135 | + return results; |
136 | + } |
137 | + |
138 | + /* Construct the full search query */ |
139 | + url = g_string_new(BASE_URI); |
140 | + g_string_append(url, search_term); |
141 | + g_debug("Searching %s", url->str); |
142 | + g_string_free(url, TRUE); |
143 | + |
144 | + /* |
145 | + * Submit the query to the source, parse the results and populate |
146 | + * the results list here. |
147 | + */ |
148 | + |
149 | + return results; |
150 | +} |
151 | |
152 | === added file 'ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.h' |
153 | --- ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.h 1970-01-01 00:00:00 +0000 |
154 | +++ ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.h 2013-06-25 19:33:25 +0000 |
155 | @@ -0,0 +1,21 @@ |
156 | +#ifndef __%DISPLAYNAME_UPPER%_PARSER_H__ |
157 | +#define __%DISPLAYNAME_UPPER%_PARSER_H__ |
158 | + |
159 | +GSList *get_results(const char *search_term); |
160 | +void result_cleanup(gpointer data); |
161 | + |
162 | +/** |
163 | + * This is just an example result type with some sample |
164 | + * fields. You should modify the fields to match the |
165 | + * data you are expecting from your search source |
166 | + */ |
167 | +typedef struct { |
168 | + gchar *link; |
169 | + gchar *icon_url; |
170 | + gchar *title; |
171 | + gchar *description; |
172 | + gchar *creation_date; |
173 | + gchar *author; |
174 | +} result_t; |
175 | + |
176 | +#endif /* __%DISPLAYNAME:u%_PARSER_H__ */ |
177 | |
178 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName.c' |
179 | --- ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName.c 2013-06-24 14:33:43 +0000 |
180 | +++ ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName.c 2013-06-25 19:33:25 +0000 |
181 | @@ -1,3 +1,14 @@ |
182 | +/* |
183 | + * Unity %DISPLAYNAME_CAPITAL% scope |
184 | + * |
185 | + * This module implements the interface to the Unity Dash and |
186 | + * constitutes the frontend of the scope. |
187 | + * |
188 | + * Follow the scopes tutorial to learn how to create a scope: |
189 | + * http://developer.ubuntu.com/resources/tutorials/unity-scopes/writing-a-unity-scope/ |
190 | + * |
191 | + */ |
192 | + |
193 | #include <stdio.h> |
194 | #include <stdlib.h> |
195 | #include <string.h> |
196 | @@ -6,15 +17,15 @@ |
197 | #include <glib.h> |
198 | #include <gio/gio.h> |
199 | #include "config.h" |
200 | -#include "openclipart-rss.h" |
201 | - |
202 | -#define DBUS_NAME "com.canonical.Unity.Scope.%DISPLAYNAME_CAPITAL%" |
203 | -#define DBUS_PATH "/com/canonical/unity/scope/%DISPLAYNAME_LOWER%" |
204 | - |
205 | +#include "%DISPLAYNAME_LOWER%-parser.h" |
206 | |
207 | /** |
208 | * In this function the results from the backend are obtained and |
209 | * added to the search results in the Dash |
210 | + * |
211 | + * @brief Search function |
212 | + * @param search Search term |
213 | + * @param user_data Additional user data |
214 | */ |
215 | static void |
216 | search_func(UnityScopeSearchBase* search, void* user_data) |
217 | @@ -25,11 +36,21 @@ |
218 | result_t *result = NULL; |
219 | UnityScopeResult scope_result = { 0, }; |
220 | |
221 | - /* The get_results() function is implemented in the backend */ |
222 | + /* Avoid compiler warning if we're not using the parameter */ |
223 | + user_data = user_data; |
224 | + |
225 | + /* Fetch the results from the backend */ |
226 | results = get_results(search->search_context->search_query); |
227 | |
228 | + /* Iterate through the returned results and add them to the |
229 | + * Unity's result set |
230 | + */ |
231 | for (iter = results; iter; iter = iter->next) { |
232 | + |
233 | + /* Get the result */ |
234 | result = (result_t *)iter->data; |
235 | + |
236 | + /* Build and populate a scope result from the source data */ |
237 | scope_result.uri = result->link; |
238 | scope_result.title = result->title; |
239 | scope_result.icon_hint = result->icon_url; |
240 | @@ -43,19 +64,26 @@ |
241 | metadata = g_hash_table_new(g_str_hash, g_str_equal); |
242 | if (result->author) { |
243 | g_hash_table_insert(metadata, "author", |
244 | - g_variant_new_string(result->author)); |
245 | + g_variant_new_string(result->author)); |
246 | } |
247 | if (result->creation_date) { |
248 | g_hash_table_insert(metadata, "creation_date", |
249 | - g_variant_new_string(result->creation_date)); |
250 | + g_variant_new_string(result->creation_date)); |
251 | } |
252 | scope_result.metadata = metadata; |
253 | |
254 | - /* Add the returned result to the search results list */ |
255 | + /* |
256 | + * Add the returned result to the search results list, taking a |
257 | + * copy of the data passed in via scope_result |
258 | + */ |
259 | unity_result_set_add_result(search->search_context->result_set, |
260 | - &scope_result); |
261 | + &scope_result); |
262 | g_hash_table_unref(metadata); |
263 | } |
264 | + |
265 | + /* |
266 | + * Clear out the data copied to the result set earlier on |
267 | + */ |
268 | g_slist_free_full(results, (GDestroyNotify) result_cleanup); |
269 | } |
270 | |
271 | @@ -64,6 +92,11 @@ |
272 | * its preview is shown in the Dash. |
273 | * There are a set of predefined preview types: simply pick one, instantiate |
274 | * it, add metadata to it if available, and return it. |
275 | + * |
276 | + * @brief Dash preview function |
277 | + * @param previewer Result previewer |
278 | + * @param user_data Additional user data |
279 | + * @return Preview populated with the result's data |
280 | */ |
281 | static UnityAbstractPreview * |
282 | preview_func(UnityResultPreviewer *previewer, void *user_data) |
283 | @@ -74,15 +107,22 @@ |
284 | GVariant *gv_author, *gv_creation_date = NULL; |
285 | const char *creation_date = NULL; |
286 | |
287 | + /* Avoid compiler warning if we're not using the parameter */ |
288 | + user_data = user_data; |
289 | + |
290 | + /* Create a generic preview */ |
291 | preview = UNITY_PREVIEW(unity_generic_preview_new( |
292 | - previewer->result.title, |
293 | - previewer->result.comment, |
294 | - g_icon_new_for_string(previewer->result.icon_hint, NULL))); |
295 | + previewer->result.title, |
296 | + previewer->result.comment, |
297 | + g_icon_new_for_string(previewer->result.icon_hint, NULL))); |
298 | |
299 | + /* Set up the preview's action */ |
300 | action = unity_preview_action_new_with_uri(previewer->result.uri, "Open", |
301 | - NULL); |
302 | + NULL); |
303 | unity_preview_add_action(preview, action); |
304 | + unity_object_unref(action); |
305 | |
306 | + /* If the result contains metadata, add it to the preview */ |
307 | if (previewer->result.metadata) { |
308 | gv_author = g_hash_table_lookup(previewer->result.metadata, "author"); |
309 | |
310 | @@ -91,7 +131,7 @@ |
311 | * first, which might be useful for debugging. */ |
312 | if (gv_author) { |
313 | author_hint = unity_info_hint_new_with_variant("author", "Author", |
314 | - NULL, gv_author); |
315 | + NULL, gv_author); |
316 | /* The ref call here and unref below are to work-around a bug in |
317 | * libunity, see: |
318 | * http://code.launchpad.net/~mhr3/libunity/floating-fixes */ |
319 | @@ -100,11 +140,11 @@ |
320 | g_object_unref(author_hint); |
321 | } |
322 | gv_creation_date = g_hash_table_lookup(previewer->result.metadata, |
323 | - "creation_date"); |
324 | + "creation_date"); |
325 | if (gv_creation_date) { |
326 | g_variant_get(gv_creation_date, "&s", &creation_date); |
327 | creation_date_hint = unity_info_hint_new("creation_date", |
328 | - "Creation Date", NULL, creation_date); |
329 | + "Creation Date", NULL, creation_date); |
330 | /* The ref call here and unref below are to work-around a bug in |
331 | * libunity, see: |
332 | * http://code.launchpad.net/~mhr3/libunity/floating-fixes */ |
333 | @@ -129,20 +169,32 @@ |
334 | UnityCategory *cat = NULL; |
335 | GIcon *icon = NULL; |
336 | |
337 | + /* Create and set a category for the scope, including an icon */ |
338 | icon = g_themed_icon_new(CATEGORY_ICON_PATH); |
339 | |
340 | cat = unity_category_new("global", "%DISPLAYNAME_CAPITAL%", icon, |
341 | - UNITY_CATEGORY_RENDERER_HORIZONTAL_TILE); |
342 | + UNITY_CATEGORY_RENDERER_HORIZONTAL_TILE); |
343 | cats = unity_category_set_new(); |
344 | unity_category_set_add(cats, cat); |
345 | |
346 | + /* Create and set up the scope */ |
347 | scope = unity_simple_scope_new(); |
348 | - unity_simple_scope_set_group_name(scope, DBUS_NAME); |
349 | - unity_simple_scope_set_unique_name(scope, DBUS_PATH); |
350 | + unity_simple_scope_set_group_name(scope, GROUP_NAME); |
351 | + unity_simple_scope_set_unique_name(scope, UNIQUE_NAME); |
352 | unity_simple_scope_set_search_func(scope, search_func, NULL, NULL); |
353 | unity_simple_scope_set_preview_func(scope, preview_func, NULL, NULL); |
354 | unity_simple_scope_set_category_set(scope, cats); |
355 | |
356 | + g_object_unref (icon); |
357 | + unity_object_unref (cat); |
358 | + unity_object_unref (cats); |
359 | + |
360 | + /* |
361 | + * Setting up the connector is an action that will not be required |
362 | + * in future revisions of the API. In particular, we only need it here |
363 | + * since the scope is running locally on the device as opposed to |
364 | + * running on the Smart Scopes server |
365 | + */ |
366 | connector = unity_scope_dbus_connector_new(UNITY_ABSTRACT_SCOPE(scope)); |
367 | unity_scope_dbus_connector_export(connector, NULL); |
368 | unity_scope_dbus_connector_run(); |
369 | |
370 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName.pro' |
371 | --- ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName.pro 2013-06-24 14:33:43 +0000 |
372 | +++ ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName.pro 2013-06-25 19:33:25 +0000 |
373 | @@ -16,27 +16,46 @@ |
374 | |
375 | ########################################################### |
376 | # To install dependencies: |
377 | -# sudo apt-get install libunity-dev libglib2.0-dev libmrss0-dev |
378 | +# sudo apt-get install libunity-dev |
379 | PKGCONFIG += \ |
380 | - glib-2.0 \ |
381 | - mrss \ |
382 | unity |
383 | |
384 | +# Pkg-config takes care of the includes for the build, so the following variable is not |
385 | +# strictly needed. We need this simply for Qt Creator to find the |
386 | +# headers in the editor, as it seems not to use the PGKCONFIG variable. |
387 | +INCLUDEPATH += \ |
388 | + /usr/include/glib-2.0 \ |
389 | + /usr/include/unity/unity |
390 | + |
391 | +TARGET = %DISPLAYNAME% |
392 | DAEMON_PATH = $$[QT_INSTALL_LIBS]/unity-scope-$${TARGET} |
393 | -TARGET = %DISPLAYNAME% |
394 | -target.path = $$DAEMON_PATH |
395 | |
396 | -QMAKE_CFLAGS += -Wno-unused-parameter |
397 | +DATA_DIR = $$_PRO_FILE_PWD_/data |
398 | +SCOPE_FILE = $$DATA_DIR/$${TARGET}.scope |
399 | +SERVICE_FILE = $$DATA_DIR/unity-scope-$${TARGET}.service |
400 | |
401 | SOURCES += \ |
402 | - %DISPLAYNAME%.c |
403 | + %DISPLAYNAME%.c \ |
404 | + %DISPLAYNAME%-parser.c |
405 | |
406 | HEADERS += \ |
407 | - config.h |
408 | + config.h \ |
409 | + %DISPLAYNAME%-parser.h |
410 | |
411 | OTHER_FILES += \ |
412 | - data/%DISPLAYNAME_LOWER%.scope \ |
413 | - data/unity-scope-%DISPLAYNAME_LOWER%.service |
414 | + $$SCOPE_FILE \ |
415 | + $${SERVICE_FILE}.in |
416 | + |
417 | +# Rule to generate the DBUS .service file, including the architecture-dependent installation path |
418 | +# generated at build time |
419 | +servicefilegen.target = servicefilegen |
420 | +servicefilegen.commands = sed -e \"s,\\(Exec=\\).*\$$,\1$$DAEMON_PATH/$$TARGET,\" $${SERVICE_FILE}.in > $$SERVICE_FILE |
421 | +QMAKE_EXTRA_TARGETS += servicefilegen |
422 | +QMAKE_CLEAN += $$SERVICE_FILE |
423 | +QMAKE_CLEAN += $$DATA_DIR/*~ |
424 | + |
425 | +# Rule to install the scope's binary |
426 | +target.path = $$DAEMON_PATH |
427 | |
428 | # Rule to install the DBUS .service file |
429 | servicefile.path = /usr/share/dbus-1/services |
430 | @@ -47,5 +66,6 @@ |
431 | scopefile.files = $$SCOPE_FILE |
432 | |
433 | INSTALLS += \ |
434 | + target \ |
435 | scopefile \ |
436 | servicefile |
437 | |
438 | === removed file 'ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/openclipart-rss.c' |
439 | --- ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/openclipart-rss.c 2013-06-24 14:33:43 +0000 |
440 | +++ ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/openclipart-rss.c 1970-01-01 00:00:00 +0000 |
441 | @@ -1,131 +0,0 @@ |
442 | -#include <stdio.h> |
443 | -#include <stdlib.h> |
444 | -#include <string.h> |
445 | -#include <mrss.h> |
446 | -#include <glib.h> |
447 | -#include "openclipart-rss.h" |
448 | - |
449 | -#define BASE_URI "http://openclipart.org/api/search/?query=" |
450 | - |
451 | -void |
452 | -result_cleanup(gpointer data) { |
453 | - result_t *result = (result_t *)data; |
454 | - if (result->link) { |
455 | - free(result->link); |
456 | - } |
457 | - if (result->icon_url) { |
458 | - free(result->icon_url); |
459 | - } |
460 | - if (result->title) { |
461 | - free(result->title); |
462 | - } |
463 | - if (result->description) { |
464 | - free(result->description); |
465 | - } |
466 | - if (result->creation_date) { |
467 | - free(result->creation_date); |
468 | - } |
469 | - if (result->author) { |
470 | - free(result->author); |
471 | - } |
472 | -} |
473 | - |
474 | -/* Returns a value for a given tag and attribute. If attr_name is null, |
475 | - * then it returns the tag value, otherwise it returns the attribute value. |
476 | - * Returns NULL on any error or unfound tag/attribute. |
477 | - * |
478 | - * XXX - it would be more efficient to collect stuff from this loop all at |
479 | - * once. |
480 | - */ |
481 | -char * |
482 | -get_other_tags_attribute(mrss_tag_t *tag, const char *tag_name, const char *attr_name) { |
483 | - mrss_attribute_t *attribute; |
484 | - |
485 | - if ((tag_name == NULL) && (attr_name == NULL)) { |
486 | - return NULL; |
487 | - } |
488 | - |
489 | - while (tag) { |
490 | - if (!strcmp(tag->name, tag_name)) { |
491 | - if (attr_name == NULL) { |
492 | - return tag->value; |
493 | - } |
494 | - for (attribute = tag->attributes; attribute; |
495 | - attribute = attribute->next) { |
496 | - if (!strcmp(attribute->name, attr_name)) { |
497 | - return attribute->value; |
498 | - } |
499 | - } |
500 | - } |
501 | - tag = tag->next; |
502 | - } |
503 | - return NULL; |
504 | -} |
505 | - |
506 | -GSList * |
507 | -get_results(const char *search_term) { |
508 | - mrss_t *data; |
509 | - mrss_error_t ret; |
510 | - mrss_item_t *item; |
511 | - CURLcode code; |
512 | - GString *url = NULL; |
513 | - GSList *results = NULL; |
514 | - result_t *result = NULL; |
515 | - char *tmp = NULL; |
516 | - |
517 | - if (search_term == NULL) { |
518 | - g_warning("get_results: search_term cannot be null"); |
519 | - return results; |
520 | - } |
521 | - |
522 | - url = g_string_new(BASE_URI); |
523 | - g_string_append(url, search_term); |
524 | - g_debug("searching %s", url->str); |
525 | - ret = mrss_parse_url_with_options_and_error(url->str, &data, NULL, &code); |
526 | - g_string_free(url,TRUE); |
527 | - |
528 | - if (ret) { |
529 | - g_warning("MRSS return error: %s\n", ret == MRSS_ERR_DOWNLOAD ? mrss_curl_strerror (code) : mrss_strerror (ret)); |
530 | - return results; |
531 | - } |
532 | - |
533 | - /* |
534 | - * Parse the results from the RSS feed returned by a search query submitted to openclipart.org |
535 | - * See "Clipart Search" in http://openclipart.org/developers |
536 | - */ |
537 | - item = data->item; |
538 | - while (item) { |
539 | - result = (result_t*)malloc(sizeof(result_t)); |
540 | - bzero((result_t*)result, sizeof(result_t)); |
541 | - if (item->link) { |
542 | - result->link = (char *)malloc(strlen(item->link)+1); |
543 | - strcpy(result->link,item->link); |
544 | - } |
545 | - if (item->title) { |
546 | - result->title = (char *)malloc(strlen(item->title)+1); |
547 | - strcpy(result->title,item->title); |
548 | - } |
549 | - if (item->description) { |
550 | - result->description = (char *)malloc(strlen(item->description)+1); |
551 | - strcpy(result->description,item->description); |
552 | - } |
553 | - if (item->pubDate) { |
554 | - result->creation_date = (char *)malloc(strlen(item->pubDate)+1); |
555 | - strcpy(result->creation_date,item->pubDate); |
556 | - } |
557 | - tmp = get_other_tags_attribute(item->other_tags, "thumbnail", "url"); |
558 | - if (tmp) { |
559 | - result->icon_url = (char *)malloc(strlen(tmp)+1); |
560 | - strcpy(result->icon_url,tmp); |
561 | - } |
562 | - tmp = get_other_tags_attribute(item->other_tags, "creator", NULL); |
563 | - if (tmp) { |
564 | - result->author = (char *)malloc(strlen(tmp)+1); |
565 | - strcpy(result->author,tmp); |
566 | - } |
567 | - results = g_slist_append(results, result); |
568 | - item = item->next; |
569 | - } |
570 | - mrss_free (data); |
571 | - return results; |
572 | -} |
573 | |
574 | === removed file 'ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/openclipart-rss.h' |
575 | --- ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/openclipart-rss.h 2013-06-24 14:33:43 +0000 |
576 | +++ ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/openclipart-rss.h 1970-01-01 00:00:00 +0000 |
577 | @@ -1,18 +0,0 @@ |
578 | -#ifndef __OPENCLIPART_RSS_H__ |
579 | -#define __OPENCLIPART_RSS_H__ |
580 | - |
581 | -char *get_other_tags_attribute(mrss_tag_t *tag, |
582 | - const char *tag_name, const char *attr_name); |
583 | -GSList *get_results(const char *search_term); |
584 | -void result_cleanup(gpointer data); |
585 | - |
586 | -typedef struct { |
587 | - gchar *link; |
588 | - gchar *icon_url; |
589 | - gchar *title; |
590 | - gchar *description; |
591 | - gchar *creation_date; |
592 | - gchar *author; |
593 | -} result_t; |
594 | - |
595 | -#endif |
596 | |
597 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/menu.json' |
598 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/menu.json 2013-06-24 13:42:17 +0000 |
599 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/menu.json 2013-06-25 19:33:25 +0000 |
600 | @@ -9,9 +9,7 @@ |
601 | { |
602 | "name": "check", |
603 | "id": "Ubuntu.Make.Check", |
604 | - "parent": "Build", |
605 | "projectRequired": true, |
606 | - "group": "ProjectExplorer.Group.Run", |
607 | "actions": [ |
608 | "%SCRIPTDIRECTORY%/qtc_project_make check" |
609 | ] |
610 | @@ -19,12 +17,26 @@ |
611 | { |
612 | "name": "autopilot", |
613 | "id": "Ubuntu.Make.Autopilot", |
614 | - "parent": "Build", |
615 | "projectRequired": true, |
616 | - "group": "ProjectExplorer.Group.Run", |
617 | "actions": [ |
618 | "%SCRIPTDIRECTORY%/qtc_project_make autopilot" |
619 | ] |
620 | + }, |
621 | + { |
622 | + "name": "install", |
623 | + "id": "Ubuntu.Make.Install", |
624 | + "projectRequired": true, |
625 | + "actions": [ |
626 | + "%SCRIPTDIRECTORY%/qtc_project_make install" |
627 | + ] |
628 | + }, |
629 | + { |
630 | + "name": "uninstall", |
631 | + "id": "Ubuntu.Make.Uninstall", |
632 | + "projectRequired": true, |
633 | + "actions": [ |
634 | + "%SCRIPTDIRECTORY%/qtc_project_make uninstall" |
635 | + ] |
636 | } |
637 | ] |
638 | }, |
639 | @@ -78,7 +90,7 @@ |
640 | "saveRequired": true, |
641 | "actions": [ |
642 | "%SCRIPTDIRECTORY%/qtc_project_create_package", |
643 | - "%SCRIPTDIRECTORY%/qtc_device_deploy_package %SERIALNUMBER% ../%FOLDERNAME%*.deb phablet@127.0.0.1 2222 /home/phablet" |
644 | + "%SCRIPTDIRECTORY%/qtc_device_deploy_package %SERIALNUMBER% ../%FOLDERNAME%_*.deb phablet@127.0.0.1 2222 /home/phablet" |
645 | ] |
646 | }, |
647 | { |
648 | @@ -168,12 +180,34 @@ |
649 | "submenu": [ |
650 | { |
651 | "name": "Ubuntu Touch Showcase Gallery", |
652 | + "keysequence": "Ctrl+Shift+S", |
653 | "id": "Ubuntu.Menu.Showcase", |
654 | "actions": [ |
655 | "%SCRIPTDIRECTORY%/qtc_launch_gallery" |
656 | ] |
657 | }, |
658 | { |
659 | + "name": "Take a screenshot", |
660 | + "id": "Ubuntu.Menu.Screenshot", |
661 | + "keysequence": "Ctrl+Shift+P", |
662 | + "deviceRequired": true, |
663 | + "actions": [ |
664 | + "adb -s %SERIALNUMBER% root", |
665 | + "adb -s %SERIALNUMBER% shell /system/bin/screencap -p /sdcard/screenshot.png", |
666 | + "adb -s %SERIALNUMBER% pull /sdcard/screenshot.png screenshot.png", |
667 | + "eog -s %SERIALNUMBER% screenshot.png" |
668 | + ] |
669 | + }, |
670 | + { |
671 | + "name": "Mount Device Filesystem", |
672 | + "id": "Ubuntu.Menu.MountDeviceFileSystem", |
673 | + "keysequence": "Ctrl+Shift+F1", |
674 | + "deviceRequired": true, |
675 | + "actions": [ |
676 | + "nautilus ssh://phablet@127.0.0.1:2222" |
677 | + ] |
678 | + }, |
679 | + { |
680 | "name": "Translations", |
681 | "id": "Ubuntu.Menu.i18n", |
682 | "submenu": [ |
683 | @@ -360,18 +394,6 @@ |
684 | "actions": [ |
685 | "%SCRIPTDIRECTORY%/device_set_persist-sys-usb-config %SERIALNUMBER%" |
686 | ] |
687 | - }, |
688 | - { |
689 | - "name": "Take a screenshot", |
690 | - "id": "Ubuntu.Menu.Device.Screenshot", |
691 | - "keysequence": "Ctrl+Shift+P", |
692 | - "deviceRequired": true, |
693 | - "actions": [ |
694 | - "adb -s %SERIALNUMBER% root", |
695 | - "adb -s %SERIALNUMBER% shell /system/bin/screencap -p /sdcard/screenshot.png", |
696 | - "adb -s %SERIALNUMBER% pull /sdcard/screenshot.png screenshot.png", |
697 | - "eog -s %SERIALNUMBER% screenshot.png" |
698 | - ] |
699 | } |
700 | ] |
701 | } |
702 | |
703 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_flashdaily' |
704 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_flashdaily 2013-05-01 23:49:31 +0000 |
705 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_flashdaily 2013-06-25 19:33:25 +0000 |
706 | @@ -14,10 +14,24 @@ |
707 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
708 | # |
709 | # Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
710 | -set -e; |
711 | - |
712 | -SERIALNUMBER=$1 |
713 | - |
714 | -adb -s ${SERIALNUMBER} root |
715 | -adb -s ${SERIALNUMBER} wait-for-device |
716 | -x-terminal-emulator -e "bash -ic 'phablet-flash -s ${SERIALNUMBER}'" |
717 | + |
718 | +. `dirname $0`/functions.inc |
719 | + |
720 | +if [[ !does_device_hw_match_image_hw ]]; then |
721 | + IMAGE_HARDWARE=`device_image_hardware` |
722 | + DEVICE_HARDWARE=`device_hardware` |
723 | + echo |
724 | + echo " WARNING! Device image hardware version" |
725 | + echo " does not match the detected device hardware." |
726 | + echo |
727 | + echo -n " Device Image Version: " |
728 | + echo ${IMAGE_HARDWARE} |
729 | + echo -n " Device Version: " |
730 | + echo ${DEVICE_HARDWARE} |
731 | + echo |
732 | + echo " In order to flash your device, you must do it manually:" |
733 | + echo " phablet-flash -s ${SERIALNUMBER} -d ${IMAGE_HARDWARE}" |
734 | + echo |
735 | +else |
736 | + x-terminal-emulator -e "bash -ic 'phablet-flash -s ${SERIALNUMBER}'" |
737 | +fi |
738 | \ No newline at end of file |
739 | |
740 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_flashdaily_bootstrap' |
741 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_flashdaily_bootstrap 2013-05-01 23:49:31 +0000 |
742 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_flashdaily_bootstrap 2013-06-25 19:33:25 +0000 |
743 | @@ -14,10 +14,24 @@ |
744 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
745 | # |
746 | # Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
747 | -set -e; |
748 | - |
749 | -SERIALNUMBER=$1 |
750 | - |
751 | -adb -s ${SERIALNUMBER} root |
752 | -adb -s ${SERIALNUMBER} wait-for-device |
753 | -x-terminal-emulator -e "bash -ic 'phablet-flash -b -s ${SERIALNUMBER}'" |
754 | + |
755 | +. `dirname $0`/functions.inc |
756 | + |
757 | +if [[ !does_device_hw_match_image_hw ]]; then |
758 | + IMAGE_HARDWARE=`device_image_hardware` |
759 | + DEVICE_HARDWARE=`device_hardware` |
760 | + echo |
761 | + echo " WARNING! Device image hardware version" |
762 | + echo " does not match the detected device hardware." |
763 | + echo |
764 | + echo -n " Device Image Version: " |
765 | + echo ${IMAGE_HARDWARE} |
766 | + echo -n " Device Version: " |
767 | + echo ${DEVICE_HARDWARE} |
768 | + echo |
769 | + echo " In order to flash your device, you must do it manually:" |
770 | + echo " phablet-flash -s ${SERIALNUMBER} -d ${IMAGE_HARDWARE} -b" |
771 | + echo |
772 | +else |
773 | + x-terminal-emulator -e "bash -ic 'phablet-flash -s ${SERIALNUMBER}' -b" |
774 | +fi |
775 | \ No newline at end of file |
776 | |
777 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_hasnetwork' |
778 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_hasnetwork 2013-05-01 18:19:31 +0000 |
779 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_hasnetwork 2013-06-25 19:33:25 +0000 |
780 | @@ -14,16 +14,7 @@ |
781 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
782 | # |
783 | # Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
784 | -set -e; |
785 | - |
786 | -SERIALNUMBER=$1 |
787 | - |
788 | -adb -s ${SERIALNUMBER} root &> /dev/null |
789 | -adb -s ${SERIALNUMBER} wait-for-device &> /dev/null |
790 | -NM_STATE=`adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin nmcli nm | head -n+2 | awk '{print $2}'` |
791 | -if [[ $NM_STATE != *disconnected* ]]; then |
792 | - echo "1" |
793 | -else |
794 | - echo "0" |
795 | -fi |
796 | - |
797 | + |
798 | +. `dirname $0`/functions.inc |
799 | + |
800 | +device_network_state_connected |
801 | |
802 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_network_clone' |
803 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_network_clone 2013-05-01 18:53:35 +0000 |
804 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_network_clone 2013-06-25 19:33:25 +0000 |
805 | @@ -14,17 +14,10 @@ |
806 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
807 | # |
808 | # Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
809 | -set -e; |
810 | - |
811 | -SERIALNUMBER=$1 |
812 | - |
813 | -gksudo phablet-network-setup -s ${SERIALNUMBER} |
814 | - |
815 | -SCRIPTPATH=`dirname $0` |
816 | -HASNETWORK=`${SCRIPTPATH}/device_hasnetwork ${SERIALNUMBER}` |
817 | -while [[ ${HASNETWORK} == "0" ]]; do |
818 | -sleep 1 |
819 | -echo -n . |
820 | -HASNETWORK=`${SCRIPTPATH}/device_hasnetwork ${SERIALNUMBER}` |
821 | -done |
822 | -echo "The device has connected to a network." |
823 | + |
824 | +. `dirname $0`/functions.inc |
825 | + |
826 | +clone_network_setup_from_host_to_device |
827 | +wait_for_network_state_switch_on |
828 | + |
829 | +echo "The device has connected to a network." |
830 | \ No newline at end of file |
831 | |
832 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_portforward' |
833 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_portforward 2013-05-01 18:19:31 +0000 |
834 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_portforward 2013-06-25 19:33:25 +0000 |
835 | @@ -14,9 +14,9 @@ |
836 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
837 | # |
838 | # Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
839 | -set -e; |
840 | - |
841 | -SERIALNUMBER=$1 |
842 | + |
843 | +. `dirname $0`/functions.inc |
844 | + |
845 | SSHPORT=$2 |
846 | QMLPORT=$3 |
847 | |
848 | @@ -28,7 +28,6 @@ |
849 | QMLPORT=3768 |
850 | fi |
851 | |
852 | -adb -s ${SERIALNUMBER} root &> /dev/null |
853 | -adb -s ${SERIALNUMBER} wait-for-device &> /dev/null |
854 | -adb -s ${SERIALNUMBER} forward tcp:$SSHPORT tcp:22 |
855 | -adb -s ${SERIALNUMBER} forward tcp:$QMLPORT tcp:3768 |
856 | +adb_forward_tcp ${SSHPORT} 22 |
857 | +adb_forward_tcp ${QMLPORT} 3768 |
858 | + |
859 | |
860 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_reboot' |
861 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_reboot 2013-05-01 18:19:31 +0000 |
862 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_reboot 2013-06-25 19:33:25 +0000 |
863 | @@ -14,10 +14,7 @@ |
864 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
865 | # |
866 | # Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
867 | -set -e; |
868 | - |
869 | -SERIALNUMBER=$1 |
870 | - |
871 | -adb -s ${SERIALNUMBER} root &> /dev/null |
872 | -adb -s ${SERIALNUMBER} wait-for-device &> /dev/null |
873 | -adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin reboot |
874 | + |
875 | +. `dirname $0`/functions.inc |
876 | + |
877 | +device_reboot |
878 | |
879 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_reboot2bootloader' |
880 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_reboot2bootloader 2013-05-01 18:19:31 +0000 |
881 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_reboot2bootloader 2013-06-25 19:33:25 +0000 |
882 | @@ -14,10 +14,8 @@ |
883 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
884 | # |
885 | # Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
886 | -set -e; |
887 | - |
888 | -SERIALNUMBER=$1 |
889 | - |
890 | -adb -s ${SERIALNUMBER} root &> /dev/null |
891 | -adb -s ${SERIALNUMBER} wait-for-device &> /dev/null |
892 | -adb -s ${SERIALNUMBER} reboot-bootloader |
893 | + |
894 | +. `dirname $0`/functions.inc |
895 | + |
896 | +device_reboot_bootloader |
897 | + |
898 | |
899 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_reboot2recovery' |
900 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_reboot2recovery 2013-05-01 18:19:31 +0000 |
901 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_reboot2recovery 2013-06-25 19:33:25 +0000 |
902 | @@ -14,10 +14,7 @@ |
903 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
904 | # |
905 | # Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
906 | -set -e; |
907 | - |
908 | -SERIALNUMBER=$1 |
909 | - |
910 | -adb -s ${SERIALNUMBER} root &> /dev/null |
911 | -adb -s ${SERIALNUMBER} wait-for-device &> /dev/null |
912 | -adb -s ${SERIALNUMBER} reboot recovery |
913 | + |
914 | +. `dirname $0`/functions.inc |
915 | + |
916 | +device_reboot_recovery |
917 | |
918 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_rootshell' |
919 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_rootshell 2013-05-01 18:19:31 +0000 |
920 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_rootshell 2013-06-25 19:33:25 +0000 |
921 | @@ -14,10 +14,7 @@ |
922 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
923 | # |
924 | # Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
925 | -set -e; |
926 | - |
927 | -SERIALNUMBER=$1 |
928 | - |
929 | -adb -s ${SERIALNUMBER} root &> /dev/null |
930 | -adb -s ${SERIALNUMBER} wait-for-device &> /dev/null |
931 | -x-terminal-emulator -e "adb -s ${SERIALNUMBER} shell ubuntu_chroot shell" |
932 | + |
933 | +. `dirname $0`/functions.inc |
934 | + |
935 | +adb_shell |
936 | |
937 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_search' |
938 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_search 2013-06-03 14:59:43 +0000 |
939 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_search 2013-06-25 19:33:25 +0000 |
940 | @@ -14,7 +14,7 @@ |
941 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
942 | # |
943 | # Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
944 | -set -e; |
945 | + |
946 | adb kill-server &> /dev/null |
947 | adb start-server &> /dev/null |
948 | adb devices -l |
949 | |
950 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_set_persist-sys-usb-config' |
951 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_set_persist-sys-usb-config 2013-05-01 18:19:31 +0000 |
952 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_set_persist-sys-usb-config 2013-06-25 19:33:25 +0000 |
953 | @@ -15,6 +15,6 @@ |
954 | # |
955 | # Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
956 | |
957 | -SERIALNUMBER=$1 |
958 | +. `dirname $0`/functions.inc |
959 | |
960 | -adb -s ${SERIALNUMBER} shell setprop persist.sys.usb.config ptp,adb |
961 | +adb_shell setprop persist.sys.usb.config ptp,adb |
962 | |
963 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_shutdown' |
964 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_shutdown 2013-05-01 18:19:31 +0000 |
965 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_shutdown 2013-06-25 19:33:25 +0000 |
966 | @@ -14,10 +14,7 @@ |
967 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
968 | # |
969 | # Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
970 | -set -e; |
971 | - |
972 | -SERIALNUMBER=$1 |
973 | - |
974 | -adb -s ${SERIALNUMBER} root &> /dev/null |
975 | -adb -s ${SERIALNUMBER} wait-for-device &> /dev/null |
976 | -adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin shutdown -h now |
977 | + |
978 | +. `dirname $0`/functions.inc |
979 | + |
980 | +device_shutdown |
981 | |
982 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_time_clone' |
983 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_time_clone 2013-05-01 18:19:31 +0000 |
984 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_time_clone 2013-06-25 19:33:25 +0000 |
985 | @@ -14,16 +14,16 @@ |
986 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
987 | # |
988 | # Author: Zoltán Balogh <zoltan.balogh@canonical.com> |
989 | -set -e |
990 | - |
991 | -SERIALNUMBER=$1 |
992 | - |
993 | -ADB="adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin" |
994 | +# Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
995 | + |
996 | +. `dirname $0`/functions.inc |
997 | + |
998 | LOCAL_DATE=`date +%Y%m%d` |
999 | LOCAL_TIME=`date +%T` |
1000 | TIMEZONE=`cat /etc/timezone` |
1001 | -${ADB} sed -i "s#.*/.*#${TIMEZONE=}#" /etc/timezone |
1002 | -${ADB} dpkg-reconfigure --frontend noninteractive tzdata >/dev/null |
1003 | -${ADB} date +%Y%m%d -s "${LOCAL_DATE}" >/dev/null |
1004 | -${ADB} date +%T -s "${LOCAL_TIME}" >/dev/null |
1005 | + |
1006 | +adb_shell sed -i "s#.*/.*#${TIMEZONE=}#" /etc/timezone |
1007 | +adb_shell dpkg-reconfigure --frontend noninteractive tzdata > /dev/null |
1008 | +adb_shell date +%Y%m%d -s "${LOCAL_DATE}" > /dev/null |
1009 | +adb_shell date +%T -s "${LOCAL_TIME}" > /dev/null |
1010 | |
1011 | |
1012 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_version' |
1013 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_version 2013-05-01 18:19:31 +0000 |
1014 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_version 2013-06-25 19:33:25 +0000 |
1015 | @@ -14,10 +14,8 @@ |
1016 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
1017 | # |
1018 | # Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
1019 | -set -e; |
1020 | - |
1021 | -SERIALNUMBER=$1 |
1022 | - |
1023 | -adb -s ${SERIALNUMBER} root &> /dev/null |
1024 | -adb -s ${SERIALNUMBER} wait-for-device &> /dev/null |
1025 | -adb -s ${SERIALNUMBER} shell cat /system/*ubuntu_stamp |
1026 | + |
1027 | +. `dirname $0`/functions.inc |
1028 | + |
1029 | +device_image_hardware |
1030 | +device_image_version |
1031 | |
1032 | === added file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/functions.inc' |
1033 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/functions.inc 1970-01-01 00:00:00 +0000 |
1034 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/functions.inc 2013-06-25 19:33:25 +0000 |
1035 | @@ -0,0 +1,137 @@ |
1036 | +#!/bin/bash |
1037 | +# Copyright 2013 Canonical Ltd. |
1038 | +# |
1039 | +# This program is free software; you can redistribute it and/or modify |
1040 | +# it under the terms of the GNU Lesser General Public License as published by |
1041 | +# the Free Software Foundation; version 2.1. |
1042 | +# |
1043 | +# This program is distributed in the hope that it will be useful, |
1044 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1045 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1046 | +# GNU Lesser General Public License for more details. |
1047 | +# |
1048 | +# You should have received a copy of the GNU Lesser General Public License |
1049 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
1050 | +# |
1051 | +# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
1052 | + |
1053 | +set -e |
1054 | + |
1055 | +SCRIPTPATH=`dirname $0` |
1056 | +SERIALNUMBER=$1 |
1057 | +SSHIDENTITY=~/.ssh/ubuntudevice_${SERIALNUMBER}_id_rsa |
1058 | +USERNAME=phablet |
1059 | + |
1060 | +function adb_root { |
1061 | + adb -s ${SERIALNUMBER} root &> /dev/null |
1062 | + adb -s ${SERIALNUMBER} wait-for-device &> /dev/null |
1063 | +} |
1064 | + |
1065 | +function has_ubuntu_chroot { |
1066 | + local HAS_UBUNTU_CHROOT=`adb -s ${SERIALNUMBER} shell "which ubuntu_chroot"` |
1067 | + if [[ ${HAS_UBUNTU_CHROOT} ]]; then |
1068 | + echo 1 |
1069 | + else |
1070 | + echo 0 |
1071 | + fi |
1072 | +} |
1073 | + |
1074 | +function adbd_restart { |
1075 | + adb kill-server &> /dev/null |
1076 | + adb start-server &> /dev/null |
1077 | +} |
1078 | + |
1079 | +function adb_devices { |
1080 | + adb devices -l |
1081 | +} |
1082 | + |
1083 | +function adb_forward_tcp { |
1084 | +set +e |
1085 | + adb -s ${SERIALNUMBER} forward tcp:$1 tcp:$2 |
1086 | +set -e |
1087 | +} |
1088 | + |
1089 | +function adb_shell { |
1090 | +set +e |
1091 | + if [[ `has_ubuntu_chroot` -eq "1" ]]; then |
1092 | + adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin $@ |
1093 | + else |
1094 | + adb -s ${SERIALNUMBER} shell $@ |
1095 | + fi |
1096 | +} |
1097 | + |
1098 | +function phablet_shell { |
1099 | + adb_shell "su ${USERNAME} -c \"$@\"" |
1100 | +} |
1101 | + |
1102 | +function ubuntu_stamp { |
1103 | + adb_shell cat /system/*ubuntu_stamp |
1104 | +} |
1105 | + |
1106 | +function device_hardware { |
1107 | + adb_devices |grep -o device:.*|sed "s/device://" |
1108 | +} |
1109 | + |
1110 | +function device_image_hardware { |
1111 | + ubuntu_stamp | grep HARDWARE|sed "s/HARDWARE=//g" |
1112 | +} |
1113 | + |
1114 | +function does_device_hw_match_image_hw { |
1115 | + if [[ device_hardware == device_image_hardware ]]; then |
1116 | + echo 1 |
1117 | + else |
1118 | + echo 0 |
1119 | + fi |
1120 | +} |
1121 | + |
1122 | +function device_image_version { |
1123 | + ubuntu_stamp | grep JENKINS|sed "s/JENKINS_BUILD=//g" |
1124 | +} |
1125 | + |
1126 | +function device_network_state_connected { |
1127 | + local NM_STATE=`adb_shell nmcli nm | head -n+2 | awk '{print $2}'` |
1128 | + if [[ $NM_STATE != *disconnected* ]]; then |
1129 | + echo 1 |
1130 | + else |
1131 | + echo 0 |
1132 | + fi |
1133 | +} |
1134 | + |
1135 | +function device_reboot { |
1136 | + adb_shell reboot |
1137 | +} |
1138 | + |
1139 | +function device_reboot_bootloader { |
1140 | + adb -s ${SERIALNUMBER} reboot-bootloader |
1141 | +} |
1142 | + |
1143 | +function device_reboot_recovery { |
1144 | + adb -s ${SERIALNUMBER} reboot recovery |
1145 | +} |
1146 | + |
1147 | +function device_shutdown { |
1148 | + adb_shell shutdown -h now |
1149 | +} |
1150 | + |
1151 | +function wait_for_network_state_switch_on { |
1152 | + local RESULT=`device_network_state_connected` |
1153 | + while [[ "$RESULT" -eq "0" ]]; do |
1154 | + sleep 1 |
1155 | + echo -n . |
1156 | + RESULT=`device_network_state_connected` |
1157 | + done |
1158 | +} |
1159 | + |
1160 | +function clone_network_setup_from_host_to_device { |
1161 | + gksudo phablet-network-setup -s ${SERIALNUMBER} |
1162 | +} |
1163 | + |
1164 | +############################################################# |
1165 | +if [[ -z ${SERIALNUMBER} ]]; then |
1166 | + echo "Please pass a device serial number." |
1167 | + echo |
1168 | + adb_devices |
1169 | + exit -1 |
1170 | +fi |
1171 | + |
1172 | +adb_root |
1173 | |
1174 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_connect' |
1175 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_connect 2013-05-02 21:46:53 +0000 |
1176 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_connect 2013-06-25 19:33:25 +0000 |
1177 | @@ -14,14 +14,12 @@ |
1178 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
1179 | # |
1180 | # Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
1181 | -set -e; |
1182 | - |
1183 | -SERIALNUMBER=$1 |
1184 | + |
1185 | +. `dirname $0`/functions.inc |
1186 | + |
1187 | PORT=$2 |
1188 | USERNAME=$3 |
1189 | -SCRIPTPATH=`dirname $0` |
1190 | -SSHIDENTITY=~/.ssh/ubuntudevice_${SERIALNUMBER}_id_rsa |
1191 | - |
1192 | -${SCRIPTPATH}/device_portforward ${SERIALNUMBER} ${PORT} 3768 |
1193 | - |
1194 | -x-terminal-emulator -e "ssh -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p $PORT $USERNAME@127.0.0.1 bash -i" & |
1195 | + |
1196 | +#$SCRIPTPATH/device_portforward ${PORT} 3768 |
1197 | + |
1198 | +x-terminal-emulator -e "ssh -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p $PORT $USERNAME@127.0.0.1" & |
1199 | |
1200 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_install' |
1201 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_install 2013-05-01 18:19:31 +0000 |
1202 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_install 2013-06-25 19:33:25 +0000 |
1203 | @@ -14,9 +14,7 @@ |
1204 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
1205 | # |
1206 | # Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
1207 | -set -e; |
1208 | - |
1209 | -SERIALNUMBER=$1 |
1210 | - |
1211 | -SCRIPTPATH=`dirname $0` |
1212 | + |
1213 | +. `dirname $0`/functions.inc |
1214 | + |
1215 | ${SCRIPTPATH}/qtc_device_developertools ${SERIALNUMBER} |
1216 | |
1217 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_publickey' |
1218 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_publickey 2013-05-01 22:36:21 +0000 |
1219 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_publickey 2013-06-25 19:33:25 +0000 |
1220 | @@ -14,41 +14,51 @@ |
1221 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
1222 | # |
1223 | # Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
1224 | -set -e; |
1225 | - |
1226 | -USERNAME=$1 |
1227 | -SERIALNUMBER=$2 |
1228 | -KEYPATH=~/.ssh/ubuntudevice_${SERIALNUMBER}_id_rsa |
1229 | - |
1230 | -SHELL="adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin" |
1231 | + |
1232 | +. `dirname $0`/functions.inc |
1233 | + |
1234 | +USERNAME=$2 |
1235 | |
1236 | function check_key { |
1237 | - |
1238 | -KEY=`cat $KEYPATH.pub` |
1239 | -KEYS=`$SHELL su -c "cat ~/.ssh/authorized_keys2 | grep '$KEY'" $USERNAME` |
1240 | -if [[ -z $KEYS || $KEYS == *No\ such* ]]; then |
1241 | - echo "Deploying key.." |
1242 | - deploy_key |
1243 | -else |
1244 | - echo "Key has been already deployed" |
1245 | -fi |
1246 | + echo "Checking for keys.." |
1247 | + KEY=`cat $SSHIDENTITY.pub` |
1248 | + set +e |
1249 | + PHABLET_KEYS=`adb_shell "cat /home/phablet/.ssh/authorized_keys2"` |
1250 | + KEYS=`echo $PHABLET_KEYS | grep "$KEY"` |
1251 | + set -e |
1252 | + echo |
1253 | + echo "Host key is:" |
1254 | + echo $KEY |
1255 | + echo |
1256 | + echo "We have following keys on the device: " |
1257 | + echo $KEYS |
1258 | + if [[ -z $KEYS || $KEYS == *No\ such* ]]; then |
1259 | + echo "*no keys*" |
1260 | + echo |
1261 | + deploy_key |
1262 | + else |
1263 | + echo |
1264 | + echo "The host key has been already deployed." |
1265 | + fi |
1266 | } |
1267 | |
1268 | function deploy_key { |
1269 | - KEY=`cat $KEYPATH.pub` |
1270 | -$SHELL su -c "mkdir -p ~/.ssh" $USERNAME |
1271 | -$SHELL su -c "echo $KEY >> ~/.ssh/authorized_keys2" $USERNAME |
1272 | + echo "Deploy the host key to the device.." |
1273 | + KEY=`cat $SSHIDENTITY.pub` |
1274 | + phablet_shell "mkdir -p /home/phablet/.ssh" |
1275 | + echo "..key folder created" |
1276 | + phablet_shell "echo $KEY >> /home/phablet/.ssh/authorized_keys2" |
1277 | + echo "..key deployed!" |
1278 | } |
1279 | |
1280 | function generate_key { |
1281 | -ssh-keygen -t rsa -N '' -f $KEYPATH -b 768 |
1282 | + echo "Generating host key.." |
1283 | + ssh-keygen -t rsa -N '' -f $SSHIDENTITY -b 768 |
1284 | } |
1285 | |
1286 | ################# |
1287 | -adb -s ${SERIALNUMBER} root &> /dev/null |
1288 | -adb -s ${SERIALNUMBER} wait-for-device > /dev/null |
1289 | |
1290 | -if [[ -f $KEYPATH ]]; then |
1291 | +if [[ -f $SSHIDENTITY ]]; then |
1292 | check_key |
1293 | else |
1294 | generate_key |
1295 | |
1296 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_remove' |
1297 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_remove 2013-05-01 18:19:31 +0000 |
1298 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_remove 2013-06-25 19:33:25 +0000 |
1299 | @@ -14,12 +14,9 @@ |
1300 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
1301 | # |
1302 | # Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
1303 | -set -e; |
1304 | - |
1305 | -SERIALNUMBER=$1 |
1306 | - |
1307 | -adb -s ${SERIALNUMBER} root &> /dev/null |
1308 | -adb -s ${SERIALNUMBER} wait-for-device &> /dev/null |
1309 | -adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin apt-get remove openssh-server -y |
1310 | + |
1311 | +. `dirname $0`/functions.inc |
1312 | + |
1313 | +adb_shell apt-get remove openssh-server -y |
1314 | |
1315 | |
1316 | |
1317 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_version' |
1318 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_version 2013-05-01 22:44:56 +0000 |
1319 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_version 2013-06-25 19:33:25 +0000 |
1320 | @@ -14,13 +14,9 @@ |
1321 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
1322 | # |
1323 | # Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
1324 | -#set -e; |
1325 | - |
1326 | -SERIALNUMBER=$1 |
1327 | - |
1328 | -adb -s ${SERIALNUMBER} root &> /dev/null |
1329 | -adb -s ${SERIALNUMBER} wait-for-device &> /dev/null |
1330 | -adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin apt-get -f install &> /dev/null |
1331 | -adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin apt-cache policy openssh-server|grep Installed|sed "s/Installed\://g" |
1332 | - |
1333 | + |
1334 | +. `dirname $0`/functions.inc |
1335 | + |
1336 | +adb_shell apt-get -f install &> /dev/null |
1337 | +adb_shell apt-cache policy openssh-server|grep Installed|sed "s/Installed\://g" |
1338 | |
1339 | |
1340 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_buildanddeploypackage' |
1341 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_buildanddeploypackage 2013-05-02 21:46:53 +0000 |
1342 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_buildanddeploypackage 2013-06-25 19:33:25 +0000 |
1343 | @@ -14,34 +14,30 @@ |
1344 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
1345 | # |
1346 | # Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
1347 | -set -e; |
1348 | - |
1349 | -SERIALNUMBER=$1 |
1350 | + |
1351 | +. `dirname $0`/functions.inc |
1352 | + |
1353 | FOLDERNAME=$2 |
1354 | TARGET_DEVICE=$3 |
1355 | TARGET_DEVICE_PORT=$4 |
1356 | TARGET_DEVICE_HOME=$5 |
1357 | -SSHIDENTITY=~/.ssh/ubuntudevice_${SERIALNUMBER}_id_rsa |
1358 | |
1359 | if [[ -z ${TARGET_DEVICE_PORT} ]]; then |
1360 | - TARGET_DEVICE_PORT=2222 |
1361 | + TARGET_DEVICE_PORT=2222 |
1362 | fi |
1363 | |
1364 | if [[ -z ${TARGET_DEVICE} ]]; then |
1365 | - TARGET_DEVICE=phablet@127.0.0.1 |
1366 | + TARGET_DEVICE=phablet@127.0.0.1 |
1367 | fi |
1368 | |
1369 | if [[ -z ${TARGET_DEVICE_HOME} ]]; then |
1370 | - TARGET_DEVICE_HOME=/home/phablet/dev_tmp |
1371 | + TARGET_DEVICE_HOME=/home/phablet/dev_tmp |
1372 | fi |
1373 | |
1374 | SCP="scp -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -P${TARGET_DEVICE_PORT}" |
1375 | SSH="ssh -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p${TARGET_DEVICE_PORT} ${TARGET_DEVICE}" |
1376 | -ADB="adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin" |
1377 | - |
1378 | -SCRIPTPATH=`dirname $0` |
1379 | |
1380 | ${SCRIPTPATH}/qtc_device_buildpackage ${SERIALNUMBER} ${FOLDERNAME} |
1381 | |
1382 | FILES=`$SSH "cd ${TARGET_DEVICE_HOME}; ls -1 *.deb"` |
1383 | -echo $FILES | xargs -0 -I FILE $ADB gdebi --n ${TARGET_DEVICE_HOME}/FILE |
1384 | +echo $FILES | xargs -0 -I FILE adb_shell gdebi --n ${TARGET_DEVICE_HOME}/FILE |
1385 | |
1386 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_buildpackage' |
1387 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_buildpackage 2013-05-02 21:46:53 +0000 |
1388 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_buildpackage 2013-06-25 19:33:25 +0000 |
1389 | @@ -15,7 +15,6 @@ |
1390 | # |
1391 | # Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
1392 | |
1393 | - |
1394 | DEBEMAIL=`grep -G "^DEBEMAIL" ~/.bashrc` |
1395 | DEBFULLNAME=`grep -G "^DEBFULLNAME" ~/.bashrc` |
1396 | |
1397 | @@ -36,40 +35,34 @@ |
1398 | fi |
1399 | fi |
1400 | |
1401 | -set -e |
1402 | +. `dirname $0`/functions.inc |
1403 | |
1404 | -SERIALNUMBER=$1 |
1405 | FOLDERNAME=$2 |
1406 | TARGET_DEVICE=$3 |
1407 | TARGET_DEVICE_PORT=$4 |
1408 | TARGET_DEVICE_HOME=$5 |
1409 | |
1410 | USAGE="$0 [serialnumber] [foldername] [target_device] [target_device_port] [target_device_home]" |
1411 | -SSHIDENTITY=~/.ssh/ubuntudevice_${SERIALNUMBER}_id_rsa |
1412 | |
1413 | if [[ -z $FOLDERNAME ]]; then |
1414 | - echo ${USAGE} |
1415 | - exit |
1416 | + echo ${USAGE} |
1417 | + exit |
1418 | fi |
1419 | |
1420 | if [[ -z ${TARGET_DEVICE_PORT} ]]; then |
1421 | - TARGET_DEVICE_PORT=2222 |
1422 | + TARGET_DEVICE_PORT=2222 |
1423 | fi |
1424 | |
1425 | if [[ -z ${TARGET_DEVICE} ]]; then |
1426 | - TARGET_DEVICE=phablet@127.0.0.1 |
1427 | + TARGET_DEVICE=phablet@127.0.0.1 |
1428 | fi |
1429 | |
1430 | if [[ -z ${TARGET_DEVICE_HOME} ]]; then |
1431 | - TARGET_DEVICE_HOME=/home/phablet/dev_tmp |
1432 | + TARGET_DEVICE_HOME=/home/phablet/dev_tmp |
1433 | fi |
1434 | |
1435 | SCP="scp -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -P${TARGET_DEVICE_PORT}" |
1436 | SSH="ssh -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p${TARGET_DEVICE_PORT} ${TARGET_DEVICE}" |
1437 | -ADB="adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin " |
1438 | -SCRIPTPATH=`dirname $0` |
1439 | - |
1440 | -${SCRIPTPATH}/device_portforward ${SERIALNUMBER} ${TARGET_DEVICE_PORT} 3768 |
1441 | |
1442 | pushd ${FOLDERNAME} |
1443 | set +e |
1444 | @@ -101,7 +94,7 @@ |
1445 | |
1446 | MISSING_DEPENDENCIES=`$SSH "cd ${TARGET_DEVICE_HOME}/${FOLDERNAME}; dpkg-checkbuilddeps 2>&1|sed 's/dpkg-checkbuilddeps: Unmet build dependencies://'"` |
1447 | |
1448 | -$ADB apt-get --assume-yes install ${MISSING_DEPENDENCIES} |
1449 | +adb_shell apt-get --assume-yes install ${MISSING_DEPENDENCIES} |
1450 | |
1451 | $SSH "cd ${TARGET_DEVICE_HOME}/${FOLDERNAME}; dpkg-buildpackage -us -uc -nc" |
1452 | |
1453 | @@ -115,4 +108,4 @@ |
1454 | echo |
1455 | echo "@ $PWD" |
1456 | echo |
1457 | -$ADB apt-get --assume-yes remove ${MISSING_DEPENDENCIES} |
1458 | +adb_shell apt-get --assume-yes remove ${MISSING_DEPENDENCIES} |
1459 | |
1460 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_close_all_apps' |
1461 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_close_all_apps 2013-05-01 18:19:31 +0000 |
1462 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_close_all_apps 2013-06-25 19:33:25 +0000 |
1463 | @@ -14,23 +14,35 @@ |
1464 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
1465 | # |
1466 | # Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
1467 | -#set -e; |
1468 | -#set -x |
1469 | - |
1470 | -SERIALNUMBER=$1 |
1471 | + |
1472 | +. `dirname $0`/functions.inc |
1473 | + |
1474 | APPLICATION=$2 |
1475 | -ADB="adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin" |
1476 | |
1477 | if [[ -z ${APPLICATION} ]]; then |
1478 | - ${ADB} kill -s 9 \`pidof qmlscene\` |
1479 | + echo "Close all instances of running applications." |
1480 | + adb_shell kill -s 9 \`pidof qmlscene\` |
1481 | else |
1482 | - IS_MOUNTED=`${ADB} mount | grep proc` |
1483 | - if [[ -z ${IS_MOUNTED} ]]; then |
1484 | - ${ADB} mount -t proc proc /proc |
1485 | - fi |
1486 | - PID_OF_APP=`${ADB} COLUMNS=1000 ps -ef|grep qmlscene|grep ${APPLICATION}|awk '{print $2}'` |
1487 | - ${ADB} kill -s 9 ${PID_OF_APP} |
1488 | - if [[ -z ${IS_MOUNTED} ]]; then |
1489 | - ${ADB} umount /proc |
1490 | - fi |
1491 | + echo "Close the ${APPLICATION}." |
1492 | + set +e |
1493 | + IS_MOUNTED=`adb_shell mount | grep proc` |
1494 | + set -e |
1495 | + if [[ -z ${IS_MOUNTED} ]]; then |
1496 | + adb_shell mount -t proc proc /proc |
1497 | + fi |
1498 | + |
1499 | + PID_OF_APP=`adb_shell COLUMNS=1000 ps -ef|grep qmlscene|grep ${APPLICATION}|awk '{print $2}'` |
1500 | + if [[ -z $PID_OF_APP ]]; then |
1501 | + echo " *no running instances of application*" |
1502 | + exit 1 |
1503 | + fi |
1504 | + |
1505 | + echo " * application pid(s) is ${PID_OF_APP}." |
1506 | + |
1507 | + adb_shell kill -s 9 ${PID_OF_APP} |
1508 | + |
1509 | + if [[ -z ${IS_MOUNTED} ]]; then |
1510 | + adb_shell umount /proc |
1511 | + fi |
1512 | + echo "Application has been closed." |
1513 | fi |
1514 | |
1515 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_deploy_package' |
1516 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_deploy_package 2013-06-12 08:00:14 +0000 |
1517 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_deploy_package 2013-06-25 19:33:25 +0000 |
1518 | @@ -14,16 +14,14 @@ |
1519 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
1520 | # |
1521 | # Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
1522 | -set -e; |
1523 | - |
1524 | -SERIALNUMBER=$1 |
1525 | + |
1526 | +. `dirname $0`/functions.inc |
1527 | + |
1528 | PACKAGE=$2 |
1529 | TARGET_DEVICE=$3 |
1530 | TARGET_DEVICE_PORT=$4 |
1531 | TARGET_DEVICE_HOME=$5 |
1532 | |
1533 | -SSHIDENTITY=~/.ssh/ubuntudevice_${SERIALNUMBER}_id_rsa |
1534 | - |
1535 | echo |
1536 | echo "Deploying package to device with serial number of ${SERIALNUMBER}." |
1537 | echo "Using SSH identity from ${SSHIDENTITY}." |
1538 | @@ -36,6 +34,12 @@ |
1539 | exit |
1540 | fi |
1541 | |
1542 | +# lets make the ssh port forwarding back on, as the developer might have rebooted the device |
1543 | +echo "do port forwarding" |
1544 | +set +e |
1545 | +${SCRIPTPATH}/device_portforward ${TARGET_DEVICE_PORT} 3768 |
1546 | +set -e |
1547 | +echo "done" |
1548 | # check if we have .pro files or cpp/h files, if we do lets exit, as this deployment method is for QML projects |
1549 | H_FILES=`find . -name *.h` |
1550 | CPP_FILES=`find . -name *.cpp` |
1551 | @@ -53,13 +57,10 @@ |
1552 | PLAIN_PACKAGE=`basename ${PACKAGE}` |
1553 | SCRIPTPATH=`dirname $0` |
1554 | |
1555 | -${SCRIPTPATH}/device_portforward ${SERIALNUMBER} ${TARGET_DEVICE_PORT} 3768 |
1556 | - |
1557 | SCP="scp -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -P${TARGET_DEVICE_PORT}" |
1558 | SSH="ssh -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p${TARGET_DEVICE_PORT} ${TARGET_DEVICE}" |
1559 | -ADB="adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin" |
1560 | |
1561 | # -- actions -- |
1562 | $SCP ${PACKAGE} ${TARGET_DEVICE}:${TARGET_DEVICE_HOME} |
1563 | -$ADB gdebi --n ${TARGET_DEVICE_HOME}/${PLAIN_PACKAGE} |
1564 | +adb_shell gdebi --n ${TARGET_DEVICE_HOME}/${PLAIN_PACKAGE} |
1565 | $SCRIPTPATH/qtc_device_restart_appslense ${SERIALNUMBER} |
1566 | |
1567 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_developertools' |
1568 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_developertools 2013-06-14 07:35:47 +0000 |
1569 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_developertools 2013-06-25 19:33:25 +0000 |
1570 | @@ -14,19 +14,9 @@ |
1571 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
1572 | # |
1573 | # Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
1574 | -set -e; |
1575 | - |
1576 | -SERIALNUMBER=$1 |
1577 | - |
1578 | -ADB="adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin" |
1579 | - |
1580 | -adb -s ${SERIALNUMBER} root |
1581 | -adb -s ${SERIALNUMBER} wait-for-device |
1582 | -adb -s ${SERIALNUMBER} forward tcp:2222 tcp:22 |
1583 | -adb -s ${SERIALNUMBER} forward tcp:3768 tcp:3768 |
1584 | -$ADB apt-get -y -f install |
1585 | -## Fix bug #1178242 |
1586 | -#$ADB apt-get install software-properties-common -y |
1587 | -#$ADB apt-add-repository ppa:canonical-qt5-edgers/qt5-proper -y |
1588 | -$ADB apt-get update |
1589 | -$ADB apt-get install gdebi-core fakeroot dh-make build-essential qt5-default qtbase5-dev libqt5v8-5-dev qtdeclarative5-dev libqt5xmlpatterns5-dev qtscript5-dev qttools5-dev qt3d5-dev qtmultimedia5-dev libqt5svg5-dev libqt5graphicaleffects5 qtdeclarative5-dev-tools qttools5-dev-tools qtlocation5-dev qtsensors5-dev qtpim5-dev qt-components-ubuntu ubuntu-dev-tools debhelper openssh-server -y |
1590 | + |
1591 | +. `dirname $0`/functions.inc |
1592 | + |
1593 | +adb_shell apt-get -y -f install |
1594 | +adb_shell apt-get update |
1595 | +adb_shell apt-get install gdebi-core fakeroot dh-make build-essential qt5-default qtbase5-dev libqt5v8-5-dev qtdeclarative5-dev libqt5xmlpatterns5-dev qtscript5-dev qttools5-dev qt3d5-dev qtmultimedia5-dev libqt5svg5-dev libqt5graphicaleffects5 qtdeclarative5-dev-tools qttools5-dev-tools qtlocation5-dev qtsensors5-dev qtpim5-dev qt-components-ubuntu ubuntu-dev-tools debhelper openssh-server -y |
1596 | |
1597 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_restart_appslense' |
1598 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_restart_appslense 2013-05-01 18:19:31 +0000 |
1599 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_restart_appslense 2013-06-25 19:33:25 +0000 |
1600 | @@ -14,11 +14,9 @@ |
1601 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
1602 | # |
1603 | # Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
1604 | -set -e; |
1605 | |
1606 | -SERIALNUMBER=$1 |
1607 | -ADB="adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin" |
1608 | +. `dirname $0`/functions.inc |
1609 | |
1610 | # -- actions -- |
1611 | -$ADB kill -s 9 \`pidof unity-applications-daemon\` |
1612 | -$ADB bash -c "/usr/lib/arm-linux-gnueabihf/unity-lens-applications/unity-applications-daemon > /dev/null &" |
1613 | +#adb_shell kill -s 9 \`pidof unity-applications-daemon\` |
1614 | +#adb_shell bash -c "/usr/lib/arm-linux-gnueabihf/unity-lens-applications/unity-applications-daemon > /dev/null &" |
1615 | |
1616 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_run_app' |
1617 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_run_app 2013-05-02 21:46:53 +0000 |
1618 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_run_app 2013-06-25 19:33:25 +0000 |
1619 | @@ -14,11 +14,9 @@ |
1620 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
1621 | # |
1622 | # Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
1623 | -set -e; |
1624 | -#set -x |
1625 | - |
1626 | -SERIALNUMBER=$1 |
1627 | -SSHIDENTITY=~/.ssh/ubuntudevice_${SERIALNUMBER}_id_rsa |
1628 | + |
1629 | +. `dirname $0`/functions.inc |
1630 | + |
1631 | FOLDERNAME=$2 |
1632 | DESKTOP_FILENAME=$3 |
1633 | MAIN_QML=$4 |
1634 | @@ -56,11 +54,9 @@ |
1635 | |
1636 | SCP="scp -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -P${TARGET_DEVICE_PORT}" |
1637 | SSH="ssh -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p${TARGET_DEVICE_PORT} ${TARGET_DEVICE}" |
1638 | -SCRIPTPATH=`dirname $0` |
1639 | + |
1640 | COMMAND="qmlscene ${TARGET_DEVICE_HOME}/${FOLDERNAME}/${MAIN_QML} --desktop_file_hint=${TARGET_DEVICE_DESKTOP_PATH}/${DESKTOP_FILENAME}" |
1641 | |
1642 | -${SCRIPTPATH}/device_portforward ${SERIALNUMBER} ${TARGET_DEVICE_PORT} 3768 |
1643 | - |
1644 | # make a tar package |
1645 | tar -cjf ${FOLDERNAME}.tar.bz2 ${FOLDERNAME} |
1646 | |
1647 | |
1648 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_launch_gallery' |
1649 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_launch_gallery 2013-06-06 15:59:11 +0000 |
1650 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_launch_gallery 2013-06-25 19:33:25 +0000 |
1651 | @@ -1,2 +1,18 @@ |
1652 | #!/bin/bash |
1653 | +# Copyright 2013 Canonical Ltd. |
1654 | +# |
1655 | +# This program is free software; you can redistribute it and/or modify |
1656 | +# it under the terms of the GNU Lesser General Public License as published by |
1657 | +# the Free Software Foundation; version 2.1. |
1658 | +# |
1659 | +# This program is distributed in the hope that it will be useful, |
1660 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1661 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1662 | +# GNU Lesser General Public License for more details. |
1663 | +# |
1664 | +# You should have received a copy of the GNU Lesser General Public License |
1665 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
1666 | +# |
1667 | +# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
1668 | + |
1669 | /usr/bin/qmlscene $@ /usr/lib/ubuntu-ui-toolkit/examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml & |
1670 | |
1671 | === modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_read_bazaar_settings' |
1672 | --- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_read_bazaar_settings 2013-06-03 19:25:13 +0000 |
1673 | +++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_read_bazaar_settings 2013-06-25 19:33:25 +0000 |
1674 | @@ -1,4 +1,19 @@ |
1675 | #!/bin/bash |
1676 | +# Copyright 2013 Canonical Ltd. |
1677 | +# |
1678 | +# This program is free software; you can redistribute it and/or modify |
1679 | +# it under the terms of the GNU Lesser General Public License as published by |
1680 | +# the Free Software Foundation; version 2.1. |
1681 | +# |
1682 | +# This program is distributed in the hope that it will be useful, |
1683 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1684 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1685 | +# GNU Lesser General Public License for more details. |
1686 | +# |
1687 | +# You should have received a copy of the GNU Lesser General Public License |
1688 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
1689 | +# |
1690 | +# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> |
1691 | |
1692 | DEBEMAIL=`grep -G "^DEBEMAIL" ~/.bashrc` |
1693 | DEBFULLNAME=`grep -G "^DEBFULLNAME" ~/.bashrc` |
1694 | |
1695 | === modified file 'ubuntu-qtcreator-plugins/src/plugins/ubuntu/ubuntudeviceswidget.cpp' |
1696 | --- ubuntu-qtcreator-plugins/src/plugins/ubuntu/ubuntudeviceswidget.cpp 2013-06-24 12:58:28 +0000 |
1697 | +++ ubuntu-qtcreator-plugins/src/plugins/ubuntu/ubuntudeviceswidget.cpp 2013-06-25 19:33:25 +0000 |
1698 | @@ -291,7 +291,7 @@ |
1699 | void UbuntuDevicesWidget::on_pushButtonSshSetupPublicKey_clicked() { |
1700 | beginAction(QString::fromLatin1("Setting up public key authentication..")); |
1701 | m_ubuntuProcess.stop(); |
1702 | - m_ubuntuProcess.append(QStringList() << QString::fromLatin1("%0/openssh_publickey %1 %2").arg(Ubuntu::Constants::UBUNTU_SCRIPTPATH).arg(ui->lineEditUserName->text()).arg(m_deviceSerialNumber) << QApplication::applicationDirPath()); |
1703 | + m_ubuntuProcess.append(QStringList() << QString::fromLatin1("%0/openssh_publickey %1 %2").arg(Ubuntu::Constants::UBUNTU_SCRIPTPATH).arg(serialNumber()).arg(ui->lineEditUserName->text()) << QApplication::applicationDirPath()); |
1704 | m_ubuntuProcess.start(QString::fromLatin1("Setting up public key authentication..")); |
1705 | } |
1706 |