diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..9d054d1 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "source/lib/fervor"] + path = source/lib/fervor + url = https://github.com/pypt/fervor.git +[submodule "fervor"] + path = fervor + url = https://github.com/pypt/fervor.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ed599f..4c9e7a5 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,8 +49,9 @@ ADD_OPTION(PLAYUVER_WERROR "Warnings as errors" OFF ) ADD_OPTION(PLAYUVER_THREADED_MODULES "Warnings as errors" ON ) ADD_OPTION(USE_QT4 "Build with QT4" OFF ) ADD_OPTION(USE_OPENCV "Add OpenCV support" OFF ) -ADD_OPTION(USE_PIXFC "Add PIXFC support" OFF ) ADD_OPTION(USE_FFMPEG "Add FFMPEG support" OFF ) +ADD_OPTION(USE_FERVOR "Add Fervor support" OFF ) +ADD_OPTION(USE_PIXFC "Add PIXFC support" OFF ) ###################################################################################### # Dependencies @@ -67,6 +68,11 @@ IF( USE_OPENCV ) ENDIF() INCLUDE( cmake/LibPixfc.cmake ) INCLUDE( cmake/LibFFmpeg.cmake ) +IF( USE_FERVOR ) + ADD_SUBDIRECTORY( fervor ) + INCLUDE_DIRECTORIES( fervor ) + LIST(APPEND LINKER_LIBS "Fervor" ) +ENDIF() ###################################################################################### # PlaYUVer modules build @@ -131,6 +137,7 @@ status("Dependencies:") status(" QT:" USE_QT4 THEN "QT4" ELSE "QT5" ) status(" OpenCV:" USE_OPENCV THEN YES ELSE NO) status(" FFMPEG:" USE_FFMPEG THEN YES ELSE NO) +status(" Fervor:" USE_FERVOR THEN YES ELSE NO) status(" Pixfc-sse:" USE_PIXFC THEN YES ELSE NO) status("Features:") -status(" Modules List:" "${MODULES_LIST}" ) \ No newline at end of file +status(" Modules List:" "${MODULES_LIST}" ) diff --git a/cmake/LibQT.cmake b/cmake/LibQT.cmake index 8de8f11..787cb50 100644 --- a/cmake/LibQT.cmake +++ b/cmake/LibQT.cmake @@ -8,7 +8,7 @@ IF( WIN32 ) ENDIF() IF( USE_QT4 ) - FIND_PACKAGE( Qt4 REQUIRED QtCore QtGui ) + FIND_PACKAGE( Qt4 REQUIRED QtCore QtGui QtNetwork ) IF( NOT QT4_FOUND) SET(USE_QT4 FALSE) ENDIF() @@ -25,6 +25,7 @@ IF( NOT USE_QT4 ) FIND_PACKAGE( Qt5Core REQUIRED ) FIND_PACKAGE( Qt5Gui REQUIRED ) FIND_PACKAGE( Qt5Widgets REQUIRED ) + FIND_PACKAGE( Qt5Network REQUIRED ) INCLUDE_DIRECTORIES( ${Qt5Widgets_INCLUDE_DIRS} ${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ) # QT5_WRAP_CPP( HEADERS_MOC_FILES ${HEADERS_FILES} ) diff --git a/config.h.in b/config.h.in index 13bc617..e73d935 100644 --- a/config.h.in +++ b/config.h.in @@ -44,6 +44,8 @@ /* FFMPEG */ #cmakedefine USE_FFMPEG +/* Fervor update lib */ +#cmakedefine USE_FERVOR /* PIXFC-SSE lib */ #cmakedefine USE_PIXFC diff --git a/fervor b/fervor new file mode 160000 index 0000000..9980f27 --- /dev/null +++ b/fervor @@ -0,0 +1 @@ +Subproject commit 9980f27babbb895844921139c57f839c7e84391b diff --git a/source/app/main.cpp b/source/app/main.cpp index 36114d2..4c979ae 100755 --- a/source/app/main.cpp +++ b/source/app/main.cpp @@ -24,14 +24,23 @@ #include #include "plaYUVerApp.h" - +#ifdef USE_FERVOR +#include "fvupdater.h" +#endif using namespace plaYUVer; int main( int argc, char *argv[] ) { QApplication a( argc, argv ); + QApplication::setApplicationName("playuver"); + QApplication::setApplicationVersion("0.1"); + QApplication::setOrganizationName("playuver"); + QApplication::setOrganizationDomain("playuver.pixlra"); plaYUVerApp w; w.show(); w.parseArgs( argc, argv ); +#ifdef USE_FERVOR + FvUpdater::sharedUpdater()->SetFeedURL("/home/joaoc/Programming/PlaYUVerDev/playuver/app-update.xml"); +#endif return a.exec(); } diff --git a/source/app/plaYUVerApp.cpp b/source/app/plaYUVerApp.cpp index 0efbbf5..d38b9be 100644 --- a/source/app/plaYUVerApp.cpp +++ b/source/app/plaYUVerApp.cpp @@ -26,6 +26,9 @@ #include "SubWindowHandle.h" #include "InputStream.h" #include "DialogSubWindowSelector.h" +#ifdef USE_FERVOR +#include "fvupdater.h" +#endif #if( QT_VERSION_PLAYUVER == 5 ) #include @@ -969,7 +972,7 @@ Void plaYUVerApp::createActions() m_pcFrameSlider = new QSlider; m_pcFrameSlider->setOrientation( Qt::Horizontal ); m_pcFrameSlider->setMaximumWidth( 100 ); - m_pcFrameSlider->setMaximumWidth( /* 300 */ 2000 ); + m_pcFrameSlider->setMaximumWidth( /* 300 */2000 ); m_pcFrameSlider->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed ) ); m_pcFrameSlider->setEnabled( false ); connect( m_pcFrameSlider, SIGNAL( sliderMoved(int) ), this, SLOT( seekSliderEvent(int) ) ); @@ -1021,6 +1024,13 @@ Void plaYUVerApp::createActions() // ------------ About ------------ +#ifdef USE_FERVOR + m_arrayActions[UPDATE_ACT] = new QAction( tr( "&Update" ), this ); + m_arrayActions[UPDATE_ACT]->setStatusTip( tr( "Check for updates" ) ); + connect(m_arrayActions[UPDATE_ACT], SIGNAL(clicked()), + FvUpdater::sharedUpdater(), SLOT(CheckForUpdatesNotSilent())); +#endif + m_arrayActions[ABOUT_ACT] = new QAction( tr( "&About" ), this ); m_arrayActions[ABOUT_ACT]->setStatusTip( tr( "Show the application's About box" ) ); connect( m_arrayActions[ABOUT_ACT], SIGNAL( triggered() ), this, SLOT( about() ) ); @@ -1086,8 +1096,13 @@ Void plaYUVerApp::createMenus() menuBar()->addSeparator(); m_arrayMenu[ABOUT_MENU] = menuBar()->addMenu( tr( "&Help" ) ); +#ifdef USE_FERVOR + m_arrayMenu[ABOUT_MENU]->addAction( m_arrayActions[UPDATE_ACT] ); +#endif + m_arrayMenu[ABOUT_MENU]->addSeparator(); m_arrayMenu[ABOUT_MENU]->addAction( m_arrayActions[ABOUT_ACT] ); m_arrayMenu[ABOUT_MENU]->addAction( m_arrayActions[ABOUTQT_ACT] ); + } Void plaYUVerApp::createToolBars() diff --git a/source/app/plaYUVerApp.h b/source/app/plaYUVerApp.h index e1465cb..26c2c4a 100644 --- a/source/app/plaYUVerApp.h +++ b/source/app/plaYUVerApp.h @@ -221,6 +221,7 @@ private: PREVIOUS_WINDOWS_ACT, NEXT_WINDOWS_ACT, SEPARATOR_ACT, + UPDATE_ACT, ABOUT_ACT, ABOUTQT_ACT, TOTAL_ACT,