launcher: follow-ups after #3182 (FG+RT greying, zip to clone, game folder, AMD, clearer choices, clear cache, Controls, FSR 3 files) #3272
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!3272
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/launcher-fgrt-follows-play"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pull request successfully merged and closed
The launcher's follow-ups after #3182 (merged) go into this one PR, as the maintainer asked. Items claimed in #2570:
Carries #3273 (merzleckeier's
Launcher.batexit status on the update's resume path: f88239534, 29085dbf2, authorship kept).Carries #3289 (merzleckeier's update-card layout cancel, fixes #3285: aec7489e3, authorship kept).
Depends on: #3276 (merged) (the runtime reads
LEONIDA_KBM_BINDSonce it is merged; until then the launcher passes it and the runtime ignores it).One commit per item, plus the review fixes listed under Tested.
1. The FG + RT greying follows what play-nvidia.ps1 will hold (a0a3189f3)
This answers @merzleckeier's review of 671d0c0fa.
card_facts'vramis now the largestqwMemorySizeof the display-class registry: the script's$vram, whatever-Adapterpicks. DLSS and the maker check still follow the chosen card.launch_valuescomputes what the script will hold forLEONIDA_HW_RT,LEONIDA_BVH_BUILDER,LEONIDA_FG_WITH_RT,LEONIDA_FRAME_GEN,LEONIDA_FSR_FRAMEGENand the console. It follows the script's order:$switchSettings, mirrored here and checked against the script by a test);-Morelast.settings_rulesgreys from those values. A muted note under Ray tracing says when the F1 menu or Advanced turns hardware RT on or off.2. Update Mandy makes a zip copy a git clone, installing Git when it is missing (de2358e0b)
A player who downloaded the repository as a zip got only "use a git clone" from
--update.zip_to_clone:git init, withorigin=https://github.com/ProjectLeonida/mandy.git; fetchmain, and a localmainthat follows it.git reset: the index goes tomain, the files stay as they are.%LOCALAPPDATA%\Leonida\zip-copy-backup-<date>-<time>.main's version is checked out over the tracked files. Untracked and ignored files (builds, caches,game_path.txt) are not touched.d3d12/changed..gitis removed, so the copy is a zip again, never half a clone.winget install --id Git.Git -e --source winget --silent.find_gitalso looks in Git for Windows' install paths, since PATH is stale in the running process. Without winget, or on Linux and macOS, the launcher says how to install Git and changes nothing.3. A missing game folder is a box on the Play page (c22cd85ed)
The single muted line "Choose your game folder in Settings" was missed.
4. Without an NVIDIA card PLAY passes DLSS and Smooth Motion off (db005c435)
An AMD player (RX 9070) saw DLSS greyed but still on.
-NoDlss, and-Dlss <mode>,-FrameGen Nand-SmoothMotionwere still passed when saved. On the Series S profile, that asks the script for DLSS on a card that cannot run it.for_cardturns off DLSS, its mode, DLSS frame generation's multiplier and Smooth Motion for PLAY. Frame generation on FSR or Off stays as chosen.last_switchesand the Play page's options line all use it.5. The chosen button of a row is violet with white text (6d9a22f58)
A player's screenshot did not show that FSR was the frame generation mode.
#7c3aed, white text at 5.7:1), like an "on" switch. Greyed, it is the same violet dimmed.6. Tools > Clear shader cache (636e61f94)
Players ask how to clear the cache. The new Tools button:
cache-2:play-d3d12.ps1'sLEONIDA_CACHE_DIR, which holds the translated shaders, the pipelines and the title's prepared images;The saves in
data\are not touched, and the next start makes the cache again.7. A Controls page for keyboard and mouse binds (efa45bab9)
Players asked to remap keys. A new Controls page sits between Settings and Mods:
docs/gameinput.md);The runtime's own keys (F1, F3, F4, F8, F9, Alt, Caps Lock) are refused at capture, with a red note.
What PLAY does with them:
kbm_bindsin the runtime's syntax and passed asLEONIDA_KBM_BINDS.LEONIDA_KBM_BINDStyped in the Advanced field wins, and the page says so.8. The files a card needs, by default; Tools > Fetch AMD FidelityFX files; "FSR 3" (78a810cea)
FSR 3 frame generation needs AMD's signed
amd_fidelityfx_loader_dx12.dllandamd_fidelityfx_framegeneration_dx12.dllind3d12\amd-sdk\FidelityFX\bin. Nothing fetched them, so FSR 3 stayed off without a word.The fetcher:
d3d12\scripts\get-amd-fidelityfx.ps1, withGet-AMD-FidelityFX.cmdas a wrapper.GPUOpen-LibrariesAndSDKs/FidelityFX-SDKat tag v2.4.0, the version whose frame generation and swap chain interfaces matchfsr.rs, together with AMD's licence.amd-sdk/is git-ignored.Tools: a "Fetch AMD FidelityFX files" button (about 29 MB).
By default: a new "Download the files my card needs" setting, on by default. Before PLAY, the launcher fetches what the card lacks:
This happens once, and the game starts even if a fetch fails.
With FSR 3 chosen and the DLLs missing, a note under Frame generation says so.
The frame generation mode "FSR" is now "FSR 3".
New texts in de/es/fr/pt for items 1 to 3 and 6 to 8, and
docs/launcher.mdcovers them.Tested
Windows 11, RTX 4070 Laptop. Launcher only, no game run;
play-nvidia.ps1is not touched.python -I tests/test_leonida_launcher.pypasses 130 tests (one skipped) onorigin/maind15e048a7 plus this branch.-CardMask, which also survives SAVE AND RESTART, and a new card is not a player change), automatic DLSS FG follows-Adapter, the Linux cache and binds, the clear-cache race, unreadable binds kept, downloads follow the chosen modes, the options really passed are recorded, and there are no control bytes in the docs;kbm.rsand checks every name the page can write. It is skipped on main until #3276 is in; it passes against #3276'skbm.rsviaLEONIDA_KBM_RS;ClearShaderCacheTests. Onlycache-2goes, the saves stay, it is refused while the game runs, and the folder name is the oneplay-d3d12.ps1sets. A clear that deletes the whole data folder fails these tests.ForCardTests. On AMD,-NoDlssis passed, with no-Dlss/-FrameGen/-SmoothMotion. FSR and Off are kept. NVIDIA and an unread card are unchanged. Resolution is live on AMD and greyed on NVIDIA with a DLSS mode. All 5 tests fail on the launcher before this commit.play-nvidia.ps1.find_git,install_gitandrun_updateon a zip copy, refused or allowed.origin/main, with the edit backed up and the untracked and ignored files kept;.git.play-d3d12.ps1→play-nvidia.ps1with a stubbed registry agreed with the greying in 18 of 18 cases.git archiveof an older main plus a build, agame_path.txtand a README edit was converted in about 110 s.git statusis clean apart from untracked files, and the build is kept.--update --install-git;both:G=Square;both:R=none;foot:V=RB, saved and shown on Play; F1 is refused;-SeriesS -NoDlss, DLSS and Smooth Motion are greyed and drawn off, and the saved DLSS value is kept;launcher.jsonand to Settings' field, and the box goes away.tests/test_text_write_line_endings.pyOK;scripts/check_no_game_data.pyon the changed files OK.install_gitwithfindreporting Git missing once. Winget accepted the exact command, found Git 2.56.1 already installed with nothing newer (exit0x8A15002B, no change), and the launcher then foundgit.exeand went on.Get-AuthenticodeSignaturegives Valid for both, signer CN=Advanced Micro Devices.-From) are rejected and nothing is kept; a tag that is not pinned is refused.AI-assisted (oreofr-agent, Claude Code).
🤖 Generated with Claude Code
Rechecked
a0a3189fond15e048a. The launcher suite had 94 passes and one skip on Linux. With integer registry values, the real wrapper dry run agrees with the UI for the selected 8 GiB card beside a 24 GiB card, and with HW RT from F1 or Advanced. I also confirmed the current script's F1-off precedence after a newly enabled launcher Hardware RT choice.One remaining representation mismatch for a follow-up.
card_factsaccepts an eight-byteqwMemorySize, whileplay-nvidia.ps1casts$qdirectly to[uint64]inside the registry-walk try block. In PowerShell 7.4.21 with Series X, hardware RT and explicit 2×, I had the actual public scripts read two synthetic registries:Decoding the eight-byte value with
[BitConverter]::ToUInt64($q, 0)before the cast in a disposable copy made both cases agree and kept the integer and F1/Advanced controls green. This uses the same binary representation the Python code already supports. Synthetic only, with registry and GPU queries stubbed. AI-assisted with OpenAI Codex.VERIFY-3272 — green at its head, and it is one commit away from
#3273, which is notRan at the head (
a0a3189f3):So this branch is green, and the suite is 95 tests in 0.36 s — the launcher's tests never start the launcher, which is why a 3 500-line rewrite runs in a fifth of a second.
And the relationship with
#3273is worth having in writing, because the two look like alternatives and are not:#3272is#3273plus that commit — not an ancestor relationship (the histories were rebased, so the SHAs differ), but one commit of content. And the test counts differ: 95 here, 87 there, which is the other half of it — this branch has the tests that branch does not.What that means for the queue:
#3273is red on one literal (I posted the exactexit /b %ERRORLEVEL%versusexit /b\r\n:start\r\nin that pull request) and#3272carries the same file, green. If the newer work is the one to keep,#3273closes and its one commit's worth of content is already here — and if#3273is meant to be merged first, then this one should be rebased on top of it rather than merged beside it.What I verified and what I did not: the two test files, which is 106 tests; not the 6 485 added lines — the four 315-line i18n JSONs,
Launcher.bat's 151 lines andtools/leonida_launcher.py's 3 521.python -m json.toolon the four JSONs would be the cheap next check and I did not run it.Written with an AI assistant.
Follow-up to my own comment, because I said I had not run it: the four i18n files parse.
So the 315 lines each are well-formed JSON, not a truncated paste — which is the cheapest failure a 315-line translation file has, and it is not there.
What I still have not checked about them: that the four have the same key set — a missing key in
es.jsonwould fall back to English or to a blank label, andjson.toolwould not say a word. If the launcher's loader does not already refuse a missing key, that comparison is three lines of Python and belongs intests/test_leonida_launcher.pynext to the rest.The key-set check, run: all four files carry the same 321 keys, and none is empty
I said in my last comment that "three lines of Python" would compare the four i18n files and that I had not run it. Run now, on the head:
So the translation is complete on this branch — 321 keys in four languages, no missing key, no blank label, no placeholder left as the key name. That is the failure mode a
json.toolmiss would have hidden, and it is not there.And the check belongs in the suite rather than in a comment: a
tests/test_launcher_i18n.pythat loads the four files and asserts the key sets are equal and no value is blank is ten lines, runs in milliseconds, and fails the day someone adds an English string without its three translations. The launcher already has the pattern —switches.md's--checkis the same idea for the switches.What this does not say: that the translations are right — only that each key has one. A wrong word in
de.jsonis invisible to this and to any test; that is what the four-language reviewers are for.Written with an AI assistant.
Correction to my own comment, one minute after posting it
I wrote "values identical to their key: 0 in each". That was wrong — the check printed 12 / 8 / 13 / 11, and I repeated the number I expected instead of the one I got.
The real result, with the keys named:
And they are not a defect:
Auto,Hardware,Mods,Console,Capture,Shadersare the words these languages use as-is (PortugueseConsole, SpanishMods, FrenchCapture), andAuto ({language})is a format string whose placeholder stays in English on purpose. So "identical to the key" is my heuristic's false positive, not a missing translation — which is exactly why a check like this belongs in the suite with the empty test and not with a guess about words.What stands from the comment: the four files carry the same 321 keys, and no value is blank — both measured, both printed above my mistake.
The lesson is the one I keep running into tonight, now about my own output: I posted the expected number, not the measured one, in a comment whose whole value was that it had been measured. The empty-value count was 0 and I let it carry the neighbouring number with it.
The eight-byte
qwMemorySizeis a good catch, and the two cases you list are the ones that would have been reported as "frame generation disappears" by a player — the UI says one thing, the dry run says another, and neither is wrong on its own.Your fix is the one I would take:
[BitConverter]::ToUInt64($q, 0)before the cast, because the value is eight bytes in the registry and a cast is not a decode. And the fact that you proved it in a disposable copy — both cases agree, the integer case unchanged — is the right way to settle a representation question, whereas reading the two files and reasoning would have left a doubt.One thing worth saying about the follow-up: if it rides a later pull request, the two cases make a good test — an eight-byte-only value and an integer-then-eight-byte value, asserting that
card_factsand the dry run agree in both. That is a table test over registry shapes, and it runs on Windows without the title.And the recheck itself is worth recording: 94 passes and one skip on Linux is a different number from the 95 I saw here, which is exactly what a platform-dependent test should look like — the skip names itself, and the count difference is accounted for.
No objection from me to it landing as it stands.
Re-verified at
c22cd85ed: 101 tests, and the i18n folder is still here — my test is notOn the current base (
d15e048a7, after#3182):101, against the 95 I measured before
#3182— so the push added six tests and the whole suite still passes on the new launcher.And one thing I checked while I was there:
tests/test_launcher_i18n.pyis not in the branch, whiletools/launcher_i18n/is — so the branch's translations have no test that they carry the same keys or that none is blank. That is exactly what mytest-launcher-i18nbranch adds (5f63199a7,Depends on: #3272): 321 keys in each of the four, no blank, and it skips while the folder is absent.The
qwMemorySizefollow-up you described is still open — the two cases you listed (eight-byte only, and integer followed by eight bytes) would make a good table test, and that one needs the registry shapes, not the folder.Nothing to ask: this head is verified as far as the suite goes, and the only thing I would add is the twelve-line test above, which is already written and waiting on the branch.
Addendum, measured after I posted: 326 keys now, in four files, and still no test that they match
The folder check I ran just after posting the comment above:
326, not the 321 I measured an hour ago — so the push added five strings — and the files are still bare of any check that the four agree. My
test-launcher-i18ncompares the four key sets rather than a hard-coded count, so it does not care whether it is 321 or 326, which is the reason it is written that way.The five new strings are also the reason a test is worth more than the number: each translation pass adds to one file first, and the gap between "the four have 326" and "the four have whatever each of them has" is invisible until somebody reads that menu in Portuguese.
The four files agree: 326 keys in each, nothing missing — measured on
c22cd85edI said a minute ago that nothing checks whether the four translations carry the same keys. I checked, and they do:
So the branch is correct as it stands on this head, and my
test-launcher-i18nwould go green on it rather than find something — which is what a guard is supposed to do on a good day.The reason the guard is still worth having: the next string goes into whichever file the author is working in. Five strings were added since an hour ago (321 → 326), they landed in all four at once this time, and the only thing that says so is a comparison nobody runs —
json.toolwould call a file with 325 keys valid, and the launcher would render one English label among 326 Portuguese ones without an error.So: nothing to ask, nothing to fix. The test is a guard against the next commit, not a complaint about this one, and that is the honest way to put it — a pull request that is already right does not need a test to prove it was wrong.
Thanks @merzleckeier, the P1 is fixed in e4af10dc1.
The new
zip_collisionsfinds the paths where conversion would lose something:layout/local-notes.txtcase);settingscase).When there is one,
zip_to_clonestops before the backups and the checkout:.git;Tests:
.git,update_statussays zip again, and nothing is written.zip_collisionson its own.zip_collisionsreturning nothing (the old behaviour), both real-git cases fail.(oreofr-agent, AI-assisted)
Confirmed the ZIP P1 from my earlier review is fixed at
e4af10dcond15e048a. I reran the original two collision fixtures with real Git and a local bare origin. Both returned 1, named the obstructing path, kept the local content, and left neither the temporary.gitnor a backup. The modified regular-file control still converted successfully and preserved the original in its backup. The two launcher suites had 113 passes and seven skips with PowerShell 7.7.0 on Linux. All files in the conversion probes were synthetic. AI-assisted with OpenAI Codex.Thanks @merzleckeier, both P2s are fixed in daa749086.
card_chosenaddsNoDlss,NoFrameGenandSmoothMotionto-Chosenthere.play-nvidia.ps1then drops the menu's savedLEONIDA_UPSCALE,LEONIDA_FRAME_GENandLEONIDA_MENU_SMOOTH_MOTIONas it does for a typed switch.dlss, 2x, Smooth Motion 1, or FSR 1). Without the names, the menu's 2x wins. With them, the upscale is the stretch, frame generation and Smooth Motion are off, and FSR is kept. A test also checks that each name maps to a$switchSettingsentry.-NoDlss. One at 1080 or less, one on Series X, or one that was passed already is unchanged.111 launcher tests and 12 script tests OK. Counter-test: with
card_chosenandfor_cardas before, both new launcher tests fail.Noted for #3235: once both are in, the switch-table mirror and the
HardwareRTexpectation need updating, whichever merges second.(oreofr-agent, AI-assisted)
Native Windows confirmation of the already reported F1-settings P2 on current PR head
636e61f9427aeecaa6f7c97aab40b72945a37c7d:play-nvidia.ps1into a disposable synthetic tree and created a menu file withLEONIDA_UPSCALE=dlss,LEONIDA_FRAME_GEN=2,LEONIDA_MENU_SMOOTH_MOTION=1, andLEONIDA_FSR_FRAMEGEN=1.Get-CimInstancereturned an AMD adapter. I invoked the same three typed switches produced by the non-NVIDIA card filter (NoDlss,NoFrameGen,NoSmoothMotion), with-DryRunomitted.Start-Processwas stubbed to avoid launching anything.leonida-settings.txtcontained onlyLEONIDA_FSR_FRAMEGEN=1; the three saved NVIDIA choices were removed. The committed card-switch test uses-DryRun, so it does not exercise this persistence path.This confirms the existing review finding remains on the current head. Synthetic files only; no game data, game launch, or GPU used.
Thanks @merzleckeier and @DeadlyChirp. The six findings from the 02:35, 02:47 and 02:58 reviews and the 02:46 confirmation are fixed in f1e9718e9, merged with the branch's head in c8baf9b74:
-Chosen. The launcher passes-CardMask NoDlss,NoFrameGen,SmoothMotion(card_mask), andplay-d3d12.ps1hands it over.play-nvidia.ps1leaves those settings out of this start only, keeps them inleonida-settings.txt, and says so. The menu's FSR 3 stays.-DryRun,Start-Processstubbed): the file keepsLEONIDA_UPSCALE=dlss,LEONIDA_FRAME_GEN=2andLEONIDA_MENU_SMOOTH_MOTION=1, while this start's settings have them off.-Adapter, the automatic DLSS frame generation judges the cards whose name holds it (all of them when none does), and the mask'sNoFrameGenalso keeps it off. Dry runs on AMD + RTX 4070:-Adapter "AMD Radeon RX 7800 XT": none;-Adapter "RTX 4070": 2x;-Adapter: 2x;play-linux.sh'sLEONIDA_CACHE_DIR, or${XDG_DATA_HOME:-~/.local/share}/leonida/cache.game_running()again. In a real window, a game started during the dialog leaves the cache in place and gives "close the game first".play-linux.sh's environment (env NAME=value sh play-linux.sh ...): the Controls binds and the advanced options, with Advanced winning. Neither was passed on Linux before.split_kbm_bindskeeps the entries the page cannot read, and they are written back after the rows.both:G=Square;vehicle:N=FutureActionnow saves G, H and the unknown entry, checked in a real window.t()withtext=, which crashed it as soon as an unreadable entry showed. The placeholder is now{entries}, and a test guards against anyt(..., text=...).Tests:
tests/test_win_launchers.py: 12 OK;check_no_game_dataOK.Counter-tests: with the mask ignored, the adapter filter off, the Linux env or cache path,
split_kbm_bindsorcard_maskreverted, each fails its test.(oreofr-agent, AI-assisted)
Thanks @merzleckeier, the three points of your 03:11 review are fixed in b4d0f54ea, merged on top of the 1-6 fixes as 4b64ba9e4.
FSR 3 chosen queues AMD's files.
needed_filesnow takes PLAY's settings as well as the card:Your case, an RTX 4070 with FSR 3 and no SDK files, now queues
get_fidelityfx.Recorded options.
launch_snapshottakes the normal launch's switches together with the command, andstart_gamerecords that snapshot. A mode saved during the download no longer counts as passed.Control bytes. The BEL and BS in
docs/launcher.md'sd3d12\amd-sdk\FidelityFX\binare replaced with the backslashes. A newNoControlCharactersTestsfails on any control byte but tab, LF and CR indocs/*.md, the READMEs, the launcher and its translations.133 launcher tests OK, and the script, docs-links and line-ending tests too. Counter-tests: modes ignored, live settings recorded, or a BEL appended each fail their test.
(oreofr-agent, AI-assisted)
Thanks @merzleckeier, all four are fixed in 96765c480, which also merges main with #3276.
windows=True, andclear_shader_cachetakeswindows. The suite passes 139 tests under Linux (WSL Ubuntu, Python 3.12), where the old tests fail on these two exactly as in CI.-Chosennow compares the player's own switches (the saved settings, plus-Logfor a diagnostic start), andlast_switcheskeeps those too. It is still taken with the queued command. The card's part goes only as-CardMask. In your case it is now-Chosen Adapterwith-CardMask NoDlss,NoFrameGen,SmoothMotion.LEONIDA_MENU_ARGScarries-CardMask.test_win_launchersruns the generated restart command:LEONIDA_FRAME_GENstays masked and the upscale is the stretch.LEONIDA_CACHE_DIRtyped in the Advanced options, on both systems, instead of the default cache.Counter-tests: the old snapshot and chosen logic plus no Advanced lookup fail 3 of 3 tests, and a restart without
-CardMaskfails the restart case.test_win_launchers: 12 OK.(oreofr-agent, AI-assisted)
Thanks @merzleckeier, the P1 is fixed in 69925a7c0.
shader_cache_dirmakes an AdvancedLEONIDA_CACHE_DIRabsolute from where the runtime starts:d3d12on Windows, where play-nvidia.ps1 pushes, and the checkout on Linux. The confirmation and the deletion use that same path.cache_dir_problemrefuses a drive's root, a folder that holds the home folder or the data folder, and any folder that holds or sits in the saves, the game folder or Mandy's own folder. A relative value always resolves inside the checkout, so it is refused too. The default<data>/cache-2stays allowed.CacheDirGuardTestscovers both. 141 OK. Counter-test with the guard off and the removal stubbed: both tests fail.(oreofr-agent, AI-assisted)
Thanks @merzleckeier, both are fixed in 9fa65d1e7.
[P1] The effective saves are protected. The new
runtime_dirgives the runtime's own folder forLEONIDA_DATA_DIRandLEONIDA_CACHE_DIR, in this order:<data>/cache-2and<data>/dataon Windows,${XDG_DATA_HOME:-~/.local/share}/leonida/{cache,data}on Linux.cache_dir_problemnow refuses anything that holds or sits in those effective saves, on top of<data_root>/data.[P2] One resolution for inherited and typed paths. Relative values resolve from where the runtime starts:
d3d12on Windows, the checkout on Linux.~is no longer expanded, matching leonida-core's config, which takes the value as it is.Tests:
RuntimeDirTests. An inherited relative path, a typed~, the Linux default saves and their parent, and an AdvancedLEONIDA_DATA_DIRon both systems are covered. The Linux default cache stays allowed. 143 OK. With the old saves guard, the new test fails.(oreofr-agent, AI-assisted)
Rechecked the two cache findings at
9fa65d1e. In a synthetic Linux launch throughplay-linux.sh, inherited relative and typed tilde paths now resolve from the checkout in both PLAY and Tools. The guard refuses the in-checkout targets, and a dedicated sibling cache still resolves to the same folder in both. The validator now rejects the effective Linux saves directory. The added default and Advanced saves tests passed, with removal intercepted in my separate alignment fixture.I also checked the new update-card fix #3289 (
26f7d4a1) together with this head. They merge cleanly and the real-Tk regression and four cache tests pass together. AI-assisted with OpenAI Codex.Merging (OreoFR's OK): head
aec7489e3, CI green on all six checks against main, no conflict, all review rounds addressed (merzleckeier's last recheck at 03:58 found nothing new; #3273 and #3289 carried with authorship kept). Sent to the merge queue. (oreofr-agent, AI-assisted)