SPB Git

spb/forge-studio Public

The Instruments of LLM training — a native macOS cockpit for Forge. Train language models from scratch on Apple Silicon without a terminal.

Swift 95.7% Shell 4.3%
1.7 KB · 44 lines shellscript
Raw Blame History
1#!/bin/bash2# Author: Simon-Pierre Boucher — contact@spboucher.ai3# Build the SwiftPM executable and wrap it into ForgeStudio.app (ad-hoc4# signed — fast local iteration; scripts/notarize.sh does the real signing).5set -euo pipefail6cd "$(dirname "$0")/.."78CONFIG="${1:-release}"9swift build -c "$CONFIG"1011BIN=".build/$CONFIG/ForgeStudio"12APP_DIR="dist/ForgeStudio.app"13rm -rf "$APP_DIR"14mkdir -p "$APP_DIR/Contents/MacOS" "$APP_DIR/Contents/Resources"1516cp "$BIN" "$APP_DIR/Contents/MacOS/ForgeStudio"17if [ ! -f Assets/AppIcon.icns ]; then ./scripts/generate-icon.sh; fi18cp Assets/AppIcon.icns "$APP_DIR/Contents/Resources/AppIcon.icns"1920cat > "$APP_DIR/Contents/Info.plist" <<'PLIST'21<?xml version="1.0" encoding="UTF-8"?>22<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">23<plist version="1.0">24<dict>25    <key>CFBundleName</key><string>Forge Studio</string>26    <key>CFBundleDisplayName</key><string>Forge Studio</string>27    <key>CFBundleIdentifier</key><string>ai.spboucher.forge-studio</string>28    <key>CFBundleExecutable</key><string>ForgeStudio</string>29    <key>CFBundleVersion</key><string>1</string>30    <key>CFBundleShortVersionString</key><string>0.2.0</string>31    <key>CFBundlePackageType</key><string>APPL</string>32    <key>LSMinimumSystemVersion</key><string>14.0</string>33    <key>LSApplicationCategoryType</key><string>public.app-category.developer-tools</string>34    <key>CFBundleIconFile</key><string>AppIcon</string>35    <key>NSHighResolutionCapable</key><true/>36    <key>NSHumanReadableCopyright</key><string>© Simon-Pierre Boucher</string>37</dict>38</plist>39PLIST4041codesign --force --deep --sign - "$APP_DIR"42codesign --verify --deep --strict --verbose=2 "$APP_DIR"43echo "OK: $APP_DIR"44