QT packaged and released applications

Clips have been self : https://blog.csdn.net/yhl_sophia/article/details/83311047

   

First, with windepolyqt.exe publish exe application

QT Creator release of .exe running applications need to rely on some of the dynamic link library, if one is not installed QT running on your computer will need to be packaged dynamic library copy in the past in order to run. QT comes with windeployqt.exe executable program can be application dependent .dll extracted files.

Here's a great attention to the pit: QT project with the release of which compilers, under which the corresponding bin file windeployqt.exe should be run, for example I use is MSVC2015 64bit compiler, so going to QT msvc2016_64 bin files in the installation directory folder to find windeployqt.exe executable program. If windeployqt.exe use of wrong packaging will be prompted to run the .dll file is missing, such as the lack VCRUNTIME140_APP.dll (lack VCRUNTIME140.dll usually because the computer did not install Microsoft Visual C ++ 2015 Redistributable (x64 / x86) both libraries, if click to install the fix, if the missing .dll files also appear, like me, like, we should look at the use of windeployqt.exe right)

   

After opening the operating CMD command window, go to the directory where windeployqt.exe perform windeployqt.exe storage folders .exe project 

The program will rely on libraries in the execution of the storage folder

For example, I want to put the folder is APP1 file on the desktop, when the project executable HID.exe, then enter windeployqt.exe directory execute the following command:

windeployqt.exe  C:\Users\Desktop\APP1  HID.exe

Double-HID.exe case can run the entire folder to another QT is not installed on the computer may run.

Second, packaged into a single file exe

Open run Enigma Virtual Box:

According to the schematic diagram, add the following path and file FIG. Files can care option, select all the files directly dragged into the interface box. Note to all the files and folders all dragged. Diagram is as follows:

   

In the [Files Options] can choose whether or not to file compression:

   

Finally, click Process start packing.

   

Third, the package installer

  应用程序的我这里用Inno Setup Complier软件进行操作,下载网址:http://www.jrsoftware.org/isdl.php#stable

   安装完成后打开Inno Setup Complier,选择使用向导新建脚本文件

填写程序名称、版本、发布者、网站等信息

   

将.exe文件和依赖的动态库以及文件夹全部添加进去

填写需要的信息 ,修改安装文件的名称

选择现在编译,且保存脚本文件,也可以修改脚本文件从而修改安装的信息

   

之后就可以在相应的文件夹下找到对应的.iss脚本文件以及Output里面的Setup文件,运行Setup文件,安装成功且成功运行则打包完成。

   

   

   

   

   

Guess you like

Origin www.cnblogs.com/audacious/p/12236950.html