qml: package and publish

Qt provides a packaging tool windeployqt, which can be used to easily solve the dependency problem of qt (Note: Through actual verification, it is found that this tool can only solve most of the dependency problems, I don’t know if it is me

There is no problem of correct use).

After compiling and releasing the qt source code, generate an exe file, find the generated exe file (take test.exe as an example below), and copy the exe file to other places. For example: D:/test

 

found in the system menu

The corresponding compilation environment, for example, I use mingw, .

 

Pass the cd command to the place where test.exe is stored, and enter the following command:

windeployqt -qmldir "source path" test.exe --release

After the command is executed, the dependency file of qt will be generated under D:/test. If your source code uses a third-party library or generates a dynamic link library, you need to manually copy the required dll files to the directory.

Try running it and see if it works normally. (It is stated in many blog posts that the dependencies are all fixed here, but according to my actual use, there are still fish that slip through the net.)

 

 

Note: will be written later;

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324815464&siteId=291194637