fix: build error in windows and linux
This commit is contained in:
@@ -120,7 +120,10 @@ fn main() {
|
|||||||
])
|
])
|
||||||
.build(tauri::generate_context!())
|
.build(tauri::generate_context!())
|
||||||
.expect("error while running tauri application")
|
.expect("error while running tauri application")
|
||||||
.run(|app, event| {
|
.run(
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
|app, event| {
|
||||||
|
#[cfg(any(target_os = "macos"))]
|
||||||
if let tauri::RunEvent::Opened { urls } = event {
|
if let tauri::RunEvent::Opened { urls } = event {
|
||||||
if let Some(w) = app.get_webview_window("main") {
|
if let Some(w) = app.get_webview_window("main") {
|
||||||
let urls = urls
|
let urls = urls
|
||||||
@@ -131,5 +134,6 @@ fn main() {
|
|||||||
let _ = w.eval(&format!("window.onFileOpen(`{urls}`)"));
|
let _ = w.eval(&format!("window.onFileOpen(`{urls}`)"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user