aboutsummaryrefslogtreecommitdiff
path: root/src-tauri
diff options
context:
space:
mode:
Diffstat (limited to 'src-tauri')
-rw-r--r--src-tauri/Cargo.lock150
-rw-r--r--src-tauri/Cargo.toml2
-rw-r--r--src-tauri/src/lib.rs6
-rw-r--r--src-tauri/src/main.rs2
-rw-r--r--src-tauri/src/mod_management/mod.rs6
5 files changed, 96 insertions, 70 deletions
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index 5a0a5256..af5fae1e 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -461,20 +461,6 @@ dependencies = [
]
[[package]]
-name = "console"
-version = "0.15.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c050367d967ced717c04b65d8c619d863ef9292ce0c5760028655a2fb298718c"
-dependencies = [
- "encode_unicode",
- "lazy_static",
- "libc",
- "terminal_size",
- "unicode-width",
- "winapi",
-]
-
-[[package]]
name = "constant_time_eq"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -855,12 +841,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7"
[[package]]
-name = "encode_unicode"
-version = "0.3.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
-
-[[package]]
name = "encoding_rs"
version = "0.8.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1629,18 +1609,6 @@ dependencies = [
]
[[package]]
-name = "indicatif"
-version = "0.17.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4295cbb7573c16d310e99e713cf9e75101eb190ab31fccd35f2d2691b4352b19"
-dependencies = [
- "console",
- "number_prefix",
- "portable-atomic",
- "unicode-width",
-]
-
-[[package]]
name = "infer"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1825,17 +1793,16 @@ dependencies = [
[[package]]
name = "libthermite"
-version = "0.4.0"
+version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "31ec1288a3f54f21ee6bd7eec92c5d098d9acc82d3bfdcf3c5ae29498ddfdc0e"
+checksum = "80ab0312cd1bab244b8b1abd8a0f48b771d4591d4521344468e91a26d6d9fad0"
dependencies = [
- "futures-util",
- "indicatif",
- "log",
- "reqwest",
+ "json5",
"serde",
"serde_json",
"thiserror",
+ "tracing",
+ "ureq",
"zip",
]
@@ -2197,12 +2164,6 @@ dependencies = [
]
[[package]]
-name = "number_prefix"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3"
-
-[[package]]
name = "objc"
version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2630,12 +2591,6 @@ dependencies = [
]
[[package]]
-name = "portable-atomic"
-version = "0.3.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "15eb2c6e362923af47e13c23ca5afb859e83d54452c55b0b9ac763b8f7c1ac16"
-
-[[package]]
name = "ppv-lite86"
version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2965,7 +2920,6 @@ dependencies = [
"serde_urlencoded",
"tokio",
"tokio-native-tls",
- "tokio-util",
"tower-service",
"url",
"wasm-bindgen",
@@ -2999,6 +2953,21 @@ dependencies = [
]
[[package]]
+name = "ring"
+version = "0.16.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc"
+dependencies = [
+ "cc",
+ "libc",
+ "once_cell",
+ "spin",
+ "untrusted",
+ "web-sys",
+ "winapi",
+]
+
+[[package]]
name = "rusqlite"
version = "0.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3038,6 +3007,18 @@ dependencies = [
]
[[package]]
+name = "rustls"
+version = "0.20.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f"
+dependencies = [
+ "log",
+ "ring",
+ "sct",
+ "webpki",
+]
+
+[[package]]
name = "rustversion"
version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3093,6 +3074,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898"
[[package]]
+name = "sct"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4"
+dependencies = [
+ "ring",
+ "untrusted",
+]
+
+[[package]]
name = "security-framework"
version = "2.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3472,6 +3463,12 @@ dependencies = [
]
[[package]]
+name = "spin"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
+
+[[package]]
name = "stable_deref_trait"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3929,16 +3926,6 @@ dependencies = [
]
[[package]]
-name = "terminal_size"
-version = "0.1.17"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df"
-dependencies = [
- "libc",
- "winapi",
-]
-
-[[package]]
name = "thin-slice"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -4251,6 +4238,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
[[package]]
+name = "untrusted"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
+
+[[package]]
+name = "ureq"
+version = "2.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "338b31dd1314f68f3aabf3ed57ab922df95ffcd902476ca7ba3c4ce7b908c46d"
+dependencies = [
+ "base64",
+ "flate2",
+ "log",
+ "once_cell",
+ "rustls",
+ "url",
+ "webpki",
+ "webpki-roots",
+]
+
+[[package]]
name = "url"
version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -4477,6 +4486,25 @@ dependencies = [
]
[[package]]
+name = "webpki"
+version = "0.22.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd"
+dependencies = [
+ "ring",
+ "untrusted",
+]
+
+[[package]]
+name = "webpki-roots"
+version = "0.22.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87"
+dependencies = [
+ "webpki",
+]
+
+[[package]]
name = "webview2-com"
version = "0.19.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index 9c0ad2b8..405349da 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -25,7 +25,7 @@ steamlocate = "1.0.2"
# Error messages
anyhow = "1.0"
# libthermite for Northstar/mod install handling
-libthermite = "0.4.0"
+libthermite = "0.5.2"
# zip stuff
zip = "0.6.2"
# Regex
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index e43e5935..1ae55a6f 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -192,9 +192,7 @@ async fn do_install(nmod: &thermite::model::ModVersion, game_path: &std::path::P
let download_path = format!("{}/{}", download_directory.clone(), filename);
println!("{}", download_path);
- let nfile = thermite::core::manage::download_file(&nmod.url, download_path)
- .await
- .unwrap();
+ let nfile = thermite::core::manage::download_file(&nmod.url, download_path).unwrap();
println!("Extracting Northstar...");
extract(nfile, game_path)?;
@@ -223,7 +221,7 @@ pub async fn install_northstar(
None => "Northstar".to_string(),
};
- let index = thermite::api::get_package_index().await.unwrap().to_vec();
+ let index = thermite::api::get_package_index().unwrap().to_vec();
let nmod = index
.iter()
.find(|f| f.name.to_lowercase() == northstar_package_name.to_lowercase())
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs
index 4eab7a00..ba9264ee 100644
--- a/src-tauri/src/main.rs
+++ b/src-tauri/src/main.rs
@@ -185,7 +185,7 @@ async fn check_is_northstar_outdated(
None => "Northstar".to_string(),
};
- let index = thermite::api::get_package_index().await.unwrap().to_vec();
+ let index = thermite::api::get_package_index().unwrap().to_vec();
let nmod = index
.iter()
.find(|f| f.name.to_lowercase() == northstar_package_name.to_lowercase())
diff --git a/src-tauri/src/mod_management/mod.rs b/src-tauri/src/mod_management/mod.rs
index 01e2cbb5..90dc85da 100644
--- a/src-tauri/src/mod_management/mod.rs
+++ b/src-tauri/src/mod_management/mod.rs
@@ -261,7 +261,7 @@ pub fn get_installed_mods_and_properties(
async fn get_ns_mod_download_url(thunderstore_mod_string: String) -> Result<String, String> {
// TODO: This will crash the thread if not internet connection exist. `match` should be used instead
- let index = thermite::api::get_package_index().await.unwrap().to_vec();
+ let index = thermite::api::get_package_index().unwrap().to_vec();
// Parse mod string
let parsed_ts_mod_string: ParsedThunderstoreModString = match thunderstore_mod_string.parse() {
@@ -297,7 +297,7 @@ async fn get_mod_dependencies(
dbg!(thunderstore_mod_string.clone());
// TODO: This will crash the thread if not internet connection exist. `match` should be used instead
- let index = thermite::api::get_package_index().await.unwrap().to_vec();
+ let index = thermite::api::get_package_index().unwrap().to_vec();
// String replace works but more care should be taken in the future
let ts_mod_string_url = thunderstore_mod_string.replace("-", "/");
@@ -379,7 +379,7 @@ pub async fn fc_download_mod_and_install(
);
// Download the mod
- let f = match thermite::core::manage::download_file(&download_url, path.clone()).await {
+ let f = match thermite::core::manage::download_file(&download_url, path.clone()) {
Ok(f) => f,
Err(e) => return Err(e.to_string()),
};