updates to launcer

This commit is contained in:
Mark Gregory
2026-10-23 09:51:58 +01:00
parent b5fdfe5809
commit a8a8831c92
9 changed files with 0 additions and 1887 deletions
-49
View File
@@ -1,49 +0,0 @@
#!/bin/zsh
set -euo pipefail
echo "=== CLION LAUNCH DIAGNOSTICS ==="
echo "Script: $0"
echo "Argument count: $#"
echo "Arguments: $*"
echo "Working directory: $PWD"
echo "Parent process: $PPID"
echo "================================"
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT"
APP_NAME=OrionToolbar
DERIVED="$ROOT/.build"
CONFIGURATION="${CONFIGURATION:-Debug}"
[[ "$CONFIGURATION" == Debug || "$CONFIGURATION" == Release ]] || { echo 'CONFIGURATION must be Debug or Release' >&2; exit 2; }
mkdir -p "$ROOT/build-logs"
LOG="$ROOT/build-logs/build-${CONFIGURATION}-$(date +%Y%m%d-%H%M%S).log"
echo "Building $APP_NAME ($CONFIGURATION)"
set -o pipefail
xcodebuild -project "$ROOT/OrionToolbar.xcodeproj" -scheme "$APP_NAME" -configuration "$CONFIGURATION" -derivedDataPath "$DERIVED" CODE_SIGNING_ALLOWED=NO build 2>&1 | tee "$LOG"
APP="$DERIVED/Build/Products/$CONFIGURATION/$APP_NAME.app"
[[ -d "$APP" ]] || { echo "Missing application: $APP" >&2; exit 1; }
plutil -lint "$APP/Contents/Info.plist"
EXE=$(/usr/libexec/PlistBuddy -c 'Print :CFBundleExecutable' "$APP/Contents/Info.plist")
[[ -x "$APP/Contents/MacOS/$EXE" ]] || { echo 'Application executable missing' >&2; exit 1; }
echo "Build complete: $APP"
echo "Log: $LOG"
if [[ "${1:-}" == "--launch" ]]; then
echo "=== LAUNCHING ORIONTOOLBAR ==="
pkill -x "$APP_NAME" 2>/dev/null || true
sleep 2
# Launch independently through macOS Launch Services.
/usr/bin/open -n -a "$APP"
sleep 3
if /usr/bin/pgrep -x "$APP_NAME" >/dev/null; then
echo "SUCCESS: OrionToolbar launched."
else
echo "ERROR: OrionToolbar is not running."
exit 1
fi
fi
-41
View File
@@ -1,41 +0,0 @@
#!/bin/zsh
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT"
mkdir -p "$ROOT/build-logs"
LOG="$ROOT/build-logs/test-$(date +%Y%m%d-%H%M%S).log"
exec > >(tee "$LOG") 2>&1
print '=== OrionToolbar tests ==='
# A successful compile is the minimum regression check.
"$ROOT/Scripts/build.sh"
APP="$ROOT/.build/Build/Products/Debug/OrionToolbar.app"
plutil -lint "$APP/Contents/Info.plist"
# Verify that the Parallels executable and JSON discovery work independently of SwiftUI.
PRLCTL=''
for candidate in /usr/local/bin/prlctl '/Applications/Parallels Desktop.app/Contents/MacOS/prlctl'; do
if [[ -x "$candidate" ]]; then PRLCTL="$candidate"; break; fi
done
if [[ -n "$PRLCTL" ]]; then
"$PRLCTL" list -a -j | python3 -c '
import json,sys
v=json.load(sys.stdin)
assert isinstance(v,list), "Expected Parallels JSON array"
for item in v:
assert isinstance(item,dict), "Invalid VM record"
assert item.get("name"), "VM without name"
assert item.get("uuid"), "VM without UUID"
print("Parallels discovery OK: {} VM(s)".format(len(v)))
'
else
echo 'SKIP: Parallels CLI not installed'
fi
if [[ -d "$ROOT/tests" ]] && find "$ROOT/tests" -name 'test_*.py' -print -quit | grep -q .; then
python3 -m unittest discover -s "$ROOT/tests" -v
fi
# Run Xcode tests only if a test plan is configured for this scheme.
if [[ "${RUN_XCODE_TESTS:-0}" == 1 ]]; then
xcodebuild -project "$ROOT/OrionToolbar.xcodeproj" -scheme OrionToolbar -configuration Debug -destination 'platform=macOS' -derivedDataPath "$ROOT/.build" CODE_SIGNING_ALLOWED=NO test
else
echo 'XCTest not run (set RUN_XCODE_TESTS=1 if the scheme has a test target).'
fi
print "Tests complete. Log: $LOG"