From a7cdd5969ef346376194f14f77073e45ba729a00 Mon Sep 17 00:00:00 2001 From: jyelon Date: Fri, 27 Jun 2025 17:23:43 -0400 Subject: [PATCH] work on getting rid of warnings in build.py --- Source/Integration.Target.cs | 4 ++-- Source/IntegrationEditor.Target.cs | 4 ++-- build.py | 27 +++++++++++++++++---------- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/Source/Integration.Target.cs b/Source/Integration.Target.cs index 152420d3..62c136cc 100644 --- a/Source/Integration.Target.cs +++ b/Source/Integration.Target.cs @@ -8,8 +8,8 @@ public class IntegrationTarget : TargetRules public IntegrationTarget( TargetInfo Target) : base(Target) { Type = TargetType.Game; - DefaultBuildSettings = BuildSettingsVersion.V2; - IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_1; + DefaultBuildSettings = BuildSettingsVersion.Latest; + IncludeOrderVersion = EngineIncludeOrderVersion.Latest; ExtraModuleNames.Add("Integration"); } } diff --git a/Source/IntegrationEditor.Target.cs b/Source/IntegrationEditor.Target.cs index 80b23149..58a8eeba 100644 --- a/Source/IntegrationEditor.Target.cs +++ b/Source/IntegrationEditor.Target.cs @@ -8,8 +8,8 @@ public class IntegrationEditorTarget : TargetRules public IntegrationEditorTarget( TargetInfo Target) : base(Target) { Type = TargetType.Editor; - DefaultBuildSettings = BuildSettingsVersion.V2; - IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_1; + DefaultBuildSettings = BuildSettingsVersion.Latest; + IncludeOrderVersion = EngineIncludeOrderVersion.Latest; ExtraModuleNames.Add("Integration"); } } diff --git a/build.py b/build.py index 2abda99a..8182836f 100755 --- a/build.py +++ b/build.py @@ -20,6 +20,7 @@ from types import SimpleNamespace def shell(dir, cmd): "Run a shell command in a directory" + print("Running:", cmd) subprocess.run(cmd, shell=True, check=True, cwd=dir) def create_tarfile(directory, glob_pattern, outputfile): @@ -229,6 +230,7 @@ def unzip_unreal_engine_and_apply_patch(): for file in dosfiles: unix2dos(f"{unrealversion}/{file}") Path(unrealversion).rename(UNREALENGINE) + def generate_buildconfiguration_xml(): """ Generates BuildConfiguration.xml. We actually have two versions of this @@ -237,8 +239,8 @@ def generate_buildconfiguration_xml(): """ dir1 = Path(f"{INTEGRATION}/Saved/UnrealBuildTool") dir2 = Path(f"{UNREALENGINE}/Engine/Saved/UnrealBuildTool") - target1 = Path(f"{INTEGRATION}/Saved/UnrealBuildTool/BuildConfiguration.xml") - target2 = Path(f"{UNREALENGINE}/Engine/Saved/UnrealBuildTool/BuildConfiguration.xml") + target1 = Path(f"{dir1}/BuildConfiguration.xml") + target2 = Path(f"{dir2}/BuildConfiguration.xml") source = Path(f"{INTEGRATION}/EnginePatches/BuildConfiguration{OS}.xml") template = source.read_text(); dir1.mkdir(parents=True, exist_ok=True) @@ -273,12 +275,20 @@ def generate_integration_uproject(): expand_json_file(template, target, CONFIG) -def run_unrealengine_setup_bat(): +def run_unrealengine_setup_bat_replacement(): """ - Run Setup.bat in UnrealEngine. - This script downloads assets that aren't stored in git. + The Setup.bat in UnrealEngine does a lot of unnecessary stuff, + generates a lot of error messages, and pops up an interactive + prompt in the middle of a build. Yuk. So we've written + our own script that replaces Setup.bat/Setup.sh. """ - shell(UNREALENGINE, f"{UNREALENGINE}/Setup.{BAT}") + if not Path(f"{UNREALENGINE}/Engine/Content").is_dir(): + if sys.platform == "windows": + shell(UNREALENGINE, "Engine/Binaries/DotNET/GitDependencies/win-x64/GitDependencies.exe") + shell(UNREALENGINE, "Engine/Extras/Redist/en-us/UEPrereqSetup_x64.exe /quiet /norestart") + else: + shell(UNREALENGINE, "Engine/Build/BatchFiles/Linux/GitDependencies.sh") + shell(f"{UNREALENGINE}/Engine/Build/BatchFiles/Linux", "./Setup.sh") def build_unrealbuildtool(): @@ -360,15 +370,12 @@ CONFIG = autodetect_system_config() store_system_config_in_globals(CONFIG) os.chdir(f"{INTEGRATION}/EnginePatches") -if MODE == "experiment": - build_intellisense_database_for_clangd() - if MODE == "all": unzip_unreal_engine_and_apply_patch() generate_buildconfiguration_xml() generate_lpx_paths() generate_integration_uproject() - run_unrealengine_setup_bat() + run_unrealengine_setup_bat_replacement() build_unrealbuildtool() generate_integration_code_workspace()