launcher.py: an optional GTK 4 launcher, with Auto as a run.sh layer under presets and run.conf #130
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/lobomfz--VIctory-xmem!130
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-130"
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?
@skalel on GitHub · 2026-12-01 23:22 UTC · original
skalel:feat/launcher→main· +2574 −7 · 8 files · 7 commits · openAn optional GTK 4 launcher, and what it needs from
run.shand the F1 menu to sit under the presets andrun.confrather than over them.This PR was opened before the presets and the menu writing
run.conf(#348) existed. It is rebased on0fd7614and changed for them: see "Since the review" below.launcher.py
One Python file, nothing beyond PyGObject. It writes
run.confand its logs inlocal/run, and callsrun.shandsetup.sh.run.confor the preset says otherwise. Auto is worked out at each start from the card, RAM and screen. It is not written down, so./run.sh playalone does what it did before.VICTORY_PRESET. The preset is read as the baserun.confstands on, and a box on Auto shows what the preset gives ("Auto (Off, from the preset)").VICTORY_switches inrun.confthat no source here reads.play,warm,shaders,setup,fix-shaders,set,doctor,fps.fps a.log b.logcompares the frame rate in the world of two runs and shows the settings that differ.Auto gives most cards Series S, 1920x1080 and the title's own upscaler (FSR 4 in its place where it is fetched and the card is known to get it: an RX 9000, or a card where one of the latest runs made an FSR 4 context, since an RX 6800 XT was offered none, #89), and a card of 16 GB or more (RDNA3/4, 30 GB of RAM, a 4K screen) Series X at 4K. With a preset (all of them turn on FSR 4 to the output) it gives Series X. Everything else is left to
run.shand the game.Outside launcher.py
run.sh:VICTORY_AUTO, the lowest layer. The launcher gives Auto asVICTORY_AUTO="NAME=value ...", whichrun.shputs under the preset,run.confand the command line (each pair checked as themenu.confmigration does). As arguments it was over all three: withVICTORY_PRESET=highAuto gaveCONSOLE=series-swith FSR 4 to the output, which does not start, and the menu's "Save and restart" ran again with the arguments, over what it had just saved.menu.rs: Auto as the default of the rows nothing sets.run.shpasses on the pairs it took, and the menu shows them whererun.confand the preset set nothing. Without it, a run on Series S at 1080p showed Series X at 1440p in F1. Nothing of it is written torun.conf.docs/SETTINGS.mdandrun.conf.default(so the menu lists them) gainVICTORY_UPSCALER,VICTORY_RENDER_SCALE,VICTORY_AMBIENT_MOST,VICTORY_NATIVE_INPUT,VICTORY_PLANES,VICTORY_UI_PLANE_720, and the values the code takes that were not listed (native,title,0).VICTORY_AUTOis listed with the runtime-only settings..gitignoregains__pycache__/:python3 -m unittestwithout-Bleaves one, whichcargo xtask policyrefuses.Since the review
xtask/src/policy.rsis no longer touched: main already allowspy.run.sh: a box's default is a field, its "Auto:" text is made from it, and a test holds it todocs/SETTINGS.mdandrun.conf.default, with the box's choices among the documented values. It found three that had moved: the frame limit (it said 100 fps, the old 10 ms clock), the overlay's values, and FSR 4 on Series X with no Off to use over a preset.run.sh --print-planwas not added:run.shpicks nothing from the hardware, so there is no plan of its own to ask for. What the launcher picks is its own, and./launcher.py play --dry-runprints it.Tested
python3 -B -m unittest discover -s tests/launcher: 132 pass, the window's off screen (skipped withoutgtk4-broadwayd).cargo test -p victory-core menu: 19 pass.cargo xtask policy: 360 files ok.bash -n run.sh.9bfbb2b). Started from the launcher with the profile and the size on Auto: the run gotCONSOLE=series-sandVICTORY_OUTPUT=1920x1080from Auto (the log says whose each setting is), and F1 showed them. In F1, output to 1280x720 and "Save and restart": the game came back at 1280x720 (before, Auto's 1920x1080 argument won). A preset in the window moves the profile to Series X with FSR (--dry-run).Not tested
um-*scopes ofrun.sh, so it cannot tell that one is running.🤖 Generated with Claude Code
@chatgpt-codex-connector[bot] on GitHub · 2026-12-01 23:24 UTC · original · edited 2026-12-01 23:29 UTC
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
c2be344ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
@chatgpt-codex-connector[bot] on GitHub · 2026-12-01 23:29 UTC · original · reviewed
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
c2be344270ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
@ -0,0 +337,4 @@host = not fsr and conf.get("VICTORY_FSR_HOST", "").strip() == "1"console = conf.get("CONSOLE")if console is None:console = auto["CONSOLE"] = ("series-x" if fsr or height(output) > 1080 or (output is None and big) else "series-s")@chatgpt-codex-connector[bot] on GitHub · 2026-12-01 23:29 UTC · original
When
run.confcomputesVICTORY_OUTPUTin Bash (for example,VICTORY_OUTPUT=$(printf 3840x2160)),Conf.get()returns the unevaluated expression, soheight(output)is 0 andoutput is Noneis false. On a machine that qualifies forbig,resolve()therefore chooses Series S and suppresses the automatic output override and the later above-1080p warning.run.shevaluates the expression and starts Series S at 4K, which the launcher itself notes fails at startup. Treat an unresolvable output as unknown when choosing a profile, or warn before launch.Useful? React with 👍 / 👎.
@ -0,0 +341,4 @@host = not fsr and conf.get("VICTORY_FSR_HOST", "").strip() == "1"console = conf.get("CONSOLE")if console is None and not unsure:console = auto["CONSOLE"] = ("series-x" if fsr or height(output) > 1080 or (output is None and big) else "series-s")@skalel on GitHub · 2026-12-02 00:00 UTC · original
Fixed in
c459fa8. Reproduced first: on a card that qualifies for Series X at 4K, a computedVICTORY_OUTPUTgaveCONSOLE=series-swith no note.Where only bash can tell
VICTORY_OUTPUT,CONSOLEorVICTORY_FSR_4K, Auto now picks no profile and no size (whatrun.confdoes not set is left torun.sh) and says so. WithCONSOLE=series-sset by hand it warns that the size cannot be checked.Two cases of the same kind are fixed with it: a computed
CONSOLEwas givenVICTORY_OUTPUT=3840x2160on such a card, and a computedEXEcounted as not built. Tests cover all three.@Luxuride on GitHub · 2026-12-04 12:03 UTC · original
The work is careful — 1,227 lines of tests, and they actually run on Linux (122 tests, 43 s) — so yes, worth landing, after a rebase and one decision.
The decision: this recomputes
run.sh's "Auto" logic in a third language with nothing tying the two together.launcher.py:361-419re-derives the picks from hardware instead of askingrun.sh, and the tooltips assertrun.sh's behaviour in prose (launcher.py:209"Auto: on, as run.sh has it."). Whenrun.sh's defaults move, these rows silently start lying, andtest_every_switch_with_a_box_is_one_the_game_reads(tests/launcher/test_launcher.py:452) only proves the key names exist, not that the values match. The cheapest fix that keeps the PR alive is arun.sh --print-planmode the launcher asks, or at minimum a test that fails whenrun.sh's defaults move.Before that:
ROWS(launcher.py:188-224) publishes switches main does not document:VICTORY_AMBIENT_MOST(:212),VICTORY_PLANES/VICTORY_UI_PLANE_720(:361-364). Fix the docs first, or the launcher UI becomes the only spec for them.xtask/src/policy.rsALLOWED_EXTENSIONSedit — main already allows"py"(policy.rs:19), so only the added assert at:237is left, and dropping it shrinks the conflict toREADME.md.Everything else reads well:
save()(launcher.py:174-183) doesbash -n, write-.new,copymode,os.replace, and the state directory is already covered by.gitignore.668accf53ato8d2308b581@skalel on GitHub · 2026-12-04 14:08 UTC · original
Thanks for the careful read. Rebased on
0fd7614and pushed. This PR predates the presets and the menu writingrun.conf(#348), and the rebase showed two problems with them, so it now touchesrun.shandmenu.rstoo (title and body updated).run.sh's Auto logic.run.shpicks nothing from the hardware: the profile, size and upscaler Auto gives are the launcher's own, so a--print-planwould have nothing to print (./launcher.py play --dry-runprints the launcher's). Where you are right is the tooltips asserting defaults in prose. A box's default is now a field (Row.default), its "Auto:" text is made from it, andtest_every_box_is_documented_with_the_default_it_showsholds it to the Default column ofdocs/SETTINGS.mdand torun.conf.default, with the box's choices among the documented values. It caught three that had already moved: the frame limit said "Auto: 100 fps" (the old 10 ms clock; it is the title's interval now), the overlay offered1/0where the values arefull/compact/fps/off, and FSR 4 on Series X had no Off to use over a preset.Undocumented switches.
docs/SETTINGS.mdandrun.conf.defaultnow haveVICTORY_AMBIENT_MOST,VICTORY_PLANES,VICTORY_UI_PLANE_720, and the other boxes that had no row (VICTORY_UPSCALER,VICTORY_RENDER_SCALE,VICTORY_NATIVE_INPUT), written from what the code does.policy.rs. Dropped, assert included; the PR no longer touches it.What the rebase found:
run.conf. WithVICTORY_PRESET=highit gaveCONSOLE=series-swith FSR 4 to the output, which does not start; and F1's "Save and restart" ran again with the same arguments, over what the menu had just saved. Auto now goes inVICTORY_AUTO, whichrun.shputs under the preset,run.confand the command line, and the launcher reads the preset as the base.run.conf.default's Series X at 1440p for rowsrun.confleft unset while the run was Series S at 1080p.run.shpasses on the pairs it took, and the menu shows them as those rows' defaults, never writing them.Checked here (RX 6750 XT): profile and size on Auto, F1 showed what the run got, and changing the output in F1 then "Save and restart" brought the game back at the new size, which the Auto argument used to override.
launcher.py: a GTK 4 window for run.sh and run.conf (optional)to launcher.py: an optional GTK 4 launcher, with Auto as a run.sh layer under presets and run.confView 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.Merge
Merge the changes and update on Forgejo.