Remove old macOS build script

This commit is contained in:
jcm
2025-02-06 06:41:02 +00:00
committed by Luke Usher
parent 8d2f88b745
commit b4ef96e4d6
-36
View File
@@ -1,36 +0,0 @@
#!/bin/bash
set -euo pipefail
if ! command -v lipo >/dev/null; then
echo "Command lipo not found; please install XCode"
exit 1
fi
# Change to parent directory (top-level)
cd "$(dirname "$0")"/.. || exit 1
echo "Building for amd64..."
make arch=amd64 object.path=obj-amd64 output.path=out-amd64 "$@"
echo "Building for arm64..."
make arch=arm64 object.path=obj-arm64 output.path=out-arm64 "$@"
echo "Assembling universal binary"
rm -rf desktop-ui/out
cp -a desktop-ui/out-amd64 desktop-ui/out
lipo -create -output desktop-ui/out/ares.app/Contents/MacOS/ares \
desktop-ui/out-amd64/ares.app/Contents/MacOS/ares \
desktop-ui/out-arm64/ares.app/Contents/MacOS/ares
if [ "${MACOS_KEYCHAIN_PASSWORD:-}" != "" ]; then
security unlock-keychain -p "$MACOS_KEYCHAIN_PASSWORD" "$MACOS_KEYCHAIN_NAME"
fi
if [ "${MACOS_CERTIFICATE_NAME:-}" == "" ]; then
echo "Signing using self-signed"
ENTITLEMENTS=desktop-ui/resource/ares.selfsigned.entitlements
else
echo "Signing using certificate: ${MACOS_CERTIFICATE_NAME}"
ENTITLEMENTS=desktop-ui/resource/ares.entitlements
fi
codesign --force --deep --options runtime --entitlements "${ENTITLEMENTS}" --sign "${MACOS_CERTIFICATE_NAME:--}" desktop-ui/out/ares.app