From 12d49a27e468632976f4c8d269c9e124e1e2a898 Mon Sep 17 00:00:00 2001 From: ByteDream Date: Wed, 30 Nov 2022 19:25:21 +0100 Subject: [PATCH] Add static vc runtime --- Cargo.lock | 6 +++--- Cargo.toml | 3 +++ build.rs | 3 +++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 144cff4..2690925 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -269,6 +269,7 @@ dependencies = [ "clap_complete", "clap_mangen", "crunchy-cli-core", + "static_vcruntime", "tokio", ] @@ -297,7 +298,7 @@ dependencies = [ [[package]] name = "crunchyroll-rs" version = "0.1.0" -source = "git+https://github.com/crunchy-labs/crunchyroll-rs#3e9f7bfaab68649ecdb486aee0b15fe658d51917" +source = "git+https://github.com/crunchy-labs/crunchyroll-rs#3d455ebca34cfa83df39777f3e1414cee4f84002" dependencies = [ "aes", "cbc", @@ -313,14 +314,13 @@ dependencies = [ "serde_json", "serde_urlencoded", "smart-default", - "static_vcruntime", "tokio", ] [[package]] name = "crunchyroll-rs-internal" version = "0.1.0" -source = "git+https://github.com/crunchy-labs/crunchyroll-rs#3e9f7bfaab68649ecdb486aee0b15fe658d51917" +source = "git+https://github.com/crunchy-labs/crunchyroll-rs#3d455ebca34cfa83df39777f3e1414cee4f84002" dependencies = [ "darling", "quote", diff --git a/Cargo.toml b/Cargo.toml index 7614202..5e3b153 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,6 +28,9 @@ clap_mangen = "0.2" # specified in this Cargo.toml [features]. crunchy-cli-core = { path = "./crunchy-cli-core", features = ["static-curl", "static-ssl"] } +[target.'cfg(all(windows, target_env = "msvc"))'.build-dependencies] +static_vcruntime = "2.0" + [profile.release] strip = true opt-level = "z" diff --git a/build.rs b/build.rs index 1e4d71f..927f4dd 100644 --- a/build.rs +++ b/build.rs @@ -3,6 +3,9 @@ use clap_complete::shells; use std::path::{Path, PathBuf}; fn main() -> std::io::Result<()> { + #[cfg(all(windows, target_env = "msvc"))] + static_vcruntime::metabuild(); + // note that we're using an anti-pattern here / violate the rust conventions. build script are // not supposed to write outside of 'OUT_DIR'. to have the generated files in the build "root" // (the same directory where the output binary lives) is much simpler than in 'OUT_DIR' since