Qt - 使用windeployqt发布Qt生成的exe软件

windeployqt工具作用:  

The Windows deployment tool is designed to automate the process of creating a deployable folder containing the Qt-related dependencies (libraries, QML imports, plugins, and translations) required to run the application from that folder. It creates a sandbox for Windows Runtime or an installation tree for Windows desktop applications, which can be easily bundled into an installation package。

使用方法:

工程名称“DCP”,为一通信程序,包含第三方库ControlCAN.dll,以及图标文件夹;

1,生成exe程序时,选择“Release”;

2,在项目文件夹中build-DCP-Desktop_Qt_5_7_0_MinGW_32bit-Release把DCP.exe拷贝到其他文件夹中,本次试验在E盘根目录创建DCPApp文件夹,将DCP.exe拷贝此文件夹中;

3,打开Qt5.7 for desktop,如下图:

4,切换到E盘DCPApp文件夹,命令如下:

5,输入windeployqt DCP.exe,工具自动查找依赖的库和翻译文件以及图标:

6,将第三方库文件ControlCAN.dll拷贝到DCPApp文件夹中,所有文件如下

7,将DCPApp文件夹拷贝到其他电脑,运行DCP.exe即可实现软件运行。

转载于:https://www.cnblogs.com/Pan-Z/p/6627877.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值