docs: give each system its retroarch folder

This commit is contained in:
Abdessamad Derraz committed 2026-10-24 01:01:07 +02:00
1 parent 699f007cf0
commit 64abc4e61a
2 files changed
+23 -7

No files matched your search

+14 -4
View File
@@ -739,11 +739,12 @@ def localize_images(markdown: str, page: Path) -> str:
# system, the Windows form written by the same function as the setup pages'.
OS_TABS = re.compile(
r"(?m)^(?P<indent>[ \t]*)<!--\s*os-tabs(?:\s+windows:\s*(?P<windows>.*?))?\s*-->[ \t]*\n"
r"(?m)^(?P<indent>[ \t]*)<!--\s*os-tabs(?P<own>(?:\s+[^\n]*?)?)\s*-->[ \t]*\n"
r"(?P=indent)```(?:sh|bash)[^\n]*\n(?P<body>.*?)\n(?P=indent)```[ \t]*$",
re.S,
)
OS_TAB_KEYS = ("windows", "macos", "linux", "steamdeck")
_OWN_ARGS = re.compile(r"(?:^|\s)(" + "|".join(OS_TAB_KEYS) + r"):\s*")
FENCE_TITLES = {"sh": "Terminal", "powershell": "PowerShell"}
@@ -758,10 +759,18 @@ def _installer_args(body: str) -> str:
return match.group(1) or ""
def _own_args(text: str) -> dict[str, str]:
"""`windows: ARGS macos: ARGS` -> the options each named tab uses."""
parts = _OWN_ARGS.split(text.strip())
if parts[0].strip():
raise ValueError(f"an os-tabs marker names no system: {text.strip()!r}")
return {key: value.strip() for key, value in zip(parts[1::2], parts[2::2])}
def expand_commands(markdown: str) -> str:
"""Each install command marked `<!-- os-tabs -->` as Windows, macOS,
Linux and Steam Deck tabs. `<!-- os-tabs windows: ARGS -->` gives the
Windows tab its own options, for a path written another way there."""
Linux and Steam Deck tabs. `<!-- os-tabs windows: ARGS macos: ARGS -->`
gives a tab its own options, for a folder that differs there."""
if "os-tabs" not in markdown:
return markdown
from siteguides import TERMINALS, install_command
@@ -769,10 +778,11 @@ def expand_commands(markdown: str) -> str:
def replace(match: re.Match[str]) -> str:
indent = match.group("indent")
args = _installer_args(match.group("body"))
own_args = _own_args(match.group("own"))
items = []
for key in OS_TAB_KEYS:
label, _how, shell = TERMINALS[key]
own = match.group("windows") if key == "windows" and match.group("windows") else args
own = own_args.get(key) or args
items.append((label, [f'```{shell} title="{FENCE_TITLES[shell]}"',
install_command(shell, own), "```"]))
return "\n".join(markup.tabs(items, indent)).rstrip("\n")
+9 -3
View File
@@ -1,7 +1,7 @@
---
level: start
order: 40
terms: bios not found, bios missing, firmware missing, bios error
terms: bios not found, bios missing, firmware missing, bios error, check my bios folder, check bios folder
---
# When a game does not start
@@ -76,9 +76,15 @@ version.
- **Network error:** try again later.
- **`The clock reads ...`:** set the right date.
- **Permission denied:** do what the message says.
- **No setup found:** name it and its folder:
- **`No supported platform detected`:** name your setup and its folder.
Not sure of the folder? In RetroArch, open **Settings > Directory >
System/BIOS**.
<!-- os-tabs windows: --platform retroarch --dest C:\path\to\RetroArch\system -->
<!-- The folders RetroArch reads by default, as install.py writes them
(_os_default_dests, _macos_retroarch_base) and the RetroArch setup page
cites them. Steam Deck: the Flatpak build. -->
<!-- os-tabs windows: --platform retroarch --dest C:\RetroArch-Win64\system macos: --platform retroarch --dest ~/Documents/RetroArch/system steamdeck: --platform retroarch --dest ~/.var/app/org.libretro.RetroArch/config/retroarch/system -->
```sh
curl -fsSL https://raw.githubusercontent.com/Abdess/retrobios/main/install.sh | sh -s -- --platform retroarch --dest ~/.config/retroarch/system
```