Unsolved How to build rpm package to install on CentOs 6.5 from Qt Creator?
-
Hi all,
I have done developing the Qt GUI application on CentOs 6.5. How could I make rpm package (including executable file, dynamic libraries, support files, etc...) to install it on another CentOs 6.5? I have spent the time to google it but I didn't get any luck yet. Do you guys here have any idea on it? Thanks in advance. -
Hi. That's not that easy. Prepare for some major headache and read RHEL's, resp. Centos' s documentation on packaging. As an alternative, you could try CMake's "cpack".
-
Hi @Wieland ,
The task wasn't easy for newbie like me. Also I have problem with dependency when I try to run my release GUI application on another Linux machine. Do you know how to include dependency when we compile source code? -
@John_Qt Take a look at http://doc.qt.io/qt-5/linux-deployment.html
-
Hi @Wieland,
I found the binarycreator tool but I don't know where I could download and how to use it, do you have any idea on it? Also, I will try your comment too. Thanks. -
Hi,
Are you looking for that kind of information ?
-
Hi @SGaist ,
If I use your info, it will miss Qt libs and then it cannot run as stand alone application on another computer. -
From you description, it looked like your app would use the distribution provided Qt, hence this guide as you would have listed the needed Qt modules as dependencies of your package.
Since it doesn't seem to be the case, shouldn't you rather consider something like an appimage ?
The linuxdeployqt project might be of interest.
-
@SGaist ,
I have tried linuxdeployqt tool, but it gave me errors on running. -
What errors ?
-
@jsulm
I read the article but I am so confusing on " When linking your application against static Qt libraries, note that you might need to add more libraries to the LIBS line in your project file. For more information, see the Application Dependencies section." What does it mean ? How could we link ? -
@SGaist
Old library -
That's a bit vague, can you provide more details ?
-
@John_Qt If you don't use static Qt libraries then just ignore that part...
-
@jsulm ,
Currently I am trying to use static libraries. Could you show me the steps to create static libs and get my qt gui application compile with that lib?Following the http://doc.qt.io/qt-5/linux-deployment.html,
Step 1:
cd /path/to/Qt
./configure -static -prefix /path/to/Qt <other parameters>
make
Step 2:
cd /path/to/Qt/examples/widgets/tools/plugandpaint/app
make clean
PATH=/path/to/Qt/bin:$PATH
export PATH
qmake -config release
makeBut I don't really understand step 2. In the http://qtnbeyond.blogspot.com/2011/03/statically-building-with-qt-creator-in.html, they don't do step 2, they just asked the static libs into the Qt Version and then compile it. So, which steps do you recommend me to do? I am so confusing. Thank for your help.
-
@SGaist
I will try to create the error again when I have a chance because now I tried to create static libs and then create rpm from it. -
@John_Qt There is no need to build all the examples (what the step 2 does).
-
@jsulm ,
What is <other parameters> on step 1? -
@John_Qt There are no parameters in step one: it is just to download Qt source code. So what do you mean exactly?