mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-12-02 22:38:54 -06:00
fix: narrowed manifests skip standalone layouts
This commit is contained in:
1 parent
619f44d657
commit
d355649bc3
5 files changed
+151
-17
No files matched your search
@@ -51,6 +51,7 @@ from packs.manifestentry import (
|
||||
record_unplaceable,
|
||||
)
|
||||
from packs.manifestselect import SelectionIndex
|
||||
from packs.naming import manifest_suffix
|
||||
from packs.paths import platform_destination, save_layout
|
||||
from packs.scope import pack_sections, platform_list_version, system_titles
|
||||
from packs.standalone import standalone_copies, standalone_layouts
|
||||
@@ -782,15 +783,19 @@ def generate_install_list(
|
||||
(install/standalone/<platform>.json) and fetched only by a run given
|
||||
--standalone.
|
||||
|
||||
A manifest narrowed by a target, a case fold or --one-per-slot is no
|
||||
list install.py reads by default and gets neither.
|
||||
A manifest whose name carries a narrowing tag (manifest_suffix), or
|
||||
built under a case fold override, is no list install.py reads by default
|
||||
and gets neither.
|
||||
"""
|
||||
settings = _ManifestSettings(**options)
|
||||
built: dict = {}
|
||||
result = generate_manifest(platform_name, platforms_dir, db, bios_dir, registry_path,
|
||||
build_out=built, **options)
|
||||
if (settings.source != "full" or settings.target_cores is not None
|
||||
or settings.fold_case is not None or settings.one_per_slot):
|
||||
narrowed = manifest_suffix(
|
||||
settings.source, settings.regions, settings.target_name, settings.required_only,
|
||||
one_per_slot=settings.one_per_slot, no_game_data=settings.no_game_data,
|
||||
)
|
||||
if narrowed or settings.target_cores is not None or settings.fold_case is not None:
|
||||
return result
|
||||
truth_options: InstallListOptions = {**options, "source": "truth"}
|
||||
truth = generate_manifest(
|
||||
|
||||
@@ -13,7 +13,7 @@ from model.registry import load_platform_registry
|
||||
from model.safeparse import require_yaml
|
||||
from packs.datatrees import uncached_warning
|
||||
from packs.manifest import generate_install_list
|
||||
from packs.naming import pack_narrowings, platform_target
|
||||
from packs.naming import manifest_suffix, platform_target
|
||||
from packs.scope import platform_list_version
|
||||
from packs.standalone import STANDALONE_DIR, standalone_copies
|
||||
from packs.variants import run_variants, skip_empty_truth
|
||||
@@ -116,16 +116,12 @@ def run_manifest_mode(
|
||||
uncached_out=uncached,
|
||||
)
|
||||
report_uncached(uncached, getattr(args, "uncached_trees", None))
|
||||
narrow_suffix = "".join(
|
||||
tag.lower()
|
||||
for tag, _label in pack_narrowings(
|
||||
source,
|
||||
getattr(args, "regions", None),
|
||||
platform_target(representative, args.target, args.platforms_dir),
|
||||
False,
|
||||
required_only,
|
||||
no_game_data=getattr(args, "no_game_data", False),
|
||||
)
|
||||
narrow_suffix = manifest_suffix(
|
||||
source,
|
||||
getattr(args, "regions", None),
|
||||
platform_target(representative, args.target, args.platforms_dir),
|
||||
required_only,
|
||||
no_game_data=getattr(args, "no_game_data", False),
|
||||
)
|
||||
out_path = os.path.join(
|
||||
args.output_dir,
|
||||
@@ -137,7 +133,8 @@ def run_manifest_mode(
|
||||
f"{manifest['total_size']} bytes, "
|
||||
f"{manifest['total_omitted']} safely omitted"
|
||||
)
|
||||
for plat in group_platforms if layouts else ():
|
||||
# The layouts file carries no tag: only the default list writes it.
|
||||
for plat in group_platforms if layouts and not narrow_suffix else ():
|
||||
print(f" {write_standalone_layouts(args.output_dir, plat, layouts)}: "
|
||||
f"{len(layouts)} standalone builds")
|
||||
# Create aliases for grouped platforms (e.g., lakka -> retroarch)
|
||||
|
||||
@@ -58,6 +58,31 @@ def pack_narrowings(
|
||||
return applied
|
||||
|
||||
|
||||
def manifest_suffix(
|
||||
source: str,
|
||||
regions: list[str] | None,
|
||||
target_name: str | None,
|
||||
required_only: bool,
|
||||
*,
|
||||
one_per_slot: bool = False,
|
||||
no_game_data: bool = False,
|
||||
) -> str:
|
||||
"""The narrowing tags an install manifest's file name carries.
|
||||
|
||||
Empty names the default list install.py reads. Only that run builds the
|
||||
truth list and writes standalone/<platform>.json, which carries no tag:
|
||||
a --required-only run rewrote the layouts every --standalone install
|
||||
reads.
|
||||
"""
|
||||
return "".join(
|
||||
tag.lower()
|
||||
for tag, _label in pack_narrowings(
|
||||
source, regions, target_name, one_per_slot, required_only,
|
||||
no_game_data=no_game_data,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def _target_tag(target_name: str) -> str:
|
||||
"""Filename tag for a hardware target.
|
||||
|
||||
|
||||
Reference in new issue
Block a user