Add full complement of key/value pairs to Desktop Entry file #18101
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR extends the RetroArch desktop entry file—responsible for integrating the app with
Linux desktop environments—to include all relevant properties present in the most recent version of the specification. Some notable aspects are:
TryExec
/Exec
: TryExec should contain the canonical path to the executable, however I was unable to identity a robust mechanism for populating the correct value at build time, so we fallback to/usr/bin
here. To Exec we add the%F
token, signifying that RA is a "file handler" so that users are allowed to drag one or more files over the launcher entry which are converted into arguments appended to the invocation command.MimeType
: This key determines which file extensions the system should offer to open with RA. It should be periodically reviewed for any new MIME registrations which need to be represented going forward. The value present here represents a fairly exhaustive search of the current IANA-registered types cross-referenced using the official RetroArch documentation's list of supported file extensions for all currently-distributed cores.PrefersNonDefaultGPU
: Linux by default offers hardware to processes in order from least capable to most performant. This key reverses that behavior so more demanding emulation cores will run more smoothly.SingleMainWindow
: Changes the default behavior when the launcher is clicked while an instance is already running from launching a second instance to bringing forward the main window of the already running instance.References
Version 1.5 (the most recent) of the Freedesktop.org Desktop Entry Specification was the authoritative reference for these changes.
Related Issues
Closes #17347.
Related Pull Requests
These changes were initially identified during an (unsolicited) audit of the desktop entry file within Pull Request #16449 (review); additional notes can be found there.
Author's Notes
Heartfelt thanks go out to @RobLoach for opening the above-linked issue which indicated that these changes might be received as a welcome enhancement to the project, to which my participation thus far has largely been confined to the stewardship of the Debian package repositories and related CI/CD systems on Launchpad.net.