You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by za...@apache.org on 2014/12/15 14:33:05 UTC

[16/37] cordova-ubuntu git commit: Run On Device was not working because of invalid calls.

Run On Device was not working because of invalid calls.


Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/e242ffa6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/e242ffa6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/e242ffa6

Branch: refs/heads/master
Commit: e242ffa63e9eed9b5f5d606c1cc5bf830a8b3144
Parents: bb6acd7
Author: Jean-Francois Moy <je...@gmail.com>
Authored: Thu Nov 6 11:51:13 2014 +0000
Committer: Jean-Francois Moy <je...@gmail.com>
Committed: Thu Nov 6 11:51:13 2014 +0000

----------------------------------------------------------------------
 bin/templates/project/cordova/lib/run.js | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/e242ffa6/bin/templates/project/cordova/lib/run.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/lib/run.js b/bin/templates/project/cordova/lib/run.js
index 0418fce..c0beaee 100644
--- a/bin/templates/project/cordova/lib/run.js
+++ b/bin/templates/project/cordova/lib/run.js
@@ -30,7 +30,7 @@ var Devices = require('./device');
 var Constants = require('./constants');
 var Utils = require('./utils');
 
-var PLATFORMS = Constants.PLATFORM_TYPES; 
+var PLATFORMS = Constants.PLATFORM_TYPES;
 var MSG = Constants.MSG;
 
 module.exports.run = function(rootDir, desktop, debug, target, nobuild, emulator, framework) {
@@ -96,8 +96,8 @@ function runNative(rootDir, debug) {
 function runOnDevice(rootDir, debug, target, architecture, framework) {
     var ubuntuDir = path.join(rootDir, 'platforms', 'ubuntu');
 
-    if (!isDeviceAttached(target)) {
-        console.error(MSG.UBUNTU_TOUCH_DEVICE_NOT_AVALIABLE.red)
+    if (!Devices.isAttached(target)) {
+        console.error(MSG.UBUNTU_TOUCH_DEVICE_NOT_AVALIABLE.red);
         process.exit(1);
     }
 
@@ -115,23 +115,22 @@ function runOnDevice(rootDir, debug, target, architecture, framework) {
 
     assert.ok(names.length == 1);
 
-    adbExec(target, 'shell "ps -A -eo pid,cmd | grep cordova-ubuntu | awk \'{ print \\$1 }\' | xargs kill -9"')
+    Devices.adbExec(target, 'shell "ps -A -eo pid,cmd | grep cordova-ubuntu | awk \'{ print \\$1 }\' | xargs kill -9"');
 
     if (debug)
-        adbExec(target, 'forward --remove-all');
+        Devices.adbExec(target, 'forward --remove-all');
 
-    adbExec(target, 'push ' + names[0] + ' /home/phablet');
-    adbExec(target, 'shell "cd /home/phablet/; pkcon install-local ' + names[0] + ' -p --allow-untrusted -y"');
+    Devices.adbExec(target, 'push ' + names[0] + ' /home/phablet');
+    Devices.adbExec(target, 'shell "cd /home/phablet/; pkcon install-local ' + names[0] + ' -p --allow-untrusted -y"');
 
     if (debug) {
         console.error('Debug enabled. Try pointing a WebKit browser to http://127.0.0.1:9222');
-
-        adbExec(target, 'forward tcp:9222 tcp:9222');
+        Devices.adbExec(target, 'forward tcp:9222 tcp:9222');
     }
 
     console.log('have fun!'.rainbow);
 
-    return adbExecAsync(target, 'shell bash -c "ubuntu-app-launch  \\`ubuntu-app-triplet ' + appId + '\\`"').then(function () {
+    return Devices.adbExecAsync(target, 'shell bash -c "ubuntu-app-launch  \\`ubuntu-app-triplet ' + appId + '\\`"').then(function () {
         Utils.popd();
     });
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org