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_7ZIP exit /b 1
8 :: Clean and enter shadow build folder
11 if exist bin rmdir bin /s /q || goto :error
12 if exist ipch rmdir ipch /s /q || goto :error
13 if exist tmp rmdir tmp /s /q || goto :error
14 if exist build rmdir build /s /q || goto :error
15 mkdir build || goto :error
17 :: Unpack archived dependencies
18 echo Unpacking archived dependencies...
19 "%BUILD_7ZIP%" x -y -odependencies dependencies\cef.7z || goto :error
21 :: Setup VC++ environment
22 echo Setting up VC++...
23 call "%BUILD_VCVARSALL%" x86 || goto :error
27 msbuild /t:Clean /p:Configuration=Release || goto :error
28 msbuild /p:Configuration=Release || goto :error
30 :: Create server folder to later zip
31 cd build || goto :error
32 set SERVER_FOLDER=CasparCG Server
33 if exist "%SERVER_FOLDER%" rmdir "%SERVER_FOLDER%" /s /q || goto :error
34 mkdir "%SERVER_FOLDER%" || goto :error
38 xcopy ..\deploy\Server "%SERVER_FOLDER%\Server" /E /I /Y || goto :error
39 xcopy ..\deploy\Wallpapers "%SERVER_FOLDER%\Wallpapers" /E /I /Y || goto :error
40 copy ..\deploy\CasparCG_Server_2.0-brochure.pdf "%SERVER_FOLDER%" || goto :error
43 echo Copying binaries...
44 copy ..\bin\Release\* "%SERVER_FOLDER%\Server" || goto :error
45 xcopy ..\bin\Release\locales "%SERVER_FOLDER%\Server\locales" /E /I /Y || goto :error
48 echo Copying documentation...
49 copy ..\CHANGES.txt "%SERVER_FOLDER%" || goto :error
50 copy ..\LICENSE.txt "%SERVER_FOLDER%" || goto :error
51 copy ..\README.txt "%SERVER_FOLDER%" || goto :error
55 "%BUILD_7ZIP%" a "%BUILD_ARCHIVE_NAME%.zip" "%SERVER_FOLDER%" || goto :error
57 :: Skip exiting with failure