summaryrefslogtreecommitdiff
path: root/app/openvpn/msvc-build.bat
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2014-04-09 16:03:55 +0200
committerParménides GV <parmegv@sdf.org>2014-04-09 16:07:34 +0200
commit1684c8f398922065a97e7da4dac4ac6a33cc5218 (patch)
tree76a4b11ae0d7b217c088f3c2b8fc7e69a7b8ae0d /app/openvpn/msvc-build.bat
parentb9a2b085a8f508cd09e2639c70be845c992c4a3e (diff)
Back to the standard "app" module.
This return to "app" instead of "bitmask_android" is due to this reading: https://developer.android.com/sdk/installing/studio-build.html#projectStructure I'll have to tweak the final apk name in build.gradle.
Diffstat (limited to 'app/openvpn/msvc-build.bat')
-rw-r--r--app/openvpn/msvc-build.bat48
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