feat: initial support for segatools pkgs

This commit is contained in:
2025-03-15 00:08:33 +01:00
parent b525e74467
commit caa20a3aa0
20 changed files with 246 additions and 112 deletions

View File

@ -45,11 +45,15 @@ pub async fn kill() -> Result<(), String> {
}
#[tauri::command]
pub async fn install_package(state: State<'_, tokio::sync::Mutex<AppData>>, key: PkgKey) -> Result<InstallResult, String> {
pub async fn install_package(
state: State<'_, tokio::sync::Mutex<AppData>>,
key: PkgKey,
force: bool
) -> Result<InstallResult, String> {
log::debug!("invoke: install_package({})", key);
let mut appd = state.lock().await;
appd.pkgs.install_package(&key, true, true)
appd.pkgs.install_package(&key, force, true)
.await
.map_err(|e| e.to_string())
}