Fix macOS overlay binding and subtitle alignment

This commit is contained in:
2026-02-11 18:03:57 -08:00
parent 42dff75391
commit 44b0e3604e
6 changed files with 382 additions and 25 deletions

27
scripts/build-macos-helper.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
# Build macOS window tracking helper binary
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SWIFT_SOURCE="$SCRIPT_DIR/get-mpv-window-macos.swift"
OUTPUT_DIR="$SCRIPT_DIR/../dist/scripts"
OUTPUT_BINARY="$OUTPUT_DIR/get-mpv-window-macos"
# Only build on macOS
if [[ "$(uname)" != "Darwin" ]]; then
echo "Skipping macOS helper build (not on macOS)"
exit 0
fi
# Create output directory
mkdir -p "$OUTPUT_DIR"
# Compile Swift script to binary
echo "Compiling macOS window tracking helper..."
swiftc -O "$SWIFT_SOURCE" -o "$OUTPUT_BINARY"
# Make executable
chmod +x "$OUTPUT_BINARY"
echo "✓ Built $OUTPUT_BINARY"