4b1a82db |
@echo off
rem Copyright (C) 2008-2012 Alon Bar-Lev <alon.barlev@gmail.com>
@rem this stupid command needed for SetEnv.cmd to operate
setlocal ENABLEDELAYEDEXPANSION
|
6d2b65ad |
cd /d %0\.. |
3c1971de |
call msvc-env.bat
|
b70b2fc2 |
set PLATFORMS=x64
set CONFIGURATIONS=Debug Release |
4b1a82db |
|
3c1971de |
if exist "%VCHOME%\vcvarsall.bat" (
call "%VCHOME%\vcvarsall.bat"
) else if exist "%VCHOME%\bin\vcvars32.bat" (
call "%VCHOME%\bin\vcvars32.bat" |
b70b2fc2 |
) else if exist "%VCHOME%\Auxiliary\Build\vcvars32.bat" (
call "%VCHOME%\Auxiliary\Build\vcvars32.bat" |
3c1971de |
) else (
echo Cannot detect visual studio
goto error
)
msbuild /help > nul 2>&1
if errorlevel 1 set DO_VCBUILD=1 |
4b1a82db |
for %%p in (%PLATFORMS%) do (
for %%c in (%CONFIGURATIONS%) do (
rmdir /q /s %SOURCEBASE%\%%p\%%c > nul 2>&1
|
3c1971de |
if "%DO_VCBUILD%" NEQ "" (
vcbuild /errfile:error.log /showenv "%SOLUTION%" /rebuild /platform:%%p "%%c|%%p"
for %%f in (error.log) do if %%~zf GTR 0 goto error
) else (
msbuild "%SOLUTION%" /p:Configuration="%%c" /p:Platform="%%p"
if errorlevel 1 goto error
) |
4b1a82db |
)
)
exit /b 0
goto end
:error
exit /b 1
goto end
:end
endlocal |