mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 21:35:42 +00:00
The grpc 1.78.0 upgrade eliminated the rules_swift version conflict that required SparklePlugin to live in a separate Bazel workspace. Move it back into the main workspace under src/main/objc/. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
32 lines
1.0 KiB
Bash
Executable File
32 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Build the SparklePlugin native library for Unity using Bazel
|
|
#
|
|
# Usage: build_sparkle_plugin.sh [output_dir]
|
|
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
|
|
OUTPUT_DIR="${1:-$PROJECT_ROOT/src/main/csharp/net/eagle0/clients/unity/eagle0/Assets/Plugins/macOS}"
|
|
|
|
echo "=== Building SparklePlugin with Bazel ==="
|
|
|
|
cd "$PROJECT_ROOT"
|
|
bazel build //src/main/objc/net/eagle0/clients/unity/sparkle:SparklePlugin
|
|
|
|
# Get the zip path from bazel
|
|
ZIP_PATH=$(bazel cquery --output=files //src/main/objc/net/eagle0/clients/unity/sparkle:SparklePlugin 2>/dev/null)
|
|
|
|
echo "=== Extracting SparklePlugin.bundle ==="
|
|
mkdir -p "$OUTPUT_DIR"
|
|
rm -rf "$OUTPUT_DIR/SparklePlugin.bundle"
|
|
unzip -o "$ZIP_PATH" -d "$OUTPUT_DIR/"
|
|
|
|
# Convert Info.plist from binary to XML format (Unity requires XML)
|
|
/usr/bin/plutil -convert xml1 "$OUTPUT_DIR/SparklePlugin.bundle/Contents/Info.plist"
|
|
|
|
echo "=== SparklePlugin built successfully ==="
|
|
ls -la "$OUTPUT_DIR/SparklePlugin.bundle/"
|