diff options
Diffstat (limited to 'src-tauri')
-rw-r--r-- | src-tauri/src/lib.rs | 7 | ||||
-rw-r--r-- | src-tauri/src/main.rs | 8 |
2 files changed, 11 insertions, 4 deletions
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index da1ba9b8..d1073387 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -1,3 +1,5 @@ +use std::env; + use anyhow::{anyhow, Context, Result}; use powershell_script::PsScriptBuilder; use regex::Regex; @@ -244,3 +246,8 @@ pub async fn install_northstar(game_path: &str) -> Result<String> { Ok(nmod.version.clone()) } + +/// Returns identifier of host OS FlightCore is running on +pub fn get_host_os() -> String { + env::consts::OS.to_string() +} diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 09123040..0b436262 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -12,7 +12,7 @@ use std::{ use anyhow::anyhow; use app::{ check_is_valid_game_path, find_game_install_location, get_northstar_version_number, - install_northstar, GameInstall, InstallType, + install_northstar, GameInstall, InstallType, get_host_os, }; use tauri::{Manager, State}; use tokio::time::sleep; @@ -54,7 +54,7 @@ fn main() { get_northstar_version_number_caller, check_is_northstar_outdated, verify_install_location, - get_host_os, + get_host_os_caller, install_northstar_caller, update_northstar_caller, launch_northstar @@ -158,8 +158,8 @@ fn verify_install_location(game_path: String) -> bool { #[tauri::command] /// Returns identifier of host OS FlightCore is running on -fn get_host_os() -> String { - env::consts::OS.to_string() +fn get_host_os_caller() -> String { + get_host_os() } #[tauri::command] |