python -m PyInstaller -w -F main.py
# 编译成exe
python -m PyInstaller build.spec --clean
# 关于 Win + Mac 同时构建(后续)
- PyInstaller 不能在 Windows 本机直接产出 macOS 程序。
- 当前命令在 Windows 只能生成 `.exe`,在 macOS 才能生成 `.app`。
- 后续可用 GitHub Actions 做双平台构建:本地打 Windows,云端 `macos-latest` 打 macOS。