3 :: Fail early if environment not set
4 if not defined BUILD_VCVARSALL exit /b 1
5 if not defined BUILD_ARCHIVE_NAME exit /b 1
6 if not defined BUILD_PARALLEL_THREADS exit /b 1
7 if not defined BUILD_7ZIP exit /b 1
9 :: Clean and enter shadow build folder
12 if exist build rmdir build /s /q || goto :error
13 mkdir build || goto :error
15 :: Unpack archived dependencies
16 echo Unpacking archived dependencies...
17 "%BUILD_7ZIP%" x -y -odependencies64 dependencies64\large_files_win32.7z || goto :error
19 :: Setup VC++ environment
20 echo Setting up VC++...
21 call "%BUILD_VCVARSALL%" amd64 || goto :error
24 cd build || goto :error
25 cmake -G "Visual Studio 14 2015" -A x64 .. || goto :error
29 msbuild "CasparCG Server.sln" /t:Clean /p:Configuration=RelWithDebInfo || goto :error
30 msbuild "CasparCG Server.sln" /p:Configuration=RelWithDebInfo /m:%BUILD_PARALLEL_THREADS% || goto :error
32 :: Create server folder to later zip
33 set SERVER_FOLDER=CasparCG Server
34 if exist "%SERVER_FOLDER%" rmdir "%SERVER_FOLDER%" /s /q || goto :error
35 mkdir "%SERVER_FOLDER%" || goto :error
39 xcopy ..\deploy\general\Server "%SERVER_FOLDER%\Server" /E /I /Y || goto :error
40 xcopy ..\deploy\general\Wallpapers "%SERVER_FOLDER%\Wallpapers" /E /I /Y || goto :error
41 copy ..\deploy\general\CasparCG_Server_2.0-brochure.pdf "%SERVER_FOLDER%" || goto :error
44 echo Copying binaries...
45 copy shell\*.dll "%SERVER_FOLDER%\Server" || goto :error
46 copy shell\RelWithDebInfo\casparcg.exe "%SERVER_FOLDER%\Server" || goto :error
47 copy shell\RelWithDebInfo\casparcg.pdb "%SERVER_FOLDER%\Server" || goto :error
48 copy shell\RelWithDebInfo\libcef.dll.pdb "%SERVER_FOLDER%\Server" || goto :error
49 copy shell\casparcg.config "%SERVER_FOLDER%\Server" || goto :error
50 copy shell\*.ttf "%SERVER_FOLDER%\Server" || goto :error
51 xcopy shell\locales "%SERVER_FOLDER%\Server\locales" /E /I /Y || goto :error
54 echo Copying documentation...
55 copy ..\CHANGELOG "%SERVER_FOLDER%" || goto :error
56 copy ..\LICENSE "%SERVER_FOLDER%" || goto :error
57 copy ..\README "%SERVER_FOLDER%" || goto :error
61 "%BUILD_7ZIP%" a "%BUILD_ARCHIVE_NAME%.7z" "%SERVER_FOLDER%" || goto :error
63 :: Skip exiting with failure