mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-16 09:04:45 +01:00
program opening command
This commit is contained in:
@@ -8,13 +8,20 @@ mod proxy;
|
||||
use tauri::{
|
||||
command
|
||||
};
|
||||
use opener;
|
||||
|
||||
fn main() {
|
||||
tauri::Builder::default()
|
||||
.invoke_handler(tauri::generate_handler![run_program])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn run_program(path: String) {
|
||||
opener::open(path.clone());
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn connect() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user