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.
This commit is contained in:
Abdessamad Derraz committed 2026-10-20 23:04:42 +02:00
1 parent 027379c065
commit cf54730a17
4 files changed
+164 -5

No files matched your search

+126
View File
@@ -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
+10 -1
View File
@@ -146,7 +146,13 @@ class Scraper(BaseScraper):
"""
# A libretro package is lr-<core>; 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-<name> and as <name>: each layout gets its files.
"dual_mode_cores": [m for m in standalone if m in libretro],
"launchers": extract_launchers(self._scripts),
}
+16
View File
@@ -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(
{
+12 -4
View File
@@ -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