From bc9179078437c2dd2065e01de1a240bc06ed8598 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Sun, 18 Oct 2026 15:08:25 +0200 Subject: [PATCH] docs: describe detection as the installer does it --- tests/test_install.py | 17 +++++++++++++++++ wiki/installer.md | 35 +++++++++++++++++++++++++++-------- 2 files changed, 44 insertions(+), 8 deletions(-) diff --git a/tests/test_install.py b/tests/test_install.py index 69465447..1906d7e1 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -2362,5 +2362,22 @@ class StandaloneCopiesReachFlatpakInstalls(unittest.TestCase): self.assertNotIn("$HOME/.local/share/azahar/sysdata", linux) + +class TheInstallerPageNamesEveryEvidence(unittest.TestCase): + """The page said BizHawk, RetroBat, RomM and RetroPie had no detection + and fell back to ~/bios, while install.py found each by its directory.""" + + def test_every_rule_is_on_the_page(self): + page = (REPO_ROOT / "wiki" / "installer.md").read_text(encoding="utf-8") + page = page.replace("\\\\", "\\") + expected = [path for _p, method, values, _b in install._EMBEDDED_RULES + if method == "file_exists" for path in values] + expected += [path.replace("$HOME", "~").rstrip("/") + for _os, _p, path, _b in install._PATH_RULES] + missing = [path for path in expected if path not in page] + self.assertEqual(missing, []) + self.assertNotIn("have no detection", page) + + if __name__ == "__main__": unittest.main() diff --git a/wiki/installer.md b/wiki/installer.md index c3330386..92134d85 100644 --- a/wiki/installer.md +++ b/wiki/installer.md @@ -258,7 +258,6 @@ wins, since a machine is only one of them. | Evidence | Platform | BIOS directory | |----------|----------|----------------| | `/etc/os-release` `ID=rocknix` | ROCKNIX | `/storage/roms/bios` | -| `/media/fat/MiSTer` | MiSTer FPGA | `/media/fat/games` | | `/etc/knulli-release` | Batocera | `/userdata/bios` | | `/etc/os-release` `ID=lakka` | Lakka | `/storage/system` | | `/etc/batocera-version` | Batocera | `/userdata/bios` | @@ -267,6 +266,24 @@ wins, since a machine is only one of them. | `/home/ark` and `/opt/system` | RetroArch | `/roms/bios` | | `/mnt/vendor/bin/dmenu.bin` | RetroArch | `/mnt/mmc/bios` | +Batocera, Recalbox and ROCKNIX also name the board they were built for, and +that board narrows the install unless `--target` or `--every-board` says +otherwise (see the options above). + +Some platforms keep their BIOS in a fixed directory, and that directory is the +evidence. They are looked for after the configurations below, for a platform +not already found that way. + +| Evidence | Platform | BIOS directory | +|----------|----------|----------------| +| `/media/fat/MiSTer` | MiSTer FPGA | `/media/fat/games` | +| `C:\RetroBat\bios` or `%USERPROFILE%\RetroBat\bios` | RetroBat | the same | +| `~/Emulation/bios` | EmuDeck | the same | +| `~/.var/app/net.retrodeck.retrodeck` | RetroDECK | `~/retrodeck` | +| `/romm/library/bios` | RomM | the same | +| `~/RetroPie/BIOS` | RetroPie | the same | +| `%USERPROFILE%\BizHawk\Firmware` or `~/.config/BizHawk/Firmware` | BizHawk | the same | + Desktop installs are read from their own configuration, and several can be found on one machine. @@ -309,13 +326,15 @@ they reference emulators rather than owning a BIOS directory. ES-DE is looked up at `$ESDE_APPDATA_DIR` or `~/ES-DE`, the two locations its own `getAppDataDirectory` resolves. -BizHawk, RetroBat, RomM and RetroPie have no detection and are selected with -`--platform`. When a forced platform is not found on the machine, the -destination falls back to `/userdata/bios` for Batocera, `/recalbox/share/bios` -for Recalbox, `/storage/system` for Lakka, `~/retrodeck` for RetroDECK, -`~/Emulation/bios` for EmuDeck, `/storage/roms/bios` for ROCKNIX, -`/media/fat/games` for MiSTer, `~/RetroPie/BIOS` for RetroPie, and `~/bios` -for anything else. On Android a forced `--platform retroarch` falls back to +When a platform named with `--platform` is not found on the machine, the +destination falls back to the directory its detection looks for: +`/userdata/bios` for Batocera, `/recalbox/share/bios` for Recalbox, +`/storage/system` for Lakka, `~/retrodeck` for RetroDECK, `~/Emulation/bios` +for EmuDeck, `/storage/roms/bios` for ROCKNIX, `/media/fat/games` for MiSTer, +`~/RetroPie/BIOS` for RetroPie, `/romm/library/bios` for RomM, +`C:\RetroBat\bios` for RetroBat, `%USERPROFILE%\BizHawk\Firmware` (Windows) +or `~/.config/BizHawk/Firmware` for BizHawk, and RetroArch's own default +system directory for RetroArch. On Android a forced `--platform retroarch` falls back to `/RetroArch/system` instead, a home directory there belonging to Termux rather than to the frontend. Pass `--dest` to say where instead of relying on that.