feat: add AmberELEC hardware targets

AmberELEC's metapackage adds LIBRETRO_CORES_EXTRA (bsnes, Mesen, melonDS, geolith) only on RG552, RG353 and RG503, and deletes those cores from es_systems.cfg on every other device (packages/amberelec/package.mk:23-31, 45-58 at a21975bf). The new target scraper reads the Makefile's device images, that test and es_systems.cfg the way the platform scraper does: RG351P, RG351V and RG351MP list 125 cores, the other three 136. The installer reads the device from COREELEC_DEVICE in os-release (scripts/image:168).
This commit is contained in:
Abdessamad Derraz committed 2026-11-06 09:04:51 +01:00
1 parent 8107564631
commit 43cb0f84ab
11 files changed
+1895 -18

No files matched your search

+1 -1
View File
@@ -16,7 +16,7 @@
# and Invoke-WebRequest throws on a cut transfer before the hash is read: # and Invoke-WebRequest throws on a cut transfer before the hash is read:
# the site's build rewrites this line there (scripts/sitebootstrap.py). # the site's build rewrites this line there (scripts/sitebootstrap.py).
$mismatchAdvice = "The download was most likely cut short: try again. Within minutes of an update of this project the two files can come from caches of different ages. Waiting five minutes settles that." $mismatchAdvice = "The download was most likely cut short: try again. Within minutes of an update of this project the two files can come from caches of different ages. Waiting five minutes settles that."
$defaultInstallSha256 = "34fd006cc0456c61b9a621e52f35cee6d3fd55ff14bbc6cea207ddc7bc57d858" $defaultInstallSha256 = "f90d3dc9f71f7d4b309f2a9a564907291eb694eb6f88dd651b861e54f7414e38"
$maximumInstallerBytes = 2MB $maximumInstallerBytes = 2MB
$installerExit = 0 $installerExit = 0
$installer = if ($PSScriptRoot) { Join-Path $PSScriptRoot "install.py" } else { $null } $installer = if ($PSScriptRoot) { Join-Path $PSScriptRoot "install.py" } else { $null }
+4 -1
View File
@@ -109,7 +109,7 @@ TARGETS_URL = f"{BASE_URL}/install/targets/{{platform}}.json"
# has no hardware targets, where the run sent the user after a list that # has no hardware targets, where the run sent the user after a list that
# exists nowhere. # exists nowhere.
TARGET_PLATFORMS = frozenset({ TARGET_PLATFORMS = frozenset({
"batocera", "emudeck", "knulli", "lakka", "recalbox", "retroarch", "retrobat", "amberelec", "batocera", "emudeck", "knulli", "lakka", "recalbox", "retroarch", "retrobat",
"retrodeck", "retropie", "rocknix", "romm", "retrodeck", "retropie", "rocknix", "romm",
}) })
RAW_FILE_URL = f"{BASE_URL}/{{path}}" RAW_FILE_URL = f"{BASE_URL}/{{path}}"
@@ -1472,7 +1472,10 @@ def _parse_bash_var(path: Path, key: str) -> str | None:
# /usr/share/batocera to /usr/share/knulli (knulli-linux 57afa662, # /usr/share/batocera to /usr/share/knulli (knulli-linux 57afa662,
# board/scripts/post-build-script.sh:264-278) and writes KNULLI_SYSTEM_ARCH # board/scripts/post-build-script.sh:264-278) and writes KNULLI_SYSTEM_ARCH
# to knulli.arch (package/system/knulli-system/knulli-system.mk:98-99). # to knulli.arch (package/system/knulli-system/knulli-system.mk:98-99).
# AmberELEC's scripts/image writes COREELEC_DEVICE (a21975bf, line 168), the
# DEVICE its Makefile builds (RG351P).
_BOARD_SOURCES: dict[str, tuple[str, str]] = { _BOARD_SOURCES: dict[str, tuple[str, str]] = {
"amberelec": ("os_release", "COREELEC_DEVICE"),
"batocera": ("file", "/usr/share/batocera/batocera.arch"), "batocera": ("file", "/usr/share/batocera/batocera.arch"),
"recalbox": ("file", "/recalbox/recalbox.arch"), "recalbox": ("file", "/recalbox/recalbox.arch"),
"rocknix": ("os_release", "HW_DEVICE"), "rocknix": ("os_release", "HW_DEVICE"),
+1 -1
View File
@@ -23,7 +23,7 @@ DEFAULT_INSTALL_URL="https://raw.githubusercontent.com/Abdess/retrobios/main/ins
# curl or wget stop on a cut transfer before the hash is read: the site's # curl or wget stop on a cut transfer before the hash is read: the site's
# build rewrites this line there (scripts/sitebootstrap.py). # build rewrites this line there (scripts/sitebootstrap.py).
MISMATCH_ADVICE="The download was most likely cut short: try again. Within minutes of an update of this project the two files can come from caches of different ages. Waiting five minutes settles that." MISMATCH_ADVICE="The download was most likely cut short: try again. Within minutes of an update of this project the two files can come from caches of different ages. Waiting five minutes settles that."
DEFAULT_INSTALL_SHA256="34fd006cc0456c61b9a621e52f35cee6d3fd55ff14bbc6cea207ddc7bc57d858" DEFAULT_INSTALL_SHA256="f90d3dc9f71f7d4b309f2a9a564907291eb694eb6f88dd651b861e54f7414e38"
MAX_INSTALLER_BYTES=2097152 MAX_INSTALLER_BYTES=2097152
cleanup() { cleanup() {
+8 -8
View File
@@ -27,8 +27,8 @@
{ {
"dest": "roms/ports/retrobios/install.py", "dest": "roms/ports/retrobios/install.py",
"repo_path": "install.py", "repo_path": "install.py",
"size": 1103111, "size": 1103292,
"sha256": "34fd006cc0456c61b9a621e52f35cee6d3fd55ff14bbc6cea207ddc7bc57d858", "sha256": "f90d3dc9f71f7d4b309f2a9a564907291eb694eb6f88dd651b861e54f7414e38",
"executable": false "executable": false
}, },
{ {
@@ -71,8 +71,8 @@
"muos": { "muos": {
"archive": { "archive": {
"dest": "ARCHIVE/RetroBIOS.muxapp", "dest": "ARCHIVE/RetroBIOS.muxapp",
"size": 1156738, "size": 1156919,
"sha256": "35c0920008baadca997d0f778e99ce46d702bbe3d3f0d33104d7158422b292aa" "sha256": "2efccc205141dfffc016b4ef9988e11877ef249634052835069ca1dd8921cdce"
}, },
"members": [ "members": [
{ {
@@ -92,8 +92,8 @@
{ {
"name": "RetroBIOS/install.py", "name": "RetroBIOS/install.py",
"repo_path": "install.py", "repo_path": "install.py",
"size": 1103111, "size": 1103292,
"sha256": "34fd006cc0456c61b9a621e52f35cee6d3fd55ff14bbc6cea207ddc7bc57d858", "sha256": "f90d3dc9f71f7d4b309f2a9a564907291eb694eb6f88dd651b861e54f7414e38",
"executable": false "executable": false
}, },
{ {
@@ -166,8 +166,8 @@
{ {
"dest": ".config/modules/retrobios/install.py", "dest": ".config/modules/retrobios/install.py",
"repo_path": "install.py", "repo_path": "install.py",
"size": 1103111, "size": 1103292,
"sha256": "34fd006cc0456c61b9a621e52f35cee6d3fd55ff14bbc6cea207ddc7bc57d858", "sha256": "f90d3dc9f71f7d4b309f2a9a564907291eb694eb6f88dd651b861e54f7414e38",
"executable": false "executable": false
}, },
{ {
+797
View File
@@ -0,0 +1,797 @@
{
"rg351mp": [
"81",
"AMIBERRY",
"AdvanceMame",
"DoubleCherryGB",
"HATARISA",
"OPENBOR",
"PPSSPPSDL",
"SCUMMVMSA",
"a5200",
"arduous",
"atari800",
"beetle_gba",
"beetle_lynx",
"beetle_ngp",
"beetle_pce",
"beetle_pce_fast",
"beetle_pcfx",
"beetle_supafaust",
"beetle_supergrafx",
"beetle_vb",
"beetle_wswan",
"bluemsx",
"cap32",
"crocods",
"dosbox_core",
"dosbox_pure",
"drastic",
"duckstation",
"easyrpg",
"ecwolf",
"emuscv",
"ep128emu_core",
"fake08",
"fbalpha2012",
"fbalpha2019",
"fbneo",
"fceumm",
"flycast",
"flycast2021",
"flycast2021le",
"fmsx",
"freechaf",
"freeintv",
"freej2me",
"freej2me-plus",
"fuse",
"gambatte",
"gearboy",
"gearcoleco",
"gearsystem",
"genesis_plus_gx",
"genesis_plus_gx_wide",
"gpsp",
"gw",
"gzdoom",
"handy",
"hatari",
"hypseus_singe",
"jaxe",
"lowresnx",
"lzdoom",
"mame",
"mame2000",
"mame2003_plus",
"mame2010",
"mame2015",
"mame2016",
"mgba",
"mojozork",
"mupen64plus_next",
"mupen64plussa",
"nekop2",
"neocd",
"nestopia",
"np2kai",
"o2em",
"opera",
"parallel_n64",
"pcsx_rearmed",
"pico8",
"picodrive",
"piemu",
"pokemini",
"potator",
"ppsspp",
"prboom",
"prosystem",
"puae",
"puae2021",
"px68k",
"quasi88",
"quicknes",
"race",
"raze",
"same_cdi",
"sameboy",
"sameduck",
"scummvm",
"smsplus",
"snes9x",
"snes9x2002",
"snes9x2005_plus",
"snes9x2010",
"solarus",
"stella",
"stella2014",
"swanstation",
"tgbdual",
"theodore",
"tic80",
"uae4arm",
"uw8",
"uzem",
"vba_next",
"vbam",
"vecx",
"vice_x128",
"vice_x64",
"vice_xplus4",
"vice_xvic",
"vircon32",
"virtualjaguar",
"wasm4",
"x1",
"yabasanshiroSA"
],
"rg351p": [
"81",
"AMIBERRY",
"AdvanceMame",
"DoubleCherryGB",
"HATARISA",
"OPENBOR",
"PPSSPPSDL",
"SCUMMVMSA",
"a5200",
"arduous",
"atari800",
"beetle_gba",
"beetle_lynx",
"beetle_ngp",
"beetle_pce",
"beetle_pce_fast",
"beetle_pcfx",
"beetle_supafaust",
"beetle_supergrafx",
"beetle_vb",
"beetle_wswan",
"bluemsx",
"cap32",
"crocods",
"dosbox_core",
"dosbox_pure",
"drastic",
"duckstation",
"easyrpg",
"ecwolf",
"emuscv",
"ep128emu_core",
"fake08",
"fbalpha2012",
"fbalpha2019",
"fbneo",
"fceumm",
"flycast",
"flycast2021",
"flycast2021le",
"fmsx",
"freechaf",
"freeintv",
"freej2me",
"freej2me-plus",
"fuse",
"gambatte",
"gearboy",
"gearcoleco",
"gearsystem",
"genesis_plus_gx",
"genesis_plus_gx_wide",
"gpsp",
"gw",
"gzdoom",
"handy",
"hatari",
"hypseus_singe",
"jaxe",
"lowresnx",
"lzdoom",
"mame",
"mame2000",
"mame2003_plus",
"mame2010",
"mame2015",
"mame2016",
"mgba",
"mojozork",
"mupen64plus_next",
"mupen64plussa",
"nekop2",
"neocd",
"nestopia",
"np2kai",
"o2em",
"opera",
"parallel_n64",
"pcsx_rearmed",
"pico8",
"picodrive",
"piemu",
"pokemini",
"potator",
"ppsspp",
"prboom",
"prosystem",
"puae",
"puae2021",
"px68k",
"quasi88",
"quicknes",
"race",
"raze",
"same_cdi",
"sameboy",
"sameduck",
"scummvm",
"smsplus",
"snes9x",
"snes9x2002",
"snes9x2005_plus",
"snes9x2010",
"solarus",
"stella",
"stella2014",
"swanstation",
"tgbdual",
"theodore",
"tic80",
"uae4arm",
"uw8",
"uzem",
"vba_next",
"vbam",
"vecx",
"vice_x128",
"vice_x64",
"vice_xplus4",
"vice_xvic",
"vircon32",
"virtualjaguar",
"wasm4",
"x1",
"yabasanshiroSA"
],
"rg351v": [
"81",
"AMIBERRY",
"AdvanceMame",
"DoubleCherryGB",
"HATARISA",
"OPENBOR",
"PPSSPPSDL",
"SCUMMVMSA",
"a5200",
"arduous",
"atari800",
"beetle_gba",
"beetle_lynx",
"beetle_ngp",
"beetle_pce",
"beetle_pce_fast",
"beetle_pcfx",
"beetle_supafaust",
"beetle_supergrafx",
"beetle_vb",
"beetle_wswan",
"bluemsx",
"cap32",
"crocods",
"dosbox_core",
"dosbox_pure",
"drastic",
"duckstation",
"easyrpg",
"ecwolf",
"emuscv",
"ep128emu_core",
"fake08",
"fbalpha2012",
"fbalpha2019",
"fbneo",
"fceumm",
"flycast",
"flycast2021",
"flycast2021le",
"fmsx",
"freechaf",
"freeintv",
"freej2me",
"freej2me-plus",
"fuse",
"gambatte",
"gearboy",
"gearcoleco",
"gearsystem",
"genesis_plus_gx",
"genesis_plus_gx_wide",
"gpsp",
"gw",
"gzdoom",
"handy",
"hatari",
"hypseus_singe",
"jaxe",
"lowresnx",
"lzdoom",
"mame",
"mame2000",
"mame2003_plus",
"mame2010",
"mame2015",
"mame2016",
"mgba",
"mojozork",
"mupen64plus_next",
"mupen64plussa",
"nekop2",
"neocd",
"nestopia",
"np2kai",
"o2em",
"opera",
"parallel_n64",
"pcsx_rearmed",
"pico8",
"picodrive",
"piemu",
"pokemini",
"potator",
"ppsspp",
"prboom",
"prosystem",
"puae",
"puae2021",
"px68k",
"quasi88",
"quicknes",
"race",
"raze",
"same_cdi",
"sameboy",
"sameduck",
"scummvm",
"smsplus",
"snes9x",
"snes9x2002",
"snes9x2005_plus",
"snes9x2010",
"solarus",
"stella",
"stella2014",
"swanstation",
"tgbdual",
"theodore",
"tic80",
"uae4arm",
"uw8",
"uzem",
"vba_next",
"vbam",
"vecx",
"vice_x128",
"vice_x64",
"vice_xplus4",
"vice_xvic",
"vircon32",
"virtualjaguar",
"wasm4",
"x1",
"yabasanshiroSA"
],
"rg353": [
"81",
"AMIBERRY",
"AdvanceMame",
"DoubleCherryGB",
"HATARISA",
"OPENBOR",
"PPSSPPSDL",
"SCUMMVMSA",
"a5200",
"arduous",
"atari800",
"beetle_gba",
"beetle_lynx",
"beetle_ngp",
"beetle_pce",
"beetle_pce_fast",
"beetle_pcfx",
"beetle_snes",
"beetle_supafaust",
"beetle_supergrafx",
"beetle_vb",
"beetle_wswan",
"bluemsx",
"bsnes",
"bsnes2014_balanced",
"bsnes2014_performance",
"bsnes_mercury_balanced",
"bsnes_mercury_performance",
"cap32",
"crocods",
"dosbox_core",
"dosbox_pure",
"drastic",
"duckstation",
"easyrpg",
"ecwolf",
"emuscv",
"ep128emu_core",
"fake08",
"fbalpha2012",
"fbalpha2019",
"fbneo",
"fceumm",
"flycast",
"flycast2021",
"flycast2021le",
"fmsx",
"freechaf",
"freeintv",
"freej2me",
"freej2me-plus",
"fuse",
"gambatte",
"gearboy",
"gearcoleco",
"gearsystem",
"genesis_plus_gx",
"genesis_plus_gx_wide",
"geolith",
"gpsp",
"gw",
"gzdoom",
"handy",
"hatari",
"hypseus_singe",
"jaxe",
"lowresnx",
"lzdoom",
"mame",
"mame2000",
"mame2003_plus",
"mame2010",
"mame2015",
"mame2016",
"melonds",
"melondsds",
"mesen",
"mesen-s",
"mgba",
"mojozork",
"mupen64plus_next",
"mupen64plussa",
"nekop2",
"neocd",
"nestopia",
"np2kai",
"o2em",
"opera",
"parallel_n64",
"pcsx_rearmed",
"pico8",
"picodrive",
"piemu",
"pokemini",
"potator",
"ppsspp",
"prboom",
"prosystem",
"puae",
"puae2021",
"px68k",
"quasi88",
"quicknes",
"race",
"raze",
"same_cdi",
"sameboy",
"sameduck",
"scummvm",
"smsplus",
"snes9x",
"snes9x2002",
"snes9x2005_plus",
"snes9x2010",
"solarus",
"stella",
"stella2014",
"swanstation",
"tgbdual",
"theodore",
"tic80",
"uae4arm",
"uw8",
"uzem",
"vba_next",
"vbam",
"vecx",
"vice_x128",
"vice_x64",
"vice_xplus4",
"vice_xvic",
"vircon32",
"virtualjaguar",
"wasm4",
"x1",
"yabasanshiroSA"
],
"rg503": [
"81",
"AMIBERRY",
"AdvanceMame",
"DoubleCherryGB",
"HATARISA",
"OPENBOR",
"PPSSPPSDL",
"SCUMMVMSA",
"a5200",
"arduous",
"atari800",
"beetle_gba",
"beetle_lynx",
"beetle_ngp",
"beetle_pce",
"beetle_pce_fast",
"beetle_pcfx",
"beetle_snes",
"beetle_supafaust",
"beetle_supergrafx",
"beetle_vb",
"beetle_wswan",
"bluemsx",
"bsnes",
"bsnes2014_balanced",
"bsnes2014_performance",
"bsnes_mercury_balanced",
"bsnes_mercury_performance",
"cap32",
"crocods",
"dosbox_core",
"dosbox_pure",
"drastic",
"duckstation",
"easyrpg",
"ecwolf",
"emuscv",
"ep128emu_core",
"fake08",
"fbalpha2012",
"fbalpha2019",
"fbneo",
"fceumm",
"flycast",
"flycast2021",
"flycast2021le",
"fmsx",
"freechaf",
"freeintv",
"freej2me",
"freej2me-plus",
"fuse",
"gambatte",
"gearboy",
"gearcoleco",
"gearsystem",
"genesis_plus_gx",
"genesis_plus_gx_wide",
"geolith",
"gpsp",
"gw",
"gzdoom",
"handy",
"hatari",
"hypseus_singe",
"jaxe",
"lowresnx",
"lzdoom",
"mame",
"mame2000",
"mame2003_plus",
"mame2010",
"mame2015",
"mame2016",
"melonds",
"melondsds",
"mesen",
"mesen-s",
"mgba",
"mojozork",
"mupen64plus_next",
"mupen64plussa",
"nekop2",
"neocd",
"nestopia",
"np2kai",
"o2em",
"opera",
"parallel_n64",
"pcsx_rearmed",
"pico8",
"picodrive",
"piemu",
"pokemini",
"potator",
"ppsspp",
"prboom",
"prosystem",
"puae",
"puae2021",
"px68k",
"quasi88",
"quicknes",
"race",
"raze",
"same_cdi",
"sameboy",
"sameduck",
"scummvm",
"smsplus",
"snes9x",
"snes9x2002",
"snes9x2005_plus",
"snes9x2010",
"solarus",
"stella",
"stella2014",
"swanstation",
"tgbdual",
"theodore",
"tic80",
"uae4arm",
"uw8",
"uzem",
"vba_next",
"vbam",
"vecx",
"vice_x128",
"vice_x64",
"vice_xplus4",
"vice_xvic",
"vircon32",
"virtualjaguar",
"wasm4",
"x1",
"yabasanshiroSA"
],
"rg552": [
"81",
"AMIBERRY",
"AdvanceMame",
"DoubleCherryGB",
"HATARISA",
"OPENBOR",
"PPSSPPSDL",
"SCUMMVMSA",
"a5200",
"arduous",
"atari800",
"beetle_gba",
"beetle_lynx",
"beetle_ngp",
"beetle_pce",
"beetle_pce_fast",
"beetle_pcfx",
"beetle_snes",
"beetle_supafaust",
"beetle_supergrafx",
"beetle_vb",
"beetle_wswan",
"bluemsx",
"bsnes",
"bsnes2014_balanced",
"bsnes2014_performance",
"bsnes_mercury_balanced",
"bsnes_mercury_performance",
"cap32",
"crocods",
"dosbox_core",
"dosbox_pure",
"drastic",
"duckstation",
"easyrpg",
"ecwolf",
"emuscv",
"ep128emu_core",
"fake08",
"fbalpha2012",
"fbalpha2019",
"fbneo",
"fceumm",
"flycast",
"flycast2021",
"flycast2021le",
"fmsx",
"freechaf",
"freeintv",
"freej2me",
"freej2me-plus",
"fuse",
"gambatte",
"gearboy",
"gearcoleco",
"gearsystem",
"genesis_plus_gx",
"genesis_plus_gx_wide",
"geolith",
"gpsp",
"gw",
"gzdoom",
"handy",
"hatari",
"hypseus_singe",
"jaxe",
"lowresnx",
"lzdoom",
"mame",
"mame2000",
"mame2003_plus",
"mame2010",
"mame2015",
"mame2016",
"melonds",
"melondsds",
"mesen",
"mesen-s",
"mgba",
"mojozork",
"mupen64plus_next",
"mupen64plussa",
"nekop2",
"neocd",
"nestopia",
"np2kai",
"o2em",
"opera",
"parallel_n64",
"pcsx_rearmed",
"pico8",
"picodrive",
"piemu",
"pokemini",
"potator",
"ppsspp",
"prboom",
"prosystem",
"puae",
"puae2021",
"px68k",
"quasi88",
"quicknes",
"race",
"raze",
"same_cdi",
"sameboy",
"sameduck",
"scummvm",
"smsplus",
"snes9x",
"snes9x2002",
"snes9x2005_plus",
"snes9x2010",
"solarus",
"stella",
"stella2014",
"swanstation",
"tgbdual",
"theodore",
"tic80",
"uae4arm",
"uw8",
"uzem",
"vba_next",
"vbam",
"vecx",
"vice_x128",
"vice_x64",
"vice_xplus4",
"vice_xvic",
"vircon32",
"virtualjaguar",
"wasm4",
"x1",
"yabasanshiroSA"
]
}
+2 -2
View File
@@ -868,8 +868,8 @@ platforms:
# setsettings.py leaves it: saves sit beside each game, no single place. # setsettings.py leaves it: saves sit beside each game, no single place.
save_directory: null save_directory: null
schedule: monthly schedule: monthly
target_scraper: null target_scraper: amberelec_targets
target_source: null target_source: https://github.com/AmberELEC/AmberELEC/blob/dev/packages/amberelec/package.mk
install: install:
detect: detect:
# AmberELEC 5a3882cb scripts/image:150-152, options:17. CHAos # AmberELEC 5a3882cb scripts/image:150-152, options:17. CHAos
+805
View File
@@ -0,0 +1,805 @@
platform: amberelec
source: https://github.com/AmberELEC/AmberELEC/blob/a21975bfb1a3af68f66e07a931b994b523e1e6e2/packages/amberelec/package.mk
scraped_at: '2026-11-06T07:53:33Z'
targets:
rg351mp:
architecture: aarch64
cores:
- '81'
- AMIBERRY
- AdvanceMame
- DoubleCherryGB
- HATARISA
- OPENBOR
- PPSSPPSDL
- SCUMMVMSA
- a5200
- arduous
- atari800
- beetle_gba
- beetle_lynx
- beetle_ngp
- beetle_pce
- beetle_pce_fast
- beetle_pcfx
- beetle_supafaust
- beetle_supergrafx
- beetle_vb
- beetle_wswan
- bluemsx
- cap32
- crocods
- dosbox_core
- dosbox_pure
- drastic
- duckstation
- easyrpg
- ecwolf
- emuscv
- ep128emu_core
- fake08
- fbalpha2012
- fbalpha2019
- fbneo
- fceumm
- flycast
- flycast2021
- flycast2021le
- fmsx
- freechaf
- freeintv
- freej2me
- freej2me-plus
- fuse
- gambatte
- gearboy
- gearcoleco
- gearsystem
- genesis_plus_gx
- genesis_plus_gx_wide
- gpsp
- gw
- gzdoom
- handy
- hatari
- hypseus_singe
- jaxe
- lowresnx
- lzdoom
- mame
- mame2000
- mame2003_plus
- mame2010
- mame2015
- mame2016
- mgba
- mojozork
- mupen64plus_next
- mupen64plussa
- nekop2
- neocd
- nestopia
- np2kai
- o2em
- opera
- parallel_n64
- pcsx_rearmed
- pico8
- picodrive
- piemu
- pokemini
- potator
- ppsspp
- prboom
- prosystem
- puae
- puae2021
- px68k
- quasi88
- quicknes
- race
- raze
- same_cdi
- sameboy
- sameduck
- scummvm
- smsplus
- snes9x
- snes9x2002
- snes9x2005_plus
- snes9x2010
- solarus
- stella
- stella2014
- swanstation
- tgbdual
- theodore
- tic80
- uae4arm
- uw8
- uzem
- vba_next
- vbam
- vecx
- vice_x128
- vice_x64
- vice_xplus4
- vice_xvic
- vircon32
- virtualjaguar
- wasm4
- x1
- yabasanshiroSA
rg351p:
architecture: aarch64
cores:
- '81'
- AMIBERRY
- AdvanceMame
- DoubleCherryGB
- HATARISA
- OPENBOR
- PPSSPPSDL
- SCUMMVMSA
- a5200
- arduous
- atari800
- beetle_gba
- beetle_lynx
- beetle_ngp
- beetle_pce
- beetle_pce_fast
- beetle_pcfx
- beetle_supafaust
- beetle_supergrafx
- beetle_vb
- beetle_wswan
- bluemsx
- cap32
- crocods
- dosbox_core
- dosbox_pure
- drastic
- duckstation
- easyrpg
- ecwolf
- emuscv
- ep128emu_core
- fake08
- fbalpha2012
- fbalpha2019
- fbneo
- fceumm
- flycast
- flycast2021
- flycast2021le
- fmsx
- freechaf
- freeintv
- freej2me
- freej2me-plus
- fuse
- gambatte
- gearboy
- gearcoleco
- gearsystem
- genesis_plus_gx
- genesis_plus_gx_wide
- gpsp
- gw
- gzdoom
- handy
- hatari
- hypseus_singe
- jaxe
- lowresnx
- lzdoom
- mame
- mame2000
- mame2003_plus
- mame2010
- mame2015
- mame2016
- mgba
- mojozork
- mupen64plus_next
- mupen64plussa
- nekop2
- neocd
- nestopia
- np2kai
- o2em
- opera
- parallel_n64
- pcsx_rearmed
- pico8
- picodrive
- piemu
- pokemini
- potator
- ppsspp
- prboom
- prosystem
- puae
- puae2021
- px68k
- quasi88
- quicknes
- race
- raze
- same_cdi
- sameboy
- sameduck
- scummvm
- smsplus
- snes9x
- snes9x2002
- snes9x2005_plus
- snes9x2010
- solarus
- stella
- stella2014
- swanstation
- tgbdual
- theodore
- tic80
- uae4arm
- uw8
- uzem
- vba_next
- vbam
- vecx
- vice_x128
- vice_x64
- vice_xplus4
- vice_xvic
- vircon32
- virtualjaguar
- wasm4
- x1
- yabasanshiroSA
rg351v:
architecture: aarch64
cores:
- '81'
- AMIBERRY
- AdvanceMame
- DoubleCherryGB
- HATARISA
- OPENBOR
- PPSSPPSDL
- SCUMMVMSA
- a5200
- arduous
- atari800
- beetle_gba
- beetle_lynx
- beetle_ngp
- beetle_pce
- beetle_pce_fast
- beetle_pcfx
- beetle_supafaust
- beetle_supergrafx
- beetle_vb
- beetle_wswan
- bluemsx
- cap32
- crocods
- dosbox_core
- dosbox_pure
- drastic
- duckstation
- easyrpg
- ecwolf
- emuscv
- ep128emu_core
- fake08
- fbalpha2012
- fbalpha2019
- fbneo
- fceumm
- flycast
- flycast2021
- flycast2021le
- fmsx
- freechaf
- freeintv
- freej2me
- freej2me-plus
- fuse
- gambatte
- gearboy
- gearcoleco
- gearsystem
- genesis_plus_gx
- genesis_plus_gx_wide
- gpsp
- gw
- gzdoom
- handy
- hatari
- hypseus_singe
- jaxe
- lowresnx
- lzdoom
- mame
- mame2000
- mame2003_plus
- mame2010
- mame2015
- mame2016
- mgba
- mojozork
- mupen64plus_next
- mupen64plussa
- nekop2
- neocd
- nestopia
- np2kai
- o2em
- opera
- parallel_n64
- pcsx_rearmed
- pico8
- picodrive
- piemu
- pokemini
- potator
- ppsspp
- prboom
- prosystem
- puae
- puae2021
- px68k
- quasi88
- quicknes
- race
- raze
- same_cdi
- sameboy
- sameduck
- scummvm
- smsplus
- snes9x
- snes9x2002
- snes9x2005_plus
- snes9x2010
- solarus
- stella
- stella2014
- swanstation
- tgbdual
- theodore
- tic80
- uae4arm
- uw8
- uzem
- vba_next
- vbam
- vecx
- vice_x128
- vice_x64
- vice_xplus4
- vice_xvic
- vircon32
- virtualjaguar
- wasm4
- x1
- yabasanshiroSA
rg353:
architecture: aarch64
cores:
- '81'
- AMIBERRY
- AdvanceMame
- DoubleCherryGB
- HATARISA
- OPENBOR
- PPSSPPSDL
- SCUMMVMSA
- a5200
- arduous
- atari800
- beetle_gba
- beetle_lynx
- beetle_ngp
- beetle_pce
- beetle_pce_fast
- beetle_pcfx
- beetle_snes
- beetle_supafaust
- beetle_supergrafx
- beetle_vb
- beetle_wswan
- bluemsx
- bsnes
- bsnes2014_balanced
- bsnes2014_performance
- bsnes_mercury_balanced
- bsnes_mercury_performance
- cap32
- crocods
- dosbox_core
- dosbox_pure
- drastic
- duckstation
- easyrpg
- ecwolf
- emuscv
- ep128emu_core
- fake08
- fbalpha2012
- fbalpha2019
- fbneo
- fceumm
- flycast
- flycast2021
- flycast2021le
- fmsx
- freechaf
- freeintv
- freej2me
- freej2me-plus
- fuse
- gambatte
- gearboy
- gearcoleco
- gearsystem
- genesis_plus_gx
- genesis_plus_gx_wide
- geolith
- gpsp
- gw
- gzdoom
- handy
- hatari
- hypseus_singe
- jaxe
- lowresnx
- lzdoom
- mame
- mame2000
- mame2003_plus
- mame2010
- mame2015
- mame2016
- melonds
- melondsds
- mesen
- mesen-s
- mgba
- mojozork
- mupen64plus_next
- mupen64plussa
- nekop2
- neocd
- nestopia
- np2kai
- o2em
- opera
- parallel_n64
- pcsx_rearmed
- pico8
- picodrive
- piemu
- pokemini
- potator
- ppsspp
- prboom
- prosystem
- puae
- puae2021
- px68k
- quasi88
- quicknes
- race
- raze
- same_cdi
- sameboy
- sameduck
- scummvm
- smsplus
- snes9x
- snes9x2002
- snes9x2005_plus
- snes9x2010
- solarus
- stella
- stella2014
- swanstation
- tgbdual
- theodore
- tic80
- uae4arm
- uw8
- uzem
- vba_next
- vbam
- vecx
- vice_x128
- vice_x64
- vice_xplus4
- vice_xvic
- vircon32
- virtualjaguar
- wasm4
- x1
- yabasanshiroSA
rg503:
architecture: aarch64
cores:
- '81'
- AMIBERRY
- AdvanceMame
- DoubleCherryGB
- HATARISA
- OPENBOR
- PPSSPPSDL
- SCUMMVMSA
- a5200
- arduous
- atari800
- beetle_gba
- beetle_lynx
- beetle_ngp
- beetle_pce
- beetle_pce_fast
- beetle_pcfx
- beetle_snes
- beetle_supafaust
- beetle_supergrafx
- beetle_vb
- beetle_wswan
- bluemsx
- bsnes
- bsnes2014_balanced
- bsnes2014_performance
- bsnes_mercury_balanced
- bsnes_mercury_performance
- cap32
- crocods
- dosbox_core
- dosbox_pure
- drastic
- duckstation
- easyrpg
- ecwolf
- emuscv
- ep128emu_core
- fake08
- fbalpha2012
- fbalpha2019
- fbneo
- fceumm
- flycast
- flycast2021
- flycast2021le
- fmsx
- freechaf
- freeintv
- freej2me
- freej2me-plus
- fuse
- gambatte
- gearboy
- gearcoleco
- gearsystem
- genesis_plus_gx
- genesis_plus_gx_wide
- geolith
- gpsp
- gw
- gzdoom
- handy
- hatari
- hypseus_singe
- jaxe
- lowresnx
- lzdoom
- mame
- mame2000
- mame2003_plus
- mame2010
- mame2015
- mame2016
- melonds
- melondsds
- mesen
- mesen-s
- mgba
- mojozork
- mupen64plus_next
- mupen64plussa
- nekop2
- neocd
- nestopia
- np2kai
- o2em
- opera
- parallel_n64
- pcsx_rearmed
- pico8
- picodrive
- piemu
- pokemini
- potator
- ppsspp
- prboom
- prosystem
- puae
- puae2021
- px68k
- quasi88
- quicknes
- race
- raze
- same_cdi
- sameboy
- sameduck
- scummvm
- smsplus
- snes9x
- snes9x2002
- snes9x2005_plus
- snes9x2010
- solarus
- stella
- stella2014
- swanstation
- tgbdual
- theodore
- tic80
- uae4arm
- uw8
- uzem
- vba_next
- vbam
- vecx
- vice_x128
- vice_x64
- vice_xplus4
- vice_xvic
- vircon32
- virtualjaguar
- wasm4
- x1
- yabasanshiroSA
rg552:
architecture: aarch64
cores:
- '81'
- AMIBERRY
- AdvanceMame
- DoubleCherryGB
- HATARISA
- OPENBOR
- PPSSPPSDL
- SCUMMVMSA
- a5200
- arduous
- atari800
- beetle_gba
- beetle_lynx
- beetle_ngp
- beetle_pce
- beetle_pce_fast
- beetle_pcfx
- beetle_snes
- beetle_supafaust
- beetle_supergrafx
- beetle_vb
- beetle_wswan
- bluemsx
- bsnes
- bsnes2014_balanced
- bsnes2014_performance
- bsnes_mercury_balanced
- bsnes_mercury_performance
- cap32
- crocods
- dosbox_core
- dosbox_pure
- drastic
- duckstation
- easyrpg
- ecwolf
- emuscv
- ep128emu_core
- fake08
- fbalpha2012
- fbalpha2019
- fbneo
- fceumm
- flycast
- flycast2021
- flycast2021le
- fmsx
- freechaf
- freeintv
- freej2me
- freej2me-plus
- fuse
- gambatte
- gearboy
- gearcoleco
- gearsystem
- genesis_plus_gx
- genesis_plus_gx_wide
- geolith
- gpsp
- gw
- gzdoom
- handy
- hatari
- hypseus_singe
- jaxe
- lowresnx
- lzdoom
- mame
- mame2000
- mame2003_plus
- mame2010
- mame2015
- mame2016
- melonds
- melondsds
- mesen
- mesen-s
- mgba
- mojozork
- mupen64plus_next
- mupen64plussa
- nekop2
- neocd
- nestopia
- np2kai
- o2em
- opera
- parallel_n64
- pcsx_rearmed
- pico8
- picodrive
- piemu
- pokemini
- potator
- ppsspp
- prboom
- prosystem
- puae
- puae2021
- px68k
- quasi88
- quicknes
- race
- raze
- same_cdi
- sameboy
- sameduck
- scummvm
- smsplus
- snes9x
- snes9x2002
- snes9x2005_plus
- snes9x2010
- solarus
- stella
- stella2014
- swanstation
- tgbdual
- theodore
- tic80
- uae4arm
- uw8
- uzem
- vba_next
- vbam
- vecx
- vice_x128
- vice_x64
- vice_xplus4
- vice_xvic
- vircon32
- virtualjaguar
- wasm4
- x1
- yabasanshiroSA
@@ -0,0 +1,157 @@
"""Scraper for AmberELEC per-device emulator availability.
Sources (AmberELEC/AmberELEC, at the commit platforms/amberelec.yml names):
- Makefile -- one `DEVICE=<name> ARCH=<arch> ./scripts/build_distro` target
per image (RG351P, RG351V, RG351MP, RG552, RG353, RG503 at a21975bf)
- packages/amberelec/package.mk -- LIBRETRO_CORES_EXTRA joins PKG_EMUS
only on the devices its `if` names (lines 23-31 at a21975bf: RG552,
RG353, RG503), and on every other device makeinstall_target deletes
each of those cores from es_systems.cfg (lines 45-58)
- packages/ui/emulationstation/config/es_systems.cfg -- read the way the
platform scraper reads it, after that deletion
An RG351P image carries neither melonDS nor bsnes: without a target list,
its pack shipped the Nintendo DS firmware anyway.
"""
from __future__ import annotations
import argparse
import re
import sys
from datetime import datetime, timezone
import yaml
from . import BaseTargetScraper
PLATFORM_NAME = "amberelec"
RAW_BASE = "https://raw.githubusercontent.com/AmberELEC/AmberELEC/{ref}"
META_MK = "packages/amberelec/package.mk"
try:
from ..amberelec_scraper import BUILDS_OF, ES_SYSTEMS_TEMPLATE, RUNNERS
from ..base_scraper import fetch_bytes
from ..batocera_scraper import _not_cores
from ..es_emulators import es_cores, xml_systems
except ImportError:
from scraper.amberelec_scraper import BUILDS_OF, ES_SYSTEMS_TEMPLATE, RUNNERS
from scraper.base_scraper import fetch_bytes
from scraper.batocera_scraper import _not_cores
from scraper.es_emulators import es_cores, xml_systems
_DEVICE_RE = re.compile(
r"^(\w+):\n\tDEVICE=(\w+) ARCH=(\w+) \./scripts/build_distro$", re.MULTILINE
)
_EXTRA_RE = re.compile(r'LIBRETRO_CORES_EXTRA="([^"]*)"')
# The `if` whose body adds the extra cores to PKG_EMUS.
_EXTRA_IF_RE = re.compile(
r"if \[\[ (?P<test>[^\n]*?) \]\]; then\s*\n\s*PKG_EMUS\+=\" \$\{LIBRETRO_CORES_EXTRA\}\""
)
# What makeinstall_target does to es_systems.cfg on the other devices.
_REMOVAL_LINES = (
"for CORE in ${LIBRETRO_CORES_EXTRA}; do",
'sed -i "s|<core>$CORE</core>||g"',
r"sed -i -e '/<emulator name/{:a;N;/<\/emulator>/!ba;/melonds/d}'",
)
_EMULATOR_BLOCK_RE = re.compile(r"[^\n]*<emulator name.*?</emulator>[^\n]*\n?", re.DOTALL)
def devices(makefile: str) -> dict[str, str]:
"""{device: architecture} of each image the Makefile builds."""
found = {device: arch for target, device, arch in _DEVICE_RE.findall(makefile)
if target == device}
if not found:
raise RuntimeError("the AmberELEC Makefile builds no device image")
return found
def extra_cores(package_mk: str) -> tuple[list[str], set[str]]:
"""(the extra cores, the devices that keep them) from the metapackage."""
listed = _EXTRA_RE.search(package_mk)
test = _EXTRA_IF_RE.search(package_mk)
if listed is None or test is None:
raise RuntimeError(f"{META_MK}: no LIBRETRO_CORES_EXTRA or no test adding it")
missing = [line for line in _REMOVAL_LINES if line not in package_mk]
if missing:
raise RuntimeError(f"{META_MK}: makeinstall_target no longer reads {missing[0]!r}")
keep = set(re.findall(r'"\$\{DEVICE\}" == "(\w+)"', test.group("test")))
for alternatives in re.findall(r'"\$\{DEVICE\}" =~ \^\(([\w|]+)\)\$', test.group("test")):
keep.update(alternatives.split("|"))
if not keep:
raise RuntimeError(f"{META_MK}: the test adding the extra cores names no device")
return listed.group(1).split(), keep
def without_cores(es_systems: str, cores: list[str]) -> str:
"""es_systems.cfg as makeinstall_target leaves it on a device without them."""
for core in cores:
if core == "melonds":
es_systems = _EMULATOR_BLOCK_RE.sub(
lambda block: "" if "melonds" in block.group(0) else block.group(0),
es_systems,
)
es_systems = es_systems.replace(f"<core>{core}</core>", "")
return es_systems
def device_cores(es_systems: str, extra: list[str], keeps_extra: bool) -> list[str]:
"""Every core and standalone emulator one device's es_systems.cfg offers."""
text = es_systems if keeps_extra else without_cores(es_systems, extra)
cores, _standalone, _dual = es_cores(
xml_systems(text), RUNNERS, BUILDS_OF, _not_cores(PLATFORM_NAME)
)
return sorted(set(cores))
class Scraper(BaseTargetScraper):
"""Per-device core lists from AmberELEC's metapackage."""
def __init__(self, url: str = "https://github.com/AmberELEC/AmberELEC") -> None:
super().__init__(url=url)
self.ref = ""
def _raw(self, path: str) -> str:
return fetch_bytes(f"{RAW_BASE.format(ref=self.ref)}/{path}").decode("utf-8")
def fetch_targets(self) -> dict:
self.ref = self.pinned_revision(PLATFORM_NAME)
extra, keep = extra_cores(self._raw(META_MK))
es_systems = fetch_bytes(ES_SYSTEMS_TEMPLATE.format(ref=self.ref)).decode("utf-8")
targets: dict[str, dict] = {}
for device, arch in sorted(devices(self._raw("Makefile")).items()):
cores = device_cores(es_systems, extra, device in keep)
targets[device.lower()] = {"architecture": arch, "cores": cores}
print(f" {device.lower()} ({arch}): {len(cores)} cores", file=sys.stderr)
return {
"platform": PLATFORM_NAME,
"source": f"{self.url}/blob/{self.ref}/{META_MK}",
"scraped_at": datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ"),
"targets": targets,
}
def main() -> None:
parser = argparse.ArgumentParser(
allow_abbrev=False, description="Scrape AmberELEC per-device cores"
)
parser.add_argument("--dry-run", action="store_true", help="Show target summary")
parser.add_argument("--output", "-o", help="Output YAML file")
args = parser.parse_args()
scraper = Scraper()
data = scraper.fetch_targets()
if args.dry_run:
for name, info in data["targets"].items():
print(f" {name} ({info['architecture']}): {len(info['cores'])} cores")
return
if args.output:
scraper.write_output(data, args.output)
print(f"Written to {args.output}")
return
print(yaml.dump(data, default_flow_style=False, sort_keys=False))
if __name__ == "__main__":
main()
+102
View File
@@ -0,0 +1,102 @@
"""AmberELEC's images differ by device, and only its metapackage says how.
packages/amberelec/package.mk adds LIBRETRO_CORES_EXTRA (melonDS, bsnes,
Mesen, geolith) on RG552, RG353 and RG503 and deletes those cores from
es_systems.cfg everywhere else. With no target list, an RG351P pack carried
the firmware of cores its image never had.
"""
from __future__ import annotations
import sys
import unittest
from pathlib import Path
REPO_ROOT = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(REPO_ROOT / "scripts"))
from scraper.targets import amberelec_targets_scraper as scraper # noqa: E402
MAKEFILE = """RG351P:
\tDEVICE=RG351P ARCH=aarch64 ./scripts/build_distro
RG552:
\tDEVICE=RG552 ARCH=aarch64 ./scripts/build_distro
toolchain-RK3326:
\tDEVICE=RK3326 ARCH=aarch64 ./scripts/build toolchain
"""
PACKAGE_MK = """ LIBRETRO_CORES_EXTRA="bsnes melonds"
PKG_EMUS="${LIBRETRO_CORES}"
if [[ "${DEVICE}" == "RG552" || "${DEVICE}" =~ ^(RG353|RG503)$ ]]; then
PKG_EMUS+=" ${LIBRETRO_CORES_EXTRA}"
fi
makeinstall_target() {
for CORE in ${LIBRETRO_CORES_EXTRA}; do
if [[ $CORE == "melonds" ]]; then
sed -i -e '/<emulator name/{:a;N;/<\\/emulator>/!ba;/melonds/d}' es_systems.cfg
fi
sed -i "s|<core>$CORE</core>||g" es_systems.cfg
done
}
"""
ES_SYSTEMS = """<systemList>
<system>
<name>snes</name>
<emulators>
<emulator name="retroarch">
<cores>
<core default="true">snes9x</core>
<core>bsnes</core>
</cores>
</emulator>
</emulators>
</system>
<system>
<name>nds</name>
<emulators>
<emulator name="retroarch">
<cores>
<core>melonds</core>
</cores>
</emulator>
<emulator name="drastic">
<cores>
<core default="true">drastic</core>
</cores>
</emulator>
</emulators>
</system>
</systemList>
"""
class TheMetapackageDecidesEachDevice(unittest.TestCase):
def test_devices_are_the_images_the_makefile_builds(self):
self.assertEqual(scraper.devices(MAKEFILE), {"RG351P": "aarch64", "RG552": "aarch64"})
def test_the_extra_cores_and_their_devices(self):
extra, keep = scraper.extra_cores(PACKAGE_MK)
self.assertEqual(extra, ["bsnes", "melonds"])
self.assertEqual(keep, {"RG552", "RG353", "RG503"})
def test_a_device_without_them_loses_their_cores(self):
extra, _keep = scraper.extra_cores(PACKAGE_MK)
full = scraper.device_cores(ES_SYSTEMS, extra, True)
lean = scraper.device_cores(ES_SYSTEMS, extra, False)
self.assertEqual(set(full) - set(lean), {"bsnes", "melonds"})
self.assertIn("drastic", lean)
def test_a_changed_removal_stops_the_scrape(self):
changed = PACKAGE_MK.replace('sed -i "s|<core>$CORE</core>||g"', "true")
with self.assertRaises(RuntimeError):
scraper.extra_cores(changed)
if __name__ == "__main__":
unittest.main()
+17 -5
View File
@@ -3420,7 +3420,8 @@ class ACardPreparedOnAComputerGetsItsBoard(unittest.TestCase):
class APlatformWithoutTargetsSaysSoOffline(unittest.TestCase): class APlatformWithoutTargetsSaysSoOffline(unittest.TestCase):
"""Offline, --target on AmberELEC asked for install/targets/amberelec.json, """Offline, --target on AmberELEC asked for install/targets/amberelec.json,
which exists nowhere: online the same run says it has no targets.""" which existed nowhere: online the same run said it had no targets.
EmuELEC has none still."""
def test_the_list_matches_the_published_targets(self): def test_the_list_matches_the_published_targets(self):
published = {path.stem for path in (REPO_ROOT / "install" / "targets").glob("*.json")} published = {path.stem for path in (REPO_ROOT / "install" / "targets").glob("*.json")}
@@ -3428,16 +3429,16 @@ class APlatformWithoutTargetsSaysSoOffline(unittest.TestCase):
def test_offline_says_there_are_no_targets(self): def test_offline_says_there_are_no_targets(self):
dest = Path(_tempdir(self)) dest = Path(_tempdir(self))
for extra in ([], ["--manifest", str(REPO_ROOT / "install" / "amberelec.json")]): for extra in ([], ["--manifest", str(REPO_ROOT / "install" / "emuelec.json")]):
with self.subTest(manifest=bool(extra)): with self.subTest(manifest=bool(extra)):
proc = subprocess.run( proc = subprocess.run(
[sys.executable, str(REPO_ROOT / "install.py"), "--platform", "amberelec", [sys.executable, str(REPO_ROOT / "install.py"), "--platform", "emuelec",
"--dest", str(dest), "--target", "rk3326", "--offline", "--no-input", "--dest", str(dest), "--target", "rk3326", "--offline", "--no-input",
"--dry-run", *extra], "--dry-run", *extra],
capture_output=True, text=True, timeout=120, stdin=subprocess.DEVNULL) capture_output=True, text=True, timeout=120, stdin=subprocess.DEVNULL)
self.assertEqual(proc.returncode, 2, proc.stderr) self.assertEqual(proc.returncode, 2, proc.stderr)
self.assertIn("AmberELEC has no hardware targets", proc.stderr) self.assertIn("EmuELEC has no hardware targets", proc.stderr)
self.assertNotIn("targets/amberelec.json", proc.stderr) self.assertNotIn("targets/emuelec.json", proc.stderr)
class TheBoardTheSystemNamesIsTheTarget(unittest.TestCase): class TheBoardTheSystemNamesIsTheTarget(unittest.TestCase):
@@ -3492,6 +3493,17 @@ class TheBoardTheSystemNamesIsTheTarget(unittest.TestCase):
.read_text(encoding="utf-8")) .read_text(encoding="utf-8"))
self.assertLessEqual({*install._RPI_MODELS.values(), "x86_64"}, set(targets)) self.assertLessEqual({*install._RPI_MODELS.values(), "x86_64"}, set(targets))
def test_amberelec_names_its_device(self):
# An RG351P image carries no melonDS or bsnes, and the full list was
# installed: AmberELEC had no target list to read the device against.
with unittest.mock.patch.object(
install, "_parse_os_release", return_value={"COREELEC_DEVICE": "RG351P"}
):
self.assertEqual(install.detect_board("amberelec"), "rg351p")
targets = json.loads((REPO_ROOT / "install" / "targets" / "amberelec.json")
.read_text(encoding="utf-8"))
self.assertIn("rg351p", targets)
def test_lakka_names_its_device_or_its_project(self): def test_lakka_names_its_device_or_its_project(self):
# An RPi4 Lakka installed 5.7 GB of every board's files: its board # An RPi4 Lakka installed 5.7 GB of every board's files: its board
# was in os-release and never read. # was in os-release and never read.
+1
View File
@@ -1701,6 +1701,7 @@ Located in `scripts/scraper/targets/`. Each inherits `BaseTargetScraper` and imp
| `knulli_targets_scraper` | the same, read from KNULLI's tree and Buildroot fork | board | | `knulli_targets_scraper` | the same, read from KNULLI's tree and Buildroot fork | board |
| `recalbox_targets_scraper` | board defconfigs + system.ini cores | board | | `recalbox_targets_scraper` | board defconfigs + system.ini cores | board |
| `rocknix_targets_scraper` | emulators package.mk + device options | device | | `rocknix_targets_scraper` | emulators package.mk + device options | device |
| `amberelec_targets_scraper` | Makefile devices + metapackage extra cores + es_systems.cfg | device |
| `lakka_targets_scraper` | libretro_cores package.mk + project and device options | device image | | `lakka_targets_scraper` | libretro_cores package.mk + project and device options | device image |
| `emudeck_targets_scraper` | EmuScripts (SteamOS and Windows) | operating system | | `emudeck_targets_scraper` | EmuScripts (SteamOS and Windows) | operating system |
| `retropie_targets_scraper` | scriptmodules + rp_module_flags | platform flag | | `retropie_targets_scraper` | scriptmodules + rp_module_flags | platform flag |