Files
Blockline/macos/launch.sh
T

20 lines
842 B
Bash

#!/bin/bash
set -euo pipefail
root=$(cd "$(dirname "$0")/.." && pwd)
source "$root/macos/engine.sh"
mkdir -p "$root/logs"
fail() {
/usr/bin/osascript - "$root/logs" <<'APPLESCRIPT'
on run argv
display dialog "BLOCKLINE konnte nicht starten. Diagnose: " & item 1 of argv with title "BLOCKLINE" buttons {"OK"} default button 1 with icon caution
end run
APPLESCRIPT
}
trap fail ERR
engine_install "$root"
engine="$root/tools/godot/Godot.app/Contents/MacOS/Godot"
# Compatibility is supported on both Intel and Apple Silicon Macs.
"$engine" --headless --rendering-method gl_compatibility --editor --import --quit --path "$root" --log-file "$root/logs/import.log"
if /usr/bin/grep -q 'SCRIPT ERROR' "$root/logs/import.log"; then false; fi
exec "$engine" --rendering-method gl_compatibility --path "$root" --log-file "$root/logs/game.log" "$@"