Set macOS version minimums harder

Fix the macOS app.
This commit is contained in:
Peter Ammon 2024-10-06 16:38:21 -07:00
parent 0e474768f4
commit c33b35efd4
No known key found for this signature in database

View file

@ -23,6 +23,9 @@ set -e
SIGN= SIGN=
NOTARIZE= NOTARIZE=
ARM64_DEPLOY_TARGET='MACOSX_DEPLOYMENT_TARGET=11.0'
X86_64_DEPLOY_TARGET='MACOSX_DEPLOYMENT_TARGET=10.9'
while getopts "sf:i:p:e:nj:" opt; do while getopts "sf:i:p:e:nj:" opt; do
case $opt in case $opt in
s) SIGN=1;; s) SIGN=1;;
@ -72,11 +75,11 @@ mkdir -p "$PKGDIR/build_x86_64" "$PKGDIR/build_arm64" "$PKGDIR/root" "$PKGDIR/in
-DCMAKE_EXE_LINKER_FLAGS="-Wl,-ld_classic" \ -DCMAKE_EXE_LINKER_FLAGS="-Wl,-ld_classic" \
-DWITH_GETTEXT=OFF \ -DWITH_GETTEXT=OFF \
-DRust_CARGO_TARGET=aarch64-apple-darwin \ -DRust_CARGO_TARGET=aarch64-apple-darwin \
-DCMAKE_OSX_ARCHITECTURES='arm64' \ -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' \
-DFISH_USE_SYSTEM_PCRE2=OFF \ -DFISH_USE_SYSTEM_PCRE2=OFF \
"$SRC_DIR" \ "$SRC_DIR" \
&& env MACOSX_DEPLOYMENT_TARGET="11.0" make VERBOSE=1 -j 12 \ && env $ARM64_DEPLOY_TARGET make VERBOSE=1 -j 12 \
&& env DESTDIR="$PKGDIR/root/" MACOSX_DEPLOYMENT_TARGET="11.0" make install; && env DESTDIR="$PKGDIR/root/" $ARM64_DEPLOY_TARGET make install;
} }
# Build for x86-64 but do not install; instead we will make some fat binaries inside the root. # Build for x86-64 but do not install; instead we will make some fat binaries inside the root.
@ -86,9 +89,9 @@ mkdir -p "$PKGDIR/build_x86_64" "$PKGDIR/build_arm64" "$PKGDIR/root" "$PKGDIR/in
-DCMAKE_EXE_LINKER_FLAGS="-Wl,-ld_classic" \ -DCMAKE_EXE_LINKER_FLAGS="-Wl,-ld_classic" \
-DWITH_GETTEXT=OFF \ -DWITH_GETTEXT=OFF \
-DRust_CARGO_TARGET=x86_64-apple-darwin \ -DRust_CARGO_TARGET=x86_64-apple-darwin \
-DCMAKE_OSX_ARCHITECTURES='x86_64' \ -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' \
-DFISH_USE_SYSTEM_PCRE2=OFF "$SRC_DIR" \ -DFISH_USE_SYSTEM_PCRE2=OFF "$SRC_DIR" \
&& env MACOSX_DEPLOYMENT_TARGET="10.9" make VERBOSE=1 -j 12; } && env $X86_64_DEPLOY_TARGET make VERBOSE=1 -j 12; }
# Fatten them up. # Fatten them up.
for FILE in "$PKGDIR"/root/usr/local/bin/*; do for FILE in "$PKGDIR"/root/usr/local/bin/*; do
@ -128,8 +131,8 @@ if test -n "$SIGN"; then
fi fi
# Make the app # Make the app
(cd "$PKGDIR/build_arm64" && make -j 12 fish_macapp) (cd "$PKGDIR/build_arm64" && env $ARM64_DEPLOY_TARGET make -j 12 fish_macapp)
(cd "$PKGDIR/build_x86_64" && make -j 12 fish_macapp) (cd "$PKGDIR/build_x86_64" && env $X86_64_DEPLOY_TARGET make -j 12 fish_macapp)
# Make the app's /usr/local/bin binaries universal. Note fish.app/Contents/MacOS/fish already is, courtsey of CMake. # Make the app's /usr/local/bin binaries universal. Note fish.app/Contents/MacOS/fish already is, courtsey of CMake.
cd "$PKGDIR/build_arm64" cd "$PKGDIR/build_arm64"