#!/bin/sh
#
# TimeAlbumPro .app launcher.
#
# Architecture-agnostic shell launcher that execs the JRE bundled inside the
# .app (Contents/bin, populated from the hosted stripped JRE). Each
# arch-specific bundle ships a matching JRE (x64 or aarch64), so this single
# script boots natively on both Intel and Apple Silicon without requiring
# Rosetta. Replaces the former x86_64-only native libapplauncher stub, which
# forced the aarch64 bundle through Rosetta and prevented startup on Apple
# Silicon machines without it.
#
DIR="$(cd "$(dirname "$0")/.." && pwd)"
exec "$DIR/bin/java" \
  -Xdock:name=TimeAlbumPro \
  -Xdock:icon="$DIR/Resources/TimeAlbumPro.icns" \
  --add-exports java.desktop/com.apple.eawt=ALL-UNNAMED \
  -Xmx1024m \
  -jar "$DIR/Java/TimeAlbumProMac.jar" "$@"
