feat: carry the data trees a platform's cores read

A platform pack carried only the trees its own systems declared, so for_platforms reached RetroArch, Lakka and RetroPie alone and every other platform running blueMSX, FBNeo or Dolphin got no tree. The pack, the install list and the pipeline's tree members now add the trees of the libretro cores the platform runs, below the system directory and build folder the core reads, unless the platform installs or never opens them. A platform entry the manifest resolved into a carried tree becomes that tree's member, which the installer can fetch: AmberELEC and EmuELEC no longer hold 192 blueMSX machine configs back. stonesoup reads its tree beside the content and pcee2 compiles its resources in, so neither tree reaches a BIOS pack.
This commit is contained in:
Abdessamad Derraz committed 2026-11-05 23:25:29 +01:00
1 parent 736dadd7e9
commit 54a3876a8b
11 files changed
+428 -70

No files matched your search

+10 -3
View File
@@ -433,19 +433,26 @@ def parse_pack_paths(output: str) -> dict[str, str]:
_PACK_NOTES = re.compile(r"(^README\.txt$|^manifest\.json$|(^|/)(INSTRUCTIONS|RENAMED)_[^/]*\.txt$)")
def _tree_members(platform: str, platforms_dir: str) -> dict[str, int]:
def _tree_members(
platform: str, platforms_dir: str, emulators_dir: str = "emulators",
) -> dict[str, int]:
"""Archive path -> size of every file the platform's data trees can add."""
import generate_pack # noqa: PLC0415
from common import load_platform_config # noqa: PLC0415
from common import load_emulator_profiles, load_platform_config # noqa: PLC0415
from packpaths import _flat # noqa: PLC0415
config = load_platform_config(platform, platforms_dir)
base_dest = config.get("base_destination", "")
registry = load_data_dir_registry(platforms_dir)
core_trees = generate_pack.core_data_trees(
config, load_emulator_profiles(emulators_dir), platform, registry,
)
members: dict[str, int] = {}
with contextlib.redirect_stdout(io.StringIO()):
for src, full in generate_pack._data_directory_members(
config.get("systems", {}), load_data_dir_registry(platforms_dir),
config.get("systems", {}), registry,
platform, base_dest, False, set(), set(), set(),
core_trees=core_trees,
):
members[_flat(full, base_dest, True)] = os.path.getsize(src)
return members