|
|
#!/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" <<PLIST
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
|
<plist version="1.0"><dict>
|
|
|
<key>CFBundleName</key><string>JXL Optim</string>
|
|
|
<key>CFBundleExecutable</key><string>JXLOptim</string>
|
|
|
<key>CFBundleIdentifier</key><string>com.local.jxloptim</string>
|
|
|
<key>CFBundlePackageType</key><string>APPL</string>
|
|
|
<key>CFBundleShortVersionString</key><string>1.0</string>
|
|
|
<key>LSMinimumSystemVersion</key><string>12.0</string>
|
|
|
<key>NSHighResolutionCapable</key><true/>
|
|
|
</dict></plist>
|
|
|
PLIST
|
|
|
echo "Built $APP — open it with: open '$APP'"
|