From bb91ccea21cd1379cb44f69bf42014b091da892a Mon Sep 17 00:00:00 2001 From: ANG-Server <96008766+ANGJustinl@users.noreply.github.com> Date: Wed, 22 Jul 2026 00:45:16 +0800 Subject: [PATCH] docs: document frontend exports --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index ebc2971..ab93f28 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,17 @@ WhaleTown V2 前端是基于 Godot 4.6 的 2D 多人小镇客户端。 2. 用 Godot 打开 `project.godot`。 3. 运行默认主场景。 +## 导出 + +仓库包含 Web 和 Linux 导出预设。安装 Godot 4.6 导出模板后可执行: + +```bash +godot --headless --path . --export-release Web build/web/index.html +godot --headless --path . --export-release "Linux/X11" build/linux/WhaleTown-V2.x86_64 +``` + +Web 产物是静态文件,必须通过 HTTP/HTTPS 服务器发布,不要直接用 `file://` 打开。 + 默认连接 WhaleTown 生产 API 和 WebSocket 服务。本地联调时可使用以下环境变量覆盖: - `WHALETOWN_API_BASE_URL`