diff --git a/build.py b/build.py index fffb22180..3e7ce853e 100755 --- a/build.py +++ b/build.py @@ -268,6 +268,9 @@ def build_flutter_arch_manjaro(version, features): def build_flutter_windows(version, features): os.system(f'cargo build --features {features} --lib --release') + if not os.path.exists("target/release/librustdesk.dll"): + print("cargo build failed, please check rust source code.") + exit(-1) os.chdir('flutter') os.system('flutter build windows --release') os.chdir('..') diff --git a/src/tray.rs b/src/tray.rs index 4f45dc7bb..10688bf5f 100644 --- a/src/tray.rs +++ b/src/tray.rs @@ -1,5 +1,4 @@ use hbb_common::log::{debug, error, info}; -use lazy_static::lazy_static; #[cfg(target_os = "linux")] use libappindicator::AppIndicator; use std::env::temp_dir; @@ -7,6 +6,11 @@ use std::{ collections::HashMap, sync::{Arc, Mutex, RwLock}, }; +use trayicon::{MenuBuilder, TrayIconBuilder}; +use winit::{ + event::Event, + event_loop::{ControlFlow, EventLoop}, +}; #[derive(Clone, Eq, PartialEq, Debug)] enum Events {