In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the relevant knowledge of how to achieve Qt project packaging, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this article on how to achieve Qt project packaging. Let's take a look.
Prepare project files
In essence, it is to put the dependent dynamic libraries in the folder you specify; so that when running on other computers, there is no need to install the qt development environment.
Compiling with Release in qt creator
Then open the qt command line tool, and note that it is not the command line tool that comes with windows, as follows
Switch to Release path. The example is as follows:
Cd / d D:/xxx/xxx/release
Enter the following command on the qt command line and replace xxx with your own exe name:
Windeployqt xxx.exe
If it is a qt quick project, you also need to enter the following command, and the path needs to be replaced with the qml path of your own pc:
Windeployqt xxx.exe-qmldir C:\ Qt\ Qt5.14.2\ 5.14.2\ mingw73_32\ qml
After the above steps, the release folder contains the running environment needed for the qt project; if there is a third-party dll, manual copy may be required, and in some cases, some dll included with qml also need manual copy
Use InstallShield
Suitable for making installation packages for Windows platform
Create a new basic project, Basic MSI Project
Then use this project to make the installation package.
Just follow the six steps in the figure above.
Solve the problem of automatically starting cmd window after packaging
When we write dome or work on a project, sometimes we don't want to run the console when we have a UI interface. The best way is not to choose Console when we start the project. What is the way to deal with it later?
A two-step process is needed.
1. Right-click on the project to be started-> Properties-> system-> choose windows in the subsystem. Here, console should be the default.
two。 Enter mainCRTStartup at the entry point of right-click-> Properties-> Advanced-> entry point of the project to be launched.
This is the end of the article on "how to achieve Qt Project Packaging". Thank you for reading! I believe that everyone has a certain understanding of the knowledge of "how to achieve Qt project packaging". If you want to learn more knowledge, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.