qt打包发布

需要用到qt自带工具windeployqt.exe

安装
以qt 5.8.0为例
安装qt-opensource-windows-x86-mingw530-5.8.0.exe即可

构建Release版本
Release

使用qt提供的dos窗口
dos

或者:添加环境变量 C:\Qt\Qt5.8.0\5.8\mingw53_32\bin

找到.exe
将hello.exe放在一个单独的文件夹下

> cd F:\QT\work\build-hello-Desktop_Qt_5_8_0_MinGW_32bit-Release\pack
> windeployqt hello.exe
F:\QT\work\build-hello-Desktop_Qt_5_8_0_MinGW_32bit-Release\pack\hello.exe 32 bit, release executable
Adding Qt5Svg for qsvgicon.dll
Skipping plugin qtvirtualkeyboardplugin.dll due to disabled dependencies.
Direct dependencies: Qt5Core Qt5Widgets
All dependencies   : Qt5Core Qt5Gui Qt5Widgets
To be deployed     : Qt5Core Qt5Gui Qt5Svg Qt5Widgets
Warning: Cannot find GCC installation directory. g++.exe must be in the path.
Updating Qt5Core.dll.
Updating Qt5Gui.dll.
Updating Qt5Svg.dll.
Updating Qt5Widgets.dll.
Updating libGLESV2.dll.
Updating libEGL.dll.
Updating D3Dcompiler_43.dll.
Updating opengl32sw.dll.
Patching Qt5Core.dll...
Creating directory F:/QT/work/build-hello-Desktop_Qt_5_8_0_MinGW_32bit-Release/pack/iconengines.
Updating qsvgicon.dll.
Creating directory F:/QT/work/build-hello-Desktop_Qt_5_8_0_MinGW_32bit-Release/pack/imageformats.
Updating qgif.dll.
Updating qicns.dll.
Updating qico.dll.
Updating qjpeg.dll.
Updating qsvg.dll.
Updating qtga.dll.
Updating qtiff.dll.
Updating qwbmp.dll.

依赖关系自动解决

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值