cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [04/50] [abbrv] git commit: [CB-4385] tooling fix for when path to project has spaces
Date Fri, 01 Nov 2013 01:26:59 GMT
[CB-4385] tooling fix for when path to project has spaces


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

Branch: refs/heads/2.9.x
Commit: a88d8ad069c0cfd96c73e3293da18228b7a3b003
Parents: 4a733b0
Author: Benn Mapes <benn.mapes@gmail.com>
Authored: Wed Jul 24 18:13:16 2013 -0700
Committer: Benn Mapes <benn.mapes@gmail.com>
Committed: Wed Jul 24 18:13:16 2013 -0700

----------------------------------------------------------------------
 wp7/bin/create.js                                 |  3 ++-
 wp7/template/cordova/build.bat                    |  6 +++---
 wp7/template/cordova/clean.bat                    |  6 +++---
 wp7/template/cordova/lib/build.js                 | 11 +++++++----
 wp7/template/cordova/lib/deploy.js                | 13 +++++++------
 wp7/template/cordova/lib/install-device.bat       |  6 +++---
 wp7/template/cordova/lib/install-emulator.bat     |  6 +++---
 wp7/template/cordova/lib/list-devices.bat         |  6 +++---
 wp7/template/cordova/lib/list-emulator-images.bat |  6 +++---
 wp7/template/cordova/lib/target-list.js           |  3 ++-
 wp7/template/cordova/run.bat                      |  6 +++---
 wp7/template/cordova/version.bat                  |  8 ++++----
 wp8/bin/create.js                                 |  3 ++-
 wp8/template/cordova/build.bat                    |  6 +++---
 wp8/template/cordova/clean.bat                    |  6 +++---
 wp8/template/cordova/lib/build.js                 | 11 +++++++----
 wp8/template/cordova/lib/deploy.js                | 13 +++++++------
 wp8/template/cordova/lib/install-device.bat       |  6 +++---
 wp8/template/cordova/lib/install-emulator.bat     |  6 +++---
 wp8/template/cordova/lib/list-devices.bat         |  6 +++---
 wp8/template/cordova/lib/list-emulator-images.bat |  6 +++---
 wp8/template/cordova/lib/target-list.js           |  3 ++-
 wp8/template/cordova/run.bat                      |  6 +++---
 wp8/template/cordova/version.bat                  |  8 ++++----
 24 files changed, 86 insertions(+), 74 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/a88d8ad0/wp7/bin/create.js
