Repository Public
1#!/usr/bin/env bash2# Author: Simon-Pierre Boucher — contact@spboucher.ai3# File: Scripts/shot-mac.sh4# Description: Launches the Debug build of the macOS app with launch arguments, waits, captures its window to a PNG, then quits that process only.5# Usage: Scripts/shot-mac.sh <out.png> <seconds> [launch arguments…]6set -euo pipefail7cd "$(dirname "$0")/.."8OUT="$1"; WAIT="$2"; shift 29APP="$PWD/build/DD-mac/Build/Products/Debug/Local Chat.app"10"$APP/Contents/MacOS/Local Chat" -ApplePersistenceIgnoreState YES "$@" >/tmp/lc-run.log 2>&1 &11PID=$!12sleep "$WAIT"13swift Scripts/window-shot.swift "Local Chat" "$OUT" "$PID" | tail -114kill "$PID" 2>/dev/null || true15