-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.bat
93 lines (61 loc) · 1.96 KB
/
build.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
rem This script is used in automated build systems to build and deploy the game
rem This script depends on: msbuild, git, 7zip
set msbuild_path=%windir%\Microsoft.Net\Framework\v4.0\MSBuild.exe
set build_bat_path=%0
set build_output_path=%1
set build_zip_path=UDKInstall-Factions.zip
set build_progress_path=buildprogress.txt
set build_queue_path=buildqueue.txt
rem Queue another build if already in progress
if exist %build_progress_path% (
echo Build queued at: >> %build_queue_path%
call date /t >> %build_queue_path%
call time /t >> %build_queue_path%
exit /b
)
rem Set build in progress
echo Build started at: >> %build_progress_path%
call date /t >> %build_progress_path%
call time /t >> %build_progress_path%
rem Delete old build files
if exist %build_zip_path% (
del %build_zip_path% /q
)
if exist %build_output_path% (
rmdir %build_output_path% /s /q
)
rem Get latest game code
call git clean -d -f -n
if errorlevel 1 goto error
call git pull
if errorlevel 1 goto error
rem Compile clipboard dll
%msbuild_path% Development\Dll\clipboard\clipboard.sln /p:configuration=Release
rem Compile source code and cook packages
call Binaries\Win32\UDK.com make -full -unattended -stripsource -nullrhi
if errorlevel 1 goto error
call Binaries\Win32\UDK.com CookPackages -full -platform=PC -nullrhi
if errorlevel 1 goto error
rem Copy game files into a zip
call Binaries\UnSetup.exe -GameCreateManifest
if errorlevel 1 goto error
call Binaries\UnSetup.exe -BuildGameInstaller
if errorlevel 1 goto error
rem Extract zip into build directory
call 7z x %build_zip_path% -o%build_output_path%
if errorlevel 1 goto error
copy Binaries\Win32\UserCode\clipboard.dll %build_output_path%\Binaries\Win32\UserCode\clipboard.dll
if errorlevel 1 goto error
rem Build complete
:end
del %build_progress_path% /q
rem Execute next build if queued
if exist %build_queue_path% (
del %build_queue_path% /q
call %build_bat_path%
)
exit /b
rem Build error
:error
del %build_progress_path% /q
exit /b 1