Blame SOURCES/libsodium-1.0.18/builds/msvc/build/buildbase.bat

ca16be
@ECHO OFF
ca16be
REM Usage: [buildbase.bat ..\vs2019\mysolution.sln 16]
ca16be
ca16be
SETLOCAL enabledelayedexpansion
ca16be
ca16be
SET solution=%1
ca16be
SET version=%2
ca16be
SET log=build_%version%.log
ca16be
SET tools=Microsoft Visual Studio %version%.0\VC\vcvarsall.bat
ca16be
ca16be
IF %version% == 16 (
ca16be
  SET tools=Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat
ca16be
  SET environment="%programfiles%\!tools!"
ca16be
  IF NOT EXIST !environment! (
ca16be
    SET environment="%programfiles(x86)%\!tools!"
ca16be
    IF NOT EXIST !environment! (
ca16be
      SET tools=Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat
ca16be
    )
ca16be
  )
ca16be
)
ca16be
ca16be
IF %version% == 15 (
ca16be
  SET tools=Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat
ca16be
  SET environment="%programfiles%\!tools!"
ca16be
  IF NOT EXIST !environment! (
ca16be
    SET environment="%programfiles(x86)%\!tools!"
ca16be
    IF NOT EXIST !environment! (
ca16be
      SET tools=Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat
ca16be
    )
ca16be
  )
ca16be
)
ca16be
SET environment="%programfiles%\!tools!"
ca16be
IF NOT EXIST !environment! SET environment="%programfiles(x86)%\!tools!"
ca16be
ca16be
ECHO Environment: !environment!
ca16be
ca16be
IF NOT EXIST !environment! GOTO no_tools
ca16be
ca16be
ECHO Building: %solution%
ca16be
ca16be
CALL !environment! x86 > nul
ca16be
ECHO Platform=x86
ca16be
ca16be
ECHO Configuration=DynDebug
ca16be
msbuild /m /v:n /p:Configuration=DynDebug /p:Platform=Win32 %solution% >> %log%
ca16be
IF errorlevel 1 GOTO error
ca16be
ECHO Configuration=DynRelease
ca16be
msbuild /m /v:n /p:Configuration=DynRelease /p:Platform=Win32 %solution% >> %log%
ca16be
IF errorlevel 1 GOTO error
ca16be
ECHO Configuration=LtcgDebug
ca16be
msbuild /m /v:n /p:Configuration=LtcgDebug /p:Platform=Win32 %solution% >> %log%
ca16be
IF errorlevel 1 GOTO error
ca16be
ECHO Configuration=LtcgRelease
ca16be
msbuild /m /v:n /p:Configuration=LtcgRelease /p:Platform=Win32 %solution% >> %log%
ca16be
IF errorlevel 1 GOTO error
ca16be
ECHO Configuration=StaticDebug
ca16be
msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=Win32 %solution% >> %log%
ca16be
IF errorlevel 1 GOTO error
ca16be
ECHO Configuration=StaticRelease
ca16be
msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=Win32 %solution% >> %log%
ca16be
IF errorlevel 1 GOTO error
ca16be
ca16be
CALL !environment! x86_amd64 > nul
ca16be
ECHO Platform=x64
ca16be
ca16be
ECHO Configuration=DynDebug
ca16be
msbuild /m /v:n /p:Configuration=DynDebug /p:Platform=x64 %solution% >> %log%
ca16be
IF errorlevel 1 GOTO error
ca16be
ECHO Configuration=DynRelease
ca16be
msbuild /m /v:n /p:Configuration=DynRelease /p:Platform=x64 %solution% >> %log%
ca16be
IF errorlevel 1 GOTO error
ca16be
ECHO Configuration=LtcgDebug
ca16be
msbuild /m /v:n /p:Configuration=LtcgDebug /p:Platform=x64 %solution% >> %log%
ca16be
IF errorlevel 1 GOTO error
ca16be
ECHO Configuration=LtcgRelease
ca16be
msbuild /m /v:n /p:Configuration=LtcgRelease /p:Platform=x64 %solution% >> %log%
ca16be
IF errorlevel 1 GOTO error
ca16be
ECHO Configuration=StaticDebug
ca16be
msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=x64 %solution% >> %log%
ca16be
IF errorlevel 1 GOTO error
ca16be
ECHO Configuration=StaticRelease
ca16be
msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=x64 %solution% >> %log%
ca16be
IF errorlevel 1 GOTO error
ca16be
ca16be
ECHO Complete: %solution%
ca16be
GOTO end
ca16be
ca16be
:error
ca16be
ECHO *** ERROR, build terminated early, see: %log%
ca16be
GOTO end
ca16be
ca16be
:no_tools
ca16be
ECHO *** ERROR, build tools not found: !tools!
ca16be
ca16be
:end
ca16be