From 06cdb5d191897dcafd93dea9cf23e7a1a1708d8f Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Thu, 20 Jul 2023 13:09:44 +0200 Subject: Bump libthermite to 0.7.0-alpha.1 --- src-tauri/Cargo.lock | 5 +++-- src-tauri/Cargo.toml | 2 +- src-tauri/src/mod_management/mod.rs | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index d57c1752..e0d510c6 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -1993,12 +1993,13 @@ checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" [[package]] name = "libthermite" -version = "0.7.0-alpha" +version = "0.7.0-alpha.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3927ebe9945316ba6a70f4384045fba7da9261e23b44faa7fddf9238f8916fa" +checksum = "fccf09f4637fd1437d1c5bb05fe7949dfdbe276d0ea2985239101eecd7eca0f4" dependencies = [ "flate2", "json5", + "lazy_static", "regex", "serde", "serde_json", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 261e0b9d..5c2e7b94 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -33,7 +33,7 @@ steamlocate = "1.2" # Error messages anyhow = "1.0" # libthermite for Northstar/mod install handling -libthermite = { version = "0.7.0-alpha", features = ["proton"] } +libthermite = { version = "0.7.0-alpha.1", features = ["proton"] } # zip stuff zip = "0.6.2" # Regex diff --git a/src-tauri/src/mod_management/mod.rs b/src-tauri/src/mod_management/mod.rs index cef7ff71..c8b0fde8 100644 --- a/src-tauri/src/mod_management/mod.rs +++ b/src-tauri/src/mod_management/mod.rs @@ -575,12 +575,13 @@ pub async fn fc_download_mod_and_install( // Get directory to install to made up of packages directory and Thunderstore mod string let install_directory = format!( - "{}/R2Northstar/packages/{}", - game_install.game_path, thunderstore_mod_string + "{}/R2Northstar/packages/", + game_install.game_path ); // Extract the mod to the mods directory match thermite::core::manage::install_with_sanity( + thunderstore_mod_string, temp_file.file(), std::path::Path::new(&install_directory), fc_sanity_check, -- cgit v1.2.3 From 68892a467ce10c358bffe8da3229a4ee18ad800a Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Thu, 20 Jul 2023 13:11:17 +0200 Subject: fix: Formatting --- src-tauri/src/mod_management/mod.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src-tauri/src/mod_management/mod.rs b/src-tauri/src/mod_management/mod.rs index c8b0fde8..51115b16 100644 --- a/src-tauri/src/mod_management/mod.rs +++ b/src-tauri/src/mod_management/mod.rs @@ -574,10 +574,7 @@ pub async fn fc_download_mod_and_install( }; // Get directory to install to made up of packages directory and Thunderstore mod string - let install_directory = format!( - "{}/R2Northstar/packages/", - game_install.game_path - ); + let install_directory = format!("{}/R2Northstar/packages/", game_install.game_path); // Extract the mod to the mods directory match thermite::core::manage::install_with_sanity( -- cgit v1.2.3 From d7fdbf8889d51b1b6b256a3f7ffa0934874fcc2f Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Fri, 21 Jul 2023 12:09:35 +0200 Subject: fix: Bump libthermite to 0.7.0-beta The difference is simply the removed deprecation notice --- src-tauri/Cargo.lock | 4 ++-- src-tauri/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index e0d510c6..f01d299b 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -1993,9 +1993,9 @@ checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" [[package]] name = "libthermite" -version = "0.7.0-alpha.1" +version = "0.7.0-beta" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fccf09f4637fd1437d1c5bb05fe7949dfdbe276d0ea2985239101eecd7eca0f4" +checksum = "07d01e44ad3cd57ad026987a2d69a71d7a6d49e5ecdbbe64c2f940477b2a3a2d" dependencies = [ "flate2", "json5", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 5c2e7b94..bba82afc 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -33,7 +33,7 @@ steamlocate = "1.2" # Error messages anyhow = "1.0" # libthermite for Northstar/mod install handling -libthermite = { version = "0.7.0-alpha.1", features = ["proton"] } +libthermite = { version = "0.7.0-beta", features = ["proton"] } # zip stuff zip = "0.6.2" # Regex -- cgit v1.2.3 From 448c6f343984b48b3ba7e1b9faaab54651b758f9 Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Fri, 21 Jul 2023 12:14:56 +0200 Subject: docs: Add comment explaining "legacy package" --- src-tauri/src/mod_management/legacy.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src-tauri/src/mod_management/legacy.rs b/src-tauri/src/mod_management/legacy.rs index 3136a618..8ca24269 100644 --- a/src-tauri/src/mod_management/legacy.rs +++ b/src-tauri/src/mod_management/legacy.rs @@ -117,6 +117,10 @@ pub fn parse_installed_mods( /// Deletes all legacy packages that match in author and mod name /// regardless of version +/// +/// "legacy package" refers to a Thunderstore package installed into the `mods` folder +/// by extracting Northstar mods contained inside and then adding `manifest.json` and `thunderstore_author.txt` +/// to indicate which Thunderstore package they are part of pub fn delete_legacy_package_install( thunderstore_mod_string: &str, game_install: &GameInstall, -- cgit v1.2.3 From e4f995b1f8e25ed6cddae2672ea3e79da80e55ee Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Fri, 21 Jul 2023 12:15:29 +0200 Subject: docs: Add comment explaining why we skip a folder if parsing folder name to Thunderstore mod string failed. --- src-tauri/src/mod_management/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src-tauri/src/mod_management/mod.rs b/src-tauri/src/mod_management/mod.rs index 51115b16..c049fe07 100644 --- a/src-tauri/src/mod_management/mod.rs +++ b/src-tauri/src/mod_management/mod.rs @@ -444,6 +444,10 @@ fn delete_older_versions( let ts_mod_string_from_folder: ParsedThunderstoreModString = match folder_name.parse() { Ok(res) => res, Err(err) => { + // Failed parsing folder name as Thunderstore mod string + // This means it doesn't follow the `AUTHOR-MOD-VERSION` naming structure + // This folder could've been manually created by the user or another application + // As parsing failed we cannot determine the Thunderstore package it is part of hence we skip it log::warn!("{err}"); continue; } -- cgit v1.2.3 From 5e988a6df608ba11956af54951b50cad2e32e3d9 Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Fri, 21 Jul 2023 12:18:33 +0200 Subject: style: Remove trailing whitespace --- src-tauri/src/mod_management/legacy.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-tauri/src/mod_management/legacy.rs b/src-tauri/src/mod_management/legacy.rs index 8ca24269..91463250 100644 --- a/src-tauri/src/mod_management/legacy.rs +++ b/src-tauri/src/mod_management/legacy.rs @@ -117,7 +117,7 @@ pub fn parse_installed_mods( /// Deletes all legacy packages that match in author and mod name /// regardless of version -/// +/// /// "legacy package" refers to a Thunderstore package installed into the `mods` folder /// by extracting Northstar mods contained inside and then adding `manifest.json` and `thunderstore_author.txt` /// to indicate which Thunderstore package they are part of -- cgit v1.2.3