From ca4f313d176b9d9c2d346abda04f4dceb62574bd Mon Sep 17 00:00:00 2001 From: TheBiemGamer <47662596+TheBiemGamer@users.noreply.github.com> Date: Thu, 12 Nov 2026 09:45:25 +0000 Subject: [PATCH 1/5] feat(linux): run as a Flatpak In a Flatpak Guild skips update checks (the store updates it), hides the autostart switch (the sandbox can't reach the host's autostart folder), trusts Steam's RunningAppID without the host process it can't see, and names the host's distro in the log. --- src-tauri/src/commands/settings.rs | 4 ++++ ...ngs__tests__settings_payload_snapshot.snap | 1 + src-tauri/src/commands/update.rs | 4 ++++ src-tauri/src/library/steam.rs | 4 +++- src-tauri/src/platform.rs | 23 ++++++++++++++++++- src/lib/Settings.svelte | 18 ++++++++------- src/lib/bindings.ts | 2 ++ 7 files changed, 46 insertions(+), 10 deletions(-) diff --git a/src-tauri/src/commands/settings.rs b/src-tauri/src/commands/settings.rs index 4310bcc..3513247 100644 --- a/src-tauri/src/commands/settings.rs +++ b/src-tauri/src/commands/settings.rs @@ -336,6 +336,8 @@ pub struct SettingsView { start_with_windows: bool, /// Picks the Linux wording where the Windows one names Windows. linux: bool, + /// A Flatpak hides the autostart switch (the sandbox can't reach the host's autostart folder) and update checks. + flatpak: bool, close_to_tray: bool, notify_downloads: bool, app_version: String, @@ -408,6 +410,7 @@ pub async fn settings_view(app: AppHandle) -> Res { gog_cloud_saves: saved.gog_cloud_saves, start_with_windows: app.autolaunch().is_enabled().unwrap_or(false), linux: cfg!(target_os = "linux"), + flatpak: crate::platform::flatpak(), close_to_tray: saved.close_to_tray, notify_downloads: saved.notify_downloads, app_version: app.package_info().version.to_string(), @@ -1070,6 +1073,7 @@ mod tests { gog_cloud_saves: false, start_with_windows: false, linux: false, + flatpak: false, close_to_tray: true, notify_downloads: true, app_version: env!("CARGO_PKG_VERSION").into(), diff --git a/src-tauri/src/commands/snapshots/launcher__commands__settings__tests__settings_payload_snapshot.snap b/src-tauri/src/commands/snapshots/launcher__commands__settings__tests__settings_payload_snapshot.snap index 93bb727..383c625 100644 --- a/src-tauri/src/commands/snapshots/launcher__commands__settings__tests__settings_payload_snapshot.snap +++ b/src-tauri/src/commands/snapshots/launcher__commands__settings__tests__settings_payload_snapshot.snap @@ -29,6 +29,7 @@ expression: view "gogCloudSaves": false, "startWithWindows": false, "linux": false, + "flatpak": false, "closeToTray": true, "notifyDownloads": true, "appVersion": "[version]", diff --git a/src-tauri/src/commands/update.rs b/src-tauri/src/commands/update.rs index ae71980..b5021e1 100644 --- a/src-tauri/src/commands/update.rs +++ b/src-tauri/src/commands/update.rs @@ -21,6 +21,10 @@ pub struct UpdateInfo { #[tauri::command] #[specta::specta] pub async fn check_update(app: AppHandle, state: State<'_, AppState>) -> Res> { + // Flathub updates a Flatpak, which must not update itself. + if crate::platform::flatpak() { + return Ok(None); + } let mut pending = state.update.lock().await; let checked = async { app.updater_builder() diff --git a/src-tauri/src/library/steam.rs b/src-tauri/src/library/steam.rs index 686a669..725f5d0 100644 --- a/src-tauri/src/library/steam.rs +++ b/src-tauri/src/library/steam.rs @@ -68,7 +68,9 @@ pub fn running_game() -> Option { let id = running_id(crate::platform::steam_running_app())?; // After a Steam crash RunningAppID keeps its last value (seen on this PC), so only // trust it while the Steam process it was written by is still alive. - steam_alive(steam_pid()?).then_some(id) + // shortcut: a Flatpak can't see host processes, so there a crash's stale id counts as running until Steam starts + // again; find another liveness signal if that shows up. + (crate::platform::flatpak() || steam_alive(steam_pid()?)).then_some(id) } pub fn download_progress(game: &Game) -> Option { diff --git a/src-tauri/src/platform.rs b/src-tauri/src/platform.rs index e57cef0..de42063 100644 --- a/src-tauri/src/platform.rs +++ b/src-tauri/src/platform.rs @@ -69,6 +69,21 @@ pub fn open_url(url: &str) -> Result<(), crate::library::Error> { shell_open(url) } +/// Windows has no Flatpak. +#[cfg(windows)] +pub fn flatpak() -> bool { + false +} + +/// Whether Guild runs as a Flatpak: the store updates it, and the sandbox hides host processes and the host's +/// autostart folder. +#[cfg(target_os = "linux")] +pub fn flatpak() -> bool { + static FLATPAK: std::sync::LazyLock = + std::sync::LazyLock::new(|| std::path::Path::new("/.flatpak-info").exists()); + *FLATPAK +} + /// Whether process `pid` runs and is named `image` (the name guards against a reused pid). #[cfg(windows)] pub fn pid_is(pid: u32, image: &str) -> bool { @@ -788,7 +803,13 @@ pub fn os_version() -> String { /// sets them, like "CachyOS Linux, KDE, wayland": WebKitGTK and tray bugs often depend on those two. #[cfg(target_os = "linux")] pub fn os_version() -> String { - let distro = std::fs::read_to_string("/etc/os-release") + // A Flatpak's /etc/os-release names its runtime; the host's is under /run/host. + let release = if flatpak() { + "/run/host/os-release" + } else { + "/etc/os-release" + }; + let distro = std::fs::read_to_string(release) .ok() .and_then(|text| pretty_name(&text)) .unwrap_or_else(|| "Linux".into()); diff --git a/src/lib/Settings.svelte b/src/lib/Settings.svelte index c228fad..9ea5223 100644 --- a/src/lib/Settings.svelte +++ b/src/lib/Settings.svelte @@ -1153,12 +1153,14 @@

{t('settings.section.general')}

{t('settings.group.startup')}

- {@render switchRow( - 'power', - 'start_with_windows', - 'startWithWindows', - view.linux ? t('settings.startupLinux') : t('settings.startup'), - )} + {#if !view.flatpak} + {@render switchRow( + 'power', + 'start_with_windows', + 'startWithWindows', + view.linux ? t('settings.startupLinux') : t('settings.startup'), + )} + {/if} {@render switchRow('tray', 'close_to_tray', 'closeToTray', t('settings.tray'), t('settings.trayHint'))} {@render switchRow('bell', 'notify_downloads', 'notifyDownloads', t('settings.notify'))}
@@ -1389,7 +1391,7 @@ {@render tile('about')}
- {versionNote ?? t('settings.version', { version: view.appVersion })} + {(view.flatpak ? null : versionNote) ?? t('settings.version', { version: view.appVersion })}
{#if notes} - {:else} + {:else if !view.flatpak} {/if} diff --git a/src/lib/bindings.ts b/src/lib/bindings.ts index 7384a0f..08a896a 100644 --- a/src/lib/bindings.ts +++ b/src/lib/bindings.ts @@ -688,6 +688,8 @@ export type SettingsView = { startWithWindows: boolean, /** Picks the Linux wording where the Windows one names Windows. */ linux: boolean, + /** A Flatpak hides the autostart switch (the sandbox can't reach the host's autostart folder) and update checks. */ + flatpak: boolean, closeToTray: boolean, notifyDownloads: boolean, appVersion: string, From 8243d8d255c7c3c959f93b0eb650f00b597756e8 Mon Sep 17 00:00:00 2001 From: TheBiemGamer <47662596+TheBiemGamer@users.noreply.github.com> Date: Thu, 12 Nov 2026 09:45:25 +0000 Subject: [PATCH 2/5] build(flatpak): local test manifest, metainfo and desktop file --- DEVELOPMENT.md | 17 ++++ packaging/flatpak/.gitignore | 5 ++ packaging/flatpak/cloud.biem.guild.desktop | 10 +++ .../flatpak/cloud.biem.guild.metainfo.xml | 41 +++++++++ packaging/flatpak/cloud.biem.guild.png | Bin 0 -> 4169 bytes packaging/flatpak/cloud.biem.guild.yml | 82 ++++++++++++++++++ 6 files changed, 155 insertions(+) create mode 100644 packaging/flatpak/.gitignore create mode 100644 packaging/flatpak/cloud.biem.guild.desktop create mode 100644 packaging/flatpak/cloud.biem.guild.metainfo.xml create mode 100644 packaging/flatpak/cloud.biem.guild.png create mode 100644 packaging/flatpak/cloud.biem.guild.yml diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 85db294..5cbd332 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -83,6 +83,23 @@ cd src-tauri && cargo test bindings The database is `library.sqlite`. Schema changes are new migration steps in `src-tauri/src/cache/db.rs`. +## Flatpak + +`packaging/flatpak/` holds a manifest for local test builds. It unpacks an AppImage built from your checkout onto the GNOME runtime, which has WebKitGTK. You need `flatpak` and `flatpak-builder`, and the runtime from Flathub: + +```bash +flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo +flatpak install --user flathub org.gnome.Platform//51 org.gnome.Sdk//51 org.freedesktop.Platform.Compat.i386//26.08 org.flatpak.Builder +npm run tauri build -- --bundles appimage --config '{"bundle":{"createUpdaterArtifacts":false}}' +cp src-tauri/target/release/bundle/appimage/Guild_*_amd64.AppImage packaging/flatpak/Guild.AppImage +cd packaging/flatpak +flatpak-builder --user --install --force-clean --repo=repo build-dir cloud.biem.guild.yml +flatpak build-bundle --runtime-repo=https://dl.flathub.org/repo/flathub.flatpakrepo repo guild.flatpak cloud.biem.guild +flatpak run --command=flatpak-builder-lint org.flatpak.Builder manifest cloud.biem.guild.yml +``` + +Install the bundle on another PC with `flatpak install --user guild.flatpak` (it fetches the runtime from Flathub) and start it with `flatpak run cloud.biem.guild`. In a Flatpak, Guild doesn't check for updates and hides the autostart switch, and it trusts Steam's `RunningAppID` without checking for the Steam process, which the sandbox can't see. It reads Steam folders and installs to `~/Games`, `/mnt`, `/media` and `/run/media`; give it other folders with `flatpak override --user --filesystem= cloud.biem.guild`. + ## Releasing Pushing a `v*` tag runs `.github/workflows/release.yml`: it runs the checks, builds the Windows NSIS installer and the Linux AppImage and `.deb` (on Ubuntu 22.04, so the AppImage runs on older glibc), signs the installer and the AppImage for the updater, and publishes a GitHub release with `latest.json`. A last job writes `latest.json` with both the `windows-x86_64` and `linux-x86_64-appimage` entries. The `.deb` doesn't auto-update: its update check finds no entry for it. The installed app checks `releases/latest/download/latest.json` for updates. Running the workflow by hand only builds and signs, and keeps the files as workflow artifacts. diff --git a/packaging/flatpak/.gitignore b/packaging/flatpak/.gitignore new file mode 100644 index 0000000..f512f27 --- /dev/null +++ b/packaging/flatpak/.gitignore @@ -0,0 +1,5 @@ +Guild.AppImage +.flatpak-builder/ +build-dir/ +repo/ +*.flatpak diff --git a/packaging/flatpak/cloud.biem.guild.desktop b/packaging/flatpak/cloud.biem.guild.desktop new file mode 100644 index 0000000..d08a500 --- /dev/null +++ b/packaging/flatpak/cloud.biem.guild.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Application +Name=Guild +Comment=Your Steam, Epic, GOG and Amazon games in one library +Exec=guild +Icon=cloud.biem.guild +Terminal=false +Categories=Game; +Keywords=Steam;Epic;GOG;Amazon;Proton;launcher;library; +StartupWMClass=Guild diff --git a/packaging/flatpak/cloud.biem.guild.metainfo.xml b/packaging/flatpak/cloud.biem.guild.metainfo.xml new file mode 100644 index 0000000..584f4a9 --- /dev/null +++ b/packaging/flatpak/cloud.biem.guild.metainfo.xml @@ -0,0 +1,41 @@ + + + cloud.biem.guild + CC0-1.0 + GPL-3.0-or-later + Guild + Your Steam, Epic, GOG and Amazon games in one library + + TheBiemGamer + + +

Guild puts your Steam, Epic, GOG and Amazon games in one grid, next to any game you add yourself. A game you own in two stores shows up once, and you pick which store starts it.

+

Epic, GOG and Amazon games install, update, verify and uninstall from Guild itself, through one download queue you can pause and reorder. Epic and GOG cloud saves sync before and after you play. Windows games run through umu-launcher and Proton, each in its own Wine prefix.

+

Each game has a page with its description, screenshots, your playtime and how long it takes to beat. You can sort and filter the library, mark favorites, hide games and make your own collections.

+

Steam games install and start through the Steam client, which stays installed.

+
+ cloud.biem.guild.desktop + https://github.com/TheBiemGamer/guild + https://github.com/TheBiemGamer/guild/issues + + + https://raw.githubusercontent.com/TheBiemGamer/guild/main/docs/screenshot.png + The library grid + + + + + pointing + keyboard + + + 720 + + + + +

Guild runs on Linux. Epic, GOG, Amazon and added Windows games run through umu-launcher and Proton, each game in its own Wine prefix.

+
+
+
+
diff --git a/packaging/flatpak/cloud.biem.guild.png b/packaging/flatpak/cloud.biem.guild.png new file mode 100644 index 0000000000000000000000000000000000000000..a661b6d9ea25268b9c9f8d75fd903a4485e56c31 GIT binary patch literal 4169 zcmb_f`8(8I+&V&+I$8ehl@fP?b*Zdv^omhVRO9|^ zS!tH*i7^(1_Yca*N(|Plk|?~9dD%^-{w^<3T;<1A%zma@(yY|s*n@{uvGVEWD#x=% zzu~28-w6&cEp(pAxb3kM6%?c$>hUY%HZk+pQpM%Jm+H2*7#XxFod6g#CQJzdJOBvi zSug+?@P8Jhi(l3-)H~}dwr2;Lxcl-4c2eJX9#Cs2wJ+_`Elep0_{Y-3E}_9@b2-p% zed2w}j|&_0AM%|%X}7n1w|q4O{L-A0oCJsit^OWpijVVOGA2pkB4`vC-9LG~@$_y9 z-A$fL*E%sK%3A%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eV=rE%#XV+TO$82_!;N0XZM>eV76d%-dB1Td2n45(ZGjCzazl_8E>> zJ;J_u_SAtQy@qNb78)xK|9NaI2XsNj>G+l>M zuO3%fG3&1im$O5WoE@>pDnzKUB&M$U@$CPOh1m7y3)_^*pp5Ti+lr#7=?Qo2M9SVR zuqk2?^F8#FX`z}>XRHan@F2IML&+B?5>#g#$i+IJ6*nAA4rG22pj6Ys{BB012kRzKP7;;v=+b`4$Sh4vm z_d{`{VANw+Q}YV@c(*Pq9f_LI~ga@BY=BqE1lBv4)Tvbu#D`^@^z$GSx833`(&z(@2$X z>?Is7!UJOF{?2`oz1@ZZuDm2Gc`6m81I{ib*r}eG$4&_!7d3q_X*R`<jX!W~)PI z=%V?1%>pjsa@_o04|(n~SY=%t8I#CXROEluKXf|rT`l5$gzQ+UOov7Nw1Sk5G!XM!-wm?ylr#*^sLsTV0xVzZZ_Tsh0Fc z;e8}9w_&RldE|O){DcI^0K5c/dev/null + - install -Dm755 squashfs-root/usr/bin/Guild /app/bin/guild + - mkdir -p /app/lib/i386-linux-gnu/GL + # The tray library; the GNOME runtime has WebKitGTK but not this + - cp -a squashfs-root/usr/lib/libayatana-*.so* squashfs-root/usr/lib/libdbusmenu-*.so* /app/lib/ + - install -Dm644 ld.so.conf -t /app/etc + - install -Dm644 cloud.biem.guild.desktop -t /app/share/applications + - install -Dm644 cloud.biem.guild.metainfo.xml -t /app/share/metainfo + - install -Dm644 cloud.biem.guild.png /app/share/icons/hicolor/256x256/apps/cloud.biem.guild.png + sources: + # Built from this checkout, see DEVELOPMENT.md. A Flathub manifest would point at the release's AppImage. + - type: file + path: Guild.AppImage + - type: inline + dest-filename: ld.so.conf + contents: /app/lib/i386-linux-gnu + - type: file + path: cloud.biem.guild.desktop + - type: file + path: cloud.biem.guild.metainfo.xml + - type: file + path: cloud.biem.guild.png From 710b0381b77be42f0378877d5638e599714c9bca Mon Sep 17 00:00:00 2001 From: TheBiemGamer <47662596+TheBiemGamer@users.noreply.github.com> Date: Thu, 12 Nov 2026 10:17:49 +0000 Subject: [PATCH 3/5] fix(flatpak): the tray icon is written where the host's tray can read it --- src-tauri/src/platform.rs | 20 ++++++++++++++++++++ src-tauri/src/tray.rs | 3 +++ 2 files changed, 23 insertions(+) diff --git a/src-tauri/src/platform.rs b/src-tauri/src/platform.rs index de42063..d01c304 100644 --- a/src-tauri/src/platform.rs +++ b/src-tauri/src/platform.rs @@ -84,6 +84,26 @@ pub fn flatpak() -> bool { *FLATPAK } +/// Windows draws the tray icon itself. +#[cfg(windows)] +pub fn tray_icon_dir() -> Option { + None +} + +/// Where the tray writes its icon for the desktop's tray to read: a Flatpak's own `$XDG_RUNTIME_DIR` is private to +/// the sandbox, but `$XDG_RUNTIME_DIR/app/` is the same folder on the host. `None` keeps tray-icon's default. +#[cfg(target_os = "linux")] +pub fn tray_icon_dir() -> Option { + let runtime = std::env::var_os("XDG_RUNTIME_DIR")?; + let id = std::env::var_os("FLATPAK_ID").filter(|_| flatpak())?; + Some( + std::path::Path::new(&runtime) + .join("app") + .join(id) + .join("tray-icon"), + ) +} + /// Whether process `pid` runs and is named `image` (the name guards against a reused pid). #[cfg(windows)] pub fn pid_is(pid: u32, image: &str) -> bool { diff --git a/src-tauri/src/tray.rs b/src-tauri/src/tray.rs index 2f5eea7..fc7f29d 100644 --- a/src-tauri/src/tray.rs +++ b/src-tauri/src/tray.rs @@ -90,6 +90,9 @@ pub fn build(app: &AppHandle) -> tauri::Result<()> { if let Some(icon) = app.default_window_icon() { tray = tray.icon(icon.clone()); } + if let Some(dir) = crate::platform::tray_icon_dir() { + tray = tray.temp_dir_path(dir); + } tray.build(app)?; Ok(()) } From 87e71f993f00f8b2825237b07663af1da748dc06 Mon Sep 17 00:00:00 2001 From: TheBiemGamer <47662596+TheBiemGamer@users.noreply.github.com> Date: Thu, 12 Nov 2026 10:24:00 +0000 Subject: [PATCH 4/5] fix(flatpak): Windows games run through umu and Proton pressure-vessel failed with "bwrap: Can't find source path": in a Flatpak umu keeps the Steam Linux Runtime in the host's ~/.local/share/umu, which without xdg-data/umu was a tmpfs the Flatpak portal's sub-sandbox can't use, and downloaded again at every launch. Guild now also looks for the runtime there, so a launch only counts as setting up when it is. --- packaging/flatpak/cloud.biem.guild.yml | 3 +++ src-tauri/src/wine.rs | 15 +++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/packaging/flatpak/cloud.biem.guild.yml b/packaging/flatpak/cloud.biem.guild.yml index 73d0114..4eb1844 100644 --- a/packaging/flatpak/cloud.biem.guild.yml +++ b/packaging/flatpak/cloud.biem.guild.yml @@ -28,6 +28,9 @@ finish-args: - --filesystem=~/.steam:ro - --filesystem=xdg-data/Steam:ro - --filesystem=~/.var/app/com.valvesoftware.Steam:ro + # umu keeps the Steam Linux Runtime in the host's ~/.local/share/umu when in a Flatpak; pressure-vessel can only + # hand a folder on the real disk to the Flatpak portal's sub-sandbox it runs games in + - --filesystem=xdg-data/umu:create # The default install folder for Epic, GOG and Amazon games - --filesystem=~/Games:create # Install folders and Steam libraries on other drives diff --git a/src-tauri/src/wine.rs b/src-tauri/src/wine.rs index ea97169..ad6bfc4 100644 --- a/src-tauri/src/wine.rs +++ b/src-tauri/src/wine.rs @@ -314,11 +314,18 @@ pub fn setting_up(key: &str) -> bool { true } -/// umu's own folder, where it keeps the Steam Linux Runtime. +/// umu's own folder, where it keeps the Steam Linux Runtime. In a Flatpak umu skips the sandbox's data folder for the +/// host's (`umu_consts.py`). fn umu_data() -> PathBuf { - directories::BaseDirs::new() - .map(|b| b.data_dir().join("umu")) - .unwrap_or_default() + let host = std::env::var_os("HOST_XDG_DATA_HOME") + .map(PathBuf::from) + .or_else(|| directories::BaseDirs::new().map(|b| b.home_dir().join(".local/share"))); + let data = if crate::platform::flatpak() { + host + } else { + directories::BaseDirs::new().map(|b| b.data_dir().to_path_buf()) + }; + data.map(|d| d.join("umu")).unwrap_or_default() } /// Whether a launch must wait: the prefix hasn't been set up (Proton writes `version` once it has), or umu still has to From 167bf373a9887d0e627228526cb872b9b179ea87 Mon Sep 17 00:00:00 2001 From: TheBiemGamer <47662596+TheBiemGamer@users.noreply.github.com> Date: Thu, 12 Nov 2026 10:39:00 +0000 Subject: [PATCH 5/5] docs(flatpak): a bundle install needs the 32-bit extensions by hand --- DEVELOPMENT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 5cbd332..2a3345c 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -98,7 +98,7 @@ flatpak build-bundle --runtime-repo=https://dl.flathub.org/repo/flathub.flatpakr flatpak run --command=flatpak-builder-lint org.flatpak.Builder manifest cloud.biem.guild.yml ``` -Install the bundle on another PC with `flatpak install --user guild.flatpak` (it fetches the runtime from Flathub) and start it with `flatpak run cloud.biem.guild`. In a Flatpak, Guild doesn't check for updates and hides the autostart switch, and it trusts Steam's `RunningAppID` without checking for the Steam process, which the sandbox can't see. It reads Steam folders and installs to `~/Games`, `/mnt`, `/media` and `/run/media`; give it other folders with `flatpak override --user --filesystem= cloud.biem.guild`. +Install the bundle on another PC with `flatpak install --user guild.flatpak` (it fetches the runtime from Flathub) and start it with `flatpak run cloud.biem.guild`. A bundle has no remote, so Flatpak doesn't fetch the 32-bit extensions Windows games need; install them once with `flatpak install --user flathub org.freedesktop.Platform.Compat.i386//26.08 org.freedesktop.Platform.GL32.default//26.08` (on NVIDIA, the `GL32.nvidia-*` that matches the driver instead of `GL32.default`). In a Flatpak, Guild doesn't check for updates and hides the autostart switch, and it trusts Steam's `RunningAppID` without checking for the Steam process, which the sandbox can't see. It reads Steam folders and installs to `~/Games`, `/mnt`, `/media` and `/run/media`; give it other folders with `flatpak override --user --filesystem= cloud.biem.guild`. ## Releasing