mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-24 12:49:03 -05:00
Each OS publishes Batocera's systems dict (knulli-systems, and batocera-systems at AmberELEC's newest prerelease commit and EmuELEC v4.8), read with the shared parser. Cores come from each OS's own ES list. AmberELEC and EmuELEC declare neogeo/ and ports/ beside bios/ from /storage/roms, so their packs extract there and core_destination puts core files under bios/.
47 lines
1.4 KiB
Python
47 lines
1.4 KiB
Python
"""Exporter for AmberELEC's batocera-systems.
|
|
|
|
Batocera's script shape, so only the systems dict is rewritten. Two things
|
|
differ. Paths are relative to /storage/roms, where the list also names
|
|
neogeo/ beside bios/, and our destinations start there too. No entry carries
|
|
an emulator or core gate: coreExists() lets an ungated item through for
|
|
every build, and an addition is written the same way.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from .base_exporter import BaseExporter
|
|
from .baseline import NativeFile
|
|
from .batocera_exporter import Exporter as BatoceraExporter
|
|
|
|
SOURCE_URL = (
|
|
"https://raw.githubusercontent.com/AmberELEC/AmberELEC/dev"
|
|
"/packages/amberelec/sources/scripts/batocera-systems"
|
|
)
|
|
|
|
|
|
class Exporter(BatoceraExporter):
|
|
"""Write AmberELEC's batocera-systems, corrected."""
|
|
|
|
PATH_PREFIX = ""
|
|
|
|
@classmethod
|
|
def writable(cls, fe: NativeFile, require: str = "") -> bool:
|
|
# The list gates nothing on a runner, so an addition needs none.
|
|
return BaseExporter.writable.__func__(cls, fe, require)
|
|
|
|
def _addition_keys(self, fe: NativeFile) -> list[tuple[str, str | None]] | None:
|
|
return []
|
|
|
|
@staticmethod
|
|
def platform_name() -> str:
|
|
return "amberelec"
|
|
|
|
@staticmethod
|
|
def file_modes() -> dict[str, int]:
|
|
# 100755 at a21975bf (git/trees).
|
|
return {"batocera-systems": 0o755}
|
|
|
|
@staticmethod
|
|
def native_sources() -> dict[str, str]:
|
|
return {"batocera-systems": SOURCE_URL}
|