You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.5 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# 明九洲触摸屏
## 编译 m9zCtrlTty
构建机需要 Go 1.26.2 或更高版本。
编译 Linux ARM 32 位(默认采用 ARMv7
```bash
./apps/m9zCtrlTty/build.sh linux arm 7
```
输出文件:`dist/linux-armv7/m9zCtrlTty`
脚本按 Go 的 `GOOS/GOARCH` 目标进行交叉编译,例如:
```bash
./apps/m9zCtrlTty/build.sh linux arm64
./apps/m9zCtrlTty/build.sh linux amd64
./apps/m9zCtrlTty/build.sh windows amd64
./apps/m9zCtrlTty/build.sh darwin arm64
```
可运行 `go tool dist list` 查看当前 Go 工具链支持的操作系统和 CPU 架构组合。脚本默认设置 `CGO_ENABLED=0`,并编译整个 `apps/m9zCtrlTty` 包,确保同目录的所有 Go 源文件都被包含。
ARM 型号对应关系:`armv7l` 使用 `7``armv6l` 使用 `6`ARMv5 使用 `5``aarch64` 则应使用 `arm64`。默认 ARMv7 使用硬浮点;采用软浮点 ABI 的设备可使用例如 `linux arm 7,softfloat`
Windows 和 macOS 目标可以交叉编译,但当前程序运行期依赖 Linux 的串口设备、`systemd`、`dpkg` 和 X11因此完整功能部署仍以 Linux 为目标。
脚本默认用 `-s -w` 移除调试符号以减小嵌入式产物体积;如需保留符号,可设置空值:`BUILD_LDFLAGS= ./apps/m9zCtrlTty/build.sh linux arm 7`。
二进制没有嵌入运行资源。部署时还需要在程序目录中配套提供 `config/config.json`、`wwwroot/` 和 `firefox/firefox-deb.tar.gz` 等实际运行资源。
前端分绿盟版和普通版
git clone https://gitee.com/lufaneng/central-control.git