Bundle Windows CRT with standalone editor packages (by Codex)

This commit is contained in:
Codex committed 2026-10-22 22:03:52 +02:00
1 parent ef111342f9
commit 056ac8ebea
2 files changed
+10 -8

No files matched your search

+3
View File
@@ -1074,6 +1074,9 @@ if(MSVC)
set(CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT Runtime)
set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
include(InstallRequiredSystemLibraries)
if(OPENBMH_BUILD_EDITOR)
install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION . COMPONENT Editor)
endif()
endif()
add_executable(tax_animation_unit_tests tests/tax_animation_unit_tests.cpp)
+7 -8
View File
@@ -78,19 +78,18 @@ def main():
with tempfile.TemporaryDirectory(prefix='editor-package-') as td:
stage = Path(td) / name; stage.mkdir()
exe = 'OpenBMHEditor.exe' if args.platform.startswith('windows') else 'OpenBMHEditor'
executable = build / exe
if not executable.exists():
executable = build / 'Release' / exe
shutil.copy2(executable, stage / exe)
shutil.copytree(build / 'assets/editor', stage / 'assets/editor')
subprocess.run(['cmake', '--install', str(build), '--component', 'Editor', '--config', 'Release',
'--prefix', str(stage)], check=True)
shutil.copytree(source / 'docs/licenses', stage / 'licenses')
for file in ('LICENSE', 'THIRD_PARTY_NOTICES.md'):
shutil.copy2(source / file, stage / file)
shutil.copy2(source / 'docs/EDITOR.md', stage / 'EDITOR.md')
if args.platform.startswith('windows'):
# Only runtime DLLs produced beside this editor are eligible.
for dll in executable.parent.glob('*.dll'):
shutil.copy2(dll, stage / dll.name)
# Uses the same app-local CRT/UCRT installation as the main game.
# A successful runner launch alone does not prove deployability.
for dll in ('vcruntime140.dll', 'msvcp140.dll'):
if not (stage / dll).is_file():
raise RuntimeError('Required Windows runtime missing: ' + dll)
(stage / 'BUILD.json').write_text(json.dumps({'commit': commit, 'platform': args.platform,
'editor_profile': 'editor-world-v1', 'game_data_included': False}, indent=2) + '\n')
zip_tree(stage, args.out / (name + '.zip'))