9b81b4f51ac3 — Chris Cannam 29 days ago
Support OS versions <11 in prebuilt binary!
1 files changed, 23 insertions(+), 8 deletions(-)

M otherbuilds/deploy/macos.sh
M otherbuilds/deploy/macos.sh +23 -8
@@ 1,25 1,40 @@ 
 set -eu
 if [ ! -f ../rba/deploy/macos/notarize.sh ]; then
-    echo "need notarize script in ../rba/deploy/macos"
+    echo "Need notarize script in ../rba/deploy/macos"
 version=$(grep '^ *version:' meson.build | head -1 | sed "s/^.*'\([0-9][0-9.]*\)'.*$/\1/")
 echo "Packaging command-line utility for Mac for Rubber Band v$version..."
 if [ -f /usr/local/lib/libsndfile.dylib ]; then
-    echo "(WARNING: libsndfile dynamic library found in /usr/local/lib, be sure that you aren't about to combine this external dependency with the hardened runtime)"
+    echo "(WARNING: libsndfile dynamic library found in /usr/local/lib!"
+    echo "Be sure that you aren't about to combine this external dependency"
+    echo "with the hardened runtime)"
-rm -rf build
-PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ meson build --cross-file ./cross/macos-universal.txt
-ninja -C build
+echo -n "Proceed [Yn] ? "
+read yn
+case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac
+echo "Proceeding"
+rm -rf build_arm64 build_x86_64 tmp_pack
+PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ meson build_arm64 --cross-file ./cross/macos-arm64.txt
+PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ meson build_x86_64 --cross-file ./cross/macos-x86_64.txt
+ninja -C build_arm64
+ninja -C build_x86_64
+mkdir tmp_pack
+lipo build_arm64/rubberband build_x86_64/rubberband -create -output tmp_pack/rubberband
 echo "Check the following version number: it should read $version"
-./build/rubberband -V
+tmp_pack/rubberband -V
 key="Developer ID Application: Particular Programs Ltd (73F996B92S)"
 mkdir -p packages
-( cd build
+( cd tmp_pack
   codesign -s "$key" -fv --options runtime rubberband
   rm -f "$zipfile"

@@ 29,7 44,7 @@ mkdir -p packages
 rm -rf "$package_dir"
 mkdir "$package_dir"
-cp build/rubberband "$package_dir"
+cp tmp_pack/rubberband "$package_dir"
 cp CHANGELOG README.md COPYING "$package_dir"
 tar cvjf "$package_dir.tar.bz2" "$package_dir"
 mv "$package_dir.tar.bz2" packages/