-
Notifications
You must be signed in to change notification settings - Fork 72
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
Update flatpak .desktop generation #880
Conversation
The flatpak version of steamtinkerlaunch resolves its realpath to be `/app/utils/bin/steamtinkerlaunch`, which is incorrectly set in a .desktop shortcut. The shortcut should be directed to `flatpak run --command=steamtinkerlaunch com.valvesoftware.Steam <args>` instead.
Thanks a bunch for opening a PR! It's nice to see someone able to help out with the Flatpak side :-) To confirm, this is related to the 1-click mod install buttons, correct? And maybe this is silly to ask for the sake of being explicit, could you mention the problem you faced and that this change fixed it? I don't use Flatpak Steam so I don't use Flatpak STL either, so if you can confirm the problem this fixed I'm happy to merge this! The changes look good to me and ShellCheck is all good too. |
This is related to both the 1-click mod install buttons, and HMM has its own launcher .desktop shortcut as well.
When attempting to launch The correct syntax for running commands within flatpak environments is Example execution via terminal:
For the 1-click install buttons, I will need to experiment just a little bit more because I switched to gnome very recently, and the MIME stuff is handled just slightly differently than I'm used to. |
Thanks for the clarification. This all makes sense then, looks good to merge to me. I appreciate the detail too! I will go out on a limb and guess the path generation is wrong and Flatpak only because it tries to resolve the path inside Flatpak? But either way this fix looks correct to me and makes sense.
My recommendation is to avoid these buttons at all costs, on any operating system, and all I can tell you is that no one apart from me has ever reported that these work either for HMM, MO2, or Vortex. Maybe you'll have success but this is a friendly heads up that it is expected that this will not work. I will merge this now, thanks! |
I modified the commit message slightly just to note that this is for mod tools, I hope that is okay. Thanks again! Credit has also been given in the changelog. |
I did get it to work with Reloaded-II for Persona mods, but that one was an .exe that is run via Protontricks Launcher in the same prefix environment rather than being standalone like anything STL installs. For that, the .desktop handler needs to also be added to This will be a later task, and if I manage to get it to work, I'll file another PR. Thanks! |
The flatpak version of steamtinkerlaunch resolves its realpath to be
/app/utils/bin/steamtinkerlaunch
, which is incorrectly set in a .desktop shortcut, i.e.,Exec=/app/utils/steamtinkerlaunch/bin/steamtinkerlaunch hedgemodmanager start auto "%u"
The shortcut should be directed to
flatpak run --command=steamtinkerlaunch com.valvesoftware.Steam <args>
instead.The changes are directed to adding an
if
condition that changes theExec=
line based on whether[ $INFLATPAK -eq 1 ]
, such that if stl is running in a flatpak environment, the appropriate flatpak command is used