添加thunk-rs链接Windows 7兼容库
This commit is contained in:
@@ -9,6 +9,9 @@ common = { path = "../common", default-features = false }
|
||||
tokio = { version = "1.37.0", features = ["full"] }
|
||||
log = "0.4.17"
|
||||
|
||||
[target.'cfg(windows)'.build-dependencies]
|
||||
thunk-rs = { version = "0.3.3", features = ["win7"] }
|
||||
|
||||
[features]
|
||||
default = ["default-feature"]
|
||||
default-feature = ["server_encrypt", "aes_gcm", "aes_cbc", "aes_ecb", "sm4_cbc", "chacha20_poly1305", "port_mapping", "log", "command", "file_config", "lz4", "ws"]
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
fn main() {
|
||||
// 配置 thunk-rs 来链接 Windows 7 兼容库,并自动设置链接参数
|
||||
#[cfg(target_os = "windows")]
|
||||
thunk::thunk();
|
||||
}
|
||||
+4
-1
@@ -19,6 +19,9 @@ signal-hook = "0.3.17"
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
winapi = { version = "0.3.9", features = ["handleapi", "processthreadsapi", "winnt", "securitybaseapi", "impl-default"] }
|
||||
|
||||
[target.'cfg(windows)'.build-dependencies]
|
||||
thunk-rs = { version = "0.3.3", features = ["win7"] }
|
||||
|
||||
[features]
|
||||
default = ["default-feature"]
|
||||
default-feature = ["server_encrypt", "aes_gcm", "aes_cbc", "aes_ecb", "sm4_cbc", "chacha20_poly1305", "ip_proxy", "port_mapping", "log", "command", "file_config", "lz4", "ws"]
|
||||
@@ -44,4 +47,4 @@ command = ["common/command"]
|
||||
file_config = ["common/file_config"]
|
||||
[build-dependencies]
|
||||
rand = "0.8.5"
|
||||
chrono = "0.4.23"
|
||||
chrono = "0.4.23"
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
use cfg_aliases::cfg_aliases;
|
||||
|
||||
fn main() {
|
||||
#[cfg(target_os = "windows")]
|
||||
thunk::thunk();
|
||||
|
||||
cfg_aliases! {
|
||||
cipher: {
|
||||
any(feature = "aes_gcm",
|
||||
|
||||
Reference in New Issue
Block a user