diff --git a/Cargo.lock b/Cargo.lock index ad3aa4d..a89341d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -34,6 +34,7 @@ dependencies = [ "serde_json", "sha1_smol", "simple-log", + "static_vcruntime", "steamlocate", "tokio", "winresource", @@ -1501,6 +1502,12 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +[[package]] +name = "static_vcruntime" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "954e3e877803def9dc46075bf4060147c55cd70db97873077232eae0269dc89b" + [[package]] name = "steamlocate" version = "2.0.0-beta.2" diff --git a/Cargo.toml b/Cargo.toml index f47c013..00927b4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,6 @@ indicatif = "0.17.8" tokio = {version="1.38.0", features = ["rt-multi-thread", "macros"]} simple-log = "1.5.1" - [target.'cfg(unix)'.dependencies] openssl = { version = "0.10.64", default-features = false, features = ["vendored"] } @@ -34,6 +33,7 @@ self-replace = "1.3.7" [build-dependencies] winresource = "0.1.17" +static_vcruntime = "2.0" [package.metadata.winresource] OriginalFilename = "alterware-launcher.exe" diff --git a/res/build.rs b/res/build.rs index 8aa9e51..5004d4b 100644 --- a/res/build.rs +++ b/res/build.rs @@ -1,5 +1,6 @@ fn main() { if std::env::var("CARGO_CFG_TARGET_OS").unwrap() == "windows" { + static_vcruntime::metabuild(); let mut res = winresource::WindowsResource::new(); res.set_icon("res/icon.ico").set_language(0x0409); res.compile().unwrap();