diff --git a/nix/packages/owmods-gui.nix b/nix/packages/owmods-gui.nix index ba2527db..ef92eddc 100644 --- a/nix/packages/owmods-gui.nix +++ b/nix/packages/owmods-gui.nix @@ -108,7 +108,7 @@ rustPlatform.buildRustPackage rec { desktopItems = [ (makeDesktopItem { name = "outer-wilds-mod-manager"; - exec = "outer-wilds-mod-manager %u"; + exec = "outer-wilds-mod-manager %U"; icon = "outer-wilds-mod-manager"; desktopName = "Outer Wilds Mod Manager"; categories = ["Game"]; diff --git a/owmods_gui/backend/src/main.rs b/owmods_gui/backend/src/main.rs index e2e76963..8fe4a33e 100644 --- a/owmods_gui/backend/src/main.rs +++ b/owmods_gui/backend/src/main.rs @@ -99,6 +99,13 @@ async fn update(app: tauri::AppHandle) -> error::Result { use tauri_plugin_dialog::{MessageDialogButtons, MessageDialogKind, MessageDialogResult, DialogExt}; use tauri_plugin_updater::UpdaterExt; + let skip = std::env::var("OWMM_NO_UPDATES").is_ok_and(|s| s == "1"); + + if skip { + log::debug!("Skipping updater"); + return Ok(()); + } + app.plugin(tauri_plugin_updater::Builder::new().build()) .context("While adding plugin")?; diff --git a/owmods_gui/backend/tauri.conf.json b/owmods_gui/backend/tauri.conf.json index f991647a..295d42db 100644 --- a/owmods_gui/backend/tauri.conf.json +++ b/owmods_gui/backend/tauri.conf.json @@ -65,6 +65,14 @@ "resources": [], "shortDescription": "A manager for Outer Wilds mods", "targets": "all", + "linux": { + "deb": { + "desktopTemplate": "template.desktop" + }, + "rpm": { + "desktopTemplate": "template.desktop" + } + }, "windows": { "certificateThumbprint": null, "digestAlgorithm": "sha256", diff --git a/owmods_gui/backend/template.desktop b/owmods_gui/backend/template.desktop new file mode 100644 index 00000000..d56a80e6 --- /dev/null +++ b/owmods_gui/backend/template.desktop @@ -0,0 +1,14 @@ +[Desktop Entry] +Categories={{categories}} +{{#if comment}} +Comment={{comment}} +{{/if}} +Exec={{exec}} %U +StartupWMClass={{exec}} +Icon={{icon}} +Name={{name}} +Terminal=false +Type=Application +{{#if mime_type}} +MimeType={{mime_type}} +{{/if}} diff --git a/xtask/src/gui_templates/PKGBUILD b/xtask/src/gui_templates/PKGBUILD index 64cf02f1..f2b8a9bf 100644 --- a/xtask/src/gui_templates/PKGBUILD +++ b/xtask/src/gui_templates/PKGBUILD @@ -15,6 +15,7 @@ sha256sums=() package() { tar xpf data.tar.gz -C "${srcdir}" install -Dm755 "usr/bin/${_appname}" "${pkgdir}/usr/bin/${_appname}" + sed -i "s/Exec=owmods_gui/Exec=env OWMM_NO_UPDATES=1 owmods_gui/g" "usr/share/applications/Outer Wilds Mod Manager.desktop" install -Dm755 "usr/share/applications/Outer Wilds Mod Manager.desktop" "${pkgdir}/usr/share/applications/Outer Wilds Mod Manager.desktop" install -Dm644 "usr/share/icons/hicolor/128x128/apps/${_appname}.png" "$pkgdir/usr/share/icons/hicolor/128x128/apps/${_appname}.png"