dnscrypto-proxy: Support files updated.
[tomato.git] / release / src / router / openvpn / msvc-build.bat
blobfd6d55882dee7afe6bf606bda30ef156302e7bf7
1 @echo off
2 rem Copyright (C) 2008-2012 Alon Bar-Lev <alon.barlev@gmail.com>
4 @rem this stupid command needed for SetEnv.cmd to operate
5 setlocal ENABLEDELAYEDEXPANSION
7 cd /d %0\..
8 call msvc-env.bat
10 set PLATFORMS=Win32
11 set CONFIGURATIONS=Release
13 if exist "%VCHOME%\vcvarsall.bat" (
14         call "%VCHOME%\vcvarsall.bat"
15 ) else if exist "%VCHOME%\bin\vcvars32.bat" (
16         call "%VCHOME%\bin\vcvars32.bat"
17 ) else (
18         echo Cannot detect visual studio
19         goto error
22 msbuild /help > nul 2>&1
23 if errorlevel 1 set DO_VCBUILD=1
25 for %%p in (%PLATFORMS%) do (
26         for %%c in (%CONFIGURATIONS%) do (
27                 rmdir /q /s %SOURCEBASE%\%%p\%%c > nul 2>&1
29                 if "%DO_VCBUILD%" NEQ "" (
30                         vcbuild /errfile:error.log /showenv "%SOLUTION%" /rebuild /platform:%%p "%%c|%%p"
31                         for %%f in (error.log) do if %%~zf GTR 0 goto error
32                 ) else  (
33                         msbuild "%SOLUTION%" /p:Configuration="%%c" /p:Platform="%%p"
34                         if errorlevel 1 goto error
35                 )
36         )
39 exit /b 0
40 goto end
42 :error
43 exit /b 1
44 goto end
46 :end
48 endlocal