Skip to content

armgit / soju

Public Imported from GitHub
0

Play Windows games on Apple Silicon Macs. Free, open-source app that installs the official Battle.net, Steam, Epic and GOG launchers and lists your games in one library.

release asset renamed to wine-engine-*; the old updater must not swap the engine

mikey9204f892fc8b53
diff --git a/install.sh b/install.sh
index cb19d59a733..3b0b88e4014 100644
--- a/install.sh
+++ b/install.sh
@@ -93,7 +93,7 @@ else
# The engine ships on its own "engine-*" release, which is not necessarily the
# newest release: scan all releases and take the first (newest) engine asset.
URL=$(curl -fsSL "https://api.github.com/repos/$REPO/releases?per_page=30" \
- | grep -o '"browser_download_url": *"[^"]*soju-engine[^"]*"' | head -1 | grep -o 'https[^"]*')
+ | grep -o '"browser_download_url": *"[^"]*wine-engine[^"]*"' | head -1 | grep -o 'https[^"]*')
[ -n "$URL" ] || { echo "Could not find the engine release asset."; exit 1; }
# Download to a .part file and extract into a staging directory, so an
# interrupted run leaves nothing that a re-run would mistake for done.
diff --git a/scripts/update.sh b/scripts/update.sh
index cc4d9658049..b6888146357 100755
--- a/scripts/update.sh
+++ b/scripts/update.sh
@@ -53,9 +53,15 @@ if [ ! -x "$ENGINE/bin/wine" ]; then
echo " no engine at $ENGINE (run: soju install)"; exit 0
fi
+# The asset is named wine-engine-*.tar.xz from engine-v1.4 on. Older
+# updaters looked for soju-engine-* and, after refreshing the scripts, went on
+# to swap the engine with their own carry-over code, which dropped Apple's D3D
+# shims. The rename makes that updater stop at "could not find the engine
+# release asset" instead; the next run uses this script and carries the
+# shims over.
URL=$(curl -fsSL "https://api.github.com/repos/$REPO/releases?per_page=30" \
- | grep -o '"browser_download_url": *"[^"]*soju-engine[^"]*"' | head -1 | grep -o 'https[^"]*') || true
-[ -n "${URL:-}" ] || { echo " could not find the engine release asset (offline?)"; exit 1; }
+ | grep -o '"browser_download_url": *"[^"]*wine-engine[^"]*"' | head -1 | grep -o 'https[^"]*') || true
+[ -n "${URL:-}" ] || { echo " could not find the engine release asset (offline? If the scripts were just updated, run soju update once more)"; exit 1; }
TAG=$(echo "$URL" | sed -n 's#.*/download/\([^/]*\)/.*#\1#p')
CUR=$(cat "$ENGINE/.soju-engine-release" 2>/dev/null || echo "")