x86-64 client: arm64 Proton wrappers named *a64*

The x86-64 client ignores a compatibility tool whose name says arm64
(device compat_log: "Ignoring tool bannerlator-proton-arm64 as it's
for a different target platform linux arm64"), so the default was a
tool it never registered and FlatOut failed with "Invalid platform".
The wrappers' tool names say a64 instead (folders unchanged, so
Components swaps still apply); a default naming an arm64 tool is
replaced, one the user chose is kept.
This commit is contained in:
The412Banner committed 2026-10-02 20:24:45 -04:00
1 parent 25ca971058
commit 020a0b73ae
1 file changed
+13 -6
@@ -317,7 +317,9 @@ s = open(sys.argv[1], encoding="utf-8", errors="replace").read()
m = re.search(r'"compat_tools"\s*\{\s*"([^"]+)"', s)
if not m:
sys.exit(1)
key = m.group(1)
# The x86-64 client takes a tool named *arm64* for one built for the arm64 client and ignores it
# ("for a different target platform linux arm64"): the wrapper's name says a64 instead.
key = re.sub(r"arm64|aarch64", "a64", m.group(1))
d = re.search(r'"display_name"\s*"([^"]*)"', s)
name = d.group(1) if d else key
open(sys.argv[2], "w").write(
@@ -370,8 +372,8 @@ for dst in dsts:
open(dst, "w", encoding="utf-8", errors="surrogateescape").write(s)
PY
fi
# Steam Play for every title not mapped otherwise: the arm64 client's own ARM64 Proton, so a
# shared install stays the Windows build the arm64 client also runs.
# Steam Play for every title not mapped otherwise: the arm64 client's own ARM64 Proton (its wrapper,
# bannerlator-proton-a64), so a shared install stays the Windows build the arm64 client also runs.
if [ -d "$STEAM_X64/compatibilitytools.d/bannerlator-proton-arm64" ] && [ -f "$STEAM_X64/config/config.vdf" ] &&
! pgrep -f 'steamrt64/steam( |$)' >/dev/null 2>&1; then
python3 - "$STEAM_X64/config/config.vdf" <<'PY' || step "could not make ARM64 Proton the default"
@@ -386,9 +388,14 @@ while depth:
depth += s[k] == "{"
depth -= s[k] == "}"
k += 1
if re.search(r'^\s*"0"\s*$', s[m.end():k], re.M):
sys.exit(0)
entry = ('\n\t\t\t\t\t"0"\n\t\t\t\t\t{\n\t\t\t\t\t\t"name"\t\t"bannerlator-proton-arm64"\n'
block = s[m.end():k]
z = re.search(r'^\s*"0"\s*\{([^{}]*)\}', block, re.M)
if z:
# Kept when the user chose another default; replaced when it names a tool this client ignores.
if "arm64" not in z.group(1):
sys.exit(0)
s = s[:m.end() + z.start()] + s[m.end() + z.end():]
entry = ('\n\t\t\t\t\t"0"\n\t\t\t\t\t{\n\t\t\t\t\t\t"name"\t\t"bannerlator-proton-a64"\n'
'\t\t\t\t\t\t"config"\t\t""\n\t\t\t\t\t\t"priority"\t\t"75"\n\t\t\t\t\t}')
s = s[:m.end()] + entry + s[m.end():]
open(path, "w", encoding="utf-8", errors="surrogateescape").write(s)