Commit Graph
160 Commits
Author SHA1 Message Date
Abdessamad Derraz a5e025b7ee feat: transfer event splits local and network
The engine counts the bytes a copy, the pack or a resumed partial copy
supplied, and those the network brought. A transfer event carries both
after each progress event and once when the downloads end, so a screen
shows a download speed without guessing.
2026-10-23 18:23:22 +02:00
Abdessamad Derraz 28037c8b53 fix: keep the --from search on one drive
The walk no longer enters another drive mounted below the folder (it is
named instead), /proc, /sys, /dev or a Windows junction, and the root of
the system is refused. from_folder_problem() checks a folder without
reading it. A scanned event reports each folder read, cut short or not.
2026-10-23 18:15:19 +02:00
Abdessamad Derraz 2da724879b fix: name --from copies that could not be read
A file, ZIP member or folder below a --from folder that could not be
read was taken as no match. When its size is that of a file the run
still needs, or unknown, --check, --dry-run and an install now name it
with the reason, and an unreadable event carries it.
2026-10-23 18:08:49 +02:00
Abdessamad Derraz 6f541e9b8c fix: tell an unreadable copy from a locked folder
A copy that could not be read when it was copied was reported as a
folder not writable. The source is now opened first and its errors are
its own, and a download failing after it names both reasons. A run
reading a pack falls back to the pack, never to the network.
2026-10-23 18:03:05 +02:00
Abdessamad Derraz c6926e10b8 fix: index archives and sizes once in the check
A missing file walked every archive of the BIOS folder and every file of
its size: 3,000 ZIPs and 3,000 missing files took 186 s, now under 1 s.
--from copies and the owner of a refused file use the same lookups.
2026-10-23 17:59:25 +02:00
Abdessamad Derraz 339ddf2d89 feat: copy from an old card in the interface
The plan offers the folder browser, mounted cards first and ZIPs listed,
to add --from (Options adds a second one, Left takes it back), checks the
folder again and says how many files it holds and how many are left to
download. Misplaced files are counted with a Show list of their reasons,
and a local copy no longer counts in the download speed. The found event
test now holds that the interface reads it after a check and an install.
2026-10-23 16:57:28 +02:00
Abdessamad Derraz 5136c5a53a chore: merge main into the --from branch 2026-10-23 16:35:39 +02:00
Abdessamad Derraz 588a8d3350 fix: settle the interface audit findings
A stop by SIGTERM (Start+Select under gptokeyb) reads the summary like
Ctrl-C and prints the count on disk. The systems filter keeps the ticks
and the focus. The bar names what A does on the focused row. Options
check the folder again, a missing network fails in 15 s with plain words,
an unwritable folder offers another one, a folder inside a card offers
its root, and only a failure keeps its log.

New event kind: checking, with files_done and files_total, while the
files in place are hashed. The exact event lists of the check and
install runs now carry two of them, for the two files in place.
2026-10-23 16:10:09 +02:00
Abdessamad Derraz 44cdf2984b feat: copy BIOS files from a folder with --from
--from FOLDER (repeatable, a ZIP accepted) reads an old SD card, a
backup or a Downloads folder: files indexed by size, hashed only when
a size matches an entry, ZIP members included. Each file is copied,
checked again once written, and the source is never modified. Mac ._
files, system folders and links leading out of the folder are skipped.

An install also puts in place the files it finds misplaced in the BIOS
folder (bios/bios/, a pack extracted one level too deep, a name in
capitals, a ZIP never extracted, one folder up), leaving the user's
copy where it is. --check and --dry-run say what a run would copy.

