#!/usr/bin/env bash set -euo pipefail # Usage: scripts/make-app-bundle.sh # Creates a macOS .app bundle at target//release/bundle/osx/Cagire.app if [[ $# -ne 1 ]]; then echo "Usage: $0 " exit 1 fi TARGET="$1" REPO_ROOT="$(git rev-parse --show-toplevel)" BINARY="$REPO_ROOT/target/$TARGET/release/cagire-desktop" ICON="$REPO_ROOT/assets/Cagire.icns" VERSION="0.1.0" if [[ ! -f "$BINARY" ]]; then echo "ERROR: binary not found at $BINARY" exit 1 fi APP_DIR="$REPO_ROOT/target/$TARGET/release/bundle/osx/Cagire.app" CONTENTS="$APP_DIR/Contents" rm -rf "$APP_DIR" mkdir -p "$CONTENTS/MacOS" "$CONTENTS/Resources" cp "$BINARY" "$CONTENTS/MacOS/cagire-desktop" [[ -f "$ICON" ]] && cp "$ICON" "$CONTENTS/Resources/Cagire.icns" cat > "$CONTENTS/Info.plist" < CFBundleName Cagire CFBundleDisplayName Cagire CFBundleIdentifier com.sova.cagire CFBundleVersion ${VERSION} CFBundleShortVersionString ${VERSION} CFBundleExecutable cagire-desktop CFBundleIconFile Cagire.icns CFBundlePackageType APPL LSMinimumSystemVersion 12.0 NSHighResolutionCapable LSApplicationCategoryType public.app-category.music NSHumanReadableCopyright Copyright (c) 2025 Raphaƫl Forment NSMicrophoneUsageDescription Cagire needs microphone access for audio input. PLIST echo " APP -> $APP_DIR"