Add fix to build UBT itself

This commit is contained in:
2025-06-11 19:30:44 -04:00
parent 30deb56739
commit 584cde6f91

View File

@@ -11,7 +11,7 @@
# - Applies patch to Unreal Engine source.
# - Runs Setup.sh in the UnrealEngine repository
# - Builds luprex
# - Builds ShaderCompileWorker
# - Builds Unreal Build Tool and Shader Compile Worker
# - Builds Unreal Engine and Unreal Editor
# - Builds integration
#
@@ -240,14 +240,11 @@ def generate_integration_code_workspace_ubt():
workspace.rename(workspace_ubt)
def build_shadercompileworker():
def build_unrealbuildtool():
"""
I have no idea why shadercompileworker isn't built automatically by
unreal's build system, but we have to do this separately.
Build the unreal build tool itself, also including shader compile worker.
"""
shell(UNREALENGINE, f"{UNREALENGINE}/Engine/Build/BatchFiles/{BUILD_BAT} -waitmutex ShaderCompileWorker {OS} Shipping")
Path(f"Engine/Binaries/{OS}/ShaderCompileWorker{DOT_EXE}").unlink(missing_ok=True)
shutil.copyfile(f"{UNREALENGINE}/Engine/Binaries/{OS}/ShaderCompileWorker-{OS}-Shipping{DOT_EXE}", f"{UNREALENGINE}/Engine/Binaries/{OS}/ShaderCompileWorker{DOT_EXE}")
shell(UNREALENGINE, f"{UNREALENGINE}/Engine/Build/BatchFiles/{BUILD_BAT} -buildubt ShaderCompileWorker {OS} Development")
def build_luprex_and_integration():
@@ -315,13 +312,16 @@ CONFIG = autodetect_system_config()
store_system_config_in_globals(CONFIG)
os.chdir(f"{INTEGRATION}/EnginePatches")
if MODE == "experiment":
build_unrealbuildtool()
if MODE == "all":
generate_buildconfiguration_xml()
generate_lpx_paths()
patch_unrealengine_source_code()
generate_integration_uproject()
run_unrealengine_setup_bat()
build_shadercompileworker()
build_unrealbuildtool()
if MODE in ["all", "c++"]:
build_luprex_and_integration()