diff options
author | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-09-22 17:08:25 +0200 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-09-22 17:08:25 +0200 |
commit | bc0c8ead3f120402ada48780d1be42259384e0f4 (patch) | |
tree | 9a735609b5be265f0df9221056e96137a6f4749f /src-tauri/src/main.rs | |
parent | 0dd0cf6f370abb602399b94711e6eff1002ddfcf (diff) | |
download | FlightCore-bc0c8ead3f120402ada48780d1be42259384e0f4.tar.gz FlightCore-bc0c8ead3f120402ada48780d1be42259384e0f4.zip |
Add initial functionality to get NS log files
Diffstat (limited to 'src-tauri/src/main.rs')
-rw-r--r-- | src-tauri/src/main.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 492c5935..945d6528 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -12,7 +12,8 @@ use std::{ use app::{ check_is_flightcore_outdated, check_is_valid_game_path, check_northstar_running, check_origin_running, convert_release_candidate_number, find_game_install_location, - get_host_os, get_northstar_version_number, install_northstar, launch_northstar, GameInstall, + get_host_os, get_log_list, get_northstar_version_number, install_northstar, launch_northstar, + GameInstall, }; use tauri::{Manager, State}; use tokio::time::sleep; @@ -78,7 +79,8 @@ fn main() { install_northstar_caller, update_northstar_caller, launch_northstar_caller, - check_is_flightcore_outdated_caller + check_is_flightcore_outdated_caller, + get_log_list_caller ]) .run(tauri::generate_context!()) .expect("error while running tauri application"); @@ -247,3 +249,9 @@ async fn update_northstar_caller( fn launch_northstar_caller(game_install: GameInstall) -> Result<String, String> { launch_northstar(game_install) } + +#[tauri::command] +/// Get list of Northstar logs +fn get_log_list_caller(game_install: GameInstall) -> Result<Vec<std::path::PathBuf>, String> { + get_log_list(game_install) +} |