Commit 7e7508a8 authored by evoskuil's avatar evoskuil

Harden MSBUILD base script against various VS installations.

parent bf169024
@ECHO OFF @ECHO OFF
REM Usage: [buildbase.bat ..\vs2013\libzmq.sln 12] REM Usage: [buildbase.bat ..\vs2013\mysolution.sln 12]
SET solution=%1 SET solution=%1
SET version=%2 SET version=%2
SET log=build_%version%.log SET log=build_%version%.log
SET tools=Microsoft Visual Studio %version%.0\VC\vcvarsall.bat
REM This breaks if visual studio is not installed or is installed to a non-default location. SET environment="%programfiles(x86)%\%tools%"
SET environment="C:\Program Files (x86)\Microsoft Visual Studio %version%.0\VC\vcvarsall.bat" IF NOT EXIST %environment% SET environment="%programfiles%\%tools%"
IF NOT EXIST %environment% GOTO no_tools
ECHO Building: %solution% ECHO Building: %solution%
...@@ -59,7 +59,11 @@ ECHO Complete: %solution% ...@@ -59,7 +59,11 @@ ECHO Complete: %solution%
GOTO end GOTO end
:error :error
ECHO *** ERROR, build terminated, see: %log% ECHO *** ERROR, build terminated early, see: %log%
GOTO end
:no_tools
ECHO *** ERROR, build tools not found: %tools%
:end :end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment