Skip to content
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

[Request] Pre-run scripts #2274

Open
senolfeldmann opened this issue Nov 14, 2022 · 4 comments · May be fixed by #3336
Open

[Request] Pre-run scripts #2274

senolfeldmann opened this issue Nov 14, 2022 · 4 comments · May be fixed by #3336

Comments

@senolfeldmann
Copy link

    This feature ended as a "before run" script.

Originally posted by @mirkobrombin in #948 (comment)

I cannot find this function in the current version. Pre-run scripts would be great to have. How I would use this feature: Currently, I have several retro games which benefit from having the desktop resolution switched to 640x480 while using nvidia gpu scaling via metamodes. I have a command for this, and also a command for switching back to my desired resolution after playing. I currently launch these games via shell-scripts which switch to the gaming resolution, launch the game via bottles-cli. Switching back can be done via the post-run script function of bottles. If there was a pre-run script function, I could reference one script for switching to my nvidia metamode for all games which need the same resolution. Also, launching the games from desktop shortcuts or from steam (xdg-open) would be more seamless.

@mirkobrombin
Copy link
Member

In the program context menu -> Launch options

image

@duarm
Copy link

duarm commented Nov 15, 2022

This request was about a "Pre" run, not a "Post" run, found myself in need of the same feature.

@lunalucadou
Copy link

I am trying to mount an ISO prior to launch and I cannot get it to work using the command arguments field. gnome-disk-image-mounter ../disk.iso && %command% hangs (no terminal output) and gnome-disk-image-mounter ../disk.iso; %command% launches the application without mounting the ISO (causing the application to error).

We need a dedicated pre-launch script field.

Pointing to command arguments isn't a good argument against a dedicated field since you should be able to do what the post-run script field does with %command% && post-launch-cmd, yet we still have a dedicated field for it.

@cybin
Copy link
Contributor

cybin commented Apr 4, 2024

I need that too, so I started working on that. Now I'm at the point where my post-/pre-run script is being executed. Some tests are still required, but I'm convinced to provide a PR for it somewhen at the weekend.

Anyway, it's quite confusing with all the execution paths in Bottles, so it certainly is not finished yet. These changes will need to be reviewed and someone may point me into the right direction to get it finished.

But since you are waiting for this that long, I thought it might be some good news to you.

@cybin cybin linked a pull request Apr 6, 2024 that will close this issue
4 tasks
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 a pull request may close this issue.

5 participants