You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by be...@apache.org on 2013/08/01 21:02:07 UTC
git commit: Fix for check_reqs error when msbuild did not exist in
path
Updated Branches:
refs/heads/master 8c57805bd -> 48717138d
Fix for check_reqs error when msbuild did not exist in path
Project: http://git-wip-us.apache.org/repos/asf/cordova-wp8/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-wp8/commit/48717138
Tree: http://git-wip-us.apache.org/repos/asf/cordova-wp8/tree/48717138
Diff: http://git-wip-us.apache.org/repos/asf/cordova-wp8/diff/48717138
Branch: refs/heads/master
Commit: 48717138d049783cd317dbca430c1333c7b99ad4
Parents: 8c57805
Author: Benn Mapes <be...@gmail.com>
Authored: Thu Aug 1 12:01:23 2013 -0700
Committer: Benn Mapes <be...@gmail.com>
Committed: Thu Aug 1 12:01:41 2013 -0700
----------------------------------------------------------------------
wp7/bin/check_reqs.bat | 6 +++---
wp7/bin/check_reqs.js | 9 +++++++--
wp8/bin/check_reqs.bat | 6 +++---
wp8/bin/check_reqs.js | 11 ++++++++---
4 files changed, 21 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/48717138/wp7/bin/check_reqs.bat
----------------------------------------------------------------------
diff --git a/wp7/bin/check_reqs.bat b/wp7/bin/check_reqs.bat
index 26e7393..19d5df1 100644
--- a/wp7/bin/check_reqs.bat
+++ b/wp7/bin/check_reqs.bat
@@ -1,7 +1,7 @@
@ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%check_reqs.js (
- cscript "%full_path%check_reqs.js" %* //nologo
+SET script_path="%~dp0check_reqs.js"
+IF EXIST %script_path% (
+ cscript %script_path% %* //nologo
) ELSE (
ECHO.
ECHO ERROR: Could not find 'check_reqs.js' in 'bin' folder, aborting...>&2
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/48717138/wp7/bin/check_reqs.js
----------------------------------------------------------------------
diff --git a/wp7/bin/check_reqs.js b/wp7/bin/check_reqs.js
index 3dc1496..b483841 100644
--- a/wp7/bin/check_reqs.js
+++ b/wp7/bin/check_reqs.js
@@ -43,7 +43,12 @@ function Log(msg, error) {
// gets the output from a command, failing with the given error message
function check_command(cmd, fail_msg) {
- var out = wscript_shell.Exec(cmd);
+ try {
+ var out = wscript_shell.Exec(cmd);
+ } catch(exception) {
+ Log(fail_msg, true);
+ WScript.Quit(1);
+ }
while (out.Status == 0) {
WScript.Sleep(100);
}
@@ -73,7 +78,7 @@ function check_command(cmd, fail_msg) {
*/
function SystemRequiermentsMet() {
var cmd = 'msbuild -version'
- var fail_msg = 'The command `msbuild` failed. Make sure you have the latest Windows Phone SDKs installed, and the `msbuild.exe` command (inside C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319) is added to your path.'
+ var fail_msg = 'The command `msbuild` failed. Make sure you have the latest Windows Phone SDKs installed, AND have the latest .NET framework added to your path (i.e C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319).'
var output = check_command(cmd, fail_msg);
var msversion = output.match(/\.NET\sFramework\,\sversion\s4\.0/);
if (!msversion) {
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/48717138/wp8/bin/check_reqs.bat
----------------------------------------------------------------------
diff --git a/wp8/bin/check_reqs.bat b/wp8/bin/check_reqs.bat
index 26e7393..19d5df1 100644
--- a/wp8/bin/check_reqs.bat
+++ b/wp8/bin/check_reqs.bat
@@ -1,7 +1,7 @@
@ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%check_reqs.js (
- cscript "%full_path%check_reqs.js" %* //nologo
+SET script_path="%~dp0check_reqs.js"
+IF EXIST %script_path% (
+ cscript %script_path% %* //nologo
) ELSE (
ECHO.
ECHO ERROR: Could not find 'check_reqs.js' in 'bin' folder, aborting...>&2
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/48717138/wp8/bin/check_reqs.js
----------------------------------------------------------------------
diff --git a/wp8/bin/check_reqs.js b/wp8/bin/check_reqs.js
index 492b13f..b483841 100644
--- a/wp8/bin/check_reqs.js
+++ b/wp8/bin/check_reqs.js
@@ -26,7 +26,7 @@ var REQUIRE_GIT = false;
function Usage() {
Log("Usage: [ check_reqs | cscript check_reqs.js ]");
Log("examples:");
- Log(" cscript C:\\Users\\anonymous\\cordova-wp8\\bin\\check_reqs.js");
+ Log(" cscript C:\\Users\\anonymous\\cordova-wp7\\bin\\check_reqs.js");
Log(" CordovaWindowsPhone\\bin\\check_reqs");
}
@@ -43,7 +43,12 @@ function Log(msg, error) {
// gets the output from a command, failing with the given error message
function check_command(cmd, fail_msg) {
- var out = wscript_shell.Exec(cmd);
+ try {
+ var out = wscript_shell.Exec(cmd);
+ } catch(exception) {
+ Log(fail_msg, true);
+ WScript.Quit(1);
+ }
while (out.Status == 0) {
WScript.Sleep(100);
}
@@ -73,7 +78,7 @@ function check_command(cmd, fail_msg) {
*/
function SystemRequiermentsMet() {
var cmd = 'msbuild -version'
- var fail_msg = 'The command `msbuild` failed. Make sure you have the latest Windows Phone SDKs installed, and the `msbuild.exe` command (inside C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319) is added to your path.'
+ var fail_msg = 'The command `msbuild` failed. Make sure you have the latest Windows Phone SDKs installed, AND have the latest .NET framework added to your path (i.e C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319).'
var output = check_command(cmd, fail_msg);
var msversion = output.match(/\.NET\sFramework\,\sversion\s4\.0/);
if (!msversion) {