23 lines
834 B
Bash
Executable File
23 lines
834 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# 双击直接跑完整客户端(优先使用已构建的自包含 .app,亦可回退到已装的 Godot 引擎)。
|
|
# 登录 → 选人 → 进游戏。
|
|
cd "$(dirname "$0")"
|
|
REPO="$PWD"
|
|
export MT_40250_CLIENT="$REPO/Client"
|
|
export MT_PROTOCOL="${MT_PROTOCOL:-classic}"
|
|
|
|
APP="$REPO/build/export/mtgodot-poc.app"
|
|
if [ -x "$APP/Contents/MacOS/mtgodot-poc" ]; then
|
|
echo ">> 启动已构建的自包含客户端: $APP"
|
|
exec "$APP/Contents/MacOS/mtgodot-poc" "$@"
|
|
fi
|
|
|
|
GODOT_BIN="${GODOT:-$(which godot 2>/dev/null || echo "/Applications/Godot.app/Contents/MacOS/Godot")}"
|
|
if [ -x "$GODOT_BIN" ]; then
|
|
echo ">> 启动 Godot 开发运行环境: $GODOT_BIN"
|
|
exec "$GODOT_BIN" --path project res://client_main.tscn "$@"
|
|
fi
|
|
|
|
echo "错误:未找到可执行的客户端应用 ($APP) 或 Godot 引擎" >&2
|
|
exit 1
|