From cf54730a1780a29e4b03c816830260dbbe47bf2c Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Tue, 20 Oct 2026 23:04:42 +0200 Subject: [PATCH] fix: lay out RetroPie standalone packages RetroPie's YAML listed no standalone_cores, so every package was laid out as a libretro core and the standalone files of amiberry, dolphin, hatari, mame and ppsspp never reached the pack. Packages without the lr- prefix (bar the retroarch frontend) are now standalone, and names shipped both ways are dual-mode. --- platforms/retropie.yml | 126 ++++++++++++++++++++++++++++ scripts/scraper/retropie_scraper.py | 11 ++- tests/test_scraper_contract.py | 16 ++++ wiki/adding-a-platform.md | 16 +++- 4 files changed, 164 insertions(+), 5 deletions(-) diff --git a/platforms/retropie.yml b/platforms/retropie.yml index 6e69cfdb..b7849ea9 100644 --- a/platforms/retropie.yml +++ b/platforms/retropie.yml @@ -186,6 +186,132 @@ cores: - yabause - yquake2 - zesarux +standalone_cores: +- advmame +- advmame-0.94 +- advmame-1.4 +- ags +- alephone +- amiberry +- atari800 +- basilisk +- cannonball +- capricerpi +- cdogs-sdl +- cgenius +- coolcv +- daphne +- darkplaces-quake +- dgen +- dolphin +- dosbox +- dosbox-sdl2 +- dosbox-staging +- drastic +- dsda-doom +- dxx-rebirth +- eduke32 +- fbzx +- flycast +- frotz +- fs-uae +- fuse +- gemrb +- giana +- gngeopi +- gpsp +- gzdoom +- hatari +- hypseus +- ionfury +- ioquake3 +- jumpnbump +- jzintv +- kodi +- linapple +- lincity-ng +- love +- love-0.10.2 +- lzdoom +- mame +- mame4all +- micropolis +- minecraft +- minivmac +- mupen64plus +- mysticmine +- np2pi +- openblok +- openbor +- openmsx +- openpht +- openttd +- opentyrian +- oricutron +- osmose +- pcsx-rearmed +- pcsx2 +- pifba +- pisnes +- ppsspp +- ppsspp-1.5.4 +- px68k +- quake3 +- quasi88 +- redream +- reicast +- rpix86 +- scummvm +- scummvm-sdl1 +- sdlpop +- sdltrs +- simcoupe +- smw +- snes9x +- solarus +- splitwolf +- srb2 +- steamlink +- stella +- stratagus +- supermodel3 +- supertux +- ti99sim +- ti99sim-sdl1 +- tyrquake +- uae4all +- uae4arm +- uqm +- vice +- vvvvvv +- wolf4sdl +- xm7 +- xrick +- xroar +- yabasanshiro +- yquake2 +- zesarux +dual_mode_cores: +- atari800 +- dolphin +- dosbox +- flycast +- fuse +- gpsp +- hatari +- mame +- mupen64plus +- pcsx-rearmed +- ppsspp +- px68k +- quasi88 +- scummvm +- snes9x +- stella +- tyrquake +- uae4arm +- vice +- xrick launchers: - emulator: advmame-0.94 package: advmame-0.94 diff --git a/scripts/scraper/retropie_scraper.py b/scripts/scraper/retropie_scraper.py index 85b47460..14e791b0 100644 --- a/scripts/scraper/retropie_scraper.py +++ b/scripts/scraper/retropie_scraper.py @@ -146,7 +146,13 @@ class Scraper(BaseScraper): """ # A libretro package is lr-; a standalone package is named # after the emulator itself. - cores = sorted({module.removeprefix("lr-") for module in self.module_ids()}) + modules = self.module_ids() + cores = sorted({module.removeprefix("lr-") for module in modules}) + libretro = {m.removeprefix("lr-") for m in modules if m.startswith("lr-")} + # The retroarch package is the frontend that runs the lr- cores. + standalone = sorted( + m for m in modules if not m.startswith("lr-") and m != "retroarch" + ) if not self._version: raise ValueError(f"{self.url}: no __version in {_VERSION_FILE}") @@ -158,6 +164,9 @@ class Scraper(BaseScraper): "source": self.url, "base_destination": "BIOS", "cores": cores, + "standalone_cores": standalone, + # Shipped both as lr- and as : each layout gets its files. + "dual_mode_cores": [m for m in standalone if m in libretro], "launchers": extract_launchers(self._scripts), } diff --git a/tests/test_scraper_contract.py b/tests/test_scraper_contract.py index 0f7119f9..2a36aacf 100644 --- a/tests/test_scraper_contract.py +++ b/tests/test_scraper_contract.py @@ -289,6 +289,22 @@ class RetroPiePackageList(unittest.TestCase): self.assertEqual(config["inherits"], "retroarch") self.assertEqual(config["base_destination"], "BIOS") + def test_a_package_built_outside_libretro_runs_standalone(self): + """hatari ships as lr-hatari and as hatari: both layouts are read.""" + scraper = self._scraper( + { + "retropie_packages.sh": '__version="4.8.12"\n', + "scriptmodules/libretrocores/lr-hatari.sh": 'rp_module_id="lr-hatari"\n', + "scriptmodules/libretrocores/lr-mgba.sh": 'rp_module_id="lr-mgba"\n', + "scriptmodules/emulators/hatari.sh": 'rp_module_id="hatari"\n', + "scriptmodules/emulators/openmsx.sh": 'rp_module_id="openmsx"\n', + "scriptmodules/emulators/retroarch.sh": 'rp_module_id="retroarch"\n', + } + ) + config = scraper.generate_platform_yaml() + self.assertEqual(config["standalone_cores"], ["hatari", "openmsx"]) + self.assertEqual(config["dual_mode_cores"], ["hatari"]) + def test_the_version_is_the_one_the_setup_script_declares(self): scraper = self._scraper( { diff --git a/wiki/adding-a-platform.md b/wiki/adding-a-platform.md index d66bcd16..80da491d 100644 --- a/wiki/adding-a-platform.md +++ b/wiki/adding-a-platform.md @@ -150,11 +150,19 @@ scriptmodule, and any manual change is overwritten on the next scrape. The `cores` field determines which emulator profiles are resolved for this platform. Three strategies exist: -- **Explicit list**: `cores: [beetle_psx, dolphin, ...]` - match by profile key name. - Used by Batocera, Recalbox, RetroBat, RomM. +- **Explicit list**: `cores: [beetle_psx, dolphin, ...]` - match by profile key name + or by any name in a profile's `cores:`. Used by Batocera, Recalbox, RetroBat, RomM, + RetroPie, EmuDeck, RetroDECK, ROCKNIX. A list that names `retroarch` (the last four) + also takes every libretro profile. - **all_libretro**: `cores: all_libretro` - include every profile with `type: libretro` - or `type: standalone + libretro`. Used by RetroArch, Lakka, RetroPie. -- **Omitted**: fallback to system ID intersection. Used by EmuDeck. + or `type: standalone + libretro`. Used by RetroArch and Lakka. +- **Omitted**: fallback to system ID intersection. + +Two lists say how each resolved emulator is laid out. `standalone_cores` names the +ones the platform launches as standalone apps: their files go to `standalone_path`. +`dual_mode_cores` names those it launches both ways (RetroPie packages `lr-hatari` +and `hatari`): both layouts are packed. A profile without a standalone build keeps +its libretro layout whatever the platform calls it. ### Optional fields