How to create a bundle or deploy in QT
-
wrote on 24 Sept 2018, 06:13 last edited by ManiRon
! Hello
I want to create an setup that runs in other computers without QT . For that i want to create a bundle with all the required .dll. In windows i can use windeployqt "PATH"in the cmd prompt, which gathers me the required .dll files . Similarly is there any way i can do in linux.
-
Hi
There is https://github.com/probonopd/linuxdeployqt -
wrote on 24 Sept 2018, 07:30 last edited by
to deploy you can follow just these steps I hope this hepls you:
To deploy an application you will be making use of macdeployqt, which is a deployment tool included with Qt Creator. It is commonly located at <QTDIR>/bin/macdeployqt. (You can also search for it using the command find / -iname macdeployqt.) Qt Creator does not have this deployment option integrated into its interface so you will need to use it through the command line. macdeployqt is useful when your application has primarily Qt libraries and no custom libraries. If you have custom libraries, you will need to manually copy them into the bundle after it is created.
Assuming you are in the build directory, if you have no QML files, run:
macdeployqt <ApplicationName>.app
If you have QML files, instead use:macdeployqt <ApplicationName>.app -qmldir=<path to QMLs>
To place the bundle into a disk image for easy distribution, add -dmg to the command. You can also zip or tar the .app folder after running macdeployqt on it.
An important note about the option -qmldir=<path>: the “path” is the absolute path to the QML source files in your project folder. This is necessary for the deployment tool to parse the QML files and include the necessary Qt libraries for those QML files. This is only applicable if you have QML files in your project.
-
to deploy you can follow just these steps I hope this hepls you:
To deploy an application you will be making use of macdeployqt, which is a deployment tool included with Qt Creator. It is commonly located at <QTDIR>/bin/macdeployqt. (You can also search for it using the command find / -iname macdeployqt.) Qt Creator does not have this deployment option integrated into its interface so you will need to use it through the command line. macdeployqt is useful when your application has primarily Qt libraries and no custom libraries. If you have custom libraries, you will need to manually copy them into the bundle after it is created.
Assuming you are in the build directory, if you have no QML files, run:
macdeployqt <ApplicationName>.app
If you have QML files, instead use:macdeployqt <ApplicationName>.app -qmldir=<path to QMLs>
To place the bundle into a disk image for easy distribution, add -dmg to the command. You can also zip or tar the .app folder after running macdeployqt on it.
An important note about the option -qmldir=<path>: the “path” is the absolute path to the QML source files in your project folder. This is necessary for the deployment tool to parse the QML files and include the necessary Qt libraries for those QML files. This is only applicable if you have QML files in your project.
@JohnDTroup OP asks for Linux:
"Similarly is there any way i can do in linux" -
There is no official way to do it, but I believe that those who have used the one that @mrjj pointed out have reported success, so I would recommend trying that.
1/5