Repository navigation
Preserve quoted launch options when editing CrossOver settings - #11
Conversation
|
I am having claude code review this pr as i make changes for code quality |
LaganYT
left a comment
There was a problem hiding this comment.
Review pass 1: make all, make panel-behavior and make webpatch-fixtures pass locally, and the tokenizer handles every quote and escape case in the tests. I found one behavior mismatch with compat_run.sh, one open question about Steam's tokenizer, and one whitespace nit. Details are inline.
|
Live Steam results on macOS, using Zuma Deluxe (3330) with the notproton compat tool. Steam's argv comes from 1. Quoting: Steam decodes the options the way
2. Assignments before The panel wrote exactly this whenever the options contained 3. Assignments after Fixed in 90551b3: when |
|
Live panel test: deployed 90551b3 into Steam with
Launching with the options the panel wrote ( |
|
@NotProtonNot This pr is ready for review :) |
|
Roadmap: this PR contributes to two items on the Roadmap (short term):
It doesn't fully complete either item. Non-Preview CrossOver support and the rest of the environment-variable work are still the maintainer's (per #7). |
|
Is this still relevant with the changes in the dev branch? Haven't had a second to review it so I am asking. If you don't know/haven't looked at the dev branch, no big deal - I'll look tomorrow. |
|
Partially. Dev's shell-based launch handling (e9f97f7) makes the "assignments after |
90551b3 to
84f1b0d
Compare
It's still early. There is still work to do, including with the toggles. Talk to me about the "duplicate assignments" and "quoted values" stuff, what do you mean exactly? |
|
Concrete cases. I ran dev's emitted panel through the panel-behavior test setup and the options through Quoted values. The panel splits on spaces and reads the raw text after
Duplicate assignments. With Game arguments. The PR branch gets all of these right. Happy to adjust when you get to the toggle work. |
f94eb37 to
614d455
Compare
98b25c7 to
5ca692a
Compare
|
Merge complete :) |
Summary
Rebased onto
dev. It now uses dev's shell-based launch handling (e9f97f7).Editing CrossOver settings now handles quoted and escaped launch-option assignments while preserving unrelated text. Only unquoted
NAME=valuetokens before%command%count as assignments, because that's what the shell treats as environment. Tokens after%command%are game arguments and are left alone. Duplicate assignments use the last value, matching the shell.When the options have no
%command%, Steam passes them to the game, so the panel reads nothing from them. Writing a setting adds%command%the way dev already does. Leading assignments written by earlier versions of this panel are still cleaned up.Unfinished quotes or escapes, shell operators (
; & | < > ( ) ` #) and unquoted line breaks disable editing, with a message explaining how to restore it. The panel can't safely tell what the shell will run in those cases.Evidence
MTL_HUD_ENABLED="1" %command%appeared unchecked, removing a quoted assignment containing spaces could leave part of its value behind, and%command% --title MTL_HUD_ENABLED=1showed the toggle as on (and turning it off deleted the game argument).After: regression tests in
launch-options.jscheck these cases in both supported Steam UI shapes: quoted values, escapes, quoted names, duplicate assignments, game arguments after%command%, options without%command%, backend switching, shell operators and incomplete input.behavior.jsnow puts%command%on its fixtures, since on dev assignments without it are game arguments.make all panel-behavior webpatch-fixturespasses.compat_run.shpath.Merge Danger
Door: two-way
Revert the commit to restore the previous panel behavior. No migrations or launcher changes.
Blast Radius: compatibility
Changes affect launch-option reads and writes from the injected CrossOver controls in both supported Steam UI layouts.