Skip to content

Add an executable picker using standard launch options - #221

Open
LaganYT wants to merge 6 commits into
NotProtonNot:mainfrom
LaganYT:feat/custom-game-executable
Open

LaganYT wants to merge 6 commits into
NotProtonNot:mainfrom
LaganYT:feat/custom-game-executable

Conversation

@LaganYT

@LaganYT LaganYT commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Adds Browse, Start In, and Reset to the Compatibility panel. The picker writes ordinary shell launch options that replace the game executable while preserving the compatibility tool, arguments, prefix, and Steam identity.

No runtime launch changes. Tested through /bin/sh and /bin/dash, plus panel, routing, environment, and webpatch checks. Linux and Elden Ring with Mod Engine 2 have not been tested end to end.

@LaganYT
LaganYT marked this pull request as draft October 19, 2026 19:40
@NotProtonNot

NotProtonNot commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

I'd love to improve documentation, but documentation must be written by hand. Not necessarily by me personally, but by a human.

Lets a game launch a different .exe or .bat (e.g. Mod Engine 2's
launchmod_eldenring.bat) in its own prefix, with its settings and Steam IDs.
The choice is stored in Launch Options as NOTPROTON_EXE and
NOTPROTON_START_DIR, which compat_run.sh swaps in for the game's program.
@LaganYT
LaganYT marked this pull request as ready for review October 20, 2026 00:18
@NotProtonNot

NotProtonNot commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Does the way this functionality was implemented match how the same functionality works on Linux? The systems that Linux users use to launch arbitrary binaries inside a game's prefix (there are many different ways) should all work under NotProton with zero changes.

Please give a mod's 'here's how to run on Linux>' instructions a try. If they are not working under NotProton but do work under Linux, I'd want to know. High priority fix for issues like that.

@LaganYT

LaganYT commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

Fair point on the docs, I'll drop the README change.

On Linux parity: I tried the usual Linux launch options for swapping the game's exe, bash -c 'exec "${@/eldenring.exe/launchmod_eldenring.bat}"' -- %command% and the echo "%command%" | sed ... | sh version. Both already work in NotProton without this PR. The .bat runs in the game's prefix with the Steam app ID.

The one catch is Mod Engine 2's .bat runs .\modengine2_launcher.exe, so it has to start from its own folder. Proton's steam.exe doesn't change folder for a .bat, so it starts in the game folder, and NotProton does the same. Unpacking ME2 into the game folder works. That matches Proton, so I don't think NotProton needs a change for this.

Since launch options already cover it, the Executable setting here would be a NotProton-only way of doing the same thing. I'll close this unless you think it's still worth having.

@NotProtonNot

Copy link
Copy Markdown
Owner

Fair point on the docs, I'll drop the README change.

On Linux parity: I tried the usual Linux launch options for swapping the game's exe, bash -c 'exec "${@/eldenring.exe/launchmod_eldenring.bat}"' -- %command% and the echo "%command%" | sed ... | sh version. Both already work in NotProton without this PR. The .bat runs in the game's prefix with the Steam app ID.

The one catch is Mod Engine 2's .bat runs .\modengine2_launcher.exe, so it has to start from its own folder. Proton's steam.exe doesn't change folder for a .bat, so it starts in the game folder, and NotProton does the same. Unpacking ME2 into the game folder works. That matches Proton, so I don't think NotProton needs a change for this.

Since launch options already cover it, the Executable setting here would be a NotProton-only way of doing the same thing. I'll close this unless you think it's still worth having.

Is there a UX benefit to your approach? Is there a way to offer that UX benefit to a user without altering how launches work (unless that altering is to match how things work under Proton)?

@LaganYT

LaganYT commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

The benefit is the picker. Writing the right Linux one-liner, getting the bash quoting right, and knowing the game's exe name is the hard part for most people, and Reset puts it back.

I think the panel can keep that without changing launches. Instead of setting its own variable, Browse would write a normal Linux-style launch option, along the lines of cd '/path/to/ModEngine2' && bash -c 'exec "${@/*eldenring.exe//path/to/ModEngine2/launchmod_eldenring.bat}"' -- %command%. The cd is what makes Start In work. Proton doesn't change folder, so that matches Linux too. The run script would go back to how it is on main, and the launch option would work as-is in Steam on Linux.

If that sounds right I'll rework the PR that way.

@NotProtonNot

NotProtonNot commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

The benefit is the picker. Writing the right Linux one-liner, getting the bash quoting right, and knowing the game's exe name is the hard part for most people, and Reset puts it back.

I think the panel can keep that without changing launches. Instead of setting its own variable, Browse would write a normal Linux-style launch option, along the lines of cd '/path/to/ModEngine2' && bash -c 'exec "${@/*eldenring.exe//path/to/ModEngine2/launchmod_eldenring.bat}"' -- %command%. The cd is what makes Start In work. Proton doesn't change folder, so that matches Linux too. The run script would go back to how it is on main, and the launch option would work as-is in Steam on Linux.

If that sounds right I'll rework the PR that way.

Now we're talking. Yeah, that's the way. I think that is worth doing & would be a fairly easy merge on my end.

The launch arguments system is complex, be warned. I have plans to make it less hellish, but it's currently fairly hell. Fair warning!

@LaganYT
LaganYT marked this pull request as draft October 20, 2026 13:13
@LaganYT LaganYT changed the title Document custom game launch targets and test identity preservation Add an executable picker using standard launch options Oct 20, 2026
@LaganYT

LaganYT commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

Reworked it that way. The picker now writes ordinary shell launch options, and the runtime script matches main. Browse, Start In, and Reset are still there.

The checks pass under /bin/sh and /bin/dash, including quoting, arguments, working directory, settings, and Steam identity. I haven’t tested it on Linux or with Elden Ring and Mod Engine 2 end to end as I do not own those games.

@NotProtonNot

Copy link
Copy Markdown
Owner

Will review and merge soon.

@LaganYT
LaganYT marked this pull request as ready for review October 20, 2026 19:11
@NotProtonNot

Copy link
Copy Markdown
Owner

Forgot to do this. Up late for some reason, will actually do this maybe in the morning...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants