Merge lp:~juhapekka-piiroinen/ubuntu-qtcreator-plugins/merge-flipped-and-scope-and-fixed-with-flipped-image into lp:ubuntu-qtcreator-plugins

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
Reviewer Review Type Date Requested Status
Ubuntu SDK team Pending
Review via email: mp+171397@code.launchpad.net
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
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/projectypes.json'
--- ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/projectypes.json 2013-06-24 14:33:43 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/projectypes.json 2013-06-25 19:33:25 +0000
@@ -133,12 +133,12 @@
133 {133 {
134 "fileName": "config.h"134 "fileName": "config.h"
135 },135 },
136 {136 {
137 "fileName": "openclipart-rss.h"137 "fileName": "displayName-parser.c"
138 },138 },
139   {139 {
140 "fileName": "openclipart-rss.c"140 "fileName": "displayName-parser.h"
141 }141 }
142 ]142 ]
143 }143 }
144144
145145
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/config.h'
--- ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/config.h 2013-06-23 09:18:37 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/config.h 2013-06-25 19:33:25 +0000
@@ -1,2 +1,9 @@
1#ifndef __CONFIG_H__
2#define __CONFIG_H__
3
4#define GROUP_NAME "com.canonical.Unity.Scope.%DISPLAYNAME_CAPITAL%"
5#define UNIQUE_NAME "/com/canonical/unity/scope/%DISPLAYNAME_LOWER%"
6
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"
28
9#endif /* __CONFIG_H__ */
310
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/data/displayName_lower.scope'
--- ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/data/displayName_lower.scope 2013-06-23 09:18:37 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/data/displayName_lower.scope 2013-06-25 19:33:25 +0000
@@ -1,6 +1,6 @@
1[Scope]1[Scope]
2DBusName=com.canonical.Unity.Scope.%DISPLAYNAME_CAPITAL%2GroupName=com.canonical.Unity.Scope.%DISPLAYNAME_CAPITAL%
3DBusPath=/com/canonical/unity/scope/%DISPLAYNAME_LOWER%3UniqueName=/com/canonical/unity/scope/%DISPLAYNAME_LOWER%
4Icon=4Icon=
5QueryBinary=5QueryBinary=
6Keywords=%DISPLAYNAME_LOWER%;6Keywords=%DISPLAYNAME_LOWER%;
77
=== 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'
--- ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/data/unity-scope-displayName_lower.service 2013-06-23 09:18:37 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/data/unity-scope-displayName_lower.service.in 2013-06-25 19:33:25 +0000
@@ -1,3 +1,3 @@
1[D-BUS Service]1[D-BUS Service]
2Name=com.canonical.Unity.Scope.%DISPLAYNAME_CAPITAL%2Name=com.canonical.Unity.Scope.%DISPLAYNAME_CAPITAL%
3Exec=/usr/lib/*/unity-scope-%DISPLAYNAME_LOWER%/%DISPLAYNAME%3Exec=
44
=== added file 'ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.c'
--- ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.c 1970-01-01 00:00:00 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.c 2013-06-25 19:33:25 +0000
@@ -0,0 +1,87 @@
1/*
2 * Feed parser backend
3 *
4 * In this module you'll be implementing the feed parser backend.
5 * This code will not be Unity-specific, and it will vary depending
6 * on the type of data returned by your source. Common feed types
7 * returned when doing search queries to sources are JSON, RSS, XML.
8 *
9 * You'll simply need to implement a parser for the type of feed your
10 * source returns and send the results back to Unity via the get_results()
11 * function.
12 */
13
14#include <stdio.h>
15#include <stdlib.h>
16#include <string.h>
17#include <glib.h>
18#include "%DISPLAYNAME_LOWER%-parser.h"
19
20/*
21 * This is the URI against which you'll be submitting your
22 * search query from the Dash, which you'll need to adapt
23 * to your source.
24 */
25#define BASE_URI "http://%DISPLAYNAME_LOWER%.org/api/search/?query="
26
27/**
28 * @brief Cleans up (frees the memory allocated memory)
29 * of the given results structure
30 * @param data Structure that contains the data to free
31 */
32void
33result_cleanup(gpointer data) {
34 /* This is specific to a type of result, so you'll
35 * need to adapt it to the results sent by your
36 * source.
37 */
38 result_t *result = (result_t *)data;
39 if (result->link) {
40 free(result->link);
41 }
42 if (result->icon_url) {
43 free(result->icon_url);
44 }
45 if (result->title) {
46 free(result->title);
47 }
48 if (result->description) {
49 free(result->description);
50 }
51 if (result->creation_date) {
52 free(result->creation_date);
53 }
54 if (result->author) {
55 free(result->author);
56 }
57}
58
59/**
60 * @brief get_results Get and parse the results from a search query
61 * @param search_term String submitted as the search term
62 * @return Search results
63 */
64GSList *
65get_results(const char *search_term) {
66 GString *url = NULL;
67 GSList *results = NULL;
68
69 /* Check if an actual search term was submitted, return otherwise */
70 if (search_term == NULL) {
71 g_warning("get_results: search_term cannot be null");
72 return results;
73 }
74
75 /* Construct the full search query */
76 url = g_string_new(BASE_URI);
77 g_string_append(url, search_term);
78 g_debug("Searching %s", url->str);
79 g_string_free(url, TRUE);
80
81 /*
82 * Submit the query to the source, parse the results and populate
83 * the results list here.
84 */
85
86 return results;
87}
088
=== added file 'ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.h'
--- ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.h 1970-01-01 00:00:00 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.h 2013-06-25 19:33:25 +0000
@@ -0,0 +1,21 @@
1#ifndef __%DISPLAYNAME_UPPER%_PARSER_H__
2#define __%DISPLAYNAME_UPPER%_PARSER_H__
3
4GSList *get_results(const char *search_term);
5void result_cleanup(gpointer data);
6
7/**
8 * This is just an example result type with some sample
9 * fields. You should modify the fields to match the
10 * data you are expecting from your search source
11 */
12typedef struct {
13 gchar *link;
14 gchar *icon_url;
15 gchar *title;
16 gchar *description;
17 gchar *creation_date;
18 gchar *author;
19} result_t;
20
21#endif /* __%DISPLAYNAME:u%_PARSER_H__ */
022
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName.c'
--- ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName.c 2013-06-24 14:33:43 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName.c 2013-06-25 19:33:25 +0000
@@ -1,3 +1,14 @@
1/*
2 * Unity %DISPLAYNAME_CAPITAL% scope
3 *
4 * This module implements the interface to the Unity Dash and
5 * constitutes the frontend of the scope.
6 *
7 * Follow the scopes tutorial to learn how to create a scope:
8 * http://developer.ubuntu.com/resources/tutorials/unity-scopes/writing-a-unity-scope/
9 *
10 */
11
1#include <stdio.h>12#include <stdio.h>
2#include <stdlib.h>13#include <stdlib.h>
3#include <string.h>14#include <string.h>
@@ -6,15 +17,15 @@
6#include <glib.h>17#include <glib.h>
7#include <gio/gio.h>18#include <gio/gio.h>
8#include "config.h"19#include "config.h"
9#include "openclipart-rss.h"20#include "%DISPLAYNAME_LOWER%-parser.h"
10
11#define DBUS_NAME "com.canonical.Unity.Scope.%DISPLAYNAME_CAPITAL%"
12#define DBUS_PATH "/com/canonical/unity/scope/%DISPLAYNAME_LOWER%"
13
1421
15/**22/**
16 * In this function the results from the backend are obtained and23 * In this function the results from the backend are obtained and
17 * added to the search results in the Dash24 * added to the search results in the Dash
25 *
26 * @brief Search function
27 * @param search Search term
28 * @param user_data Additional user data
18 */29 */
19static void30static void
20search_func(UnityScopeSearchBase* search, void* user_data)31search_func(UnityScopeSearchBase* search, void* user_data)
@@ -25,11 +36,21 @@
25 result_t *result = NULL;36 result_t *result = NULL;
26 UnityScopeResult scope_result = { 0, };37 UnityScopeResult scope_result = { 0, };
2738
28 /* The get_results() function is implemented in the backend */39 /* Avoid compiler warning if we're not using the parameter */
40 user_data = user_data;
41
42 /* Fetch the results from the backend */
29 results = get_results(search->search_context->search_query);43 results = get_results(search->search_context->search_query);
3044
45 /* Iterate through the returned results and add them to the
46 * Unity's result set
47 */
31 for (iter = results; iter; iter = iter->next) {48 for (iter = results; iter; iter = iter->next) {
49
50 /* Get the result */
32 result = (result_t *)iter->data;51 result = (result_t *)iter->data;
52
53 /* Build and populate a scope result from the source data */
33 scope_result.uri = result->link;54 scope_result.uri = result->link;
34 scope_result.title = result->title;55 scope_result.title = result->title;
35 scope_result.icon_hint = result->icon_url;56 scope_result.icon_hint = result->icon_url;
@@ -43,19 +64,26 @@
43 metadata = g_hash_table_new(g_str_hash, g_str_equal);64 metadata = g_hash_table_new(g_str_hash, g_str_equal);
44 if (result->author) {65 if (result->author) {
45 g_hash_table_insert(metadata, "author",66 g_hash_table_insert(metadata, "author",
46 g_variant_new_string(result->author));67 g_variant_new_string(result->author));
47 }68 }
48 if (result->creation_date) {69 if (result->creation_date) {
49 g_hash_table_insert(metadata, "creation_date",70 g_hash_table_insert(metadata, "creation_date",
50 g_variant_new_string(result->creation_date));71 g_variant_new_string(result->creation_date));
51 }72 }
52 scope_result.metadata = metadata;73 scope_result.metadata = metadata;
5374
54 /* Add the returned result to the search results list */75 /*
76 * Add the returned result to the search results list, taking a
77 * copy of the data passed in via scope_result
78 */
55 unity_result_set_add_result(search->search_context->result_set,79 unity_result_set_add_result(search->search_context->result_set,
56 &scope_result);80 &scope_result);
57 g_hash_table_unref(metadata);81 g_hash_table_unref(metadata);
58 }82 }
83
84 /*
85 * Clear out the data copied to the result set earlier on
86 */
59 g_slist_free_full(results, (GDestroyNotify) result_cleanup);87 g_slist_free_full(results, (GDestroyNotify) result_cleanup);
60}88}
6189
@@ -64,6 +92,11 @@
64 * its preview is shown in the Dash.92 * its preview is shown in the Dash.
65 * There are a set of predefined preview types: simply pick one, instantiate93 * There are a set of predefined preview types: simply pick one, instantiate
66 * it, add metadata to it if available, and return it.94 * it, add metadata to it if available, and return it.
95 *
96 * @brief Dash preview function
97 * @param previewer Result previewer
98 * @param user_data Additional user data
99 * @return Preview populated with the result's data
67 */100 */
68static UnityAbstractPreview *101static UnityAbstractPreview *
69preview_func(UnityResultPreviewer *previewer, void *user_data)102preview_func(UnityResultPreviewer *previewer, void *user_data)
@@ -74,15 +107,22 @@
74 GVariant *gv_author, *gv_creation_date = NULL;107 GVariant *gv_author, *gv_creation_date = NULL;
75 const char *creation_date = NULL;108 const char *creation_date = NULL;
76109
110 /* Avoid compiler warning if we're not using the parameter */
111 user_data = user_data;
112
113 /* Create a generic preview */
77 preview = UNITY_PREVIEW(unity_generic_preview_new(114 preview = UNITY_PREVIEW(unity_generic_preview_new(
78 previewer->result.title,115 previewer->result.title,
79 previewer->result.comment,116 previewer->result.comment,
80 g_icon_new_for_string(previewer->result.icon_hint, NULL)));117 g_icon_new_for_string(previewer->result.icon_hint, NULL)));
81118
119 /* Set up the preview's action */
82 action = unity_preview_action_new_with_uri(previewer->result.uri, "Open",120 action = unity_preview_action_new_with_uri(previewer->result.uri, "Open",
83 NULL);121 NULL);
84 unity_preview_add_action(preview, action);122 unity_preview_add_action(preview, action);
123 unity_object_unref(action);
85124
125 /* If the result contains metadata, add it to the preview */
86 if (previewer->result.metadata) {126 if (previewer->result.metadata) {
87 gv_author = g_hash_table_lookup(previewer->result.metadata, "author");127 gv_author = g_hash_table_lookup(previewer->result.metadata, "author");
88128
@@ -91,7 +131,7 @@
91 * first, which might be useful for debugging. */131 * first, which might be useful for debugging. */
92 if (gv_author) {132 if (gv_author) {
93 author_hint = unity_info_hint_new_with_variant("author", "Author",133 author_hint = unity_info_hint_new_with_variant("author", "Author",
94 NULL, gv_author);134 NULL, gv_author);
95 /* The ref call here and unref below are to work-around a bug in135 /* The ref call here and unref below are to work-around a bug in
96 * libunity, see:136 * libunity, see:
97 * http://code.launchpad.net/~mhr3/libunity/floating-fixes */137 * http://code.launchpad.net/~mhr3/libunity/floating-fixes */
@@ -100,11 +140,11 @@
100 g_object_unref(author_hint);140 g_object_unref(author_hint);
101 }141 }
102 gv_creation_date = g_hash_table_lookup(previewer->result.metadata,142 gv_creation_date = g_hash_table_lookup(previewer->result.metadata,
103 "creation_date");143 "creation_date");
104 if (gv_creation_date) {144 if (gv_creation_date) {
105 g_variant_get(gv_creation_date, "&s", &creation_date);145 g_variant_get(gv_creation_date, "&s", &creation_date);
106 creation_date_hint = unity_info_hint_new("creation_date",146 creation_date_hint = unity_info_hint_new("creation_date",
107 "Creation Date", NULL, creation_date);147 "Creation Date", NULL, creation_date);
108 /* The ref call here and unref below are to work-around a bug in148 /* The ref call here and unref below are to work-around a bug in
109 * libunity, see:149 * libunity, see:
110 * http://code.launchpad.net/~mhr3/libunity/floating-fixes */150 * http://code.launchpad.net/~mhr3/libunity/floating-fixes */
@@ -129,20 +169,32 @@
129 UnityCategory *cat = NULL;169 UnityCategory *cat = NULL;
130 GIcon *icon = NULL;170 GIcon *icon = NULL;
131171
172 /* Create and set a category for the scope, including an icon */
132 icon = g_themed_icon_new(CATEGORY_ICON_PATH);173 icon = g_themed_icon_new(CATEGORY_ICON_PATH);
133174
134 cat = unity_category_new("global", "%DISPLAYNAME_CAPITAL%", icon,175 cat = unity_category_new("global", "%DISPLAYNAME_CAPITAL%", icon,
135 UNITY_CATEGORY_RENDERER_HORIZONTAL_TILE);176 UNITY_CATEGORY_RENDERER_HORIZONTAL_TILE);
136 cats = unity_category_set_new();177 cats = unity_category_set_new();
137 unity_category_set_add(cats, cat);178 unity_category_set_add(cats, cat);
138179
180 /* Create and set up the scope */
139 scope = unity_simple_scope_new();181 scope = unity_simple_scope_new();
140 unity_simple_scope_set_group_name(scope, DBUS_NAME);182 unity_simple_scope_set_group_name(scope, GROUP_NAME);
141 unity_simple_scope_set_unique_name(scope, DBUS_PATH);183 unity_simple_scope_set_unique_name(scope, UNIQUE_NAME);
142 unity_simple_scope_set_search_func(scope, search_func, NULL, NULL);184 unity_simple_scope_set_search_func(scope, search_func, NULL, NULL);
143 unity_simple_scope_set_preview_func(scope, preview_func, NULL, NULL);185 unity_simple_scope_set_preview_func(scope, preview_func, NULL, NULL);
144 unity_simple_scope_set_category_set(scope, cats);186 unity_simple_scope_set_category_set(scope, cats);
145187
188 g_object_unref (icon);
189 unity_object_unref (cat);
190 unity_object_unref (cats);
191
192 /*
193 * Setting up the connector is an action that will not be required
194 * in future revisions of the API. In particular, we only need it here
195 * since the scope is running locally on the device as opposed to
196 * running on the Smart Scopes server
197 */
146 connector = unity_scope_dbus_connector_new(UNITY_ABSTRACT_SCOPE(scope));198 connector = unity_scope_dbus_connector_new(UNITY_ABSTRACT_SCOPE(scope));
147 unity_scope_dbus_connector_export(connector, NULL);199 unity_scope_dbus_connector_export(connector, NULL);
148 unity_scope_dbus_connector_run();200 unity_scope_dbus_connector_run();
149201
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName.pro'
--- ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName.pro 2013-06-24 14:33:43 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/displayName.pro 2013-06-25 19:33:25 +0000
@@ -16,27 +16,46 @@
1616
17###########################################################17###########################################################
18# To install dependencies:18# To install dependencies:
19# sudo apt-get install libunity-dev libglib2.0-dev libmrss0-dev19# sudo apt-get install libunity-dev
20PKGCONFIG += \20PKGCONFIG += \
21 glib-2.0 \
22 mrss \
23 unity21 unity
2422
23# Pkg-config takes care of the includes for the build, so the following variable is not
24# strictly needed. We need this simply for Qt Creator to find the
25# headers in the editor, as it seems not to use the PGKCONFIG variable.
26INCLUDEPATH += \
27 /usr/include/glib-2.0 \
28 /usr/include/unity/unity
29
30TARGET = %DISPLAYNAME%
25DAEMON_PATH = $$[QT_INSTALL_LIBS]/unity-scope-$${TARGET}31DAEMON_PATH = $$[QT_INSTALL_LIBS]/unity-scope-$${TARGET}
26TARGET = %DISPLAYNAME%
27target.path = $$DAEMON_PATH
2832
29QMAKE_CFLAGS += -Wno-unused-parameter33DATA_DIR = $$_PRO_FILE_PWD_/data
34SCOPE_FILE = $$DATA_DIR/$${TARGET}.scope
35SERVICE_FILE = $$DATA_DIR/unity-scope-$${TARGET}.service
3036
31SOURCES += \37SOURCES += \
32 %DISPLAYNAME%.c38 %DISPLAYNAME%.c \
39 %DISPLAYNAME%-parser.c
3340
34HEADERS += \41HEADERS += \
35 config.h 42 config.h \
43 %DISPLAYNAME%-parser.h
3644
37OTHER_FILES += \45OTHER_FILES += \
38 data/%DISPLAYNAME_LOWER%.scope \46 $$SCOPE_FILE \
39 data/unity-scope-%DISPLAYNAME_LOWER%.service47 $${SERVICE_FILE}.in
48
49# Rule to generate the DBUS .service file, including the architecture-dependent installation path
50# generated at build time
51servicefilegen.target = servicefilegen
52servicefilegen.commands = sed -e \"s,\\(Exec=\\).*\$$,\1$$DAEMON_PATH/$$TARGET,\" $${SERVICE_FILE}.in > $$SERVICE_FILE
53QMAKE_EXTRA_TARGETS += servicefilegen
54QMAKE_CLEAN += $$SERVICE_FILE
55QMAKE_CLEAN += $$DATA_DIR/*~
56
57# Rule to install the scope's binary
58target.path = $$DAEMON_PATH
4059
41# Rule to install the DBUS .service file60# Rule to install the DBUS .service file
42servicefile.path = /usr/share/dbus-1/services61servicefile.path = /usr/share/dbus-1/services
@@ -47,5 +66,6 @@
47scopefile.files = $$SCOPE_FILE66scopefile.files = $$SCOPE_FILE
4867
49INSTALLS += \68INSTALLS += \
69 target \
50 scopefile \70 scopefile \
51 servicefile71 servicefile
5272
=== removed file 'ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/openclipart-rss.c'
--- ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/openclipart-rss.c 2013-06-24 14:33:43 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/openclipart-rss.c 1970-01-01 00:00:00 +0000
@@ -1,131 +0,0 @@
1#include <stdio.h>
2#include <stdlib.h>
3#include <string.h>
4#include <mrss.h>
5#include <glib.h>
6#include "openclipart-rss.h"
7
8#define BASE_URI "http://openclipart.org/api/search/?query="
9
10void
11result_cleanup(gpointer data) {
12 result_t *result = (result_t *)data;
13 if (result->link) {
14 free(result->link);
15 }
16 if (result->icon_url) {
17 free(result->icon_url);
18 }
19 if (result->title) {
20 free(result->title);
21 }
22 if (result->description) {
23 free(result->description);
24 }
25 if (result->creation_date) {
26 free(result->creation_date);
27 }
28 if (result->author) {
29 free(result->author);
30 }
31}
32
33/* Returns a value for a given tag and attribute. If attr_name is null,
34 * then it returns the tag value, otherwise it returns the attribute value.
35 * Returns NULL on any error or unfound tag/attribute.
36 *
37 * XXX - it would be more efficient to collect stuff from this loop all at
38 * once.
39 */
40char *
41get_other_tags_attribute(mrss_tag_t *tag, const char *tag_name, const char *attr_name) {
42 mrss_attribute_t *attribute;
43
44 if ((tag_name == NULL) && (attr_name == NULL)) {
45 return NULL;
46 }
47
48 while (tag) {
49 if (!strcmp(tag->name, tag_name)) {
50 if (attr_name == NULL) {
51 return tag->value;
52 }
53 for (attribute = tag->attributes; attribute;
54 attribute = attribute->next) {
55 if (!strcmp(attribute->name, attr_name)) {
56 return attribute->value;
57 }
58 }
59 }
60 tag = tag->next;
61 }
62 return NULL;
63}
64
65GSList *
66get_results(const char *search_term) {
67 mrss_t *data;
68 mrss_error_t ret;
69 mrss_item_t *item;
70 CURLcode code;
71 GString *url = NULL;
72 GSList *results = NULL;
73 result_t *result = NULL;
74 char *tmp = NULL;
75
76 if (search_term == NULL) {
77 g_warning("get_results: search_term cannot be null");
78 return results;
79 }
80
81 url = g_string_new(BASE_URI);
82 g_string_append(url, search_term);
83 g_debug("searching %s", url->str);
84 ret = mrss_parse_url_with_options_and_error(url->str, &data, NULL, &code);
85 g_string_free(url,TRUE);
86
87 if (ret) {
88 g_warning("MRSS return error: %s\n", ret == MRSS_ERR_DOWNLOAD ? mrss_curl_strerror (code) : mrss_strerror (ret));
89 return results;
90 }
91
92 /*
93 * Parse the results from the RSS feed returned by a search query submitted to openclipart.org
94 * See "Clipart Search" in http://openclipart.org/developers
95 */
96 item = data->item;
97 while (item) {
98 result = (result_t*)malloc(sizeof(result_t));
99 bzero((result_t*)result, sizeof(result_t));
100 if (item->link) {
101 result->link = (char *)malloc(strlen(item->link)+1);
102 strcpy(result->link,item->link);
103 }
104 if (item->title) {
105 result->title = (char *)malloc(strlen(item->title)+1);
106 strcpy(result->title,item->title);
107 }
108 if (item->description) {
109 result->description = (char *)malloc(strlen(item->description)+1);
110 strcpy(result->description,item->description);
111 }
112 if (item->pubDate) {
113 result->creation_date = (char *)malloc(strlen(item->pubDate)+1);
114 strcpy(result->creation_date,item->pubDate);
115 }
116 tmp = get_other_tags_attribute(item->other_tags, "thumbnail", "url");
117 if (tmp) {
118 result->icon_url = (char *)malloc(strlen(tmp)+1);
119 strcpy(result->icon_url,tmp);
120 }
121 tmp = get_other_tags_attribute(item->other_tags, "creator", NULL);
122 if (tmp) {
123 result->author = (char *)malloc(strlen(tmp)+1);
124 strcpy(result->author,tmp);
125 }
126 results = g_slist_append(results, result);
127 item = item->next;
128 }
129 mrss_free (data);
130 return results;
131}
1320
=== removed file 'ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/openclipart-rss.h'
--- ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/openclipart-rss.h 2013-06-24 14:33:43 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/templates/wizards/ubuntu/scope/openclipart-rss.h 1970-01-01 00:00:00 +0000
@@ -1,18 +0,0 @@
1#ifndef __OPENCLIPART_RSS_H__
2#define __OPENCLIPART_RSS_H__
3
4char *get_other_tags_attribute(mrss_tag_t *tag,
5 const char *tag_name, const char *attr_name);
6GSList *get_results(const char *search_term);
7void result_cleanup(gpointer data);
8
9typedef struct {
10 gchar *link;
11 gchar *icon_url;
12 gchar *title;
13 gchar *description;
14 gchar *creation_date;
15 gchar *author;
16} result_t;
17
18#endif
190
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/menu.json'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/menu.json 2013-06-24 13:42:17 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/menu.json 2013-06-25 19:33:25 +0000
@@ -9,9 +9,7 @@
9 {9 {
10 "name": "check",10 "name": "check",
11 "id": "Ubuntu.Make.Check",11 "id": "Ubuntu.Make.Check",
12 "parent": "Build",
13 "projectRequired": true,12 "projectRequired": true,
14 "group": "ProjectExplorer.Group.Run",
15 "actions": [13 "actions": [
16 "%SCRIPTDIRECTORY%/qtc_project_make check"14 "%SCRIPTDIRECTORY%/qtc_project_make check"
17 ]15 ]
@@ -19,12 +17,26 @@
19 {17 {
20 "name": "autopilot",18 "name": "autopilot",
21 "id": "Ubuntu.Make.Autopilot",19 "id": "Ubuntu.Make.Autopilot",
22 "parent": "Build",
23 "projectRequired": true,20 "projectRequired": true,
24 "group": "ProjectExplorer.Group.Run",
25 "actions": [21 "actions": [
26 "%SCRIPTDIRECTORY%/qtc_project_make autopilot"22 "%SCRIPTDIRECTORY%/qtc_project_make autopilot"
27 ]23 ]
24 },
25 {
26 "name": "install",
27 "id": "Ubuntu.Make.Install",
28 "projectRequired": true,
29 "actions": [
30 "%SCRIPTDIRECTORY%/qtc_project_make install"
31 ]
32 },
33 {
34 "name": "uninstall",
35 "id": "Ubuntu.Make.Uninstall",
36 "projectRequired": true,
37 "actions": [
38 "%SCRIPTDIRECTORY%/qtc_project_make uninstall"
39 ]
28 }40 }
29 ]41 ]
30 },42 },
@@ -78,7 +90,7 @@
78 "saveRequired": true,90 "saveRequired": true,
79 "actions": [91 "actions": [
80 "%SCRIPTDIRECTORY%/qtc_project_create_package",92 "%SCRIPTDIRECTORY%/qtc_project_create_package",
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"
82 ]94 ]
83 },95 },
84 {96 {
@@ -168,12 +180,34 @@
168 "submenu": [180 "submenu": [
169 {181 {
170 "name": "Ubuntu Touch Showcase Gallery",182 "name": "Ubuntu Touch Showcase Gallery",
183 "keysequence": "Ctrl+Shift+S",
171 "id": "Ubuntu.Menu.Showcase",184 "id": "Ubuntu.Menu.Showcase",
172 "actions": [185 "actions": [
173 "%SCRIPTDIRECTORY%/qtc_launch_gallery"186 "%SCRIPTDIRECTORY%/qtc_launch_gallery"
174 ]187 ]
175 },188 },
176 {189 {
190 "name": "Take a screenshot",
191 "id": "Ubuntu.Menu.Screenshot",
192 "keysequence": "Ctrl+Shift+P",
193 "deviceRequired": true,
194 "actions": [
195 "adb -s %SERIALNUMBER% root",
196 "adb -s %SERIALNUMBER% shell /system/bin/screencap -p /sdcard/screenshot.png",
197 "adb -s %SERIALNUMBER% pull /sdcard/screenshot.png screenshot.png",
198 "eog -s %SERIALNUMBER% screenshot.png"
199 ]
200 },
201 {
202 "name": "Mount Device Filesystem",
203 "id": "Ubuntu.Menu.MountDeviceFileSystem",
204 "keysequence": "Ctrl+Shift+F1",
205 "deviceRequired": true,
206 "actions": [
207 "nautilus ssh://phablet@127.0.0.1:2222"
208 ]
209 },
210 {
177 "name": "Translations",211 "name": "Translations",
178 "id": "Ubuntu.Menu.i18n",212 "id": "Ubuntu.Menu.i18n",
179 "submenu": [213 "submenu": [
@@ -360,18 +394,6 @@
360 "actions": [394 "actions": [
361 "%SCRIPTDIRECTORY%/device_set_persist-sys-usb-config %SERIALNUMBER%"395 "%SCRIPTDIRECTORY%/device_set_persist-sys-usb-config %SERIALNUMBER%"
362 ]396 ]
363 },
364 {
365 "name": "Take a screenshot",
366 "id": "Ubuntu.Menu.Device.Screenshot",
367 "keysequence": "Ctrl+Shift+P",
368 "deviceRequired": true,
369 "actions": [
370 "adb -s %SERIALNUMBER% root",
371 "adb -s %SERIALNUMBER% shell /system/bin/screencap -p /sdcard/screenshot.png",
372 "adb -s %SERIALNUMBER% pull /sdcard/screenshot.png screenshot.png",
373 "eog -s %SERIALNUMBER% screenshot.png"
374 ]
375 }397 }
376 ]398 ]
377 }399 }
378400
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_flashdaily'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_flashdaily 2013-05-01 23:49:31 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_flashdaily 2013-06-25 19:33:25 +0000
@@ -14,10 +14,24 @@
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/>.
15#15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17set -e;17
1818. `dirname $0`/functions.inc
19SERIALNUMBER=$119
2020if [[ !does_device_hw_match_image_hw ]]; then
21adb -s ${SERIALNUMBER} root21 IMAGE_HARDWARE=`device_image_hardware`
22adb -s ${SERIALNUMBER} wait-for-device22 DEVICE_HARDWARE=`device_hardware`
23x-terminal-emulator -e "bash -ic 'phablet-flash -s ${SERIALNUMBER}'"23 echo
24 echo " WARNING! Device image hardware version"
25 echo " does not match the detected device hardware."
26 echo
27 echo -n " Device Image Version: "
28 echo ${IMAGE_HARDWARE}
29 echo -n " Device Version: "
30 echo ${DEVICE_HARDWARE}
31 echo
32 echo " In order to flash your device, you must do it manually:"
33 echo " phablet-flash -s ${SERIALNUMBER} -d ${IMAGE_HARDWARE}"
34 echo
35else
36 x-terminal-emulator -e "bash -ic 'phablet-flash -s ${SERIALNUMBER}'"
37fi
24\ No newline at end of file38\ No newline at end of file
2539
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_flashdaily_bootstrap'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_flashdaily_bootstrap 2013-05-01 23:49:31 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_flashdaily_bootstrap 2013-06-25 19:33:25 +0000
@@ -14,10 +14,24 @@
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/>.
15#15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17set -e;17
1818. `dirname $0`/functions.inc
19SERIALNUMBER=$119
2020if [[ !does_device_hw_match_image_hw ]]; then
21adb -s ${SERIALNUMBER} root21 IMAGE_HARDWARE=`device_image_hardware`
22adb -s ${SERIALNUMBER} wait-for-device22 DEVICE_HARDWARE=`device_hardware`
23x-terminal-emulator -e "bash -ic 'phablet-flash -b -s ${SERIALNUMBER}'"23 echo
24 echo " WARNING! Device image hardware version"
25 echo " does not match the detected device hardware."
26 echo
27 echo -n " Device Image Version: "
28 echo ${IMAGE_HARDWARE}
29 echo -n " Device Version: "
30 echo ${DEVICE_HARDWARE}
31 echo
32 echo " In order to flash your device, you must do it manually:"
33 echo " phablet-flash -s ${SERIALNUMBER} -d ${IMAGE_HARDWARE} -b"
34 echo
35else
36 x-terminal-emulator -e "bash -ic 'phablet-flash -s ${SERIALNUMBER}' -b"
37fi
24\ No newline at end of file38\ No newline at end of file
2539
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_hasnetwork'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_hasnetwork 2013-05-01 18:19:31 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_hasnetwork 2013-06-25 19:33:25 +0000
@@ -14,16 +14,7 @@
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/>.
15#15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17set -e;17
1818. `dirname $0`/functions.inc
19SERIALNUMBER=$119
2020device_network_state_connected
21adb -s ${SERIALNUMBER} root &> /dev/null
22adb -s ${SERIALNUMBER} wait-for-device &> /dev/null
23NM_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}'`
24if [[ $NM_STATE != *disconnected* ]]; then
25 echo "1"
26else
27 echo "0"
28fi
29
3021
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_network_clone'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_network_clone 2013-05-01 18:53:35 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_network_clone 2013-06-25 19:33:25 +0000
@@ -14,17 +14,10 @@
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/>.
15#15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17set -e;17
1818. `dirname $0`/functions.inc
19SERIALNUMBER=$119
2020clone_network_setup_from_host_to_device
21gksudo phablet-network-setup -s ${SERIALNUMBER}21wait_for_network_state_switch_on
2222
23SCRIPTPATH=`dirname $0`23echo "The device has connected to a network."
24HASNETWORK=`${SCRIPTPATH}/device_hasnetwork ${SERIALNUMBER}`
25while [[ ${HASNETWORK} == "0" ]]; do
26sleep 1
27echo -n .
28HASNETWORK=`${SCRIPTPATH}/device_hasnetwork ${SERIALNUMBER}`
29done
30echo "The device has connected to a network."
31\ No newline at end of file24\ No newline at end of file
3225
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_portforward'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_portforward 2013-05-01 18:19:31 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_portforward 2013-06-25 19:33:25 +0000
@@ -14,9 +14,9 @@
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/>.
15#15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17set -e;17
1818. `dirname $0`/functions.inc
19SERIALNUMBER=$119
20SSHPORT=$220SSHPORT=$2
21QMLPORT=$321QMLPORT=$3
2222
@@ -28,7 +28,6 @@
28 QMLPORT=376828 QMLPORT=3768
29fi29fi
3030
31adb -s ${SERIALNUMBER} root &> /dev/null31adb_forward_tcp ${SSHPORT} 22
32adb -s ${SERIALNUMBER} wait-for-device &> /dev/null32adb_forward_tcp ${QMLPORT} 3768
33adb -s ${SERIALNUMBER} forward tcp:$SSHPORT tcp:2233
34adb -s ${SERIALNUMBER} forward tcp:$QMLPORT tcp:3768
3534
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_reboot'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_reboot 2013-05-01 18:19:31 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_reboot 2013-06-25 19:33:25 +0000
@@ -14,10 +14,7 @@
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/>.
15#15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17set -e;17
1818. `dirname $0`/functions.inc
19SERIALNUMBER=$119
2020device_reboot
21adb -s ${SERIALNUMBER} root &> /dev/null
22adb -s ${SERIALNUMBER} wait-for-device &> /dev/null
23adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin reboot
2421
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_reboot2bootloader'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_reboot2bootloader 2013-05-01 18:19:31 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_reboot2bootloader 2013-06-25 19:33:25 +0000
@@ -14,10 +14,8 @@
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/>.
15#15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17set -e;17
1818. `dirname $0`/functions.inc
19SERIALNUMBER=$119
2020device_reboot_bootloader
21adb -s ${SERIALNUMBER} root &> /dev/null21
22adb -s ${SERIALNUMBER} wait-for-device &> /dev/null
23adb -s ${SERIALNUMBER} reboot-bootloader
2422
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_reboot2recovery'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_reboot2recovery 2013-05-01 18:19:31 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_reboot2recovery 2013-06-25 19:33:25 +0000
@@ -14,10 +14,7 @@
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/>.
15#15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17set -e;17
1818. `dirname $0`/functions.inc
19SERIALNUMBER=$119
2020device_reboot_recovery
21adb -s ${SERIALNUMBER} root &> /dev/null
22adb -s ${SERIALNUMBER} wait-for-device &> /dev/null
23adb -s ${SERIALNUMBER} reboot recovery
2421
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_rootshell'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_rootshell 2013-05-01 18:19:31 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_rootshell 2013-06-25 19:33:25 +0000
@@ -14,10 +14,7 @@
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/>.
15#15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17set -e;17
1818. `dirname $0`/functions.inc
19SERIALNUMBER=$119
2020adb_shell
21adb -s ${SERIALNUMBER} root &> /dev/null
22adb -s ${SERIALNUMBER} wait-for-device &> /dev/null
23x-terminal-emulator -e "adb -s ${SERIALNUMBER} shell ubuntu_chroot shell"
2421
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_search'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_search 2013-06-03 14:59:43 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_search 2013-06-25 19:33:25 +0000
@@ -14,7 +14,7 @@
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/>.
15#15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17set -e;17
18adb kill-server &> /dev/null18adb kill-server &> /dev/null
19adb start-server &> /dev/null19adb start-server &> /dev/null
20adb devices -l20adb devices -l
2121
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_set_persist-sys-usb-config'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_set_persist-sys-usb-config 2013-05-01 18:19:31 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_set_persist-sys-usb-config 2013-06-25 19:33:25 +0000
@@ -15,6 +15,6 @@
15#15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
1717
18SERIALNUMBER=$118. `dirname $0`/functions.inc
1919
20adb -s ${SERIALNUMBER} shell setprop persist.sys.usb.config ptp,adb20adb_shell setprop persist.sys.usb.config ptp,adb
2121
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_shutdown'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_shutdown 2013-05-01 18:19:31 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_shutdown 2013-06-25 19:33:25 +0000
@@ -14,10 +14,7 @@
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/>.
15#15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17set -e;17
1818. `dirname $0`/functions.inc
19SERIALNUMBER=$119
2020device_shutdown
21adb -s ${SERIALNUMBER} root &> /dev/null
22adb -s ${SERIALNUMBER} wait-for-device &> /dev/null
23adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin shutdown -h now
2421
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_time_clone'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_time_clone 2013-05-01 18:19:31 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_time_clone 2013-06-25 19:33:25 +0000
@@ -14,16 +14,16 @@
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/>.
15#15#
16# Author: Zoltán Balogh <zoltan.balogh@canonical.com>16# Author: Zoltán Balogh <zoltan.balogh@canonical.com>
17set -e17# Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
1818
19SERIALNUMBER=$119. `dirname $0`/functions.inc
2020
21ADB="adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin"
22LOCAL_DATE=`date +%Y%m%d`21LOCAL_DATE=`date +%Y%m%d`
23LOCAL_TIME=`date +%T`22LOCAL_TIME=`date +%T`
24TIMEZONE=`cat /etc/timezone`23TIMEZONE=`cat /etc/timezone`
25${ADB} sed -i "s#.*/.*#${TIMEZONE=}#" /etc/timezone24
26${ADB} dpkg-reconfigure --frontend noninteractive tzdata >/dev/null25adb_shell sed -i "s#.*/.*#${TIMEZONE=}#" /etc/timezone
27${ADB} date +%Y%m%d -s "${LOCAL_DATE}" >/dev/null26adb_shell dpkg-reconfigure --frontend noninteractive tzdata > /dev/null
28${ADB} date +%T -s "${LOCAL_TIME}" >/dev/null27adb_shell date +%Y%m%d -s "${LOCAL_DATE}" > /dev/null
28adb_shell date +%T -s "${LOCAL_TIME}" > /dev/null
2929
3030
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_version'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_version 2013-05-01 18:19:31 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/device_version 2013-06-25 19:33:25 +0000
@@ -14,10 +14,8 @@
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/>.
15#15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17set -e;17
1818. `dirname $0`/functions.inc
19SERIALNUMBER=$119
2020device_image_hardware
21adb -s ${SERIALNUMBER} root &> /dev/null21device_image_version
22adb -s ${SERIALNUMBER} wait-for-device &> /dev/null
23adb -s ${SERIALNUMBER} shell cat /system/*ubuntu_stamp
2422
=== added file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/functions.inc'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/functions.inc 1970-01-01 00:00:00 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/functions.inc 2013-06-25 19:33:25 +0000
@@ -0,0 +1,137 @@
1#!/bin/bash
2# Copyright 2013 Canonical Ltd.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU Lesser General Public License as published by
6# the Free Software Foundation; version 2.1.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17
18set -e
19
20SCRIPTPATH=`dirname $0`
21SERIALNUMBER=$1
22SSHIDENTITY=~/.ssh/ubuntudevice_${SERIALNUMBER}_id_rsa
23USERNAME=phablet
24
25function adb_root {
26 adb -s ${SERIALNUMBER} root &> /dev/null
27 adb -s ${SERIALNUMBER} wait-for-device &> /dev/null
28}
29
30function has_ubuntu_chroot {
31 local HAS_UBUNTU_CHROOT=`adb -s ${SERIALNUMBER} shell "which ubuntu_chroot"`
32 if [[ ${HAS_UBUNTU_CHROOT} ]]; then
33 echo 1
34 else
35 echo 0
36 fi
37}
38
39function adbd_restart {
40 adb kill-server &> /dev/null
41 adb start-server &> /dev/null
42}
43
44function adb_devices {
45 adb devices -l
46}
47
48function adb_forward_tcp {
49set +e
50 adb -s ${SERIALNUMBER} forward tcp:$1 tcp:$2
51set -e
52}
53
54function adb_shell {
55set +e
56 if [[ `has_ubuntu_chroot` -eq "1" ]]; then
57 adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin $@
58 else
59 adb -s ${SERIALNUMBER} shell $@
60 fi
61}
62
63function phablet_shell {
64 adb_shell "su ${USERNAME} -c \"$@\""
65}
66
67function ubuntu_stamp {
68 adb_shell cat /system/*ubuntu_stamp
69}
70
71function device_hardware {
72 adb_devices |grep -o device:.*|sed "s/device://"
73}
74
75function device_image_hardware {
76 ubuntu_stamp | grep HARDWARE|sed "s/HARDWARE=//g"
77}
78
79function does_device_hw_match_image_hw {
80 if [[ device_hardware == device_image_hardware ]]; then
81 echo 1
82 else
83 echo 0
84 fi
85}
86
87function device_image_version {
88 ubuntu_stamp | grep JENKINS|sed "s/JENKINS_BUILD=//g"
89}
90
91function device_network_state_connected {
92 local NM_STATE=`adb_shell nmcli nm | head -n+2 | awk '{print $2}'`
93 if [[ $NM_STATE != *disconnected* ]]; then
94 echo 1
95 else
96 echo 0
97 fi
98}
99
100function device_reboot {
101 adb_shell reboot
102}
103
104function device_reboot_bootloader {
105 adb -s ${SERIALNUMBER} reboot-bootloader
106}
107
108function device_reboot_recovery {
109 adb -s ${SERIALNUMBER} reboot recovery
110}
111
112function device_shutdown {
113 adb_shell shutdown -h now
114}
115
116function wait_for_network_state_switch_on {
117 local RESULT=`device_network_state_connected`
118 while [[ "$RESULT" -eq "0" ]]; do
119 sleep 1
120 echo -n .
121 RESULT=`device_network_state_connected`
122 done
123}
124
125function clone_network_setup_from_host_to_device {
126 gksudo phablet-network-setup -s ${SERIALNUMBER}
127}
128
129#############################################################
130if [[ -z ${SERIALNUMBER} ]]; then
131 echo "Please pass a device serial number."
132 echo
133 adb_devices
134 exit -1
135fi
136
137adb_root
0138
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_connect'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_connect 2013-05-02 21:46:53 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_connect 2013-06-25 19:33:25 +0000
@@ -14,14 +14,12 @@
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/>.
15#15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17set -e; 17
1818. `dirname $0`/functions.inc
19SERIALNUMBER=$119
20PORT=$220PORT=$2
21USERNAME=$321USERNAME=$3
22SCRIPTPATH=`dirname $0`22
23SSHIDENTITY=~/.ssh/ubuntudevice_${SERIALNUMBER}_id_rsa23#$SCRIPTPATH/device_portforward ${PORT} 3768
2424
25${SCRIPTPATH}/device_portforward ${SERIALNUMBER} ${PORT} 376825x-terminal-emulator -e "ssh -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p $PORT $USERNAME@127.0.0.1" &
26
27x-terminal-emulator -e "ssh -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p $PORT $USERNAME@127.0.0.1 bash -i" &
2826
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_install'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_install 2013-05-01 18:19:31 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_install 2013-06-25 19:33:25 +0000
@@ -14,9 +14,7 @@
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/>.
15#15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17set -e; 17
1818. `dirname $0`/functions.inc
19SERIALNUMBER=$119
20
21SCRIPTPATH=`dirname $0`
22${SCRIPTPATH}/qtc_device_developertools ${SERIALNUMBER}20${SCRIPTPATH}/qtc_device_developertools ${SERIALNUMBER}
2321
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_publickey'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_publickey 2013-05-01 22:36:21 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_publickey 2013-06-25 19:33:25 +0000
@@ -14,41 +14,51 @@
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/>.
15#15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17set -e; 17
1818. `dirname $0`/functions.inc
19USERNAME=$119
20SERIALNUMBER=$220USERNAME=$2
21KEYPATH=~/.ssh/ubuntudevice_${SERIALNUMBER}_id_rsa
22
23SHELL="adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin"
2421
25function check_key {22function check_key {
2623 echo "Checking for keys.."
27KEY=`cat $KEYPATH.pub`24 KEY=`cat $SSHIDENTITY.pub`
28KEYS=`$SHELL su -c "cat ~/.ssh/authorized_keys2 | grep '$KEY'" $USERNAME`25 set +e
29if [[ -z $KEYS || $KEYS == *No\ such* ]]; then26 PHABLET_KEYS=`adb_shell "cat /home/phablet/.ssh/authorized_keys2"`
30 echo "Deploying key.."27 KEYS=`echo $PHABLET_KEYS | grep "$KEY"`
31 deploy_key28 set -e
32else29 echo
33 echo "Key has been already deployed"30 echo "Host key is:"
34fi31 echo $KEY
32 echo
33 echo "We have following keys on the device: "
34 echo $KEYS
35 if [[ -z $KEYS || $KEYS == *No\ such* ]]; then
36 echo "*no keys*"
37 echo
38 deploy_key
39 else
40 echo
41 echo "The host key has been already deployed."
42 fi
35}43}
3644
37function deploy_key {45function deploy_key {
38 KEY=`cat $KEYPATH.pub`46 echo "Deploy the host key to the device.."
39$SHELL su -c "mkdir -p ~/.ssh" $USERNAME47 KEY=`cat $SSHIDENTITY.pub`
40$SHELL su -c "echo $KEY >> ~/.ssh/authorized_keys2" $USERNAME48 phablet_shell "mkdir -p /home/phablet/.ssh"
49 echo "..key folder created"
50 phablet_shell "echo $KEY >> /home/phablet/.ssh/authorized_keys2"
51 echo "..key deployed!"
41}52}
4253
43function generate_key {54function generate_key {
44ssh-keygen -t rsa -N '' -f $KEYPATH -b 76855 echo "Generating host key.."
56 ssh-keygen -t rsa -N '' -f $SSHIDENTITY -b 768
45}57}
4658
47#################59#################
48adb -s ${SERIALNUMBER} root &> /dev/null
49adb -s ${SERIALNUMBER} wait-for-device > /dev/null
5060
51if [[ -f $KEYPATH ]]; then61if [[ -f $SSHIDENTITY ]]; then
52 check_key62 check_key
53else63else
54 generate_key64 generate_key
5565
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_remove'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_remove 2013-05-01 18:19:31 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_remove 2013-06-25 19:33:25 +0000
@@ -14,12 +14,9 @@
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/>.
15#15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17set -e; 17
1818. `dirname $0`/functions.inc
19SERIALNUMBER=$119
2020adb_shell apt-get remove openssh-server -y
21adb -s ${SERIALNUMBER} root &> /dev/null
22adb -s ${SERIALNUMBER} wait-for-device &> /dev/null
23adb -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
2421
2522
2623
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_version'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_version 2013-05-01 22:44:56 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/openssh_version 2013-06-25 19:33:25 +0000
@@ -14,13 +14,9 @@
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/>.
15#15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17#set -e;17
1818. `dirname $0`/functions.inc
19SERIALNUMBER=$119
2020adb_shell apt-get -f install &> /dev/null
21adb -s ${SERIALNUMBER} root &> /dev/null21adb_shell apt-cache policy openssh-server|grep Installed|sed "s/Installed\://g"
22adb -s ${SERIALNUMBER} wait-for-device &> /dev/null
23adb -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
24adb -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"
25
2622
2723
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_buildanddeploypackage'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_buildanddeploypackage 2013-05-02 21:46:53 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_buildanddeploypackage 2013-06-25 19:33:25 +0000
@@ -14,34 +14,30 @@
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/>.
15#15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17set -e;17
1818. `dirname $0`/functions.inc
19SERIALNUMBER=$119
20FOLDERNAME=$220FOLDERNAME=$2
21TARGET_DEVICE=$321TARGET_DEVICE=$3
22TARGET_DEVICE_PORT=$422TARGET_DEVICE_PORT=$4
23TARGET_DEVICE_HOME=$523TARGET_DEVICE_HOME=$5
24SSHIDENTITY=~/.ssh/ubuntudevice_${SERIALNUMBER}_id_rsa
2524
26if [[ -z ${TARGET_DEVICE_PORT} ]]; then25if [[ -z ${TARGET_DEVICE_PORT} ]]; then
27 TARGET_DEVICE_PORT=222226 TARGET_DEVICE_PORT=2222
28fi27fi
2928
30if [[ -z ${TARGET_DEVICE} ]]; then29if [[ -z ${TARGET_DEVICE} ]]; then
31 TARGET_DEVICE=phablet@127.0.0.130 TARGET_DEVICE=phablet@127.0.0.1
32fi31fi
3332
34if [[ -z ${TARGET_DEVICE_HOME} ]]; then33if [[ -z ${TARGET_DEVICE_HOME} ]]; then
35 TARGET_DEVICE_HOME=/home/phablet/dev_tmp34 TARGET_DEVICE_HOME=/home/phablet/dev_tmp
36fi35fi
3736
38SCP="scp -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -P${TARGET_DEVICE_PORT}"37SCP="scp -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -P${TARGET_DEVICE_PORT}"
39SSH="ssh -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p${TARGET_DEVICE_PORT} ${TARGET_DEVICE}"38SSH="ssh -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p${TARGET_DEVICE_PORT} ${TARGET_DEVICE}"
40ADB="adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin"
41
42SCRIPTPATH=`dirname $0`
4339
44${SCRIPTPATH}/qtc_device_buildpackage ${SERIALNUMBER} ${FOLDERNAME}40${SCRIPTPATH}/qtc_device_buildpackage ${SERIALNUMBER} ${FOLDERNAME}
4541
46FILES=`$SSH "cd ${TARGET_DEVICE_HOME}; ls -1 *.deb"`42FILES=`$SSH "cd ${TARGET_DEVICE_HOME}; ls -1 *.deb"`
47echo $FILES | xargs -0 -I FILE $ADB gdebi --n ${TARGET_DEVICE_HOME}/FILE43echo $FILES | xargs -0 -I FILE adb_shell gdebi --n ${TARGET_DEVICE_HOME}/FILE
4844
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_buildpackage'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_buildpackage 2013-05-02 21:46:53 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_buildpackage 2013-06-25 19:33:25 +0000
@@ -15,7 +15,6 @@
15#15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
1717
18
19DEBEMAIL=`grep -G "^DEBEMAIL" ~/.bashrc`18DEBEMAIL=`grep -G "^DEBEMAIL" ~/.bashrc`
20DEBFULLNAME=`grep -G "^DEBFULLNAME" ~/.bashrc`19DEBFULLNAME=`grep -G "^DEBFULLNAME" ~/.bashrc`
2120
@@ -36,40 +35,34 @@
36 fi35 fi
37fi36fi
3837
39set -e38. `dirname $0`/functions.inc
4039
41SERIALNUMBER=$1
42FOLDERNAME=$240FOLDERNAME=$2
43TARGET_DEVICE=$341TARGET_DEVICE=$3
44TARGET_DEVICE_PORT=$442TARGET_DEVICE_PORT=$4
45TARGET_DEVICE_HOME=$543TARGET_DEVICE_HOME=$5
4644
47USAGE="$0 [serialnumber] [foldername] [target_device] [target_device_port] [target_device_home]"45USAGE="$0 [serialnumber] [foldername] [target_device] [target_device_port] [target_device_home]"
48SSHIDENTITY=~/.ssh/ubuntudevice_${SERIALNUMBER}_id_rsa
4946
50if [[ -z $FOLDERNAME ]]; then47if [[ -z $FOLDERNAME ]]; then
51 echo ${USAGE}48 echo ${USAGE}
52 exit49 exit
53fi50fi
5451
55if [[ -z ${TARGET_DEVICE_PORT} ]]; then52if [[ -z ${TARGET_DEVICE_PORT} ]]; then
56 TARGET_DEVICE_PORT=222253 TARGET_DEVICE_PORT=2222
57fi54fi
5855
59if [[ -z ${TARGET_DEVICE} ]]; then56if [[ -z ${TARGET_DEVICE} ]]; then
60 TARGET_DEVICE=phablet@127.0.0.157 TARGET_DEVICE=phablet@127.0.0.1
61fi58fi
6259
63if [[ -z ${TARGET_DEVICE_HOME} ]]; then60if [[ -z ${TARGET_DEVICE_HOME} ]]; then
64 TARGET_DEVICE_HOME=/home/phablet/dev_tmp61 TARGET_DEVICE_HOME=/home/phablet/dev_tmp
65fi62fi
6663
67SCP="scp -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -P${TARGET_DEVICE_PORT}"64SCP="scp -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -P${TARGET_DEVICE_PORT}"
68SSH="ssh -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p${TARGET_DEVICE_PORT} ${TARGET_DEVICE}"65SSH="ssh -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p${TARGET_DEVICE_PORT} ${TARGET_DEVICE}"
69ADB="adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin "
70SCRIPTPATH=`dirname $0`
71
72${SCRIPTPATH}/device_portforward ${SERIALNUMBER} ${TARGET_DEVICE_PORT} 3768
7366
74pushd ${FOLDERNAME}67pushd ${FOLDERNAME}
75 set +e68 set +e
@@ -101,7 +94,7 @@
10194
102MISSING_DEPENDENCIES=`$SSH "cd ${TARGET_DEVICE_HOME}/${FOLDERNAME}; dpkg-checkbuilddeps 2>&1|sed 's/dpkg-checkbuilddeps: Unmet build dependencies://'"`95MISSING_DEPENDENCIES=`$SSH "cd ${TARGET_DEVICE_HOME}/${FOLDERNAME}; dpkg-checkbuilddeps 2>&1|sed 's/dpkg-checkbuilddeps: Unmet build dependencies://'"`
10396
104$ADB apt-get --assume-yes install ${MISSING_DEPENDENCIES}97adb_shell apt-get --assume-yes install ${MISSING_DEPENDENCIES}
10598
106$SSH "cd ${TARGET_DEVICE_HOME}/${FOLDERNAME}; dpkg-buildpackage -us -uc -nc"99$SSH "cd ${TARGET_DEVICE_HOME}/${FOLDERNAME}; dpkg-buildpackage -us -uc -nc"
107100
@@ -115,4 +108,4 @@
115echo108echo
116echo "@ $PWD"109echo "@ $PWD"
117echo110echo
118$ADB apt-get --assume-yes remove ${MISSING_DEPENDENCIES}111adb_shell apt-get --assume-yes remove ${MISSING_DEPENDENCIES}
119112
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_close_all_apps'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_close_all_apps 2013-05-01 18:19:31 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_close_all_apps 2013-06-25 19:33:25 +0000
@@ -14,23 +14,35 @@
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/>.
15#15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17#set -e;17
18#set -x18. `dirname $0`/functions.inc
1919
20SERIALNUMBER=$1
21APPLICATION=$220APPLICATION=$2
22ADB="adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin"
2321
24if [[ -z ${APPLICATION} ]]; then22if [[ -z ${APPLICATION} ]]; then
25 ${ADB} kill -s 9 \`pidof qmlscene\`23 echo "Close all instances of running applications."
24 adb_shell kill -s 9 \`pidof qmlscene\`
26else25else
27 IS_MOUNTED=`${ADB} mount | grep proc`26 echo "Close the ${APPLICATION}."
28 if [[ -z ${IS_MOUNTED} ]]; then27 set +e
29 ${ADB} mount -t proc proc /proc28 IS_MOUNTED=`adb_shell mount | grep proc`
30 fi29 set -e
31 PID_OF_APP=`${ADB} COLUMNS=1000 ps -ef|grep qmlscene|grep ${APPLICATION}|awk '{print $2}'`30 if [[ -z ${IS_MOUNTED} ]]; then
32 ${ADB} kill -s 9 ${PID_OF_APP}31 adb_shell mount -t proc proc /proc
33 if [[ -z ${IS_MOUNTED} ]]; then32 fi
34 ${ADB} umount /proc33
35 fi34 PID_OF_APP=`adb_shell COLUMNS=1000 ps -ef|grep qmlscene|grep ${APPLICATION}|awk '{print $2}'`
35 if [[ -z $PID_OF_APP ]]; then
36 echo " *no running instances of application*"
37 exit 1
38 fi
39
40 echo " * application pid(s) is ${PID_OF_APP}."
41
42 adb_shell kill -s 9 ${PID_OF_APP}
43
44 if [[ -z ${IS_MOUNTED} ]]; then
45 adb_shell umount /proc
46 fi
47 echo "Application has been closed."
36fi48fi
3749
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_deploy_package'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_deploy_package 2013-06-12 08:00:14 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_deploy_package 2013-06-25 19:33:25 +0000
@@ -14,16 +14,14 @@
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/>.
15#15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17set -e;17
1818. `dirname $0`/functions.inc
19SERIALNUMBER=$119
20PACKAGE=$220PACKAGE=$2
21TARGET_DEVICE=$321TARGET_DEVICE=$3
22TARGET_DEVICE_PORT=$422TARGET_DEVICE_PORT=$4
23TARGET_DEVICE_HOME=$523TARGET_DEVICE_HOME=$5
2424
25SSHIDENTITY=~/.ssh/ubuntudevice_${SERIALNUMBER}_id_rsa
26
27echo25echo
28echo "Deploying package to device with serial number of ${SERIALNUMBER}."26echo "Deploying package to device with serial number of ${SERIALNUMBER}."
29echo "Using SSH identity from ${SSHIDENTITY}."27echo "Using SSH identity from ${SSHIDENTITY}."
@@ -36,6 +34,12 @@
36 exit34 exit
37fi35fi
3836
37# lets make the ssh port forwarding back on, as the developer might have rebooted the device
38echo "do port forwarding"
39set +e
40${SCRIPTPATH}/device_portforward ${TARGET_DEVICE_PORT} 3768
41set -e
42echo "done"
39# check if we have .pro files or cpp/h files, if we do lets exit, as this deployment method is for QML projects43# check if we have .pro files or cpp/h files, if we do lets exit, as this deployment method is for QML projects
40H_FILES=`find . -name *.h`44H_FILES=`find . -name *.h`
41CPP_FILES=`find . -name *.cpp`45CPP_FILES=`find . -name *.cpp`
@@ -53,13 +57,10 @@
53PLAIN_PACKAGE=`basename ${PACKAGE}`57PLAIN_PACKAGE=`basename ${PACKAGE}`
54SCRIPTPATH=`dirname $0`58SCRIPTPATH=`dirname $0`
5559
56${SCRIPTPATH}/device_portforward ${SERIALNUMBER} ${TARGET_DEVICE_PORT} 3768
57
58SCP="scp -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -P${TARGET_DEVICE_PORT}"60SCP="scp -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -P${TARGET_DEVICE_PORT}"
59SSH="ssh -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p${TARGET_DEVICE_PORT} ${TARGET_DEVICE}"61SSH="ssh -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p${TARGET_DEVICE_PORT} ${TARGET_DEVICE}"
60ADB="adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin"
6162
62# -- actions --63# -- actions --
63$SCP ${PACKAGE} ${TARGET_DEVICE}:${TARGET_DEVICE_HOME}64$SCP ${PACKAGE} ${TARGET_DEVICE}:${TARGET_DEVICE_HOME}
64$ADB gdebi --n ${TARGET_DEVICE_HOME}/${PLAIN_PACKAGE}65adb_shell gdebi --n ${TARGET_DEVICE_HOME}/${PLAIN_PACKAGE}
65$SCRIPTPATH/qtc_device_restart_appslense ${SERIALNUMBER}66$SCRIPTPATH/qtc_device_restart_appslense ${SERIALNUMBER}
6667
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_developertools'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_developertools 2013-06-14 07:35:47 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_developertools 2013-06-25 19:33:25 +0000
@@ -14,19 +14,9 @@
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/>.
15#15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17set -e;17
1818. `dirname $0`/functions.inc
19SERIALNUMBER=$119
2020adb_shell apt-get -y -f install
21ADB="adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin"21adb_shell apt-get update
2222adb_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
23adb -s ${SERIALNUMBER} root
24adb -s ${SERIALNUMBER} wait-for-device
25adb -s ${SERIALNUMBER} forward tcp:2222 tcp:22
26adb -s ${SERIALNUMBER} forward tcp:3768 tcp:3768
27$ADB apt-get -y -f install
28## Fix bug #1178242
29#$ADB apt-get install software-properties-common -y
30#$ADB apt-add-repository ppa:canonical-qt5-edgers/qt5-proper -y
31$ADB apt-get update
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
3323
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_restart_appslense'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_restart_appslense 2013-05-01 18:19:31 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_restart_appslense 2013-06-25 19:33:25 +0000
@@ -14,11 +14,9 @@
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/>.
15#15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17set -e;
1817
19SERIALNUMBER=$118. `dirname $0`/functions.inc
20ADB="adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin"
2119
22# -- actions --20# -- actions --
23$ADB kill -s 9 \`pidof unity-applications-daemon\`21#adb_shell kill -s 9 \`pidof unity-applications-daemon\`
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 &"
2523
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_run_app'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_run_app 2013-05-02 21:46:53 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_device_run_app 2013-06-25 19:33:25 +0000
@@ -14,11 +14,9 @@
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/>.
15#15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17set -e;17
18#set -x18. `dirname $0`/functions.inc
1919
20SERIALNUMBER=$1
21SSHIDENTITY=~/.ssh/ubuntudevice_${SERIALNUMBER}_id_rsa
22FOLDERNAME=$220FOLDERNAME=$2
23DESKTOP_FILENAME=$321DESKTOP_FILENAME=$3
24MAIN_QML=$422MAIN_QML=$4
@@ -56,11 +54,9 @@
5654
57SCP="scp -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -P${TARGET_DEVICE_PORT}"55SCP="scp -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -P${TARGET_DEVICE_PORT}"
58SSH="ssh -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p${TARGET_DEVICE_PORT} ${TARGET_DEVICE}"56SSH="ssh -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p${TARGET_DEVICE_PORT} ${TARGET_DEVICE}"
59SCRIPTPATH=`dirname $0`57
60COMMAND="qmlscene ${TARGET_DEVICE_HOME}/${FOLDERNAME}/${MAIN_QML} --desktop_file_hint=${TARGET_DEVICE_DESKTOP_PATH}/${DESKTOP_FILENAME}"58COMMAND="qmlscene ${TARGET_DEVICE_HOME}/${FOLDERNAME}/${MAIN_QML} --desktop_file_hint=${TARGET_DEVICE_DESKTOP_PATH}/${DESKTOP_FILENAME}"
6159
62${SCRIPTPATH}/device_portforward ${SERIALNUMBER} ${TARGET_DEVICE_PORT} 3768
63
64# make a tar package60# make a tar package
65tar -cjf ${FOLDERNAME}.tar.bz2 ${FOLDERNAME}61tar -cjf ${FOLDERNAME}.tar.bz2 ${FOLDERNAME}
6662
6763
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_launch_gallery'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_launch_gallery 2013-06-06 15:59:11 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_launch_gallery 2013-06-25 19:33:25 +0000
@@ -1,2 +1,18 @@
1#!/bin/bash1#!/bin/bash
2# Copyright 2013 Canonical Ltd.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU Lesser General Public License as published by
6# the Free Software Foundation; version 2.1.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17
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 &
319
=== modified file 'ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_read_bazaar_settings'
--- ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_read_bazaar_settings 2013-06-03 19:25:13 +0000
+++ ubuntu-qtcreator-plugins/share/qtcreator/ubuntu/scripts/qtc_read_bazaar_settings 2013-06-25 19:33:25 +0000
@@ -1,4 +1,19 @@
1#!/bin/bash1#!/bin/bash
2# Copyright 2013 Canonical Ltd.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU Lesser General Public License as published by
6# the Free Software Foundation; version 2.1.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
217
3DEBEMAIL=`grep -G "^DEBEMAIL" ~/.bashrc`18DEBEMAIL=`grep -G "^DEBEMAIL" ~/.bashrc`
4DEBFULLNAME=`grep -G "^DEBFULLNAME" ~/.bashrc`19DEBFULLNAME=`grep -G "^DEBFULLNAME" ~/.bashrc`
520
=== modified file 'ubuntu-qtcreator-plugins/src/plugins/ubuntu/ubuntudeviceswidget.cpp'
--- ubuntu-qtcreator-plugins/src/plugins/ubuntu/ubuntudeviceswidget.cpp 2013-06-24 12:58:28 +0000
+++ ubuntu-qtcreator-plugins/src/plugins/ubuntu/ubuntudeviceswidget.cpp 2013-06-25 19:33:25 +0000
@@ -291,7 +291,7 @@
291void UbuntuDevicesWidget::on_pushButtonSshSetupPublicKey_clicked() {291void UbuntuDevicesWidget::on_pushButtonSshSetupPublicKey_clicked() {
292 beginAction(QString::fromLatin1("Setting up public key authentication.."));292 beginAction(QString::fromLatin1("Setting up public key authentication.."));
293 m_ubuntuProcess.stop();293 m_ubuntuProcess.stop();
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());
295 m_ubuntuProcess.start(QString::fromLatin1("Setting up public key authentication.."));295 m_ubuntuProcess.start(QString::fromLatin1("Setting up public key authentication.."));
296}296}
297297

Subscribers

People subscribed via source and target branches