Commit Graph
464 Commits
Author SHA1 Message Date
Abdessamad Derraz f10fa21d17 docs: split clause semicolons in new comments 2026-11-21 06:45:11 +01:00
Abdessamad Derraz ec50bf6b41 fix: say why a local list beside --manifest fails
An oversized or unreadable standalone layout said "not valid: Expecting
value", and an unreadable target list read as absent, so the offline
run asked for the file already there. One reader of a capped local JSON
file now says the cause: unreadable, too large or not JSON.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz 8d2f71b026 fix: say why no list is found on the screen too
With RETROBIOS_REF on a tag that has no list, line mode named the
variable and the way out. The screen said only that there is no list at
this address, and gave no advice with the default revision either. Both
now read the same advice.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz 68378b4423 refactor: join names and date records in one place
Five sentences joined names by hand beside _names_and, the plan counted
"more systems" beside _plural, a record stamped its time beside
_record_now, and the record day and the backup day each formatted a
date. Each now calls the one helper.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz f412f7803d chore: keep two blank lines after part names 2026-11-21 06:04:39 +01:00
Abdessamad Derraz 8ecd102c77 refactor: name the listing options once
Eight places tested the five --list-* options by hand, and four lists
named them. One table and one function now say which a run gave, so a
sixth listing is one line.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz 9a27d0b574 refactor: name pack parts in one module
The part and marker names of a split pack were built and matched in
both the pack reader and the pack writer. The reader owns them now,
both patterns built from one.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz b338d94fa0 fix: record no narrowing axis for an older list
A list with cores and neither systems nor regions is from an older
release, and recorded_axes reads none from it. A pack built here or by
generate_pack wrote cores and regions in its manifest. The installer
pack now asks recorded_axes, and the builder follows the same rule.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz 7284a90a20 refactor: fold removal dests through one helper
Seven places in the removal compared a destination casefolded where the
drive folds case, three of them as closures of their own. One function
does it, so every comparison folds the same way.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz 8c74f3f0bc fix: read a typed folder the same in both modes
Line mode dropped quotes only when both ends had one, so a half-selected
paste made a folder whose name starts with a quote. The screen's reader
is now the only one: any quote at either end goes, variables expand
before ~.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz ee2e6e80ce refactor: list the copies of an entry in one place
Nine places listed an entry with its alternatives and slot choices by
hand. The known core names read only the alternatives, so a core named
by a slot choice alone would have counted as unknown.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz 7b89a558ff fix: ask folder questions through one reader
The copy question, the card question and the BIOS folder question each
read q, Enter, a listed number or a folder. With no drive listed, the
copy question took "2" as the folder ./2. They share one reader now,
and the y/N questions read only y or yes: "yeah" created folders.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz 1f215f1732 refactor: read mountinfo through one helper
The card checks and the FAT32 test each read /proc/self/mountinfo and
decoded its escaped mount point. One function reads the table and one
decodes a mount point.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz 2502d96734 refactor: count files read with one live counter
The check of files on disk and the read of a card's games each drew
their own "read N/M" line and progress events. Both use one counter
now, which only differs by its event kind and its noun.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz bf34e71804 fix: remove the games cache scratch on a failure
A cache write that failed left index.json.<pid>.part behind, one more
on each run. The cache and the install record now write through one
scratch file beside the target, removed when the write fails and named
when it cannot be.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz 5d0c2fd3c6 refactor: read retroarch.cfg values in one place
The Android launcher checks, the save folder rules and the UWP package
read retroarch.cfg with parsers of their own. They now share the one
that says an unreadable config once, and the UWP package expands its
~ as RetroArch does. The cores and info folders look up the config
beside a system folder through one function.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz 6acdf4b193 fix: retry archives and the app like files
One decision says whether a failed request is asked again and when:
5xx and 429 wait what Retry-After asks, a clock in the past or no certificate
list stops at once. A data archive and the handheld app waited 1 s on a
429 that asked for 30 and gave up where a BIOS file arrived, and the app
took a body cut short of its Content-Length as the file.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz c41fb9e609 fix: give data tree files the umask mode
Verified bytes reach their place through one helper that sets the mode a
plain open() gives and clears a read-only attribute. A data tree member
skipped both and landed 0600, unreadable by the emulator after a sudo
install. The expected digests of an entry are read by one function.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz a92d81c385 fix: cap what a rolling data tree may write
A followed member is written up to twice its listed size plus 16 MiB,
and the whole tree up to twice its listed total plus 16 MiB: a source
serving gigabytes where the list records kilobytes fills no drive.
2026-11-19 09:05:41 +01:00
Abdessamad Derraz ff69210b18 feat: pin forge data trees, follow nightly ones
A data tree whose source names a revision is fetched at the commit its
branch points to and listed at that commit, whose bytes never change.
A source with no revision (the buildbot's nightly assets) is marked
rolling: the installer writes each listed file as the source serves it,
checked against its ZIP CRC-32, as RetroArch's own downloader does, and
the install record keeps it in place on the next run. The PPSSPP list
refused 49 of 169 files after each buildbot rebuild.
2026-11-19 08:59:42 +01:00
Abdessamad Derraz b688f41a5a docs: name the modules that replaced common.py
The wiki, the platforms README and two comments named common.py, and
the installer's region table named scripts/region.py. tools.md lists
core/, model/ and resolve/ where it listed common.py, and the testing
guide names test_layers. install.py is rebuilt from installer/ and its
pins rewritten.
2026-11-18 11:43:36 +01:00
Abdessamad Derraz 6b597f85a0 refactor: give each installer module one role
The split had pushed each helper down into the lowest module using it.
Names now sit with the concern they belong to (68 modules, 45 before),
each with a one-line docstring saying it, and the import graph stays
acyclic. Statement source and comments moved unchanged: every top-level
statement of install.py keeps an identical ast.dump.
2026-11-18 02:55:56 +01:00
Abdessamad Derraz e9f6fe43a0 refactor: split the installer into a package
install.py held 31,575 lines and 1,370 definitions in one module. Its
source is now installer/, 45 modules by concern, each importing from the
others what it uses, so ruff and mypy read every module on its own.

scripts/build_installer.py joins them back into install.py in import
order, with one block of standard library imports and the zlib and
unicodedata guard. It refuses an import from outside the standard
library, a name two modules define, an import cycle, a renamed import
and an import-time read of a name from a later module. install.py stays
one stdlib-only file for the bootstraps, the launchers and PyPI.

The split was written by a script, statement by statement: every
top-level statement of the old file is in the new one with the same AST.
Two tests that located code by its neighbour now read it by name.
2026-11-18 01:37:28 +01:00
Abdessamad Derraz ecf225d007 refactor: read platform-only APIs without ignores 2026-11-17 16:44:35 +01:00
Abdessamad Derraz 188f9393a3 refactor: group outcome, check and menu arguments 2026-11-17 14:02:33 +01:00
Abdessamad Derraz b2dd7a3483 refactor: pass the held files to check_lines 2026-11-17 13:56:23 +01:00
Abdessamad Derraz 578cf5f5f5 refactor: split _install by stage 2026-11-17 13:56:07 +01:00
Abdessamad Derraz be949319ba refactor: type decoded input as keys or mouse 2026-11-17 13:53:01 +01:00
Abdessamad Derraz 991564fbd6 refactor: run the full screen as a session 2026-11-17 13:51:58 +01:00
Abdessamad Derraz 8a06a2b547 refactor: split the plan, result and help screens 2026-11-17 13:51:58 +01:00
Abdessamad Derraz 93574ad11c refactor: split fetch_manifest, tighten types 2026-11-17 13:51:58 +01:00
Abdessamad Derraz 682953fbc6 refactor: split _validate_manifest by section 2026-11-17 13:51:58 +01:00
Abdessamad Derraz 0a3fa929c0 refactor: split detect_platforms by frontend 2026-11-17 13:51:58 +01:00
Abdessamad Derraz 0cfe8cd5c9 refactor: read msvcrt as the runtime holds it 2026-11-17 13:51:58 +01:00
Abdessamad Derraz 056c81e9a3 refactor: split the tui rows, keys and taps
TuiState.__init__, tui_blocker, tui_rows, _activate, _option, _tui_key and tui_mouse split by screen and stage; TuiRow values narrowed where the action fixes their type.
2026-11-17 13:09:36 +01:00
Abdessamad Derraz 20464aa3f7 refactor: split removal planning by stage 2026-11-17 13:05:21 +01:00
Abdessamad Derraz c4e6f01292 refactor: split main by check stage
main runs its option checks and its dispatch in named stages. The card
rules carry their BIOS folder as a str, the menu's drive number no longer
shares its name with the folder index, and SystemDrive is read under the
name Windows keys it by.
2026-11-17 12:20:07 +01:00
Abdessamad Derraz a4fb158e15 refactor: keep the nt test of the partial lock 2026-11-17 11:10:01 +01:00
Abdessamad Derraz ee1755d7a4 refactor: read IO from the typing import line 2026-11-17 11:10:01 +01:00
Abdessamad Derraz 3bce66bea7 refactor: split the download and run end stages 2026-11-17 11:10:01 +01:00
Abdessamad Derraz 352094379b refactor: keep value semantics of copy records 2026-11-17 10:08:46 +01:00
Abdessamad Derraz 455babfe0f refactor: split plan_games and the pack helpers
plan_games, _plan_game_folder, _swap_in and _write_verified read by stage, _fill_pack takes its pack as one tuple, check_lines its folder reads as CheckHeld. LocalCopy, PackPart and Unreadable become plain classes: their index and count fields shadowed the tuple methods. Openers of ZIP members are typed IO[bytes].
2026-11-17 10:08:00 +01:00
Abdessamad Derraz c0594b3b11 refactor: split standalone copies and line menu
Stage helpers for the standalone folder install and copies, the line
menu's Enter line, keys and answers, the games document reads and the
game reader; type the menu choice, the card rows and the byte order.
2026-11-17 10:08:00 +01:00
Abdessamad Derraz 4eacb6ff39 chore: lint scripts and tests with ruff
pyproject.toml now carries the ruff rule set: pyflakes, the B rules,
simplify, perf, pyupgrade, complexity and size limits. This commit
applies the fixes that change no behavior and the small defects the
first run named:

- tests/test_install.py used argparse without importing it
- three loops rebound the outer `profile` with each layout
  (packextras, slots, verify); the loop variable is now `layout`
- profile_sync loops shadowed dataclasses.field
- generate_readme and packextras computed values nothing read
- stale noqa markers for rules the project does not enforce

Complexity, size and the remaining findings are handled next.
2026-11-17 07:07:48 +01:00
Abdessamad Derraz 750a6eb8e6 chore: merge the expert installer options 2026-11-12 11:05:07 +01:00
Abdessamad Derraz 7d6efc3522 feat: lead with dArkOS, which replaced ArkOS
ArkOS was archived on 30 December 2025 and points its users to dArkOS,
and JELOS has reached its end of life. The handheld guide lists dArkOS
first with the devices of its latest release, and marks ArkOS and JELOS
as no longer updated, citing each project's own page. A card read from
a computer is called dArkOS or ArkOS, since both write the same EASYROMS
tree. The demos are recorded on dArkOS.
2026-11-12 07:28:22 +01:00
Abdessamad Derraz 180aca1c63 fix: close the expert option review findings
Change offers Standalone version of it only without a region, core or
system choice, and a later such choice turns it off in one line.
--find refuses --pack, --add-app, --standalone-copies, --romm-firmware
and --from. Every --find --json match carries every key, null where
absent, and a hash with no one file ends on code 4. A slot claim that
is no object, and a truth-only omission, are checked at the boundary.
truth_files: null reads as no list. Each name a group gives a file is
looked up apart (slot also), and --installed-cores ranks a slot by the
cores found.
2026-11-12 07:12:20 +01:00
Abdessamad Derraz 07dd93604d chore: merge origin/main
Takes --remove --misplaced. The pins are written again for the merged
install.py, the launcher index and installer doc regenerated.
2026-11-12 04:42:27 +01:00
Abdessamad Derraz 9cb9fec49e refactor: keep standalone layouts in a file apart
The layouts every list carried grew the download of each run by up
to 30% for an option few use. They now live in
install/standalone/<platform>.json, written by the same --manifest run
and fetched only by a run given --standalone, beside --manifest first.
The list names the builds (standalone_builds). A missing, unreachable
or invalid file stops --standalone on one line, code 1.
2026-11-12 04:41:22 +01:00
Abdessamad Derraz 058c3a1152 feat: remove misplaced copies of installed files
--remove --misplaced deletes a copy only under the name of a file the
installer placed and still holds: beside it in another case, or at the
top of a folder the list fills for a file below. Renamed copies, game
data, links, second names and folders without an installed file stay.
Another setup whose list cannot be read stops the removal.
2026-11-12 04:32:56 +01:00