From 40534fd79f23f3b5879d15af1d28d420d70b5f4a Mon Sep 17 00:00:00 2001 From: asur4s Date: Fri, 2 Sep 2022 19:54:53 -0400 Subject: [PATCH] Fix ci --- build.rs | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/build.rs b/build.rs index 9b353b42e..01fe8ada1 100644 --- a/build.rs +++ b/build.rs @@ -41,16 +41,6 @@ fn build_rc_source() { .unwrap(); } -fn check_environment() { - // Check env variable - let env_list = vec!["LLVM_HOME", "VCPKG_ROOT"]; - for env in env_list.iter() { - if std::env::var(env).is_err() { - panic!("Missing environment variable: {:?}", env); - }; - } -} - fn install_oboe() { let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap(); if target_os != "android" { @@ -87,19 +77,10 @@ fn install_oboe() { } fn gen_flutter_rust_bridge() { - // Get dependent of flutter - if !std::path::Path::new("./flutter/.packages").exists() { - std::process::Command::new("flutter") - .args(["pub", "get"]) - .current_dir("./flutter") - .output() - .expect("Failed to execute flutter pub get"); - }; let llvm_path = match std::env::var("LLVM_HOME") { Ok(path) => Some(vec![path]), - Err(_) => panic!("Failure to get environments"), + Err(_) => None, }; - // Tell Cargo that if the given file changes, to rerun this build script. println!("cargo:rerun-if-changed=src/flutter_ffi.rs"); // settings for fbr_codegen @@ -119,8 +100,6 @@ fn gen_flutter_rust_bridge() { } fn main() { - check_environment(); - hbb_common::gen_version(); install_oboe(); // there is problem with cfg(target_os) in build.rs, so use our workaround @@ -137,4 +116,4 @@ fn main() { build_windows(); #[cfg(target_os = "macos")] println!("cargo:rustc-link-lib=framework=ApplicationServices"); -} +} \ No newline at end of file