From 55dbcb646b5baef799b11172ffc08d3c033fb988 Mon Sep 17 00:00:00 2001 From: 21pages Date: Sat, 9 Sep 2023 15:23:26 +0800 Subject: [PATCH] windows remove "--cm-no-ui", "--cm --hide" Signed-off-by: 21pages --- src/core_main.rs | 2 +- src/hbbs_http/sync.rs | 1 + src/server/connection.rs | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core_main.rs b/src/core_main.rs index 3fe1a1630..e7bb4d0f6 100644 --- a/src/core_main.rs +++ b/src/core_main.rs @@ -404,7 +404,7 @@ pub fn core_main() -> Option> { crate::ui_interface::start_option_status_sync(); } else if args[0] == "--cm-no-ui" { #[cfg(feature = "flutter")] - #[cfg(not(any(target_os = "android", target_os = "ios")))] + #[cfg(not(any(target_os = "android", target_os = "ios", target_os = "windows")))] crate::flutter::connection_manager::start_cm_no_ui(); return None; } else { diff --git a/src/hbbs_http/sync.rs b/src/hbbs_http/sync.rs index 9db6c1c93..e997a2794 100644 --- a/src/hbbs_http/sync.rs +++ b/src/hbbs_http/sync.rs @@ -157,6 +157,7 @@ fn handle_config_options(config_options: HashMap) { Config::set_options(options); } +#[allow(unused)] #[cfg(not(any(target_os = "ios")))] pub fn is_pro() -> bool { PRO.lock().unwrap().clone() diff --git a/src/server/connection.rs b/src/server/connection.rs index 85db55136..969eb47a1 100644 --- a/src/server/connection.rs +++ b/src/server/connection.rs @@ -2412,7 +2412,10 @@ async fn start_ipc( if let Ok(s) = crate::ipc::connect(1000, "_cm").await { stream = Some(s); } else { + #[allow(unused_mut)] + #[allow(unused_assignments)] let mut args = vec!["--cm"]; + #[cfg(not(windows))] if crate::hbbs_http::sync::is_pro() && password::hide_cm() { args.push("--hide"); }