More work on patch-xxx.py

This commit is contained in:
2024-10-28 17:51:42 -04:00
parent cb1769ac8d
commit fb4df7b872
3 changed files with 18 additions and 13 deletions

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
<ProjectFileGenerator>
<Format>VisualStudioCode</Format>
</ProjectFileGenerator>
<BuildConfiguration>
<bTuneDebugInfoForLLDB>true</bTuneDebugInfoForLLDB>
<bDisableDumpSyms>true</bDisableDumpSyms>
</BuildConfiguration>
</Configuration>

View File

@@ -66,6 +66,10 @@ from pathlib import Path
# Some handy utility functions # Some handy utility functions
# #
def readfile(fn):
with open(fn) as f:
return f.read()
def writefile(fn, str): def writefile(fn, str):
with open(fn, "w") as f: with open(fn, "w") as f:
f.write(str) f.write(str)
@@ -97,18 +101,8 @@ Path("Source/Integration/lpx-paths.hpp").unlink(missing_ok=True)
# Write BuildConfiguration.xml # Write BuildConfiguration.xml
# #
writefile("Saved/UnrealBuildTool/BuildConfiguration.xml", BUILDCONFIG=readfile("EnginePatches/BuildConfigurationLinux.xml")
f"""<?xml version="1.0" encoding="utf-8" ?> writefile("Saved/UnrealBuildTool/BuildConfiguration.xml", BUILDCONFIG)
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
<ProjectFileGenerator>
<Format>VisualStudioCode</Format>
</ProjectFileGenerator>
<BuildConfiguration>
<bTuneDebugInfoForLLDB>true</bTuneDebugInfoForLLDB>
<bDisableDumpSyms>true</bDisableDumpSyms>
</BuildConfiguration>
</Configuration>
""")
# #
# Write lpx-paths.hpp. # Write lpx-paths.hpp.

View File

@@ -63,6 +63,6 @@ writefile("Engine/Saved/UnrealBuildTool/BuildConfiguration.xml", BUILDCONFIG)
# #
LOGMACROS=readfile(f"{INTEGRATION}/EnginePatches/LogMacros.cpp") LOGMACROS=readfile(f"{INTEGRATION}/EnginePatches/LogMacros.cpp")
writefile(f"{UNREALENGINE}/Engine/Source/Runtime/Core/Private/Logging/LogMacros.cpp"), LOGMACROS) writefile(f"{UNREALENGINE}/Engine/Source/Runtime/Core/Private/Logging/LogMacros.cpp", LOGMACROS)