Commit Graph

8 Commits

Author SHA1 Message Date
d9ac7f6f0c Merge remote-tracking branch 'origin/main' into feat/launcher-update
# Conflicts:
#	tools/leonida_launcher.py
2026-12-02 08:07:23 +01:00
52e2eae670 launcher: check for updates at start and update in one click (LAUNCHER-UPDATE)
At start the launcher runs git fetch in its folder. When the clone is
behind its upstream, the Play page says how many new commits there are
and shows an Update button. Update runs this file's own --update mode:
git pull --ff-only, then a rebuild of the runtime when d3d12/ changed,
with the output streamed like the other tools.

A copy downloaded as a zip has no .git; the launcher says that updating
needs a git clone. A Settings box turns the check off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 07:38:08 +01:00
c43f309985 launcher: Precompile every pipeline ticks Prepare shaders (LAUNCHER-PRECOMPILE-ALL-NEEDS-PREPARE)
switch_args passes -PrecompileAll only with the shader preparation on, so the
new box did nothing when Prepare shaders before starting was off. A player hit
this right after #2986. Ticking the first box now ticks the second, and turning
the preparation off clears the first. A note line under the options says so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 07:25:20 +01:00
afe0b798f4 Launcher tests and docs for -PrecompileAll
- tests: -PrecompileAll is among the switches checked against play-d3d12.ps1,
  and it is passed only with the precompile on.
- README.md, docs/launcher.md, d3d12/README.md: the switch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 17:30:37 -05:00
8f78a4b887 launcher: no cards on Play; the rail holds the game; the setups move into the menu beside PLAY
The Play page is the picture, the logo, PLAY and its menu, and the status line: the row of cards is gone, and the
server no longer reads the repository's history for it. Something still to do (DLSS files, the runtime) is a link
under the status instead of a card.

The rail holds one entry, the game, with the selection bar; its tile is a square cut from the background picture, or
the logo without one. Expanded it shows the name and the state. The four setups and "your own options" are in the
menu beside PLAY, the one in use ticked, beside "check this start" and "copy the command"; the menu opens upward
beside the buttons so it fits a 678-pixel-high window.

Tested: tests/test_launcher_serve.py (10), the no-game-data check, and the page in a browser at 1284x678 with the
server in --no-run mode: the tile, the expanded rail, the menu and its setups.

AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 17:57:50 -05:00
d56a01a505 launcher: the key art behind PLAY, fetched once and kept outside the repository
The picture behind PLAY is the one chosen in Settings (Launcher, Background picture), else the newest background.webp,
.png or .jpg in the launcher's settings folder (%APPDATA%\Leonida), else the newest capture, else the drawn art. When
there is none, launcher/serve.py fetches the game's key art from rockstargames.com once at start (2560 wide) and
keeps it there as background.<the type that came back>; --no-art leaves it. The request names a plain browser and
nothing about the user or the project; what comes back is kept only if its bytes are a PNG, JPEG or WebP. The picture
is never part of the repository.

Over a picture the page sets it a little lower, so heads clear the words top right, fills the band above with the
picture's own top row, and moves the cards to the bottom so the faces stay clear. /media/background needs the run's
cookie and serves only a picture by its bytes.

Tested: python -I tests/test_launcher_serve.py (10 tests: picture kinds, which background, the fetch against a local
server, token, Host, Origin, cookie, preview starting nothing) and tests/test_leonida_launcher.py (15), the
no-game-data check, and the page in a browser with the server in --no-run mode: the art was fetched (2560x1440 WebP)
and shown, Settings names the file in use.

AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 17:52:09 -05:00
4ef8a2fc9b tools: Saves page in the launcher (list, back up, restore, duplicate, delete, blob export and import, byte viewer)
tools/leonida_saves.py (standard library, no Tkinter) reads the D3D12 runtime's save layout from xgamesave.rs:
<data>/data/7952987A/saves/<user>/<config>/<Name>~<FNV-1a 64>/v<N>/{0,1,manifest}. The launcher's Saves page lists
containers and blobs (size, time, newest readable version) and offers ZIP backups in <data>/save-backups, restore
(after an automatic backup of the current state), duplicate under a new name (new folder hash and manifest), delete
(moved to save-backups/deleted, not erased), single-blob export and import (backup first, written as a new v<N+1>
the runtime's way), and a read-only hex and strings viewer. All of it is refused while the game runs.

No value editing: the story saves are packed (entropy 8.00, compressed or encrypted; not decoded), the plain ones
carry an ASAV checksum of unknown algorithm. The page and docs/launcher.md say so.

Checked: tests/test_leonida_saves.py (15 tests, fake trees), tests/test_leonida_launcher.py, compileall, the window
built and every page shown once by a script; layout and hashes confirmed read-only against a real data folder (all
four containers' folder names match the FNV rule). Buttons not clicked. AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 00:11:50 -05:00
10d0a2d94f tools: Leonida Launcher, a Tkinter window to play, set options, manage mods and run tools
Launcher.bat (Windows) or python3 tools/leonida_launcher.py opens a dark launcher with a navigation column, a hero area
with a PLAY button, a status line and pages: Play (runs scripts/play-d3d12.ps1 or scripts/play-linux.sh, output in a
log box, state line, Stop with confirmation ending the process tree, never two runs at once), Settings (game folder
with a check for game_scarlett_master.exe, data folder, the switches read from play-d3d12.ps1), Mods (mods/*/mod.json
enabled flags written via leonida_mods), Tools (DLSS fetch after a confirmation, runtime rebuild, logs and screenshots
folders) and About. Settings live in %APPDATA%\Leonida\launcher.json (~/.config/leonida on Linux). Its own design and
wording, no game assets; the hero picture is the newest screenshot found at run time, else a gradient. The pure parts
have no Tkinter and are tested in tests/test_leonida_launcher.py.

Checked: python -I tests/test_leonida_launcher.py (13 tests), python -m compileall -q tools,
scripts/check_no_game_data.py. The window itself was not opened or clicked through. AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 23:59:48 -05:00