fix simple bugs

This commit is contained in:
Andrei Yankovich 2021-06-11 10:01:28 +03:00
parent 1491fcae65
commit 0ec9fffd94
2 changed files with 35 additions and 18 deletions

View File

@ -1,5 +1,8 @@
# CQtDeployer [![cqtdeployer](https://snapcraft.io//cqtdeployer/badge.svg)](https://snapcraft.io/cqtdeployer)
# CQtDeployer
[![cqtdeployer](https://snapcraft.io//cqtdeployer/badge.svg)](https://snapcraft.io/cqtdeployer)
[![cqtdeployer](https://snapcraft.io//cqtdeployer/trending.svg?name=0)](https://snapcraft.io/cqtdeployer)
# ![Logo](res/CQtDeployer_banner_web.png)
****************************

View File

@ -102,18 +102,29 @@ cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs -recursiveDepth 5 -qmlD
# Using a live animation example from [Qt Examples](https://doc.qt.io/qt-5/qtquick-animation-example.html)
1. Build the project as a release
## Build the project as a release
1. Run qmake with the -r option for release build
>> andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.152/quick/animation$ ~/Qt/5.15.2/gcc_64/binqmake -r .
Run qmake with the -r option for release build
2. Call your make
* For Linux:
>> make -j${nproc}
* For Windows
>> Qt/Tools/QtCreator/bin/jom.exe
```bash
andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.152/quick/animation$ ~/Qt/5.15.2/gcc_64/binqmake -r .
```
Call your make command.
For Linux:
```bash
make -j${nproc}
```
For Windows
```bash
Qt/Tools/QtCreator/bin/jom.exe
```
Build log:
```bash
andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ make -j${nproc}
@ -125,9 +136,9 @@ g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -
g++ -Wl,-O1 -Wl,-rpath,/home/andrei/Qt/5.15.2/gcc_64/lib -o animation main.o qrc_shared.o qrc_animation.o /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Quick.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Gui.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QmlModels.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Qml.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Network.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Core.so -lGL -lpthread
```
2. Find our resulting executable file
If you built the project using qtCreator, your executable file will be found one level higher in the **build-animations-Desktop_Qt_5_15_2_GCC_64bit-Release** folder
In my case, the executable file is located in the root directory of the project.
## Find our resulting executable file
If you built the project using qtCreator, your executable file will be found one level higher in the **build-animations-Desktop_Qt_5_15_2_GCC_64bit-Release** folder. In my case, the executable file is located in the root directory of the project.
```bash
andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ tree
@ -179,20 +190,22 @@ g++ -Wl,-O1 -Wl,-rpath,/home/andrei/Qt/5.15.2/gcc_64/lib -o animation main.o qrc
10 directories, 33 files
```
3. Call cqtdeployer to form the base distribution
## Call cqtdeployer to form the base distribution
For Linux:
For Linux:
```bash
cqtdeployer -bin animation -qmlDir . qif -qmake ~/Qt/5.15.2/gcc_64/bin/qmake
```
For Windows:
For Windows:
```bash
cqtdeployer -bin animation -qmlDir . qif -qmake ~/Qt/5.15.2/mingw_810_64/bin/qmake.exe
```
Deploy log:
```bash
andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ cqtdeployer -bin animation -qmlDir . qif -qmake ~/Qt/5.15.2/gcc_64/bin/qmake
Info: Deploy ...
@ -412,7 +425,8 @@ Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0content.7z.sha
Info: [12449] Cleaning up...
```
4. Done. The distribution has been saved to the **DistributionKit** folder
Done. The distribution has been saved to the **DistributionKit** folder
```bash
andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ ./DistributionKit/Installeranimation.run
```