From c0b597f1bfaa63153a337eb7280fbbb4fa7b824a Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Sat, 24 Sep 2022 17:30:04 +0200 Subject: Add code skeleton to verify game files Once done, should help with some tickets. --- src-tauri/src/main.rs | 12 +++++++++++- src-tauri/src/repair_and_verify/mod.rs | 9 +++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 src-tauri/src/repair_and_verify/mod.rs (limited to 'src-tauri') diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 264a8395..025b6863 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -15,6 +15,10 @@ use app::{ get_host_os, get_log_list, get_northstar_version_number, install_northstar, launch_northstar, GameInstall, }; + +mod repair_and_verify; +use repair_and_verify::verify_game_files; + use tauri::Manager; use tokio::time::sleep; use tauri_plugin_store::PluginBuilder; @@ -78,7 +82,8 @@ fn main() { update_northstar_caller, launch_northstar_caller, check_is_flightcore_outdated_caller, - get_log_list_caller + get_log_list_caller, + verify_game_files_caller ]) .run(tauri::generate_context!()) .expect("error while running tauri application"); @@ -246,3 +251,8 @@ fn launch_northstar_caller(game_install: GameInstall) -> Result fn get_log_list_caller(game_install: GameInstall) -> Result, String> { get_log_list(game_install) } + +#[tauri::command] +fn verify_game_files_caller(game_install: GameInstall) -> Result { + verify_game_files(game_install) +} diff --git a/src-tauri/src/repair_and_verify/mod.rs b/src-tauri/src/repair_and_verify/mod.rs new file mode 100644 index 00000000..e99dcbfc --- /dev/null +++ b/src-tauri/src/repair_and_verify/mod.rs @@ -0,0 +1,9 @@ +/// Contains various functions to repair common issues and verifying installation + +use app::GameInstall; + +/// Verifies Titanfall2 game files +pub fn verify_game_files(game_install: GameInstall) -> Result { + dbg!(game_install); + Err("TODO, not yet implemented".to_string()) +} -- cgit v1.2.3