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