Commit Graph

19 Commits

Author SHA1 Message Date
586860d0d5 launcher: move native Rust/iced launcher under launcher/native/ and isolate native-launcher.json 2026-11-29 11:51:49 -05:00
bac0122285 launcher: a test that a Cancel before Started stops the process once it has
From the review of old upstream PR 4578: nothing tested the fix in `follow`, so removing it failed no test. tests/cancel.rs
starts a stand-in that would run for half a minute, as the launcher starts a command (its own process group;
a tree `taskkill /T` ends on Windows), presses Cancel while `running` has no pid yet and checks the stand-in runs
on, then sends `Process(Started(pid))` and checks it ends within 10 s.

With the fix's lines removed the test fails ("a Cancel before Started left the process running"); with them it
passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 11:43:05 -05:00
ec400e9e6f launcher: Cancel before the process has started stops it once it has; the docs flag check knows cargo's flags
Two points from the review of old upstream PR 4578:

- A Cancel pressed before the process's Started event arrived set `cancelled` but had no pid to stop, and
  Started then stored the pid without looking, so the command ran on. Started now stops it when Cancel came
  first (launcher/src/app.rs).
- tests/test_docs_cli_flags.py was red: launcher/README.md quotes cargo's `--all-targets` and the test runner's
  `--ignored` and `--nocapture`, which no scanned source names. They join FOREIGN, the other programs' flags the
  docs quote.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 11:43:05 -05:00
aa2f9a5ba5 launcher: the README says where it has run: a real window on Linux (Wayland, RX 7900 XTX)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 11:42:28 -05:00
8e908f26c3 launcher: an orange main button in dark, large buttons beside it, a tinted veil that crossfades
- The main action's fill in dark is the logo's orange with the logo's shadow as its ink, as in
  light, so it stands out on the purple page; its hover glow was orange already. Pressed, its
  line is the main purple where the secondary would vanish on the fill.
- The buttons beside the main one (Check, Build) are large too, so the row lines up.
- The veil over the scene holds full strength to 0.35 of the way (was 0.15), still at 0.85.
- Its color is the background tinted toward the logo's purple in dark (18%) and its orange in
  light (12%), Palette::veil; every ink keeps 4.5:1 on it, and a test checks it.
- On a mode change the old veil now fades out as the new one fades in. It stayed whole under
  the new one, and as both are see-through it showed through to the end and then vanished at
  once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 11:42:28 -05:00
8b15d428ba launcher: every focus ring and the choice cards' glows fade on the glows' timing
Focus rings appeared and vanished at once on the switch, the header bar's pill, the sidebar,
text fields, the output area and the choice cards; on buttons and the close button the ring's glow
faded in but the ring was dropped the moment focus left, so it never faded out. Each now keeps
its ring in a Lit and draws it, line and glow together, at that share, while it fades out too
(paint::outline_lit and outline_faded).

The Performance page's choice cards faded nothing: their hover glow, chosen glow and the radio
circle's glow now each have their own fade, and the hover glow gives way to the chosen one as a
card is chosen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 11:42:28 -05:00
2d2bc66567 launcher: name the Game files page in the status line; every page drawn
The status line sent the player to "Settings", a page the window doesn't
have; it names the Game files page now.

A test draws every page and the Play page's states, in both modes, at
the smallest window, the default and 1920x1080, for a look over the
whole launcher, and checks that none is blank.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 11:42:28 -05:00
245960978c launcher: one corner radius for buttons and fields; every glow on one timing
Text fields took the control radius (10) while buttons took 8; fields
now take the buttons' radius, so a field and the button beside it match.

Every glow fades in over motion::GLOW_IN and out over motion::GLOW_OUT,
as the buttons' do: a switch's glow while on had ridden its knob's
150 ms slide, and a text field's hover glow came at once; both have their
own fade now.

Tests: a button and a text field under the pointer, and a switch turned
on, are part lit halfway through GLOW_IN and whole at its end, in both
modes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 11:42:28 -05:00
b871b24833 launcher: a smooth veil over the scene, stretched to the page
The scene's picture is the scene alone again, its sun's glow back; the
fade that was baked into it, which followed the text column and so
looked wrong on small windows, is gone, and with it the column's width
from the scene's key.

Over the scene the window lays a veil: the page's background at 0.85,
held a little in from the top left (0.15 of the way), then thinning on
a straight line to nothing at the bottom right corner, the bend rounded
over 0.10. It is a 512 by 512 picture, dithered against banding, made
once per mode at start and stretched over the page as it is drawn, so
it follows a resize at once. A mode switch crossfades the two veils
with the theme (Chrome::theme_fade).

Tests: the veil holds, then falls in equal steps with no jump or step
in slope; its picture is the background at the veil's opacity in each
mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 11:42:28 -05:00
364fe98213 launcher: the scene at launch, fading in; longer glows; an orange chip
The Play page's scene didn't appear after launch: nothing scheduled the
first tick at boot, and later ticks came only when the scene's key
changed, which at scale 1.0 and the default size it never did. The scene
cache is rebuilt so that no wanted picture is stranded:

- Launcher::boot, which main uses, schedules the first tick at once; after
  every message, a wanted picture that isn't made, isn't in flight and has
  no tick due gets one.
- At start both modes' pictures are made at once, the current one first,
  off the interface's thread; only after a resize does the size have to
  hold for 150 ms, while the last picture shows, scaled to cover.
- A picture fades in when it's ready (motion::SCENE_IN, 500 ms), a mode
  switch crossfades between the two made pictures, a resize's new picture
  crossfades over the old; frames are asked for only while a fade runs.
- The sun's radial glow is gone from the scene.

Glows fade in over motion::GLOW_IN (500 ms) and out over
motion::GLOW_OUT (700 ms): hover on buttons and window buttons, and their
focus rings' glow. The waiting status chip's ring and small light are the
secondary colour in dark, the logo's orange, instead of muted purple.

Tests: a real launch as main boots it, its tasks run on threads, at the
default size and scale, on another page, folded and with the frame off;
two generations per page, none on mode switches; the fade starts only
once a picture is ready and asks for nothing once it's whole; every chip's
word on its tint at 4.5:1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 11:42:28 -05:00
6506e10f74 launcher: keyboard, scene-cache and screenshot tests, README
- tests/keyboard.rs drives the window by keys alone, offscreen: Tab and
  Shift+Tab through the header bar, sidebar and pages; Enter and Space on
  the main and close buttons and the switches; arrows in the sidebar and
  the pill; typing into a field; Ctrl+Page Down and Up, Ctrl+L.
- tests/backdrop.rs counts the scene's generations with a stand-in: one
  per distinct final key through redraws, pointer and focus moves, page
  switches, a burst of resizes and mode switches back and forth (3 in
  all); and the last scene stays on the page while a resize goes on.
- tests/screenshots.rs draws every page in both modes on tiny-skia (CPU,
  no display), the Play page's states, the scene at two window sizes and
  the folded window. The renderer can be chosen with
  LEONIDA_TEST_RENDERER.
- launcher/README.md: building and running, the pages and the flag or
  variable each control drives, the keys, the window frame on Linux and
  Windows, the scene, the design system, the licence, and what isn't done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 11:42:28 -05:00
6c0535896f launcher: the window, its five pages, and the scene cached
One window: the header bar with the app's name, the light and dark pill
and the close button; a sidebar with five pages that folds below 640
pixels; one focus scope round all of it; Ctrl+Page Down and Ctrl+Page Up
step through the pages, Ctrl+L switches light and dark with a crossfade.

- Play: the logo, the launcher's and the game copy's versions, the status
  line and one big main button (Check, Build, Play or Cancel) in the text
  column over the scene; the progress bar and the output on an opaque
  panel.
- Game files: the package, output and work folders, each a field with the
  native folder picker; the full check.
- Build: the stages and WAV audio, as switches.
- Performance: LEONIDA_VK_DEVICE, LEONIDA_VK_VALIDATION, --wave64-emulate
  and --jobs.
- Diagnostics: gta6rt --trace-d3d12, LEONIDA_UNIMPLEMENTED and
  gta6rt --overlay.

The scene is generated off the interface's thread, once per page size,
scale, theme, mode and column, after the size has held for 150 ms, and
cached for both modes; drawing a frame only shows the cached picture.
The logo is decoded once.

`leonida-launcher [--repo PATH]`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 11:42:28 -05:00
15c54566c5 launcher: the Play page's scene, generated from the theme
src/scene.rs draws a dusk (dark) or a morning (light) over water, with a
shore and two palms in silhouette, as one RGBA picture of the page's size,
from the theme alone: its gradient's six stops, its background, its mode,
and its outline and shadow colours. No image files.

The soft layers (sky, water, glow, clouds, sun, reflection, horizon line)
are computed per pixel; the shore and palms are filled as anti-aliased
paths with tiny-skia, the version iced already builds. The scene's 16:10
frame covers the page from its bottom right. The page's background lies
at 0.97 over the text column and fades out beside it, so the muted ink
keeps 4.5:1 there; however narrow the page, the scene stays. A floating
window's rounded corner is cleared in the picture.

About 30-34 ms for a 1040x754 page in a release build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 11:42:28 -05:00
71b171ee47 launcher: glows that fade, a gradual pill, the brand centred
- Buttons' and window buttons' glows fade in and out with the pointer
  (transition::Lit).
- The light and dark pill drags as a switch does: its highlight follows
  the pointer, slides into place, and the choice changes when it's let go;
  a click or a key slides it too. The header bar leaves that drag to it.
- The sidebar's chosen-row mark is the logo's orange in both modes, for
  contrast against the purple-tinted row.
- The gap between the pill and the close button is the close button's
  own margin, as at the window's edge.
- The app's name in capitals sits on the bar's middle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 11:42:28 -05:00
ecb9f93a0d launcher: settings, command lines, output parser and state machine
The launcher's logic, without a window:

- config: a versioned settings file in the user's configuration folder;
  missing, broken or newer files give the defaults.
- repo: the repository found by --repo or by walking up to make_game.py;
  the executable's name from the version manifests.
- commands: make_game.py's check and build (python -I -u, python3 off
  Windows) and the loader as docs/boot.md section 2 runs it, on Windows
  and through gta6rt.sh and Wine on Linux; each setting's flag or
  environment variable (--stages, --wav, --full-check, --jobs,
  --wave64-emulate, LEONIDA_VK_DEVICE, LEONIDA_VK_VALIDATION,
  LEONIDA_UNIMPLEMENTED, gta6rt --trace-d3d12 and --overlay).
- output: make_game.py's log lines to a build's stages, and @@stage,
  @@progress, @@eta, @@check, @@done and @@error lines if it prints them.
- state: the primary action (Check, Build, Play or Cancel), why it's
  blocked, and the status line; "not bootable yet" reads as an
  explanation.
- process: a command's output read on background threads; cancelling
  ends its process tree. Tested with a stand-in shell script.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 11:42:27 -05:00
60ff0a2346 launcher: a design system in the logo's colours, on stock iced 0.14
A new Cargo package in launcher/ for a desktop launcher. src/ui/ is its
UI kit: the design language's tokens (colors, type, spacing, radii,
motion, glow), the theme, text roles, fonts and focus model, and the
widgets the window shows, each with its states, focus and keys: button
(with a large variant), text field and its editing rules, checkbox,
choice, switch, toggle group (draggable), loader, progress, status chip,
scroll area, sidebar list, settings groups, form, the window's own
decorations, the folded window, and the window's state with a theme
crossfade and a LEONIDA_WINDOW_FRAME switch.

Two palettes, Sunset dark and light, come from the logo's pixels. Its
light orange and dark purple are the two colours: orange the main and
purple the secondary in light, the other way round in dark; every glow
takes the secondary. Tests check every ink on every surface at 4.5:1.

The window's rounded corners use iced_wgpu's public primitive API, with
rounded quads where the renderer can't draw it. On Windows, where stock
iced can't present a transparent window, the frame asks for Windows 11's
rounded corners and draws its line at their radius.

The four fonts the text roles use are embedded with their SIL Open Font
License texts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 11:42:27 -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
b43ad11673 launcher: an HTML page laid out like a publisher's game launcher, with a local server behind it
launcher/index.html is the window: a slim black rail of square tiles with a selection bar (four setups of the one
game), art over the whole window, the sections as uppercase words top right, the logo with one large light PLAY
button and a small menu button, and a row of black cards (what is still to do, the newest captures, the latest
changes). Mods, Saves, Captures, Tools, Settings and About are a dark sheet over the art. The logo is the
repository's assets/logo.svg; the art is drawn by the page. Nothing is loaded from the network.

launcher/serve.py serves it on 127.0.0.1 only and does what the page asks through the functions of
tools/leonida_launcher.py: settings, the mod switches, the save list and back-ups, captures, PLAY and Stop, the
tools. Requests need the Host of this machine, the run's token (a header for /api, a cookie for pictures and the
event stream), and name things by folder, index or name, never by path. --no-run looks only: PLAY and the tools
say what they would run and start nothing.

tools/leonida_launcher.py: the settings and the command line know the newer switches of scripts/play-d3d12.ps1
(-SeriesS, -Dlss, -FrameGen, -Aspect, -PresentScale, -Adapter), each checked before it is kept.

Tested: python -I tests/test_leonida_launcher.py (15 tests), check_no_game_data on the new files, and the page in
a browser against the server in --no-run mode (every page, the menu, PLAY printing its command). PLAY, Stop and the
tools were not run for real: another session had the game running. Launcher.bat still opens the Tkinter window.

AI-assisted.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 17:39:47 -05:00