fix: build all target platforms by default

This commit is contained in:
2026-08-05 06:11:57 +08:00
parent e3aed70d6c
commit f7f59a7ee4
3 changed files with 55 additions and 23 deletions
+16 -14
View File
@@ -38,10 +38,12 @@ choco install make
### 构建命令
#### 构建当前平台版本
```bash
make build
```
#### 构建全部平台版本(默认)
```bash
make build
```
该命令会生成 Windows、Linux 和 macOS 的 amd64 可执行文件。
#### 构建 Linux 版本(用于服务器部署)
```bash
@@ -94,16 +96,16 @@ make run
## 构建输出
构建完成后,`dist` 目录将包含**单一可执行文件**
```
dist/
── home-vue-go.exe # Windows单一可执行文件(包含前后端)
└── home-vue-go # Linux/macOS单一可执行文件(包含前后端)
```
**注意**所有前端文件(HTML、CSS、JavaScript等)都已嵌入到二进制文件中,构建脚本会自动清理dist目录中的前端源文件。
执行 `make build` 后,`dist` 目录将包含三个平台包
```
dist/
── home-vue-go-windows-amd64.exe
├── home-vue-go-linux-amd64
└── home-vue-go-darwin-amd64
```
所有前端文件(HTML、CSS、JavaScript等)都会分别嵌入三个二进制文件中,构建脚本会自动清理 dist 中的前端源文件。
## 运行服务器