fastpack-tauri 0.29.8

Tauri GUI for FastPack
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::updater::{ReleaseInfo, do_apply, do_check, do_download};

#[tauri::command]
pub fn check_for_update() -> Result<Option<ReleaseInfo>, String> {
    do_check()
}

#[tauri::command]
pub fn download_update(url: String) -> Result<String, String> {
    do_download(&url).map(|p| p.to_string_lossy().into_owned())
}

#[tauri::command]
pub fn apply_update(path: String) -> Result<(), String> {
    do_apply(std::path::Path::new(&path))
}