mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-10-17 20:57:11 -04:00
x86-64 client: SteamRT3 opt-in marker, and the arm64 parts on its build
Found porting to Bannerlator: - The client opts into its SteamRT3 build only with a file, .steam-enable-steamrt64-client, in its folder; without it it re-executes in the scout environment and the session stalls before the interface. This install had one made by hand during bring-up; bannerlator-steam-x64 now writes it. - The arm64 web helper only talks to a client of its own build, and the x86-64 client updates itself on every start while the arm64 one only when it runs (1790721607 against 1790904859: helper restarted every 10 s). bannerlator-steam-install --sync CHANNEL brings the arm64 client to the channel's current build (the session runs it in x86-64 mode), and the arm64 helper is used only while both manifests name one build; otherwise the client keeps its own x86 helper.
This commit is contained in:
1 parent
0e1cdcd5de
commit
c3401cc7c4
3 files changed
+44
-3
No files matched your search
@@ -264,6 +264,9 @@ case $mode in
|
||||
# its game overlay and steamclient.so serve the arm64 Protons the x86-64 client starts.
|
||||
step "checking the Steam client's arm64 parts (first run downloads them, ~1-2 min)"
|
||||
bannerlator-steam-install || exit $?
|
||||
# Its web helper only talks to a client of its own build; the x86-64 client updates itself on
|
||||
# every start, the arm64 one only when it runs.
|
||||
bannerlator-steam-install --sync "${BL_STEAM_CHANNEL:-publicbeta}" || step "could not update the arm64 client's parts; the x86-64 client keeps its own web helper"
|
||||
step "checking the x86-64 Steam client (FEX, experimental; the first run downloads ~2 GB)"
|
||||
bannerlator-steam-x64 --prepare || exit $?
|
||||
step "x86-64 Steam client ready"
|
||||
|
||||
@@ -1,17 +1,35 @@
|
||||
#!/bin/bash
|
||||
# Fetches the native arm64 Steam client from Valve's client-update CDN into ~/.local/share/Steam.
|
||||
# The client is not redistributable, so the runtime ships this script instead of the client.
|
||||
#
|
||||
# bannerlator-steam-install install once
|
||||
# bannerlator-steam-install --sync CHANNEL bring the installed client to CHANNEL's current build
|
||||
#
|
||||
# --sync is for the x86-64 client option (bannerlator-steam-x64): it runs this client's web helper,
|
||||
# which only talks to a client of its own build, and the x86-64 client updates itself on every start
|
||||
# while this one only updates when it runs (device: 1790721607 against 1790904859, the helper restarted
|
||||
# every 10 s and the interface never came up).
|
||||
set -eu
|
||||
cdn=https://client-update.fastly.steamstatic.com
|
||||
manifest=steam_client_publicbeta_linuxarm64
|
||||
steam_root=${XDG_DATA_HOME:-$HOME/.local/share}/Steam
|
||||
stamp=$steam_root/package/bannerlator-installed
|
||||
[ -x "$steam_root/steamrtarm64/steam" ] && [ -f "$stamp" ] && exit 0
|
||||
sync=
|
||||
if [ "${1:-}" = --sync ]; then
|
||||
case "${2:-}" in publicbeta|steamdeck_publicbeta) sync=$2 ;; *) sync=publicbeta ;; esac
|
||||
manifest=steam_client_${sync}_linuxarm64
|
||||
fi
|
||||
[ -z "$sync" ] && [ -x "$steam_root/steamrtarm64/steam" ] && [ -f "$stamp" ] && exit 0
|
||||
|
||||
work=$(mktemp -d)
|
||||
trap 'rm -rf "$work"' EXIT
|
||||
curl -fsSL "$cdn/$manifest" -o "$work/manifest"
|
||||
version=$(awk -F'"' '$2 == "version" { print $4; exit }' "$work/manifest")
|
||||
if [ -n "$sync" ]; then
|
||||
installed=$(awk -F'"' '$2 == "version" { print $4; exit }' "$steam_root/package/$manifest.manifest" 2>/dev/null || true)
|
||||
[ -x "$steam_root/steamrtarm64/steam" ] && [ "$installed" = "$version" ] && exit 0
|
||||
echo "== STEP $(date -u +%H:%M:%S) updating the arm64 Steam client to $version (was ${installed:-none}) for the x86-64 client"
|
||||
fi
|
||||
# Every component block: its name, then the plain zip's file name and sha256.
|
||||
awk -F'"' '
|
||||
/^\t"/ && NF >= 3 && $4 == "" { block = $2 }
|
||||
@@ -41,7 +59,12 @@ find "$steam_root" -depth -name '*\\*' | while read -r odd; do
|
||||
mv -f "$odd" "$fixed"
|
||||
fi
|
||||
done
|
||||
echo publicbeta > "$steam_root/package/beta"
|
||||
if [ -n "$sync" ]; then
|
||||
# The client's own record of what it has, so it does not take the new files for an update to undo.
|
||||
cp -f "$work/manifest" "$steam_root/package/$manifest.manifest"
|
||||
else
|
||||
echo publicbeta > "$steam_root/package/beta"
|
||||
fi
|
||||
echo "$version" > "$stamp"
|
||||
ln -sfn "$steam_root/steamrtarm64" "$steam_root/steamrtarm32"
|
||||
chmod +x "$steam_root/steamrtarm64/steam" 2>/dev/null || true
|
||||
|
||||
@@ -61,6 +61,10 @@ if [ ! -x /usr/local/bin/FEX ] || [ "$(cat /usr/local/share/fex-emu/.droiddeck-t
|
||||
mkdir -p /usr/local/share/fex-emu && echo "$FEX_TAG" > /usr/local/share/fex-emu/.droiddeck-tag
|
||||
fi
|
||||
step "FEX ready ($FEX_TAG)"
|
||||
# The client takes this file in its folder as the opt-in to its SteamRT3 build (steamrt64/steam).
|
||||
# Without it, it re-executes itself in the scout environment through steam.sh, whose start-up checks
|
||||
# need what proot cannot give, and the session stalls before the interface (device, Bannerlator).
|
||||
mkdir -p "$STEAM_X64" && : > "$STEAM_X64/.steam-enable-steamrt64-client"
|
||||
|
||||
# --- x86 rootfs --------------------------------------------------------------------------------
|
||||
if [ ! -f "$ROOTFS/.droiddeck-complete" ]; then
|
||||
@@ -561,9 +565,20 @@ x64_exec() {
|
||||
# program to the CPU): the session shim turns steamrt64/steamwebhelper.sh's exec of ./steamwebhelper
|
||||
# into it (preload/net.c). Nothing of the client's is edited - it checksums its files as it starts
|
||||
# and reinstalled itself over an edited launcher (2-3 minutes) on every start.
|
||||
# Only while both clients are one build: the helper talks to the client over IPC, and one of another
|
||||
# build never comes up - the client restarted it every 10 s (device: 1790721607 against 1790904859).
|
||||
# Otherwise the client keeps its own (x86, software) helper. The session updates the arm64 parts first.
|
||||
if [ "${BL_X64_X86_WEBHELPER:-0}" != 1 ] && [ -x /usr/local/bin/bannerlator-x64-arm-webhelper ] &&
|
||||
[ -x "$ARM_STEAM/steamrtarm64/steamwebhelper" ]; then
|
||||
export BL_X64_ARM_WEBHELPER=/usr/local/bin/bannerlator-x64-arm-webhelper
|
||||
local chan x86_build arm_build
|
||||
chan=$(cat "$STEAM_X64/package/beta" 2>/dev/null || echo publicbeta)
|
||||
x86_build=$(awk -F'"' '$2 == "version" { print $4; exit }' "$STEAM_X64/package/steam_client_${chan}_ubuntu12.manifest" 2>/dev/null)
|
||||
arm_build=$(awk -F'"' '$2 == "version" { print $4; exit }' "$ARM_STEAM/package/steam_client_${chan}_linuxarm64.manifest" 2>/dev/null)
|
||||
if [ -n "$x86_build" ] && [ "$x86_build" = "$arm_build" ]; then
|
||||
export BL_X64_ARM_WEBHELPER=/usr/local/bin/bannerlator-x64-arm-webhelper
|
||||
else
|
||||
echo "== x86-64 client build ${x86_build:-?}, arm64 web helper's ${arm_build:-?}: keeping the x86 web helper" >&2
|
||||
fi
|
||||
fi
|
||||
exec "${BL_FEX:-/usr/local/bin/FEX}" "$STEAM_X64/steamrt64/steam" "$@"
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user