diff --git a/Cargo.toml b/Cargo.toml index 43963d125..c5225c354 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -60,9 +60,6 @@ reqwest = { git = "https://github.com/rustdesk-org/reqwest", features = ["blocki [target.'cfg(not(any(target_os = "macos", target_os = "windows")))'.dependencies] reqwest = { git = "https://github.com/rustdesk-org/reqwest", features = ["blocking", "socks", "json", "rustls-tls", "rustls-tls-native-roots", "gzip"], default-features=false } -[build-dependencies] -hbb_common = { path = "libs/hbb_common" } - [workspace] members = ["libs/hbb_common"] exclude = ["ui"] diff --git a/build.rs b/build.rs index 9f8c85547..1dbb1c0b6 100644 --- a/build.rs +++ b/build.rs @@ -1,3 +1,14 @@ +use std::{env, fs}; + fn main() { - hbb_common::gen_version(); + println!("cargo:rerun-if-changed=Cargo.toml"); + let version = env::var("CARGO_PKG_VERSION").unwrap(); + fs::write( + "./src/version.rs", + format!( + "pub const VERSION: &str = \"{version}\";\n\ + #[allow(dead_code)]\npub const BUILD_DATE: &str = \"\";\n" + ), + ) + .unwrap(); }