Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D75DF11C0E for ; Tue, 19 Aug 2014 10:22:56 +0000 (UTC) Received: (qmail 11827 invoked by uid 500); 19 Aug 2014 10:22:56 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 11800 invoked by uid 500); 19 Aug 2014 10:22:56 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 11791 invoked by uid 99); 19 Aug 2014 10:22:56 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Aug 2014 10:22:56 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 6869593D96B; Tue, 19 Aug 2014 10:22:56 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: an-selm@apache.org To: commits@cordova.apache.org Message-Id: <2453c62eadf245ad86dbc75040c42dc5@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: CB-7129 Fixes issue when project isn't built if msbuild v12.0 is not found. Date: Tue, 19 Aug 2014 10:22:56 +0000 (UTC) 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 Authored: Tue Aug 19 14:05:45 2014 +0400 Committer: Vladimir Kotikov 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) {