Quick Guide¶
How to deploy project with cqtdeployer.
-
First one you need to install cqtdeployer into your platform
- Snap (14 more linux destributions):
Or
sudo snap install cqtdeployer
Install from snap store and add all requirement permissions.
-
Other linux LinuxInstaller.run.
chmod +x LinuxInstaller.run ./LinuxInstaller.run -
Windows installer
-
macOS DMG: open the DMG file and move the
CQtDeployer.appbundle into theApplicationsfolder.open CQtDeployer_*.dmg cp -R /Volumes/CQtDeployer/CQtDeployer.app /Applications/
- Snap (14 more linux destributions):
-
Build your project on release mode.
-
Deploy your executable file.
-
For Linux systems:
cqtdeployer -bin myexecutable -
For Windows systems:
cqtdeployer -bin myexecutable.exe -qmake C:/Qt/6.10.3/mingw_64/bin/qmake.exe -
For macOS systems:
cqtdeployer -bin myexecutable -qmake /Users/<user>/Qt/6.10.3/macos/bin/qmake -
For crossplatform build (Linux -> Windows)
cqtdeployer -bin myexecutable.exe -qmake ~/crossbuild-Qt/6.10.3/win64_mingw/bin/qmake
-
Extra options¶
If you use extra libraries, just add path for cqtdeployer to used libs.
cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs
If you want find libraries recursively from libDir path, just add recursive Depth option.
cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs -recursiveDepth 5
If you application use qml, just add qmlDir option
cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs -recursiveDepth 5 -qmlDir /path/to/my/qml/sources
If you want create simple installer for your application just add qtifw option.
cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs -recursiveDepth 5 -qmlDir /path/to/my/qml/sources qtifw
Note: the Qt Installer Framework tools (binarycreator and installerbase) are stored in the CQtDeployer repository for all supported platforms (including macOS), so the
qtifwoption is also available on macOS hosts. The release artifact for macOS is a DMG archive. See the CQtDeployer for macOS page.
If you use system libraries from system PATH, just add deploySystem option.
Warning: snap version do not have permision to system files. To deploy system libraries use the cqtdeployer version from the installer¶
cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs -recursiveDepth 5 -qmlDir /path/to/my/qml/sources qtifw deploySystem