Files
kidgo/启动游戏.command
T
2026-10-20 22:21:26 +08:00

11 lines
285 B
Bash
Executable File

#!/bin/bash
# 双击启动本地服务器并打开游戏
cd "$(dirname "$0")"
PORT=8123
python3 -m http.server "$PORT" >/dev/null 2>&1 &
SRV=$!
sleep 1.5
open "http://localhost:$PORT/"
echo "游戏已启动: http://localhost:$PORT/ (关闭本窗口即可停止服务器)"
wait $SRV