Migrate to Tauri v2 and fix configuration issues
This commit is contained in:
1 parent
7b772bb1bb
commit
340ce3d834
6 files changed
+115
-83
No files matched your search
+42
-30
@@ -289,39 +289,51 @@ pub async fn lib_download_plugin_from_repository(
|
||||
}
|
||||
}
|
||||
|
||||
/// Configure and run the Tauri application
|
||||
// Tauri v2 plugin initialization
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
// Build the Tauri application
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_dialog::init())
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
// Plugin discovery commands
|
||||
scan_server_dir,
|
||||
scan_server_dir_sync,
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_shell::init())
|
||||
.plugin(tauri_plugin_dialog::init())
|
||||
.plugin(tauri_plugin_fs::init())
|
||||
.setup(|app| {
|
||||
if cfg!(debug_assertions) {
|
||||
app.handle().plugin(
|
||||
tauri_plugin_log::Builder::default()
|
||||
.level(log::LevelFilter::Info)
|
||||
.build(),
|
||||
)?;
|
||||
}
|
||||
Ok(())
|
||||
})
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
// Plugin discovery commands
|
||||
scan_server_dir,
|
||||
scan_server_dir_sync,
|
||||
|
||||
// Plugin repository commands
|
||||
search_plugins,
|
||||
get_plugin_details,
|
||||
// Plugin repository commands
|
||||
search_plugins,
|
||||
get_plugin_details,
|
||||
|
||||
// Update commands
|
||||
update_plugin,
|
||||
check_plugin_updates,
|
||||
check_single_plugin_update_command,
|
||||
backup_plugin_command,
|
||||
// Update commands
|
||||
update_plugin,
|
||||
check_plugin_updates,
|
||||
check_single_plugin_update_command,
|
||||
backup_plugin_command,
|
||||
|
||||
// Plugin management commands
|
||||
download_plugin,
|
||||
set_plugin_repository,
|
||||
get_plugin_versions,
|
||||
load_plugin_data,
|
||||
save_plugin_data,
|
||||
// Plugin management commands
|
||||
download_plugin,
|
||||
set_plugin_repository,
|
||||
get_plugin_versions,
|
||||
load_plugin_data,
|
||||
save_plugin_data,
|
||||
|
||||
// Utility commands
|
||||
get_potential_plugin_matches,
|
||||
compare_versions,
|
||||
is_plugin_compatible,
|
||||
greet
|
||||
])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
// Utility commands
|
||||
get_potential_plugin_matches,
|
||||
compare_versions,
|
||||
is_plugin_compatible,
|
||||
greet
|
||||
])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
||||
@@ -2,5 +2,5 @@
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||
|
||||
fn main() {
|
||||
plugsnatcher_lib::run();
|
||||
app_lib::run();
|
||||
}
|
||||
Reference in new issue
Block a user