feat: port to Microsoft Windows

This commit is contained in:
2025-02-23 18:12:20 +00:00
parent a29bce2227
commit caead1e70f
12 changed files with 145 additions and 26 deletions

View File

@ -20,7 +20,7 @@ pub async fn startline(state: State<'_, Mutex<AppData>>) -> Result<(), String> {
if let Some(p) = &appd.profile {
// TODO if p.needsUpdate
liner::line_up(p).await.expect("Line-up failed");
start::start(p).map_err(|e| e.to_string()).map(|_| ())
start::start(p).map_err(|e| { log::error!("Error launching: {}", e.to_string()); e.to_string() }).map(|_| ())
//Ok(())
} else {
Err("No profile".to_owned())
@ -126,12 +126,12 @@ pub async fn save_profile(state: State<'_, Mutex<AppData>>) -> Result<(), ()> {
#[tauri::command]
pub async fn init_profile(
state: State<'_, Mutex<AppData>>,
path: PathBuf,
exe_path: PathBuf
) -> Result<Profile, String> {
log::debug!("invoke: init_profile");
log::debug!("invoke: init_profile({})", exe_path.to_string_lossy());
let mut appd = state.lock().await;
let new_profile = Profile::new(path);
let new_profile = Profile::new(exe_path);
new_profile.save().await;
appd.profile = Some(new_profile.clone());