From 0f7fa5ba0d26114f2be8a666fee63aacb2c3ab0c Mon Sep 17 00:00:00 2001 From: ALEZ-DEV Date: Sun, 4 May 2025 18:07:59 +0200 Subject: [PATCH] can now specify steam client path with BT_STEAM_CLIENT_PATH --- .../src/components/proton_component.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/babylonia-terminal-sdk/src/components/proton_component.rs b/babylonia-terminal-sdk/src/components/proton_component.rs index c628e47..64429ce 100644 --- a/babylonia-terminal-sdk/src/components/proton_component.rs +++ b/babylonia-terminal-sdk/src/components/proton_component.rs @@ -110,6 +110,9 @@ impl ProtonComponent { let mut proton = wincompatlib::prelude::Proton::new(self.path.clone(), Some(prefix.clone())); let steam_location = Self::get_steam_location()?; + + debug!("Steam location used -> {:?}", steam_location); + proton.steam_client_path = Some(steam_location); proton.init_prefix(Some(prefix)).unwrap(); @@ -117,11 +120,16 @@ impl ProtonComponent { } fn get_steam_location() -> Result { + let specified_steam_location = std::env::var("BT_STEAM_CLIENT_PATH"); + if let Ok(location) = specified_steam_location { + return Ok(PathBuf::from(location)); + } + let location_to_check = [ dirs::home_dir().unwrap().join(".steam/steam"), dirs::home_dir() .unwrap() - .join("/.var/app/com.valvesoftware.Steam/steam"), // for the flatpak version of steam + .join(".var/app/com.valvesoftware.Steam/steam"), // for the flatpak version of steam ]; for location in location_to_check {