You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2014/08/19 12:22:56 UTC
git commit: CB-7129 Fixes issue when project isn't built if msbuild
v12.0 is not found.
Repository: cordova-windows
Updated Branches:
refs/heads/master 70287e465 -> 9b3248659
CB-7129 Fixes issue when project isn't built if msbuild v12.0 is not found.
Project: http://git-wip-us.apache.org/repos/asf/cordova-windows/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-windows/commit/9b324865
Tree: http://git-wip-us.apache.org/repos/asf/cordova-windows/tree/9b324865
Diff: http://git-wip-us.apache.org/repos/asf/cordova-windows/diff/9b324865
Branch: refs/heads/master
Commit: 9b324865992a7291da022e5f5037646ffe40c7c7
Parents: 70287e4
Author: Vladimir Kotikov <v-...@microsoft.com>
Authored: Tue Aug 19 14:05:45 2014 +0400
Committer: Vladimir Kotikov <v-...@microsoft.com>
Committed: Tue Aug 19 14:23:32 2014 +0400
----------------------------------------------------------------------
windows/template/cordova/lib/MSBuildTools.js | 24 ++++++++++++-----------
windows/template/cordova/lib/build.js | 4 ++--
2 files changed, 15 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/9b324865/windows/template/cordova/lib/MSBuildTools.js
----------------------------------------------------------------------
diff --git a/windows/template/cordova/lib/MSBuildTools.js b/windows/template/cordova/lib/MSBuildTools.js
index e4d05e7..c88a975 100644
--- a/windows/template/cordova/lib/MSBuildTools.js
+++ b/windows/template/cordova/lib/MSBuildTools.js
@@ -34,16 +34,18 @@ module.exports.findAvailableVersion = function () {
function checkMSBuildVersion(version) {
var deferred = Q.defer();
-
- exec('reg query HKLM\\SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\' + version + ' /v MSBuildToolsPath').then(
- function(output) {
- // fetch msbuild path from 'reg' output
- var path = /MSBuildToolsPath\s+REG_SZ\s+(.*)/i.exec(output);
- if (path) {
- deferred.resolve(new MSBuildTools(version, path[1]));
- } else {
- deferred.resolve(null); // not found
- }
- });
+ exec('reg query HKLM\\SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\' + version + ' /v MSBuildToolsPath')
+ .then(function(output) {
+ // fetch msbuild path from 'reg' output
+ var path = /MSBuildToolsPath\s+REG_SZ\s+(.*)/i.exec(output);
+ if (path) {
+ deferred.resolve(new MSBuildTools(version, path[1]));
+ return;
+ }
+ deferred.resolve(null); // not found
+ }, function (err) {
+ // if 'reg' exits with error, assume that registry key not found
+ deferred.resolve(null);
+ });
return deferred.promise;
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/9b324865/windows/template/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/windows/template/cordova/lib/build.js b/windows/template/cordova/lib/build.js
index 0281dbb..d2fefd4 100644
--- a/windows/template/cordova/lib/build.js
+++ b/windows/template/cordova/lib/build.js
@@ -118,8 +118,8 @@ function buildTargets() {
return buildConfigs.reduce(function (promise, build) {
return promise.then(function () {
// support for "any cpu" specified with or without space
- if (build.arch == 'any cpu') {
- build.arch = 'anycpu';
+ if (build.arch == 'anycpu') {
+ build.arch = 'any cpu';
}
// msbuild 4.0 requires .sln file, we can't build jsproj
if (msbuild.version == '4.0' && build.target == projFiles.win80) {