-
-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to pass arguments for scripts to run before and after a game is launched #3691
Comments
I've looked into the code and came up with the following patch to pass some additional useful information (game title and executable path) to the pre/post launch script using environment variables. It gets the job done and it is a very small code change that will add more possibilities and convenience for the scripts (e.g: using only one script for several different games and execute different actions depending on the game title or executable file):
This wouldn't fulfill the feature request completely but it's a good step forward. Thanks |
@casasfernando I have the same issue and I would be interested in such PR. |
I will submit this and hopefully it will get approved and merged. |
I would like that too, in my case I made a script to record the screen or activate an instant replay feature depending on the argument I pass to it, this works nice in lutris or steam, but whenever I try to pass an argument to a script in heroic it stays in "launching" forever. |
this was included in the 2.15.0 release |
Problem description
I need to use a pre-launch/post-exit scripts (#3565 - #2507) with my games to be able to do some work for the games to run correctly in my environment and then clean up after the game exits.
At the moment is only possible to select the pre-launch/post-exit script but I couldn't find a way to also pass some arguments to the scripts, like the game name or game prefix path, or any other arbitrary one.
Without this I will have to keep separate scripts for each game since all would require a little twist specific to the game.
Feature description
I would like to be able to pass arguments to the scripts so I can only have on pre-launch and one post-launch or even just one script that can run differently accordingly to the arguments passed that would be different if the script is executed before launching the game or after it exits.
In terms of implementation it can be something similar to what Windows does with shortcuts, that means full script path in double quotes, followed by arguments. E.g.: "/path/to/pre-launch/script.sh" arg0 arg1 argX
Another, I think better, option would be to have something similar to the wrapper command in the same settings page, where there are two fields: wrapper and arguments. In this case it would be script and arguments.
Alternatives
I tried to check if the application is passing any game related information in the environment variables or default arguments when running the scripts but it doesn't.
Having some information through environment variables or even default arguments, containing the game name and/or the game prefix path would be a nice to have.
Additional information
No response
The text was updated successfully, but these errors were encountered: