app.UsePathBase(new PathString(config.GetValue("pathBase")));
let app = tauri::Builder::default()
.invoke_handler(tauri::generate_handler![greet])
.build(tauri::generate_context!())
.expect("error while running tauri application");
app.run(|app_handle, e| match e {
RunEvent::WindowEvent { label, event, .. } => {
match event {
WindowEvent::CloseRequested { api, .. } => {
let app_handle = app_handle.clone();
let window = app_handle.get_window(&label).unwrap();
api.prevent_close();
}
_ => {}
}
}
_ => {}
});