#!/bin/bash # Build a double-clickable JXL Optim.app from the SwiftPM executable. set -e cd "$(dirname "$0")" swift build -c release APP="JXL Optim.app" rm -rf "$APP" mkdir -p "$APP/Contents/MacOS" "$APP/Contents/Resources" cp .build/release/JXLOptim "$APP/Contents/MacOS/" cat > "$APP/Contents/Info.plist" < CFBundleNameJXL Optim CFBundleExecutableJXLOptim CFBundleIdentifiercom.local.jxloptim CFBundlePackageTypeAPPL CFBundleShortVersionString1.0 LSMinimumSystemVersion12.0 NSHighResolutionCapable PLIST echo "Built $APP — open it with: open '$APP'"