Events gain one kind, found, sent before the copy, which a downloaded
event then reports. The end of the run says where each file came from.
2026-10-23 15:59:21 +02:00
Abdessamad Derraz 5a8fb2248f fix: harden the full-screen installer
Control characters from names, folders and the installer's own text
are shown as ?, on screen and in the lines left after it. The terminal
mode and the signal handlers come back even when the last write fails
or a second signal arrives. A stop from outside hands the terminal
back, the second Ctrl-C is announced, speed reads the last seconds,
values are glued to their options, and counts read before a change of
options say so.
2026-10-23 15:35:28 +02:00
Abdessamad Derraz 75743fde24 chore: merge main into the interface branch 2026-10-23 15:10:12 +02:00
Abdessamad Derraz c6fc0a3a61 feat: add full-screen installer interface
A bare install at a terminal of 40x12 or more opens a full screen that a
keyboard or a controller mapped to keys drives: setup, plan, install in
three presses, systems, regions, cores, game data, folder browser and a
dry-run preview one press away. The installer runs itself as a child with
--events for every check and install, the file list fetched once and
handed over with --manifest. --tui asks for it, --plain, RETROBIOS_PLAIN
and ACCESSIBLE keep the line questions.
2026-10-23 14:23:35 +02:00
Abdessamad Derraz 778d2d56e6 fix: give the bare platform menu its default
With nothing detected, the menu had no Enter default, while --help and
the --dest menu name RetroArch as the fallback. Its title now also says
why the question is asked.
2026-10-23 14:21:45 +02:00
Abdessamad Derraz 19b4ef5de4 fix: describe only the chosen systems in events
--system nintendo-gba wrote system events for gb, gbc and ds, each made
of the few SkyEmu files the choice kept. With systems chosen, only those
are described.
2026-10-23 14:21:24 +02:00
Abdessamad Derraz 2670b11c2b fix: count files shared by systems apart
The systems step and --list-systems gave 3do 1704 files, 349 MB, of
which 1689 are MAME hash and plugin files six systems carry. Each line
now shows the system's own files, and the shared ones beside them.
2026-10-23 14:19:18 +02:00
Abdessamad Derraz e118fd58ea fix: honour an empty NO_COLOR as unset
An empty NO_COLOR turned colour off, which no-color.org reads as unset.
FORCE_COLOR and CLICOLOR_FORCE now paint a pipe. --check with several
platforms asks which to check rather than "Install for:", and
--list-platforms says when nothing is detected here.
2026-10-23 14:15:59 +02:00
Abdessamad Derraz 75a6356959 feat: say network failures in plain words
Offline, the run printed "[Errno -2] Name or service not known". The
common failures now read as words, the raw text kept under --verbose.
A refused certificate under a clock set before the installer was written
is reported as reason clock, with the date it reads, and no trusted
certificate list on the machine as reason no_ca, naming SSL_CERT_FILE.
Neither is retried, and verification is never turned off.
2026-10-23 14:14:08 +02:00
Abdessamad Derraz 83973e1415 fix: point a declined download at the c entry
Saying no to a large download sent a beginner to --help. When the
question about what to install was asked, the line now names the c
entry, and i with its size when installed cores were found.
2026-10-23 14:10:27 +02:00
Abdessamad Derraz ebfa0cbb31 fix: say what minui and file-less cores get
--list-platforms said the MinUI layout was not written yet while
--from-pack and --dest wrote it. On the device the card root is now
found and its version.txt names the file list, and a card without one
gets the --platform and --dest to use. A core with no file of its own
says its files are the platform's, always kept, instead of 0 files.
2026-10-23 14:08:28 +02:00
Abdessamad Derraz e041fac351 feat: suggest systems by short name
--system gba, psx or ps1 was refused with no suggestion on RetroArch.
Short names now suggest the ids they stand for, never taken in their
place, and two aliases of one system name it once. --platform muos and
the other systems --list-platforms names stand for the file list they
get, and the run says which.
2026-10-23 13:55:09 +02:00
Abdessamad Derraz 41839b7784 fix: advise only a core that --core accepts
The size hint drew from every core of the system and named ares, which
loads no file of its own, so --core ares was refused. It now picks among
the names --core resolves against.
2026-10-23 13:50:54 +02:00
Abdessamad Derraz 84646d00a6 fix: read a typed folder and quit with 130
A folder typed in quotes at the BIOS folder question was used with its
quotes, and its missing parents were created without the question
--dest asks. The quotes go, ~ and variables expand on every system, and
a default folder that does not exist is named as such, not as found.
q at a menu now leaves with 130 like Ctrl+C, and Ctrl+C before anything
started no longer offers to carry on.
2026-10-23 13:50:16 +02:00
Abdessamad Derraz 69179c95de fix: count only the files a stopped run wrote
A run stopped after 8 of 118 files said 118 were installed. The count
now comes from the downloads that finished, and a refused folder writes
one downloaded event per file, as the events table says.
2026-10-23 13:30:11 +02:00
Abdessamad Derraz e7ddc9c728 fix: name a case twin the pack leaves out 2026-10-23 07:47:35 +02:00
Abdessamad Derraz 81fd98b24c fix: name save files left in the bios folder 2026-10-23 07:28:07 +02:00
Abdessamad Derraz 31614fa0e4 refactor: reuse verified hashes in check reasons 2026-10-23 07:23:36 +02:00
Abdessamad Derraz aaabea8bd5 feat: explain check refusals, install offline
--check names why each flagged file is refused and where each core
opens it, and names a pack part missing from the folder from the
markers split_pack writes. --from-pack installs from a downloaded
pack or its parts with no network request, --manifest reads a saved
file list, both checking every hash. The end of a run names the
system or core that pulls most of the download when narrowing saves
over half.
2026-10-23 07:21:46 +02:00
Abdessamad Derraz 0becfce2b5 feat: install save-dir files per system folder 2026-10-22 21:17:01 +02:00
Abdessamad Derraz 7e32db1013 feat: install save-dir files below the save dir
The installer reads savefile_directory and sort_savefiles_enable from
the retroarch.cfg it found, falls back to saves/ beside a default
system/ folder, and takes --save-dir. Entries it cannot place are said
and left out. The installer hash is re-pinned.
2026-10-22 19:58:29 +02:00
Abdessamad Derraz 3164a815bc fix: confirm the backup holder after writing
Between the check and the creation of the run folder, retrobios-backup could be swapped for a link. The holder's device and inode are confirmed unchanged once the run folder exists. Directory file descriptors would close the window entirely but do not exist on Windows; the remaining window is the instant between that confirmation and the move.
2026-10-22 14:10:30 +02:00
Abdessamad Derraz a2b98af88e fix: never reuse a backup folder of another run
When every dated name in retrobios-backup already existed, the loop ended on the last one and wrote into it. It now raises, so the next location is tried and the file stays in place if none works. A holder another user owns is refused on systems with user ids.
2026-10-22 14:09:19 +02:00
Abdessamad Derraz cdaf4f4ea1 fix: never write a backup through a link
A BIOS folder can sit on a share other people write to. A retrobios-backup that is a link is no longer written through (the backup goes inside the BIOS folder instead), run folders are created for the user only and carry a marker, and --restore only takes a folder holding that marker, walking it without following links. Beginner pages label their links to the installer page as details.
2026-10-22 14:07:13 +02:00
Abdessamad Derraz 468b5e1d3e feat: keep a replaced BIOS file beside its folder
A file in place whose contents differ (another revision, a personal
dump) was overwritten and lost. It is now moved to
retrobios-backup/<date-time>/ beside the folder written to, under the
same path, before the verified copy replaces it. Beside, not inside:
DuckStation, SwanStation and Rustation read every file of the BIOS
folder and BizHawk walks its firmware folder recursively.

