mirror of
https://github.com/BigMarc/grammargem.git
synced 2026-10-13 17:01:55 +02:00
Native SwiftUI menu-bar app: global hotkey → capture selected text (AX API / clipboard fallback) → grammar (Harper) / local AI (MLX) → replace in place. Free/paid entitlement gate + Lemon Squeezy device-cap licensing, $0 marginal cost per user. Heavyweight engines behind protocol stubs so it builds out of the box. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
27 lines
834 B
Bash
Executable File
27 lines
834 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Build a runnable GrammaGem.app bundle from the SwiftPM executable.
|
|
# Usage: ./scripts/build.sh (run from the mac/ directory)
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
cd "$ROOT"
|
|
|
|
CONFIG="release"
|
|
APP="GrammaGem.app"
|
|
BUILD_DIR=".build/${CONFIG}"
|
|
DIST="dist"
|
|
|
|
echo "==> Compiling (${CONFIG})"
|
|
swift build -c "${CONFIG}"
|
|
|
|
echo "==> Assembling ${APP}"
|
|
rm -rf "${DIST}/${APP}"
|
|
mkdir -p "${DIST}/${APP}/Contents/MacOS" "${DIST}/${APP}/Contents/Resources"
|
|
|
|
cp "${BUILD_DIR}/GrammaGem" "${DIST}/${APP}/Contents/MacOS/GrammaGem"
|
|
cp "AppSupport/Info.plist" "${DIST}/${APP}/Contents/Info.plist"
|
|
# cp "AppSupport/AppIcon.icns" "${DIST}/${APP}/Contents/Resources/" # TODO: add an icon
|
|
|
|
echo "==> Built ${DIST}/${APP}"
|
|
echo " Run with: open \"${DIST}/${APP}\" (grant Accessibility on first launch)"
|