-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
72 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
@echo off | ||
|
||
set BUILD_ARCHIVE_NAME=casparcg_server | ||
set BUILD_VCVARSALL=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat | ||
set BUILD_7ZIP=C:\Program Files\7-Zip\7z.exe | ||
|
||
:: Clean and enter shadow build folder | ||
echo Cleaning... | ||
if exist dist rmdir dist /s /q || goto :error | ||
mkdir dist || goto :error | ||
|
||
:: Setup VC++ environment | ||
echo Setting up VC++... | ||
call "%BUILD_VCVARSALL%" amd64 || goto :error | ||
|
||
:: Run cmake | ||
cd dist || goto :error | ||
cmake -G "Visual Studio 16 2019" -A x64 ..\src || goto :error | ||
|
||
:: Restore dependencies | ||
echo Restore dependencies... | ||
nuget restore || goto :error | ||
|
||
:: Build with MSBuild | ||
echo Building... | ||
msbuild "CasparCG Server.sln" /t:Clean /p:Configuration=Release || goto :error | ||
msbuild "CasparCG Server.sln" /p:Configuration=Release /m:%NUMBER_OF_PROCESSORS% || goto :error | ||
|
||
:: Create server folder to later zip | ||
set SERVER_FOLDER=casparcg_server | ||
call ..\tools\windows\package.bat .. | ||
|
||
:: Create zip file | ||
echo Creating zip... | ||
if exist "%BUILD_ARCHIVE_NAME%.zip" unlink "%BUILD_ARCHIVE_NAME%.zip" || goto :error | ||
"%BUILD_7ZIP%" a "%BUILD_ARCHIVE_NAME%.zip" ".\%SERVER_FOLDER%\*" || goto :error | ||
|
||
:: Skip exiting with failure | ||
goto :EOF | ||
|
||
:error | ||
exit /b %errorlevel% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
if exist "%SERVER_FOLDER%" rmdir "%SERVER_FOLDER%" /s /q | ||
|
||
xcopy shell\Release "%SERVER_FOLDER%" /E /I /Y | ||
|
||
@REM del "%SERVER_FOLDER%\*_debug.dll" | ||
@REM del "%SERVER_FOLDER%\*-d-2.dll" | ||
|
||
copy %1\src\shell\casparcg_auto_restart.bat "%SERVER_FOLDER%\" | ||
xcopy %1\resources\windows\flash-template-host-files "%SERVER_FOLDER%\" /E /I /Y | ||
|
||
echo Copying documentation... | ||
copy %1\CHANGELOG.md "%SERVER_FOLDER%" | ||
copy %1\LICENSE.md "%SERVER_FOLDER%" | ||
copy %1\README.md "%SERVER_FOLDER%" |