aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src/lib.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/lib.rs
parentc1df0ef8f556eb9d3d8f2f7fcf8f814ae8a56780 (diff)
downloadFlightCore-c4ce52bb45f0dcda8ea924694b48a8e0501d57c0.tar.gz
FlightCore-c4ce52bb45f0dcda8ea924694b48a8e0501d57c0.zip
Add ldd --version check for Linux (#10)
Diffstat (limited to 'src-tauri/src/lib.rs')
-rw-r--r--src-tauri/src/lib.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index d3086e2f..38acf069 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -6,6 +6,8 @@ mod platform_specific;
#[cfg(target_os = "windows")]
use platform_specific::windows;
+use platform_specific::linux;
+
use serde::{Deserialize, Serialize};
use sysinfo::SystemExt;
use zip::ZipArchive;
@@ -40,6 +42,21 @@ pub fn check_mod_version_number(path_to_mod_folder: String) -> Result<String, an
Ok(mod_version_number.to_string())
}
+// I intend to add more linux related stuff to check here, so making a func
+// for now tho it only checks `ldd --version`
+// - salmon
+
+pub fn linux_checks_librs() -> bool {
+ let mut linux_compatible: bool = true; // a variable that starts true and will be set to false if any of the checks arent met
+
+ // check `ldd --version` to see if glibc is up to date for northstar proton
+ let lddv = linux::check_glibc_v();
+ if lddv < 2.33 { linux_compatible = false };
+
+ return linux_compatible;
+}
+
+
/// Attempts to find the game install location
pub fn find_game_install_location() -> Result<GameInstall, anyhow::Error> {
// Attempt parsing Steam library directly