From 64abc4e61a898fdb1888d631f0dc0525368a1fdd Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Sat, 24 Oct 2026 00:36:40 +0200 Subject: [PATCH] docs: give each system its retroarch folder --- scripts/sitediagrams.py | 18 ++++++++++++++---- wiki/troubleshooting.md | 12 +++++++++--- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/scripts/sitediagrams.py b/scripts/sitediagrams.py index 1145102a..e6ae558c 100644 --- a/scripts/sitediagrams.py +++ b/scripts/sitediagrams.py @@ -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[ \t]*)[ \t]*\n" + r"(?m)^(?P[ \t]*)[ \t]*\n" r"(?P=indent)```(?:sh|bash)[^\n]*\n(?P.*?)\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 `` as Windows, macOS, - Linux and Steam Deck tabs. `` gives the - Windows tab its own options, for a path written another way there.""" + Linux and Steam Deck tabs. `` + 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") diff --git a/wiki/troubleshooting.md b/wiki/troubleshooting.md index d90b2ef0..d990e4eb 100644 --- a/wiki/troubleshooting.md +++ b/wiki/troubleshooting.md @@ -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**. - + + + ```sh curl -fsSL https://raw.githubusercontent.com/Abdess/retrobios/main/install.sh | sh -s -- --platform retroarch --dest ~/.config/retroarch/system ```