fix(get-assets): survive two macOS steamcmd papercuts (running client + Gatekeeper quarantine)#6
Open
masterrr wants to merge 2 commits into
Open
Conversation
steamcmd and the Steam desktop client share one data directory
(~/Library/Application Support/Steam on macOS, ~/.steam on Linux). When the
desktop client is running it holds a single-instance lock, so steamcmd stalls
forever right after printing "Verifying installation..." — no error, just a
silent hang that's easy to mistake for a slow self-update.
Add a preflight check that detects a running Steam client and exits with an
actionable message ("Quit Steam completely, then re-run") instead of hanging.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Homebrew installs the steamcmd cask with the com.apple.quarantine flag set on its whole tree. steamcmd bundles unnotarized frameworks (e.g. Breakpad.framework), so on first run Gatekeeper pops a blocking "Apple could not verify ... malware" dialog that stops steamcmd before it can log in. Strip the quarantine flag off the steamcmd Caskroom install before invoking it, guarded to macOS + Homebrew and a no-op if the cask isn't present. Turns a manual "run xattr -dr yourself" step into something the script handles. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
MYSOREZ
referenced
this pull request
in MYSOREZ/GeneralsZH-Android-Port
Jul 7, 2026
…amespySDK Run #6 (first run to reach the engine compile; ninja -k 0 surfaced the complete error set) had exactly two root causes behind 165 errors: 1. 164x "windows_base.h file not found": CompatLib picked DXVK include dirs by APPLE-vs-rest, but the real split is source-build vs prebuilt tarball — Android builds DXVK from the same git source as macOS (Wine-style include/native layout), only desktop Linux uses the flat steamrt tarball. Branch on (APPLE OR ANDROID); same for skipping the tarball-only lib/ link dir. 2. GamespySDK's gsthreadlinux.c calls pthread_cancel, which bionic deliberately omits. It's a pinned remote FetchContent, so instead of forking for one line, rewrite the call to a successful no-op via a per-target macro on Android (same rationale as the CompatLib TerminateThread fix: shutdown-time last-resort kill, safe to skip). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012kbvTayV2STgXpff26tSFq
MYSOREZ
referenced
this pull request
in MYSOREZ/GeneralsZH-Android-Port
Jul 7, 2026
Run #8 was down to 3 unique errors (from 165 in run #6): 1. INI.cpp scanType<float>: the NDK's libc++ explicitly deletes floating-point std::from_chars, same situation as Apple SDKs — extend the existing __APPLE__ strtod fallback to __ANDROID__. 2. WWDownload/FTP.cpp includes <sys/timeb.h>, which bionic doesn't ship; nothing in the file uses it — excluded on Android. 3. The GamespySDK pthread_cancel stub never reached the compile line: CMake silently drops function-style macros from COMPILE_DEFINITIONS. Pass it as a raw compile option instead (verified missing in run #8's failing gscommon command). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012kbvTayV2STgXpff26tSFq
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On a fresh macOS setup,
scripts/get-assets.shcan stall or die before it ever reaches the Steam login, for two unrelated reasons. Both present as a confusing hang/dialog rather than a clear error, so it's easy to assume the script or your Steam account is broken when neither is. This PR makes the script detect and handle both up front.Encountered on:
17825328201. A running Steam desktop client → silent forever-hang
steamcmdand the Steam desktop client share one data directory (~/Library/Application Support/Steamon macOS,~/.steamon Linux). When the desktop client is running it holds a single-instance lock, sosteamcmdstalls forever immediately after printing:No error, no timeout — just a silent hang that's indistinguishable from a slow self-update. Ctrl-C leaves steamcmd in an "unclean shutdown" state, so the next run re-verifies and hangs at the same spot again — an easy loop to get stuck in.
The tell is that the self-update actually completes — the stall is after it, waiting on the lock held by the desktop client:
~/Library/Application Support/Steam/logs/bootstrap_log.txt— verification finishes, then nothingMeanwhile the desktop client is very much alive (~12 processes holding the dir)
Confirmed by
pgrep -fl 'Steam.AppBundle'. The client's ownconsole_log.txteven showed it opening the Generals Zero Hour store page seconds earlier — it was actively in use.Fix: a preflight check that detects a running Steam client (
steam_osx/Steam.AppBundleon macOS,steamon Linux) and exits with an actionable message instead of hanging:2. Gatekeeper quarantine → blocking "cannot verify" dialog
Homebrew installs the steamcmd cask with
com.apple.quarantineset across its entire tree. steamcmd bundles unnotarized frameworks — notablyBreakpad.framework(its crash reporter) — so on first run macOS pops a blocking modal that stops steamcmd before it can log in:(The only buttons are Done and Move to Bin — no "Open Anyway" — so there's no in-dialog way past it.)
xattr— the quarantine flag is on the whole install, not just one fileClearing it with
xattr -dr com.apple.quarantineon the cask root drops the count to0and the dialog never reappears.Fix: strip the quarantine flag off the steamcmd Caskroom install before invoking it — guarded to macOS + Homebrew, and a no-op if the cask isn't present:
Why in the script (vs. the README)
Both are environmental, not bugs in the fetch logic — but they hit at exactly the moment a new user runs this script for the first time, and both fail silently (a hang and a modal, not a message on stdout). Handling them here turns two "why is this broken?" dead-ends into either an automatic fix (quarantine) or a one-line instruction (quit Steam). The README's
brew install --cask steamcmd→get-assets.shflow now just works on a clean macOS box.Safety / cross-platform
pgrep/xattr/breware all present on the target platforms;brew --prefixresolves both Apple Silicon (/opt/homebrew) and Intel (/usr/local).uname == Darwin) and touches only the steamcmd cask directory.bash -non the final script; confirmed the running-client guard passes with Steam quit and fires on a live match, and that the quarantine path resolves to the real Caskroom install and clears to0flagged files.Commits
fix(get-assets): fail fast when the Steam desktop client is runningfix(get-assets): clear macOS Gatekeeper quarantine on steamcmd up front🤖 Generated with Claude Code