chore: merge installer phase 0

# Conflicts:
#	README.md
#	install.ps1
#	install.sh
#	install/launchers/index.json
#	wiki/installer.md
This commit is contained in:
Abdessamad Derraz committed 2026-11-09 21:14:01 +01:00
commit b356d58406
90 files changed
+1056 -1096

No files matched your search

+19
View File
@@ -3144,6 +3144,25 @@ SYSTEM_ALIASES: dict[str, str] = {
"snesmsu": "nintendo-snes",
"megadrivemsu": "sega-megadrive",
"sgb-msu1": "nintendo-sgb",
# Spellings profiles gave a machine the others call by another id:
# ares's own system names, dgen and picodrive's sega-genesis beside
# sega-megadrive, fbneo's sinclair-spectrum and snk-neogeo-pocket,
# emux_sms's sms. muOS names its GBA folder gameboyadvance first, the
# folder resolved to ares's game-boy-advance, and an unrecognised GBA
# game got no file of the nintendo-gba list.
"famicom": "nintendo-nes",
"famicom-disk-system": "nintendo-fds",
"super-famicom": "nintendo-snes",
"game-boy-advance": "nintendo-gba",
"neo-geo-pocket": "snk-ngp",
"snk-neogeo-pocket": "snk-ngp",
"neo-geo-pocket-color": "snk-ngpc",
"wonderswan": "bandai-wswan",
"wonderswan-color": "bandai-wswanc",
"sega-genesis": "sega-megadrive",
"genesis": "sega-megadrive",
"sinclair-spectrum": "sinclair-zx-spectrum",
"sms": "sega-mastersystem",
}
+10
View File
@@ -282,9 +282,19 @@ def resolve_folder(
An arcade core is the exception: the arcade index names each set's
files, and its hundred machines would make any unknown file a fallback
for all of them.
A name that spells a machine its core does not run adds the core's
machines to it: the games run on that core. Mednafen's PC Engine core
lists nec-pc-engine, the CD folder resolved to nec-pc-engine-cd alone,
and an unrecognised CD game got no System Card.
"""
resolution = resolver.resolve(folder_names(row), platform)
own = [str(s) for s in profiles.profiles.get(profile or "", {}).get("systems") or []]
if resolution.systems and own and profile not in arcade:
runs = {sid for s in own for sid in resolver.equivalents(s)}
if not runs & set(resolution.systems):
systems = set(resolution.systems) | {resolver.canonical(s) for s in own}
return Resolution(sorted(systems), f"{resolution.basis}, and systems of {profile}")
if resolution.systems or not own:
return resolution
if len(own) == 1:
+13 -1
View File
@@ -78,6 +78,7 @@ from common import (
load_platform_config,
without_profile_blind,
MANUFACTURER_PREFIXES,
_norm_system_id,
require_yaml,
ProfileSelectionError,
core_system_dirs,
@@ -5113,7 +5114,7 @@ def generate_manifest(
data_sizes = pack_only_sizes + [os.path.getsize(src) for src, _dest in data_members]
data_directories = _manifest_data_directories(
data_members, data_refs, data_registry or {}, base_dest,
tree_readers(pack_systems, core_trees),
tree_readers(pack_systems, core_trees), pack_systems,
)
now = _build_timestamp(db)
@@ -5219,6 +5220,7 @@ def _manifest_data_directories(
registry: dict,
base_dest: str,
readers: dict[str, list[str]] | None = None,
platform_systems: Iterable[str] | None = None,
) -> list[dict]:
"""Each data directory the pack carries, as the installer rebuilds it.
@@ -5229,6 +5231,11 @@ def _manifest_data_directories(
changed since is refused rather than installed. archive_size is the
size of the archive refresh_data_dirs last downloaded, what fetching
the tree costs: a tarball whose tree is 10 KB is a download of 21 MB.
``systems`` are the platform's ids (``platform_systems``) the tree's
systems normalize to, as a core extra's are: a tree no platform system
serves has none, and goes with the files of no system, as the pack
built with --system puts it in the part of its own. FBNeo's cheats
carried sega-megadrive where RetroArch's list says sega-mega-drive.
``optional`` marks a tree every core reading it runs without
(``required: false``): install.py --required-only leaves it out, as the
pack built with --required-only does. ``cores`` names the cores that
@@ -5237,8 +5244,13 @@ def _manifest_data_directories(
"""
grouped: dict[tuple[str, str], dict] = {}
versions: dict[str, dict[str, dict]] = {}
by_norm: dict[str, list[str]] = {}
for sys_id in sorted(platform_systems or ()):
by_norm.setdefault(_norm_system_id(sys_id), []).append(sys_id)
for src, full in members:
ref, systems, prefix, needed = refs[full]
if platform_systems is not None:
systems = tuple(own for sid in systems for own in by_norm.get(_norm_system_id(sid), ()))
entry = registry.get(ref, {})
key = (ref, prefix)
group = grouped.get(key)