Sync from development - prepare for v0.5.0.4

This commit is contained in:
Omni
2026-03-29 15:46:37 +01:00
parent 8e4dd06f11
commit c3551cd269
55 changed files with 334 additions and 333 deletions

View File

@@ -132,13 +132,24 @@ class ProtontricksDetectionService:
logger.error(error_msg)
return False, error_msg
# Use clean environment
env = handler._get_clean_subprocess_env()
# Register flathub at user level if not already present.
# Fresh Steam Decks only have flathub at system scope; --user install can't see it.
try:
subprocess.run(
["flatpak", "remote-add", "--if-not-exists", "--user",
"flathub", "https://dl.flathub.org/repo/flathub.flatpakrepo"],
check=True, text=True, env=env, capture_output=True, timeout=30,
)
except subprocess.CalledProcessError as e:
logger.warning(f"Could not register flathub remote: {e.stderr.strip()}")
# Install command - use --user flag for user-level installation (works on Steam Deck)
# Avoids system-wide installation permissions
install_cmd = ["flatpak", "install", "--user", "-y", "--noninteractive", "flathub", "com.github.Matoking.protontricks"]
# Use clean environment
env = handler._get_clean_subprocess_env()
# Log the command for debugging
logger.debug(f"Running flatpak install command: {' '.join(install_cmd)}")