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,
Are you looking for that kind of information ?
-
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.
-
What errors ?
-
@John_Qt Take a look at http://doc.qt.io/qt-5/linux-deployment.html
@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 ? -
That's a bit vague, can you provide more details ?
-
@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 ? -
@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.