如何告诉windeployqt Qt 安装在哪里?在我的 CI 上,我只安装了所需的最少依赖项并将位置添加到 PATH,这适用于 CMake 构建项目。但是当我之后运行 windeployqt 时,它会在 c:\Users\qt\work\install\ 下查找依赖项,但找不到它们。
依赖关系在这里:
/c/qt/5.6.3/msvc2015/bin/Qt5Network.dll
这是路径的内容:
/c/Program Files (x86)/Windows Kits/10/bin/10.0.17134.0/x86:/c/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86:/c/qt/5.6.3/msvc2015/plugins/platforms:/c/qt/5.6.3/msvc2015/bin:/bin:/usr/bin:/c/tools/ruby25/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/c/ProgramData/GooGet:/c/Program Files/Google/Compute Engine/metadata_scripts:/c/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/bin:/c/Program Files/Google/Compute Engine/sysprep:/c/Program Files/Docker:/c/ProgramData/chocolatey/bin:/c/Program Files/CMake/bin:/c/Program Files/Git/cmd:/c/Program Files/LLVM/bin:/c/Program Files/dotnet:/c/Users/travis/AppData/Local/Microsoft/WindowsApps:/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin
但它失败并出现此错误:
Unable to find dependent libraries of c:\Users\qt\work\install\bin\Qt5Network.dll :Cannot open 'c:/Users/qt/work/install/bin/Qt5Network.dll': The system cannot find the path specified.
我相信 windeployqt 会寻找一个环境变量来查找 Qt 安装,当它没有找到任何它时,它会在 c:\Users\qt\work\install 的默认位置查找。我试过设置 QTDIR、QT_DIR 和 QT,但没有运气。