2014-05-12 11:17:08 +02:00
|
|
|
@ECHO OFF
|
2014-05-13 12:17:34 +02:00
|
|
|
REM Usage: [buildbase.bat ..\vs2013\mysolution.sln 12]
|
2014-05-12 11:17:08 +02:00
|
|
|
|
|
|
|
SET solution=%1
|
|
|
|
SET version=%2
|
|
|
|
SET log=build_%version%.log
|
2014-05-13 12:17:34 +02:00
|
|
|
SET tools=Microsoft Visual Studio %version%.0\VC\vcvarsall.bat
|
|
|
|
SET environment="%programfiles(x86)%\%tools%"
|
|
|
|
IF NOT EXIST %environment% SET environment="%programfiles%\%tools%"
|
|
|
|
IF NOT EXIST %environment% GOTO no_tools
|
2014-05-12 11:17:08 +02:00
|
|
|
|
2016-02-03 21:12:29 +01:00
|
|
|
SET packages=
|
|
|
|
IF EXIST "..\..\..\..\libsodium\builds/msvc/vs2015\libsodium.import.props" (
|
|
|
|
COPY /Y "..\..\..\..\libsodium\builds/msvc/vs2015\libsodium.import.props" . > %log%
|
|
|
|
IF errorlevel 1 GOTO error
|
|
|
|
SET packages=%packages% /p:HAVE_LIBSODIUM=1
|
|
|
|
) ELSE (
|
|
|
|
ECHO Building without libsodium
|
|
|
|
)
|
|
|
|
|
|
|
|
ECHO Building %solution%... (%packages%)
|
2014-05-12 11:17:08 +02:00
|
|
|
|
|
|
|
CALL %environment% x86 > nul
|
|
|
|
ECHO Platform=x86
|
|
|
|
|
|
|
|
ECHO Configuration=DynDebug
|
2016-02-03 21:12:29 +01:00
|
|
|
msbuild /m /v:n /p:Configuration=DynDebug /p:Platform=Win32 %packages% %solution% > %log%
|
2014-05-12 11:17:08 +02:00
|
|
|
IF errorlevel 1 GOTO error
|
|
|
|
ECHO Configuration=DynRelease
|
2016-02-03 21:12:29 +01:00
|
|
|
msbuild /m /v:n /p:Configuration=DynRelease /p:Platform=Win32 %packages% %solution% >> %log%
|
2014-05-12 11:17:08 +02:00
|
|
|
IF errorlevel 1 GOTO error
|
|
|
|
ECHO Configuration=LtcgDebug
|
2016-02-03 21:12:29 +01:00
|
|
|
msbuild /m /v:n /p:Configuration=LtcgDebug /p:Platform=Win32 %packages% %solution% >> %log%
|
2014-05-12 11:17:08 +02:00
|
|
|
IF errorlevel 1 GOTO error
|
|
|
|
ECHO Configuration=LtcgRelease
|
2016-02-03 21:12:29 +01:00
|
|
|
msbuild /m /v:n /p:Configuration=LtcgRelease /p:Platform=Win32 %packages% %solution% >> %log%
|
2014-05-12 11:17:08 +02:00
|
|
|
IF errorlevel 1 GOTO error
|
|
|
|
ECHO Configuration=StaticDebug
|
2016-02-03 21:12:29 +01:00
|
|
|
msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=Win32 %packages% %solution% >> %log%
|
2014-05-12 11:17:08 +02:00
|
|
|
IF errorlevel 1 GOTO error
|
|
|
|
ECHO Configuration=StaticRelease
|
2016-02-03 21:12:29 +01:00
|
|
|
msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=Win32 %packages% %solution% >> %log%
|
2014-05-12 11:17:08 +02:00
|
|
|
IF errorlevel 1 GOTO error
|
|
|
|
|
|
|
|
CALL %environment% x86_amd64 > nul
|
|
|
|
ECHO Platform=x64
|
|
|
|
|
|
|
|
ECHO Configuration=DynDebug
|
2016-02-03 21:12:29 +01:00
|
|
|
msbuild /m /v:n /p:Configuration=DynDebug /p:Platform=x64 %packages% %solution% > %log%
|
2014-05-12 11:17:08 +02:00
|
|
|
IF errorlevel 1 GOTO error
|
|
|
|
ECHO Configuration=DynRelease
|
2016-02-03 21:12:29 +01:00
|
|
|
msbuild /m /v:n /p:Configuration=DynRelease /p:Platform=x64 %packages% %solution% >> %log%
|
2014-05-12 11:17:08 +02:00
|
|
|
IF errorlevel 1 GOTO error
|
|
|
|
ECHO Configuration=LtcgDebug
|
2016-02-03 21:12:29 +01:00
|
|
|
msbuild /m /v:n /p:Configuration=LtcgDebug /p:Platform=x64 %packages% %solution% >> %log%
|
2014-05-12 11:17:08 +02:00
|
|
|
IF errorlevel 1 GOTO error
|
|
|
|
ECHO Configuration=LtcgRelease
|
2016-02-03 21:12:29 +01:00
|
|
|
msbuild /m /v:n /p:Configuration=LtcgRelease /p:Platform=x64 %packages% %solution% >> %log%
|
2014-05-12 11:17:08 +02:00
|
|
|
IF errorlevel 1 GOTO error
|
|
|
|
ECHO Configuration=StaticDebug
|
2016-02-03 21:12:29 +01:00
|
|
|
msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=x64 %packages% %solution% >> %log%
|
2014-05-12 11:17:08 +02:00
|
|
|
IF errorlevel 1 GOTO error
|
|
|
|
ECHO Configuration=StaticRelease
|
2016-02-03 21:12:29 +01:00
|
|
|
msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=x64 %packages% %solution% >> %log%
|
2014-05-12 11:17:08 +02:00
|
|
|
IF errorlevel 1 GOTO error
|
|
|
|
|
|
|
|
ECHO Complete: %solution%
|
|
|
|
GOTO end
|
|
|
|
|
|
|
|
:error
|
2014-05-13 12:17:34 +02:00
|
|
|
ECHO *** ERROR, build terminated early, see: %log%
|
|
|
|
GOTO end
|
|
|
|
|
|
|
|
:no_tools
|
|
|
|
ECHO *** ERROR, build tools not found: %tools%
|
2014-05-12 11:17:08 +02:00
|
|
|
|
|
|
|
:end
|
|
|
|
|