mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-21 05:11:44 +02:00
Merge pull request #325 from tomahawk-player/branding
Branding and download manager updates
This commit is contained in:
@@ -20,6 +20,7 @@ SET( TOMAHAWK_ORGANIZATION_NAME "Tomahawk" )
|
|||||||
SET( TOMAHAWK_ORGANIZATION_DOMAIN "tomahawk-player.org" )
|
SET( TOMAHAWK_ORGANIZATION_DOMAIN "tomahawk-player.org" )
|
||||||
SET( TOMAHAWK_APPLICATION_NAME "Tomahawk" )
|
SET( TOMAHAWK_APPLICATION_NAME "Tomahawk" )
|
||||||
SET( TOMAHAWK_DESCRIPTION_SUMMARY "The social media player" )
|
SET( TOMAHAWK_DESCRIPTION_SUMMARY "The social media player" )
|
||||||
|
SET( TOMAHAWK_APPLICATION_PACKAGE_NAME "org.tomahawk-player.Tomahawk")
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
SET( TOMAHAWK_TARGET_NAME "Tomahawk" )
|
SET( TOMAHAWK_TARGET_NAME "Tomahawk" )
|
||||||
ELSE()
|
ELSE()
|
||||||
@@ -278,7 +279,6 @@ else( Qt5Core_DIR )
|
|||||||
endif( Qt5Core_DIR )
|
endif( Qt5Core_DIR )
|
||||||
set( TOMAHAWK_QT5 ${TOMAHAWK_QT5_TMP} CACHE BOOL "Build Tomahawk with Qt5")
|
set( TOMAHAWK_QT5 ${TOMAHAWK_QT5_TMP} CACHE BOOL "Build Tomahawk with Qt5")
|
||||||
|
|
||||||
|
|
||||||
if( BUILD_GUI AND UNIX AND NOT APPLE )
|
if( BUILD_GUI AND UNIX AND NOT APPLE )
|
||||||
macro_optional_find_package( X11 )
|
macro_optional_find_package( X11 )
|
||||||
macro_log_feature(X11_FOUND "X11" "The Xorg libraries" "http://www.x.org/wiki/" TRUE "" "Xorg libraries are used by libqnetwm to bring windows to front reliably")
|
macro_log_feature(X11_FOUND "X11" "The Xorg libraries" "http://www.x.org/wiki/" TRUE "" "Xorg libraries are used by libqnetwm to bring windows to front reliably")
|
||||||
@@ -481,9 +481,10 @@ configure_file(TomahawkUse.cmake.in "${PROJECT_BINARY_DIR}/TomahawkUse.cmake" @O
|
|||||||
file(COPY TomahawkAddPlugin.cmake DESTINATION "${PROJECT_BINARY_DIR}")
|
file(COPY TomahawkAddPlugin.cmake DESTINATION "${PROJECT_BINARY_DIR}")
|
||||||
file(COPY TomahawkAddLibrary.cmake DESTINATION "${PROJECT_BINARY_DIR}")
|
file(COPY TomahawkAddLibrary.cmake DESTINATION "${PROJECT_BINARY_DIR}")
|
||||||
|
|
||||||
SET( TOMAHAWK_LIBRARIES tomahawklib )
|
SET( TOMAHAWK_LIBRARY ${TOMAHAWK_TARGET_NAME}lib )
|
||||||
SET( TOMAHAWK_WIDGETS_LIBRARIES tomahawk-widgets )
|
SET( TOMAHAWK_LIBRARIES ${TOMAHAWK_LIBRARY} )
|
||||||
SET( TOMAHAWK_PLAYDARAPI_LIBRARIES tomahawk-playdarapi )
|
SET( TOMAHAWK_WIDGETS_LIBRARIES ${TOMAHAWK_TARGET_NAME}-widgets )
|
||||||
|
SET( TOMAHAWK_PLAYDARAPI_LIBRARIES ${TOMAHAWK_TARGET_NAME}-playdarapi )
|
||||||
|
|
||||||
ADD_SUBDIRECTORY( thirdparty )
|
ADD_SUBDIRECTORY( thirdparty )
|
||||||
ADD_SUBDIRECTORY( src )
|
ADD_SUBDIRECTORY( src )
|
||||||
@@ -497,7 +498,7 @@ ENDIF()
|
|||||||
# Add all targets to the build-tree export set
|
# Add all targets to the build-tree export set
|
||||||
set(CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/Tomahawk" CACHE PATH "Installation directory for CMake files")
|
set(CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/Tomahawk" CACHE PATH "Installation directory for CMake files")
|
||||||
set(CMAKE_INSTALL_FULL_CMAKEDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_CMAKEDIR}")
|
set(CMAKE_INSTALL_FULL_CMAKEDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_CMAKEDIR}")
|
||||||
export(TARGETS tomahawklib
|
export(TARGETS ${TOMAHAWK_LIBRARY}
|
||||||
FILE "${PROJECT_BINARY_DIR}/TomahawkLibraryDepends.cmake")
|
FILE "${PROJECT_BINARY_DIR}/TomahawkLibraryDepends.cmake")
|
||||||
|
|
||||||
# Export the package for use from the build-tree
|
# Export the package for use from the build-tree
|
||||||
|
@@ -18,6 +18,11 @@
|
|||||||
!ifndef MING_PATH
|
!ifndef MING_PATH
|
||||||
!define MING_PATH "/usr/i686-w64-mingw32/sys-root/mingw"
|
!define MING_PATH "/usr/i686-w64-mingw32/sys-root/mingw"
|
||||||
!endif
|
!endif
|
||||||
|
!define APPLICATION_NAME "Tomahawk"
|
||||||
|
!define TARGET_NAME "tomahawk"
|
||||||
|
;define app id needed for Windows 8 notifications
|
||||||
|
!define AppUserModelId @TOMAHAWK_APPLICATION_PACKAGE_NAME@
|
||||||
|
|
||||||
!define MING_BIN "${MING_PATH}/bin"
|
!define MING_BIN "${MING_PATH}/bin"
|
||||||
!define MING_LIB "${MING_PATH}/lib"
|
!define MING_LIB "${MING_PATH}/lib"
|
||||||
!define BUILD_PATH "@CMAKE_BINARY_DIR@"
|
!define BUILD_PATH "@CMAKE_BINARY_DIR@"
|
||||||
@@ -26,7 +31,6 @@
|
|||||||
!define SQLITE_DLL_PATH "${MING_LIB}/qt5/plugins/sqldrivers"
|
!define SQLITE_DLL_PATH "${MING_LIB}/qt5/plugins/sqldrivers"
|
||||||
!define IMAGEFORMATS_DLL_PATH "${MING_LIB}/qt5/plugins/imageformats"
|
!define IMAGEFORMATS_DLL_PATH "${MING_LIB}/qt5/plugins/imageformats"
|
||||||
|
|
||||||
|
|
||||||
; We use official release plugins
|
; We use official release plugins
|
||||||
; mingw32-vlc from obs misses a lot and has even broken ones probably
|
; mingw32-vlc from obs misses a lot and has even broken ones probably
|
||||||
!define VLC_PATH "${SOURCE_PATH}\admin\win\vlc\" ; SIC! ^
|
!define VLC_PATH "${SOURCE_PATH}\admin\win\vlc\" ; SIC! ^
|
||||||
@@ -53,11 +57,11 @@
|
|||||||
; Initial installer setup and definitions.
|
; Initial installer setup and definitions.
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
Name "@CPACK_NSIS_PACKAGE_NAME@"
|
Name "@CPACK_NSIS_PACKAGE_NAME@"
|
||||||
Caption "Tomahawk Installer"
|
Caption "${APPLICATION_NAME} Installer"
|
||||||
BrandingText "Tomahawk ${VERSION} -- ${BUILD_TIME}"
|
BrandingText "${APPLICATION_NAME} ${VERSION} -- ${BUILD_TIME}"
|
||||||
OutFile "@CPACK_TOPLEVEL_DIRECTORY@/@CPACK_OUTPUT_FILE_NAME@"
|
OutFile "@CPACK_TOPLEVEL_DIRECTORY@/@CPACK_OUTPUT_FILE_NAME@"
|
||||||
InstallDir "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
|
InstallDir "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
|
||||||
InstallDirRegKey HKCU "Software\Tomahawk" ""
|
InstallDirRegKey HKCU "Software\{APPLICATION_NAME}" ""
|
||||||
InstType Standard
|
InstType Standard
|
||||||
InstType Full
|
InstType Full
|
||||||
InstType Minimal
|
InstType Minimal
|
||||||
@@ -82,17 +86,15 @@ ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
|
|||||||
!include UAC.nsh ;Used by the UAC elevation to install as user or admin.
|
!include UAC.nsh ;Used by the UAC elevation to install as user or admin.
|
||||||
!include ${NSI_PATH}\SnoreNotify.nsh ; Macro for creation of a shortcut with a AppUserModelId.
|
!include ${NSI_PATH}\SnoreNotify.nsh ; Macro for creation of a shortcut with a AppUserModelId.
|
||||||
|
|
||||||
|
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
; Memento selections stored in registry.
|
; Memento selections stored in registry.
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
!define MEMENTO_REGISTRY_ROOT HKLM
|
!define MEMENTO_REGISTRY_ROOT HKLM
|
||||||
!define MEMENTO_REGISTRY_KEY Software\Microsoft\Windows\CurrentVersion\Uninstall\Tomahawk
|
!define MEMENTO_REGISTRY_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPLICATION_NAME}"
|
||||||
|
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
; Setup macros for the creation of a shortcut supporting Windows 8 notifications.
|
; Setup macros for the creation of a shortcut supporting Windows 8 notifications.
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
!define AppUserModelId org.tomahawk-player.Tomahawk
|
|
||||||
!define SnoreToastExe "$INSTDIR\SnoreToast.exe"
|
!define SnoreToastExe "$INSTDIR\SnoreToast.exe"
|
||||||
|
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
@@ -156,7 +158,7 @@ Function LaunchTomahawk
|
|||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function LaunchTomahawkAsUser
|
Function LaunchTomahawkAsUser
|
||||||
Exec "$INSTDIR\tomahawk.exe"
|
Exec "$INSTDIR\${APPLICATION_NAME}.exe"
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
@@ -166,31 +168,31 @@ FunctionEnd
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
!macro CheckForProcess processName gotoWhenFound gotoWhenNotFound
|
!macro CheckForProcess processName gotoWhenFound gotoWhenNotFound
|
||||||
Processes::FindProcess ${processName}
|
Processes::FindProcess "${processName}"
|
||||||
StrCmp $R0 "0" ${gotoWhenNotFound} ${gotoWhenFound}
|
StrCmp $R0 "0" "${gotoWhenNotFound}" "${gotoWhenFound}"
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
!macro ConfirmEndProcess processName
|
!macro ConfirmEndProcess processTitle processName
|
||||||
MessageBox MB_YESNO|MB_ICONEXCLAMATION \
|
MessageBox MB_YESNO|MB_ICONEXCLAMATION \
|
||||||
"Found ${processName} process(s) which need to be stopped.$\nDo you want the installer to stop these for you?" \
|
"Found ${processName} process(s) which need to be stopped.$\nDo you want the installer to stop these for you?" \
|
||||||
IDYES process_${processName}_kill IDNO process_${processName}_ended
|
IDYES "process_${processTitle}_kill" IDNO "process_${processTitle}_ended"
|
||||||
process_${processName}_kill:
|
process_${processTitle}_kill:
|
||||||
DetailPrint "Killing ${processName} processes."
|
DetailPrint "Killing ${processName} processes."
|
||||||
Processes::KillProcess ${processName}
|
Processes::KillProcess "${processName}"
|
||||||
Sleep 1500
|
Sleep 1500
|
||||||
StrCmp $R0 "1" process_${processName}_ended
|
StrCmp $R0 "1" "process_${processTitle}_ended"
|
||||||
DetailPrint "Process to kill not found!"
|
DetailPrint "Process to kill not found!"
|
||||||
process_${processName}_ended:
|
process_${processTitle}_ended:
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
!macro CheckAndConfirmEndProcess processName
|
!macro CheckAndConfirmEndProcess processTitle processName
|
||||||
!insertmacro CheckForProcess ${processName} 0 no_process_${processName}_to_end
|
!insertmacro CheckForProcess "${processName}" 0 "no_process_${processTitle}_to_end"
|
||||||
!insertmacro ConfirmEndProcess ${processName}
|
!insertmacro ConfirmEndProcess "${processTitle}" "${processName}"
|
||||||
no_process_${processName}_to_end:
|
no_process_${processTitle}_to_end:
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
Function EnsureTomahawkShutdown
|
Function EnsureTomahawkShutdown
|
||||||
!insertmacro CheckAndConfirmEndProcess "tomahawk.exe"
|
!insertmacro CheckAndConfirmEndProcess "${TARGET_NAME}" "${APPLICATION_NAME}.exe"
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
@@ -200,40 +202,40 @@ FunctionEnd
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
Function PageReinstall
|
Function PageReinstall
|
||||||
ReadRegStr $R0 HKLM "Software\Tomahawk" ""
|
ReadRegStr $R0 HKLM "Software\${APPLICATION_NAME}" ""
|
||||||
StrCmp $R0 "" 0 +2
|
StrCmp $R0 "" 0 +2
|
||||||
Abort
|
Abort
|
||||||
|
|
||||||
;Detect version
|
;Detect version
|
||||||
ReadRegDWORD $R0 HKLM "Software\Tomahawk" "VersionMajor"
|
ReadRegDWORD $R0 HKLM "Software\${APPLICATION_NAME}" "VersionMajor"
|
||||||
IntCmp $R0 ${VER_MAJOR} minor_check new_version older_version
|
IntCmp $R0 ${VER_MAJOR} minor_check new_version older_version
|
||||||
minor_check:
|
minor_check:
|
||||||
ReadRegDWORD $R0 HKLM "Software\Tomahawk" "VersionMinor"
|
ReadRegDWORD $R0 HKLM "Software\${APPLICATION_NAME}" "VersionMinor"
|
||||||
IntCmp $R0 ${VER_MINOR} build_check new_version older_version
|
IntCmp $R0 ${VER_MINOR} build_check new_version older_version
|
||||||
build_check:
|
build_check:
|
||||||
ReadRegDWORD $R0 HKLM "Software\Tomahawk" "VersionBuild"
|
ReadRegDWORD $R0 HKLM "Software\${APPLICATION_NAME}" "VersionBuild"
|
||||||
IntCmp $R0 ${VER_BUILD} same_version new_version older_version
|
IntCmp $R0 ${VER_BUILD} same_version new_version older_version
|
||||||
|
|
||||||
new_version:
|
new_version:
|
||||||
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 1" "Text" "An older version of Tomahawk is installed on your system. It is recommended that you uninstall the current version before installing. Select the operation you want to perform and click Next to continue."
|
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 1" "Text" "An older version of ${APPLICATION_NAME} is installed on your system. It is recommended that you uninstall the current version before installing. Select the operation you want to perform and click Next to continue."
|
||||||
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 2" "Text" "Uninstall before installing"
|
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 2" "Text" "Uninstall before installing"
|
||||||
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 3" "Text" "Do not uninstall"
|
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 3" "Text" "Do not uninstall"
|
||||||
!insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install Tomahawk."
|
!insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install ${APPLICATION_NAME}."
|
||||||
StrCpy $R0 "1"
|
StrCpy $R0 "1"
|
||||||
Goto reinst_start
|
Goto reinst_start
|
||||||
|
|
||||||
older_version:
|
older_version:
|
||||||
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 1" "Text" "A newer version of Tomahawk is already installed! It is not recommended that you install an older version. If you really want to install this older version, it is better to uninstall the current version first. Select the operation you want to perform and click Next to continue."
|
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 1" "Text" "A newer version of ${APPLICATION_NAME} is already installed! It is not recommended that you install an older version. If you really want to install this older version, it is better to uninstall the current version first. Select the operation you want to perform and click Next to continue."
|
||||||
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 2" "Text" "Uninstall before installing"
|
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 2" "Text" "Uninstall before installing"
|
||||||
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 3" "Text" "Do not uninstall"
|
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 3" "Text" "Do not uninstall"
|
||||||
!insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install Tomahawk."
|
!insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install ${APPLICATION_NAME}."
|
||||||
StrCpy $R0 "1"
|
StrCpy $R0 "1"
|
||||||
Goto reinst_start
|
Goto reinst_start
|
||||||
|
|
||||||
same_version:
|
same_version:
|
||||||
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 1" "Text" "Tomahawk ${VERSION} is already installed.\r\nSelect the operation you want to perform and click Next to continue."
|
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 1" "Text" "${APPLICATION_NAME} ${VERSION} is already installed.\r\nSelect the operation you want to perform and click Next to continue."
|
||||||
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 2" "Text" "Add/Reinstall components"
|
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 2" "Text" "Add/Reinstall components"
|
||||||
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 3" "Text" "Uninstall Tomahawk"
|
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 3" "Text" "Uninstall ${APPLICATION_NAME}"
|
||||||
!insertmacro MUI_HEADER_TEXT "Already Installed" "Choose the maintenance option to perform."
|
!insertmacro MUI_HEADER_TEXT "Already Installed" "Choose the maintenance option to perform."
|
||||||
StrCpy $R0 "2"
|
StrCpy $R0 "2"
|
||||||
|
|
||||||
@@ -248,12 +250,12 @@ Function PageLeaveReinstall
|
|||||||
StrCmp $R0 "2" 0 +3
|
StrCmp $R0 "2" 0 +3
|
||||||
StrCmp $R1 "1" reinst_done reinst_uninstall
|
StrCmp $R1 "1" reinst_done reinst_uninstall
|
||||||
reinst_uninstall:
|
reinst_uninstall:
|
||||||
ReadRegStr $R1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tomahawk" "UninstallString"
|
ReadRegStr $R1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPLICATION_NAME}" "UninstallString"
|
||||||
HideWindow
|
HideWindow
|
||||||
ClearErrors
|
ClearErrors
|
||||||
ExecWait '$R1 _?=$INSTDIR'
|
ExecWait '$R1 _?=$INSTDIR'
|
||||||
IfErrors no_remove_uninstaller
|
IfErrors no_remove_uninstaller
|
||||||
IfFileExists "$INSTDIR\tomahawk.exe" no_remove_uninstaller
|
IfFileExists "$INSTDIR\${APPLICATION_NAME}.exe" no_remove_uninstaller
|
||||||
Delete $R1
|
Delete $R1
|
||||||
RMDir $INSTDIR
|
RMDir $INSTDIR
|
||||||
no_remove_uninstaller:
|
no_remove_uninstaller:
|
||||||
@@ -269,40 +271,40 @@ FunctionEnd
|
|||||||
# INSTALLER SECTIONS #
|
# INSTALLER SECTIONS #
|
||||||
# #
|
# #
|
||||||
##############################################################################
|
##############################################################################
|
||||||
Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
|
Section "${APPLICATION_NAME}" SEC_TOMAHAWK_PLAYER
|
||||||
SectionIn 1 2 3 RO
|
SectionIn 1 2 3 RO
|
||||||
SetDetailsPrint listonly
|
SetDetailsPrint listonly
|
||||||
|
|
||||||
SetDetailsPrint textonly
|
SetDetailsPrint textonly
|
||||||
DetailPrint "Installing Tomahawk Player essentials."
|
DetailPrint "Installing ${APPLICATION_NAME} essentials."
|
||||||
SetDetailsPrint listonly
|
SetDetailsPrint listonly
|
||||||
SetOutPath "$INSTDIR"
|
SetOutPath "$INSTDIR"
|
||||||
|
|
||||||
!ifdef INSTALL_PATH
|
!ifdef INSTALL_PATH
|
||||||
;Main executable.
|
;Main executable.
|
||||||
File "${INSTALL_PATH}\bin\tomahawk.exe"
|
File "${INSTALL_PATH}\bin\${APPLICATION_NAME}.exe"
|
||||||
|
|
||||||
File "${INSTALL_PATH}\bin\tomahawk_crash_reporter.exe"
|
File "${INSTALL_PATH}\bin\${TARGET_NAME}_crash_reporter.exe"
|
||||||
|
|
||||||
File "${INSTALL_PATH}\bin\libtomahawk.dll"
|
File "${INSTALL_PATH}\bin\lib${TARGET_NAME}.dll"
|
||||||
File "${INSTALL_PATH}\bin\libtomahawk-widgets.dll"
|
File "${INSTALL_PATH}\bin\lib${TARGET_NAME}-widgets.dll"
|
||||||
File "${INSTALL_PATH}\bin\libtomahawk-playdarapi.dll"
|
File "${INSTALL_PATH}\bin\lib${TARGET_NAME}-playdarapi.dll"
|
||||||
|
|
||||||
; plugins
|
; plugins
|
||||||
File "${INSTALL_PATH}\lib\libtomahawk_*_*.dll"
|
File "${INSTALL_PATH}\lib\lib${TARGET_NAME}_*_*.dll"
|
||||||
!endif
|
!endif
|
||||||
!ifndef INSTALL_PATH
|
!ifndef INSTALL_PATH
|
||||||
;Main executable.
|
;Main executable.
|
||||||
File "${BUILD_PATH}\tomahawk.exe"
|
File "${BUILD_PATH}\${APPLICATION_NAME}.exe"
|
||||||
|
|
||||||
File "${BUILD_PATH}\tomahawk_crash_reporter.exe"
|
File "${BUILD_PATH}\${TARGET_NAME}_crash_reporter.exe"
|
||||||
|
|
||||||
File "${BUILD_PATH}\libtomahawk.dll"
|
File "${BUILD_PATH}\lib${TARGET_NAME}.dll"
|
||||||
File "${BUILD_PATH}\libtomahawk-widgets.dll"
|
File "${BUILD_PATH}\lib${TARGET_NAME}-widgets.dll"
|
||||||
File "${BUILD_PATH}\libtomahawk-playdarapi.dll"
|
File "${BUILD_PATH}\lib${TARGET_NAME}-playdarapi.dll"
|
||||||
|
|
||||||
; plugins
|
; plugins
|
||||||
File "${BUILD_PATH}\libtomahawk_*_*.dll"
|
File "${BUILD_PATH}\lib${TARGET_NAME}_*_*.dll"
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
;License & release notes.
|
;License & release notes.
|
||||||
@@ -435,15 +437,16 @@ SectionGroup "Shortcuts"
|
|||||||
${MementoSection} "Start Menu Program Group" SEC_START_MENU
|
${MementoSection} "Start Menu Program Group" SEC_START_MENU
|
||||||
SectionIn 1 2
|
SectionIn 1 2
|
||||||
SetDetailsPrint textonly
|
SetDetailsPrint textonly
|
||||||
DetailPrint "Adding shortcuts for the Tomahawk program group to the Start Menu."
|
DetailPrint "Adding shortcuts for the ${APPLICATION_NAME} program group to the Start Menu."
|
||||||
SetDetailsPrint listonly
|
SetDetailsPrint listonly
|
||||||
SetShellVarContext all
|
SetShellVarContext all
|
||||||
RMDir /r "$SMPROGRAMS\Tomahawk"
|
RMDir /r "$SMPROGRAMS\${APPLICATION_NAME}"
|
||||||
CreateDirectory "$SMPROGRAMS\Tomahawk"
|
CreateDirectory "$SMPROGRAMS\${APPLICATION_NAME}"
|
||||||
CreateShortCut "$SMPROGRAMS\Tomahawk\LICENSE.lnk" "$INSTDIR\LICENSE.txt"
|
CreateShortCut "$SMPROGRAMS\${APPLICATION_NAME}\LICENSE.lnk" "$INSTDIR\LICENSE.txt"
|
||||||
!insertmacro SnoreShortcut "$SMPROGRAMS\Tomahawk\Tomahawk.lnk" "$INSTDIR\tomahawk.exe" "${AppUserModelId}"
|
CreateShortCut "$SMPROGRAMS\${APPLICATION_NAME}\${APPLICATION_NAME}.lnk" "$INSTDIR\${APPLICATION_NAME}.exe"
|
||||||
CreateShortCut "$SMPROGRAMS\Tomahawk\Release notes.lnk" "$INSTDIR\NOTES.txt"
|
!insertmacro SnoreShortcut "$SMPROGRAMS\${APPLICATION_NAME}\${APPLICATION_NAME}.lnk" "$INSTDIR\${APPLICATION_NAME}.exe" "${AppUserModelId}"
|
||||||
CreateShortCut "$SMPROGRAMS\Tomahawk\Uninstall.lnk" "$INSTDIR\uninstall.exe"
|
CreateShortCut "$SMPROGRAMS\${APPLICATION_NAME}\Release notes.lnk" "$INSTDIR\NOTES.txt"
|
||||||
|
CreateShortCut "$SMPROGRAMS\${APPLICATION_NAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe"
|
||||||
SetShellVarContext current
|
SetShellVarContext current
|
||||||
${MementoSectionEnd}
|
${MementoSectionEnd}
|
||||||
!endif
|
!endif
|
||||||
@@ -454,7 +457,7 @@ SectionGroup "Shortcuts"
|
|||||||
SetDetailsPrint textonly
|
SetDetailsPrint textonly
|
||||||
DetailPrint "Creating Desktop Shortcuts"
|
DetailPrint "Creating Desktop Shortcuts"
|
||||||
SetDetailsPrint listonly
|
SetDetailsPrint listonly
|
||||||
CreateShortCut "$DESKTOP\Tomahawk.lnk" "$INSTDIR\tomahawk.exe"
|
CreateShortCut "$DESKTOP\${APPLICATION_NAME}.lnk" "$INSTDIR\${APPLICATION_NAME}.exe"
|
||||||
${MementoSectionEnd}
|
${MementoSectionEnd}
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
@@ -464,7 +467,7 @@ SectionGroup "Shortcuts"
|
|||||||
SetDetailsPrint textonly
|
SetDetailsPrint textonly
|
||||||
DetailPrint "Creating Quick Launch Shortcut"
|
DetailPrint "Creating Quick Launch Shortcut"
|
||||||
SetDetailsPrint listonly
|
SetDetailsPrint listonly
|
||||||
CreateShortCut "$QUICKLAUNCH\Tomahawk.lnk" "$INSTDIR\tomahawk.exe"
|
CreateShortCut "$QUICKLAUNCH\${APPLICATION_NAME}.lnk" "$INSTDIR\${APPLICATION_NAME}.exe"
|
||||||
${MementoSectionEnd}
|
${MementoSectionEnd}
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
@@ -475,10 +478,10 @@ ${MementoSectionDone}
|
|||||||
; Installer section descriptions
|
; Installer section descriptions
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_TOMAHAWK_PLAYER} "Tomahawk player essentials."
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_TOMAHAWK_PLAYER} "${APPLICATION_NAME} essentials."
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_START_MENU} "Tomahawk program group."
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_START_MENU} "${APPLICATION_NAME} program group."
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_DESKTOP} "Desktop shortcut for Tomahawk."
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_DESKTOP} "Desktop shortcut for ${APPLICATION_NAME}."
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_QUICK_LAUNCH} "Quick Launch shortcut for Tomahawk."
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_QUICK_LAUNCH} "Quick Launch shortcut for ${APPLICATION_NAME}."
|
||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||||
|
|
||||||
Section -post
|
Section -post
|
||||||
@@ -495,98 +498,98 @@ Section -post
|
|||||||
SetDetailsPrint listonly
|
SetDetailsPrint listonly
|
||||||
|
|
||||||
;Version numbers used to detect existing installation version for comparisson.
|
;Version numbers used to detect existing installation version for comparisson.
|
||||||
WriteRegStr HKLM "Software\Tomahawk" "" $INSTDIR
|
WriteRegStr HKLM "Software\${APPLICATION_NAME}" "" $INSTDIR
|
||||||
WriteRegDWORD HKLM "Software\Tomahawk" "VersionMajor" "${VER_MAJOR}"
|
WriteRegDWORD HKLM "Software\${APPLICATION_NAME}" "VersionMajor" "${VER_MAJOR}"
|
||||||
WriteRegDWORD HKLM "Software\Tomahawk" "VersionMinor" "${VER_MINOR}"
|
WriteRegDWORD HKLM "Software\${APPLICATION_NAME}" "VersionMinor" "${VER_MINOR}"
|
||||||
WriteRegDWORD HKLM "Software\Tomahawk" "VersionRevision" "${REVISION}"
|
WriteRegDWORD HKLM "Software\${APPLICATION_NAME}" "VersionRevision" "${REVISION}"
|
||||||
WriteRegDWORD HKLM "Software\Tomahawk" "VersionBuild" "${VER_BUILD}"
|
WriteRegDWORD HKLM "Software\${APPLICATION_NAME}" "VersionBuild" "${VER_BUILD}"
|
||||||
|
|
||||||
;Add or Remove Programs entry.
|
;Add or Remove Programs entry.
|
||||||
WriteRegExpandStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tomahawk" "UninstallString" '"$INSTDIR\Uninstall.exe"'
|
WriteRegExpandStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPLICATION_NAME}" "UninstallString" '"$INSTDIR\Uninstall.exe"'
|
||||||
WriteRegExpandStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tomahawk" "InstallLocation" "$INSTDIR"
|
WriteRegExpandStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPLICATION_NAME}" "InstallLocation" "$INSTDIR"
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tomahawk" "DisplayName" "Tomahawk"
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPLICATION_NAME}" "DisplayName" "${APPLICATION_NAME}"
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tomahawk" "Publisher" "Tomahawk-player.org"
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPLICATION_NAME}" "Publisher" "@TOMAHAWK_ORGANIZATION_DOMAIN@"
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tomahawk" "DisplayIcon" "$INSTDIR\Uninstall.exe,0"
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPLICATION_NAME}" "DisplayIcon" "$INSTDIR\Uninstall.exe,0"
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tomahawk" "DisplayVersion" "${VERSION}"
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPLICATION_NAME}" "DisplayVersion" "${VERSION}"
|
||||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tomahawk" "VersionMajor" "${VER_MAJOR}"
|
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPLICATION_NAME}" "VersionMajor" "${VER_MAJOR}"
|
||||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tomahawk" "VersionMinor" "${VER_MINOR}.${REVISION}"
|
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPLICATION_NAME}" "VersionMinor" "${VER_MINOR}.${REVISION}"
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tomahawk" "URLInfoAbout" "http://tomahawk-player.org/"
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPLICATION_NAME}" "URLInfoAbout" "http://@TOMAHAWK_ORGANIZATION_DOMAIN@/"
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tomahawk" "HelpLink" "http://tomahawk-player.org/"
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPLICATION_NAME}" "HelpLink" "http://@TOMAHAWK_ORGANIZATION_DOMAIN@/"
|
||||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tomahawk" "NoModify" "1"
|
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPLICATION_NAME}" "NoModify" "1"
|
||||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tomahawk" "NoRepair" "1"
|
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPLICATION_NAME}" "NoRepair" "1"
|
||||||
|
|
||||||
; Register tomahawk:// protocol handler
|
; Register tomahawk:// protocol handler
|
||||||
WriteRegStr HKCR "tomahawk" "" "URL:Tomahawk Protocol"
|
WriteRegStr HKCR "tomahawk" "" "URL:Tomahawk Protocol"
|
||||||
WriteRegStr HKCR "tomahawk" "URL Protocol" ""
|
WriteRegStr HKCR "tomahawk" "URL Protocol" ""
|
||||||
WriteRegStr HKCR "tomahawk\DefaultIcon" "" $INSTDIR\tomahawk.exe,1
|
WriteRegStr HKCR "tomahawk\DefaultIcon" "" "$INSTDIR\${APPLICATION_NAME}.exe,1"
|
||||||
WriteRegStr HKCR "tomahawk\shell" "" "open"
|
WriteRegStr HKCR "tomahawk\shell" "" "open"
|
||||||
WriteRegStr HKCR "tomahawk\shell\open\command" "" '"$INSTDIR\tomahawk.exe" "%1"'
|
WriteRegStr HKCR "tomahawk\shell\open\command" "" '"$INSTDIR\${APPLICATION_NAME}.exe" "%1"'
|
||||||
|
|
||||||
; Register file associations
|
; Register file associations
|
||||||
WriteRegStr HKCR ".mp3" "" "MPEG Audio Layer 3"
|
WriteRegStr HKCR ".mp3" "" "MPEG Audio Layer 3"
|
||||||
WriteRegStr HKCR ".mp3\DefaultIcon" "" $INSTDIR\tomahawk.exe,1
|
WriteRegStr HKCR ".mp3\DefaultIcon" "" "$INSTDIR\${APPLICATION_NAME}.exe,1"
|
||||||
WriteRegStr HKCR ".mp3\shell" "" "open"
|
WriteRegStr HKCR ".mp3\shell" "" "open"
|
||||||
WriteRegStr HKCR ".mp3\shell\open\command" "" '"$INSTDIR\tomahawk.exe" "%1"'
|
WriteRegStr HKCR ".mp3\shell\open\command" "" '"$INSTDIR\${APPLICATION_NAME}.exe" "%1"'
|
||||||
|
|
||||||
WriteRegStr HKCR ".oga" "" "Ogg Audio File"
|
WriteRegStr HKCR ".oga" "" "Ogg Audio File"
|
||||||
WriteRegStr HKCR ".oga\DefaultIcon" "" $INSTDIR\tomahawk.exe,1
|
WriteRegStr HKCR ".oga\DefaultIcon" "" "$INSTDIR\${APPLICATION_NAME}.exe,1"
|
||||||
WriteRegStr HKCR ".oga\shell" "" "open"
|
WriteRegStr HKCR ".oga\shell" "" "open"
|
||||||
WriteRegStr HKCR ".oga\shell\open\command" "" '"$INSTDIR\tomahawk.exe" "%1"'
|
WriteRegStr HKCR ".oga\shell\open\command" "" '"$INSTDIR\${APPLICATION_NAME}.exe" "%1"'
|
||||||
|
|
||||||
WriteRegStr HKCR ".ogg" "" "Ogg Audio File"
|
WriteRegStr HKCR ".ogg" "" "Ogg Audio File"
|
||||||
WriteRegStr HKCR ".ogg\DefaultIcon" "" $INSTDIR\tomahawk.exe,1
|
WriteRegStr HKCR ".ogg\DefaultIcon" "" "$INSTDIR\${APPLICATION_NAME}.exe,1"
|
||||||
WriteRegStr HKCR ".ogg\shell" "" "open"
|
WriteRegStr HKCR ".ogg\shell" "" "open"
|
||||||
WriteRegStr HKCR ".ogg\shell\open\command" "" '"$INSTDIR\tomahawk.exe" "%1"'
|
WriteRegStr HKCR ".ogg\shell\open\command" "" '"$INSTDIR\${APPLICATION_NAME}.exe" "%1"'
|
||||||
|
|
||||||
WriteRegStr HKCR ".opus" "" "OPUS File"
|
WriteRegStr HKCR ".opus" "" "OPUS File"
|
||||||
WriteRegStr HKCR ".opus\DefaultIcon" "" $INSTDIR\tomahawk.exe,1
|
WriteRegStr HKCR ".opus\DefaultIcon" "" "$INSTDIR\${APPLICATION_NAME}.exe,1"
|
||||||
WriteRegStr HKCR ".opus\shell" "" "open"
|
WriteRegStr HKCR ".opus\shell" "" "open"
|
||||||
WriteRegStr HKCR ".opus\shell\open\command" "" '"$INSTDIR\tomahawk.exe" "%1"'
|
WriteRegStr HKCR ".opus\shell\open\command" "" '"$INSTDIR\${APPLICATION_NAME}.exe" "%1"'
|
||||||
|
|
||||||
WriteRegStr HKCR ".mp4" "" "AAC File"
|
WriteRegStr HKCR ".mp4" "" "AAC File"
|
||||||
WriteRegStr HKCR ".mp4\DefaultIcon" "" $INSTDIR\tomahawk.exe,1
|
WriteRegStr HKCR ".mp4\DefaultIcon" "" "$INSTDIR\${APPLICATION_NAME}.exe,1"
|
||||||
WriteRegStr HKCR ".mp4\shell" "" "open"
|
WriteRegStr HKCR ".mp4\shell" "" "open"
|
||||||
WriteRegStr HKCR ".mp4\shell\open\command" "" '"$INSTDIR\tomahawk.exe" "%1"'
|
WriteRegStr HKCR ".mp4\shell\open\command" "" '"$INSTDIR\${APPLICATION_NAME}.exe" "%1"'
|
||||||
|
|
||||||
WriteRegStr HKCR ".aac" "" "AAC File"
|
WriteRegStr HKCR ".aac" "" "AAC File"
|
||||||
WriteRegStr HKCR ".aac\DefaultIcon" "" $INSTDIR\tomahawk.exe,1
|
WriteRegStr HKCR ".aac\DefaultIcon" "" "$INSTDIR\${APPLICATION_NAME}.exe,1"
|
||||||
WriteRegStr HKCR ".aac\shell" "" "open"
|
WriteRegStr HKCR ".aac\shell" "" "open"
|
||||||
WriteRegStr HKCR ".aac\shell\open\command" "" '"$INSTDIR\tomahawk.exe" "%1"'
|
WriteRegStr HKCR ".aac\shell\open\command" "" '"$INSTDIR\${APPLICATION_NAME}.exe" "%1"'
|
||||||
|
|
||||||
WriteRegStr HKCR ".m4a" "" "AAC File"
|
WriteRegStr HKCR ".m4a" "" "AAC File"
|
||||||
WriteRegStr HKCR ".m4a\DefaultIcon" "" $INSTDIR\tomahawk.exe,1
|
WriteRegStr HKCR ".m4a\DefaultIcon" "" "$INSTDIR\${APPLICATION_NAME}.exe,1"
|
||||||
WriteRegStr HKCR ".m4a\shell" "" "open"
|
WriteRegStr HKCR ".m4a\shell" "" "open"
|
||||||
WriteRegStr HKCR ".m4a\shell\open\command" "" '"$INSTDIR\tomahawk.exe" "%1"'
|
WriteRegStr HKCR ".m4a\shell\open\command" "" '"$INSTDIR\${APPLICATION_NAME}.exe" "%1"'
|
||||||
|
|
||||||
WriteRegStr HKCR ".mpc" "" "Musepack Audio File"
|
WriteRegStr HKCR ".mpc" "" "Musepack Audio File"
|
||||||
WriteRegStr HKCR ".mpc\DefaultIcon" "" $INSTDIR\tomahawk.exe,1
|
WriteRegStr HKCR ".mpc\DefaultIcon" "" "$INSTDIR\${APPLICATION_NAME}.exe,1"
|
||||||
WriteRegStr HKCR ".mpc\shell" "" "open"
|
WriteRegStr HKCR ".mpc\shell" "" "open"
|
||||||
WriteRegStr HKCR ".mpc\shell\open\command" "" '"$INSTDIR\tomahawk.exe" "%1"'
|
WriteRegStr HKCR ".mpc\shell\open\command" "" '"$INSTDIR\${APPLICATION_NAME}.exe" "%1"'
|
||||||
|
|
||||||
WriteRegStr HKCR ".wma" "" "Windows Media Audio"
|
WriteRegStr HKCR ".wma" "" "Windows Media Audio"
|
||||||
WriteRegStr HKCR ".wma\DefaultIcon" "" $INSTDIR\tomahawk.exe,1
|
WriteRegStr HKCR ".wma\DefaultIcon" "" "$INSTDIR\${APPLICATION_NAME}.exe,1"
|
||||||
WriteRegStr HKCR ".wma\shell" "" "open"
|
WriteRegStr HKCR ".wma\shell" "" "open"
|
||||||
WriteRegStr HKCR ".wma\shell\open\command" "" '"$INSTDIR\tomahawk.exe" "%1"'
|
WriteRegStr HKCR ".wma\shell\open\command" "" '"$INSTDIR\${APPLICATION_NAME}.exe" "%1"'
|
||||||
|
|
||||||
WriteRegStr HKCR ".aiff" "" "AIFF File"
|
WriteRegStr HKCR ".aiff" "" "AIFF File"
|
||||||
WriteRegStr HKCR ".aiff\DefaultIcon" "" $INSTDIR\tomahawk.exe,1
|
WriteRegStr HKCR ".aiff\DefaultIcon" "" "$INSTDIR\${APPLICATION_NAME}.exe,1"
|
||||||
WriteRegStr HKCR ".aiff\shell" "" "open"
|
WriteRegStr HKCR ".aiff\shell" "" "open"
|
||||||
WriteRegStr HKCR ".aiff\shell\open\command" "" '"$INSTDIR\tomahawk.exe" "%1"'
|
WriteRegStr HKCR ".aiff\shell\open\command" "" '"$INSTDIR\${APPLICATION_NAME}.exe" "%1"'
|
||||||
|
|
||||||
WriteRegStr HKCR ".aif" "" "AIFF File"
|
WriteRegStr HKCR ".aif" "" "AIFF File"
|
||||||
WriteRegStr HKCR ".aif\DefaultIcon" "" $INSTDIR\tomahawk.exe,1
|
WriteRegStr HKCR ".aif\DefaultIcon" "" "$INSTDIR\${APPLICATION_NAME}.exe,1"
|
||||||
WriteRegStr HKCR ".aif\shell" "" "open"
|
WriteRegStr HKCR ".aif\shell" "" "open"
|
||||||
WriteRegStr HKCR ".aif\shell\open\command" "" '"$INSTDIR\tomahawk.exe" "%1"'
|
WriteRegStr HKCR ".aif\shell\open\command" "" '"$INSTDIR\${APPLICATION_NAME}.exe" "%1"'
|
||||||
|
|
||||||
WriteRegStr HKCR ".wv" "" "WavePack Audio File"
|
WriteRegStr HKCR ".wv" "" "WavePack Audio File"
|
||||||
WriteRegStr HKCR ".wv\DefaultIcon" "" $INSTDIR\tomahawk.exe,1
|
WriteRegStr HKCR ".wv\DefaultIcon" "" "$INSTDIR\${APPLICATION_NAME}.exe,1"
|
||||||
WriteRegStr HKCR ".wv\shell" "" "open"
|
WriteRegStr HKCR ".wv\shell" "" "open"
|
||||||
WriteRegStr HKCR ".wv\shell\open\command" "" '"$INSTDIR\tomahawk.exe" "%1"'
|
WriteRegStr HKCR ".wv\shell\open\command" "" '"$INSTDIR\${APPLICATION_NAME}.exe" "%1"'
|
||||||
|
|
||||||
WriteRegStr HKCR ".flac" "" "FLAC Audio File"
|
WriteRegStr HKCR ".flac" "" "FLAC Audio File"
|
||||||
WriteRegStr HKCR ".flac\DefaultIcon" "" $INSTDIR\tomahawk.exe,1
|
WriteRegStr HKCR ".flac\DefaultIcon" "" "$INSTDIR\${APPLICATION_NAME}.exe,1"
|
||||||
WriteRegStr HKCR ".flac\shell" "" "open"
|
WriteRegStr HKCR ".flac\shell" "" "open"
|
||||||
WriteRegStr HKCR ".flac\shell\open\command" "" '"$INSTDIR\tomahawk.exe" "%1"'
|
WriteRegStr HKCR ".flac\shell\open\command" "" '"$INSTDIR\${APPLICATION_NAME}.exe" "%1"'
|
||||||
|
|
||||||
SetDetailsPrint textonly
|
SetDetailsPrint textonly
|
||||||
DetailPrint "Finsihed."
|
DetailPrint "Finsihed."
|
||||||
@@ -604,7 +607,7 @@ Var UnPageUserAppDataCheckbox_State
|
|||||||
Var UnPageUserAppDataEditBox
|
Var UnPageUserAppDataEditBox
|
||||||
|
|
||||||
Function un.UnPageUserAppData
|
Function un.UnPageUserAppData
|
||||||
!insertmacro MUI_HEADER_TEXT "Uninstall Tomahawk" "Remove Tomahawk's data folder from your computer."
|
!insertmacro MUI_HEADER_TEXT "Uninstall ${APPLICATION_NAME}" "Remove ${APPLICATION_NAME}'s data folder from your computer."
|
||||||
nsDialogs::Create /NOUNLOAD 1018
|
nsDialogs::Create /NOUNLOAD 1018
|
||||||
Pop $UnPageUserAppDataDialog
|
Pop $UnPageUserAppDataDialog
|
||||||
|
|
||||||
@@ -612,10 +615,10 @@ Function un.UnPageUserAppData
|
|||||||
Abort
|
Abort
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
${NSD_CreateLabel} 0 0 100% 12u "Do you want to delete Tomahawk's data folder?"
|
${NSD_CreateLabel} 0 0 100% 12u "Do you want to delete ${APPLICATION_NAME}'s data folder?"
|
||||||
Pop $0
|
Pop $0
|
||||||
|
|
||||||
${NSD_CreateText} 0 13u 100% 12u "$LOCALAPPDATA\Tomahawk"
|
${NSD_CreateText} 0 13u 100% 12u "$LOCALAPPDATA\${APPLICATION_NAME}"
|
||||||
Pop $UnPageUserAppDataEditBox
|
Pop $UnPageUserAppDataEditBox
|
||||||
SendMessage $UnPageUserAppDataEditBox ${EM_SETREADONLY} 1 0
|
SendMessage $UnPageUserAppDataEditBox ${EM_SETREADONLY} 1 0
|
||||||
|
|
||||||
@@ -633,41 +636,41 @@ Function un.UnPageUserAppDataLeave
|
|||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Section Uninstall
|
Section Uninstall
|
||||||
IfFileExists "$INSTDIR\tomahawk.exe" tomahawk_installed
|
IfFileExists "$INSTDIR\${APPLICATION_NAME}.exe" tomahawk_installed
|
||||||
MessageBox MB_YESNO "It does not appear that Tomahawk is installed in the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)?" IDYES tomahawk_installed
|
MessageBox MB_YESNO "It does not appear that ${APPLICATION_NAME} is installed in the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)?" IDYES tomahawk_installed
|
||||||
Abort "Uninstall aborted by user"
|
Abort "Uninstall aborted by user"
|
||||||
tomahawk_installed:
|
tomahawk_installed:
|
||||||
|
|
||||||
;Delete registry keys.
|
;Delete registry keys.
|
||||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tomahawk"
|
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPLICATION_NAME}"
|
||||||
DeleteRegValue HKLM "Software\Tomahawk" "VersionBuild"
|
DeleteRegValue HKLM "Software\${APPLICATION_NAME}" "VersionBuild"
|
||||||
DeleteRegValue HKLM "Software\Tomahawk" "VersionMajor"
|
DeleteRegValue HKLM "Software\${APPLICATION_NAME}" "VersionMajor"
|
||||||
DeleteRegValue HKLM "Software\Tomahawk" "VersionMinor"
|
DeleteRegValue HKLM "Software\${APPLICATION_NAME}" "VersionMinor"
|
||||||
DeleteRegValue HKLM "Software\Tomahawk" "VersionRevision"
|
DeleteRegValue HKLM "Software\${APPLICATION_NAME}" "VersionRevision"
|
||||||
DeleteRegValue HKLM "Software\Tomahawk" ""
|
DeleteRegValue HKLM "Software\${APPLICATION_NAME}" ""
|
||||||
DeleteRegKey HKLM "Software\Tomahawk"
|
DeleteRegKey HKLM "Software\${APPLICATION_NAME}"
|
||||||
|
|
||||||
;DeleteRegKey HKCR "Software\Tomahawk"
|
;DeleteRegKey HKCR "Software\${APPLICATION_NAME}"
|
||||||
;DeleteRegKey HKCR "Software\TomahawkSpotify"
|
;DeleteRegKey HKCR "Software\${APPLICATION_NAME}Spotify"
|
||||||
DeleteRegKey HKCR "tomahawk"
|
DeleteRegKey HKCR "${APPLICATION_NAME}"
|
||||||
|
|
||||||
;Start menu shortcuts.
|
;Start menu shortcuts.
|
||||||
!ifdef OPTION_SECTION_SC_START_MENU
|
!ifdef OPTION_SECTION_SC_START_MENU
|
||||||
SetShellVarContext all
|
SetShellVarContext all
|
||||||
RMDir /r "$SMPROGRAMS\Tomahawk"
|
RMDir /r "$SMPROGRAMS\${APPLICATION_NAME}"
|
||||||
SetShellVarContext current
|
SetShellVarContext current
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
;Desktop shortcut.
|
;Desktop shortcut.
|
||||||
!ifdef OPTION_SECTION_SC_DESKTOP
|
!ifdef OPTION_SECTION_SC_DESKTOP
|
||||||
IfFileExists "$DESKTOP\Tomahawk.lnk" 0 +2
|
IfFileExists "$DESKTOP\${APPLICATION_NAME}.lnk" 0 +2
|
||||||
Delete "$DESKTOP\Tomahawk.lnk"
|
Delete "$DESKTOP\${APPLICATION_NAME}.lnk"
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
;Quick Launch shortcut.
|
;Quick Launch shortcut.
|
||||||
!ifdef OPTION_SECTION_SC_QUICK_LAUNCH
|
!ifdef OPTION_SECTION_SC_QUICK_LAUNCH
|
||||||
IfFileExists "$QUICKLAUNCH\Tomahawk.lnk" 0 +2
|
IfFileExists "$QUICKLAUNCH\${APPLICATION_NAME}.lnk" 0 +2
|
||||||
Delete "$QUICKLAUNCH\Tomahawk.lnk"
|
Delete "$QUICKLAUNCH\${APPLICATION_NAME}.lnk"
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
;Remove all the Program Files.
|
;Remove all the Program Files.
|
||||||
@@ -675,7 +678,7 @@ Section Uninstall
|
|||||||
|
|
||||||
;Uninstall User Data if option is checked, otherwise skip.
|
;Uninstall User Data if option is checked, otherwise skip.
|
||||||
${If} $UnPageUserAppDataCheckbox_State == ${BST_CHECKED}
|
${If} $UnPageUserAppDataCheckbox_State == ${BST_CHECKED}
|
||||||
RMDir /r "$LOCALAPPDATA\Tomahawk"
|
RMDir /r "$LOCALAPPDATA\${APPLICATION_NAME}"
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
SetDetailsPrint textonly
|
SetDetailsPrint textonly
|
||||||
@@ -729,7 +732,7 @@ Function .onInit
|
|||||||
|
|
||||||
;Use available InstallLocation when possible. This is useful in the uninstaller
|
;Use available InstallLocation when possible. This is useful in the uninstaller
|
||||||
;via re-install, which would otherwise use a default location - a bug.
|
;via re-install, which would otherwise use a default location - a bug.
|
||||||
ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tomahawk" "InstallLocation"
|
ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPLICATION_NAME}" "InstallLocation"
|
||||||
StrCmp $R0 "" SkipSetInstDir
|
StrCmp $R0 "" SkipSetInstDir
|
||||||
StrCpy $INSTDIR $R0
|
StrCpy $INSTDIR $R0
|
||||||
SkipSetInstDir:
|
SkipSetInstDir:
|
||||||
|
@@ -19,8 +19,20 @@ function(tomahawk_add_plugin)
|
|||||||
# message("NO_INSTALL: ${PLUGIN_NO_INSTALL}")
|
# message("NO_INSTALL: ${PLUGIN_NO_INSTALL}")
|
||||||
|
|
||||||
# create target name once for convenience
|
# create target name once for convenience
|
||||||
set(target "tomahawk_${PLUGIN_TYPE}_${PLUGIN_NAME}")
|
set(target "${TOMAHAWK_TARGET_NAME}_${PLUGIN_TYPE}_${PLUGIN_NAME}")
|
||||||
|
|
||||||
|
# create option to disable plugins
|
||||||
|
string(TOUPPER "${PLUGIN_TYPE}" PLUGIN_TYPE_UPPER)
|
||||||
|
string(TOUPPER "${PLUGIN_NAME}" PLUGIN_NAME_UPPER)
|
||||||
|
set(PLUGIN_OPTION "BUILD_${PLUGIN_TYPE_UPPER}_${PLUGIN_NAME_UPPER}")
|
||||||
|
|
||||||
|
if(NOT DEFINED ${PLUGIN_OPTION})
|
||||||
|
set(${PLUGIN_OPTION} ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
option(${PLUGIN_OPTION} "Build Tomahawk with the ${PLUGIN_NAME} ${PLUGIN_TYPE}" ${${PLUGIN_OPTION}})
|
||||||
|
|
||||||
|
if(${PLUGIN_OPTION})
|
||||||
# determine target type
|
# determine target type
|
||||||
if(NOT ${PLUGIN_SHARED_LIB})
|
if(NOT ${PLUGIN_SHARED_LIB})
|
||||||
set(target_type "MODULE")
|
set(target_type "MODULE")
|
||||||
@@ -52,4 +64,5 @@ function(tomahawk_add_plugin)
|
|||||||
list(APPEND tomahawk_add_library_args "INSTALL_BINDIR" "${CMAKE_INSTALL_LIBDIR}")
|
list(APPEND tomahawk_add_library_args "INSTALL_BINDIR" "${CMAKE_INSTALL_LIBDIR}")
|
||||||
|
|
||||||
tomahawk_add_library(${tomahawk_add_library_args})
|
tomahawk_add_library(${tomahawk_add_library_args})
|
||||||
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
@@ -2,7 +2,7 @@ INCLUDE( InstallRequiredSystemLibraries )
|
|||||||
|
|
||||||
SET( CPACK_PACKAGE_CONTACT "Dominik Schmidt <domme@tomahawk-player.org>" )
|
SET( CPACK_PACKAGE_CONTACT "Dominik Schmidt <domme@tomahawk-player.org>" )
|
||||||
|
|
||||||
SET( CPACK_PACKAGE_FILE_NAME tomahawk-${TOMAHAWK_VERSION} ) # Package file name without extension. Also a directory of installer cmake-2.5.0-Linux-i686
|
SET( CPACK_PACKAGE_FILE_NAME "${TOMAHAWK_APPLICATION_NAME}-${TOMAHAWK_VERSION}" ) # Package file name without extension. Also a directory of installer cmake-2.5.0-Linux-i686
|
||||||
|
|
||||||
# CPACK_GENERATOR CPack generator to be used STGZ;TGZ;TZ
|
# CPACK_GENERATOR CPack generator to be used STGZ;TGZ;TZ
|
||||||
# CPACK_INCLUDE_TOPLEVEL_DIRECTORY Controls whether CPack adds a top-level directory, usually of the form ProjectName-Version-OS, to the top of package tree. 0 to disable, 1 to enable
|
# CPACK_INCLUDE_TOPLEVEL_DIRECTORY Controls whether CPack adds a top-level directory, usually of the form ProjectName-Version-OS, to the top of package tree. 0 to disable, 1 to enable
|
||||||
@@ -22,7 +22,7 @@ SET( CPACK_PACKAGE_VERSION_PATCH ${TOMAHAWK_VERSION_PATCH} )
|
|||||||
|
|
||||||
SET( CPACK_SOURCE_GENERATOR TGZ )
|
SET( CPACK_SOURCE_GENERATOR TGZ )
|
||||||
SET( CPACK_SOURCE_IGNORE_FILES "/\\\\.git/" ".*~$" ".kate-swp$" "/build_dir/" "/clang/" "/gcc/" "/build/" "/win/" ) # Pattern of files in the source tree that won't be packaged
|
SET( CPACK_SOURCE_IGNORE_FILES "/\\\\.git/" ".*~$" ".kate-swp$" "/build_dir/" "/clang/" "/gcc/" "/build/" "/win/" ) # Pattern of files in the source tree that won't be packaged
|
||||||
SET( CPACK_SOURCE_PACKAGE_FILE_NAME tomahawk-${TOMAHAWK_VERSION} ) # Name of the source package
|
SET( CPACK_SOURCE_PACKAGE_FILE_NAME ${TOMAHAWK_APPLICATION_NAME}-${TOMAHAWK_VERSION} ) # Name of the source package
|
||||||
# CPACK_SOURCE_STRIP_FILES List of files in the source tree that will be stripped. Starting with CMake 2.6.0 CPACK_SOURCE_STRIP_FILES will be a boolean variable which enables stripping of all files (a list of files evaluates to TRUE in CMake, so this change is compatible).
|
# CPACK_SOURCE_STRIP_FILES List of files in the source tree that will be stripped. Starting with CMake 2.6.0 CPACK_SOURCE_STRIP_FILES will be a boolean variable which enables stripping of all files (a list of files evaluates to TRUE in CMake, so this change is compatible).
|
||||||
# CPACK_STRIP_FILES List of files to be stripped. Starting with CMake 2.6.0 CPACK_STRIP_FILES will be a boolean variable which enables stripping of all files (a list of files evaluates to TRUE in CMake, so this change is compatible). bin/ccmake;bin/cmake;bin/cpack;bin/ctest
|
# CPACK_STRIP_FILES List of files to be stripped. Starting with CMake 2.6.0 CPACK_STRIP_FILES will be a boolean variable which enables stripping of all files (a list of files evaluates to TRUE in CMake, so this change is compatible). bin/ccmake;bin/cmake;bin/cpack;bin/ctest
|
||||||
# CPACK_SYSTEM_NAME System name, defaults to the value of ${CMAKE_SYSTEM_NAME}. Linux-i686
|
# CPACK_SYSTEM_NAME System name, defaults to the value of ${CMAKE_SYSTEM_NAME}. Linux-i686
|
||||||
|
15
data/images/downloadbutton.svg
Normal file
15
data/images/downloadbutton.svg
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg width="342px" height="115px" viewBox="0 0 342 115" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
|
||||||
|
<title>downloadbutton</title>
|
||||||
|
<description>Created with Sketch (http://www.bohemiancoding.com/sketch)</description>
|
||||||
|
<defs></defs>
|
||||||
|
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
|
||||||
|
<g id="Rectangle-1-+-BUY----->-+->-+-DOWNLOAD" sketch:type="MSLayerGroup">
|
||||||
|
<g id="Rectangle-1-+-BUY----->" fill="#000000" sketch:type="MSShapeGroup">
|
||||||
|
<path d="M0,0 L0,115 L57.393263,115 L342,115 L342,0 L0,0 Z" id="Rectangle-1"></path>
|
||||||
|
</g>
|
||||||
|
<path d="M283,58.2686567 L267,52 L267,54.6492537 L274.869464,57.5597015 L279.867133,59.4253731 L279.867133,59.5746269 L274.869464,61.4402985 L267,64.3507463 L267,67 L283,60.7313433 L283,58.2686567 Z" id=">" stroke="#FFFFFF" fill="#FFFFFF" sketch:type="MSShapeGroup" transform="translate(275.000000, 60.000000) rotate(90.000000) translate(-275.000000, -60.000000) "></path>
|
||||||
|
<path d="M69,69 L75.0117417,69 C80.9921722,69 85,65.6180982 85,58.4033742 C85,51.1886503 80.9921722,48 74.7612524,48 L69,48 L69,69 Z M74,65 L74,52 L74.9201878,52 C78.5680751,52 81,53.5072464 81,58.4057971 C81,63.3043478 78.5680751,65 74.9201878,65 L74,65 Z M97.5,70 C103.148649,70 107,65.8343195 107,58.9023669 C107,52.0029586 103.148649,48 97.5,48 C91.8513514,48 88,51.9704142 88,58.9023669 C88,65.8343195 91.8513514,70 97.5,70 Z M97.5,66 C94.737931,66 93,63.2464455 93,58.9004739 C93,54.5876777 94.737931,52 97.5,52 C100.262069,52 102,54.5876777 102,58.9004739 C102,63.2464455 100.262069,66 97.5,66 Z M112.848601,69 L118.637405,69 L120.577608,59.4662577 C120.927481,57.8558282 121.181934,56.148773 121.436387,54.6027607 L121.563613,54.6027607 C121.78626,56.148773 122.040712,57.8558282 122.390585,59.4662577 L124.426209,69 L130.310433,69 L134,48 L129.515267,48 L128.083969,57.8236196 C127.79771,59.9815951 127.51145,62.2039877 127.225191,64.458589 L127.097964,64.458589 C126.684478,62.2039877 126.270992,59.9493865 125.857506,57.8236196 L123.631043,48 L119.655216,48 L117.428753,57.8236196 C117.015267,60.0138037 116.601781,62.2361963 116.188295,64.458589 L116.061069,64.458589 C115.806616,62.2361963 115.48855,60.0138037 115.234097,57.8236196 L113.802799,48 L109,48 L112.848601,69 Z M137,69 L141.383562,69 L141.383562,61.559816 C141.383562,59.0797546 141.007828,56.2776074 140.819961,53.958589 L140.945205,53.958589 L142.949119,58.5322086 L148.272016,69 L153,69 L153,48 L148.616438,48 L148.616438,55.4079755 C148.616438,57.8880368 148.992172,60.851227 149.180039,63.0736196 L149.054795,63.0736196 L147.050881,58.4355828 L141.727984,48 L137,48 L137,69 Z M158,69 L171,69 L171,65.006135 L162.718519,65.006135 L162.718519,48 L158,48 L158,69 Z M183.5,70 C189.148649,70 193,65.8343195 193,58.9023669 C193,52.0029586 189.148649,48 183.5,48 C177.851351,48 174,51.9704142 174,58.9023669 C174,65.8343195 177.851351,70 183.5,70 Z M183.5,66 C180.737931,66 179,63.2464455 179,58.9004739 C179,54.5876777 180.737931,52 183.5,52 C186.262069,52 188,54.5876777 188,58.9004739 C188,63.2464455 186.262069,66 183.5,66 Z M207.933333,69 L213,69 L206.374359,48 L200.625641,48 L194,69 L198.871795,69 L200.17094,64.0076687 L206.634188,64.0076687 L207.933333,69 Z M201,61 L201.460432,59 C201.978417,56.8333333 202.467626,54.3 202.928058,52 L203.043165,52 C203.532374,54.2666667 204.05036,56.8333333 204.568345,59 L205,61 L201,61 Z M215,69 L221.011742,69 C226.992172,69 231,65.6180982 231,58.4033742 C231,51.1886503 226.992172,48 220.761252,48 L215,48 L215,69 Z M220,65 L220,52 L220.920188,52 C224.568075,52 227,53.5072464 227,58.4057971 C227,63.3043478 224.568075,65 220.920188,65 L220,65 Z" id="DOWNLOAD" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 3.9 KiB |
@@ -166,5 +166,6 @@
|
|||||||
<file>data/images/repeat-all.svg</file>
|
<file>data/images/repeat-all.svg</file>
|
||||||
<file>data/images/repeat-one.svg</file>
|
<file>data/images/repeat-one.svg</file>
|
||||||
<file>data/images/downloads.svg</file>
|
<file>data/images/downloads.svg</file>
|
||||||
|
<file>data/images/downloadbutton.svg</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@@ -10,5 +10,5 @@ tomahawk_add_plugin(google
|
|||||||
SOURCES
|
SOURCES
|
||||||
GoogleWrapper.cpp
|
GoogleWrapper.cpp
|
||||||
LINK_LIBRARIES
|
LINK_LIBRARIES
|
||||||
tomahawk_account_xmpp
|
${TOMAHAWK_TARGET_NAME}_account_xmpp
|
||||||
)
|
)
|
||||||
|
@@ -90,7 +90,7 @@ GoogleWrapper::GoogleWrapper ( const QString& pluginID )
|
|||||||
config->m_disableChecksForGoogle = true;
|
config->m_disableChecksForGoogle = true;
|
||||||
config->m_ui->headerLabel->setText( tr( "Configure this Google Account" ) );
|
config->m_ui->headerLabel->setText( tr( "Configure this Google Account" ) );
|
||||||
config->m_ui->emailLabel->setText( tr( "Google Address:" ) );
|
config->m_ui->emailLabel->setText( tr( "Google Address:" ) );
|
||||||
config->m_ui->xmppBlurb->setText( tr( "Enter your Google login to connect with your friends using Tomahawk!" ) );
|
config->m_ui->xmppBlurb->setText( tr( "Enter your Google login to connect with your friends using %applicationName!" ) );
|
||||||
config->m_ui->xmppUsername->setPlaceholderText( tr( "username@gmail.com" ) );
|
config->m_ui->xmppUsername->setPlaceholderText( tr( "username@gmail.com" ) );
|
||||||
config->m_ui->logoLabel->setPixmap( QPixmap( ":/google-account/gmail-logo.png" ) );
|
config->m_ui->logoLabel->setPixmap( QPixmap( ":/google-account/gmail-logo.png" ) );
|
||||||
config->m_ui->xmppServer->setText( "talk.google.com" );
|
config->m_ui->xmppServer->setText( "talk.google.com" );
|
||||||
|
@@ -41,7 +41,7 @@ public:
|
|||||||
|
|
||||||
virtual QString prettyName() const { return "Google"; }
|
virtual QString prettyName() const { return "Google"; }
|
||||||
virtual QString factoryId() const { return "googleaccount"; }
|
virtual QString factoryId() const { return "googleaccount"; }
|
||||||
QString description() const { return tr( "Login to directly connect to your Google Talk contacts that also use Tomahawk." ); }
|
QString description() const { return tr( "Login to directly connect to your Google Talk contacts that also use %applicationName." ); }
|
||||||
virtual QPixmap icon() const;
|
virtual QPixmap icon() const;
|
||||||
virtual Account* createAccount( const QString& pluginId );
|
virtual Account* createAccount( const QString& pluginId );
|
||||||
};
|
};
|
||||||
|
@@ -50,7 +50,7 @@ public:
|
|||||||
virtual ~XmppAccountFactory() {}
|
virtual ~XmppAccountFactory() {}
|
||||||
|
|
||||||
QString prettyName() const { return "Jabber (XMPP)"; }
|
QString prettyName() const { return "Jabber (XMPP)"; }
|
||||||
QString description() const { return tr( "Login to connect to your Jabber/XMPP contacts that also use Tomahawk." ); }
|
QString description() const { return tr( "Login to connect to your Jabber/XMPP contacts that also use %applicationName." ); }
|
||||||
QString factoryId() const { return "xmppaccount"; }
|
QString factoryId() const { return "xmppaccount"; }
|
||||||
QPixmap icon() const { return QPixmap( ":/xmpp-account/xmpp-icon.png" ); }
|
QPixmap icon() const { return QPixmap( ":/xmpp-account/xmpp-icon.png" ); }
|
||||||
AccountTypes types() const { return AccountTypes( SipType | StatusPushType ); }
|
AccountTypes types() const { return AccountTypes( SipType | StatusPushType ); }
|
||||||
|
@@ -101,7 +101,7 @@
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Enter your XMPP login to connect with your friends using Tomahawk!</string>
|
<string>Enter your XMPP login to connect with your friends using %applicationName!</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
|
@@ -74,14 +74,14 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>This plugin will automatically find other users running Tomahawk on your local network</string>
|
<string>This plugin will automatically find other users running %applicationName on your local network</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="autoConnectCheckbox">
|
<widget class="QCheckBox" name="autoConnectCheckbox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Connect automatically when Tomahawk starts</string>
|
<string>Connect automatically when %applicationName starts</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -101,7 +101,6 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../jreen/resources.qrc"/>
|
|
||||||
<include location="resources.qrc"/>
|
<include location="resources.qrc"/>
|
||||||
<include location="resources.qrc"/>
|
<include location="resources.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
PROJECT( CrashReporter )
|
PROJECT( CrashReporter )
|
||||||
cmake_policy(SET CMP0017 NEW)
|
cmake_policy(SET CMP0017 NEW)
|
||||||
|
|
||||||
|
set(TOMAHAWK_CRASH_REPORTER_TARGET ${TOMAHAWK_TARGET_NAME}_crash_reporter)
|
||||||
|
|
||||||
setup_qt()
|
setup_qt()
|
||||||
|
|
||||||
list(APPEND crashreporter_SOURCES main.cpp)
|
list(APPEND crashreporter_SOURCES main.cpp)
|
||||||
@@ -16,6 +18,8 @@ else()
|
|||||||
set(CRASHREPORTER_RELEASE_CHANNEL "nightly")
|
set(CRASHREPORTER_RELEASE_CHANNEL "nightly")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(CRASHREPORTER_SUBMIT_URL "https://crash-reports.tomahawk-player.org/submit")
|
||||||
|
set(CRASHREPORTER_ICON ":/tomahawk-icon.png")
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CrashReporterConfig.h.in
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CrashReporterConfig.h.in
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/CrashReporterConfig.h)
|
${CMAKE_CURRENT_BINARY_DIR}/CrashReporterConfig.h)
|
||||||
|
|
||||||
@@ -25,7 +29,7 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}
|
|||||||
../../thirdparty/libcrashreporter-qt/src
|
../../thirdparty/libcrashreporter-qt/src
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable( tomahawk_crash_reporter WIN32
|
add_executable( ${TOMAHAWK_CRASH_REPORTER_TARGET} WIN32
|
||||||
${crashreporter_SOURCES}
|
${crashreporter_SOURCES}
|
||||||
${crashreporter_HEADERS_MOC}
|
${crashreporter_HEADERS_MOC}
|
||||||
${crashreporter_UI_HEADERS}
|
${crashreporter_UI_HEADERS}
|
||||||
@@ -33,13 +37,13 @@ add_executable( tomahawk_crash_reporter WIN32
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
target_link_libraries(tomahawk_crash_reporter
|
target_link_libraries( ${TOMAHAWK_CRASH_REPORTER_TARGET}
|
||||||
tomahawklib
|
${TOMAHAWK_LIBRARIES}
|
||||||
crashreporter-gui
|
crashreporter-gui
|
||||||
${QT_LIBRARIES}
|
${QT_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(tomahawk_crash_reporter PROPERTIES AUTOMOC ON)
|
set_target_properties(${TOMAHAWK_CRASH_REPORTER_TARGET} PROPERTIES AUTOMOC ON)
|
||||||
install(TARGETS tomahawk_crash_reporter RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR})
|
install(TARGETS ${TOMAHAWK_CRASH_REPORTER_TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR})
|
||||||
|
|
||||||
qt5_use_modules(tomahawk_crash_reporter Widgets Network)
|
qt5_use_modules(${TOMAHAWK_CRASH_REPORTER_TARGET} Widgets Network)
|
||||||
|
@@ -1,8 +1,23 @@
|
|||||||
#ifndef CRASHREPORTERCONFIG_H
|
#ifndef CRASHREPORTERCONFIG_H
|
||||||
#define CRASHREPORTERCONFIG_H
|
#define CRASHREPORTERCONFIG_H
|
||||||
|
|
||||||
|
// QCoreApplication settings for QSettings
|
||||||
|
#cmakedefine TOMAHAWK_ORGANIZATION_NAME "${TOMAHAWK_ORGANIZATION_NAME}"
|
||||||
|
#cmakedefine TOMAHAWK_ORGANIZATION_DOMAIN "${TOMAHAWK_ORGANIZATION_DOMAIN}"
|
||||||
|
#cmakedefine TOMAHAWK_APPLICATION_NAME "${TOMAHAWK_APPLICATION_NAME}"
|
||||||
|
#cmakedefine TOMAHAWK_VERSION "${TOMAHAWK_VERSION}"
|
||||||
|
|
||||||
|
|
||||||
#define CRASHREPORTER_BUILD_ID "@CMAKE_DATESTAMP_YEAR@@CMAKE_DATESTAMP_MONTH@@CMAKE_DATESTAMP_DAY@000000"
|
#define CRASHREPORTER_BUILD_ID "@CMAKE_DATESTAMP_YEAR@@CMAKE_DATESTAMP_MONTH@@CMAKE_DATESTAMP_DAY@000000"
|
||||||
|
|
||||||
#define CRASHREPORTER_RELEASE_CHANNEL "@CRASHREPORTER_RELEASE_CHANNEL@"
|
#define CRASHREPORTER_RELEASE_CHANNEL "@CRASHREPORTER_RELEASE_CHANNEL@"
|
||||||
|
|
||||||
|
#define CRASHREPORTER_PRODUCT_NAME "@TOMAHAWK_APPLICATION_NAME@"
|
||||||
|
|
||||||
|
#define CRASHREPORTER_VERSION_STRING "@TOMAHAWK_VERSION_STRING@"
|
||||||
|
|
||||||
|
#define CRASHREPORTER_SUBMIT_URL "@CRASHREPORTER_SUBMIT_URL@"
|
||||||
|
|
||||||
|
#define CRASHREPORTER_ICON "@CRASHREPORTER_ICON@"
|
||||||
|
|
||||||
#endif // CRASHREPORTERCONFIG_H
|
#endif // CRASHREPORTERCONFIG_H
|
||||||
|
@@ -154,9 +154,10 @@ int main( int argc, char* argv[] )
|
|||||||
|
|
||||||
// used by some Qt stuff, eg QSettings
|
// used by some Qt stuff, eg QSettings
|
||||||
// leave first! As Settings object is created quickly
|
// leave first! As Settings object is created quickly
|
||||||
QCoreApplication::setApplicationName( "Tomahawk" );
|
QCoreApplication::setOrganizationName( QLatin1String( TOMAHAWK_ORGANIZATION_NAME ) );
|
||||||
QCoreApplication::setOrganizationName( "Tomahawk" );
|
QCoreApplication::setOrganizationDomain( QLatin1String( TOMAHAWK_ORGANIZATION_DOMAIN ) );
|
||||||
QCoreApplication::setOrganizationDomain( "tomahawk-player.org" );
|
QCoreApplication::setApplicationName( QLatin1String( TOMAHAWK_APPLICATION_NAME ) );
|
||||||
|
QCoreApplication::setApplicationVersion( QLatin1String( TOMAHAWK_VERSION ) );
|
||||||
|
|
||||||
QApplication app( argc, argv );
|
QApplication app( argc, argv );
|
||||||
TomahawkUtils::installTranslator( &app );
|
TomahawkUtils::installTranslator( &app );
|
||||||
@@ -167,19 +168,23 @@ int main( int argc, char* argv[] )
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
CrashReporter reporter( QUrl( "https://crash-reports.tomahawk-player.org/submit" ), app.arguments() );
|
CrashReporter reporter( QUrl( CRASHREPORTER_SUBMIT_URL ), app.arguments() );
|
||||||
|
|
||||||
reporter.setLogo(QPixmap(":/tomahawk-icon.png"));
|
|
||||||
|
|
||||||
|
#ifdef CRASHREPORTER_ICON
|
||||||
|
reporter.setLogo( QPixmap( CRASHREPORTER_ICON ) );
|
||||||
|
#endif
|
||||||
|
reporter.setWindowTitle( CRASHREPORTER_PRODUCT_NAME );
|
||||||
|
reporter.setText("<html><head/><body><p><span style=\" font-weight:600;\">Sorry!</span> " CRASHREPORTER_PRODUCT_NAME " crashed. Please tell us about it! " CRASHREPORTER_PRODUCT_NAME " has created an error report for you that can help improve the stability in the future. You can now send this report directly to the " CRASHREPORTER_PRODUCT_NAME " developers.</p></body></html>");
|
||||||
|
|
||||||
reporter.setReportData( "BuildID", CRASHREPORTER_BUILD_ID );
|
reporter.setReportData( "BuildID", CRASHREPORTER_BUILD_ID );
|
||||||
reporter.setReportData( "ProductName", "Tomahawk" );
|
reporter.setReportData( "ProductName", CRASHREPORTER_PRODUCT_NAME );
|
||||||
reporter.setReportData( "Version", TomahawkUtils::appFriendlyVersion().toLocal8Bit() );
|
reporter.setReportData( "Version", CRASHREPORTER_VERSION_STRING );
|
||||||
reporter.setReportData( "ReleaseChannel", CRASHREPORTER_RELEASE_CHANNEL);
|
reporter.setReportData( "ReleaseChannel", CRASHREPORTER_RELEASE_CHANNEL);
|
||||||
|
|
||||||
//reporter.setReportData( "timestamp", QByteArray::number( QDateTime::currentDateTime().toTime_t() ) );
|
//reporter.setReportData( "timestamp", QByteArray::number( QDateTime::currentDateTime().toTime_t() ) );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// add parameters
|
// add parameters
|
||||||
|
|
||||||
// QList<Pair> pairs;
|
// QList<Pair> pairs;
|
||||||
|
@@ -20,13 +20,13 @@
|
|||||||
|
|
||||||
#include "SnoreNotifyPlugin.h"
|
#include "SnoreNotifyPlugin.h"
|
||||||
|
|
||||||
|
|
||||||
#include "TomahawkSettings.h"
|
#include "TomahawkSettings.h"
|
||||||
|
|
||||||
#include "utils/TomahawkUtils.h"
|
#include "utils/TomahawkUtils.h"
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
#include "utils/TomahawkUtilsGui.h"
|
#include "utils/TomahawkUtilsGui.h"
|
||||||
|
|
||||||
|
#include "TomahawkVersion.h"
|
||||||
|
|
||||||
#include <snore/core/application.h>
|
#include <snore/core/application.h>
|
||||||
#include <snore/core/notification/icon.h>
|
#include <snore/core/notification/icon.h>
|
||||||
|
|
||||||
@@ -81,8 +81,8 @@ SnoreNotifyPlugin::SnoreNotifyPlugin()
|
|||||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << m_snore->primaryNotificationBackend();
|
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << m_snore->primaryNotificationBackend();
|
||||||
|
|
||||||
m_application = Snore::Application( qApp->applicationName(), m_defaultIcon );
|
m_application = Snore::Application( qApp->applicationName(), m_defaultIcon );
|
||||||
m_application.hints().setValue( "windows_app_id", "org.tomahawk-player.Tomahawk" );
|
m_application.hints().setValue( "windows_app_id", TOMAHAWK_APPLICATION_PACKAGE_NAME );
|
||||||
m_application.hints().setValue( "desktop-entry", "tomahawk" );
|
m_application.hints().setValue( "desktop-entry", TOMAHAWK_APPLICATION_NAME );
|
||||||
|
|
||||||
addAlert( InfoNotifyUser, tr( "Notify User" ) );
|
addAlert( InfoNotifyUser, tr( "Notify User" ) );
|
||||||
addAlert( InfoNowPlaying, tr( "Now Playing" ) );
|
addAlert( InfoNowPlaying, tr( "Now Playing" ) );
|
||||||
@@ -121,7 +121,7 @@ SnoreNotifyPlugin::pushInfo( Tomahawk::InfoSystem::InfoPushData pushData )
|
|||||||
switch ( pushData.type )
|
switch ( pushData.type )
|
||||||
{
|
{
|
||||||
case Tomahawk::InfoSystem::InfoTrackUnresolved:
|
case Tomahawk::InfoSystem::InfoTrackUnresolved:
|
||||||
notifyUser( Tomahawk::InfoSystem::InfoTrackUnresolved,"The current track could not be resolved. Tomahawk will pick back up with the next resolvable track from this source." );
|
notifyUser( Tomahawk::InfoSystem::InfoTrackUnresolved, tr( "The current track could not be resolved. %applicationName will pick back up with the next resolvable track from this source." ) );
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Tomahawk::InfoSystem::InfoNotifyUser:
|
case Tomahawk::InfoSystem::InfoNotifyUser:
|
||||||
@@ -129,7 +129,7 @@ SnoreNotifyPlugin::pushInfo( Tomahawk::InfoSystem::InfoPushData pushData )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
case Tomahawk::InfoSystem::InfoNowStopped:
|
case Tomahawk::InfoSystem::InfoNowStopped:
|
||||||
notifyUser( Tomahawk::InfoSystem::InfoNowStopped, "Tomahawk stopped playback." );
|
notifyUser( Tomahawk::InfoSystem::InfoNowStopped, tr( "%applicationName stopped playback." ) );
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Tomahawk::InfoSystem::InfoNowPlaying:
|
case Tomahawk::InfoSystem::InfoNowPlaying:
|
||||||
|
@@ -127,7 +127,7 @@ FdoNotifyPlugin::pushInfo( Tomahawk::InfoSystem::InfoPushData pushData )
|
|||||||
switch ( pushData.type )
|
switch ( pushData.type )
|
||||||
{
|
{
|
||||||
case Tomahawk::InfoSystem::InfoTrackUnresolved:
|
case Tomahawk::InfoSystem::InfoTrackUnresolved:
|
||||||
notifyUser( tr( "The current track could not be resolved. Tomahawk will pick back up with the next resolvable track from this source." ) );
|
notifyUser( tr( "The current track could not be resolved. %applicationName will pick back up with the next resolvable track from this source." ) );
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Tomahawk::InfoSystem::InfoNotifyUser:
|
case Tomahawk::InfoSystem::InfoNotifyUser:
|
||||||
@@ -135,7 +135,7 @@ FdoNotifyPlugin::pushInfo( Tomahawk::InfoSystem::InfoPushData pushData )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
case Tomahawk::InfoSystem::InfoNowStopped:
|
case Tomahawk::InfoSystem::InfoNowStopped:
|
||||||
notifyUser( tr( "Tomahawk is stopped." ) );
|
notifyUser( tr( "%applicationName is stopped." ) );
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Tomahawk::InfoSystem::InfoNowPlaying:
|
case Tomahawk::InfoSystem::InfoNowPlaying:
|
||||||
@@ -311,7 +311,7 @@ FdoNotifyPlugin::nowPlaying( const QVariant& input )
|
|||||||
TOMAHAWK_APPLICATION_NAME, // app_name
|
TOMAHAWK_APPLICATION_NAME, // app_name
|
||||||
m_nowPlayingId, // notification_id
|
m_nowPlayingId, // notification_id
|
||||||
"", // app_icon
|
"", // app_icon
|
||||||
tr( "Tomahawk - Now Playing" ), // summary
|
tr( "%applicationName - Now Playing" ), // summary
|
||||||
messageText, // body
|
messageText, // body
|
||||||
QStringList(), // actions
|
QStringList(), // actions
|
||||||
hints, // hints
|
hints, // hints
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
set(TOMAHAWK_PLAYDARAPI_LIBRARY_TARGET tomahawk-playdarapi)
|
set(TOMAHAWK_PLAYDARAPI_LIBRARY_TARGET ${TOMAHAWK_TARGET_NAME}-playdarapi)
|
||||||
|
|
||||||
list(APPEND ${TOMAHAWK_PLAYDARAPI_LIBRARY_TARGET}_SOURCES
|
list(APPEND ${TOMAHAWK_PLAYDARAPI_LIBRARY_TARGET}_SOURCES
|
||||||
Api_v1.cpp
|
Api_v1.cpp
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
set(TOMAHAWK_WIDGETS_LIBRARY_TARGET tomahawk-widgets)
|
set(TOMAHAWK_WIDGETS_LIBRARY_TARGET ${TOMAHAWK_TARGET_NAME}-widgets)
|
||||||
|
|
||||||
list(APPEND ${TOMAHAWK_WIDGETS_LIBRARY_TARGET}_SOURCES
|
list(APPEND ${TOMAHAWK_WIDGETS_LIBRARY_TARGET}_SOURCES
|
||||||
PlaylistDelegate.cpp
|
PlaylistDelegate.cpp
|
||||||
|
@@ -113,7 +113,7 @@ ActionCollection::initActions()
|
|||||||
m_actionCollection[ "rescanCollection" ] = new QAction( tr( "Fully &Rescan Collection" ), this );
|
m_actionCollection[ "rescanCollection" ] = new QAction( tr( "Fully &Rescan Collection" ), this );
|
||||||
m_actionCollection[ "showOfflineSources" ] = new QAction( tr( "Show Offline Friends" ), this );
|
m_actionCollection[ "showOfflineSources" ] = new QAction( tr( "Show Offline Friends" ), this );
|
||||||
m_actionCollection[ "showOfflineSources" ]->setCheckable( true );
|
m_actionCollection[ "showOfflineSources" ]->setCheckable( true );
|
||||||
m_actionCollection[ "preferences" ] = new QAction( tr( "&Configure Tomahawk..." ), this );
|
m_actionCollection[ "preferences" ] = new QAction( tr( "&Configure %applicationName..." ), this );
|
||||||
m_actionCollection[ "preferences" ]->setMenuRole( QAction::PreferencesRole );
|
m_actionCollection[ "preferences" ]->setMenuRole( QAction::PreferencesRole );
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
m_actionCollection[ "minimize" ] = new QAction( tr( "Minimize" ), this );
|
m_actionCollection[ "minimize" ] = new QAction( tr( "Minimize" ), this );
|
||||||
@@ -129,7 +129,7 @@ ActionCollection::initActions()
|
|||||||
#endif
|
#endif
|
||||||
m_actionCollection[ "diagnostics" ] = new QAction( tr( "Diagnostics..." ), this );
|
m_actionCollection[ "diagnostics" ] = new QAction( tr( "Diagnostics..." ), this );
|
||||||
m_actionCollection[ "diagnostics" ]->setMenuRole( QAction::ApplicationSpecificRole );
|
m_actionCollection[ "diagnostics" ]->setMenuRole( QAction::ApplicationSpecificRole );
|
||||||
m_actionCollection[ "aboutTomahawk" ] = new QAction( tr( "About &Tomahawk..." ), this );
|
m_actionCollection[ "aboutTomahawk" ] = new QAction( tr( "About &%applicationName..." ), this );
|
||||||
m_actionCollection[ "aboutTomahawk" ]->setMenuRole( QAction::AboutRole );
|
m_actionCollection[ "aboutTomahawk" ]->setMenuRole( QAction::AboutRole );
|
||||||
m_actionCollection[ "legalInfo" ] = new QAction( tr( "&Legal Information..." ), this );
|
m_actionCollection[ "legalInfo" ] = new QAction( tr( "&Legal Information..." ), this );
|
||||||
m_actionCollection[ "legalInfo" ]->setMenuRole( QAction::ApplicationSpecificRole );
|
m_actionCollection[ "legalInfo" ]->setMenuRole( QAction::ApplicationSpecificRole );
|
||||||
@@ -140,7 +140,7 @@ ActionCollection::initActions()
|
|||||||
m_actionCollection[ "checkForUpdates" ]->setMenuRole( QAction::ApplicationSpecificRole );
|
m_actionCollection[ "checkForUpdates" ]->setMenuRole( QAction::ApplicationSpecificRole );
|
||||||
#endif
|
#endif
|
||||||
m_actionCollection[ "crashNow" ] = new QAction( "Crash now...", this );
|
m_actionCollection[ "crashNow" ] = new QAction( "Crash now...", this );
|
||||||
m_actionCollection[ "whatsnew_0_8" ] = new QAction( tr( "0.8" ) , this );
|
m_actionCollection[ "whatsnew_0_8" ] = new QAction( tr( "%applicationName 0.8" ) , this );
|
||||||
m_actionCollection[ "whatsnew_0_8" ]->setMenuRole( QAction::ApplicationSpecificRole );
|
m_actionCollection[ "whatsnew_0_8" ]->setMenuRole( QAction::ApplicationSpecificRole );
|
||||||
m_actionCollection[ "reportBug" ] = new QAction( tr( "Report a Bug" ) , this );
|
m_actionCollection[ "reportBug" ] = new QAction( tr( "Report a Bug" ) , this );
|
||||||
m_actionCollection[ "getSupport" ] = new QAction( tr( "Get Support" ) , this );
|
m_actionCollection[ "getSupport" ] = new QAction( tr( "Get Support" ) , this );
|
||||||
|
@@ -237,6 +237,46 @@ Album::sortname() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString
|
||||||
|
Album::purchaseUrl() const
|
||||||
|
{
|
||||||
|
Q_D( const Album );
|
||||||
|
if ( !d->purchaseUrlLoaded )
|
||||||
|
{
|
||||||
|
Tomahawk::InfoSystem::InfoStringHash albumInfo;
|
||||||
|
albumInfo["artist"] = d->artist->name();
|
||||||
|
albumInfo["album"] = d->name;
|
||||||
|
|
||||||
|
Tomahawk::InfoSystem::InfoRequestData requestData;
|
||||||
|
requestData.caller = infoid();
|
||||||
|
requestData.type = Tomahawk::InfoSystem::InfoAlbumPurchaseUrl;
|
||||||
|
requestData.input = QVariant::fromValue< Tomahawk::InfoSystem::InfoStringHash >( albumInfo );
|
||||||
|
requestData.customData = QVariantMap();
|
||||||
|
requestData.allSources = true;
|
||||||
|
|
||||||
|
connect( Tomahawk::InfoSystem::InfoSystem::instance(),
|
||||||
|
SIGNAL( info( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ),
|
||||||
|
SLOT( infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ) );
|
||||||
|
|
||||||
|
connect( Tomahawk::InfoSystem::InfoSystem::instance(),
|
||||||
|
SIGNAL( finished( QString ) ),
|
||||||
|
SLOT( infoSystemFinished( QString ) ) );
|
||||||
|
|
||||||
|
Tomahawk::InfoSystem::InfoSystem::instance()->getInfo( requestData );
|
||||||
|
}
|
||||||
|
|
||||||
|
return d->purchaseUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
Album::purchased() const
|
||||||
|
{
|
||||||
|
Q_D( const Album );
|
||||||
|
return d->purchased;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
QPixmap
|
QPixmap
|
||||||
Album::cover( const QSize& size, bool forceLoad ) const
|
Album::cover( const QSize& size, bool forceLoad ) const
|
||||||
{
|
{
|
||||||
@@ -318,8 +358,20 @@ void
|
|||||||
Album::infoSystemInfo( const Tomahawk::InfoSystem::InfoRequestData& requestData, const QVariant& output )
|
Album::infoSystemInfo( const Tomahawk::InfoSystem::InfoRequestData& requestData, const QVariant& output )
|
||||||
{
|
{
|
||||||
Q_D( Album );
|
Q_D( Album );
|
||||||
if ( requestData.caller != infoid() ||
|
if ( requestData.caller != infoid() )
|
||||||
requestData.type != Tomahawk::InfoSystem::InfoAlbumCoverArt )
|
return;
|
||||||
|
|
||||||
|
if ( requestData.type == Tomahawk::InfoSystem::InfoAlbumPurchaseUrl && output.isValid() )
|
||||||
|
{
|
||||||
|
QVariantMap returnedData = output.value< QVariantMap >();
|
||||||
|
d->purchaseUrlLoaded = true;
|
||||||
|
d->purchaseUrl = returnedData["url"].toString();
|
||||||
|
d->purchased = returnedData["purchased"].toBool();
|
||||||
|
emit updated();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( requestData.type != Tomahawk::InfoSystem::InfoAlbumCoverArt )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -32,7 +32,6 @@
|
|||||||
|
|
||||||
#include "infosystem/InfoSystem.h"
|
#include "infosystem/InfoSystem.h"
|
||||||
#include "DllMacro.h"
|
#include "DllMacro.h"
|
||||||
#include "Query.h"
|
|
||||||
#include "Typedefs.h"
|
#include "Typedefs.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -61,6 +60,8 @@ public:
|
|||||||
artist_ptr artist() const;
|
artist_ptr artist() const;
|
||||||
QPixmap cover( const QSize& size, bool forceLoad = true ) const;
|
QPixmap cover( const QSize& size, bool forceLoad = true ) const;
|
||||||
bool coverLoaded() const;
|
bool coverLoaded() const;
|
||||||
|
QString purchaseUrl() const;
|
||||||
|
bool purchased() const;
|
||||||
|
|
||||||
QList<Tomahawk::query_ptr> tracks( ModelMode mode = Mixed, const Tomahawk::collection_ptr& collection = Tomahawk::collection_ptr() );
|
QList<Tomahawk::query_ptr> tracks( ModelMode mode = Mixed, const Tomahawk::collection_ptr& collection = Tomahawk::collection_ptr() );
|
||||||
Tomahawk::playlistinterface_ptr playlistInterface( ModelMode mode, const Tomahawk::collection_ptr& collection = Tomahawk::collection_ptr() );
|
Tomahawk::playlistinterface_ptr playlistInterface( ModelMode mode, const Tomahawk::collection_ptr& collection = Tomahawk::collection_ptr() );
|
||||||
|
@@ -36,6 +36,8 @@ public:
|
|||||||
, id( _id )
|
, id( _id )
|
||||||
, name( _name )
|
, name( _name )
|
||||||
, artist( _artist )
|
, artist( _artist )
|
||||||
|
, purchaseUrlLoaded( false )
|
||||||
|
, purchased( false )
|
||||||
, coverLoaded( false )
|
, coverLoaded( false )
|
||||||
, coverLoading( false )
|
, coverLoading( false )
|
||||||
, cover( 0 )
|
, cover( 0 )
|
||||||
@@ -49,6 +51,8 @@ public:
|
|||||||
, id( 0 )
|
, id( 0 )
|
||||||
, name( _name )
|
, name( _name )
|
||||||
, artist( _artist )
|
, artist( _artist )
|
||||||
|
, purchaseUrlLoaded( false )
|
||||||
|
, purchased( false )
|
||||||
, coverLoaded( false )
|
, coverLoaded( false )
|
||||||
, coverLoading( false )
|
, coverLoading( false )
|
||||||
, cover( 0 )
|
, cover( 0 )
|
||||||
@@ -67,6 +71,10 @@ private:
|
|||||||
|
|
||||||
artist_ptr artist;
|
artist_ptr artist;
|
||||||
|
|
||||||
|
mutable bool purchaseUrlLoaded;
|
||||||
|
mutable bool purchased;
|
||||||
|
mutable QString purchaseUrl;
|
||||||
|
|
||||||
mutable bool coverLoaded;
|
mutable bool coverLoaded;
|
||||||
mutable bool coverLoading;
|
mutable bool coverLoading;
|
||||||
mutable QString uuid;
|
mutable QString uuid;
|
||||||
|
@@ -376,6 +376,7 @@ list(APPEND libSources
|
|||||||
utils/GuiHelpers.cpp
|
utils/GuiHelpers.cpp
|
||||||
utils/WeakObjectHash.cpp
|
utils/WeakObjectHash.cpp
|
||||||
utils/WeakObjectList.cpp
|
utils/WeakObjectList.cpp
|
||||||
|
utils/WebPopup.cpp
|
||||||
utils/PluginLoader.cpp
|
utils/PluginLoader.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -493,22 +494,23 @@ qt_wrap_ui(libUI_H ${libUI})
|
|||||||
|
|
||||||
SET( libSources ${libSources} ${libUI_H} )
|
SET( libSources ${libSources} ${libUI_H} )
|
||||||
|
|
||||||
add_library( tomahawklib SHARED ${libSources})
|
add_library( ${TOMAHAWK_LIBRARY} SHARED ${libSources})
|
||||||
set_target_properties(
|
set_target_properties(
|
||||||
tomahawklib
|
${TOMAHAWK_LIBRARY}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
AUTOMOC TRUE
|
AUTOMOC TRUE
|
||||||
VERSION ${TOMAHAWK_VERSION_SHORT}
|
VERSION ${TOMAHAWK_VERSION_SHORT}
|
||||||
SOVERSION ${TOMAHAWK_VERSION_SHORT}
|
SOVERSION ${TOMAHAWK_VERSION_SHORT}
|
||||||
OUTPUT_NAME "tomahawk"
|
OUTPUT_NAME ${TOMAHAWK_TARGET_NAME}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
qt5_use_modules(tomahawklib Widgets Network Sql WebKitWidgets Concurrent Xml UiTools Svg)
|
qt5_use_modules(${TOMAHAWK_LIBRARY} Widgets Network Sql WebKitWidgets Concurrent Xml UiTools Svg)
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
qt5_use_modules(tomahawklib MacExtras)
|
qt5_use_modules(${TOMAHAWK_LIBRARY} MacExtras)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
IF(QCA2_FOUND)
|
IF(QCA2_FOUND)
|
||||||
INCLUDE_DIRECTORIES( ${QCA2_INCLUDE_DIR} )
|
INCLUDE_DIRECTORIES( ${QCA2_INCLUDE_DIR} )
|
||||||
LIST(APPEND LINK_LIBRARIES ${QCA2_LIBRARIES} )
|
LIST(APPEND LINK_LIBRARIES ${QCA2_LIBRARIES} )
|
||||||
@@ -516,10 +518,10 @@ ENDIF(QCA2_FOUND)
|
|||||||
|
|
||||||
IF( UNIX AND NOT APPLE )
|
IF( UNIX AND NOT APPLE )
|
||||||
LIST(APPEND LINK_LIBRARIES ${QT_QTDBUS_LIBRARIES} )
|
LIST(APPEND LINK_LIBRARIES ${QT_QTDBUS_LIBRARIES} )
|
||||||
qt5_use_modules(tomahawklib DBus)
|
qt5_use_modules(${TOMAHAWK_LIBRARY} DBus)
|
||||||
ENDIF( UNIX AND NOT APPLE )
|
ENDIF( UNIX AND NOT APPLE )
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES( tomahawklib
|
TARGET_LINK_LIBRARIES( ${TOMAHAWK_LIBRARY}
|
||||||
LINK_PRIVATE
|
LINK_PRIVATE
|
||||||
${LIBVLC_LIBRARY}
|
${LIBVLC_LIBRARY}
|
||||||
${LIBVLCCORE_LIBRARY}
|
${LIBVLCCORE_LIBRARY}
|
||||||
@@ -549,7 +551,7 @@ TARGET_LINK_LIBRARIES( tomahawklib
|
|||||||
${LINK_LIBRARIES}
|
${LINK_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
INSTALL( TARGETS tomahawklib
|
INSTALL( TARGETS ${TOMAHAWK_LIBRARY}
|
||||||
EXPORT TomahawkLibraryDepends
|
EXPORT TomahawkLibraryDepends
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
@@ -68,6 +68,8 @@ ContextMenu::clear()
|
|||||||
m_queries.clear();
|
m_queries.clear();
|
||||||
m_albums.clear();
|
m_albums.clear();
|
||||||
m_artists.clear();
|
m_artists.clear();
|
||||||
|
|
||||||
|
m_supportedActions = ActionPlay | ActionQueue | ActionPlaylist | ActionCopyLink | ActionLove | ActionStopAfter | ActionPage | ActionEditMetadata | ActionSend;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -124,6 +126,9 @@ ContextMenu::setQueries( const QList<Tomahawk::query_ptr>& queries )
|
|||||||
if ( m_supportedActions & ActionPlay && itemCount() == 1 )
|
if ( m_supportedActions & ActionPlay && itemCount() == 1 )
|
||||||
m_sigmap->setMapping( addAction( ImageRegistry::instance()->icon( RESPATH "images/play.svg" ), tr( "&Play" ) ), ActionPlay );
|
m_sigmap->setMapping( addAction( ImageRegistry::instance()->icon( RESPATH "images/play.svg" ), tr( "&Play" ) ), ActionPlay );
|
||||||
|
|
||||||
|
if ( m_supportedActions & ActionDownload )
|
||||||
|
m_sigmap->setMapping( addAction( ImageRegistry::instance()->icon( RESPATH "images/downloads.svg" ), tr( "Download" ) ), ActionDownload );
|
||||||
|
|
||||||
if ( m_supportedActions & ActionQueue )
|
if ( m_supportedActions & ActionQueue )
|
||||||
m_sigmap->setMapping( addAction( ImageRegistry::instance()->icon( RESPATH "images/queue.svg" ), tr( "Add to &Queue" ) ), ActionQueue );
|
m_sigmap->setMapping( addAction( ImageRegistry::instance()->icon( RESPATH "images/queue.svg" ), tr( "Add to &Queue" ) ), ActionQueue );
|
||||||
|
|
||||||
|
@@ -44,13 +44,14 @@ public:
|
|||||||
ActionLove = 16,
|
ActionLove = 16,
|
||||||
ActionStopAfter = 32,
|
ActionStopAfter = 32,
|
||||||
ActionPage = 64,
|
ActionPage = 64,
|
||||||
ActionTrackPage = 65,
|
ActionTrackPage = 128,
|
||||||
ActionArtistPage = 66,
|
ActionArtistPage = 256,
|
||||||
ActionAlbumPage = 67,
|
ActionAlbumPage = 512,
|
||||||
ActionEditMetadata = 128,
|
ActionEditMetadata = 1024,
|
||||||
ActionPlaylist = 256,
|
ActionPlaylist = 2048,
|
||||||
ActionSend = 512,
|
ActionSend = 4096,
|
||||||
ActionMarkListened = 1024
|
ActionMarkListened = 8192,
|
||||||
|
ActionDownload = 16384
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit ContextMenu( QWidget* parent = 0 );
|
explicit ContextMenu( QWidget* parent = 0 );
|
||||||
|
@@ -88,17 +88,27 @@ DownloadManager::localFileForDownload( const QString& url ) const
|
|||||||
void
|
void
|
||||||
DownloadManager::storeJobs( const QList<downloadjob_ptr>& jobs )
|
DownloadManager::storeJobs( const QList<downloadjob_ptr>& jobs )
|
||||||
{
|
{
|
||||||
|
tDebug() << Q_FUNC_INFO;
|
||||||
QVariantList downloads = TomahawkSettings::instance()->downloadStates();
|
QVariantList downloads = TomahawkSettings::instance()->downloadStates();
|
||||||
foreach ( const downloadjob_ptr& job, jobs )
|
foreach ( const downloadjob_ptr& job, jobs )
|
||||||
{
|
{
|
||||||
if ( job->state() != DownloadJob::Finished )
|
if ( job->state() != DownloadJob::Finished )
|
||||||
continue;
|
continue;
|
||||||
tDebug() << "Storing job:" << job->format().url << job->localFile();
|
tDebug() << Q_FUNC_INFO << "Storing job:" << job->format().url << job->localFile();
|
||||||
QVariantMap map;
|
QVariantMap map;
|
||||||
map[ "url" ] = job->format().url;
|
map[ "url" ] = job->format().url;
|
||||||
map[ "localfile" ] = job->localFile();
|
map[ "localfile" ] = job->localFile();
|
||||||
|
|
||||||
m_downloadStates[ map[ "url" ].toString() ] = map;
|
m_downloadStates[ map[ "url" ].toString() ] = map;
|
||||||
|
|
||||||
|
bool dupe = false;
|
||||||
|
foreach ( const QVariant& m, downloads )
|
||||||
|
{
|
||||||
|
if ( m.toMap()[ "url" ] == map[ "url" ] )
|
||||||
|
dupe = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !dupe )
|
||||||
downloads << map;
|
downloads << map;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,8 +172,8 @@ DownloadManager::addJob( const downloadjob_ptr& job )
|
|||||||
|
|
||||||
connect( job.data(), SIGNAL( finished() ), SLOT( onJobFinished() ) );
|
connect( job.data(), SIGNAL( finished() ), SLOT( onJobFinished() ) );
|
||||||
connect( job.data(), SIGNAL( finished() ), SLOT( checkJobs() ) );
|
connect( job.data(), SIGNAL( finished() ), SLOT( checkJobs() ) );
|
||||||
connect( job.data(), SIGNAL( finished() ), SIGNAL( jobFinished() ) );
|
|
||||||
connect( job.data(), SIGNAL( stateChanged( DownloadJob::TrackState, DownloadJob::TrackState ) ), SLOT( checkJobs() ) ) ;
|
connect( job.data(), SIGNAL( stateChanged( DownloadJob::TrackState, DownloadJob::TrackState ) ), SLOT( checkJobs() ) ) ;
|
||||||
|
// connect( job.data(), SIGNAL( stateChanged( DownloadJob::TrackState, DownloadJob::TrackState ) ), SIGNAL( stateChanged( DownloadJob::TrackState, DownloadJob::TrackState ) ) );
|
||||||
|
|
||||||
checkJobs();
|
checkJobs();
|
||||||
return true;
|
return true;
|
||||||
@@ -226,6 +236,9 @@ DownloadManager::state() const
|
|||||||
|
|
||||||
case DownloadJob::Running:
|
case DownloadJob::Running:
|
||||||
return DownloadManager::Running;
|
return DownloadManager::Running;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -239,10 +252,23 @@ DownloadManager::checkJobs()
|
|||||||
if ( !m_globalState )
|
if ( !m_globalState )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( state() == DownloadManager::Waiting && !currentJob().isNull() )
|
if ( state() == DownloadManager::Waiting )
|
||||||
|
{
|
||||||
|
if ( !currentJob().isNull() )
|
||||||
{
|
{
|
||||||
downloadjob_ptr job = currentJob();
|
downloadjob_ptr job = currentJob();
|
||||||
|
/* connect( job.data(), SIGNAL( finished() ), SLOT( checkJobs() ) );
|
||||||
|
connect( job.data(), SIGNAL( stateChanged( DownloadJob::TrackState, DownloadJob::TrackState ) ), SLOT( checkJobs() ) ) ;
|
||||||
|
connect( job.data(), SIGNAL( stateChanged( DownloadJob::TrackState, DownloadJob::TrackState ) ), SIGNAL( stateChanged( Track::TrackState, Track::TrackState ) ) );*/
|
||||||
|
|
||||||
job->download();
|
job->download();
|
||||||
|
|
||||||
|
emit stateChanged( DownloadManager::Running, DownloadManager::Waiting );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
emit stateChanged( DownloadManager::Waiting , DownloadManager::Running );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -257,9 +283,25 @@ DownloadManager::onJobFinished()
|
|||||||
ScanManager::instance()->runFileScan( files, true );
|
ScanManager::instance()->runFileScan( files, true );
|
||||||
|
|
||||||
Tomahawk::InfoSystem::InfoPushData pushData( "DownloadManager", Tomahawk::InfoSystem::InfoNotifyUser,
|
Tomahawk::InfoSystem::InfoPushData pushData( "DownloadManager", Tomahawk::InfoSystem::InfoNotifyUser,
|
||||||
tr( "Tomahawk finished downloading %1 by %2." ).arg( job->track()->track() ).arg( job->track()->artist() ),
|
tr( "%applicationName finished downloading %1 by %2." ).arg( job->track()->track() ).arg( job->track()->artist() ),
|
||||||
Tomahawk::InfoSystem::PushNoFlag );
|
Tomahawk::InfoSystem::PushNoFlag );
|
||||||
Tomahawk::InfoSystem::InfoSystem::instance()->pushInfo( pushData );
|
Tomahawk::InfoSystem::InfoSystem::instance()->pushInfo( pushData );
|
||||||
|
|
||||||
|
storeJobs( jobs( DownloadJob::Finished ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
DownloadManager::cancelAll()
|
||||||
|
{
|
||||||
|
foreach ( const downloadjob_ptr& job, jobs( DownloadJob::Waiting ) )
|
||||||
|
{
|
||||||
|
removeJob( job );
|
||||||
|
}
|
||||||
|
foreach ( const downloadjob_ptr& job, jobs( DownloadJob::Running ) )
|
||||||
|
{
|
||||||
|
job->abort();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -51,6 +51,7 @@ public slots:
|
|||||||
bool removeJob( const downloadjob_ptr& job );
|
bool removeJob( const downloadjob_ptr& job );
|
||||||
void checkJobs();
|
void checkJobs();
|
||||||
|
|
||||||
|
void cancelAll();
|
||||||
void pause();
|
void pause();
|
||||||
void resume();
|
void resume();
|
||||||
|
|
||||||
@@ -59,7 +60,8 @@ public slots:
|
|||||||
signals:
|
signals:
|
||||||
void jobAdded( const downloadjob_ptr& job );
|
void jobAdded( const downloadjob_ptr& job );
|
||||||
void jobRemoved( const downloadjob_ptr& job );
|
void jobRemoved( const downloadjob_ptr& job );
|
||||||
void jobFinished();
|
|
||||||
|
void stateChanged( DownloadManager::DownloadManagerState newState, DownloadManager::DownloadManagerState oldState );
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void onJobFinished();
|
void onJobFinished();
|
||||||
|
@@ -135,7 +135,7 @@ GlobalActionManager::installResolverFromFile( const QString& resolverPath )
|
|||||||
tr( "Install plug-in" ),
|
tr( "Install plug-in" ),
|
||||||
tr( "<b>%1</b> %2<br/>"
|
tr( "<b>%1</b> %2<br/>"
|
||||||
"by <b>%3</b><br/><br/>"
|
"by <b>%3</b><br/><br/>"
|
||||||
"You are attempting to install a Tomahawk "
|
"You are attempting to install a %applicationName "
|
||||||
"plug-in from an unknown source. Plug-ins from "
|
"plug-in from an unknown source. Plug-ins from "
|
||||||
"untrusted sources may put your data at risk.<br/>"
|
"untrusted sources may put your data at risk.<br/>"
|
||||||
"Do you want to install this plug-in?" )
|
"Do you want to install this plug-in?" )
|
||||||
|
@@ -532,6 +532,9 @@ Result::track() const
|
|||||||
void
|
void
|
||||||
Result::setDownloadFormats( const QList<DownloadFormat>& formats )
|
Result::setDownloadFormats( const QList<DownloadFormat>& formats )
|
||||||
{
|
{
|
||||||
|
if ( formats.isEmpty() )
|
||||||
|
return;
|
||||||
|
|
||||||
m_formats.clear();
|
m_formats.clear();
|
||||||
foreach ( const DownloadFormat& format, formats )
|
foreach ( const DownloadFormat& format, formats )
|
||||||
{
|
{
|
||||||
@@ -574,12 +577,25 @@ Result::toDownloadJob( const DownloadFormat& format )
|
|||||||
{
|
{
|
||||||
m_downloadJob = downloadjob_ptr( new DownloadJob( weakRef().toStrongRef(), format ) );
|
m_downloadJob = downloadjob_ptr( new DownloadJob( weakRef().toStrongRef(), format ) );
|
||||||
connect( m_downloadJob.data(), SIGNAL( progress( int ) ), SIGNAL( updated() ) );
|
connect( m_downloadJob.data(), SIGNAL( progress( int ) ), SIGNAL( updated() ) );
|
||||||
|
connect( m_downloadJob.data(), SIGNAL( stateChanged( DownloadJob::TrackState, DownloadJob::TrackState ) ),
|
||||||
|
SLOT( onDownloadJobStateChanged( DownloadJob::TrackState, DownloadJob::TrackState ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_downloadJob;
|
return m_downloadJob;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
Result::onDownloadJobStateChanged( DownloadJob::TrackState newState, DownloadJob::TrackState oldState )
|
||||||
|
{
|
||||||
|
if ( newState == DownloadJob::Aborted )
|
||||||
|
{
|
||||||
|
m_downloadJob.clear();
|
||||||
|
emit updated();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
QWeakPointer<Result>
|
QWeakPointer<Result>
|
||||||
Result::weakRef()
|
Result::weakRef()
|
||||||
{
|
{
|
||||||
|
@@ -153,6 +153,8 @@ private slots:
|
|||||||
void onResolverRemoved( Tomahawk::Resolver* resolver );
|
void onResolverRemoved( Tomahawk::Resolver* resolver );
|
||||||
void doneEditing();
|
void doneEditing();
|
||||||
|
|
||||||
|
void onDownloadJobStateChanged( DownloadJob::TrackState newState, DownloadJob::TrackState oldState );
|
||||||
|
|
||||||
void onSettingsChanged();
|
void onSettingsChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -473,6 +473,22 @@ AccountManager::localConfigStorage()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Account*
|
||||||
|
AccountManager::accountByFriendlyName( const QString& friendlyName ) const
|
||||||
|
{
|
||||||
|
foreach( Tomahawk::Accounts::Account* curAccount, m_accounts )
|
||||||
|
{
|
||||||
|
// GAH, friendlyname is uservisible and no id ... :-/
|
||||||
|
if ( curAccount->accountFriendlyName() == friendlyName )
|
||||||
|
{
|
||||||
|
return curAccount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
AccountManager::hookupAccount( Account* account ) const
|
AccountManager::hookupAccount( Account* account ) const
|
||||||
{
|
{
|
||||||
|
@@ -98,6 +98,9 @@ public:
|
|||||||
ConfigStorage* configStorageForAccount( const QString& accountId );
|
ConfigStorage* configStorageForAccount( const QString& accountId );
|
||||||
ConfigStorage* localConfigStorage();
|
ConfigStorage* localConfigStorage();
|
||||||
|
|
||||||
|
|
||||||
|
Account* accountByFriendlyName( const QString& friendlyName ) const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void connectAll();
|
void connectAll();
|
||||||
void disconnectAll();
|
void disconnectAll();
|
||||||
|
@@ -20,7 +20,7 @@ if( KDE4_FOUND )
|
|||||||
SOURCES
|
SOURCES
|
||||||
KdeTelepathyConfigWidget.cpp
|
KdeTelepathyConfigWidget.cpp
|
||||||
LINK_LIBRARIES
|
LINK_LIBRARIES
|
||||||
tomahawk_configstorage_telepathy
|
${TOMAHAWK_TARGET_NAME}_configstorage_telepathy
|
||||||
${KDE4_KCMUTILS_LIBS}
|
${KDE4_KCMUTILS_LIBS}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
@@ -133,7 +133,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Right click on any Tomahawk playlist to sync it to Spotify.</string>
|
<string>Right click on any %applicationNames playlist to sync it to Spotify.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<property name="margin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
@@ -186,7 +186,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="deleteOnUnsync">
|
<widget class="QCheckBox" name="deleteOnUnsync">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Delete Tomahawk playlist when removing synchronization</string>
|
<string>Delete %applicationName playlist when removing synchronization</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@@ -909,7 +909,7 @@ AudioEngine::playItem( Tomahawk::playlistinterface_ptr playlist, const Tomahawk:
|
|||||||
}
|
}
|
||||||
|
|
||||||
JobStatusView::instance()->model()->addJob(
|
JobStatusView::instance()->model()->addJob(
|
||||||
new ErrorStatusMessage( tr( "Sorry, Tomahawk couldn't find the track '%1' by %2" ).arg( query->queryTrack()->track() ).arg( query->queryTrack()->artist() ), 15 ) );
|
new ErrorStatusMessage( tr( "Sorry, %applicationName couldn't find the track '%1' by %2" ).arg( query->queryTrack()->track() ).arg( query->queryTrack()->artist() ), 15 ) );
|
||||||
|
|
||||||
if ( isStopped() )
|
if ( isStopped() )
|
||||||
emit stopped(); // we do this so the original caller knows we couldn't find this track
|
emit stopped(); // we do this so the original caller knows we couldn't find this track
|
||||||
@@ -933,7 +933,7 @@ AudioEngine::playItem( const Tomahawk::artist_ptr& artist )
|
|||||||
if ( pli->tracks().isEmpty() )
|
if ( pli->tracks().isEmpty() )
|
||||||
{
|
{
|
||||||
JobStatusView::instance()->model()->addJob(
|
JobStatusView::instance()->model()->addJob(
|
||||||
new ErrorStatusMessage( tr( "Sorry, Tomahawk couldn't find the artist '%1'" ).arg( artist->name() ), 15 ) );
|
new ErrorStatusMessage( tr( "Sorry, %applicationName couldn't find the artist '%1'" ).arg( artist->name() ), 15 ) );
|
||||||
|
|
||||||
if ( isStopped() )
|
if ( isStopped() )
|
||||||
emit stopped(); // we do this so the original caller knows we couldn't find this track
|
emit stopped(); // we do this so the original caller knows we couldn't find this track
|
||||||
@@ -959,7 +959,7 @@ AudioEngine::playItem( const Tomahawk::album_ptr& album )
|
|||||||
if ( pli->tracks().isEmpty() )
|
if ( pli->tracks().isEmpty() )
|
||||||
{
|
{
|
||||||
JobStatusView::instance()->model()->addJob(
|
JobStatusView::instance()->model()->addJob(
|
||||||
new ErrorStatusMessage( tr( "Sorry, Tomahawk couldn't find the album '%1' by %2" ).arg( album->name() ).arg( album->artist()->name() ), 15 ) );
|
new ErrorStatusMessage( tr( "Sorry, %applicationName couldn't find the album '%1' by %2" ).arg( album->name() ).arg( album->artist()->name() ), 15 ) );
|
||||||
|
|
||||||
if ( isStopped() )
|
if ( isStopped() )
|
||||||
emit stopped(); // we do this so the original caller knows we couldn't find this track
|
emit stopped(); // we do this so the original caller knows we couldn't find this track
|
||||||
|
@@ -182,7 +182,7 @@ ACLJobItem::createDelegate( QObject* parent )
|
|||||||
|
|
||||||
m_delegate = new ACLJobDelegate( parent );
|
m_delegate = new ACLJobDelegate( parent );
|
||||||
|
|
||||||
Tomahawk::InfoSystem::InfoPushData pushData( "ACLJobItem", Tomahawk::InfoSystem::InfoNotifyUser, tr( "Tomahawk needs you to decide whether %1 is allowed to connect." ).arg( m_username ), Tomahawk::InfoSystem::PushNoFlag );
|
Tomahawk::InfoSystem::InfoPushData pushData( "ACLJobItem", Tomahawk::InfoSystem::InfoNotifyUser, tr( "%applicationName needs you to decide whether %1 is allowed to connect." ).arg( m_username ), Tomahawk::InfoSystem::PushNoFlag );
|
||||||
Tomahawk::InfoSystem::InfoSystem::instance()->pushInfo( pushData );
|
Tomahawk::InfoSystem::InfoSystem::instance()->pushInfo( pushData );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -22,6 +22,8 @@
|
|||||||
#include <QStackedWidget>
|
#include <QStackedWidget>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
|
#include "DownloadManager.h"
|
||||||
|
#include "Result.h"
|
||||||
#include "audio/AudioEngine.h"
|
#include "audio/AudioEngine.h"
|
||||||
#include "widgets/CaptionLabel.h"
|
#include "widgets/CaptionLabel.h"
|
||||||
#include "playlist/PlayableModel.h"
|
#include "playlist/PlayableModel.h"
|
||||||
@@ -140,6 +142,32 @@ ContextView::setCaption( const QString& caption )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
ContextView::onDownloadAll()
|
||||||
|
{
|
||||||
|
for ( int i = 0; i < m_trackView->proxyModel()->rowCount( QModelIndex() ); i++ )
|
||||||
|
{
|
||||||
|
PlayableItem* item = m_trackView->proxyModel()->itemFromIndex( m_trackView->proxyModel()->mapToSource( m_trackView->proxyModel()->index( i, 0, QModelIndex() ) ) );
|
||||||
|
if ( !item || !item->query() || !item->query()->results().count() )
|
||||||
|
continue;
|
||||||
|
if ( !item->query()->results().first()->downloadFormats().count() )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if ( !DownloadManager::instance()->localFileForDownload( item->query()->results().first()->downloadFormats().first().url.toString() ).isEmpty() )
|
||||||
|
continue;
|
||||||
|
if ( !item->result()->downloadFormats().isEmpty() )
|
||||||
|
DownloadManager::instance()->addJob( item->result()->toDownloadJob( item->result()->downloadFormats().first() ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
ContextView::onDownloadCancel()
|
||||||
|
{
|
||||||
|
DownloadManager::instance()->cancelAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ContextView::onQuerySelected( const Tomahawk::query_ptr& query )
|
ContextView::onQuerySelected( const Tomahawk::query_ptr& query )
|
||||||
{
|
{
|
||||||
@@ -149,6 +177,7 @@ ContextView::onQuerySelected( const Tomahawk::query_ptr& query )
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_query = query;
|
m_query = query;
|
||||||
|
m_detailView->setQuery( m_query );
|
||||||
|
|
||||||
if ( m_query )
|
if ( m_query )
|
||||||
{
|
{
|
||||||
@@ -292,3 +321,10 @@ ContextView::setShowCloseButton( bool b )
|
|||||||
{
|
{
|
||||||
m_captionLabel->setShowCloseButton( b );
|
m_captionLabel->setShowCloseButton( b );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TrackDetailView*
|
||||||
|
ContextView::trackDetailView() const
|
||||||
|
{
|
||||||
|
return m_detailView;
|
||||||
|
}
|
||||||
|
@@ -51,6 +51,7 @@ public:
|
|||||||
|
|
||||||
void setTrackView( TrackView* view );
|
void setTrackView( TrackView* view );
|
||||||
TrackView* trackView() const { return m_trackView; }
|
TrackView* trackView() const { return m_trackView; }
|
||||||
|
TrackDetailView* trackDetailView() const;
|
||||||
|
|
||||||
void setCaption( const QString& caption );
|
void setCaption( const QString& caption );
|
||||||
void setGuid( const QString& guid );
|
void setGuid( const QString& guid );
|
||||||
@@ -73,6 +74,9 @@ private slots:
|
|||||||
void onQuerySelected( const Tomahawk::query_ptr& query );
|
void onQuerySelected( const Tomahawk::query_ptr& query );
|
||||||
void onCoverUpdated();
|
void onCoverUpdated();
|
||||||
|
|
||||||
|
void onDownloadAll();
|
||||||
|
void onDownloadCancel();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CaptionLabel* m_captionLabel;
|
CaptionLabel* m_captionLabel;
|
||||||
TrackView* m_trackView;
|
TrackView* m_trackView;
|
||||||
|
@@ -149,11 +149,11 @@ appConfigDir()
|
|||||||
#else
|
#else
|
||||||
if ( getenv( "XDG_CONFIG_HOME" ) )
|
if ( getenv( "XDG_CONFIG_HOME" ) )
|
||||||
{
|
{
|
||||||
ret = QDir( QString( "%1/Tomahawk" ).arg( getenv( "XDG_CONFIG_HOME" ) ) );
|
ret = QDir( QString( "%1/" TOMAHAWK_APPLICATION_NAME ).arg( getenv( "XDG_CONFIG_HOME" ) ) );
|
||||||
}
|
}
|
||||||
else if ( getenv( "HOME" ) )
|
else if ( getenv( "HOME" ) )
|
||||||
{
|
{
|
||||||
ret = QDir( QString( "%1/.config/Tomahawk" ).arg( getenv( "HOME" ) ) );
|
ret = QDir( QString( "%1/.config/" TOMAHAWK_APPLICATION_NAME ).arg( getenv( "HOME" ) ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -219,7 +219,7 @@ appLogDir()
|
|||||||
const QString
|
const QString
|
||||||
logFilePath()
|
logFilePath()
|
||||||
{
|
{
|
||||||
return TomahawkUtils::appLogDir().filePath( "Tomahawk.log" );
|
return TomahawkUtils::appLogDir().filePath( TOMAHAWK_APPLICATION_NAME ".log" );
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
@@ -651,6 +651,8 @@ operatingSystemVersionDetail()
|
|||||||
version.append( QString( " %1.%2" ).arg( osvi.dwMajorVersion ).arg( osvi.dwMinorVersion ) );
|
version.append( QString( " %1.%2" ).arg( osvi.dwMajorVersion ).arg( osvi.dwMinorVersion ) );
|
||||||
|
|
||||||
return version;
|
return version;
|
||||||
|
#elif defined ( Q_OS_MAC )
|
||||||
|
return "OS X";
|
||||||
#else
|
#else
|
||||||
return "Unknown";
|
return "Unknown";
|
||||||
#endif
|
#endif
|
||||||
@@ -667,6 +669,39 @@ userAgentString( const QString& applicationName, const QString& applicationVersi
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class TomahawkTranslator : public QTranslator
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
TomahawkTranslator( QObject* parent ) : QTranslator( parent )
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||||
|
QString translate( const char * context, const char * sourceText, const char * disambiguation = 0 ) const Q_DECL_OVERRIDE
|
||||||
|
{
|
||||||
|
QString translation = QTranslator::translate( context, sourceText, disambiguation );
|
||||||
|
#else
|
||||||
|
QString translate( const char * context, const char * sourceText, const char * disambiguation = 0, int n = -1) const Q_DECL_OVERRIDE
|
||||||
|
{
|
||||||
|
QString translation = QTranslator::translate( context, sourceText, disambiguation, n );
|
||||||
|
#endif
|
||||||
|
if( translation.isEmpty() )
|
||||||
|
{
|
||||||
|
translation = QString::fromUtf8( sourceText );
|
||||||
|
}
|
||||||
|
|
||||||
|
// // lowercase all strings not on whats new page ...
|
||||||
|
// // TODO: rather scan disambiguation for nolowercase, but too lazy for that right now
|
||||||
|
// if( strcmp( context, "WhatsNewWidget_0_8" ) )
|
||||||
|
// {
|
||||||
|
// translation = translation.toLower();
|
||||||
|
// }
|
||||||
|
|
||||||
|
return translation.replace( "%applicationName", TOMAHAWK_APPLICATION_NAME, Qt::CaseInsensitive );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
installTranslator( QObject* parent )
|
installTranslator( QObject* parent )
|
||||||
{
|
{
|
||||||
@@ -679,7 +714,7 @@ installTranslator( QObject* parent )
|
|||||||
locale = "en";
|
locale = "en";
|
||||||
|
|
||||||
// Tomahawk translations
|
// Tomahawk translations
|
||||||
QTranslator* translator = new QTranslator( parent );
|
QTranslator* translator = new TomahawkTranslator( parent );
|
||||||
if ( translator->load( QString( ":/lang/tomahawk_" ) + locale ) )
|
if ( translator->load( QString( ":/lang/tomahawk_" ) + locale ) )
|
||||||
{
|
{
|
||||||
qDebug() << "Translation: Tomahawk: Using system locale:" << locale;
|
qDebug() << "Translation: Tomahawk: Using system locale:" << locale;
|
||||||
|
61
src/libtomahawk/utils/WebPopup.cpp
Normal file
61
src/libtomahawk/utils/WebPopup.cpp
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||||
|
*
|
||||||
|
* Copyright 2015, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||||
|
* Copyright 2014, Dominik Schmidt <domme@tomahawk-player.org>
|
||||||
|
*
|
||||||
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Tomahawk is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "WebPopup.h"
|
||||||
|
|
||||||
|
#include <QDesktopServices>
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
ExternalBrowserWebPage::acceptNavigationRequest( QWebFrame*, const QNetworkRequest& request, NavigationType )
|
||||||
|
{
|
||||||
|
QDesktopServices::openUrl( request.url() );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
WebPopup::WebPopup( const QUrl& url, const QSize& size )
|
||||||
|
: QWebView( 0 )
|
||||||
|
{
|
||||||
|
setAttribute( Qt::WA_DeleteOnClose, true );
|
||||||
|
settings()->setAttribute( QWebSettings::DeveloperExtrasEnabled, true );
|
||||||
|
settings()->setAttribute( QWebSettings::JavascriptCanCloseWindows, true );
|
||||||
|
page()->mainFrame()->setScrollBarPolicy( Qt::Vertical, Qt::ScrollBarAsNeeded );
|
||||||
|
page()->mainFrame()->setScrollBarPolicy( Qt::Horizontal, Qt::ScrollBarAsNeeded );
|
||||||
|
|
||||||
|
connect( page(), SIGNAL( windowCloseRequested() ), SLOT( close() ) );
|
||||||
|
|
||||||
|
if ( !size.isEmpty() )
|
||||||
|
{
|
||||||
|
resize( size );
|
||||||
|
}
|
||||||
|
|
||||||
|
load( url );
|
||||||
|
show();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QWebView*
|
||||||
|
WebPopup::createWindow( QWebPage::WebWindowType )
|
||||||
|
{
|
||||||
|
QWebView* fakeWindow = new QWebView();
|
||||||
|
fakeWindow->setPage( new ExternalBrowserWebPage( fakeWindow ) );
|
||||||
|
fakeWindow->deleteLater();
|
||||||
|
return fakeWindow;
|
||||||
|
}
|
53
src/libtomahawk/utils/WebPopup.h
Normal file
53
src/libtomahawk/utils/WebPopup.h
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||||
|
*
|
||||||
|
* Copyright 2015, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||||
|
* Copyright 2014, Dominik Schmidt <domme@tomahawk-player.org>
|
||||||
|
*
|
||||||
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Tomahawk is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef WEBPOPUP_H
|
||||||
|
#define WEBPOPUP_H
|
||||||
|
|
||||||
|
#include "DllMacro.h"
|
||||||
|
#include "Typedefs.h"
|
||||||
|
|
||||||
|
#include <QWebView>
|
||||||
|
#include <QWebFrame>
|
||||||
|
|
||||||
|
class ExternalBrowserWebPage : public QWebPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
ExternalBrowserWebPage( QObject* parent )
|
||||||
|
: QWebPage(parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool acceptNavigationRequest( QWebFrame*, const QNetworkRequest& request, NavigationType ) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class WebPopup : public QWebView
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
WebPopup( const QUrl& url, const QSize& size );
|
||||||
|
|
||||||
|
QWebView* createWindow( QWebPage::WebWindowType );
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // WEBPOPUP_H
|
@@ -42,26 +42,21 @@ if( APPLE )
|
|||||||
|
|
||||||
# Use two different sparkle update tracks for debug and release
|
# Use two different sparkle update tracks for debug and release
|
||||||
# We have to change the URL in the Info.plist file :-/
|
# We have to change the URL in the Info.plist file :-/
|
||||||
FILE(READ ${CMAKE_SOURCE_DIR}/admin/mac/Info.plist plist)
|
set(TOMAHAWK_SPARKLE_UPDATE_URL "http://download.tomahawk-player.org/sparkle/update.php")
|
||||||
STRING( REPLACE "TOMAHAWK_VERSION"
|
|
||||||
${TOMAHAWK_VERSION}
|
|
||||||
edited_plist # save in this variable
|
|
||||||
"${plist}" # from the contents of this var
|
|
||||||
)
|
|
||||||
# Disable non-release sparkle for now. We haven't used it yet.
|
# Disable non-release sparkle for now. We haven't used it yet.
|
||||||
# IF( NOT CMAKE_BUILD_TYPE STREQUAL "Release" )
|
# IF( NOT CMAKE_BUILD_TYPE STREQUAL "Release" )
|
||||||
# STRING( REPLACE "http://download.tomahawk-player.org/sparkle" # match this
|
# set(TOMAHAWK_SPARKLE_UPDATE_URL "http://download.tomahawk-player.org/sparkle-debug")
|
||||||
# "http://download.tomahawk-player.org/sparkle-debug" #replace with debug url
|
|
||||||
# edited_plist # save in this variable
|
|
||||||
# "${edited_plist}" # from the contents of this var
|
|
||||||
# )
|
|
||||||
# ENDIF()
|
# ENDIF()
|
||||||
FILE( WRITE ${CMAKE_BINARY_DIR}/Info.plist "${edited_plist}" )
|
|
||||||
|
configure_file(${CMAKE_SOURCE_DIR}/admin/mac/Info.plist ${CMAKE_BINARY_DIR}/Info.plist)
|
||||||
|
|
||||||
|
|
||||||
FILE(COPY ${CMAKE_SOURCE_DIR}/admin/mac/sparkle_pub.pem
|
FILE(COPY ${CMAKE_SOURCE_DIR}/admin/mac/sparkle_pub.pem
|
||||||
DESTINATION "${CMAKE_BINARY_DIR}/Tomahawk.app/Contents/Resources")
|
DESTINATION "${CMAKE_BINARY_DIR}/${TOMAHAWK_APPLICATION_NAME}.app/Contents/Resources")
|
||||||
|
|
||||||
|
FILE(COPY /usr/bin/SetFile DESTINATION "${CMAKE_BINARY_DIR}/${TOMAHAWK_APPLICATION_NAME}.app/Contents/MacOS")
|
||||||
|
FILE(COPY /usr/bin/GetFileInfo DESTINATION "${CMAKE_BINARY_DIR}/${TOMAHAWK_APPLICATION_NAME}.app/Contents/MacOS")
|
||||||
|
|
||||||
FILE(COPY /usr/bin/SetFile DESTINATION "${CMAKE_BINARY_DIR}/Tomahawk.app/Contents/MacOS")
|
|
||||||
FILE(COPY /usr/bin/GetFileInfo DESTINATION "${CMAKE_BINARY_DIR}/Tomahawk.app/Contents/MacOS")
|
|
||||||
|
|
||||||
endif (APPLE)
|
endif (APPLE)
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
PROJECT( tomahawk )
|
PROJECT( tomahawk )
|
||||||
CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
|
CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
|
||||||
|
|
||||||
|
set(TOMAHAWK_APPLICATION_TARGET "tomahahawk-bin")
|
||||||
|
|
||||||
include( AddAppIconMacro )
|
include( AddAppIconMacro )
|
||||||
|
|
||||||
# SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
# SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
||||||
@@ -158,8 +160,8 @@ else()
|
|||||||
set(TOMAHAWK_RUNTIME_OUTPUT_NAME "tomahawk")
|
set(TOMAHAWK_RUNTIME_OUTPUT_NAME "tomahawk")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
ADD_EXECUTABLE( tomahawk_bin WIN32 MACOSX_BUNDLE ${final_src} )
|
ADD_EXECUTABLE( ${TOMAHAWK_APPLICATION_TARGET} WIN32 MACOSX_BUNDLE ${final_src} )
|
||||||
SET_TARGET_PROPERTIES(tomahawk_bin
|
SET_TARGET_PROPERTIES(${TOMAHAWK_APPLICATION_TARGET}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
AUTOMOC TRUE
|
AUTOMOC TRUE
|
||||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_BINARY_DIR}/Info.plist"
|
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_BINARY_DIR}/Info.plist"
|
||||||
@@ -167,12 +169,12 @@ SET_TARGET_PROPERTIES(tomahawk_bin
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
qt5_use_modules(tomahawk_bin Core Widgets Network Sql WebKitWidgets)
|
qt5_use_modules(${TOMAHAWK_APPLICATION_TARGET} Core Widgets Network Sql WebKitWidgets)
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
qt5_use_modules(tomahawk_bin MacExtras)
|
qt5_use_modules(${TOMAHAWK_APPLICATION_TARGET} MacExtras)
|
||||||
endif()
|
endif()
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
qt5_use_modules(tomahawk_bin WinExtras)
|
qt5_use_modules(${TOMAHAWK_APPLICATION_TARGET} WinExtras)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
MESSAGE( STATUS "OS_SPECIFIC_LINK_LIBRARIES: ${OS_SPECIFIC_LINK_LIBRARIES}" )
|
MESSAGE( STATUS "OS_SPECIFIC_LINK_LIBRARIES: ${OS_SPECIFIC_LINK_LIBRARIES}" )
|
||||||
@@ -187,7 +189,7 @@ IF( WITH_CRASHREPORTER )
|
|||||||
LIST(APPEND LINK_LIBRARIES ${LINK_LIBRARIES} crashreporter-handler )
|
LIST(APPEND LINK_LIBRARIES ${LINK_LIBRARIES} crashreporter-handler )
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES( tomahawk_bin
|
TARGET_LINK_LIBRARIES( ${TOMAHAWK_APPLICATION_TARGET}
|
||||||
kdsingleapplicationguard
|
kdsingleapplicationguard
|
||||||
${LINK_LIBRARIES}
|
${LINK_LIBRARIES}
|
||||||
${TOMAHAWK_WIDGETS_LIBRARIES}
|
${TOMAHAWK_WIDGETS_LIBRARIES}
|
||||||
@@ -209,7 +211,7 @@ IF( APPLE )
|
|||||||
ENDIF( HAVE_SPARKLE )
|
ENDIF( HAVE_SPARKLE )
|
||||||
ENDIF( APPLE )
|
ENDIF( APPLE )
|
||||||
|
|
||||||
INSTALL( TARGETS tomahawk_bin BUNDLE DESTINATION . RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
|
INSTALL( TARGETS ${TOMAHAWK_APPLICATION_TARGET} BUNDLE DESTINATION . RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
|
||||||
|
|
||||||
IF( UNIX AND NOT APPLE AND KDE4_INSTALLED AND LEGACY_KDE_INTEGRATION ) #install protocol file
|
IF( UNIX AND NOT APPLE AND KDE4_INSTALLED AND LEGACY_KDE_INTEGRATION ) #install protocol file
|
||||||
FILE( READ ${CMAKE_SOURCE_DIR}/admin/unix/tomahawk.protocol protocol )
|
FILE( READ ${CMAKE_SOURCE_DIR}/admin/unix/tomahawk.protocol protocol )
|
||||||
|
@@ -4,6 +4,8 @@
|
|||||||
#cmakedefine TOMAHAWK_ORGANIZATION_NAME "${TOMAHAWK_ORGANIZATION_NAME}"
|
#cmakedefine TOMAHAWK_ORGANIZATION_NAME "${TOMAHAWK_ORGANIZATION_NAME}"
|
||||||
#cmakedefine TOMAHAWK_ORGANIZATION_DOMAIN "${TOMAHAWK_ORGANIZATION_DOMAIN}"
|
#cmakedefine TOMAHAWK_ORGANIZATION_DOMAIN "${TOMAHAWK_ORGANIZATION_DOMAIN}"
|
||||||
#cmakedefine TOMAHAWK_APPLICATION_NAME "${TOMAHAWK_APPLICATION_NAME}"
|
#cmakedefine TOMAHAWK_APPLICATION_NAME "${TOMAHAWK_APPLICATION_NAME}"
|
||||||
|
#cmakedefine TOMAHAWK_TARGET_NAME "${TOMAHAWK_TARGET_NAME}"
|
||||||
|
#cmakedefine TOMAHAWK_APPLICATION_PACKAGE_NAME "${TOMAHAWK_APPLICATION_PACKAGE_NAME}"
|
||||||
#cmakedefine TOMAHAWK_VERSION "${TOMAHAWK_VERSION}"
|
#cmakedefine TOMAHAWK_VERSION "${TOMAHAWK_VERSION}"
|
||||||
#cmakedefine TOMAHAWK_SYSTEM "${TOMAHAWK_SYSTEM}"
|
#cmakedefine TOMAHAWK_SYSTEM "${TOMAHAWK_SYSTEM}"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user