aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src/main.rs
diff options
context:
space:
mode:
authorSalmon <99826409+TH3-S4LM0N@users.noreply.github.com>2022-10-18 08:26:14 -0500
committerGitHub <noreply@github.com>2022-10-18 15:26:14 +0200
commitc4ce52bb45f0dcda8ea924694b48a8e0501d57c0 (patch)
tree6bd3aa2699d59ff7831fdd45df861be886ec0ba0 /src-tauri/src/main.rs
parentc1df0ef8f556eb9d3d8f2f7fcf8f814ae8a56780 (diff)
downloadFlightCore-c4ce52bb45f0dcda8ea924694b48a8e0501d57c0.tar.gz
FlightCore-c4ce52bb45f0dcda8ea924694b48a8e0501d57c0.zip
Add ldd --version check for Linux (#10)
Diffstat (limited to 'src-tauri/src/main.rs')
-rw-r--r--src-tauri/src/main.rs15
1 files changed, 13 insertions, 2 deletions
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs
index 9cbef850..a33f836c 100644
--- a/src-tauri/src/main.rs
+++ b/src-tauri/src/main.rs
@@ -13,7 +13,7 @@ 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_enabled_mods, get_host_os, get_log_list, get_northstar_version_number, install_northstar,
- launch_northstar, set_mod_enabled_status, GameInstall,
+ launch_northstar, set_mod_enabled_status, GameInstall, linux_checks_librs
};
mod repair_and_verify;
@@ -87,7 +87,8 @@ fn main() {
get_enabled_mods_caller,
set_mod_enabled_status_caller,
disable_all_but_core_caller,
- is_debug_mode
+ is_debug_mode,
+ linux_checks
])
.run(tauri::generate_context!())
.expect("error while running tauri application");
@@ -118,6 +119,16 @@ fn is_debug_mode() -> bool {
}
#[tauri::command]
+/// Returns true if linux compatible
+fn linux_checks() -> bool {
+ if get_host_os() == "windows" {
+ false
+ } else {
+ linux_checks_librs()
+ }
+}
+
+#[tauri::command]
/// Returns the current version number as a string
fn get_version_number() -> String {
let version = env!("CARGO_PKG_VERSION");