cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject git commit: added windows run support, still a few issues
Date Sat, 27 Sep 2014 00:23:09 GMT
Repository: cordova-browser
Updated Branches:
  refs/heads/master 217cafe16 -> df11c07db


added windows run support, still a few issues


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

Branch: refs/heads/master
Commit: df11c07db3987658502a37c25a2cff7c90ec8112
Parents: 217cafe
Author: Steven Gill <stevengill97@gmail.com>
Authored: Fri Sep 26 17:22:59 2014 -0700
Committer: Steven Gill <stevengill97@gmail.com>
Committed: Fri Sep 26 17:22:59 2014 -0700

----------------------------------------------------------------------
 bin/templates/project/cordova/run | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-browser/blob/df11c07d/bin/templates/project/cordova/run
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/run b/bin/templates/project/cordova/run
index cc80ed2..59a7c5c 100755
--- a/bin/templates/project/cordova/run
+++ b/bin/templates/project/cordova/run
@@ -23,4 +23,14 @@ var shell = require('shelljs'),
     spawn = require('child_process').spawn,
     project = 'file://' + shell.pwd() + '/platforms/browser/www/index.html';
 
-spawn('open', ['-n', '-a', 'Google\ Chrome', '--args', '--disable-web-security', '--user-data-dir=/tmp/temp_chrome_user_data_dir_for_cordova_browser',
project]);
+switch (process.platform) {
+  case 'darwin':
+    spawn('open', ['-n', '-a', 'Google\ Chrome', '--args', '--disable-web-security', '--user-data-dir=/tmp/temp_chrome_user_data_dir_for_cordova_browser',
project]);
+    break;
+  case 'win32':
+    //TODO: Use regex to fix location of chrome.exe
+    //TODO: Get --user-data-dir to work for windows
+    spawn('C:/Program Files (x86)/Google/Chrome/Application/chrome.exe', ['--user-data-dir="C:/Chromedevsession"',
'--disable-web-security', project]);
+    break;
+}
+


Mime
View raw message