Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,11 @@ No UI text below 11px. Counts and numbers use tabular figures. Folder paths in t
- **Toolbar,** left to right: search, store selector, Installed, active filter chips, Filters, spacer, Sort, Update (only when one is ready), Downloads (only while something downloads), Add a game, Settings. No sidebar.
- **Settings:** a modal panel, max 760px wide, with a 190px section list on the left (stacked under 640px) that works as vertical tabs: only the chosen section shows, from its top. Sections: Accounts (Stores, then Game data with IGDB and SteamGridDB), General, About. Each section is a title, then Label headings over one rounded `glass` group per heading, its rows split by `glass-line` rules. Never a box per row. About opens with the 64px app logo beside Guild and its version, the acronym in small italic `text-3`, one line on what Guild is for, and Source code · GPL-3.0 · Credits (the README's Thanks); its Updates row then says only what the last check found. On Linux a Wine section sits between General and About (Windows never shows it), direction A (2026-11-09):
- The top group: an umu-launcher row with Install only while umu is missing, then Proton for Windows games, one menu (Newest, naming the build that is now, then each build) with the subtitle that a game's own choice in Launch options comes first.
- Game tools: Gamescope, MangoHud and GameMode, one switch row each (name, one line on what it does), off by default, and a note that a game's own choice in Launch options comes first. A tool that isn't installed shows its switch disabled and "Not installed" in the row, or in the Flatpak the Flathub extension to install.
- Proton builds: one row per build, by a readable name where the folder name allows ("Proton-CachyOS 11.0 (v3)", `protonName` in `format.ts`), with an accent "in use" tag on the build games run with, a "Steam" tag on Steam's, its size once measured, and Remove with an inline confirm for Guild's own only. The last row, Install another build, folds out one panel with a GE-Proton / Proton-CachyOS segmented control and that source's releases, each with Install (its percent while it runs) or Installed.
- Prefixes: the heading carries the count and total size on the right. One row per game prefix with its name (the copy key and "Game no longer in your library" once the game is gone), its size once measured, and a ⋯ menu with Open folder, winecfg, winetricks (disabled when neither the system nor any Proton build has it; a note under the group says why) and Remove…, which asks in the row that saves in it are lost unless cloud saves are on, with focus on Cancel.
- Rows in these two lists are one height, with or without a button.
- **Game page:** covers the content area while the library stays mounted underneath, so its scroll position survives. A column up to 1360px: the 300px hero, a tab row (Overview, DLC, Saves, Launch options, Installation); on Linux, Launch options adds a Proton menu chip (Default follows Settings), also for added games, where it is the only row, and never for a native Linux GOG build. A Windows game's first launch on Linux shows Setting up… in the busy pill, the card badge and Continue until its program runs, with the percent while its Play downloads umu-launcher or GE-Proton first. Once a Windows game has run on Linux, Installation gets a Wine prefix row with Open, winecfg and winetricks (disabled with the same reason as in Settings); never for a native Linux build, and never Remove, which stays in Settings and the uninstall confirm. Its uninstall confirm offers an Also remove its Wine prefix checkbox, off by default, then three fact tiles and an About / Details grid (1.7fr / 1fr).
- **Game page:** covers the content area while the library stays mounted underneath, so its scroll position survives. A column up to 1360px: the 300px hero, a tab row (Overview, DLC, Saves, Launch options, Installation); on Linux, Launch options adds a Proton menu chip (Default follows Settings), also for added games, and never for a native Linux GOG build; then Gamescope, MangoHud and GameMode rows, each a Default / On / Off menu chip (Default follows Settings), for every game including native ones; a tool that isn't installed shows a disabled Off chip and "Not installed". A Windows game's first launch on Linux shows Setting up… in the busy pill, the card badge and Continue until its program runs, with the percent while its Play downloads umu-launcher or GE-Proton first. Once a Windows game has run on Linux, Installation gets a Wine prefix row with Open, winecfg and winetricks (disabled with the same reason as in Settings); never for a native Linux build, and never Remove, which stays in Settings and the uninstall confirm. Its uninstall confirm offers an Also remove its Wine prefix checkbox, off by default, then three fact tiles and an About / Details grid (1.7fr / 1fr).

## Elevation and shapes

Expand Down
4 changes: 2 additions & 2 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ You need [Node.js](https://nodejs.org) 24 or later, [Rust](https://rustup.rs) st
sudo apt install libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev libxdo-dev libssl-dev patchelf build-essential
```

On Arch: `webkit2gtk-4.1 libayatana-appindicator librsvg xdotool base-devel`. At runtime Linux also needs `python3` (the Linux builds of Legendary and gogdl run on it), `xdg-open`, and a Secret Service provider such as GNOME Keyring or KWallet for the saved secrets. Windows games run through `umu-run` (from PATH, or downloaded in Settings or by the first Play that needs it) and a Proton build: GE-Proton in Steam's `compatibilitytools.d`, Steam's own Proton, or GE-Proton and Proton-CachyOS installed from Settings → Wine; with none, Play installs the newest GE-Proton. Each game gets its own Wine prefix under `<data>/prefixes/<copy key>`; uninstalling a game keeps it unless the owner ticks the option to remove it, since its saves live there. Settings → Wine lists and removes prefixes. The pinned umu-launcher version and hash are in `src-tauri/src/wine.rs`.
On Arch: `webkit2gtk-4.1 libayatana-appindicator librsvg xdotool base-devel`. At runtime Linux also needs `python3` (the Linux builds of Legendary and gogdl run on it), `xdg-open`, and a Secret Service provider such as GNOME Keyring or KWallet for the saved secrets. Windows games run through `umu-run` (from PATH, or downloaded in Settings or by the first Play that needs it) and a Proton build: GE-Proton in Steam's `compatibilitytools.d`, Steam's own Proton, or GE-Proton and Proton-CachyOS installed from Settings → Wine; with none, Play installs the newest GE-Proton. Gamescope, MangoHud and GameMode (`gamescope`, `mangohud`, `gamemoderun` on PATH) wrap Windows and native games when switched on in Settings → Wine or a game's Launch options. Epic, GOG and Amazon Windows games also get the environment variables Heroic's [known fixes](https://github.com/Heroic-Games-Launcher/known-fixes) list for them (by store id, cached for a day; not its winetricks verbs). Each game gets its own Wine prefix under `<data>/prefixes/<copy key>`; uninstalling a game keeps it unless the owner ticks the option to remove it, since its saves live there. Settings → Wine lists and removes prefixes. The pinned umu-launcher version and hash are in `src-tauri/src/wine.rs`.

```bash
npm install
Expand Down Expand Up @@ -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`. 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=<path> 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, asks the desktop portal's Background interface to start it on login (the desktop may ask first), and it trusts Steam's `RunningAppID` without checking for the Steam process, which the sandbox can't see. For MangoHud and gamescope, install their Flathub extensions: `flatpak install --user flathub org.freedesktop.Platform.VulkanLayer.MangoHud//26.08 org.freedesktop.Platform.VulkanLayer.gamescope//26.08`; GameMode needs only the `gamemoded` daemon on the host. It reads Steam folders and installs to `~/Games`, `/mnt`, `/media` and `/run/media`; give it other folders with `flatpak override --user --filesystem=<path> cloud.biem.guild`.

## Releasing

Expand Down
5 changes: 5 additions & 0 deletions packaging/flatpak/cloud.biem.guild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ finish-args:
- --talk-name=org.kde.StatusNotifierWatcher
# Download-finished notifications
- --talk-name=org.freedesktop.Notifications
# MangoHud and gamescope from their Flathub Vulkan layer extensions, when installed; gamemoderun is in the runtime
- --env=PATH=/app/bin:/usr/bin:/usr/lib/extensions/vulkan/MangoHud/bin:/usr/lib/extensions/vulkan/gamescope/bin
- --env=LD_LIBRARY_PATH=/usr/lib/extensions/vulkan/gamescope/lib
- --filesystem=xdg-run/gamescope-0
- --filesystem=xdg-config/MangoHud:ro
# Steam: its library, pid, registry.vdf and art (regular and Flatpak Steam); Guild never writes there
- --filesystem=~/.steam:ro
- --filesystem=xdg-data/Steam:ro
Expand Down
1 change: 1 addition & 0 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ tracing-subscriber = { version = "0.3", default-features = false, features = ["f

[target.'cfg(windows)'.dependencies]
windows-native-keyring-store = { version = "1.1", default-features = false }
windows-sys = { version = "0.61", features = ["Win32_Foundation", "Win32_Globalization", "Win32_Security", "Win32_Storage_FileSystem", "Win32_System_Diagnostics_ToolHelp", "Win32_System_JobObjects", "Win32_System_Threading"] }
windows-sys = { version = "0.61", features = ["Win32_Foundation", "Win32_Globalization", "Win32_Security", "Win32_Storage_FileSystem", "Win32_System_Diagnostics_ToolHelp", "Win32_System_JobObjects", "Win32_System_Power", "Win32_System_Threading"] }
winreg = "0.56"

[target.'cfg(target_os = "linux")'.dependencies]
libc = "0.2"
zbus = "5"
zbus-secret-service-keyring-store = { version = "1", features = ["rt-async-io-crypto-rust"] }

[build-dependencies]
Expand Down
23 changes: 18 additions & 5 deletions src-tauri/src/commands/game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,8 +594,8 @@ fn act_custom(state: &AppState, action: Action, game: &Game) -> Res<()> {
let row =
cache::db::custom_game(&conn, &game.external_id)?.ok_or(msg!(gameNotInLibrary))?;
let key = game.key();
let proton = launch_options_of(&conn, &game.key()).proton;
crate::library::custom::launch(&row, proton.as_deref()).map(|child| {
let options = launch_options_of(&conn, &game.key());
crate::library::custom::launch(&row, &options).map(|child| {
record_play(state, &key);
state.lock().watch = Some(Watch {
key,
Expand Down Expand Up @@ -974,6 +974,13 @@ pub async fn protons(app: AppHandle, key: String) -> Vec<String> {
.await
}

/// Linux: the game tools installed, for a game's Launch options; `None` on Windows.
#[tauri::command]
#[specta::specta]
pub async fn game_tools() -> Option<crate::platform::GameTools> {
blocking(crate::platform::game_tools).await
}

/// A GOG game installed as its native Linux build, which runs without Proton.
pub(super) fn native_build(game: &Game) -> bool {
game.provider == ProviderKind::Gog && installed_dir(game).is_some_and(|dir| gog::native(dir))
Expand Down Expand Up @@ -1006,8 +1013,11 @@ pub async fn set_launch_options(
if game.provider == ProviderKind::Custom {
// An added game keeps its program and arguments itself.
options = LaunchOptions {
proton: options.proton,
..LaunchOptions::default()
args: String::new(),
offline: false,
skip_version_check: false,
exe: None,
..options
};
}
blocking(move || {
Expand Down Expand Up @@ -2282,6 +2292,9 @@ mod tests {
skip_version_check: false,
exe: Some(r"bin\game.exe".into()),
proton: Some("GE-Proton11-12".into()),
gamescope: None,
mangohud: Some(true),
gamemode: Some(false),
};
store_launch_options(&conn, "epic-A", &options).unwrap();
assert_eq!(launch_options_of(&conn, "epic-A"), options);
Expand All @@ -2291,7 +2304,7 @@ mod tests {
.unwrap();
assert_eq!(
json,
r#"{"args":"-dx11","offline":true,"skipVersionCheck":false,"exe":"bin\\game.exe","proton":"GE-Proton11-12"}"#
r#"{"args":"-dx11","offline":true,"skipVersionCheck":false,"exe":"bin\\game.exe","proton":"GE-Proton11-12","gamescope":null,"mangohud":true,"gamemode":false}"#
);
store_launch_options(&conn, "epic-A", &LaunchOptions::default()).unwrap();
assert_eq!(
Expand Down
5 changes: 5 additions & 0 deletions src-tauri/src/commands/library.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1351,6 +1351,11 @@ fn poll_blocking(app: &AppHandle) -> Poll {
let setup_percent = preparing
.filter(|p| running.as_ref() == Some(&p.0))
.map(|p| p.1);
let mut s = state.lock();
if running.is_some() != s.awake.is_some() {
s.awake = running.is_some().then(crate::platform::keep_awake);
}
drop(s);
Poll {
setting_up: setting_up || setup_percent.is_some(),
setup_percent,
Expand Down
2 changes: 2 additions & 0 deletions src-tauri/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ struct Shared {
/// shortcut: holds one failure, so of several within one poll only the last shows; a list if that happens.
failed: Option<crate::msg::Msg>,
watch: Option<Watch>,
/// Held while a game runs (Steam's or the watched one), so the PC doesn't sleep under it.
awake: Option<crate::platform::Awake>,
/// Steam rejected the saved token; the Settings dot asks the owner to connect again.
steam_attention: bool,
/// An owned-games fetch is in flight.
Expand Down
30 changes: 28 additions & 2 deletions src-tauri/src/commands/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,12 @@ 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.
/// A Flatpak hides update checks.
flatpak: bool,
/// Linux: gamescope, MangoHud and GameMode for every game unless its launch options say otherwise.
use_gamescope: bool,
use_mangohud: bool,
use_gamemode: bool,
close_to_tray: bool,
notify_downloads: bool,
app_version: String,
Expand Down Expand Up @@ -408,9 +412,16 @@ pub async fn settings_view(app: AppHandle) -> Res<SettingsView> {
ambient: saved.ambient,
cloud_saves: saved.cloud_saves,
gog_cloud_saves: saved.gog_cloud_saves,
start_with_windows: app.autolaunch().is_enabled().unwrap_or(false),
start_with_windows: if crate::platform::flatpak() {
settings::portal_autostart(&conn)
} else {
app.autolaunch().is_enabled().unwrap_or(false)
},
linux: cfg!(target_os = "linux"),
flatpak: crate::platform::flatpak(),
use_gamescope: saved.game_tools.gamescope,
use_mangohud: saved.game_tools.mangohud,
use_gamemode: saved.game_tools.gamemode,
close_to_tray: saved.close_to_tray,
notify_downloads: saved.notify_downloads,
app_version: app.package_info().version.to_string(),
Expand Down Expand Up @@ -443,6 +454,18 @@ pub async fn update_setting(app: AppHandle, name: String, value: Option<String>)
blocking(move || {
if name == settings::START_WITH_WINDOWS {
settings::validate(&name, value.as_deref())?;
if crate::platform::flatpak() {
let on = value.as_deref() == Some("true");
let now = crate::platform::portal_autostart(on)
.map_err(|e| msg!(cantChangeAutostart, detail = e))?;
let conn = cache::db::open(&app.state::<AppState>().dirs.db)?;
settings::update(&conn, &name, Some(&now.to_string()))?;
return if now == on {
Ok(())
} else {
Err(msg!(autostartNotAllowed))
};
}
let autostart = app.autolaunch();
let done = if value.as_deref() == Some("true") {
autostart.enable()
Expand Down Expand Up @@ -1074,6 +1097,9 @@ mod tests {
start_with_windows: false,
linux: false,
flatpak: false,
use_gamescope: false,
use_mangohud: false,
use_gamemode: false,
close_to_tray: true,
notify_downloads: true,
app_version: env!("CARGO_PKG_VERSION").into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ expression: view
"startWithWindows": false,
"linux": false,
"flatpak": false,
"useGamescope": false,
"useMangohud": false,
"useGamemode": false,
"closeToTray": true,
"notifyDownloads": true,
"appVersion": "[version]",
Expand Down
Loading
Loading