Skip to content

Conversation

@evertonstz
Copy link

@evertonstz evertonstz commented Oct 12, 2025

This pull request adds support for passing arguments to pre-run and post-run scripts in the Bottles application. It introduces new fields for script arguments in both the backend and frontend, updates the command construction logic to handle these arguments securely, and enhances the launch options dialog to allow users to specify them.

When no script is selected, we get the default ui (post-script in the screenshot), once the user select a scritp, we get a new field to optionally add the desired flags (pre-script in the screenshot)

I've also exposed some config information to be used as placeholder to make common information easily available for commands, supported placeholders are:

  • %PROGRAM_NAME%
  • %PROGRAM_PATH%
  • %PROGRAM_DIR%
  • %BOTTLE_NAME%
  • %BOTTLE_PATH%

I'm using it to run ludusavi backups and restores as post and pre hooks :)

image

…ineProgram

Enhance the WineCommand and WineProgram classes to accept pre-run and post-run script arguments. Update the UI to include fields for these arguments in the launch options dialog.
@evertonstz evertonstz marked this pull request as draft October 12, 2025 18:52
@evertonstz evertonstz marked this pull request as ready for review October 12, 2025 19:14
@evertonstz evertonstz marked this pull request as draft October 12, 2025 19:37
@evertonstz evertonstz marked this pull request as ready for review October 12, 2025 21:37
@evertonstz evertonstz marked this pull request as draft October 12, 2025 21:37
@evertonstz evertonstz marked this pull request as ready for review October 12, 2025 22:12
@evertonstz evertonstz changed the title Add support for pre-run and post-run script arguments Add support for pre-run and post-run script arguments and argument placeholders Oct 12, 2025
@mirkobrombin
Copy link
Member

Thanks for your MR. Can you fix the conflict here please?

@evertonstz
Copy link
Author

Thanks for your MR. Can you fix the conflict here please?

Done! Tested locally again it is working.

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