#!/bin/sh # Local unsigned developer bundle. No install, server access or model loading. set -eu repo=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) case "$(uname -m)" in arm64) rid=osx-arm64 ;; x86_64) rid=osx-x64 ;; *) echo "Unsupported macOS architecture" >&2; exit 1 ;; esac test "$(uname -s)" = Darwin cargo build --locked --manifest-path "$repo/desktop-core/Cargo.toml" -j 2 bundle="$repo/artifacts/desktop/Strata Preview.app" mkdir -p "$bundle/Contents/MacOS" dotnet publish "$repo/desktop/Strata.Desktop.csproj" -r "$rid" --self-contained true \ -p:UseSharedCompilation=false \ -p:NuGetLockFilePath="$repo/artifacts/desktop/packages-$rid.lock.json" \ -o "$bundle/Contents/MacOS" --nologo cat > "$bundle/Contents/Info.plist" <<'PLIST' CFBundleIdentifierdev.strata.preview CFBundleNameStrata Preview CFBundleDisplayNameStrata Preview CFBundleExecutableStrata.Desktop CFBundlePackageTypeAPPL CFBundleShortVersionString0.1.0 CFBundleVersion1 NSHighResolutionCapable PLIST printf '%s\n' "$bundle"