Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support setting wrapper command #82

Open
MithicSpirit opened this issue Nov 2, 2024 · 2 comments
Open

Support setting wrapper command #82

MithicSpirit opened this issue Nov 2, 2024 · 2 comments

Comments

@MithicSpirit
Copy link

It would be nice if we could set a wrapper command. This would be useful for #68 (they could make the wrapper command be env GDK_SCALE=2 GDK_DPI_SCALE=0.5), as well as for using tools like https://github.com/FeralInteractive/gamemode and https://github.com/ValveSoftware/gamescope.

@Adamcake
Copy link
Owner

Adamcake commented Nov 3, 2024

Bolt doesn't currently have a launch command per se, it uses either POSIX execv or Windows CreateProcessW. So a wrapper command would need me to change the way games are launched, or to implement a shell that can interpret all valid commands on all platforms (I'm definitely not doing that though).

If it's just for setting environment variables then it seems like it'd be much easier for you to either set them in your env globally or set them using flatseal? The only other advantage that I know of for launch commands is tools like obs-vkcapture, but even that would perform better if implemented as a plugin instead of a launch script (and wouldn't work on RS3 anyway due to an anticheat.) Are there any other use-cases than those?

@MithicSpirit
Copy link
Author

gamemode and obs-vkcapture both work via LD_PRELOAD, so they could, in theory, be set like other environment variables, though it would still probably be better to have them as plugins (the flatpak override method works fine, but doing it globally is probably a bad idea considering that would mean everything would run with that, which makes gamemode redundant). The main thing that would need a plugin is gamescope, which must be run as a wrapper.

The issue I see with this solution is that I don't think it scales that well, as it means that any wrapper that someone is interested in would need to be manually added into the program. Maybe it would be better to rework internals to use system() (/bin/sh on Linux or cmd.exe on Windows), in which case the wrapper could be implemented similarly to how steam does it.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants