diff options
author | GeckoEidechse <gecko.eidechse+git@pm.me> | 2023-07-18 13:59:49 +0200 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2023-07-18 13:59:49 +0200 |
commit | 0cd98b60d77fedb5755ccb8cb827a37d4360c9dd (patch) | |
tree | 7e0fa2b5b51db3cf8eb29749ba030a2a9f046a0a | |
parent | 58b8dce1422ac2ddd31a6bea88fad64bf2920e1c (diff) | |
parent | dfa5af1746546d388a85081fae499c28521a20ea (diff) | |
download | FlightCore-0cd98b60d77fedb5755ccb8cb827a37d4360c9dd.tar.gz FlightCore-0cd98b60d77fedb5755ccb8cb827a37d4360c9dd.zip |
Merge branch 'main' into feat/read-packages-dir
-rw-r--r-- | src-tauri/Cargo.lock | 3 | ||||
-rw-r--r-- | src-tauri/Cargo.toml | 3 | ||||
-rw-r--r-- | src-tauri/src/northstar/install.rs | 16 | ||||
-rw-r--r-- | src-tauri/tauri.conf.json | 2 |
4 files changed, 21 insertions, 3 deletions
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 0756d3b5..77064841 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -76,12 +76,13 @@ checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" [[package]] name = "app" -version = "1.22.1" +version = "1.23.0" dependencies = [ "anyhow", "async-recursion", "chrono", "const_format", + "dirs", "json5", "libthermite", "log", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index c11e658d..ed523a4b 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "app" -version = "1.22.1" +version = "1.23.0" description = "A Tauri App" authors = ["you"] license = "" @@ -62,6 +62,7 @@ zip-extract = "0.1.2" # open urls open = "3.2.0" semver = "1.0" +dirs = "5" [target.'cfg(windows)'.dependencies] # Windows API stuff diff --git a/src-tauri/src/northstar/install.rs b/src-tauri/src/northstar/install.rs index 875458dd..c77fd538 100644 --- a/src-tauri/src/northstar/install.rs +++ b/src-tauri/src/northstar/install.rs @@ -168,6 +168,22 @@ pub fn find_game_install_location() -> Result<GameInstall, String> { // Attempt parsing Steam library directly match steamlocate::SteamDir::locate() { Some(mut steamdir) => { + #[cfg(target_os = "linux")] + { + let snap_dir = match std::env::var("SNAP_USER_DATA") { + Ok(snap_dir) => std::path::PathBuf::from(snap_dir), + Err(_) => match dirs::home_dir() { + Some(path) => path, + None => std::path::PathBuf::new(), + } + .join("snap"), + }; + + if steamdir.path.starts_with(snap_dir) { + log::warn!("Found Steam installed via Snap, you may encounter issues"); + } + } + let titanfall2_steamid = TITANFALL2_STEAM_ID.parse().unwrap(); match steamdir.app(&titanfall2_steamid) { Some(app) => { diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 41157bda..820b6d9b 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "FlightCore", - "version": "1.22.1" + "version": "1.23.0" }, "tauri": { "allowlist": { |