aboutsummaryrefslogtreecommitdiff
path: root/libs/nak/src
diff options
context:
space:
mode:
authorSulfurNitride <SulfurNitride@users.noreply.github.com>2026-02-23 17:44:12 -0600
committerSulfurNitride <SulfurNitride@users.noreply.github.com>2026-02-23 17:44:12 -0600
commitc360dbf9c42f71e7931c56b7a396ba7f7e9982e6 (patch)
tree12b44a194db2f8a44a3052b02fced46766a5deee /libs/nak/src
parenta8a287cd102001dddff30deec66140136da422d5 (diff)
Remove umu-run, keep game as child process for Steam tracking
- Remove umu-run entirely (crashed due to pressure-vessel/FUSE incompatibility) — use raw `proton run` instead - Replace startDetached() with QProcess::start() so the game stays in Fluorine's process tree. This lets Steam track the game lifetime and makes the "close game" button work when Fluorine is added as a non-Steam game. - Add writeIniValueDirect/readIniValueDirect for safe Bethesda INI handling without QSettings corruption - Fix prefix_setup.rs to skip umu-run bootstrapping - Clean up settings UI, build scripts, and docs for umu-run removal Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'libs/nak/src')
-rw-r--r--libs/nak/src/installers/prefix_setup.rs20
-rw-r--r--libs/nak/src/runtime_wrap.rs39
2 files changed, 3 insertions, 56 deletions
diff --git a/libs/nak/src/installers/prefix_setup.rs b/libs/nak/src/installers/prefix_setup.rs
index 4f27606..468aaa2 100644
--- a/libs/nak/src/installers/prefix_setup.rs
+++ b/libs/nak/src/installers/prefix_setup.rs
@@ -297,23 +297,9 @@ fn initialize_prefix_with_proton(
("WINEDLLOVERRIDES", "msdia80.dll=n;conhost.exe=d;cmd.exe=d".to_string()),
];
- let (exe, args): (std::path::PathBuf, Vec<&str>) = if runtime_wrap::use_umu_for_prefix() {
- if let Some(umu_run) = runtime_wrap::resolve_umu_run() {
- log_install(&format!("Initializing prefix with umu-run: {:?}", umu_run));
- envs.push(("PROTONPATH", proton.path.display().to_string()));
- envs.push(("WINEPREFIX", prefix_root.display().to_string()));
- envs.push(("GAMEID", app_id.to_string()));
- (umu_run, vec!["wineboot", "-u"])
- } else {
- log_warning(
- "UMU prefix mode enabled but no umu-run was found; falling back to proton wrapper",
- );
- (proton_script.clone(), vec!["run", "wineboot", "-u"])
- }
- } else {
- log_install(&format!("Initializing prefix with proton wrapper: {:?}", proton_script));
- (proton_script.clone(), vec!["run", "wineboot", "-u"])
- };
+ log_install(&format!("Initializing prefix with proton wrapper: {:?}", proton_script));
+ let (exe, args): (std::path::PathBuf, Vec<&str>) =
+ (proton_script.clone(), vec!["run", "wineboot", "-u"]);
let mut cmd = runtime_wrap::build_command(&exe, &envs);
cmd.args(&args);
diff --git a/libs/nak/src/runtime_wrap.rs b/libs/nak/src/runtime_wrap.rs
index 9b5ff89..69f693e 100644
--- a/libs/nak/src/runtime_wrap.rs
+++ b/libs/nak/src/runtime_wrap.rs
@@ -1,6 +1,5 @@
use std::env;
use std::ffi::OsStr;
-use std::path::{Path, PathBuf};
use std::process::Command;
fn env_flag(name: &str) -> bool {
@@ -18,35 +17,6 @@ pub fn use_steam_run() -> bool {
env_flag("NAK_USE_STEAM_RUN")
}
-pub fn use_umu_for_prefix() -> bool {
- env_flag("NAK_USE_UMU_FOR_PREFIX")
-}
-
-pub fn prefer_system_umu() -> bool {
- env_flag("NAK_PREFER_SYSTEM_UMU")
-}
-
-fn find_in_path(binary: &str) -> Option<PathBuf> {
- let path = env::var_os("PATH")?;
- env::split_paths(&path)
- .map(|entry| entry.join(binary))
- .find(|candidate| candidate.exists())
-}
-
-pub fn resolve_umu_run() -> Option<PathBuf> {
- let bundled = env::var("NAK_BUNDLED_UMU_RUN")
- .ok()
- .map(PathBuf::from)
- .filter(|p| p.exists());
- let system = find_in_path("umu-run");
-
- if prefer_system_umu() {
- system.or(bundled)
- } else {
- bundled.or(system)
- }
-}
-
/// Build a command to run `exe` with the given environment variables.
///
/// In steam-run mode, the command is wrapped with `steam-run`.
@@ -74,12 +44,3 @@ pub fn build_command<S: AsRef<OsStr>>(
pub fn command_for(exe: impl AsRef<OsStr>) -> Command {
build_command::<&str>(exe, &[])
}
-
-pub fn bundled_umu_path_from_appdir(appdir: &Path) -> Option<PathBuf> {
- let path = appdir.join("umu-run");
- if path.exists() {
- Some(path)
- } else {
- None
- }
-}