From 00b4ebe81eb236bb0120d23be46cabbcb3afd01f Mon Sep 17 00:00:00 2001 From: Iam54r1n4 Date: Thu, 23 Feb 2023 02:12:20 +0330 Subject: [PATCH] Activate deep link just for windows and linux. This [commit](fa466b7) not worked, because its for runtime we need to check in compile-time --- src-tauri/src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 7b1106f9a..dad366edb 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -25,8 +25,9 @@ static mut NEED_WINDOW_BE_FOCUS:Lazy>> = Lazy::new(|| Arc::new(M #[tokio::main] async fn main() -> std::io::Result<()> { - if std::env::consts::OS == "windows" || std::env::consts::OS == "linux"{ - // Deep linking + #[cfg(not(target_os = "macos"))] + { + // Deep linking deep_link::prepare("app.HiddifyDesktop"); // Define deep link handler let handler = | deep_link | async move { @@ -62,8 +63,7 @@ async fn main() -> std::io::Result<()> { if deep_link_register_result.is_err(){ println!("We can't register \"clash\" scheme for program | {}",deep_link_register_result.err().unwrap()) } - } - + } // 单例检测 if server::check_singleton().is_err() {