:: 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_PARALLEL_THREADS exit /b 1
if not defined BUILD_7ZIP exit /b 1
:: Clean and enter shadow build folder
:: Build with MSBuild
echo Building...
msbuild /t:Clean /p:Configuration=Release || goto :error
-msbuild /p:Configuration=Release || goto :error
+msbuild /p:Configuration=Release /m:%BUILD_PARALLEL_THREADS% || goto :error
:: Create server folder to later zip
cd build || goto :error
set BUILD_VCVARSALL=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat
set BUILD_ARCHIVE_NAME=CasparCG Server
+set BUILD_PARALLEL_THREADS=12
set BUILD_7ZIP=C:\Program Files\7-Zip\7z.exe
build-windows.bat