aboutsummaryrefslogtreecommitdiff
path: root/libs/nak/src
diff options
context:
space:
mode:
Diffstat (limited to 'libs/nak/src')
-rw-r--r--libs/nak/src/paths.rs6
-rw-r--r--libs/nak/src/runtime_wrap.rs36
2 files changed, 3 insertions, 39 deletions
diff --git a/libs/nak/src/paths.rs b/libs/nak/src/paths.rs
index e86c284..f6dde6c 100644
--- a/libs/nak/src/paths.rs
+++ b/libs/nak/src/paths.rs
@@ -1,11 +1,11 @@
//! Shared data directory for Fluorine Manager.
//!
-//! All data lives under `~/.var/app/com.fluorine.manager/`.
+//! All data lives under `~/.local/share/fluorine/`.
use std::path::PathBuf;
-/// Returns the Fluorine data directory (`~/.var/app/com.fluorine.manager`).
+/// Returns the Fluorine data directory (`~/.local/share/fluorine`).
pub fn data_dir() -> PathBuf {
let home = std::env::var("HOME").unwrap_or_else(|_| "/tmp".to_string());
- PathBuf::from(home).join(".var/app/com.fluorine.manager")
+ PathBuf::from(home).join(".local/share/fluorine")
}
diff --git a/libs/nak/src/runtime_wrap.rs b/libs/nak/src/runtime_wrap.rs
index d33bd59..9b5ff89 100644
--- a/libs/nak/src/runtime_wrap.rs
+++ b/libs/nak/src/runtime_wrap.rs
@@ -34,23 +34,6 @@ fn find_in_path(binary: &str) -> Option<PathBuf> {
}
pub fn resolve_umu_run() -> Option<PathBuf> {
- if is_flatpak() {
- // In Flatpak, umu-run must run on the host via flatpak-spawn --host.
- let host_copy = env::var("XDG_DATA_HOME")
- .ok()
- .map(PathBuf::from)
- .unwrap_or_else(|| {
- let home = env::var("HOME").unwrap_or_else(|_| "/tmp".to_string());
- PathBuf::from(home).join(".local/share")
- })
- .join("fluorine/umu-run");
- if host_copy.exists() {
- return Some(host_copy);
- }
- // Fall back to bare name for host PATH resolution.
- return Some(PathBuf::from("umu-run"));
- }
-
let bundled = env::var("NAK_BUNDLED_UMU_RUN")
.ok()
.map(PathBuf::from)
@@ -64,14 +47,8 @@ pub fn resolve_umu_run() -> Option<PathBuf> {
}
}
-pub fn is_flatpak() -> bool {
- Path::new("/.flatpak-info").exists()
-}
-
/// Build a command to run `exe` with the given environment variables.
///
-/// In Flatpak mode, `flatpak-spawn --host` is used and env vars are passed as
-/// `--env=KEY=VALUE` flags (the host process does NOT inherit the sandbox env).
/// In steam-run mode, the command is wrapped with `steam-run`.
/// Otherwise the command runs directly.
pub fn build_command<S: AsRef<OsStr>>(
@@ -86,19 +63,6 @@ pub fn build_command<S: AsRef<OsStr>>(
}
return cmd;
}
- if is_flatpak() {
- let mut cmd = Command::new("flatpak-spawn");
- cmd.arg("--host");
- for (key, value) in envs {
- cmd.arg(format!(
- "--env={}={}",
- key,
- value.as_ref().to_string_lossy()
- ));
- }
- cmd.arg(exe.as_ref());
- return cmd;
- }
let mut cmd = Command::new(exe);
for (key, value) in envs {
cmd.env(key, value.as_ref());