How to generate executable for the user
-
Hi All,
I have developed a project in qt using QtCreator in Linux7.2.
After rebuild, build directory created and to run this project. I goto that build directory and then run the project executable using ./<project-name>.
User want this executable in its home directory such that he need not go to build folder, directly he can run by going into its home directory.
Please suggest, how to achieve this..
Regards,
Anuj -
Hi
Will the end user compile the project him self ? -
@mrjj no...i have to give compiled version.
User will run the software. -
Hi,
Then you need to do a proper deployment of your application.
linuxdeployqt is a pretty good helper for that.
-
It is very easy.If the machine is the same you have only to create a link to the exe from his home dir.
If the exe is in another machine you have only to learn how to link the .so and plugins objects.@mrdebug Thanks for help...
-
Hi,
Then you need to do a proper deployment of your application.
linuxdeployqt is a pretty good helper for that.
@SGaist Thanks
-
It is very easy.If the machine is the same you have only to create a link to the exe from his home dir.
If the exe is in another machine you have only to learn how to link the .so and plugins objects.@mrdebug could u pls tell me that how to link .so and plugin objects to run application on linux 7.2 machine.
-
On Linux I normally put this lines of code in the .pro file
unix:!mac { LIBS += -Wl,-rpath=\\\$$ORIGIN/libs }
For the plugins the path is in the qt.conf file. My qt.conf file is
[Paths] Plugins=plugins Libraries=libs
At this point, in the executable folder, I create a link called libs that point to the libraries folder, the folder where there are the Qt libraries and the others used by the executable.
I have notice that some Qt plugins used the Qt libraries folder, searching for a folder named lib so I normally create a lib link to libs (ln libs lib)