Compile with Qt4 or Qt5

Forum to talk about the development of SMPlayer (code, patches...).

Compile with Qt4 or Qt5

Postby colibris79 » Tue Jun 14, 2016 6:32 am

I would like to know which one is better for compiling the svn versions. Right now I am compiling with qt4 because I can add the numpad keyboard shortcuts, but in which cases would it be better to use qt5?
And if I have all the dependencies for compiling with both qt4 and qt5, how can I choose which version to use when making the .deb file?
For older computers would it be better to use qt4?
colibris79
 
Posts: 49
Joined: Wed Jun 08, 2016 4:27 am

Re: Compile with Qt4 or Qt5

Postby rvm » Tue Jun 14, 2016 1:31 pm

Maybe smplayer with Qt 4 would be more stable, however there are new features that only work with Qt 5 and I'm building the new packages with Qt 5. Also the linux distros are building smplayer with Qt 5. So for me it would be better that people would use Qt 5 and report the problems that they might find so I can fix them as soon as possible.

If you have the development packages for both Qt 4 and Qt 5 you can select the version by installing qtchooser. Then you only have to set an environment variable:
export QT_SELECT=qt4
or
export QT_SELECT=qt5
rvm
Site Admin
 
Posts: 2651
Joined: Wed Dec 23, 2009 1:25 am
Location: España

Re: Compile with Qt4 or Qt5

Postby colibris79 » Wed Jun 15, 2016 3:18 am

Great, I will use qt5 then and for my old netbook might try with the qt4.
What is the best way to check all the changes you introduce in the subversions? In the svn sources page sometimes is not very clear to me and some folders like src it says there are too many files to list them. Is there any kind of changes log?
colibris79
 
Posts: 49
Joined: Wed Jun 08, 2016 4:27 am

Re: Compile with Qt4 or Qt5

Postby rvm » Wed Jun 15, 2016 11:42 am

You can use the command
svn log -r BASE:HEAD
rvm
Site Admin
 
Posts: 2651
Joined: Wed Dec 23, 2009 1:25 am
Location: España

Re: Compile with Qt4 or Qt5

Postby colibris79 » Sun Jun 19, 2016 7:08 am

Today I installed the qt5 development packages and tried to create the .deb file for the r7984 version but I got an error (same with qt4):
Code: Select all
 $ ./create_deb.sh
dch warning: Previous package version was Debian native whilst new version is not
rm: no se puede borrar «build-stamp»: No existe el archivo o el directorio
rm: no se puede borrar «src/smplayer»: No existe el archivo o el directorio
dh_testdir
# Add here commands to compile the package.
/usr/bin/make PREFIX=/usr QMAKE=qmake LRELEASE=lrelease \
            DOC_PATH="\\\"/usr/share/doc/smplayer\\\"" \
            QMAKE_OPTS=DEFINES+=NO_DEBUG_ON_CONSOLE
make[1]: se ingresa al directorio «/home/mik/smplayer»
./get_svn_revision.sh
cd src && qmake DEFINES+=NO_DEBUG_ON_CONSOLE && DATA_PATH=\\\"/usr/share/smplayer\\\" TRANSLATION_PATH=\\\"/usr/share/smplayer/translations\\\" DOC_PATH=\\\"\"/usr/share/doc/smplayer\"\\\" THEMES_PATH=\\\"/usr/share/smplayer/themes\\\" SHORTCUTS_PATH=\\\"/usr/share/smplayer/shortcuts\\\" make
Project MESSAGE: This project is using private headers and will therefore be tied to this specific Qt module build version.
Project MESSAGE: Running this project against other versions of the Qt modules may crash at any arbitrary point.
Project MESSAGE: This is not a bug, but a result of using Qt internals. You have been warned!
make[2]: se ingresa al directorio «/home/mik/smplayer/src»
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DNO_DEBUG_ON_CONSOLE -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DUPDATE_CHECKER -DCHECK_UPGRADED -DAUTO_SHUTDOWN_PC -DCAPTURE_STREAM -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DSHARE_ACTIONS -DSHARE_WIDGET -DDOWNLOAD_SUBS -DOS_SEARCH_WORKAROUND -DYT_USE_SCRIPT -DYT_USE_SIG -DYT_USE_YTSIG -DDATA_PATH=\"/usr/share/smplayer\" -DDOC_PATH=\"/usr/share/doc/smplayer\" -DTRANSLATION_PATH=\"/usr/share/smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_DBUS_LIB -DQT_SCRIPT_LIB -DQT_XML_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -I/usr/include/qt5/QtGui/5.2.1 -I/usr/include/qt5/QtGui/5.2.1/QtGui -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I.moc -I.ui -o .obj/basegui.o basegui.cpp
In file included from logwindow.h:22:0,
                 from basegui.cpp:57:
