diff --git a/scripts/common.py b/scripts/common.py index 968320769..3b9e25538 100644 --- a/scripts/common.py +++ b/scripts/common.py @@ -2891,15 +2891,21 @@ def resolve_platform_cores( If target_cores is provided, result is intersected with it. """ cores_config = config.get("cores") + platform_key = str(config.get("_key") or "") def every_libretro() -> set[str]: - # A build only some platforms compile (built_by) is reached by name: - # the buildbot RetroArch installs from does not publish it. + # A build only some platforms compile (built_by) is absent from the + # buildbot RetroArch installs from, so it is reached by name, or as one + # of the libretro cores of a platform that compiles it: ROCKNIX ships + # yabadabadoo with its RetroArch and names it nowhere else. return { name for name, p in profiles.items() if "libretro" in p.get("type", "") and p.get("type") != "alias" - and not p.get("built_by") + and ( + not p.get("built_by") + or (platform_key and platform_key in p["built_by"]) + ) } if cores_config == "all_libretro": diff --git a/tests/test_e2e.py b/tests/test_e2e.py index ada7bd5ce..80d21535e 100644 --- a/tests/test_e2e.py +++ b/tests/test_e2e.py @@ -1183,6 +1183,23 @@ class TestE2E(unittest.TestCase): recalbox = {"cores": ["mame0278"], "systems": {}} self.assertEqual(resolve_platform_cores(recalbox, profiles), {"mame0278"}) + def test_a_platform_s_own_libretro_build_comes_with_its_retroarch(self): + """ROCKNIX ships yabadabadoo with its RetroArch and names it nowhere + else: a list naming retroarch takes the libretro builds whose + built_by names that platform, and no other platform's.""" + profiles = { + "yabause": {"type": "libretro", "systems": ["saturn"], "files": []}, + "yabadabadoo": {"type": "libretro", "built_by": ["rocknix"], + "systems": ["saturn"], "files": []}, + } + rocknix = {"_key": "rocknix", "cores": ["retroarch"], "systems": {}} + self.assertEqual(resolve_platform_cores(rocknix, profiles), + {"yabause", "yabadabadoo"}) + other = {"_key": "batocera", "cores": ["retroarch"], "systems": {}} + self.assertEqual(resolve_platform_cores(other, profiles), {"yabause"}) + everyone = {"_key": "retroarch", "cores": "all_libretro", "systems": {}} + self.assertEqual(resolve_platform_cores(everyone, profiles), {"yabause"}) + def test_resolve_cores_explicit_list(self): """Explicit cores list matches against profile dict keys.""" config = {"cores": ["fbneo", "opera"], "systems": {"arcade": {"files": []}}} diff --git a/wiki/adding-a-platform.md b/wiki/adding-a-platform.md index 3e39160d4..05311d75f 100644 --- a/wiki/adding-a-platform.md +++ b/wiki/adding-a-platform.md @@ -198,7 +198,9 @@ resolved. Three strategies exist: platform, that profile answers for the name. Used by Batocera, Recalbox, RetroBat, RomM, KNULLI, AmberELEC, EmuELEC, MinUI, NextUI, MyMinUI, RetroPie, EmuDeck, RetroDECK, ROCKNIX. A list that names `retroarch` (the last - four) also takes every libretro profile, as `all_libretro` does. An empty list + four) also takes every libretro profile, as `all_libretro` does, plus the + libretro builds whose `built_by` names this platform (ROCKNIX's + `yabadabadoo`). An empty list (BizHawk, MiSTer FPGA) resolves no profile, and the pack holds the platform's own files. - **all_libretro**: `cores: all_libretro` - every profile whose `type` contains diff --git a/wiki/installer.md b/wiki/installer.md index 1db08b4ff..7c0a297a7 100644 --- a/wiki/installer.md +++ b/wiki/installer.md @@ -1323,7 +1323,7 @@ their systems`), and its `bios` folder comes first at the folder question, under Enter, before this computer's usual folder. A drive with a `bios` folder and none of those folders, a data drive or a stick, is numbered with a note (`DATA has a bios folder but no folder a handheld system writes. Pick it below -if your files go there.`) and never taken under Enter. Another system's card or SHARE drive, and a +if the BIOS files go there.`) and never taken under Enter. Another system's card or SHARE drive, and a drive two systems fit, are left out, and a line names them: each is reached through its own setup. A folder typed is read from the current one when it is not a full path, and named in full after. `q` quits there too