diff --git a/CHANGELOG.md b/CHANGELOG.md index c373914d..08c7c6b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## Unreleased +## v0.7.0 (2020-08-01) **The backup structure has changed! Read below for more detail.** @@ -16,7 +16,10 @@ * Backup structure is now human-readable. * App window now has a minimum size, 640x480. (Note: For now, the crates.io release will not have a minimum size.) + * File size units are now adjusted based on the size, rather than always using MiB. + ([contributed by wtjones](https://github.com/mtkennerly/ludusavi/pull/32)) +### New backup structure Previously, Ludusavi used Base64 to encode game names and original paths when organizing backups. There were some technical advantages of that approach, but it was not easy to understand, and there was a technical flaw because Base64 diff --git a/Cargo.lock b/Cargo.lock index 1294abd2..2b9e3477 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -84,7 +84,7 @@ version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c69a8137596e84c22d57f3da1b5de1d4230b1742a710091c85f4d7ce50f00f38" dependencies = [ - "libloading 0.6.2", + "libloading", ] [[package]] @@ -540,7 +540,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1324bc4eae34f03b0ced586da5ae2b1ab46acfdae68b5b26d2e23dadae376a2" dependencies = [ "bitflags", - "libloading 0.6.2", + "libloading", "winapi 0.3.9", ] @@ -624,7 +624,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b11f15d1e3268f140f68d390637d5e76d849782d971ae7063e0da69fe9709a76" dependencies = [ - "libloading 0.6.2", + "libloading", ] [[package]] @@ -927,14 +927,14 @@ dependencies = [ [[package]] name = "gfx-backend-dx11" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92de0ddc0fde1a89b2a0e92dcc6bbb554bd34af0135e53a28d5ef064611094a4" +checksum = "32d95d5fddfa596c0628be117a16979b273f676b4e5a037a417365f274349123" dependencies = [ "bitflags", "gfx-auxil", "gfx-hal", - "libloading 0.5.2", + "libloading", "log", "parking_lot", "range-alloc", @@ -1456,16 +1456,6 @@ version = "0.2.71" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9457b06509d27052635f90d6466700c65095fdf75409b3fbdd903e988b886f49" -[[package]] -name = "libloading" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753" -dependencies = [ - "cc", - "winapi 0.3.9", -] - [[package]] name = "libloading" version = "0.6.2" @@ -1527,7 +1517,7 @@ dependencies = [ [[package]] name = "ludusavi" -version = "0.6.0" +version = "0.7.0" dependencies = [ "base64 0.12.3", "byte-unit", @@ -2898,9 +2888,9 @@ checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" [[package]] name = "ttf-parser" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9adb8aeeaf663a49ffdf9cdb548232849174b451a22bc90921868b8491ee901" +checksum = "d973cfa0e6124166b50a1105a67c85de40bbc625082f35c0f56f84cb1fb0a827" [[package]] name = "twox-hash" diff --git a/Cargo.toml b/Cargo.toml index b65e13e2..ac760e0d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ludusavi" -version = "0.6.0" +version = "0.7.0" authors = ["mtkennerly "] edition = "2018" description = "Game save backup tool" diff --git a/README.md b/README.md index 466445e0..0dfe1504 100644 --- a/README.md +++ b/README.md @@ -6,12 +6,6 @@ Ludusavi is a tool for backing up your PC video game save data, written in [Rust](https://www.rust-lang.org). It is cross-platform and supports multiple game stores. -This tool uses the [Ludusavi Manifest](https://github.com/mtkennerly/ludusavi-manifest) -for info on what to back up, and it will automatically download the latest version of -the primary manifest. To add or update game entries in the primary manifest, please refer -to that project. Data is ultimately sourced from [PCGamingWiki](https://www.pcgamingwiki.com/wiki/Home), -so you are encouraged to contribute any new or fixed data back to the wiki itself. - ## Features * Ability to back up data from more than 7,000 games plus your own custom entries. * Backup and restore for Steam as well as other game libraries. @@ -24,6 +18,12 @@ so you are encouraged to contribute any new or fixed data back to the wiki itsel * Available as a [Playnite](https://playnite.link) extension: https://github.com/mtkennerly/ludusavi-playnite +This tool uses the [Ludusavi Manifest](https://github.com/mtkennerly/ludusavi-manifest) +for info on what to back up, and it will automatically download the latest version of +the primary manifest. The data is ultimately sourced from [PCGamingWiki](https://www.pcgamingwiki.com/wiki/Home), +so please contribute any new or fixed data back to the wiki itself, and your +improvements will be incorporated into Ludusavi's data as well. + ## Demo ### GUI > ![GUI demo of previewing a backup](docs/demo-gui.gif) @@ -93,21 +93,20 @@ If you are on Mac: * You can press `preview` to see what the backup will include, without actually performing it. * You can press `back up` to perform the backup for real. - * If the target folder already exists, it will be deleted first, - then recreated. However, if you've enabled the merge option, - then it will not be deleted first. - * Within the target folder, for every game with data to back up, - a subfolder will be created with the game's name encoded as - [Base64](https://en.wikipedia.org/wiki/Base64). - For example, files for `Celeste` would go into a folder named `Q2VsZXN0ZQ==`. - * Within each game's backup folder, any relevant files will be stored with - their name as the Base64 encoding of the full path to the original file. - For example, `D:/Steam/steamapps/common/Celeste/Saves/0.celeste` would be - backed up as `RDovU3RlYW0vc3RlYW1hcHBzL2NvbW1vbi9DZWxlc3RlL1NhdmVzLzAuY2VsZXN0ZQ==`. + * If the target folder already exists, it will be deleted first and + recreated, unless you've enabled the merge option. + * Within the target folder, for every game with data to back up, a subfolder + will be created based on the game's name, where some invalid characters are + replaced by `_`. In rare cases, if the whole name is invalid characters, + then it will be renamed to `ludusavi-renamed-`. + * Within each game's subfolder, there will be a `mapping.yaml` file that + Ludusavi needs to identify the game. There will be some drive folders + (e.g., `drive-C` on Windows or `drive-0` on Linux and Mac) containing the + backup files, matching the normal file locations on your computer. * If the game has save data in the registry and you are using Windows, then - the game's backup folder will also contain an `other/registry.yaml` file. + the game's subfolder will also contain a `registry.yaml` file. If you are using Steam and Proton instead of Windows, then the Proton `*.reg` - files will be backed up like other game files. + files will be backed up along with the other game files instead. * Roots are folders that Ludusavi can check for additional game data. When you first run Ludusavi, it will try to find some common roots on your system, but you may end up without any configured. You can click `add root` to configure @@ -132,11 +131,16 @@ If you are on Mac: * You can press `preview` to see what the restore will include, without actually performing it. * You can press `restore` to perform the restore for real. - * For all the files in the source directory, they will be decoded as Base64 - to get the target path and then copied to that location. Any necessary - parent directories will be created as well before the copy, but if the - directories already exist, their current files will be left alone (other - than overwriting the ones that are being restored from the backup). + * For each subfolder in the source directory, Ludusavi looks for a `mapping.yaml` + file in order to identify each game. Subfolders without that file, or with an + invalid one, are ignored. + * All files from the drive folders are copied back to their original locations + on the respective drive. Any necessary parent directories will be created + as well before the copy, but if the directories already exist, then their + current files will be left alone (other than overwriting the ones that are + being restored from the backup). + * If the game subfolder includes a `registry.yaml` file, then the Windows + registry data will be restored as well. * You can use redirects to restore to a different location than the original file. Click `add redirect`, and then enter both the old and new location. For example, if you backed up some saves from `C:/Games`, but then you moved it to `D:/Games`, @@ -167,6 +171,10 @@ If you are on Mac: If the game name matches one from Ludusavi's primary data set, then your custom entry will override it. +#### Other settings +* Switch to this screen by clicking the `other` button. +* This screen contains some additional settings that are less commonly used. + ### CLI Run `ludusavi --help` for the full usage information. @@ -269,6 +277,13 @@ Here are the available settings (all are required unless otherwise noted): This can be overridden in the CLI by passing a list of games. * `merge` (optional, boolean): Whether to merge save data into the target directory rather than deleting the directory first. Default: false. + * `filter` (optional, map): + * `excludeOtherOsData` (optional, boolean): If true, then the backup should + exclude any files that have only been confirmed for a different operating + system than the one you're using. On Linux, Proton saves will still be + backed up regardless of this setting. Default: false. + * `excludeStoreScreenshots` (optional, boolean): If true, then the backup + should exclude screenshots from stores like Steam. Default: false. * `restore` (map): * `path` (string): Full path to a directory from which to restore data. This can be overridden in the CLI with `--path`. diff --git a/docs/demo-cli.gif b/docs/demo-cli.gif index 8dbc6e03..d7f42d5c 100644 Binary files a/docs/demo-cli.gif and b/docs/demo-cli.gif differ diff --git a/docs/demo-gui.gif b/docs/demo-gui.gif index 1b4c9cad..8895e9ea 100644 Binary files a/docs/demo-gui.gif and b/docs/demo-gui.gif differ diff --git a/src/gui.rs b/src/gui.rs index 33878256..0f0cd5ef 100644 --- a/src/gui.rs +++ b/src/gui.rs @@ -403,7 +403,6 @@ impl GameListEntry { config.is_game_enabled_for_backup(&self.scan_info.game_name) }; let name_for_checkbox = self.scan_info.game_name.clone(); - println!("game: {}", self.scan_info.game_name); Container::new( Column::new() .padding(5) diff --git a/src/lang.rs b/src/lang.rs index 92ab8748..88496591 100644 --- a/src/lang.rs +++ b/src/lang.rs @@ -443,14 +443,14 @@ impl Translator { pub fn explanation_for_exclude_other_os_data(&self) -> String { match self.language { - Language::English => "Exclude save locations that have only been confirmed on another operating system. Some games always put saves in the same place, but the locations may have only been confirmed for a different OS, so it can help to check them anyway. Excluding that data may help to avoid false positives, but may also mean missing out on some saves. On Linux, Proton saves will still be backed up regardless of this setting.", + Language::English => "In backups, exclude save locations that have only been confirmed on another operating system. Some games always put saves in the same place, but the locations may have only been confirmed for a different OS, so it can help to check them anyway. Excluding that data may help to avoid false positives, but may also mean missing out on some saves. On Linux, Proton saves will still be backed up regardless of this setting.", } .into() } pub fn explanation_for_exclude_store_screenshots(&self) -> String { match self.language { - Language::English => "Exclude store-specific screenshots. Right now, this only applies to Steam screenshots that you've taken. If a game has its own built-in screenshot functionality, this setting will not affect whether those screenshots are backed up.", + Language::English => "In backups, exclude store-specific screenshots. Right now, this only applies to Steam screenshots that you've taken. If a game has its own built-in screenshot functionality, this setting will not affect whether those screenshots are backed up.", } .into() }