mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-05 09:33:52 -06:00
feat: read ROCKNIX launchers from its packages
The scraper reads the start scripts and the configs each package installs at the tag the BIOS list is pinned to: configs that name a BIOS path, the yabasanshiro search, directories handed to DuckStation and the PCSX2 builds, and the ln -s commands that put bios/ where an emulator reads. A package that ships one config per device gets a device field only where the values differ, as melonDS does on AMD64.
This commit is contained in:
1 parent
a9c175d322
commit
57af8e4921
7 files changed
+1815
-4
No files matched your search
@@ -24,6 +24,8 @@ try:
|
||||
fetch_github_latest_version,
|
||||
requirement_entry,
|
||||
)
|
||||
from .rocknix_launchers import extract_launchers
|
||||
from .shell_launchers import RepoTree
|
||||
except ImportError:
|
||||
from base_scraper import (
|
||||
BaseScraper,
|
||||
@@ -31,6 +33,8 @@ except ImportError:
|
||||
fetch_github_latest_version,
|
||||
requirement_entry,
|
||||
)
|
||||
from rocknix_launchers import extract_launchers
|
||||
from shell_launchers import RepoTree
|
||||
|
||||
PLATFORM_NAME = "rocknix"
|
||||
|
||||
@@ -53,6 +57,14 @@ STANDALONE_TREE_URL = (
|
||||
)
|
||||
|
||||
|
||||
def launcher_revision(url: str) -> str:
|
||||
"""The tag or commit a rocknix-systems URL is read at."""
|
||||
found = re.search(r"/ROCKNIX/distribution/([^/]+)/projects/", url)
|
||||
if found is None:
|
||||
raise ValueError(f"{url} names no ROCKNIX/distribution revision")
|
||||
return found.group(1)
|
||||
|
||||
|
||||
def standalone_emulators(package_names: list[str]) -> list[str]:
|
||||
"""The standalone emulators ROCKNIX packages, by the names profiles use.
|
||||
|
||||
@@ -274,6 +286,10 @@ class Scraper(BaseScraper):
|
||||
# emulator as a RetroArch core.
|
||||
"dual_mode_cores": dual_mode_emulators(standalone, self._fetch_emulators_mk()),
|
||||
"systems": systems,
|
||||
# Read at the revision the BIOS list comes from.
|
||||
"launchers": extract_launchers(
|
||||
RepoTree.github(GITHUB_REPO, launcher_revision(self.url))
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user