]> git.sesse.net Git - casparcg/commitdiff
Created initial build scripts
authorHelge Norberg <helge.norberg@svt.se>
Wed, 1 Oct 2014 10:31:11 +0000 (12:31 +0200)
committerHelge Norberg <helge.norberg@svt.se>
Wed, 1 Oct 2014 10:31:11 +0000 (12:31 +0200)
build-scripts/build-windows.bat [new file with mode: 0644]
build-scripts/set-variables-and-build-windows.bat [new file with mode: 0644]

diff --git a/build-scripts/build-windows.bat b/build-scripts/build-windows.bat
new file mode 100644 (file)
index 0000000..eef4b98
--- /dev/null
@@ -0,0 +1,32 @@
+@echo on
+
+:: Fail early if environment not set
+if not defined BUILD_VCVARSALL exit /b 1
+if not defined BUILD_ARCHIVE_NAME exit /b 1
+if not defined BUILD_7ZIP exit /b 1
+
+:: Clean and enter shadow build folder
+echo Cleaning...
+cd .. || goto :error
+if exist bin rmdir bin /s /q || goto :error
+if exist ipch rmdir ipch /s /q || goto :error
+if exist tmp rmdir tmp /s /q || goto :error
+
+:: Unpack archived dependencies
+echo Unpacking archived dependencies...
+"%BUILD_7ZIP%" x -y -odependencies dependencies\cef.7z || goto :error
+
+:: Setup VC++ environment
+echo Setting up VC++...
+call "%BUILD_VCVARSALL%" x86 || goto :error
+
+:: Build with MSBuild
+echo Building...
+msbuild /t:Clean /p:Configuration=Release || goto :error
+msbuild /p:Configuration=Release || goto :error
+
+:: Skip exiting with failure
+goto :EOF
+
+:error
+exit /b %errorlevel%
diff --git a/build-scripts/set-variables-and-build-windows.bat b/build-scripts/set-variables-and-build-windows.bat
new file mode 100644 (file)
index 0000000..1e9f2d7
--- /dev/null
@@ -0,0 +1,8 @@
+@echo off
+
+set BUILD_VCVARSALL=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat
+set BUILD_ARCHIVE_NAME=CasparCG Server
+set BUILD_7ZIP=C:\Program Files\7-Zip\7z.exe
+
+build-windows.bat
+