diff --git a/tools/build_game.py b/tools/build_game.py index 4e506a17..2d3f22a2 100644 --- a/tools/build_game.py +++ b/tools/build_game.py @@ -918,6 +918,11 @@ def main(): runtime_lib = args.runtime_lib.resolve() if args.runtime_lib else None if runtime_lib and not runtime_lib.is_file(): sys.exit(f'{runtime_lib} not found: build it with --make-runtime-lib') + # The library leaves INSTALL_SIDE out, so a release that ships without one of them links with undefined symbols. + missing = sorted(n for n in INSTALL_SIDE - skip if not (RUNTIME / n).is_file()) + if runtime_lib and missing: + sys.exit(f'build_game: {", ".join(missing)} missing from {flag_path(RUNTIME)}: the release must ship every ' + f'INSTALL_SIDE source beside {runtime_lib.name}') text, objs, exe = ninja_file(gen, out, mods, jobs, skip, pairs is not None, runtime_lib, args.make_runtime_lib) write_if_changed(out / 'build.ninja', text) diff --git a/tools/make_release.py b/tools/make_release.py index fa0191f4..5f407103 100644 --- a/tools/make_release.py +++ b/tools/make_release.py @@ -51,6 +51,7 @@ import zipfile from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent)) +import build_game # noqa: E402 import build_xlate # noqa: E402 import check_content # noqa: E402 import shader_list # noqa: E402 @@ -422,7 +423,7 @@ def runtime_lib(out, llvm, pgo): if p.suffix in RUNTIME_SUFFIXES and p.is_file(): (rt / p.relative_to(ROOT / 'runtime')).parent.mkdir(parents=True, exist_ok=True) shutil.copy2(p, rt / p.relative_to(ROOT / 'runtime')) - for name in ('romfs.c', 'patches.c', 'ov_zstd.c'): # build_game.py INSTALL_SIDE + for name in sorted(build_game.INSTALL_SIDE): # compiled at install, so left out of libtotkrt.a shutil.copy2(ROOT / 'runtime' / name, rt / name)