build: deploy Qt runtime for Windows builds
Run windeployqt as a post-build step for Schedule, copy MinGW runtime DLLs, and place Windows test binaries next to the deployed Qt runtime.
This commit is contained in:
@@ -132,8 +132,10 @@ cmake --build --preset linux-gcc
|
||||
.\build\windows-mingw\bin\Schedule.exe
|
||||
```
|
||||
|
||||
若运行时找不到 Qt DLL,把 `C:/Qt/6.6.3/mingw_64/bin` 加入当前终端 `PATH`,或分发前执行
|
||||
`C:/Qt/6.6.3/mingw_64/bin/windeployqt.exe build/windows-mingw/bin/Schedule.exe`。
|
||||
构建完成后 CMake 会自动调用 `windeployqt` 将 Qt DLL、平台插件和所需运行时复制到
|
||||
`build/windows-mingw/bin`,MinGW 的 `libstdc++` / `libgcc` / `libwinpthread` 也会一并复制,
|
||||
因此可以直接运行 `Schedule.exe`,不需要手动设置 Qt 的 `PATH`。分发前如需重新收集运行库,
|
||||
仍可使用 `windeployqt.exe build/windows-mingw/bin/Schedule.exe`。
|
||||
5. 若 Windows 上安装了 Go,构建会同时生成 `build/windows-mingw/bin/schedule-sync-server.exe`
|
||||
并运行双客户端同步集成测试;没有 Go 时该测试自动跳过。也可以把同步服务端跑在 Linux
|
||||
或另一台机器上,客户端只需填写 `http://<server>:8787`。
|
||||
|
||||
Reference in New Issue
Block a user