Launcher: a graphical launcher, and the keyboard pad's keys chosen by VICTORY_KEYMAP #982

Open
github-bot wants to merge 2 commits from github-bot/gh-982 into main AGit
Owner

@⁠alexx307 on GitHub · 2026-11-28 10:35 UTC · original
alexx307:launcher-gui → main · +7751 −312 · 31 files · 2 commits · open

A window to start the game without typing PowerShell options, built with Tauri 2 in apps/launcher.

What it does

  • Setup: pick your own dump's executable (a path inside the repository is refused), see whether the layer is built and whether the DLSS and FSR 3 files are there, and fetch them with the existing Get-NVIDIA-DLSS.cmd and Get-AMD-FSR.cmd.
  • Settings: the F1 menu's choices (console profile, resolution, DLSS, frame generation and its type, frame rate cap). They are written to victory-settings.txt as VICTORY_MENU_*, which play-foxhound.ps1 and the F1 menu already read, so the launcher and the menu always agree. Other lines of the file are kept.
  • Play: runs scripts\play-nvidia.ps1 -Exe <dump> in a console window of its own, so the build, the log's path and the output stay visible.
  • Controller: which key presses which control of the keyboard's stand-in pad (see below). A key already in use is swapped; F1 and F3 are refused.
  • Updates: lists what the official repository has that the checkout has not. "Update now" closes the launcher and runs scripts\update-launcher.ps1 (git pull --ff-only, rebuild of the layer if it was built, rebuild of the launcher, restart). Offered only on a clean main; otherwise the launcher says why not.
  • Logs opens %LOCALAPPDATA%\victory\logs; About links to this repository and to the original VIctory.
  • Keyboard, controller (Gamepad API) and mouse navigation; a frameless window with its own title bar.

Changes outside the launcher

  • gameinput: the stand-in pad's keys come from VICTORY_KEYMAP (control=key pairs, keys as hexadecimal virtual-key codes, letters by their place on a US keyboard). The defaults are the keys it always had. LETTER_POSITIONS now knows all 26 letters, so any letter can be used; the existing tests pass unchanged, plus three new ones in gameinput/keymap.rs.
  • xtask/src/policy.rs: html, css and js added to the allowed text extensions, for the launcher's page. The other checks (size, NUL bytes, encoded runs) still apply to them.
  • Cargo.toml: tauri (with custom-protocol), tauri-build, tauri-plugin-dialog in [workspace.dependencies]. Cargo.lock grows with Tauri's crates; no existing crate changes version.
  • .gitignore: /apps/launcher/gen/ (schemas tauri-build writes).
  • README: one line in Credits.

No binary files

The icon is drawn by build.rs. The page draws its own background (SVG, no images). Optional pictures (ui/assets/logo.png, VIctory.png, ico.ico, background/*.jpg) and music (ui/assets/song) are used when present at build time and are not part of this PR. The page loads nothing from the network, and it calls only the launcher's own commands (empty capability list; links open only the two fixed addresses).

How to try it

cargo run -p launcher

Checked

  • cargo clippy -p launcher --all-targets: no warnings. cargo test -p launcher (17), cargo test -p xtask (policy included), cargo test -p victory-hle --lib gameinput (29).
  • The page in a browser: navigation, settings, key mapping (assign, swap, refusal of F1), slideshow, music settings.
  • The update check's git steps on a real checkout.

Not checked

  • Play with a real dump, and the new key mapping in the game (I have no dump to test with).
  • A full update from the launcher (there was nothing new to pull while writing it).
  • Windows 10 without WebView2 (the launcher shows a message box explaining what to install).

🤖 Generated with Claude Code

**@⁠alexx307** on GitHub · 2026-11-28 10:35 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/982) `alexx307:launcher-gui` → `main` · +7751 −312 · 31 files · 2 commits · open A window to start the game without typing PowerShell options, built with Tauri 2 in `apps/launcher`. ## What it does - **Setup**: pick your own dump's executable (a path inside the repository is refused), see whether the layer is built and whether the DLSS and FSR 3 files are there, and fetch them with the existing `Get-NVIDIA-DLSS.cmd` and `Get-AMD-FSR.cmd`. - **Settings**: the F1 menu's choices (console profile, resolution, DLSS, frame generation and its type, frame rate cap). They are written to `victory-settings.txt` as `VICTORY_MENU_*`, which `play-foxhound.ps1` and the F1 menu already read, so the launcher and the menu always agree. Other lines of the file are kept. - **Play**: runs `scripts\play-nvidia.ps1 -Exe <dump>` in a console window of its own, so the build, the log's path and the output stay visible. - **Controller**: which key presses which control of the keyboard's stand-in pad (see below). A key already in use is swapped; F1 and F3 are refused. - **Updates**: lists what the official repository has that the checkout has not. "Update now" closes the launcher and runs `scripts\update-launcher.ps1` (`git pull --ff-only`, rebuild of the layer if it was built, rebuild of the launcher, restart). Offered only on a clean `main`; otherwise the launcher says why not. - **Logs** opens `%LOCALAPPDATA%\victory\logs`; **About** links to this repository and to the original VIctory. - Keyboard, controller (Gamepad API) and mouse navigation; a frameless window with its own title bar. ## Changes outside the launcher - `gameinput`: the stand-in pad's keys come from `VICTORY_KEYMAP` (`control=key` pairs, keys as hexadecimal virtual-key codes, letters by their place on a US keyboard). The defaults are the keys it always had. `LETTER_POSITIONS` now knows all 26 letters, so any letter can be used; the existing tests pass unchanged, plus three new ones in `gameinput/keymap.rs`. - `xtask/src/policy.rs`: `html`, `css` and `js` added to the allowed text extensions, for the launcher's page. The other checks (size, NUL bytes, encoded runs) still apply to them. - `Cargo.toml`: `tauri` (with `custom-protocol`), `tauri-build`, `tauri-plugin-dialog` in `[workspace.dependencies]`. `Cargo.lock` grows with Tauri's crates; no existing crate changes version. - `.gitignore`: `/apps/launcher/gen/` (schemas tauri-build writes). - README: one line in Credits. ## No binary files The icon is drawn by `build.rs`. The page draws its own background (SVG, no images). Optional pictures (`ui/assets/logo.png`, `VIctory.png`, `ico.ico`, `background/*.jpg`) and music (`ui/assets/song`) are used when present at build time and are not part of this PR. The page loads nothing from the network, and it calls only the launcher's own commands (empty capability list; links open only the two fixed addresses). ## How to try it ```powershell cargo run -p launcher ``` ## Checked - `cargo clippy -p launcher --all-targets`: no warnings. `cargo test -p launcher` (17), `cargo test -p xtask` (policy included), `cargo test -p victory-hle --lib gameinput` (29). - The page in a browser: navigation, settings, key mapping (assign, swap, refusal of F1), slideshow, music settings. - The update check's git steps on a real checkout. ## Not checked - Play with a real dump, and the new key mapping in the game (I have no dump to test with). - A full update from the launcher (there was nothing new to pull while writing it). - Windows 10 without WebView2 (the launcher shows a message box explaining what to install). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
apps/launcher: a window to pick your own dump (refused inside the repository),
set the F1 menu's choices (written to victory-settings.txt, which the play
script and the menu already read), map the keyboard to the stand-in pad,
fetch the DLSS and FSR 3 files with the existing scripts, open the logs, and
start the game through scripts\play-nvidia.ps1. Updates from the official
repository: listed, and pulled and rebuilt (scripts\update-launcher.ps1) only
on a clean main. Navigable by keyboard, controller and mouse.

Its page is plain HTML, CSS and JavaScript with no npm and nothing from the
network; it calls only the launcher's own commands. No binary file: the icon
is drawn by build.rs, and optional pictures and music put in ui/assets (not
part of the repository) are used when present.

gameinput: the stand-in pad's keys come from VICTORY_KEYMAP (control=key
pairs, keys as virtual-key codes, letters by their US place); the defaults are
the keys it always had, and every letter's place is now known.

xtask policy: html, css and js added to the allowed text files, for the
launcher's page.

Not tried with a dump: Play and the new key mapping in the game.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A launcher that is not where it was built (a downloaded release, put in the
VIctory-NVIDIA folder) now finds the checkout above its file, else the one it
was built from; without one, Setup says where to put it. The update script
rebuilds such a launcher for release and copies it over the old file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 859ad7f9c731bb800ca9bd08481a6bc19dd00f25)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 14:31:12 +00:00
Author
Owner

@⁠ANDREANIADS on GitHub · 2026-11-28 23:51 UTC · original

At c5c8664, I tested with_values in isolation on Linux with three synthetic settings files. Changing only VICTORY_MENU_FPS preserved comment text, trailing spaces, an unknown VICTORY_ key, an unrelated key and a blank line. The duplicate FPS entry collapsed as intended. All seven CRLF endings in the Windows-style fixture became LF. In a separate LF fixture, saving added a newline after the final comment.

A small regression test for the refresh: given "# note\r\nVICTORY_MENU_FPS=30\r\nOTHER=x", updating FPS to 60 should change only 30 to 60. Keeping each existing line terminator would avoid rewriting unrelated lines. The launcher itself was not run.

**@⁠ANDREANIADS** on GitHub · 2026-11-28 23:51 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/982#issuecomment-7247704052) At `c5c8664`, I tested `with_values` in isolation on Linux with three synthetic settings files. Changing only `VICTORY_MENU_FPS` preserved comment text, trailing spaces, an unknown `VICTORY_` key, an unrelated key and a blank line. The duplicate FPS entry collapsed as intended. All seven CRLF endings in the Windows-style fixture became LF. In a separate LF fixture, saving added a newline after the final comment. A small regression test for the refresh: given `"# note\r\nVICTORY_MENU_FPS=30\r\nOTHER=x"`, updating FPS to 60 should change only `30` to `60`. Keeping each existing line terminator would avoid rewriting unrelated lines. The launcher itself was not run.
Author
Owner

@⁠ANDREANIADS on GitHub · 2026-11-29 00:37 UTC · original

At c5c8664, settings_file::set reports success when an existing settings file cannot be decoded as UTF-8. I tested the module in isolation with offline Cargo on Linux. My temporary fixture contained # café VICTORY_MENU_FPS=30 VICTORY_OTHER=keep , encoded as UTF-16LE with a BOM. Setting FPS to 60 replaced all 94 bytes with the 20-byte FPS line, losing the other preference.

I tested a small change in set: read the existing text, use an empty string only for ErrorKind::NotFound, and return any other read error before writing. The same fixture then returned InvalidData and all 94 bytes compared equal. Both versions updated only FPS in the UTF-8/LF control and created the expected line when the file was absent.

**@⁠ANDREANIADS** on GitHub · 2026-11-29 00:37 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/982#issuecomment-7248246231) At `c5c8664`, `settings_file::set` reports success when an existing settings file cannot be decoded as UTF-8. I tested the module in isolation with offline Cargo on Linux. My temporary fixture contained `# café VICTORY_MENU_FPS=30 VICTORY_OTHER=keep `, encoded as UTF-16LE with a BOM. Setting FPS to 60 replaced all 94 bytes with the 20-byte FPS line, losing the other preference. I tested a small change in `set`: read the existing text, use an empty string only for `ErrorKind::NotFound`, and return any other read error before writing. The same fixture then returned `InvalidData` and all 94 bytes compared equal. Both versions updated only FPS in the UTF-8/LF control and created the expected line when the file was absent.
This pull request has changes conflicting with the target branch.
  • .gitignore
  • Cargo.lock
  • crates/victory-hle/src/modules/gameinput.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/982/head:github-bot/gh-982'
git switch 'github-bot/gh-982'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-982'
git switch 'github-bot/gh-982'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-982'
git switch 'github-bot/gh-982'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-982'
git switch 'main'
git merge --squash 'github-bot/gh-982'
git switch 'main'
git merge --ff-only 'github-bot/gh-982'
git switch 'main'
git merge 'github-bot/gh-982'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!982
No description provided.