Skip to content

Commit e97f183

Browse files
committed
macOS: lower deployment floor to macOS 11 (Big Sur)
The build targeted macOS 15, which needlessly excluded every Intel Mac and anyone not on the latest OS. macOS 11 is the first Apple Silicon release and the current Steam client minimum, so it's a sensible floor that widens hardware reach for the universal (x86_64 + arm64) build. - Drop MACOSX_VERSION_MIN and the build scripts' DEPLOY default from 15.0 to 11.0; all third-party deps are rebuilt from source for the 11.0 target. - Declare LSMinimumSystemVersion in Info.plist (substituted from DEPLOY) so the floor is enforced with a clear message, not just the Mach-O minos. - Fix metakit's clean build, exposed by rebuilding deps from scratch: its Makefile invokes $(RANLIB) but never defines it, and make has no built-in default (unlike AR), so the archive step ran a bare "libmk4.a" and failed. Pass AR=ar RANLIB=ranlib to metakit's make. - Sign the app inside-out (not --deep) so the ad-hoc seal is valid, fixing local Steam builds that Gatekeeper otherwise rejected as "damaged".
1 parent 4b7b290 commit e97f183

4 files changed

Lines changed: 17 additions & 7 deletions

File tree

Master/Darwin/Config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ endif
2525

2626
# Deployment target. The third-party dependencies are built from source for this
2727
# same target (see build_deps.sh), so the .app genuinely runs on macOS >= this.
28-
MACOSX_VERSION_MIN = 15.0
28+
MACOSX_VERSION_MIN = 11.0
2929

3030
# Flags always applied. Architecture, deployment target and the C++ standard go
3131
# here (not in CXXFLAGS) so they survive the make recursion. -std=c++11 makes

Master/Darwin/Info.plist.template

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,7 @@
2020
<string>%VERSION%</string>
2121
<key>CSResourceFileMapped</key>
2222
<true/>
23+
<key>LSMinimumSystemVersion</key>
24+
<string>%MIN_OS%</string>
2325
</dict>
2426
</plist>

Master/Darwin/build_deps.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ REPO_DIR="$(cd "$DARWIN_DIR/../.." && pwd)"
1818
METAKIT_DIR="$REPO_DIR/metakit"
1919
PREFIX="$DARWIN_DIR/deps"
2020
SRC="$PREFIX/src"
21-
DEPLOY="${MACOSX_DEPLOYMENT_TARGET:-15.0}"
21+
DEPLOY="${MACOSX_DEPLOYMENT_TARGET:-11.0}"
2222
ARCHS="x86_64;arm64"
2323
JOBS="$(sysctl -n hw.ncpu)"
2424

@@ -236,7 +236,11 @@ dep_metakit() {
236236
( cd "$bd" && CC=clang CXX=clang++ \
237237
CFLAGS="-arch $a -mmacosx-version-min=$DEPLOY" \
238238
CXXFLAGS="-arch $a -std=c++11 -mmacosx-version-min=$DEPLOY -fno-rtti" \
239-
../unix/configure $host ac_cv_sizeof_long=8 && make -j"$JOBS" libmk4.a && ranlib libmk4.a )
239+
../unix/configure $host ac_cv_sizeof_long=8 \
240+
&& make -j"$JOBS" AR=ar RANLIB=ranlib libmk4.a )
241+
# metakit's Makefile references $(RANLIB) but never defines it (and make
242+
# has no built-in default), so its "$(RANLIB) $@" archive step runs a bare
243+
# "libmk4.a" and fails -- pass AR/RANLIB explicitly to index the archive.
240244
done
241245
mkdir -p "$PREFIX/lib"
242246
lipo -create "$METAKIT_DIR/build-uni-x86_64/libmk4.a" "$METAKIT_DIR/build-uni-arm64/libmk4.a" \

Master/Darwin/build_macos.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ METAKIT_DIR="$REPO_DIR/metakit"
6868
APP_NAME="" # resolved from the Steam variant (or "DROD TSS") unless --name given
6969
NAME_SET=0
7070
APP_VERSION="5.2.1"
71-
DEPLOY="15.0"
71+
DEPLOY="11.0"
7272
BUILD_TYPE="custom"
7373
OUTPUT_DIR="$DARWIN_DIR/custom/bin"
7474
ASSETS_DIR=""
@@ -286,7 +286,7 @@ mkdir -p "$APP/Contents/MacOS" "$APP/Contents/Frameworks" "$RES_DATA"
286286

287287
# 4a. Executable, Info.plist, icon
288288
cp "$BUILT_BIN" "$APP/Contents/MacOS/drod"
289-
sed "s/%EXECUTABLE_NAME%/drod/; s/%VERSION%/$APP_VERSION/" \
289+
sed "s/%EXECUTABLE_NAME%/drod/; s/%VERSION%/$APP_VERSION/; s/%MIN_OS%/$DEPLOY/" \
290290
"$DARWIN_DIR/Info.plist.template" > "$APP/Contents/Info.plist"
291291
# Icon: the app's own .icns, falling back to TSS's if a new game's art isn't in
292292
# place yet (so a data-only test build still completes).
@@ -369,9 +369,13 @@ dylibbundler -of -b \
369369
# 6. Ad-hoc code sign (must be last; arm64 binaries must be signed to run)
370370
###############################################################################
371371
log "Ad-hoc code signing..."
372+
# Sign inside-out (nested code first, bundle last), not with --deep: --deep leaves
373+
# an invalid seal over libsteam_api.dylib, which Valve ships hardened-runtime with
374+
# a designated requirement. Verify with --strict to catch a bad seal.
372375
codesign --force -s - "$APP/Contents/Frameworks/"*.dylib
373-
codesign --force --deep -s - "$APP"
374-
codesign --verify --deep "$APP" && log "Code signature OK"
376+
codesign --force -s - "$APP/Contents/MacOS/drod"
377+
codesign --force -s - "$APP"
378+
codesign --verify --deep --strict "$APP" && log "Code signature OK"
375379

376380
# 6a. Sanity: no build-machine paths leaked into the bundle
377381
if otool -L "$APP/Contents/MacOS/drod" "$APP/Contents/Frameworks/"*.dylib \

0 commit comments

Comments
 (0)