aboutsummaryrefslogtreecommitdiff
path: root/src-tauri
diff options
context:
space:
mode:
Diffstat (limited to 'src-tauri')
-rw-r--r--src-tauri/src/main.rs8
-rw-r--r--src-tauri/src/northstar/mod.rs3
-rw-r--r--src-tauri/src/platform_specific/mod.rs6
3 files changed, 9 insertions, 8 deletions
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs
index 6bb65a2c..3ad7a1ea 100644
--- a/src-tauri/src/main.rs
+++ b/src-tauri/src/main.rs
@@ -123,7 +123,7 @@ fn main() {
northstar::get_northstar_version_number,
check_is_northstar_outdated,
verify_install_location,
- get_host_os,
+ platform_specific::get_host_os,
install_northstar_caller,
update_northstar,
northstar::launch_northstar,
@@ -475,9 +475,3 @@ pub fn check_is_valid_game_path(game_install_path: &str) -> Result<(), String> {
}
Ok(())
}
-
-/// Returns identifier of host OS FlightCore is running on
-#[tauri::command]
-fn get_host_os() -> String {
- env::consts::OS.to_string()
-}
diff --git a/src-tauri/src/northstar/mod.rs b/src-tauri/src/northstar/mod.rs
index 284eac41..a6b895db 100644
--- a/src-tauri/src/northstar/mod.rs
+++ b/src-tauri/src/northstar/mod.rs
@@ -6,7 +6,8 @@ pub mod profile;
use crate::util::check_ea_app_or_origin_running;
use crate::{
constants::{CORE_MODS, TITANFALL2_STEAM_ID},
- get_host_os, GameInstall, InstallType,
+ platform_specific::get_host_os,
+ GameInstall, InstallType,
};
use anyhow::anyhow;
diff --git a/src-tauri/src/platform_specific/mod.rs b/src-tauri/src/platform_specific/mod.rs
index d5acfde8..8dca9424 100644
--- a/src-tauri/src/platform_specific/mod.rs
+++ b/src-tauri/src/platform_specific/mod.rs
@@ -4,6 +4,12 @@ pub mod windows;
#[cfg(target_os = "linux")]
pub mod linux;
+/// Returns identifier of host OS FlightCore is running on
+#[tauri::command]
+pub fn get_host_os() -> String {
+ std::env::consts::OS.to_string()
+}
+
/// On Linux attempts to install NorthstarProton
/// On Windows simply returns an error message
#[tauri::command]