Skip to content

Commit

Permalink
#417: Report Linux app ID as com.mtkennerly.ludusavi
Browse files Browse the repository at this point in the history
  • Loading branch information
mtkennerly committed Nov 19, 2024
1 parent 0cee097 commit 0625c60
Show file tree
Hide file tree
Showing 11 changed files with 130 additions and 5 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 4 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
File renamed without changes.
10 changes: 10 additions & 0 deletions assets/linux/com.mtkennerly.ludusavi.desktop
Original file line number Diff line number Diff line change
@@ -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;
96 changes: 96 additions & 0 deletions assets/linux/com.mtkennerly.ludusavi.metainfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>com.mtkennerly.ludusavi</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>MIT</project_license>
<name>ludusavi</name>
<developer_name>mtkennerly</developer_name>
<summary>Back up your PC video game save data</summary>
<url type="homepage">https://github.com/mtkennerly/ludusavi/</url>
<url type="bugtracker">https://github.com/mtkennerly/ludusavi/issues</url>
<url type="translate">https://crowdin.com/project/ludusavi</url>
<description>
<p>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.</p>
<p>Features:</p>
<ul>
<li>Ability to back up data from more than 19,000 games plus your own custom entries.</li>
<li>Backup and restore for Steam as well as other game libraries.</li>
<li>Preview of the backup/restore before actually performing it.</li>
<li>Both a graphical interface and command line interface for scripting.</li>
<li>Tab completion is available for Bash, Fish, Zsh, PowerShell, and Elvish.</li>
<li>Support for saves that are stored as files and in the Windows registry, Proton saves with Steam, and Steam screenshots.</li>
</ul>
</description>
<provides>
<id>com.github.mtkennerly.ludusavi</id>
</provides>
<replaces>
<id>com.github.mtkennerly.ludusavi</id>
</replaces>
<categories>
<category>Utility</category>
<category>Archiving</category>
<category>Compression</category>
</categories>
<keywords>
<keyword>archive</keyword>
<keyword>backup</keyword>
<keyword>backups</keyword>
<keyword>cloud</keyword>
<keyword>saves</keyword>

<keyword>game</keyword>
<keyword>games</keyword>
<keyword>gaming</keyword>
<keyword>videogame</keyword>
<keyword>videogames</keyword>

<keyword>CLI</keyword>
<keyword>GUI</keyword>
<keyword translate="no">zip</keyword>

<keyword translate="no">Epic</keyword>
<keyword translate="no">GOG</keyword>
<keyword translate="no">Heroic</keyword>
<keyword translate="no">Lutris</keyword>
<keyword translate="no">Proton</keyword>
<keyword translate="no">Steam</keyword>
</keywords>
<screenshots>
<screenshot type="default">
<image type="source">https://raw.githubusercontent.com/mtkennerly/ludusavi/v0.26.0/docs/sample-gui-linux.png</image>
<caption>Graphical user interface</caption>
</screenshot>
</screenshots>
<content_rating type="oars-1.1" />
<launchable type="desktop-id">com.mtkennerly.ludusavi.desktop</launchable>
<releases>
<release version="0.26.0" date="2024-10-29"/>
<release version="0.25.0" date="2024-08-18"/>
<release version="0.24.3" date="2024-07-01"/>
<release version="0.24.2" date="2024-06-28"/>
<release version="0.24.1" date="2024-06-15"/>
<release version="0.24.0" date="2024-06-08"/>
<release version="0.23.0" date="2024-04-27"/>
<release version="0.22.0" date="2023-12-26"/>
<release version="0.21.0" date="2023-08-22"/>
<release version="0.20.0" date="2023-07-10"/>
<release version="0.19.0" date="2023-06-02"/>
<release version="0.18.2" date="2023-05-21"/>
<release version="0.18.1" date="2023-05-21"/>
<release version="0.18.0" date="2023-05-20"/>
<release version="0.17.1" date="2023-04-10"/>
<release version="0.17.0" date="2023-04-09"/>
<release version="0.16.0" date="2023-03-18"/>
<release version="0.15.2" date="2022-12-22"/>
<release version="0.15.1" date="2022-11-25"/>
<release version="0.15.0" date="2022-11-07"/>
<release version="0.14.0" date="2022-10-29"/>
<release version="0.13.1" date="2022-09-29"/>
<release version="0.13.0" date="2022-09-28"/>
<release version="0.12.1" date="2022-08-31"/>
<release version="0.12.0" date="2022-08-31"/>
<release version="0.11.0" date="2022-08-20"/>
<release version="0.10.0" date="2021-03-12"/>
</releases>
</component>
File renamed without changes.
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
3 changes: 3 additions & 0 deletions docs/help/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
3 changes: 2 additions & 1 deletion src/gui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down
4 changes: 4 additions & 0 deletions src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ pub type AnyError = Box<dyn std::error::Error>;

pub const SKIP: &str = "<skip>";
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'];

Expand All @@ -44,6 +46,8 @@ static HANDLER_SIGINT: Mutex<Option<signal_hook::SigId>> = 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 {
Expand Down

0 comments on commit 0625c60

Please sign in to comment.