Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
Shell
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354#!/usr/bin/env bash# build.sh — compile MacPal into a double-clickable .app bundle.## ./build.sh build macpal/build/MacPal.app# ./build.sh --install build, copy to /Applications, and launch it## Single-file swiftc build (no SwiftPM) — matches the house style of the# slab Swift apps. Signs ad-hoc by default; pass DEV_ID to use a Developer# ID identity (required before notarizing / App Store submission).set -euo pipefail
cd "$(dirname "$0")"
APP_NAME="MacPal"BUILD_DIR="build"APP="$BUILD_DIR/$APP_NAME.app"SIGN_ID="${DEV_ID:--}" # "-" = ad-hoc signature
echo "› cleaning $APP"rm -rf "$APP"mkdir -p "$APP/Contents/MacOS" "$APP/Contents/Resources"
echo "› compiling Sources/*.swift"swiftc -O \ -framework AppKit \ -framework ServiceManagement \ -framework SceneKit \ -framework ModelIO \ Sources/*.swift \ -o "$APP/Contents/MacOS/$APP_NAME"
echo "› assembling bundle"cp Resources/Info.plist "$APP/Contents/Info.plist"# Only the star's art ships in Fía's bundle; the fuser machine glyphs in# Resources/ are source the fuser installer (macpal/fuser/install.sh) stages# on-device — they're loaded from disk, not the bundle.cp Resources/star-*.svg "$APP/Contents/Resources/"[[ -f Resources/AppIcon.icns ]] && cp Resources/AppIcon.icns "$APP/Contents/Resources/"
echo "› signing ($SIGN_ID)"codesign --force --options runtime --sign "$SIGN_ID" "$APP"
echo "✓ built $APP"
if [[ "${1:-}" == "--install" ]]; then DEST="/Applications/$APP_NAME.app" echo "› installing to $DEST" rm -rf "$DEST" cp -R "$APP" "$DEST" echo "› launching (first run adds it to Login Items)" open "$DEST" echo "✓ installed and launched"fi