mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-20 18:59:07 -05:00
feat: install one emulator's files in one command
install.py --emulator NAME keeps what the named emulators read on the detected platform: their own files and the platform's files of the systems they run, as a pack built for them carries, without the systems no core is mapped to. Each emulator page now gives that command for Linux, macOS and Windows, beside the per-file links.
This commit is contained in:
1 parent
7c94a58825
commit
e424a35aee
7 files changed
+141
-2
No files matched your search
@@ -2969,6 +2969,37 @@ def _render_metadata_rows(profile: dict) -> list[str]:
|
||||
return lines
|
||||
|
||||
|
||||
def _install_block(name: str, profile: dict) -> list[str]:
|
||||
"""One command that installs this emulator's files where it reads them.
|
||||
|
||||
The installer finds the platform and its BIOS folder, then keeps what
|
||||
this emulator reads there: its own files and the platform's files of
|
||||
the systems it runs. Each file is also linked one by one below.
|
||||
"""
|
||||
if profile.get("type") in ("alias", "launcher", "test"):
|
||||
return []
|
||||
base = "https://raw.githubusercontent.com/Abdess/retrobios/main"
|
||||
return [
|
||||
'??? tip "Install this emulator\'s files"',
|
||||
"",
|
||||
" The installer finds your platform and its BIOS folder, then downloads "
|
||||
"only the files this emulator reads there and checks each one.",
|
||||
"",
|
||||
" Linux, macOS, Steam Deck:",
|
||||
"",
|
||||
" ```sh",
|
||||
f" curl -fsSL {base}/install.sh | sh -s -- --emulator {name}",
|
||||
" ```",
|
||||
"",
|
||||
" Windows (PowerShell):",
|
||||
"",
|
||||
" ```powershell",
|
||||
f" &([scriptblock]::Create((irm {base}/install.ps1))) --emulator {name}",
|
||||
" ```",
|
||||
"",
|
||||
]
|
||||
|
||||
|
||||
def _render_platform_details(profile: dict) -> list[str]:
|
||||
"""The per-platform block, one level of nesting deep."""
|
||||
lines: list[str] = []
|
||||
@@ -3287,6 +3318,8 @@ def generate_emulator_page(
|
||||
lines.append("</div>")
|
||||
lines.append("")
|
||||
|
||||
lines.extend(_install_block(name, profile))
|
||||
|
||||
lines.extend(_render_platform_details(profile))
|
||||
|
||||
lines.extend(_render_structured_blocks(profile))
|
||||
|
||||
Reference in new issue
Block a user