Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2011-09-05 02:35:42 +0400
committerBert Belder <bertbelder@gmail.com>2011-09-05 04:10:12 +0400
commitd01b87d9c44bda6f90b921ff30ca32c37c56bb98 (patch)
tree6478191759cd60b81ffc90c222411b5be884f8ef /vcbuild.bat
parent17021ea631dc1eb249f22035a79b7e63402dfa8c (diff)
win: vcbuild.bat should attempt to run vcvarsall.bat
Diffstat (limited to 'vcbuild.bat')
-rw-r--r--vcbuild.bat15
1 files changed, 13 insertions, 2 deletions
diff --git a/vcbuild.bat b/vcbuild.bat
index 654421b23e3..90e89d91dbf 100644
--- a/vcbuild.bat
+++ b/vcbuild.bat
@@ -53,8 +53,19 @@ echo Project files generated.
@rem Skip project generation if requested.
if defined nobuild goto run
-if not defined VCINSTALLDIR echo Build skipped. To build, this file needs to run from VS cmd prompt.& goto run
-
+@rem Bail out early if not running in VS build env.
+if defined VCINSTALLDIR goto msbuild-found
+if not defined VS100COMNTOOLS goto msbuild-not-found
+if not exist "%VS100COMNTOOLS%\..\..\vc\vcvarsall.bat" goto msbuild-not-found
+call "%VS100COMNTOOLS%\..\..\vc\vcvarsall.bat"
+if not defined VCINSTALLDIR goto msbuild-not-found
+goto msbuild-found
+
+:msbuild-not-found
+echo Build skipped. To build, this file needs to run from VS cmd prompt.
+goto run
+
+:msbuild-found
@rem Build the sln with msbuild.
msbuild node.sln /t:%target% /p:Configuration=%config% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
if errorlevel 1 goto exit