From 3e4d8f433239c40311037616b1b8833a06651ae0 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Mon, 16 Apr 2012 19:21:14 +0200 Subject: Initial import --- openvpn/msvc-build.bat | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 openvpn/msvc-build.bat (limited to 'openvpn/msvc-build.bat') diff --git a/openvpn/msvc-build.bat b/openvpn/msvc-build.bat new file mode 100644 index 00000000..01417d1b --- /dev/null +++ b/openvpn/msvc-build.bat @@ -0,0 +1,47 @@ +@echo off +rem Copyright (C) 2008-2012 Alon Bar-Lev + +@rem this stupid command needed for SetEnv.cmd to operate +setlocal ENABLEDELAYEDEXPANSION + +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 -- cgit v1.2.3