mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-31 17:42:13 +02:00
enable winsparkle-debug and winsparkle updates based on debug or release mode
This commit is contained in:
@@ -17,6 +17,10 @@ SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
||||
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
||||
SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
||||
SET( TOMAHAWK_INC_DIR "${CMAKE_SOURCE_DIR}/include/" )
|
||||
IF( NOT CMAKE_BUILD_TYPE STREQUAL "Release" )
|
||||
MESSAGE( "Building in debug mode, enabling all debug updates" )
|
||||
SET( DEBUG_BUILD ON )
|
||||
ENDIF()
|
||||
|
||||
# build plugins
|
||||
# use glob, but hardcoded list for now:
|
||||
|
@@ -6,6 +6,7 @@
|
||||
#cmakedefine APPLICATION_NAME "${APPLICATION_NAME}"
|
||||
#cmakedefine VERSION "${VERSION}"
|
||||
|
||||
#cmakedefine DEBUG_BUILD
|
||||
|
||||
#define CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"
|
||||
|
||||
|
@@ -127,19 +127,25 @@ TomahawkWindow::TomahawkWindow( QWidget* parent )
|
||||
toolbar->setIconSize( QSize( 32, 32 ) );
|
||||
toolbar->setToolButtonStyle( Qt::ToolButtonFollowStyle );
|
||||
toolbar->installEventFilter( new WidgetDragFilter( toolbar ) );
|
||||
|
||||
|
||||
#if defined( Q_OS_DARWIN ) && defined( HAVE_SPARKLE )
|
||||
QAction* checkForUpdates = ui->menu_Help->addAction( tr( "Check for updates...") );
|
||||
checkForUpdates->setMenuRole( QAction::ApplicationSpecificRole );
|
||||
connect(checkForUpdates, SIGNAL( triggered( bool ) ), SLOT( checkForUpdates() ) );
|
||||
QAction* checkForUpdates = ui->menu_Help->addAction( tr( "Check for updates...") );
|
||||
checkForUpdates->setMenuRole( QAction::ApplicationSpecificRole );
|
||||
connect(checkForUpdates, SIGNAL( triggered( bool ) ), SLOT( checkForUpdates() ) );
|
||||
#elif defined( WIN32 )
|
||||
qtsparkle::Updater* updater = new qtsparkle::Updater( QUrl( "http://download.tomahawk-player.org/sparklewin" ), this );
|
||||
updater->SetNetworkAccessManager( TomahawkUtils::nam() );
|
||||
updater->SetVersion( VERSION );
|
||||
|
||||
QAction* checkForUpdates = ui->menu_Help->addAction( tr( "Check for updates...") );
|
||||
checkForUpdates->setMenuRole( QAction::ApplicationSpecificRole );
|
||||
connect( checkForUpdates, SIGNAL( triggered() ), updater, SLOT( CheckNow() ) );
|
||||
QUrl updaterUrl;
|
||||
#ifdef DEBUG_BUILD
|
||||
updaterUrl.setUrl( "http://download.tomahawk-player.org/sparklewin-debug" );
|
||||
#else
|
||||
updaterUrl.setUrl( "http://download.tomahawk-player.org/sparklewin" );
|
||||
#endif
|
||||
qtsparkle::Updater* updater = new qtsparkle::Updater( updaterUrl, this );
|
||||
updater->SetNetworkAccessManager( TomahawkUtils::nam() );
|
||||
updater->SetVersion( VERSION );
|
||||
|
||||
ui->menu_Help->addSeparator();
|
||||
QAction* checkForUpdates = ui->menu_Help->addAction( tr( "Check for updates...") );
|
||||
connect( checkForUpdates, SIGNAL( triggered() ), updater, SLOT( CheckNow() ) );
|
||||
#endif
|
||||
|
||||
m_backAvailable = toolbar->addAction( QIcon( RESPATH "images/back.png" ), tr( "Back" ), PlaylistManager::instance(), SLOT( historyBack() ) );
|
||||
|
Reference in New Issue
Block a user