chore: add update dialog
This commit is contained in:
2
src-tauri/Cargo.lock
generated
2
src-tauri/Cargo.lock
generated
@@ -1081,7 +1081,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ezpplauncher"
|
||||
version = "0.1.0"
|
||||
version = "3.0.0-beta.1"
|
||||
dependencies = [
|
||||
"hardware-id",
|
||||
"md5",
|
||||
|
@@ -1,8 +1,8 @@
|
||||
[package]
|
||||
name = "ezpplauncher"
|
||||
version = "0.1.0"
|
||||
description = "A Tauri App"
|
||||
authors = ["you"]
|
||||
version = "3.0.0-beta.1"
|
||||
description = "EZPPLauncher redefined."
|
||||
authors = ["HorizonCode"]
|
||||
edition = "2024"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
@@ -16,6 +16,11 @@ use crate::utils::{
|
||||
set_osu_config_vals, set_osu_user_config_vals,
|
||||
};
|
||||
|
||||
#[tauri::command]
|
||||
pub fn get_launcher_version() -> String {
|
||||
env!("CARGO_PKG_VERSION").to_string()
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn get_hwid() -> String {
|
||||
let hwid = get_id().unwrap();
|
||||
@@ -624,3 +629,8 @@ pub fn is_osu_running() -> bool {
|
||||
pub fn open_url_in_browser(url: String) -> Result<(), String> {
|
||||
open::that(&url).map_err(|e| format!("Failed to open URL: {}", e))
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn exit(app: AppHandle) {
|
||||
app.exit(0x0100);
|
||||
}
|
||||
|
@@ -4,10 +4,11 @@ use tauri::Manager;
|
||||
pub mod commands;
|
||||
pub mod utils;
|
||||
use crate::commands::{
|
||||
download_ezpp_launcher_update_files, find_osu_installation, get_beatmapsets_count,
|
||||
get_ezpp_launcher_update_files, get_hwid, get_osu_release_stream, get_osu_skin,
|
||||
get_osu_version, get_skins_count, is_osu_running, open_url_in_browser, replace_ui_files,
|
||||
run_osu, run_osu_updater, set_osu_config_values, set_osu_user_config_values, valid_osu_folder,
|
||||
download_ezpp_launcher_update_files, exit, find_osu_installation, get_beatmapsets_count,
|
||||
get_ezpp_launcher_update_files, get_hwid, get_launcher_version, get_osu_release_stream,
|
||||
get_osu_skin, get_osu_version, get_skins_count, is_osu_running, open_url_in_browser,
|
||||
replace_ui_files, run_osu, run_osu_updater, set_osu_config_values, set_osu_user_config_values,
|
||||
valid_osu_folder,
|
||||
};
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
@@ -42,7 +43,9 @@ pub fn run() {
|
||||
download_ezpp_launcher_update_files,
|
||||
replace_ui_files,
|
||||
is_osu_running,
|
||||
open_url_in_browser
|
||||
open_url_in_browser,
|
||||
get_launcher_version,
|
||||
exit
|
||||
])
|
||||
.plugin(tauri_plugin_fs::init())
|
||||
.plugin(tauri_plugin_dialog::init())
|
||||
|
Reference in New Issue
Block a user