----------------------------------------------------------------------
diff --git a/wp7/bin/create.js b/wp7/bin/create.js
index ccd6073..983df58 100644
--- a/wp7/bin/create.js
+++ b/wp7/bin/create.js
@@ -113,6 +113,7 @@ function exec_verbose(command) {
     //Check to make sure our scripts did not encounter an error
     if (!oShell.StdErr.AtEndOfStream) {
         var line = oShell.StdErr.ReadAll();
+        Log("ERROR: command failed in create.js : " + command);
         Log(line, true);
         WScript.Quit(1);
     }
@@ -168,7 +169,7 @@ function create(path, namespace, name) {
     }
 
     //clean up any Bin/obj or other generated files
-    exec('cscript ' + path + '\\cordova\\lib\\clean.js //nologo');
+    exec('cscript "' + path + '\\cordova\\lib\\clean.js" //nologo');
 
     // delete any .user and .sou files if any
     if (fso.FolderExists(path)) {

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/a88d8ad0/wp7/template/cordova/build.bat
----------------------------------------------------------------------
diff --git a/wp7/template/cordova/build.bat b/wp7/template/cordova/build.bat
index b48598a..06a321a 100644
--- a/wp7/template/cordova/build.bat
+++ b/wp7/template/cordova/build.bat
@@ -1,7 +1,7 @@
 @ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%lib\build.js (
-    cscript "%full_path%lib\build.js" %* //nologo
+SET script_path="%~dp0lib\build.js"
+IF EXIST %script_path% (
+    cscript %script_path% %* //nologo
 ) ELSE (
     ECHO.
     ECHO ERROR: Could not find 'build.js' in cordova/lib, aborting...>&2

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/a88d8ad0/wp7/template/cordova/clean.bat
----------------------------------------------------------------------
diff --git a/wp7/template/cordova/clean.bat b/wp7/template/cordova/clean.bat
index 1bafe1b..f637470 100644
--- a/wp7/template/cordova/clean.bat
+++ b/wp7/template/cordova/clean.bat
@@ -1,7 +1,7 @@
 @ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%lib\clean.js (
-    cscript "%full_path%lib\clean.js" %* //nologo
+SET script_path="%~dp0lib\clean.js"
+IF EXIST %script_path% (
+    cscript %script_path% %* //nologo
 ) ELSE (
     ECHO.
     ECHO ERROR: Could not find 'clean.js' in cordova/lib, aborting...>&2

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/a88d8ad0/wp7/template/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/wp7/template/cordova/lib/build.js b/wp7/template/cordova/lib/build.js
index 1375c54..32ff937 100644
--- a/wp7/template/cordova/lib/build.js
+++ b/wp7/template/cordova/lib/build.js
@@ -66,6 +66,7 @@ function exec_verbose(command) {
     //Check to make sure our scripts did not encounter an error
     if (!oShell.StdErr.AtEndOfStream) {
         var line = oShell.StdErr.ReadAll();
+        Log("ERROR: command failed in build.js : " + command);
         Log(line, true);
         WScript.Quit(2);
     }
@@ -105,7 +106,8 @@ function build_xap_release(path) {
     Log("\tDirectory : " + path);
     
     wscript_shell.CurrentDirectory = path;
-    exec_verbose('msbuild ' + get_solution_name(path) + ' /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal
/nologo /p:Configuration=Release');
+    var cmd = 'msbuild "' + get_solution_name(path) + '" /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal
/nologo /p:Configuration=Release';
+    exec_verbose(cmd);
     
     // check if file xap was created
     if (fso.FolderExists(path + '\\Bin\\Release')) {
@@ -129,7 +131,8 @@ function build_xap_debug(path) {
     Log("\tDirectory : " + path);
     
     wscript_shell.CurrentDirectory = path;
-    exec_verbose('msbuild ' + get_solution_name(path) + ' /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal
/nologo /p:Configuration=Debug');
+    var cmd = 'msbuild "' + get_solution_name(path) + '" /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal
/nologo /p:Configuration=Debug';
+    exec_verbose(cmd);
     
     // check if file xap was created
     if (fso.FolderExists(path + '\\Bin\\Debug')) {
@@ -169,11 +172,11 @@ if (args.Count() > 0) {
         }
 
         if (args(0) == "--debug" || args(0) == "-d") {
-            exec_verbose('%comspec% /c ' + ROOT + '\\cordova\\clean');
+            exec_verbose('%comspec% /c "' + ROOT + '\\cordova\\clean"');
             build_xap_debug(ROOT);
         }
         else if (args(0) == "--release" || args(0) == "-r") {
-            exec_verbose('%comspec% /c ' + ROOT + '\\cordova\\clean');
+            exec_verbose('%comspec% /c "' + ROOT + '\\cordova\\clean"');
             build_xap_release(ROOT);
         }
         else {

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/a88d8ad0/wp7/template/cordova/lib/deploy.js
----------------------------------------------------------------------
diff --git a/wp7/template/cordova/lib/deploy.js b/wp7/template/cordova/lib/deploy.js
index 448fa78..0599765 100644
--- a/wp7/template/cordova/lib/deploy.js
+++ b/wp7/template/cordova/lib/deploy.js
@@ -106,6 +106,7 @@ function exec_verbose(command) {
     //Check to make sure our scripts did not encounter an error
     if (!oShell.StdErr.AtEndOfStream) {
         var line = oShell.StdErr.ReadAll();
+        Log("ERROR: command failed in deploy.js : " + command);
         Log(line, true);
         WScript.Quit(2);
     }
@@ -144,7 +145,7 @@ function cordovaDeploy(path) {
         if (fso.FolderExists(path + CORDOVA_DEPLOY + '\\CordovaDeploy\\Bin')) {
             fso.DeleteFolder(path + CORDOVA_DEPLOY + '\\CordovaDeploy\\Bin');
         }
-        exec_verbose('msbuild ' + path + CORDOVA_DEPLOY + '\\CordovaDeploy.sln');
+        exec_verbose('msbuild "' + path + CORDOVA_DEPLOY + '\\CordovaDeploy.sln"');
 
         if (fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
             Log('CordovaDeploy.exe compiled, SUCCESS.');
@@ -167,7 +168,7 @@ function device(path)
     if (fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
         Log('Deploying to device ...');
         //TODO: get device ID from list-devices and deploy to first one
-        exec_verbose('%comspec% /c ' + path + CORDOVA_DEPLOY_EXE + ' ' + path + ' -d:0');
+        exec_verbose('"' + path + CORDOVA_DEPLOY_EXE + '" "' + path + '" -d:0');
     }
     else
     {
@@ -184,7 +185,7 @@ function emulator(path)
     if (fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
         Log('Deploying to emulator ...');
         //TODO: get emulator ID from list-emulators and deploy to first one
-        exec_verbose('%comspec% /c ' + path + CORDOVA_DEPLOY_EXE + ' ' + path + ' -d:1');
+        exec_verbose('"' + path + CORDOVA_DEPLOY_EXE + '" "' + path + '" -d:1');
     }
     else
     {
@@ -239,16 +240,16 @@ function target(path) {
 function build(path) {
     switch (build_type) {
         case DEBUG :
-            exec_verbose('%comspec% /c ' + ROOT + '\\cordova\\build --debug');
+            exec_verbose('%comspec% /c "' + ROOT + '\\cordova\\build" --debug');
             break;
         case RELEASE :
-            exec_verbose('%comspec% /c ' + ROOT + '\\cordova\\build --release');
+            exec_verbose('%comspec% /c "' + ROOT + '\\cordova\\build" --release');
             break;
         case NO_BUILD :
             break;
         case NONE :
             Log("WARNING: [ --debug | --release | --nobuild ] not specified, defaulting to
--debug.");
-            exec_verbose('%comspec% /c ' + ROOT + '\\cordova\\build --debug');
+            exec_verbose('%comspec% /c "' + ROOT + '\\cordova\\build" --debug');
             break;
         default :
             Log("Build option not recognized: " + build_type, true);

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/a88d8ad0/wp7/template/cordova/lib/install-device.bat
----------------------------------------------------------------------
diff --git a/wp7/template/cordova/lib/install-device.bat b/wp7/template/cordova/lib/install-device.bat
index 9507c36..b953743 100644
--- a/wp7/template/cordova/lib/install-device.bat
+++ b/wp7/template/cordova/lib/install-device.bat
@@ -1,7 +1,7 @@
 @ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%deploy.js (
-    cscript "%full_path%deploy.js" %* --device --nobuild //nologo
+SET script_path="%~dp0deploy.js"
+IF EXIST %script_path% (
+    cscript %script_path% %* --device --nobuild //nologo
 ) ELSE (
     ECHO.
     ECHO ERROR: Could not find 'deploy.js' in cordova/lib, aborting...>&2

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/a88d8ad0/wp7/template/cordova/lib/install-emulator.bat
----------------------------------------------------------------------
diff --git a/wp7/template/cordova/lib/install-emulator.bat b/wp7/template/cordova/lib/install-emulator.bat
index b3ee451..5df933b 100644
--- a/wp7/template/cordova/lib/install-emulator.bat
+++ b/wp7/template/cordova/lib/install-emulator.bat
@@ -1,7 +1,7 @@
 @ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%deploy.js (
-    cscript "%full_path%deploy.js" %* --emulator --nobuild //nologo
+SET script_path="%~dp0deploy.js"
+IF EXIST %script_path% (
+    cscript %script_path% %* --emulator --nobuild //nologo
 ) ELSE (
     ECHO. 
     ECHO ERROR: Could not find 'deploy.js' in cordova/lib, aborting...>&2

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/a88d8ad0/wp7/template/cordova/lib/list-devices.bat
----------------------------------------------------------------------
diff --git a/wp7/template/cordova/lib/list-devices.bat b/wp7/template/cordova/lib/list-devices.bat
index bf4492b..d2158c6 100644
--- a/wp7/template/cordova/lib/list-devices.bat
+++ b/wp7/template/cordova/lib/list-devices.bat
@@ -1,7 +1,7 @@
 @ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%target-list.js (
-    cscript "%full_path%target-list.js" %* --devices //nologo
+SET script_path="%~dp0target-list.js"
+IF EXIST %script_path% (
+    cscript %script_path% %* --devices //nologo
 ) ELSE (
     ECHO. 
     ECHO ERROR: Could not find 'target-list.js' in cordova/lib, aborting...>&2

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/a88d8ad0/wp7/template/cordova/lib/list-emulator-images.bat
----------------------------------------------------------------------
diff --git a/wp7/template/cordova/lib/list-emulator-images.bat b/wp7/template/cordova/lib/list-emulator-images.bat
index 3f571c7..44b52ef 100644
--- a/wp7/template/cordova/lib/list-emulator-images.bat
+++ b/wp7/template/cordova/lib/list-emulator-images.bat
@@ -1,7 +1,7 @@
 @ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%target-list.js (
-    cscript "%full_path%target-list.js" %* --emulators //nologo
+SET script_path="%~dp0target-list.js"
+IF EXIST %script_path% (
+    cscript %script_path% %* --emulators //nologo
 ) ELSE (
     ECHO. 
     ECHO ERROR: Could not find 'target-list.js' in cordova/lib, aborting...>&2

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/a88d8ad0/wp7/template/cordova/lib/target-list.js
----------------------------------------------------------------------
diff --git a/wp7/template/cordova/lib/target-list.js b/wp7/template/cordova/lib/target-list.js
index 805eea5..c899a27 100644
--- a/wp7/template/cordova/lib/target-list.js
+++ b/wp7/template/cordova/lib/target-list.js
@@ -70,6 +70,7 @@ function exec(command) {
     //Check to make sure our scripts did not encounter an error
     if (!oShell.StdErr.AtEndOfStream) {
         var line = oShell.StdErr.ReadAll();
+        Log("ERROR: command failed in target-list.js : " + command);
         Log(line, true);
         WScript.Quit(2);
     }
@@ -167,7 +168,7 @@ function cordovaDeploy(path) {
         if (fso.FolderExists(path + CORDOVA_DEPLOY + "\\CordovaDeploy\\Bin")) {
             fso.DeleteFolder(path + CORDOVA_DEPLOY + "\\CordovaDeploy\\Bin");
         }
-        exec('msbuild ' + path + CORDOVA_DEPLOY + '\\CordovaDeploy.sln');
+        exec('msbuild "' + path + CORDOVA_DEPLOY + '\\CordovaDeploy.sln"');
 
         if (fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
             return;

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/a88d8ad0/wp7/template/cordova/run.bat
----------------------------------------------------------------------
diff --git a/wp7/template/cordova/run.bat b/wp7/template/cordova/run.bat
index b966856..c8ad0a9 100644
--- a/wp7/template/cordova/run.bat
+++ b/wp7/template/cordova/run.bat
@@ -1,7 +1,7 @@
 @ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%lib\deploy.js (
-        cscript "%full_path%lib\deploy.js" %* //nologo
+SET script_path="%~dp0lib\deploy.js"
+IF EXIST %script_path% (
+        cscript %script_path% %* //nologo
 ) ELSE (
     ECHO.
     ECHO ERROR: Could not find 'deploy.js' in cordova/lib, aborting...>&2

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/a88d8ad0/wp7/template/cordova/version.bat
----------------------------------------------------------------------
diff --git a/wp7/template/cordova/version.bat b/wp7/template/cordova/version.bat
index 714e876..68cf7d1 100644
--- a/wp7/template/cordova/version.bat
+++ b/wp7/template/cordova/version.bat
@@ -1,9 +1,9 @@
 @ECHO OFF
-SET full_path=%~dp0
-IF EXIST "%full_path%..\VERSION" (
-    type "%full_path%..\VERSION"
+SET script_path="%~dp0..\VERSION"
+IF EXIST %script_path% (
+    type %script_path%
 ) ELSE (
     ECHO.
-    ECHO ERROR: Could not find file VERSION in project folder
+    ECHO ERROR: Could not find file VERSION in project folder, path tried was %script_path%
>&2
     EXIT /B 1
 )
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/a88d8ad0/wp8/bin/create.js
----------------------------------------------------------------------
diff --git a/wp8/bin/create.js b/wp8/bin/create.js
index ae88bf9..5232828 100644
--- a/wp8/bin/create.js
+++ b/wp8/bin/create.js
@@ -113,6 +113,7 @@ function exec_verbose(command) {
     //Check to make sure our scripts did not encounter an error
     if (!oShell.StdErr.AtEndOfStream) {
         var line = oShell.StdErr.ReadAll();
+        Log("ERROR: command failed in create.js : " + command);
         Log(line, true);
         WScript.Quit(1);
     }
@@ -168,7 +169,7 @@ function create(path, namespace, name) {
     }
 
     //clean up any Bin/obj or other generated files
-    exec('cscript ' + path + '\\cordova\\lib\\clean.js //nologo');
+    exec('cscript "' + path + '\\cordova\\lib\\clean.js" //nologo');
 
     // delete any .user and .sou files if any
     if (fso.FolderExists(path)) {

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/a88d8ad0/wp8/template/cordova/build.bat
----------------------------------------------------------------------
diff --git a/wp8/template/cordova/build.bat b/wp8/template/cordova/build.bat
index b48598a..06a321a 100644
--- a/wp8/template/cordova/build.bat
+++ b/wp8/template/cordova/build.bat
@@ -1,7 +1,7 @@
 @ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%lib\build.js (
-    cscript "%full_path%lib\build.js" %* //nologo
+SET script_path="%~dp0lib\build.js"
+IF EXIST %script_path% (
+    cscript %script_path% %* //nologo
 ) ELSE (
     ECHO.
     ECHO ERROR: Could not find 'build.js' in cordova/lib, aborting...>&2

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/a88d8ad0/wp8/template/cordova/clean.bat
----------------------------------------------------------------------
diff --git a/wp8/template/cordova/clean.bat b/wp8/template/cordova/clean.bat
index 1bafe1b..f637470 100644
--- a/wp8/template/cordova/clean.bat
+++ b/wp8/template/cordova/clean.bat
@@ -1,7 +1,7 @@
 @ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%lib\clean.js (
-    cscript "%full_path%lib\clean.js" %* //nologo
+SET script_path="%~dp0lib\clean.js"
+IF EXIST %script_path% (
+    cscript %script_path% %* //nologo
 ) ELSE (
     ECHO.
     ECHO ERROR: Could not find 'clean.js' in cordova/lib, aborting...>&2

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/a88d8ad0/wp8/template/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/wp8/template/cordova/lib/build.js b/wp8/template/cordova/lib/build.js
index fec2d17..31fc4ce 100644
--- a/wp8/template/cordova/lib/build.js
+++ b/wp8/template/cordova/lib/build.js
@@ -66,6 +66,7 @@ function exec_verbose(command) {
     //Check to make sure our scripts did not encounter an error
     if (!oShell.StdErr.AtEndOfStream) {
         var line = oShell.StdErr.ReadAll();
+        Log("ERROR: command failed in build.js : " + command);
         Log(line, true);
         WScript.Quit(2);
     }
@@ -105,7 +106,8 @@ function build_xap_release(path) {
     Log("\tDirectory : " + path);
     
     wscript_shell.CurrentDirectory = path;
-    exec_verbose('msbuild ' + get_solution_name(path) + ' /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal
/nologo /p:Configuration=Release');
+    var cmd = 'msbuild "' + get_solution_name(path) + '" /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal
/nologo /p:Configuration=Release';
+    exec_verbose(cmd);
     
     // check if file xap was created
     if (fso.FolderExists(path + '\\Bin\\Release')) {
@@ -129,7 +131,8 @@ function build_xap_debug(path) {
     Log("\tDirectory : " + path);
     
     wscript_shell.CurrentDirectory = path;
-    exec_verbose('msbuild ' + get_solution_name(path) + ' /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal
/nologo /p:Configuration=Debug');
+    var cmd = 'msbuild "' + get_solution_name(path) + '" /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal
/nologo /p:Configuration=Debug';
+    exec_verbose(cmd);
     
     // check if file xap was created
     if (fso.FolderExists(path + '\\Bin\\Debug')) {
@@ -169,11 +172,11 @@ if (args.Count() > 0) {
         }
 
         if (args(0) == "--debug" || args(0) == "-d") {
-            exec_verbose('%comspec% /c ' + ROOT + '\\cordova\\clean');
+            exec_verbose('%comspec% /c "' + ROOT + '\\cordova\\clean"');
             build_xap_debug(ROOT);
         }
         else if (args(0) == "--release" || args(0) == "-r") {
-            exec_verbose('%comspec% /c ' + ROOT + '\\cordova\\clean');
+            exec_verbose('%comspec% /c "' + ROOT + '\\cordova\\clean"');
             build_xap_release(ROOT);
         }
         else {

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/a88d8ad0/wp8/template/cordova/lib/deploy.js
----------------------------------------------------------------------
diff --git a/wp8/template/cordova/lib/deploy.js b/wp8/template/cordova/lib/deploy.js
index 448fa78..0599765 100644
--- a/wp8/template/cordova/lib/deploy.js
+++ b/wp8/template/cordova/lib/deploy.js
@@ -106,6 +106,7 @@ function exec_verbose(command) {
     //Check to make sure our scripts did not encounter an error
     if (!oShell.StdErr.AtEndOfStream) {
         var line = oShell.StdErr.ReadAll();
+        Log("ERROR: command failed in deploy.js : " + command);
         Log(line, true);
         WScript.Quit(2);
     }
@@ -144,7 +145,7 @@ function cordovaDeploy(path) {
         if (fso.FolderExists(path + CORDOVA_DEPLOY + '\\CordovaDeploy\\Bin')) {
             fso.DeleteFolder(path + CORDOVA_DEPLOY + '\\CordovaDeploy\\Bin');
         }
-        exec_verbose('msbuild ' + path + CORDOVA_DEPLOY + '\\CordovaDeploy.sln');
+        exec_verbose('msbuild "' + path + CORDOVA_DEPLOY + '\\CordovaDeploy.sln"');
 
         if (fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
             Log('CordovaDeploy.exe compiled, SUCCESS.');
@@ -167,7 +168,7 @@ function device(path)
     if (fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
         Log('Deploying to device ...');
         //TODO: get device ID from list-devices and deploy to first one
-        exec_verbose('%comspec% /c ' + path + CORDOVA_DEPLOY_EXE + ' ' + path + ' -d:0');
+        exec_verbose('"' + path + CORDOVA_DEPLOY_EXE + '" "' + path + '" -d:0');
     }
     else
     {
@@ -184,7 +185,7 @@ function emulator(path)
     if (fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
         Log('Deploying to emulator ...');
         //TODO: get emulator ID from list-emulators and deploy to first one
-        exec_verbose('%comspec% /c ' + path + CORDOVA_DEPLOY_EXE + ' ' + path + ' -d:1');
+        exec_verbose('"' + path + CORDOVA_DEPLOY_EXE + '" "' + path + '" -d:1');
     }
     else
     {
@@ -239,16 +240,16 @@ function target(path) {
 function build(path) {
     switch (build_type) {
         case DEBUG :
-            exec_verbose('%comspec% /c ' + ROOT + '\\cordova\\build --debug');
+            exec_verbose('%comspec% /c "' + ROOT + '\\cordova\\build" --debug');
             break;
         case RELEASE :
-            exec_verbose('%comspec% /c ' + ROOT + '\\cordova\\build --release');
+            exec_verbose('%comspec% /c "' + ROOT + '\\cordova\\build" --release');
             break;
         case NO_BUILD :
             break;
         case NONE :
             Log("WARNING: [ --debug | --release | --nobuild ] not specified, defaulting to
--debug.");
-            exec_verbose('%comspec% /c ' + ROOT + '\\cordova\\build --debug');
+            exec_verbose('%comspec% /c "' + ROOT + '\\cordova\\build" --debug');
             break;
         default :
             Log("Build option not recognized: " + build_type, true);

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/a88d8ad0/wp8/template/cordova/lib/install-device.bat
----------------------------------------------------------------------
diff --git a/wp8/template/cordova/lib/install-device.bat b/wp8/template/cordova/lib/install-device.bat
index 9507c36..b953743 100644
--- a/wp8/template/cordova/lib/install-device.bat
+++ b/wp8/template/cordova/lib/install-device.bat
@@ -1,7 +1,7 @@
 @ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%deploy.js (
-    cscript "%full_path%deploy.js" %* --device --nobuild //nologo
+SET script_path="%~dp0deploy.js"
+IF EXIST %script_path% (
+    cscript %script_path% %* --device --nobuild //nologo
 ) ELSE (
     ECHO.
     ECHO ERROR: Could not find 'deploy.js' in cordova/lib, aborting...>&2

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/a88d8ad0/wp8/template/cordova/lib/install-emulator.bat
----------------------------------------------------------------------
diff --git a/wp8/template/cordova/lib/install-emulator.bat b/wp8/template/cordova/lib/install-emulator.bat
index b3ee451..5df933b 100644
--- a/wp8/template/cordova/lib/install-emulator.bat
+++ b/wp8/template/cordova/lib/install-emulator.bat
@@ -1,7 +1,7 @@
 @ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%deploy.js (
-    cscript "%full_path%deploy.js" %* --emulator --nobuild //nologo
+SET script_path="%~dp0deploy.js"
+IF EXIST %script_path% (
+    cscript %script_path% %* --emulator --nobuild //nologo
 ) ELSE (
     ECHO. 
     ECHO ERROR: Could not find 'deploy.js' in cordova/lib, aborting...>&2

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/a88d8ad0/wp8/template/cordova/lib/list-devices.bat
----------------------------------------------------------------------
diff --git a/wp8/template/cordova/lib/list-devices.bat b/wp8/template/cordova/lib/list-devices.bat
index bf4492b..d2158c6 100644
--- a/wp8/template/cordova/lib/list-devices.bat
+++ b/wp8/template/cordova/lib/list-devices.bat
@@ -1,7 +1,7 @@
 @ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%target-list.js (
-    cscript "%full_path%target-list.js" %* --devices //nologo
+SET script_path="%~dp0target-list.js"
+IF EXIST %script_path% (
+    cscript %script_path% %* --devices //nologo
 ) ELSE (
     ECHO. 
     ECHO ERROR: Could not find 'target-list.js' in cordova/lib, aborting...>&2

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/a88d8ad0/wp8/template/cordova/lib/list-emulator-images.bat
----------------------------------------------------------------------
diff --git a/wp8/template/cordova/lib/list-emulator-images.bat b/wp8/template/cordova/lib/list-emulator-images.bat
index 3f571c7..44b52ef 100644
--- a/wp8/template/cordova/lib/list-emulator-images.bat
+++ b/wp8/template/cordova/lib/list-emulator-images.bat
@@ -1,7 +1,7 @@
 @ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%target-list.js (
-    cscript "%full_path%target-list.js" %* --emulators //nologo
+SET script_path="%~dp0target-list.js"
+IF EXIST %script_path% (
+    cscript %script_path% %* --emulators //nologo
 ) ELSE (
     ECHO. 
     ECHO ERROR: Could not find 'target-list.js' in cordova/lib, aborting...>&2

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/a88d8ad0/wp8/template/cordova/lib/target-list.js
----------------------------------------------------------------------
diff --git a/wp8/template/cordova/lib/target-list.js b/wp8/template/cordova/lib/target-list.js
index 805eea5..c899a27 100644
--- a/wp8/template/cordova/lib/target-list.js
+++ b/wp8/template/cordova/lib/target-list.js
@@ -70,6 +70,7 @@ function exec(command) {
     //Check to make sure our scripts did not encounter an error
     if (!oShell.StdErr.AtEndOfStream) {
         var line = oShell.StdErr.ReadAll();
+        Log("ERROR: command failed in target-list.js : " + command);
         Log(line, true);
         WScript.Quit(2);
     }
@@ -167,7 +168,7 @@ function cordovaDeploy(path) {
         if (fso.FolderExists(path + CORDOVA_DEPLOY + "\\CordovaDeploy\\Bin")) {
             fso.DeleteFolder(path + CORDOVA_DEPLOY + "\\CordovaDeploy\\Bin");
         }
-        exec('msbuild ' + path + CORDOVA_DEPLOY + '\\CordovaDeploy.sln');
+        exec('msbuild "' + path + CORDOVA_DEPLOY + '\\CordovaDeploy.sln"');
 
         if (fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
             return;

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/a88d8ad0/wp8/template/cordova/run.bat
----------------------------------------------------------------------
diff --git a/wp8/template/cordova/run.bat b/wp8/template/cordova/run.bat
index b966856..c8ad0a9 100644
--- a/wp8/template/cordova/run.bat
+++ b/wp8/template/cordova/run.bat
@@ -1,7 +1,7 @@
 @ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%lib\deploy.js (
-        cscript "%full_path%lib\deploy.js" %* //nologo
+SET script_path="%~dp0lib\deploy.js"
+IF EXIST %script_path% (
+        cscript %script_path% %* //nologo
 ) ELSE (
     ECHO.
     ECHO ERROR: Could not find 'deploy.js' in cordova/lib, aborting...>&2

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/a88d8ad0/wp8/template/cordova/version.bat
----------------------------------------------------------------------
diff --git a/wp8/template/cordova/version.bat b/wp8/template/cordova/version.bat
index 714e876..68cf7d1 100644
--- a/wp8/template/cordova/version.bat
+++ b/wp8/template/cordova/version.bat
@@ -1,9 +1,9 @@
 @ECHO OFF
-SET full_path=%~dp0
-IF EXIST "%full_path%..\VERSION" (
-    type "%full_path%..\VERSION"
+SET script_path="%~dp0..\VERSION"
+IF EXIST %script_path% (
+    type %script_path%
 ) ELSE (
     ECHO.
-    ECHO ERROR: Could not find file VERSION in project folder
+    ECHO ERROR: Could not find file VERSION in project folder, path tried was %script_path%
>&2
     EXIT /B 1
 )
\ No newline at end of file


Mime
View raw message