fix: begin fixing linux support

This commit is contained in:
2025-04-23 17:17:59 +02:00
parent f26d83f291
commit bf4c06ee2d
13 changed files with 135 additions and 30 deletions

View File

@ -75,6 +75,7 @@ pub async fn startline(app: AppHandle, refresh: bool) -> Result<(), String> {
&p.data.sgt.target.parent().unwrap().join("amdaemon.exe")
).map_err(|e| e.to_string())?;
#[cfg(target_os = "windows")]
let info = p.prepare_display()
.map_err(|e| e.to_string())?;
let lineup_res = p.line_up(hash, refresh, patches_enabled).await
@ -408,10 +409,14 @@ pub async fn load_segatools_ini(state: State<'_, Mutex<AppData>>, path: PathBuf)
}
#[tauri::command]
pub async fn create_shortcut(app: AppHandle, profile_meta: ProfileMeta) -> Result<(), String> {
pub async fn create_shortcut(_app: AppHandle, profile_meta: ProfileMeta) -> Result<(), String> {
log::debug!("invoke: create_shortcut({:?})", profile_meta);
util::create_shortcut(app, &profile_meta).map_err(|e| e.to_string())
#[cfg(target_os = "windows")]
return util::create_shortcut(_app, &profile_meta).map_err(|e| e.to_string());
#[cfg(not(target_os = "windows"))]
return Err("unsupported".to_owned());
}
#[tauri::command]
@ -466,7 +471,7 @@ pub async fn list_platform_capabilities() -> Result<Vec<String>, ()> {
log::debug!("invoke: list_platform_capabilities");
#[cfg(target_os = "windows")]
return Ok(vec!["display".to_owned()]);
return Ok(vec!["display".to_owned(), "shortcut".to_owned(), "chunithm".to_owned()]);
#[cfg(target_os = "linux")]
return Ok(vec!["wine".to_owned()]);