当前位置:网站首页>[Qt5] QT small software release
[Qt5] QT small software release
2022-07-28 08:29:00 【qilei2010】
We all know Qt Cross platform features , So in addition to enjoying The signal - Slot Besides the development convenience brought by the mechanism ,Qt There are also simple ways to publish .
1. Qt Creator kit
In the installation Qt Creator when , Will let you choose to install Kit, There are about four kinds of , As shown in the figure below :

MinGW 32-bit
MinGW 64-bit
MSVC 20XX 32bit
MSVC 20XX 64bit
Say... Loosely ,
MSVC 2017 64 position , Is used for Microsoft 64 position C++ compiler ,MinGW 64 position , Is the use GNU Of 64 Bit C/C++ compiler .
The result is what the software they build and compile depends on dll Each are not identical .
2. MSVC disadvantages
Use MSVC The disadvantages of building and compiling are very serious .
1. It must be carried in the release package vc_redist.x64.exe
2. The user must install vc_redist.x64.exe, Double click to open our exe
How ugly and disgusting . and MinGW There is no such trouble .
3. A simple way to publish
stay D disc Create a new folder , Name it myapp, That is to say D:\myapp Folder .
3.1 Generate exe
1. stay Qt Creator Select from the operation configuration interface in the lower left corner :
MinGW 32bit,Release

2. Then click the green triangle , With Release Run the software in release mode .
3. stay Qt Of Release The catalogue will find our exe file , commonly exe Of Release The directory is in this location :
C:\Users\Administrator\Documents\Qt5\build-MyApp-Desktop_Qt_5_12_9_MinGW_32_bit-Release\release
take myapp.exe Copied to the D:\myapp In the folder .
3.2 Use windeployqt.exe Release
Use Qt It's official windeployqt.exe Tools release our software .
Be careful : The four above kit All have their own windeployqt.exe Tools , So choose Release Used when kit Corresponding windeployqt.exe Tools .

What we use above MinGW 32bit, So we :
1. The start menu ->Qt5.12.9 -> Qt 5.12.9(MinGW 7.3.0 32-bit), Input
windeployqt D:\myapp\myapp.exe
there myapp.exe To replace with your exe name .
A serious warning : Please forward 360 Security guard and other security protection software close and exit !
2. take D:\myapp The folder is compressed to zip It can be sent to users . After the user unzips, double-click exe You can run .



Tips :
If you can't find it in the start menu minGW, You can go straight to Qt Installation directory lookup , Similar to the following directory :
C:\Qt\Qt5.12.9\5.12.9\mingw73_32\bin
3.3 ( It's not necessary ) Copy depends on dll
If you find double clicking exe Run time error , Tip the lack of xxx.dll file , You can enter your MinGW 32bit Where bin Folder , as follows :
C:\Qt\Qt5.12.9\5.12.9\mingw73_32\bin
If you use it MinGW 64bit , The corresponding is mingw74_64\bin.
The inside No use Qt5 At the beginning dll That's what we're looking for dll file , Copied to the D:\myapp In the folder .
As for others dll, Look at you Qt Copy whichever is used in the project .
I don't know , All in this document dll Copy to desktop myapp Folders are also OK , The result is a large volume of compressed packets for users .

Reference resources :CSDN:Qt The program is released and packaged into exe Installation package
边栏推荐
- Pytorch的冻结以及解冻
- Es6: arrow function usage
- Deep browser rendering principles
- MySQL: what is the difference between like and regexp operations?
- Protobuf basic grammar summary
- Prescan quick start to master the transportation elements in lesson 14, prescan
- Five screens, VR, projection, "Wei Xiaoli" rolled up on the intelligent cockpit
- Chapter 01 introduction of [notes of Huashu]
- How to close the blocked program process?
- [dry goods] 32 EMC standard circuits are shared!
猜你喜欢

Change the dataDir path after mysql8.0.16 installation

Google and Stanford jointly issued a document: why do we have to use large models?

单片机IO口控制12V电压通断,MOS和三极管电路

Forward propagation of deep learning neural networks (1)

Understand CDN

【300+精选大厂面试题持续分享】大数据运维尖刀面试题专栏(八)

Rk3568 development board installation system startup

Huawei Senior Engineer -- BGP routing filtering and community attributes

五张图看懂EMI电磁干扰的传播过程-方波陡峭程度对高频成分的影响,时序到频域频谱图形,波形形状对EMI辐射的影响。
![[leetcode] 24. Exchange nodes in the linked list in pairs](/img/06/af8cffd306777b14a4989e638f5866.png)
[leetcode] 24. Exchange nodes in the linked list in pairs
随机推荐
Forward propagation of deep learning neural networks (1)
Qt多线程中槽函数在哪个线程里执行分析
五张图看懂EMI电磁干扰的传播过程-方波陡峭程度对高频成分的影响,时序到频域频谱图形,波形形状对EMI辐射的影响。
[dry goods] 32 EMC standard circuits are shared!
OSPF comprehensive experiment (7.12)
Allure use
聊一聊数据库的行存与列存
CarSim simulation quick start (XII) - Driver Model (2)
JS cartoon English alphabet typing game source code
Understand the propagation process of EMI electromagnetic interference through five diagrams - the influence of square wave steepness on high-frequency components, the spectrum graph from time sequenc
Will ordinary browsers disclose information? How to protect privacy by using a secure browser?
Is the salary of test / development programmers unbalanced? Busy life, all kinds of job hopping
MPLS -- multi protocol label switching technology
The even number of an integer queue is placed in the front, the odd number is placed in the back, and the relative position of the even and odd numbers remains unchanged
C#,入门教程——程序运行时的调试技巧与逻辑错误探针技术与源代码
How to understand the adjective prefix of socket: "connection oriented" and "connectionless"
SQL function
Viewing vantage's self drive from the "three good" kitchen electricity standard and the value proposition of "serious life"
解决EMC、EMI传导干扰的八大方法
Rk3568 development board installation system startup