work on getting rid of warnings in build.py
This commit is contained in:
@@ -8,8 +8,8 @@ public class IntegrationTarget : TargetRules
|
|||||||
public IntegrationTarget( TargetInfo Target) : base(Target)
|
public IntegrationTarget( TargetInfo Target) : base(Target)
|
||||||
{
|
{
|
||||||
Type = TargetType.Game;
|
Type = TargetType.Game;
|
||||||
DefaultBuildSettings = BuildSettingsVersion.V2;
|
DefaultBuildSettings = BuildSettingsVersion.Latest;
|
||||||
IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_1;
|
IncludeOrderVersion = EngineIncludeOrderVersion.Latest;
|
||||||
ExtraModuleNames.Add("Integration");
|
ExtraModuleNames.Add("Integration");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ public class IntegrationEditorTarget : TargetRules
|
|||||||
public IntegrationEditorTarget( TargetInfo Target) : base(Target)
|
public IntegrationEditorTarget( TargetInfo Target) : base(Target)
|
||||||
{
|
{
|
||||||
Type = TargetType.Editor;
|
Type = TargetType.Editor;
|
||||||
DefaultBuildSettings = BuildSettingsVersion.V2;
|
DefaultBuildSettings = BuildSettingsVersion.Latest;
|
||||||
IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_1;
|
IncludeOrderVersion = EngineIncludeOrderVersion.Latest;
|
||||||
ExtraModuleNames.Add("Integration");
|
ExtraModuleNames.Add("Integration");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
27
build.py
27
build.py
@@ -20,6 +20,7 @@ from types import SimpleNamespace
|
|||||||
|
|
||||||
def shell(dir, cmd):
|
def shell(dir, cmd):
|
||||||
"Run a shell command in a directory"
|
"Run a shell command in a directory"
|
||||||
|
print("Running:", cmd)
|
||||||
subprocess.run(cmd, shell=True, check=True, cwd=dir)
|
subprocess.run(cmd, shell=True, check=True, cwd=dir)
|
||||||
|
|
||||||
def create_tarfile(directory, glob_pattern, outputfile):
|
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}")
|
for file in dosfiles: unix2dos(f"{unrealversion}/{file}")
|
||||||
Path(unrealversion).rename(UNREALENGINE)
|
Path(unrealversion).rename(UNREALENGINE)
|
||||||
|
|
||||||
|
|
||||||
def generate_buildconfiguration_xml():
|
def generate_buildconfiguration_xml():
|
||||||
"""
|
"""
|
||||||
Generates BuildConfiguration.xml. We actually have two versions of this
|
Generates BuildConfiguration.xml. We actually have two versions of this
|
||||||
@@ -237,8 +239,8 @@ def generate_buildconfiguration_xml():
|
|||||||
"""
|
"""
|
||||||
dir1 = Path(f"{INTEGRATION}/Saved/UnrealBuildTool")
|
dir1 = Path(f"{INTEGRATION}/Saved/UnrealBuildTool")
|
||||||
dir2 = Path(f"{UNREALENGINE}/Engine/Saved/UnrealBuildTool")
|
dir2 = Path(f"{UNREALENGINE}/Engine/Saved/UnrealBuildTool")
|
||||||
target1 = Path(f"{INTEGRATION}/Saved/UnrealBuildTool/BuildConfiguration.xml")
|
target1 = Path(f"{dir1}/BuildConfiguration.xml")
|
||||||
target2 = Path(f"{UNREALENGINE}/Engine/Saved/UnrealBuildTool/BuildConfiguration.xml")
|
target2 = Path(f"{dir2}/BuildConfiguration.xml")
|
||||||
source = Path(f"{INTEGRATION}/EnginePatches/BuildConfiguration{OS}.xml")
|
source = Path(f"{INTEGRATION}/EnginePatches/BuildConfiguration{OS}.xml")
|
||||||
template = source.read_text();
|
template = source.read_text();
|
||||||
dir1.mkdir(parents=True, exist_ok=True)
|
dir1.mkdir(parents=True, exist_ok=True)
|
||||||
@@ -273,12 +275,20 @@ def generate_integration_uproject():
|
|||||||
expand_json_file(template, target, CONFIG)
|
expand_json_file(template, target, CONFIG)
|
||||||
|
|
||||||
|
|
||||||
def run_unrealengine_setup_bat():
|
def run_unrealengine_setup_bat_replacement():
|
||||||
"""
|
"""
|
||||||
Run Setup.bat in UnrealEngine.
|
The Setup.bat in UnrealEngine does a lot of unnecessary stuff,
|
||||||
This script downloads assets that aren't stored in git.
|
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():
|
def build_unrealbuildtool():
|
||||||
@@ -360,15 +370,12 @@ CONFIG = autodetect_system_config()
|
|||||||
store_system_config_in_globals(CONFIG)
|
store_system_config_in_globals(CONFIG)
|
||||||
os.chdir(f"{INTEGRATION}/EnginePatches")
|
os.chdir(f"{INTEGRATION}/EnginePatches")
|
||||||
|
|
||||||
if MODE == "experiment":
|
|
||||||
build_intellisense_database_for_clangd()
|
|
||||||
|
|
||||||
if MODE == "all":
|
if MODE == "all":
|
||||||
unzip_unreal_engine_and_apply_patch()
|
unzip_unreal_engine_and_apply_patch()
|
||||||
generate_buildconfiguration_xml()
|
generate_buildconfiguration_xml()
|
||||||
generate_lpx_paths()
|
generate_lpx_paths()
|
||||||
generate_integration_uproject()
|
generate_integration_uproject()
|
||||||
run_unrealengine_setup_bat()
|
run_unrealengine_setup_bat_replacement()
|
||||||
build_unrealbuildtool()
|
build_unrealbuildtool()
|
||||||
generate_integration_code_workspace()
|
generate_integration_code_workspace()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user