.ui/ui_logwindow.h:13:25: fatal error: QtGui/QAction: No existe el archivo o el directorio
 #include <QtGui/QAction>
                         ^
compilation terminated.
make[2]: *** [.obj/basegui.o] Error 1
make[2]: se sale del directorio «/home/mik/smplayer/src»
make[1]: *** [src/smplayer] Error 2
make[1]: se sale del directorio «/home/mik/smplayer»
make: *** [build-stamp] Error 2
dh_testdir
# Add here commands to compile the package.
/usr/bin/make PREFIX=/usr QMAKE=qmake LRELEASE=lrelease \
            DOC_PATH="\\\"/usr/share/doc/smplayer\\\"" \
            QMAKE_OPTS=DEFINES+=NO_DEBUG_ON_CONSOLE
make[1]: se ingresa al directorio «/home/mik/smplayer»
./get_svn_revision.sh
cd src && qmake DEFINES+=NO_DEBUG_ON_CONSOLE && DATA_PATH=\\\"/usr/share/smplayer\\\" TRANSLATION_PATH=\\\"/usr/share/smplayer/translations\\\" DOC_PATH=\\\"\"/usr/share/doc/smplayer\"\\\" THEMES_PATH=\\\"/usr/share/smplayer/themes\\\" SHORTCUTS_PATH=\\\"/usr/share/smplayer/shortcuts\\\" make
Project MESSAGE: This project is using private headers and will therefore be tied to this specific Qt module build version.
Project MESSAGE: Running this project against other versions of the Qt modules may crash at any arbitrary point.
Project MESSAGE: This is not a bug, but a result of using Qt internals. You have been warned!
make[2]: se ingresa al directorio «/home/mik/smplayer/src»
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DNO_DEBUG_ON_CONSOLE -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DUPDATE_CHECKER -DCHECK_UPGRADED -DAUTO_SHUTDOWN_PC -DCAPTURE_STREAM -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DSHARE_ACTIONS -DSHARE_WIDGET -DDOWNLOAD_SUBS -DOS_SEARCH_WORKAROUND -DYT_USE_SCRIPT -DYT_USE_SIG -DYT_USE_YTSIG -DDATA_PATH=\"/usr/share/smplayer\" -DDOC_PATH=\"/usr/share/doc/smplayer\" -DTRANSLATION_PATH=\"/usr/share/smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_DBUS_LIB -DQT_SCRIPT_LIB -DQT_XML_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -I/usr/include/qt5/QtGui/5.2.1 -I/usr/include/qt5/QtGui/5.2.1/QtGui -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I.moc -I.ui -o .obj/basegui.o basegui.cpp
In file included from logwindow.h:22:0,
                 from basegui.cpp:57:
.ui/ui_logwindow.h:13:25: fatal error: QtGui/QAction: No existe el archivo o el directorio
 #include <QtGui/QAction>
                         ^
compilation terminated.
make[2]: *** [.obj/basegui.o] Error 1
make[2]: se sale del directorio «/home/mik/smplayer/src»
make[1]: *** [src/smplayer] Error 2
make[1]: se sale del directorio «/home/mik/smplayer»
make: *** [build-stamp] Error 2
 


What am I doing wrong?
colibris79
 
Posts: 49
Joined: Wed Jun 08, 2016 4:27 am

Re: Compile with Qt4 or Qt5

Postby rvm » Sun Jun 19, 2016 10:03 am

Try with delete the previous compilation:

make clean
rvm
Site Admin
 
Posts: 2651
Joined: Wed Dec 23, 2009 1:25 am
Location: España

Re: Compile with Qt4 or Qt5

Postby colibris79 » Sun Jun 19, 2016 11:55 am

Thanks! Still got some errors at the end but could install the package
Code: Select all
compilation terminated.
make[2]: *** [.obj/basegui.o] Error 1
make[2]: se sale del directorio «/home/mik/smplayer/src»
make[1]: *** [src/smplayer] Error 2
make[1]: se sale del directorio «/home/mik/smplayer»
make: *** [build-stamp] Error 2


It is working fine but the Search shortcuts are not working under mplayer
colibris79
 
Posts: 49
Joined: Wed Jun 08, 2016 4:27 am

Re: Compile with Qt4 or Qt5

Postby rvm » Sun Jun 19, 2016 10:25 pm

I think it's not normal those errors at the end. Maybe a file failed to compile.
rvm
Site Admin
 
Posts: 2651
Joined: Wed Dec 23, 2009 1:25 am
Location: España


Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest