2014-05-12 05:07:54 -04:00
|
|
|
@ECHO OFF
|
2019-04-03 08:56:28 -04:00
|
|
|
REM Usage: [buildbase.bat ..\vs2019\mysolution.sln 16]
|
2014-05-12 05:07:54 -04:00
|
|
|
|
|
|
|
SET solution=%1
|
|
|
|
SET version=%2
|
|
|
|
SET log=build_%version%.log
|
2014-05-12 23:18:22 -04:00
|
|
|
SET tools=Microsoft Visual Studio %version%.0\VC\vcvarsall.bat
|
2019-04-03 08:56:28 -04:00
|
|
|
IF %version% == 16 SET tools=Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat
|
2017-03-09 07:36:10 -05:00
|
|
|
IF %version% == 15 SET tools=Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat
|
2014-05-12 23:18:22 -04:00
|
|
|
SET environment="%programfiles(x86)%\%tools%"
|
|
|
|
IF NOT EXIST %environment% SET environment="%programfiles%\%tools%"
|
|
|
|
IF NOT EXIST %environment% GOTO no_tools
|
2014-05-12 05:07:54 -04:00
|
|
|
|
|
|
|
ECHO Building: %solution%
|
|
|
|
|
|
|
|
CALL %environment% x86 > nul
|
|
|
|
ECHO Platform=x86
|
|
|
|
|
|
|
|
ECHO Configuration=DynDebug
|
2017-03-24 03:39:50 -04:00
|
|
|
msbuild /m /v:n /p:Configuration=DynDebug /p:Platform=Win32 %solution% >> %log%
|
2014-05-12 05:07:54 -04:00
|
|
|
IF errorlevel 1 GOTO error
|
|
|
|
ECHO Configuration=DynRelease
|
|
|
|
msbuild /m /v:n /p:Configuration=DynRelease /p:Platform=Win32 %solution% >> %log%
|
|
|
|
IF errorlevel 1 GOTO error
|
|
|
|
ECHO Configuration=LtcgDebug
|
|
|
|
msbuild /m /v:n /p:Configuration=LtcgDebug /p:Platform=Win32 %solution% >> %log%
|
|
|
|
IF errorlevel 1 GOTO error
|
|
|
|
ECHO Configuration=LtcgRelease
|
|
|
|
msbuild /m /v:n /p:Configuration=LtcgRelease /p:Platform=Win32 %solution% >> %log%
|
|
|
|
IF errorlevel 1 GOTO error
|
|
|
|
ECHO Configuration=StaticDebug
|
|
|
|
msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=Win32 %solution% >> %log%
|
|
|
|
IF errorlevel 1 GOTO error
|
|
|
|
ECHO Configuration=StaticRelease
|
|
|
|
msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=Win32 %solution% >> %log%
|
|
|
|
IF errorlevel 1 GOTO error
|
|
|
|
|
|
|
|
CALL %environment% x86_amd64 > nul
|
|
|
|
ECHO Platform=x64
|
|
|
|
|
|
|
|
ECHO Configuration=DynDebug
|
2017-03-24 03:39:50 -04:00
|
|
|
msbuild /m /v:n /p:Configuration=DynDebug /p:Platform=x64 %solution% >> %log%
|
2014-05-12 05:07:54 -04:00
|
|
|
IF errorlevel 1 GOTO error
|
|
|
|
ECHO Configuration=DynRelease
|
|
|
|
msbuild /m /v:n /p:Configuration=DynRelease /p:Platform=x64 %solution% >> %log%
|
|
|
|
IF errorlevel 1 GOTO error
|
|
|
|
ECHO Configuration=LtcgDebug
|
|
|
|
msbuild /m /v:n /p:Configuration=LtcgDebug /p:Platform=x64 %solution% >> %log%
|
|
|
|
IF errorlevel 1 GOTO error
|
|
|
|
ECHO Configuration=LtcgRelease
|
|
|
|
msbuild /m /v:n /p:Configuration=LtcgRelease /p:Platform=x64 %solution% >> %log%
|
|
|
|
IF errorlevel 1 GOTO error
|
|
|
|
ECHO Configuration=StaticDebug
|
|
|
|
msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=x64 %solution% >> %log%
|
|
|
|
IF errorlevel 1 GOTO error
|
|
|
|
ECHO Configuration=StaticRelease
|
|
|
|
msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=x64 %solution% >> %log%
|
|
|
|
IF errorlevel 1 GOTO error
|
|
|
|
|
|
|
|
ECHO Complete: %solution%
|
|
|
|
GOTO end
|
|
|
|
|
|
|
|
:error
|
2014-05-12 23:18:22 -04:00
|
|
|
ECHO *** ERROR, build terminated early, see: %log%
|
|
|
|
GOTO end
|
|
|
|
|
|
|
|
:no_tools
|
|
|
|
ECHO *** ERROR, build tools not found: %tools%
|
2014-05-12 05:07:54 -04:00
|
|
|
|
|
|
|
:end
|
|
|
|
|