diff options
author | Parménides GV <parmegv@sdf.org> | 2014-04-09 17:07:48 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2014-04-09 17:15:17 +0200 |
commit | 51ff5a18f1f074e27e97d822745551a7e8fa068d (patch) | |
tree | 402e7dd42778a218635bb29a4c2dff93ea7f6525 /app/openvpn/msvc-build.bat | |
parent | 910b0e1746ab3f63e63808b198ad51fec5b635e5 (diff) | |
parent | b5ba0abc1610dd4bf573ebcabc5e8f6ab0c9528f (diff) |
Merge branch 'feature/implement-gradle-build-system-#4676' into develop
Diffstat (limited to 'app/openvpn/msvc-build.bat')
-rw-r--r-- | app/openvpn/msvc-build.bat | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/app/openvpn/msvc-build.bat b/app/openvpn/msvc-build.bat new file mode 100644 index 00000000..fd6d5588 --- /dev/null +++ b/app/openvpn/msvc-build.bat @@ -0,0 +1,48 @@ +@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 + +cd /d %0\.. +call msvc-env.bat + +set PLATFORMS=Win32 +set CONFIGURATIONS=Release + +if exist "%VCHOME%\vcvarsall.bat" ( + call "%VCHOME%\vcvarsall.bat" +) else if exist "%VCHOME%\bin\vcvars32.bat" ( + call "%VCHOME%\bin\vcvars32.bat" +) else ( + echo Cannot detect visual studio + goto error +) + +msbuild /help > nul 2>&1 +if errorlevel 1 set DO_VCBUILD=1 + +for %%p in (%PLATFORMS%) do ( + for %%c in (%CONFIGURATIONS%) do ( + rmdir /q /s %SOURCEBASE%\%%p\%%c > nul 2>&1 + + 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 + ) + ) +) + +exit /b 0 +goto end + +:error +exit /b 1 +goto end + +:end + +endlocal |