Skip to content

Commit

Permalink
Merge pull request #7 from Iam54r1n4/main
Browse files Browse the repository at this point in the history
Activate deep link just for windows and linux.
  • Loading branch information
hiddify-com authored Feb 22, 2023
2 parents da4dd34 + 00b4ebe commit 688b9f8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ static mut NEED_WINDOW_BE_FOCUS:Lazy<Arc<Mutex<bool>>> = 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 {
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 688b9f8

Please sign in to comment.