| 1 | //! WANDA GUI - Tauri application |
| 2 | |
| 3 | #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] |
| 4 | |
| 5 | mod commands; |
| 6 | mod state; |
| 7 | |
| 8 | use state::AppState; |
| 9 | use std::sync::Arc; |
| 10 | use tokio::sync::Mutex; |
| 11 | |
| 12 | fn main() { |
| 13 | tauri::Builder::default() |
| 14 | .plugin(tauri_plugin_shell::init()) |
| 15 | .manage(Arc::new(Mutex::new(AppState::new()))) |
| 16 | .invoke_handler(tauri::generate_handler![ |
| 17 | commands::get_games, |
| 18 | commands::get_game, |
| 19 | commands::launch_game, |
| 20 | commands::get_prefixes, |
| 21 | commands::get_prefix_health, |
| 22 | commands::repair_prefix, |
| 23 | commands::init_wanda, |
| 24 | commands::get_init_status, |
| 25 | commands::get_config, |
| 26 | commands::update_config, |
| 27 | commands::get_wemod_status, |
| 28 | commands::update_wemod, |
| 29 | commands::get_proton_versions, |
| 30 | commands::run_doctor, |
| 31 | ]) |
| 32 | .run(tauri::generate_context!()) |
| 33 | .expect("error while running tauri application"); |
| 34 | } |
| 35 |