fix(proton-run): register the wrapper for an installed Valve Proton depot (#2392)

* fix(proton-run): find Proton tools in Steam libraries

* fix(proton-run): register the wrapper for an installed Valve Proton depot

Valve's ARM64 Proton depots are not compatibility tools, and running
them directly bypasses the DroidDeck wrapper. Register the wrapper from
the depot when a store app is launched before Steam has started, instead
of scanning steamapps/common.

* test(proton): install complete tool fixtures in the auto-update tests

* fix(proton-run): skip incomplete Proton depots and keep listing tools when the wrapper cannot be written

* fix(proton-run): pick a runnable depot and rebuild a wrapper whose launcher is missing

* test(proton-run): remove redundant depot fixture write

* fix(proton-run): rebuild a wrapper whose manifest is missing

* test(proton-run): cover runnable depot selection
This commit is contained in:
MaxsTechReview authored and GitHub committed 2026-11-10 07:09:56 -05:00
1 parent 13c8edb3d5
commit 634cb390c9
6 files changed
+117 -5

No files matched your search

@@ -70,8 +70,19 @@ def mapping(root):
def tools(root):
c = compat()
wrapper = os.path.join(root, "compatibilitytools.d", c["TOOL"])
complete = os.access(os.path.join(wrapper, c["LAUNCHER"]), os.X_OK) and os.path.isfile(os.path.join(wrapper, "toolmanifest.vdf"))
if c["TOOL"].lower() not in c["local_tools"](root) or not complete:
depot = c["find_source"](root, runnable=True)
if depot is not None:
try:
c["build_tool"](wrapper, depot)
except OSError:
pass
found = {}
for base in [os.path.join(root, "compatibilitytools.d")] + list(SYSTEM_TOOLS):
bases = [os.path.join(root, "compatibilitytools.d")] + list(SYSTEM_TOOLS)
for base in bases:
try:
entries = sorted(os.listdir(base))
except OSError:
@@ -1599,10 +1599,11 @@ def depot_build(depot):
return int(first[0]) if first and first[0].isdigit() else 0
def find_source(steam_root, sources=SOURCES):
def find_source(steam_root, sources=SOURCES, runnable=False):
for name in sources:
found = [os.path.join(root, "steamapps", "common", name) for root in libraries(steam_root)
if os.path.isdir(os.path.join(root, "steamapps", "common", name, "files", "bin-arm64"))]
if os.path.isdir(os.path.join(root, "steamapps", "common", name, "files", "bin-arm64"))
and (not runnable or os.access(os.path.join(root, "steamapps", "common", name, "proton"), os.X_OK))]
if found:
return max(found, key=depot_build)
return None