In this article i describe deploy processes of c++/qt application with cqtdeployer.
If you want maximum stability of your distribution and you want to run your application on different Distributions with a different versions then you need to use Qt from official build.
In this case we deploy Qt GUI Application for Ubuntu 16.04,Ubuntu 18.04 and Ubuntu 20.04 ++.
Done.
If You use official qt build then you can use snap version of the cqtdeployer.
After install add requirement permissions.
If you use extra libraries, just add path for cqtdeployer to used libs.
If you want find libraries recursively from libDir path, just add recursive Depth option.
If you want create simple installer for your application just add gif option.
If cqtdeployer not found qmake then add the -qmake option to an invoke command.
Call your make command.
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.
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 ...
Info: flag targetDir not used. use default target dir :/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit
Info: target deploy started!!
Info: copy :/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/animation
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/libqmlplugin.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/Models.2/libmodelsplugin.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/Models.2/plugins.qmltypes
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/Models.2/qmldir
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/plugins.qmltypes
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/qmldir
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/RemoteObjects/libqtqmlremoteobjects.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/RemoteObjects/plugins.qmltypes
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/RemoteObjects/qmldir
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/StateMachine/libqtqmlstatemachine.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/StateMachine/plugins.qmltypes
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/StateMachine/qmldir
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/WorkerScript.2/libworkerscriptplugin.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/WorkerScript.2/plugins.qmltypes
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/WorkerScript.2/qmldir
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick/Particles.2/libparticlesplugin.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick/Particles.2/plugins.qmltypes
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick/Particles.2/qmldir
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick.2/libqtquick2plugin.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick.2/plugins.qmltypes
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick.2/qmldir
Info: platform : libqvnc is disabled
Info: platform : libqvnc is disabled
Info: platform : libqwebgl is disabled
Info: platform : libqwebgl is disabled
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/bearer/libqconnmanbearer.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/bearer/libqgenericbearer.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/bearer/libqnmbearer.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/iconengines/libqsvgicon.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqgif.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqicns.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqico.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqjpeg.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqsvg.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqtga.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqtiff.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqwbmp.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqwebp.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqeglfs.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqlinuxfb.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqminimal.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqminimalegl.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqoffscreen.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-egl.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-generic.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-xcomposite-egl.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-xcomposite-glx.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqxcb.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platformthemes/libqgtk3.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platformthemes/libqxdgdesktopportal.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-decoration-client/libbradient.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libdmabuf-server.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libdrm-egl-server.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libqt-plugin-wayland-egl.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libshm-emulation-server.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libvulkan-server.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libxcomposite-egl.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libxcomposite-glx.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-dmabuf-server-buffer.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-drm-egl-server-buffer.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-linux-dmabuf-unstable-v1.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-shm-emulation-server.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-vulkan-server.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-wayland-egl.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-wayland-eglstream-controller.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-xcomposite-egl.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-xcomposite-glx.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libfullscreen-shell-v1.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libivi-shell.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libwl-shell.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libxdg-shell-v5.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libxdg-shell-v6.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libxdg-shell.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/xcbglintegrations/libqxcb-egl-integration.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/xcbglintegrations/libqxcb-glx-integration.so
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Core.so.5
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Network.so.5
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5EglFSDeviceIntegration.so.5
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5XcbQpa.so.5
Info: copy :/home/andrei/CQtDeployer/1.5/lib/libicui18n.so.56
Info: copy :/usr/lib/x86_64-linux-gnu/libxcb-xinerama.so.0
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5RemoteObjects.so.5
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QuickParticles.so.5
Info: copy :/home/andrei/CQtDeployer/1.5/lib/libicudata.so.56
Info: copy :/home/andrei/CQtDeployer/1.5/lib/libicuuc.so.56
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QmlWorkerScript.so.5
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Widgets.so.5
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5WaylandClient.so.5
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5DBus.so.5
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Qml.so.5
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Quick.so.5
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QmlModels.so.5
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Gui.so.5
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Svg.so.5
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5WaylandCompositor.so.5
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ar.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_bg.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ca.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_cs.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_da.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_de.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_en.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_es.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_fi.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_fr.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_gd.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_he.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_hu.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_it.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ja.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ko.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_lv.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_pl.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ru.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_sk.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_tr.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_uk.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_zh_TW.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_bg.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_da.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_de.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_en.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_es.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_fi.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_fr.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_hu.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_ja.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_ko.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_lv.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_pl.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_ru.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_sk.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_tr.qm
Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_uk.qm
Info: try deploy msvc
Info: deploy done!
Info: copy ::/shared/Distributions/Templates/Icon.png
Error: not exits
Info: [0] Parsed arguments, ok.
Info: [2] Collecting information about available packages...
Info: [4] Found subdirectory "Application"
Info: [4] - it provides the package "Application" - "1.0"
Info: [4] Copying component data for "Application"
Info: [5] Compressing data directory "bin"
Info: [21] Compressing data directory "icons"
Info: [31] Compressing data directory "lib"
Info: [11111] Compressing data directory "plugins"
Info: [11740] Compressing data directory "qml"
Info: [11786] Compressing data directory "translations"
Info: [12321] Compressing files found in data directory: ("/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/packages/Application/data/animation.sh")
Info: [12321] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z.sha1"
[12321] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z"
Info: [12321] Generated sha1 hash: "0af6cb9dc074407a8857403f07d13aa7d1b3c9cb"
Info: [12322] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z.sha1"
[12322] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z"
Info: [12322] Generated sha1 hash: "aa938cb332bfb427a6d0280c07c204c1bb48da22"
Info: [12322] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z.sha1"
[12322] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z"
Info: [12347] Generated sha1 hash: "7c3a43111e694bc82a0ab0d19a6e4d0025f17313"
Info: [12347] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z.sha1"
[12347] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z"
Info: [12349] Generated sha1 hash: "4ed23c36835a9b62701478ab6897737dfe9dfc9a"
Info: [12349] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z.sha1"
Info: [12349] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z"
Info: [12349] Generated sha1 hash: "bd44e15d2c26c8f6cb50760032eadf0241eedf43"
Info: [12349] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z.sha1"
[12349] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z"
Info: [12350] Generated sha1 hash: "030e0ede0c0e058a5d5a3b6c43c6a4767119d3f1"
Info: [12350] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0content.7z.sha1"
Info: [12350] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0content.7z"
Info: [12350] Generated sha1 hash: "acd2cd63e77971acedbcda2a65f93b2cc036025f"
Info: [12350] Copy meta data for package "Application" using "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/packages/Application/meta/package.xml"
Info: [12350] calculate size of directory "/tmp/binarycreator-yOPMPa/Application/data"
Info: [12359] Copying associated "script" file "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/packages/Application/meta/installscript.qs"
Info: [12360] done.
Info: [12360] Begin to copy configuration file and data.
Info: [12360] Copying associated "configuration" file "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/config/config.xml"
Info: [12360] done.
Info: [12360] Read dom element: <Name>animation</Name>.
Info: [12360] Read dom element: <Version>1.0</Version>.
Info: [12360] Read dom element: <Title>animation</Title>.
Info: [12360] Read dom element: <Publisher>Company</Publisher>.
[12360] Read dom element: <StartMenuDir>animation</StartMenuDir>.
[12360] Read dom element: <TargetDir>@HomeDir@/animation</TargetDir>.
Info: [12360] Read dom element: <InstallActionColumnVisible>true</InstallActionColumnVisible>.
[12360] Read dom element: <RemoveTargetDir>true</RemoveTargetDir>.
Info: [12360] Read dom element: <ControlScript>controlScript.qs</ControlScript>.
Info: [12360] Copying associated "ControlScript" file "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/config/controlScript.qs"
Info: [12360] done.
Info: [12360] Read dom element: <MaintenanceToolName>animationTool</MaintenanceToolName>.
[12360] Read dom element: <ProductUrl></ProductUrl>.
Info: [12360] done.
Info: [12362] Creating the binary
Info: [12407] Creating resource archive for "Application"
Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z" ("61.58 KB")
[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z.sha1" ("40.00 bytes")
[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z" ("108.00 KB")
[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z.sha1" ("40.00 bytes")
[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z" ("18.08 MB")
Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z.sha1" ("40.00 bytes")
[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z" ("1.08 MB")
[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z.sha1" ("40.00 bytes")
[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z" ("53.29 KB")
[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z.sha1" ("40.00 bytes")
Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z" ("595.71 KB")
[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z.sha1" ("40.00 bytes")
[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0content.7z" ("439.00 bytes")
Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0content.7z.sha1" ("40.00 bytes")
Info: [12449] Cleaning up...
Done. The distribution has been saved to the DistributionKit folder
After installation, all the necessary shortcuts will be created.
Unfortunately, there is currently no integration with qtcreator. The only way is to enable build target for ** qmake ** or ** cmake **