#[cfg(windows)] use tauri::Manager; #[cfg(windows)] mod windows_appbar; #[cfg_attr(mobile, tauri::mobile_entry_point)] pub fn run() { tauri::Builder::default() .setup(|app| { #[cfg(windows)] { let window = app .get_webview_window("main") .expect("main window must be configured"); windows_appbar::register(window.hwnd()?)?; } Ok(()) }) .build(tauri::generate_context!()) .expect("failed to build SenlinAI App") .run(|_, event| { #[cfg(windows)] if matches!(event, tauri::RunEvent::ExitRequested { .. }) { windows_appbar::unregister(); } }); }