1
1
import Environment
2
+ import subprocess
2
3
3
4
# Build the Game
4
5
# *Original from TexMech - C28
15
16
uproject_file = Environment .GetEnvVariable ( section , "uproject_file" )
16
17
builds_dir = Environment .GetEnvVariable ( section , "builds_dir" )
17
18
build_maps = Environment .GetEnvVariable ( section , "build_maps" )
19
+ ue4_batchfiles_dir = Environment .GetEnvVariable ( section , "ue4_batchfiles_dir" )
20
+ ue4_binaries_dir = Environment .GetEnvVariable ( section , "ue4_binaries_dir" )
18
21
19
22
print ( base_dir )
20
23
print ( project_dir )
21
24
print ( uproject_file )
22
25
print ( builds_dir )
23
26
print ( build_maps )
24
27
28
+ if __name__ == '__main__' :
29
+ print (subprocess .run ( [ ue4_batchfiles_dir + 'RunUAT.bat' , "BuildCookRun" , "-project=" + uproject_file , "-noP4" , "-nocompile" , "-nocompileeditor" , "-installed" , "-cook" , "-stage" , "-archive" , "-archivedirectory=" + builds_dir , "-package" , "-clientconfig=Development" , "-ue4exe=" + ue4_binaries_dir + "UE4Editor-Cmd.exe" , "-pak" , "-prereqs" , "-nodebuginfo" , "-targetplatform=Win64" , "-build" , "-CrashReporter" , "-utf8output" ] ))
25
30
26
- #call "C:\Program Files\Epic Games\UE_4.23\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project=%uproject_file% -noP4 -nocompile -nocompileeditor -installed -cook -stage -archive -archivedirectory=%builds_dir% -package -clientconfig=Development -ue4exe="C:\Program Files\Epic Games\UE_4.23\Engine\Binaries\Win64\UE4Editor-Cmd.exe" -pak -prereqs -nodebuginfo -targetplatform=Win64 -build -CrashReporter -utf8output
27
- # call "C:\Program Files\Epic Games\UE_4.23\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project=%uproject_file% -noP4 -clientconfig=Development -serverconfig=Development -ue4exe=UE4Editor-Cmd.exe -utf8output -installed -platform=Win64 -build -cook -map=%build_maps% -unversionedcookedcontent -pak -SkipCookingEditorContent -compressed -prereqs -stage -package -stagingdirectory=%builds_dir% -archive -archivedirectory=%builds_dir%
28
- # call "C:\Program Files\Epic Games\UE_4.23\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project=%uproject_file% -noP4 -clientconfig=Shipping -serverconfig=Shipping -nocompile -nocompileeditor -installed -ue4exe=UE4Editor-Cmd.exe -utf8output -platform=Win64 -build -cook -map=%build_maps% -unversionedcookedcontent -encryptinifiles -pak -createreleaseversion= -SkipCookingEditorContent -compressed -prereqs -stage -package -stagingdirectory=%builds_dir% -archive -archivedirectory=%builds_dir%
29
- # call "C:\Program Files\Epic Games\UE_4.22\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project=%uproject_file% -noP4 -platform=Win64 -clientconfig=Shipping -serverconfig=Shipping -cook -maps=%build_maps% -build -stage -pak -archive -archivedirectory=%builds_dir%
31
+ #subprocess.call([r"C:\Program Files\Epic Games\UE_4.23\Engine\Build\BatchFiles\RunUAT.bat"] BuildCookRun -project=%uproject_file% -noP4 -nocompile -nocompileeditor -installed -cook -stage -archive -archivedirectory=%builds_dir% -package -clientconfig=Development -ue4exe="C:\Program Files\Epic Games\UE_4.23\Engine\Binaries\Win64\UE4Editor-Cmd.exe" -pak -prereqs -nodebuginfo -targetplatform=Win64 -build -CrashReporter -utf8output
32
+ # subprocess.call("%unreal_batchfiles_dir%'RunUAT.bat', BuildCookRun -project=%uproject_file% -noP4 -nocompile -nocompileeditor -installed -cook -stage -archive -archivedirectory=%builds_dir% -package -clientconfig=Development -ue4exe=%ue4_binaries_dir%'UE4Editor-Cmd.exe' -pak -prereqs -nodebuginfo -targetplatform=Win64 -build -CrashReporter -utf8output" )
33
+ # p = Popen([ ], stdout=PIPE, stderr=PIPE)
34
+ # output, errors = p.communicate()
35
+ # p.wait() # wait for process to terminate
30
36
37
+ # call "C:\Program Files\Epic Games\UE_4.23\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project=%uproject_file% -noP4 -clientconfig=Development -serverconfig=Development -ue4exe=UE4Editor-Cmd.exe -utf8output -installed -platform=Win64 -build -cook -map=%build_maps% -unversionedcookedcontent -pak -SkipCookingEditorContent -compressed -prereqs -stage -package -stagingdirectory=%builds_dir% -archive -archivedirectory=%builds_dir%
38
+ # call "C:\Program Files\Epic Games\UE_4.23\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project=%uproject_file% -noP4 -clientconfig=Shipping -serverconfig=Shipping -nocompile -nocompileeditor -installed -ue4exe=UE4Editor-Cmd.exe -utf8output -platform=Win64 -build -cook -map=%build_maps% -unversionedcookedcontent -encryptinifiles -pak -createreleaseversion= -SkipCookingEditorContent -compressed -prereqs -stage -package -stagingdirectory=%builds_dir% -archive -archivedirectory=%builds_dir%
39
+ # call "C:\Program Files\Epic Games\UE_4.22\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project=%uproject_file% -noP4 -platform=Win64 -clientconfig=Shipping -serverconfig=Shipping -cook -maps=%build_maps% -build -stage -pak -archive -archivedirectory=%builds_dir%
31
40
32
- # Here I do a check to ensure the build was successful
33
- # With these programs, they return 0 on success, so if non-zero return code, just go to fail case below and DON'T make an installer
34
- # Otherwise it will create an installer with the last working build.
35
- # IF %ERRORLEVEL% NEQ 0 (
36
- # echo ----------BUILD FAILED - HALTING BATCH PROCESS----------
37
- # echo PUSHING A TXT FILE TO DELETED NIGHTLY TO SIGNAL BAD BUILD
38
- # net use F: "%network_dir%" gKv52w!* /USER:smu\dummy /PERSISTENT:NO
39
- # echo. 2>%network_dir%/BUILD_BROKEN.txt
40
- # net use F: /d
41
- # echo. 2>%builds_dir%/BUILD_BROKEN.txt
42
- # )
43
41
42
+ # Here I do a check to ensure the build was successful
43
+ # With these programs, they return 0 on success, so if non-zero return code, just go to fail case below and DON'T make an installer
44
+ # Otherwise it will create an installer with the last working build.
45
+ # IF %ERRORLEVEL% NEQ 0 (
46
+ # echo ----------BUILD FAILED - HALTING BATCH PROCESS----------
47
+ # echo PUSHING A TXT FILE TO DELETED NIGHTLY TO SIGNAL BAD BUILD
48
+ # net use F: "%network_dir%" gKv52w!* /USER:smu\dummy /PERSISTENT:NO
49
+ # echo. 2>%network_dir%/BUILD_BROKEN.txt
50
+ # net use F: /d
51
+ # echo. 2>%builds_dir%/BUILD_BROKEN.txt
52
+ # )
44
53
45
54
46
- # Adding the steam file to the made build and writing our steam app ID
47
- # SteamAppID > PathToCreateTextFileAt
48
- # echo ----------------------------------------------------------------------
49
- # echo Step 2.5: Adding steam file to build
50
- # echo ----------------------------------------------------------------------
51
- # echo 934840 > C:\AutomatedBuilds\C27\Capstone\ThinkArcade\Build_Dir\WindowsNoEditor\FrostRunner\Binaries\Win64\steam_appid.txt
55
+
56
+ # Adding the steam file to the made build and writing our steam app ID
57
+ # SteamAppID > PathToCreateTextFileAt
58
+ # echo ----------------------------------------------------------------------
59
+ # echo Step 2.5: Adding steam file to build
60
+ # echo ----------------------------------------------------------------------
61
+ # echo 934840 > C:\AutomatedBuilds\C27\Capstone\ThinkArcade\Build_Dir\WindowsNoEditor\FrostRunner\Binaries\Win64\steam_appid.txt
0 commit comments