diff --git a/CHANGELOG.md b/CHANGELOG.md index ae8bdcf..0525612 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ * Changed: * Windows registry backups are now saved as `*.reg` files instead of `*.yaml`. Existing backups will not be affected. + * On Linux, Ludusavi previously reported its application ID as just `ludusavi`, + which meant the desktop file should be named `ludusavi.desktop` to show the right icon. + However, that name does not follow the Freedesktop.org `desktop-entry` specification. + + To better conform, Ludusavi now reports its ID as `com.mtkennerly.ludusavi` + (except for Flatpak, which will use `com.github.mtkennerly.ludusavi` for legacy reasons). + If you need to preserve the original behavior, + you can set `LUDUSAVI_LINUX_APP_ID=ludusavi` in your environment variables. + + ([Prototyped by OlegAckbar](https://github.com/mtkennerly/ludusavi/pull/417)) * Dialogs (folder picker and `wrap --gui` prompts) now use GTK on Linux. The previous system relied on Zenity/KDialog, which could behave poorly depending on the version or in a Flatpak context. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d7da905..b567d4f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -58,9 +58,10 @@ pip install aiohttp toml Also install the Crowdin CLI tool manually. #### Process -* Update version in CHANGELOG.md -* Update version in Cargo.toml -* Update version in assets/com.github.mtkennerly.ludusavi.metainfo.xml +* Update version in `CHANGELOG.md` +* Update version in `Cargo.toml` +* Update version in `assets/linux/com.mtkennerly.ludusavi.metainfo.xml` + and `assets/flatpak/com.github.mtkennerly.ludusavi.metainfo.xml`, including the `releases` section and the screenshot URL. * Run `invoke prerelease` * If you already updated the translations separately, diff --git a/assets/com.github.mtkennerly.ludusavi.desktop b/assets/flatpak/com.github.mtkennerly.ludusavi.desktop old mode 100755 new mode 100644 similarity index 100% rename from assets/com.github.mtkennerly.ludusavi.desktop rename to assets/flatpak/com.github.mtkennerly.ludusavi.desktop diff --git a/assets/com.github.mtkennerly.ludusavi.metainfo.xml b/assets/flatpak/com.github.mtkennerly.ludusavi.metainfo.xml similarity index 100% rename from assets/com.github.mtkennerly.ludusavi.metainfo.xml rename to assets/flatpak/com.github.mtkennerly.ludusavi.metainfo.xml diff --git a/assets/linux/com.mtkennerly.ludusavi.desktop b/assets/linux/com.mtkennerly.ludusavi.desktop new file mode 100644 index 0000000..3d09ed7 --- /dev/null +++ b/assets/linux/com.mtkennerly.ludusavi.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Application +Encoding=UTF-8 +Name=Ludusavi +Comment=Tool for backing up your PC video game save data. +Exec=ludusavi +Icon=com.mtkennerly.ludusavi +Terminal=false +Categories=Game; +Keywords=game;games;backup;save;saves; diff --git a/assets/linux/com.mtkennerly.ludusavi.metainfo.xml b/assets/linux/com.mtkennerly.ludusavi.metainfo.xml new file mode 100644 index 0000000..71f14b5 --- /dev/null +++ b/assets/linux/com.mtkennerly.ludusavi.metainfo.xml @@ -0,0 +1,96 @@ + + + com.mtkennerly.ludusavi + CC0-1.0 + MIT + ludusavi + mtkennerly + Back up your PC video game save data + https://github.com/mtkennerly/ludusavi/ + https://github.com/mtkennerly/ludusavi/issues + https://crowdin.com/project/ludusavi + +

Ludusavi is a tool for backing up your PC video game save data, written in Rust. It is cross-platform and supports multiple game stores.

+

Features:

+ +
+ + com.github.mtkennerly.ludusavi + + + com.github.mtkennerly.ludusavi + + + Utility + Archiving + Compression + + + archive + backup + backups + cloud + saves + + game + games + gaming + videogame + videogames + + CLI + GUI + zip + + Epic + GOG + Heroic + Lutris + Proton + Steam + + + + https://raw.githubusercontent.com/mtkennerly/ludusavi/v0.26.0/docs/sample-gui-linux.png + Graphical user interface + + + + com.mtkennerly.ludusavi.desktop + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/assets/windows-manifest.xml b/assets/windows/manifest.xml similarity index 100% rename from assets/windows-manifest.xml rename to assets/windows/manifest.xml diff --git a/build.rs b/build.rs index b7e3411..714568a 100644 --- a/build.rs +++ b/build.rs @@ -7,7 +7,7 @@ fn main() { { let mut res = winres::WindowsResource::new(); res.set_icon("assets/icon.ico"); - res.set_manifest_file("assets/windows-manifest.xml"); + res.set_manifest_file("assets/windows/manifest.xml"); res.compile().unwrap(); } } diff --git a/docs/help/environment-variables.md b/docs/help/environment-variables.md index e501a27..90b5274 100644 --- a/docs/help/environment-variables.md +++ b/docs/help/environment-variables.md @@ -9,3 +9,6 @@ Environment variables can be used to tweak some additional behavior: Example: `LUDUSAVI_DEBUG=1` * `LUDUSAVI_THREADS`: Overrive the `runtime.threads` value from the config file. Example: `LUDUSAVI_THREADS=8` +* `LUDUSAVI_LINUX_APP_ID`: On Linux, this can override Ludusavi's application ID. + The default is `com.mtkennerly.ludusavi`. + This should match the corresponding `.desktop` file. diff --git a/src/gui.rs b/src/gui.rs index 980313a..594a46d 100644 --- a/src/gui.rs +++ b/src/gui.rs @@ -36,7 +36,8 @@ pub fn run(flags: Flags) { exit_on_close_request: false, #[cfg(target_os = "linux")] platform_specific: iced::window::settings::PlatformSpecific { - application_id: "com.github.mtkennerly.ludusavi".to_string(), + application_id: std::env::var(crate::prelude::ENV_LINUX_APP_ID) + .unwrap_or_else(|_| crate::prelude::LINUX_APP_ID.to_string()), ..Default::default() }, icon: match image::load_from_memory(include_bytes!("../assets/icon.png")) { diff --git a/src/prelude.rs b/src/prelude.rs index a2c2762..60ed475 100644 --- a/src/prelude.rs +++ b/src/prelude.rs @@ -30,6 +30,8 @@ pub type AnyError = Box; pub const SKIP: &str = ""; pub const APP_DIR_NAME: &str = "ludusavi"; +#[allow(unused)] +pub const LINUX_APP_ID: &str = "com.mtkennerly.ludusavi"; const PORTABLE_FLAG_FILE_NAME: &str = "ludusavi.portable"; pub const INVALID_FILE_CHARS: &[char] = &['\\', '/', ':', '*', '?', '"', '<', '>', '|', '\0']; @@ -44,6 +46,8 @@ static HANDLER_SIGINT: Mutex> = Mutex::new(None); pub const ENV_DEBUG: &str = "LUDUSAVI_DEBUG"; const ENV_THREADS: &str = "LUDUSAVI_THREADS"; +#[allow(unused)] +pub const ENV_LINUX_APP_ID: &str = "LUDUSAVI_LINUX_APP_ID"; #[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] pub enum Finality {