QT implements a single EXE file and qt implements exe

Source: Internet
Author: User

QT implements a single EXE file and qt implements exe

Sometimes the release of software written with Qt is troublesome. It is clearly just a small software with simple functions that must be attached with a bunch of ultra-large dynamic link libraries, it makes people feel ashamed.

There are multiple methods for single-file executable files. Compilation and use of static Qt libraries and exe packaging tools are commonly used. There are many exe packaging tools. This article describes how to use Enigma Virtual Box to package and compress files.

Starts from collecting dynamic link libraries.

It is usually collected by looking for software dependencies on dynamic linked libraries. There are a variety of popular tool software available: Process Explorer (Microsoft's own stuff) and Dependency Walker are all good software. However, this article introduces the built-in tool windeployqt.exe

Windeployqt is a console program for Windows systems. For convenience, you can write a batch processing file (*. bat) in the folder where the exe is located:

 

 
12345 @ Echo offC: \ Qt \ Qt5.5.0 \ 5.5 \ mingw__32 \ bin \ windeployqt.exe target.exe (change to your exe file name) pause

 

After batch processing, you can see that the folder has added a lot of Dynamic Link Libraries:

Note that three dynamic link library libgcc_s_dw2-1.dll, libstdc ++-6.dll, and libwinpthread-1.dll may be missing and need to be copied manually. If you do not need to internationalize, you can delete the translations folder to reduce the usage of some space. There are also several dynamic libraries that have not been called during program loading and can also be deleted.

Introduction to Enigma Virtual Box

Enigma Virtual Box is a free software that combines the associated files and registry information of the software into a single file, it is used through Virtualization in RAM (you do not need to release the packaged files to the disk ). Its working principle is to embed a loader before the main program execution in the main executable program file, the loader intercepts the program's read and write operations on the disk, if the target file has been virtualized (packaged), simulate the file in the memory and return the request results. It also supports compression to greatly reduce the size of a single exe file.

Generate a single Executable File

On the Files tab, right-click Virtual Box Files and click Add Folder Recursive. Select the Folder where the software is located.

All files in the folder are added to the list, and then the main exe files and other unused files are deleted from the list.

Click Files Options and select Enable Files extension alization and Compress Files.

Finally, click Process to complete the creation of a single exe file by executing the packaging and compression jobs. Is it very easy? After compression, the generated exe file is more than 8 Mb.

Now I can happily publish it to my friends.

 

Related Links

Introduction and download: http://enigmaprotector.com/en/aboutvb.html



From Weizhi note (Wiz)



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.