Skip to content
Snippets Groups Projects

steam: Add support for the custom Steam URI handler in Flatpak

Merged Ludovico de Nittis requested to merge wip/denittis/t22196 into master
1 unresolved thread

Do not report as an issue if the Flatpak version of Steam is the default URI handler.

Also handle the special URI case when s-r-s-i is executed from inside a Flatpak environment.

/cc @smcv

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
485 issues |= SRT_STEAM_ISSUES_MISSING_STEAM_URI_HANDLER;
486 GList *desktop_entries = _srt_list_steam_desktop_entries ();
487 /* If we are running from the Flatpak version of Steam we can't tell
488 * which one is the default `steam` URI handler.
489 * So we just list them all and check if we have the known
490 * "com.valvesoftware.Steam.desktop" that is used in the Flathub's
491 * version of Steam */
492 for (GList *iter = desktop_entries; iter != NULL; iter = iter->next)
493 {
494 if (g_strcmp0 (srt_desktop_entry_get_id (iter->data), "com.valvesoftware.Steam.desktop") != 0)
495 continue;
496
497 /* If we have the desktop entry "com.valvesoftware.Steam.desktop"
498 * with a commandline that starts with "/app/bin/" we are fairly
499 * sure to be inside a Flatpak environment. Otherwise report the
500 * issues about the missing and unexpected Steam URI handler */
  • Comment on lines +497 to +500

    I know that this is not really a bulletproof check but I guess that it would be extremely unlikely to have the desktop entry with the prefix /app/bin/ when outside a Flatpak environment.

  • Please register or sign in to reply
  • This looks good, but I'm going to avoid merging it right now, and wait until after I've combined steam-runtime-tools with pressure-vessel (T22909).

  • Simon McVittie approved this merge request

    approved this merge request

  • Simon McVittie mentioned in commit 89a8234a

    mentioned in commit 89a8234a

  • Please register or sign in to reply
    Loading