mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-11 20:43:50 -06:00
fix: keep a buildbot core beside its standalone
installable_cores removed every buildbot name the image builds, so a libretro core sharing its name with a standalone package was lost: Batocera runs amiberry standalone and its x86_64 boards fetch amiberry_libretro. A name now compares within its build mode, and the resolver and the layouts treat such a core as the emulator's libretro build, run both ways. Batocera gains amiberry, azahar, cannonball, cemu, dosbox, ecwolf, eduke32, fsuae, openmsx, rpcs3, supermodel, vita3k, xemu and ymir as installable, KNULLI cannonball.
This commit is contained in:
1 parent
96faec98a4
commit
bc8669c45c
7 files changed
+78
-11
No files matched your search
+14
-2
@@ -2767,6 +2767,15 @@ def standalone_set(config: dict) -> set[str]:
|
||||
"""
|
||||
names = {str(c) for c in config.get("standalone_cores") or []}
|
||||
names |= {DUAL_MODE_PREFIX + str(c) for c in config.get("dual_mode_cores") or []}
|
||||
# A buildbot core the platform's RetroArch installs under the name of an
|
||||
# emulator it runs standalone is that emulator's libretro build: run
|
||||
# both ways, as Batocera runs amiberry standalone and can fetch
|
||||
# amiberry_libretro.
|
||||
names |= {
|
||||
DUAL_MODE_PREFIX + str(c)
|
||||
for c in set(map(str, config.get("installable_cores") or []))
|
||||
& set(map(str, config.get("standalone_cores") or []))
|
||||
}
|
||||
# The system directory each core is handed travels the same way, so
|
||||
# platform_layouts places a core's files below it for every reader.
|
||||
names |= {
|
||||
@@ -3264,10 +3273,13 @@ def resolve_platform_cores(
|
||||
# A name the platform launches both ways designates its libretro
|
||||
# build too. Batocera, Recalbox and RetroBat run pcsx2 standalone and
|
||||
# as LRPS2, two profiles: the key match kept the standalone one and
|
||||
# LRPS2's files never reached their packs.
|
||||
# LRPS2's files never reached their packs. A core its RetroArch
|
||||
# installs is a libretro build as well (amiberry's buildbot core
|
||||
# beside Batocera's standalone amiberry).
|
||||
result |= {
|
||||
profile
|
||||
for c in config.get("dual_mode_cores") or []
|
||||
for c in [*(config.get("dual_mode_cores") or []),
|
||||
*(config.get("installable_cores") or [])]
|
||||
for profile in index.get(str(c), set())
|
||||
if "libretro" in str(profiles[profile].get("type", ""))
|
||||
and not profiles[profile].get("built_by")
|
||||
|
||||
@@ -557,19 +557,24 @@ def boards_build(selection: BuildSelection, launchers: list[dict]) -> Callable[[
|
||||
return built
|
||||
|
||||
|
||||
def installable_cores(selection: BuildSelection, cores: list[str]) -> list[str]:
|
||||
def installable_cores(
|
||||
selection: BuildSelection, cores: list[str], standalone: list[str], dual: list[str],
|
||||
) -> list[str]:
|
||||
"""Buildbot cores a board's RetroArch core downloader installs, beyond
|
||||
the cores the image builds.
|
||||
the libretro cores the image builds.
|
||||
|
||||
The targets scraper names, per board, the RetroArch targets entry its
|
||||
downloader reads (`downloads`): a Batocera x86_64 board installs any
|
||||
core of linux-x86_64, an armv7 one any of linux-armhf.
|
||||
core of linux-x86_64, an armv7 one any of linux-armhf. A name compares
|
||||
within its build mode: amiberry built standalone is another program
|
||||
than amiberry_libretro, which the buildbot serves.
|
||||
"""
|
||||
found: set[str] = set()
|
||||
for entry in selection.targets.values():
|
||||
if entry.get("downloads"):
|
||||
found |= load_target_config("retroarch", entry["downloads"]) or set()
|
||||
return sorted(found - set(cores))
|
||||
built_libretro = (set(cores) - set(standalone)) | set(dual)
|
||||
return sorted(found - built_libretro)
|
||||
|
||||
|
||||
def records_run(launchers: list[dict], built: Callable[[str], bool]) -> list[dict]:
|
||||
@@ -642,7 +647,7 @@ class Scraper(BaseScraper):
|
||||
built = boards_build(selection, launchers)
|
||||
launchers = records_run(launchers, built)
|
||||
cores, standalone, dual = self._fetch_cores(built)
|
||||
installable = installable_cores(selection, cores)
|
||||
installable = installable_cores(selection, cores, standalone, dual)
|
||||
libretro_systems = es_systems_libretro_systems(
|
||||
self._fetch_text(ES_SYSTEMS_URL.format(tag=self.tag)), _not_cores()
|
||||
)
|
||||
|
||||
@@ -141,7 +141,7 @@ class Scraper(BaseScraper):
|
||||
built = boards_build(selection, launchers)
|
||||
launchers = records_run(launchers, built)
|
||||
cores, standalone, dual = configgen_cores(defaults, es_systems, dropped, built)
|
||||
installable = installable_cores(selection, cores)
|
||||
installable = installable_cores(selection, cores, standalone, dual)
|
||||
# Each system's own list (psx, es_systems.yml:640-653: libretro
|
||||
# pcsx_rearmed, swanstation, mednafen_psx, then duckstation and
|
||||
# duckstation-legacy).
|
||||
|
||||
Reference in new issue
Block a user