How to generate executable for the user
-
wrote on 18 Mar 2018, 10:10 last edited by
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 ? -
wrote on 18 Mar 2018, 13:21 last edited by
@mrjj no...i have to give compiled version.
User will run the software. -
wrote on 18 Mar 2018, 15:28 last edited by
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. -
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.wrote on 23 Mar 2018, 04:39 last edited by@mrdebug Thanks for help...
-
Hi,
Then you need to do a proper deployment of your application.
linuxdeployqt is a pretty good helper for that.
wrote on 23 Mar 2018, 04:39 last edited by@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.wrote on 24 Mar 2018, 12:31 last edited by@mrdebug could u pls tell me that how to link .so and plugin objects to run application on linux 7.2 machine.
-
wrote on 24 Mar 2018, 18:14 last edited by
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)
1/9