Identical files are never kept. --dry-run counts what would be kept,
the summary and the summary event name the folder, files and bytes,
and --restore FOLDER puts the files back. Data trees and standalone
copies keep their replaced files the same way.
2026-10-22 14:00:00 +02:00
Abdessamad Derraz 48a9a61819 feat: let the installer skip game data
install.py --no-game-data leaves out the files and omissions the manifest
marks game data, in an install, --check and --dry-run, and names them with
their category. The --events summary gains left_out, one group per
category with every destination. A list without categories is refused.
2026-10-22 06:19:10 +02:00
Abdessamad Derraz e05844e611 chore: merge the handheld port 2026-10-22 04:12:09 +02:00
Abdessamad Derraz 841017c887 chore: merge the minui family platforms 2026-10-22 04:09:17 +02:00
Abdessamad Derraz 43bdf83973 feat: add minui, nextui and myminui platforms
minarch hands every core SDCARD_PATH/Bios/<TAG> as its system directory
and opens no file in it. The scrapers read each pak's launch.sh (core,
tag, devices), each device's core makefile (the project a library is
built from: MyMinUI's dosbox_libretro.so is dosbox-pure) and the minarch
statement, at a pinned commit. The installer recognises the card from
.system/version.txt and refuses a folder inside it.
2026-10-22 04:04:36 +02:00
Abdessamad Derraz e7edae0101 chore: merge android retroarch folder per build
# Conflicts:
#	install.ps1
#	install.sh
2026-10-22 04:00:16 +02:00
Abdessamad Derraz 259fb14954 chore: merge the amberelec, emuelec, knulli lists
AmberELEC, PAN4ELEC and EmuELEC detection now installs their own lists
at /storage/roms, the root those lists are written against; KNULLI its
own list at /userdata/bios. JELOS, KOLOS, UnofficialOS and Arch R keep
RetroArch's list with the folder their retroarch.cfg names.
2026-10-22 03:58:48 +02:00
Abdessamad Derraz 65362e628f feat: add --events output to the installer
One JSON object per line on stdout (detection, per-file and per-system
check, download progress, summary, exit code) and the usual text on
stderr, so a program driving install.py never parses prose. EVENT_KEYS
is the one schema. The installer page documents it, and a test holds the
two equal. The handheld port reads it.
2026-10-22 03:58:02 +02:00
Abdessamad Derraz 2071abf766 fix: resolve Android RetroArch folder per build
The Google Play and retroarch.com builds share com.retroarch and com.retroarch.aarch64 but build their defaults under different roots (RetroArch v1.22.2 MainMenuActivity.java:182-183). The build is told by the version code it records in retroarch.cfg, else by the folder it wrote. A Google Play folder Termux cannot write is named, as for DraStic and Flycast.
2026-10-22 03:52:19 +02:00
Abdessamad Derraz d488b14a7f feat: detect knulli, amberelec and emuelec
KNULLI keeps its markers and now installs its own list. AmberELEC is
found by NAME in os-release (its ID is coreelec), EmuELEC by ID.
2026-10-22 03:42:25 +02:00
Abdessamad Derraz 43bb0c9b29 feat: name Android BIOS folders out of reach
DraStic keeps its BIOS in its private data and Flycast in Android/data,
which Termux cannot write on Android 11 and later. An installed one is now
named with the files not copied, and a writable Flycast folder is a
standalone copy target.
2026-10-22 03:38:04 +02:00
Abdessamad Derraz 05d8f944a9 docs: cite RetroArch v1.22.2 for Android detection 2026-10-22 03:34:39 +02:00
Abdessamad Derraz 8dd463933e feat: follow a RetroDECK bios folder moved alone
RetroDECK moves each of its folders on its own and records the new place
in retrodeck.json paths (api_data_processing.sh:913-935). Only
rd_home_path was read, so files went to <home>/bios after a move.
2026-10-22 03:32:14 +02:00
Abdessamad Derraz e27a583975 feat: detect handheld systems by their own files
AmberELEC, EmuELEC, JELOS, KOLOS, UnofficialOS, ArchR, PAN4ELEC, dArkOS,
RetroOZ, spruceOS, CrossMix-OS, Onion, Allium, Koriki, MiyooCFW and plumOS
are found by what their builds write, named as they name themselves, and
installed to the system_directory of their RetroArch config, which follows
ArkOS and dArkOS to a second card. TrimUI stock, MinUI and a plumOS build
without a known folder are named and not installed to. Two unrelated
systems matching stop a run without a terminal.
2026-10-22 03:29:41 +02:00
Abdessamad Derraz ef69687fe1 fix: replay held omissions in install regions
The builder keeps a held regional fallback when the requested file is
missing (since 2026-10-17), and the comment beside the manifest's
omissions still said the opposite. A file the builder holds but the
manifest cannot download sat in omitted_files counted unheld, so the
installer kept a fallback the pack drops. Such an omission now carries
held: true and narrow() counts it held, as the builder does.
2026-10-21 11:18:53 +02:00
Abdessamad Derraz fd1d1b7b96 chore: merge round 2 fixes (pins)
# Conflicts:
#	install.ps1
#	install.sh
2026-10-21 10:31:09 +02:00
Abdessamad Derraz ce1f165d2f chore: merge round 2 fixes (tests)
# Conflicts:
#	install.ps1
#	install.py
#	install.sh
2026-10-21 10:29:19 +02:00
Abdessamad Derraz 10dc9a11ac feat: accept ISO country codes for --region
jp, us, kr and gb were aliases but au was unknown, and the first
spelling offered for it was auto, which means world. Every territory
of the region tree now answers to its ISO 3166-1 code, in the build
scripts and in the installer, whose SHA-256 is pinned again.
2026-10-21 10:12:07 +02:00