mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-23 06:46:02 +00:00
fix: run x86 Proton under FEX in the Steam runtime it requires (#1034)
This commit is contained in:
1 parent
7c20d4b5c3
commit
2ea86b4abb
3 files changed
+127
-39
No files matched your search
@@ -901,24 +901,33 @@ def fex_wanted_marker():
|
||||
return os.path.join(os.environ.get("HOME", "/root"), ".config", "droiddeck", "fex-wanted")
|
||||
|
||||
|
||||
def request_fex(steam_root, asked):
|
||||
def request_app(steam_root, app):
|
||||
import subprocess
|
||||
client = os.path.join(steam_root, "steamrtarm64", "steam")
|
||||
if not os.access(client, os.X_OK):
|
||||
return []
|
||||
try:
|
||||
process = subprocess.Popen([client, "steam://install/%s" % app], stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.DEVNULL, start_new_session=True)
|
||||
except OSError:
|
||||
return []
|
||||
try:
|
||||
process.wait(timeout=REQUEST_HANDOFF_SECONDS)
|
||||
except subprocess.TimeoutExpired:
|
||||
pass
|
||||
return [app]
|
||||
|
||||
|
||||
def request_fex(steam_root, asked):
|
||||
client = os.path.join(steam_root, "steamrtarm64", "steam")
|
||||
missing = fex_missing(steam_root)
|
||||
if not os.access(client, os.X_OK) or any(app in asked for app in missing):
|
||||
return []
|
||||
for app in missing:
|
||||
asked.add(app)
|
||||
try:
|
||||
process = subprocess.Popen([client, "steam://install/%s" % app], stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.DEVNULL, start_new_session=True)
|
||||
except OSError:
|
||||
continue
|
||||
try:
|
||||
process.wait(timeout=REQUEST_HANDOFF_SECONDS)
|
||||
except subprocess.TimeoutExpired:
|
||||
pass
|
||||
return [app]
|
||||
requested = request_app(steam_root, app)
|
||||
if requested:
|
||||
return requested
|
||||
return []
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user