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

Modding: Update .desktop file generation #756

Merged
merged 11 commits into from
Mar 6, 2023
Merged

Conversation

sonic2kk
Copy link
Owner

@sonic2kk sonic2kk commented Mar 4, 2023

This may improve/fix link handling, mainly for MO2 and Vortex, following discussion in #637. May also help HMM support. It makes the following changes to the .desktop files for each:

  • Set NoDisplay=false
  • Add Hidden=false

.desktop files may need to be re-created. We could probably add a command to re-generate them, something steamtinkerlaunch mo2 <something> (not sure what the command name should be just yet).

Looking at the code it seems there may be some logic to check if the files are up-to-date already, but adding the option would do no harm imo :-)

If all goes to plan this will go into the next release.

TODO:

  • Test on Linux Desktop (from me and hopefully other users)
  • Test on Steam Deck (user tested, seems to work, will wait for more feedback though)
  • Set icon(?) if .desktop entry appears in application list
  • Update help screen

Set 'NoDisplay' to 'false'
Add 'Hidden' attribute and set it to 'false'

This may improve/fix link handling, mainly for MO2 and Vortex, following discussion in #637.

Untested for now.
@sonic2kk
Copy link
Owner Author

sonic2kk commented Mar 4, 2023

As suspected this creates a XDG menu entry. Probably for MO2 and Vortex we could just start them normally with these files, e.g. if no URL is passed then we could call their respective start functions. on second thought, I will instead log and show a notifier that this is not how you're meant to use MO2 and Vortex. I don't want to attempt to retroactively fit this kind of support it and then attempt to debug issues that will inevitably rise. It may be confusing at first but we can document this on the wiki, and the notifier should help too.

For HMM it isn't so straightforward. We could just log and show a notifier saying that this one should not be used.

@sonic2kk sonic2kk marked this pull request as ready for review March 4, 2023 21:13
@sonic2kk
Copy link
Owner Author

sonic2kk commented Mar 4, 2023

Pushed a change that shows an error dialog if steamtinkerlaunch <mod_tool> u is called without a URL argument (i.e. if it's called from the .desktop file entry without a URL passed). This should inform users that this is not valid usage.

More testing is needed here to ensure that this PR is ready, I want to ensure there are no regressions. But this seems like it will at least massively help with the MO2/Vortex link downloading support, so I am hoping this will require minimal extra work.

The icon thing is going to be fun to figure out for Vortex/MO2 given that so their mime stuff is shared... No it's not I can't read, should be straightforward if they come with icons.

Set categories to Utilities
Set icon to STL icon, hopefully discouraging use but making them easy to identify in browser application handlers.
@sonic2kk
Copy link
Owner Author

sonic2kk commented Mar 4, 2023

Icon has been set to the STL icon as a compromise, as Vortex at least doesn't seem to come with an icon. Using the STL icon will also hopefully make it identifiable in the browser application menu thing, while also discouraging use from the application menu.

As well as this, the category has been changed from "Games" to "Utilities". Hopefully this also makes it clearer that these files are not to be used.

@sonic2kk sonic2kk linked an issue Mar 4, 2023 that may be closed by this pull request
@sonic2kk
Copy link
Owner Author

sonic2kk commented Mar 5, 2023

Might also be an idea to add/update the comments for these .desktop files to further emphasise that they should not be used.

@sonic2kk
Copy link
Owner Author

sonic2kk commented Mar 6, 2023

Merge conflicts...

@sonic2kk sonic2kk merged commit b623c9a into master Mar 6, 2023
@sonic2kk sonic2kk deleted the a-link-to-the-past branch March 6, 2023 20:32
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.

Vortex & MO2 Not Handling NXM Links
1 participant