mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-25 07:46:01 +00:00
fix(bionic): name guest files by their Android paths in store launches
DroidDeck-Bionic's Wine has Android's root on Z:, but DroidDeck's store launch files and helpers name guest files by guest Z: paths. A Ubisoft game then skipped its service and started directly (Watch_Dogs exited at launch); the Epic parent stand-in, GOG/Rockstar registry values, reg.exe imports and the EA probe pointed at the wrong tree in the same way. Reported by 2-Shar on PR #3037. - proton: map guest Z: paths in every run argument (also NAME=Z:..., as in an installer's /DIR=) and export DROIDDECK_GUEST_ROOT, the guest's root as this Wine names it; launch.sh keeps it. - StoreLaunch: the Ubisoft service and the Epic parent stand-in start from %DD_R% (DROIDDECK_GUEST_ROOT, else Z:). An installed Ubisoft game's older launch file is rewritten at the next library scan. - droiddeck-store-launch: windows_path() asks DroidDeck-Bionic's getcompatpath when that tool runs the game. - droiddeck-gog-maintenance: name the tool for the registry step.
This commit is contained in:
1 parent
2aae4b2284
commit
f17d3ddaad
9 files changed
+194
-14
No files matched your search
@@ -243,6 +243,7 @@ def run_patch(folder, appid, installer, game):
|
||||
previous = dict(os.environ)
|
||||
try:
|
||||
os.environ.update(env)
|
||||
os.environ["DD_STORE_PROTON"] = command
|
||||
pfx = Path(prefix) / "pfx"
|
||||
if not (pfx / "system.reg").is_file() or not (pfx / "drive_c/windows/system32/reg.exe").is_file():
|
||||
subprocess.run([command, "run", "wineboot.exe", "-u"], env=env, timeout=90, check=True)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import base64
|
||||
import binascii
|
||||
import functools
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
@@ -156,7 +157,27 @@ def ask(channel, request, timeout=TIMEOUT, claim=False):
|
||||
|
||||
|
||||
def windows_path(unix):
|
||||
return "Z:" + unix.replace("/", "\\")
|
||||
tool = bionic_tool(os.environ.get("DD_STORE_PROTON", ""))
|
||||
return (tool and bionic_path(tool, unix)) or "Z:" + unix.replace("/", "\\")
|
||||
|
||||
|
||||
def bionic_tool(proton):
|
||||
if not proton or not os.environ.get("DDNATV_ROOT"):
|
||||
return None
|
||||
tool = Path(proton).parent
|
||||
return str(tool / "proton") if (tool / "bionic" / "launch.sh").is_file() else None
|
||||
|
||||
|
||||
@functools.lru_cache(maxsize=None)
|
||||
def bionic_path(proton, unix):
|
||||
# DroidDeck-Bionic's Wine sees Android's root on Z:, so a guest path is named by the Android file it maps to.
|
||||
try:
|
||||
result = subprocess.run([proton, "getcompatpath", unix], stdin=subprocess.DEVNULL, capture_output=True,
|
||||
text=True, timeout=TIMEOUT)
|
||||
except (OSError, subprocess.SubprocessError):
|
||||
return None
|
||||
path = result.stdout.strip()
|
||||
return path if result.returncode == 0 and path[:3] == "Z:\\" else None
|
||||
|
||||
|
||||
def reg_escape(value):
|
||||
|
||||
Reference in new issue
Block a user