mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-07 18:24:36 +00:00
add thunk-rs to support win7 (#812)
* add thunk-rs to support win7 --------- Co-authored-by: loecomm <loecom@qq.com>
This commit is contained in:
@@ -251,6 +251,13 @@ prost-reflect-build = { version = "0.14.0" }
|
||||
reqwest = { version = "0.12.12", features = ["blocking"] }
|
||||
zip = "0.6.6"
|
||||
|
||||
# enable thunk-rs when compiling for x86_64 or i686 windows
|
||||
[target.x86_64-pc-windows-msvc.build-dependencies]
|
||||
thunk-rs = { git = "https://github.com/easytier/thunk.git", default-features = false, features = ["win7"] }
|
||||
|
||||
[target.i686-pc-windows-msvc.build-dependencies]
|
||||
thunk-rs = { git = "https://github.com/easytier/thunk.git", default-features = false, features = ["win7"] }
|
||||
|
||||
|
||||
[dev-dependencies]
|
||||
serial_test = "3.0.0"
|
||||
|
||||
@@ -71,6 +71,8 @@ impl WindowsBuild {
|
||||
|
||||
if target.contains("x86_64") {
|
||||
println!("cargo:rustc-link-search=native=easytier/third_party/");
|
||||
} else if target.contains("i686") {
|
||||
println!("cargo:rustc-link-search=native=easytier/third_party/i686/");
|
||||
} else if target.contains("aarch64") {
|
||||
println!("cargo:rustc-link-search=native=easytier/third_party/arm64/");
|
||||
}
|
||||
@@ -125,6 +127,12 @@ fn check_locale() {
|
||||
}
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
// enable thunk-rs when target os is windows and arch is x86_64 or i686
|
||||
#[cfg(target_os = "windows")]
|
||||
if !std::env::var("TARGET").unwrap_or_default().contains("aarch64"){
|
||||
thunk::thunk();
|
||||
}
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
WindowsBuild::check_for_win();
|
||||
|
||||
|
||||
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Reference in New Issue
Block a user