mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-09-05 19:53:00 +02:00
Compare commits
285 Commits
external-m
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
ad59c9acde | ||
|
2d7b7e4514 | ||
|
c1d9d431fd | ||
|
90ec6f0dc7 | ||
|
115b3f7521 | ||
|
bcd92ed508 | ||
|
6c01a6a997 | ||
|
5b6aecd8d0 | ||
|
77acc1cd66 | ||
|
4d3ee34903 | ||
|
4ee462db4c | ||
|
57c387bba5 | ||
|
d693bbf33f | ||
|
4fb44c931b | ||
|
27e8a665cf | ||
|
fdca99e57d | ||
|
e3bb74ce25 | ||
|
4aa06f524c | ||
|
8c3dc90f76 | ||
|
ba5759d453 | ||
|
18b42539e4 | ||
|
299f033ef9 | ||
|
777b312191 | ||
|
1ab3ed9f93 | ||
|
9327204c78 | ||
|
60672e2d0c | ||
|
4375c8e0c4 | ||
|
092313cd7f | ||
|
783e853c2a | ||
|
368032f399 | ||
|
ec2b9d84eb | ||
|
378f8262cf | ||
|
3f012ac9f8 | ||
|
d7cc6b5719 | ||
|
d5c8026a9e | ||
|
0ec2df0ac6 | ||
|
84ec28e476 | ||
|
62feb25f5c | ||
|
80d2fa48ec | ||
|
4815dd78c1 | ||
|
3b1e0b3cf1 | ||
|
a563993b71 | ||
|
57bc920534 | ||
|
be919f74f9 | ||
|
bdc3238e6e | ||
|
333806ef4a | ||
|
084084db22 | ||
|
a6cb6a92e6 | ||
|
2b95da1a32 | ||
|
25da5bdbc5 | ||
|
d7b9c5464d | ||
|
d96dc74353 | ||
|
73091bec21 | ||
|
021223f6cc | ||
|
7302047e9a | ||
|
119a7ebdb8 | ||
|
af0cb18972 | ||
|
34c1f88171 | ||
|
00f602e102 | ||
|
c838959248 | ||
|
97a407f837 | ||
|
3b6ba36e83 | ||
|
cf6a37ae45 | ||
|
690a87f1eb | ||
|
6842da7240 | ||
|
6910e5dd3b | ||
|
584aa76582 | ||
|
7e96285132 | ||
|
c996a8b90e | ||
|
c705013ee1 | ||
|
84360aed2f | ||
|
ada03e1a8d | ||
|
3a71da5705 | ||
|
214e310c91 | ||
|
ed9a027644 | ||
|
3e2d74128d | ||
|
84ed59f4be | ||
|
5dd36cbd4e | ||
|
7e38d94fe5 | ||
|
28ee9180c8 | ||
|
09e9a6e960 | ||
|
ffa098e52d | ||
|
a439427ca5 | ||
|
a9505f75c5 | ||
|
7e54e506df | ||
|
abc00b4758 | ||
|
77e9b69679 | ||
|
58b640d389 | ||
|
1a5f073437 | ||
|
c9ef7e74d8 | ||
|
34448b1b46 | ||
|
4408ba275c | ||
|
dfd71d7010 | ||
|
170e2e1c86 | ||
|
0047763188 | ||
|
525068a706 | ||
|
85657e40a6 | ||
|
af459afb0b | ||
|
5bbc39e6a5 | ||
|
c88640268a | ||
|
8749a04e23 | ||
|
d45917d14a | ||
|
c87b1390e5 | ||
|
bf28f6856e | ||
|
ceab0f9cf2 | ||
|
a562e75937 | ||
|
81eb226146 | ||
|
ec88cf27f3 | ||
|
931562fbe5 | ||
|
77593e32a7 | ||
|
bac38e4555 | ||
|
980ee97c97 | ||
|
26ad51f4b8 | ||
|
21bdb0bc89 | ||
|
0a560f2f27 | ||
|
9c9f5e4dae | ||
|
fb38735936 | ||
|
c62ae52bfe | ||
|
0341492069 | ||
|
879df894c3 | ||
|
0c9f1be2c8 | ||
|
f7a3d441a1 | ||
|
e9a1135525 | ||
|
bdce4f7636 | ||
|
de65e19cb7 | ||
|
ce3647a4a6 | ||
|
f498570a0e | ||
|
9a741cd2db | ||
|
102c9c6846 | ||
|
1fa35ae827 | ||
|
26c0f35d21 | ||
|
9acbb48659 | ||
|
cc9f287b41 | ||
|
99abd7434b | ||
|
f38f3ca367 | ||
|
773ecea0da | ||
|
620d3fe3fc | ||
|
8679fd5055 | ||
|
d7eccea4c0 | ||
|
2ab9418a9e | ||
|
285333d43b | ||
|
3bcf854a4f | ||
|
61a15cafac | ||
|
2d141ccb5e | ||
|
4c023b7d2f | ||
|
ceb5dc6aa4 | ||
|
13fa9c7c53 | ||
|
4c946b304c | ||
|
5075c9ddbf | ||
|
8b3a916aa6 | ||
|
cd412add8f | ||
|
68851843f5 | ||
|
af8811af30 | ||
|
fa38ed5e91 | ||
|
b7ff630808 | ||
|
196256d77b | ||
|
79cd3a7f0a | ||
|
f0f45673b1 | ||
|
86cd7c1be0 | ||
|
f74c6ae429 | ||
|
015b24479c | ||
|
8b904cf806 | ||
|
175e498c43 | ||
|
65908f9dfa | ||
|
3c9deb6389 | ||
|
978c1e58de | ||
|
0722dd7812 | ||
|
ff34afb4e3 | ||
|
bd607b6c54 | ||
|
81f7e3f8f4 | ||
|
798ca62190 | ||
|
f2631cda74 | ||
|
4813698a9a | ||
|
dc80d19a08 | ||
|
93745b19ef | ||
|
1b7b7ca4b3 | ||
|
3808e230d4 | ||
|
0bdb8061e2 | ||
|
87278456f4 | ||
|
a5693d6663 | ||
|
6416b34e8c | ||
|
f95bd4aab8 | ||
|
996d112ebb | ||
|
fc413ac103 | ||
|
2020aad725 | ||
|
198201aec2 | ||
|
6b84630ba1 | ||
|
205dfca60d | ||
|
ca2da81132 | ||
|
08004ddbd4 | ||
|
4dadbb5acd | ||
|
dee504c997 | ||
|
81dae62349 | ||
|
3c00f36df6 | ||
|
f13ea2f6df | ||
|
2f4eb75745 | ||
|
942eded60d | ||
|
1b2ec05ea3 | ||
|
3875b10bb4 | ||
|
f396f59922 | ||
|
7271a95942 | ||
|
9737b7a8bc | ||
|
d87f966d9e | ||
|
cb3ccd5a76 | ||
|
f81858e28a | ||
|
8fbc0319ba | ||
|
e7d83835d2 | ||
|
6035889b90 | ||
|
2bb0113515 | ||
|
8ee8721dda | ||
|
293b3b1b4f | ||
|
ba0cc1a00c | ||
|
759bfbe63b | ||
|
e3877bf0bf | ||
|
f1cf645f31 | ||
|
62dea3a196 | ||
|
09f68fa2f5 | ||
|
944827c48c | ||
|
771b2f5ae1 | ||
|
d50c16740a | ||
|
a5968b58e5 | ||
|
5f20308177 | ||
|
1710813dc8 | ||
|
7fd306ca07 | ||
|
bdaf1ef2f4 | ||
|
c068d8c9e3 | ||
|
1e6b8b3747 | ||
|
0535d09f08 | ||
|
c93302c563 | ||
|
1192c668b0 | ||
|
53b27d0ea1 | ||
|
9ebe155313 | ||
|
ddf030037e | ||
|
5d950bd139 | ||
|
eab1ccee74 | ||
|
1025e77d3e | ||
|
53de4319b6 | ||
|
4eee01d8bf | ||
|
5bd69fe09c | ||
|
0585acc869 | ||
|
8c8cd88388 | ||
|
9e91ad6549 | ||
|
192627a4ea | ||
|
ee1f19c34e | ||
|
a41af0ed7f | ||
|
feffda8339 | ||
|
4b7f8929fd | ||
|
acdd0e3b9f | ||
|
4ba32e0add | ||
|
9b1b7be207 | ||
|
d7e5ce6e4e | ||
|
684e5f3a58 | ||
|
3d0584a351 | ||
|
2a43e9aba5 | ||
|
cde395edf0 | ||
|
5aa875c40a | ||
|
e4146c98c7 | ||
|
d2dc01e6a3 | ||
|
8fbd3b9872 | ||
|
ac4debbe02 | ||
|
c4197374ca | ||
|
a36287c2ed | ||
|
0223fd5992 | ||
|
66a2d3cb88 | ||
|
75427a7af2 | ||
|
92c66d7252 | ||
|
2afc578d7a | ||
|
0791937032 | ||
|
45c96e7367 | ||
|
4d351168da | ||
|
86f08b307e | ||
|
99fe5c8e8e | ||
|
daf3034d99 | ||
|
ca379868dc | ||
|
cf7194407b | ||
|
365a021a29 | ||
|
c39750d814 | ||
|
6d12f03023 | ||
|
e4f55da2b2 | ||
|
f3021e4d71 | ||
|
c577073f57 | ||
|
e746b4c3e9 | ||
|
1b0517efc5 | ||
|
e6a8a41c31 | ||
|
193beda2bc |
16
.github/workflows/ccpp.yml
vendored
Normal file
16
.github/workflows/ccpp.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
name: C/C++ CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: tomahawkmusicplayer/ubuntu:latest
|
||||
env:
|
||||
MIX_ENV: test
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@master
|
||||
- name: Build and test
|
||||
run: /usr/local/bin/build-and-test.sh
|
269
CMakeLists.txt
269
CMakeLists.txt
@@ -2,17 +2,25 @@ PROJECT( tomahawk )
|
||||
CMAKE_MINIMUM_REQUIRED( VERSION 2.8.12 )
|
||||
CMAKE_POLICY(SET CMP0017 NEW)
|
||||
CMAKE_POLICY(SET CMP0022 NEW)
|
||||
IF(POLICY CMP0075)
|
||||
CMAKE_POLICY(SET CMP0075 NEW)
|
||||
ENDIF()
|
||||
|
||||
# TODO:
|
||||
# Update to NEW and fix things up
|
||||
CMAKE_POLICY(SET CMP0023 OLD)
|
||||
CMAKE_POLICY(SET CMP0023 NEW)
|
||||
|
||||
# Let AUTOMOC and AUTOUIC process generated files
|
||||
IF(POLICY CMP0071)
|
||||
CMAKE_POLICY(SET CMP0071 NEW)
|
||||
ENDIF()
|
||||
|
||||
# TODO:
|
||||
# Disable automatic qtmain linking
|
||||
CMAKE_POLICY(SET CMP0020 OLD)
|
||||
|
||||
find_package(ECM 1.7.0 REQUIRED NO_MODULE)
|
||||
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules" )
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules" ${ECM_MODULE_PATH})
|
||||
|
||||
|
||||
|
||||
@@ -89,8 +97,7 @@ endif()
|
||||
option(BUILD_GUI "Build Tomahawk with GUI" ON)
|
||||
option(BUILD_TESTS "Build Tomahawk with unit tests" ${BUILD_NO_RELEASE})
|
||||
option(BUILD_TOOLS "Build Tomahawk helper tools" ${BUILD_NO_RELEASE})
|
||||
option(BUILD_HATCHET "Build the Hatchet plugin" ON)
|
||||
option(BUILD_WITH_QT4 "Build Tomahawk with Qt4 instead of Qt5" OFF)
|
||||
option(BUILD_HATCHET "Build the Hatchet plugin" OFF)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(CRASHREPORTER_ENABLED_BY_DEFAULT OFF)
|
||||
@@ -99,8 +106,6 @@ else()
|
||||
endif()
|
||||
option(WITH_CRASHREPORTER "Build with CrashReporter" ${CRASHREPORTER_ENABLED_BY_DEFAULT})
|
||||
option(WITH_BINARY_ATTICA "Enable support for downloading binary resolvers automatically" ON)
|
||||
option(LEGACY_KDE_INTEGRATION "Install tomahawk.protocol file, deprecated since 4.6.0" OFF)
|
||||
option(WITH_KDE4 "Build with support for KDE specific stuff" ON)
|
||||
|
||||
# build options for development purposes
|
||||
option(SANITIZE_ADDRESS "Enable Address Sanitizer for memory error detection" OFF)
|
||||
@@ -161,159 +166,45 @@ INCLUDE( MacroLogFeature )
|
||||
|
||||
message( STATUS "Building Tomahawk ${TOMAHAWK_VERSION} ***" )
|
||||
|
||||
if( NOT BUILD_WITH_QT4 )
|
||||
find_package(Qt5Core QUIET)
|
||||
if( Qt5Core_DIR )
|
||||
# CMAKE 2.8.13+/3.0.0+ requires these for IMPORTed targets
|
||||
find_package(Qt5Concurrent REQUIRED)
|
||||
find_package(Qt5Svg REQUIRED)
|
||||
find_package(Qt5UiTools REQUIRED)
|
||||
find_package(Qt5WebKitWidgets REQUIRED)
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
find_package(Qt5Xml REQUIRED)
|
||||
find_package(Qt5X11Extras NO_MODULE QUIET)
|
||||
find_package(Qt5Core REQUIRED)
|
||||
find_package(Qt5Concurrent REQUIRED)
|
||||
find_package(Qt5Gui REQUIRED)
|
||||
find_package(Qt5Network REQUIRED)
|
||||
find_package(Qt5Sql REQUIRED)
|
||||
find_package(Qt5Svg REQUIRED)
|
||||
find_package(Qt5UiTools REQUIRED)
|
||||
find_package(Qt5WebKitWidgets REQUIRED)
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
find_package(Qt5Xml REQUIRED)
|
||||
find_package(Qt5X11Extras NO_MODULE QUIET)
|
||||
|
||||
if(Qt5X11Extras_FOUND)
|
||||
set(HAVE_X11 TRUE)
|
||||
else()
|
||||
set(HAVE_X11 FALSE)
|
||||
endif()
|
||||
|
||||
message(STATUS "Found Qt5! Be aware that Qt5-support is still experimental and not officially supported!")
|
||||
|
||||
if( UNIX AND NOT APPLE )
|
||||
# We need this to find the paths to qdbusxml2cpp and co
|
||||
find_package(Qt5DBus REQUIRED)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
find_package(Qt5MacExtras REQUIRED)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
find_package(Qt5WinExtras REQUIRED)
|
||||
endif()
|
||||
|
||||
macro(qt_wrap_ui)
|
||||
qt5_wrap_ui(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(qt_add_resources)
|
||||
qt5_add_resources(${ARGN})
|
||||
endmacro()
|
||||
|
||||
find_package(Qt5LinguistTools REQUIRED)
|
||||
macro(qt_add_translation)
|
||||
qt5_add_translation(${ARGN})
|
||||
endmacro()
|
||||
|
||||
if( UNIX AND NOT APPLE )
|
||||
macro(qt_add_dbus_interface)
|
||||
qt5_add_dbus_interface(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(qt_add_dbus_adaptor)
|
||||
qt5_add_dbus_adaptor(${ARGN})
|
||||
endmacro()
|
||||
endif()
|
||||
|
||||
macro(setup_qt)
|
||||
endmacro()
|
||||
|
||||
set(QT_RCC_EXECUTABLE "${Qt5Core_RCC_EXECUTABLE}")
|
||||
#FIXME: CrashReporter depends on deprecated QHttp
|
||||
set(WITH_KDE4 OFF)
|
||||
endif()
|
||||
endif()
|
||||
if( NOT Qt5Core_DIR )
|
||||
message(STATUS "Could not find Qt5, searching for Qt4 instead...")
|
||||
|
||||
set(NEEDED_QT4_COMPONENTS "QtCore" "QtXml" "QtNetwork")
|
||||
if( BUILD_GUI )
|
||||
list(APPEND NEEDED_QT4_COMPONENTS "QtGui" "QtWebkit" "QtUiTools" "QtSvg")
|
||||
endif()
|
||||
if( BUILD_TESTS )
|
||||
list(APPEND NEEDED_QT4_COMPONENTS "QtTest")
|
||||
endif()
|
||||
|
||||
macro_optional_find_package(Qt4 4.7.0 COMPONENTS ${NEEDED_QT4_COMPONENTS} )
|
||||
macro_log_feature(QT4_FOUND "Qt" "A cross-platform application and UI framework" "http://qt-project.org" TRUE "" "If you see this, although libqt4-devel is installed, check whether the \n qtwebkit-devel package and whatever contains QtUiTools is installed too")
|
||||
|
||||
macro(qt5_use_modules)
|
||||
endmacro()
|
||||
|
||||
macro(qt_wrap_ui)
|
||||
qt4_wrap_ui(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(qt_add_resources)
|
||||
qt4_add_resources(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(qt_add_translation)
|
||||
qt4_add_translation(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(qt_add_dbus_interface)
|
||||
qt4_add_dbus_interface(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(qt_add_dbus_adaptor)
|
||||
qt4_add_dbus_adaptor(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(setup_qt)
|
||||
if( NOT BUILD_GUI )
|
||||
set(QT_DONT_USE_QTGUI TRUE)
|
||||
endif()
|
||||
if( UNIX AND NOT APPLE )
|
||||
set(QT_USE_QTDBUS TRUE)
|
||||
endif()
|
||||
set(QT_USE_QTSQL TRUE)
|
||||
set(QT_USE_QTNETWORK TRUE)
|
||||
set(QT_USE_QTXML TRUE)
|
||||
set(QT_USE_QTWEBKIT TRUE)
|
||||
|
||||
include( ${QT_USE_FILE} )
|
||||
endmacro()
|
||||
|
||||
# Qt5 C++11 Macros not defined within Qt4
|
||||
# TODO: Add C++11 support
|
||||
tomahawk_add_definitions( "-DQ_DECL_FINAL=" )
|
||||
tomahawk_add_definitions( "-DQ_DECL_OVERRIDE=" )
|
||||
endif()
|
||||
|
||||
if( Qt5Core_DIR )
|
||||
set( TOMAHAWK_QT5_TMP TRUE)
|
||||
else( Qt5Core_DIR )
|
||||
set( TOMAHAWK_QT5_TMP FALSE )
|
||||
endif( Qt5Core_DIR )
|
||||
set( TOMAHAWK_QT5 ${TOMAHAWK_QT5_TMP} CACHE BOOL "Build Tomahawk with Qt5")
|
||||
|
||||
if( BUILD_GUI AND UNIX AND NOT APPLE )
|
||||
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")
|
||||
endif()
|
||||
|
||||
include(CheckCXXCompilerFlag)
|
||||
check_cxx_compiler_flag( "-std=c++11" CXX11_FOUND )
|
||||
check_cxx_compiler_flag( "-std=c++0x" CXX0X_FOUND )
|
||||
check_cxx_compiler_flag( "-stdlib=libc++" LIBCPP_FOUND )
|
||||
if(CXX11_FOUND)
|
||||
tomahawk_add_cxx_flags( "-std=c++11" )
|
||||
elseif(CXX0X_FOUND)
|
||||
tomahawk_add_cxx_flags( "-std=c++0x" )
|
||||
if(Qt5X11Extras_FOUND)
|
||||
set(HAVE_X11 TRUE)
|
||||
else()
|
||||
message(STATUS "${CMAKE_CXX_COMPILER} does not support C++11, please use a
|
||||
different compiler")
|
||||
endif()
|
||||
if(LIBCPP_FOUND AND APPLE)
|
||||
tomahawk_add_cxx_flags( "-stdlib=libc++" )
|
||||
set(HAVE_X11 FALSE)
|
||||
endif()
|
||||
|
||||
if( UNIX AND NOT APPLE )
|
||||
# We need this to find the paths to qdbusxml2cpp and co
|
||||
find_package(Qt5DBus REQUIRED)
|
||||
endif()
|
||||
|
||||
macro_optional_find_package(Echonest 2.3.0)
|
||||
macro_log_feature(ECHONEST_FOUND "Echonest" "Qt library for communicating with The Echo Nest" "http://projects.kde.org/libechonest" TRUE "" "libechonest 2.3.0 is needed for dynamic playlists and the infosystem")
|
||||
if(APPLE)
|
||||
find_package(Qt5MacExtras REQUIRED)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
find_package(Qt5WinExtras REQUIRED)
|
||||
endif()
|
||||
|
||||
find_package(Qt5LinguistTools REQUIRED)
|
||||
|
||||
set(QT_RCC_EXECUTABLE "${Qt5Core_RCC_EXECUTABLE}")
|
||||
# FIXME: CrashReporter depends on deprecated QHttp
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
find_package(Boost REQUIRED COMPONENTS filesystem system)
|
||||
macro_log_feature(Boost_FOUND "Boost" "Provides free peer-reviewed portable C++ source libraries" "http://www.boost.org" TRUE "" "") #FIXME: give useful explanation
|
||||
@@ -321,15 +212,7 @@ macro_log_feature(Boost_FOUND "Boost" "Provides free peer-reviewed portable C++
|
||||
macro_optional_find_package(Lucene++ 3.0.0)
|
||||
macro_log_feature(LUCENEPP_FOUND "Lucene++" "The open-source, C++ search engine" "https://github.com/luceneplusplus/LucenePlusPlus/" TRUE "" "Lucene++ is used for indexing the collection")
|
||||
|
||||
if( NOT TOMAHAWK_QT5 )
|
||||
macro_optional_find_package(QJSON 0.8.1)
|
||||
macro_log_feature(QJSON_FOUND "QJson" "Qt library that maps JSON data to QVariant objects" "http://qjson.sf.net" TRUE "" "libqjson is used for encoding communication between Tomahawk instances")
|
||||
ENDIF()
|
||||
|
||||
macro_optional_find_package(Taglib 1.8.0)
|
||||
macro_log_feature(TAGLIB_FOUND "TagLib" "Audio Meta-Data Library" "http://developer.kde.org/~wheeler/taglib.html" TRUE "" "taglib is needed for reading meta data from audio files")
|
||||
include( CheckTagLibFileName )
|
||||
check_taglib_filename( COMPLEX_TAGLIB_FILENAME )
|
||||
find_package(Taglib 1.8.0 REQUIRED)
|
||||
|
||||
macro_optional_find_package(Sparsehash)
|
||||
macro_log_feature(SPARSEHASH_FOUND "Sparsehash"
|
||||
@@ -344,23 +227,15 @@ macro_log_feature(GNUTLS_FOUND "GnuTLS"
|
||||
"http://gnutls.org/" TRUE ""
|
||||
"GnuTLS is needed for serving the Playdar/HTTP API via TLS")
|
||||
|
||||
if( TOMAHAWK_QT5 )
|
||||
macro_optional_find_package(Qca-qt5)
|
||||
if(Qca-qt5_DIR)
|
||||
set(QCA2_FOUND ON CACHE BOOL "QCA2 was found")
|
||||
set(QCA2_LIBRARIES "qca-qt5" CACHE STRING "QCA2 Qt5 target")
|
||||
endif()
|
||||
else()
|
||||
macro_optional_find_package(QCA2)
|
||||
macro_optional_find_package(Qca-qt5)
|
||||
if(Qca-qt5_DIR)
|
||||
set(QCA2_FOUND ON CACHE BOOL "QCA2 was found")
|
||||
set(QCA2_LIBRARIES "qca-qt5" CACHE STRING "QCA2 Qt5 target")
|
||||
endif()
|
||||
macro_log_feature(QCA2_FOUND "QCA2" "Provides encryption and signing functions necessary for some resolvers and accounts" "http://delta.affinix.com/qca/" TRUE "" "")
|
||||
|
||||
if( TOMAHAWK_QT5 )
|
||||
macro_optional_find_package(KF5Attica 1.0.0)
|
||||
set(LIBATTICA_FOUND ${KF5Attica_FOUND})
|
||||
else()
|
||||
macro_optional_find_package(LibAttica 0.4.0)
|
||||
endif()
|
||||
macro_optional_find_package(KF5Attica 1.0.0)
|
||||
set(LIBATTICA_FOUND ${KF5Attica_FOUND})
|
||||
macro_log_feature(LIBATTICA_FOUND "libattica" "Provides support for installation of resolvers from the Tomahawk website" "http://download.kde.org/stable/attica/" TRUE "" "")
|
||||
|
||||
macro_optional_find_package(QuaZip)
|
||||
@@ -376,21 +251,13 @@ macro_optional_find_package(LibLastFm 1.0.0)
|
||||
macro_log_feature(LIBLASTFM_FOUND "liblastfm" "Qt library for the Last.fm webservices" "https://github.com/lastfm/liblastfm" TRUE "" "liblastfm is needed for scrobbling tracks to Last.fm and fetching cover artwork")
|
||||
|
||||
if( NOT APPLE )
|
||||
if( TOMAHAWK_QT5 )
|
||||
macro_optional_find_package(Qt5Keychain 0.1.0)
|
||||
else()
|
||||
macro_optional_find_package(QtKeychain 0.1.0)
|
||||
endif()
|
||||
macro_log_feature(QTKEYCHAIN_FOUND "QtKeychain" "Provides support for secure credentials storage" "https://github.com/frankosterfeld/qtkeychain" TRUE "" "")
|
||||
macro_optional_find_package(Qt5Keychain 0.1.0)
|
||||
macro_log_feature(Qt5Keychain_FOUND "QtKeychain" "Provides support for secure credentials storage" "https://github.com/frankosterfeld/qtkeychain" TRUE "" "")
|
||||
endif()
|
||||
|
||||
if( UNIX AND NOT APPLE )
|
||||
macro_optional_find_package(TelepathyQt 0.9.3)
|
||||
if ( TOMAHAWK_QT5 )
|
||||
macro_log_feature(TelepathyQt5_FOUND "Telepathy-Qt" "Telepathy-Qt is a Qt high-level binding for Telepathy, a D-Bus framework for unifying real time communication." FALSE "" "Telepathy-Qt is needed for sharing Jabber/GTalk accounts with Telepathy.\n")
|
||||
else ( TOMAHAWK_QT5)
|
||||
macro_log_feature(TelepathyQt4_FOUND "Telepathy-Qt" "Telepathy-Qt is a Qt high-level binding for Telepathy, a D-Bus framework for unifying real time communication." FALSE "" "Telepathy-Qt is needed for sharing Jabber/GTalk accounts with Telepathy.\n")
|
||||
endif()
|
||||
macro_log_feature(TelepathyQt5_FOUND "Telepathy-Qt" "Telepathy-Qt is a Qt high-level binding for Telepathy, a D-Bus framework for unifying real time communication." FALSE "" "Telepathy-Qt is needed for sharing Jabber/GTalk accounts with Telepathy.\n")
|
||||
endif()
|
||||
|
||||
# we need pthreads too
|
||||
@@ -404,7 +271,7 @@ if( WIN32 )
|
||||
endif( WIN32 )
|
||||
|
||||
if( WIN32 OR APPLE )
|
||||
macro_optional_find_package(LibsnoreQt5 0.5.70 QUIET)
|
||||
macro_optional_find_package(LibsnoreQt5 0.6.0 QUIET)
|
||||
macro_log_feature(LibsnoreQt5_FOUND "Libsnore" "Library for notifications" "https://projects.kde.org/projects/playground/libs/snorenotify" FALSE "" "")
|
||||
endif()
|
||||
|
||||
@@ -435,23 +302,7 @@ add_subdirectory(${THIRDPARTY_DIR}/libportfwd)
|
||||
|
||||
#### submodules end
|
||||
|
||||
|
||||
if (WITH_KDE4)
|
||||
macro_optional_find_package(KDE4)
|
||||
macro_optional_find_package(KDE4Installed)
|
||||
endif(WITH_KDE4)
|
||||
macro_log_feature(KDE4_FOUND "KDE4" "Provides support for configuring Telepathy Accounts from inside Tomahawk" "https://www.kde.org" FALSE "" "")
|
||||
|
||||
IF( KDE4_FOUND )
|
||||
IF( CMAKE_C_FLAGS )
|
||||
# KDE4 adds and removes some compiler flags that we don't like
|
||||
# (only for gcc not for clang e.g.)
|
||||
STRING( REPLACE "-std=iso9899:1990" "" CLEAN_C_FLAGS ${CMAKE_C_FLAGS} )
|
||||
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions" )
|
||||
ENDIF()
|
||||
ELSE()
|
||||
SET( CLEAN_C_FLAGS ${CMAKE_C_FLAGS} )
|
||||
ENDIF()
|
||||
SET( CLEAN_C_FLAGS ${CMAKE_C_FLAGS} )
|
||||
|
||||
#show dep log
|
||||
macro_display_feature_log()
|
||||
@@ -464,11 +315,6 @@ CONFIGURE_FILE(
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||
IMMEDIATE @ONLY)
|
||||
|
||||
# KDE4 defines an uninstall target for us automatically (and at least with Qt4 Phonon does as well no matter if kdelibs was found)
|
||||
# IF( NOT KDE4_FOUND )
|
||||
# ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
|
||||
# ENDIF()
|
||||
|
||||
IF( ( NOT APPLE ) AND ( NOT SANITIZE_ADDRESS ))
|
||||
# Make linking as strict on linux as it is on osx. Then we don't break linking on mac so often
|
||||
#
|
||||
@@ -498,6 +344,7 @@ ADD_SUBDIRECTORY( src )
|
||||
ADD_SUBDIRECTORY( admin )
|
||||
|
||||
IF(BUILD_TESTS)
|
||||
find_package(Qt5Test REQUIRED)
|
||||
enable_testing()
|
||||
ADD_SUBDIRECTORY( src/tests )
|
||||
ENDIF()
|
||||
|
@@ -1,15 +0,0 @@
|
||||
# taglib changed filenames to be a char/wchar struct on some platforms, need to check for it
|
||||
macro (CHECK_TAGLIB_FILENAME TAGLIB_FILENAME_COMPLEX)
|
||||
include (CheckCXXSourceCompiles)
|
||||
set (CMAKE_REQUIRED_FLAGS ${TAGLIB_CFLAGS})
|
||||
set (CMAKE_REQUIRED_INCLUDES ${TAGLIB_INCLUDES})
|
||||
set (CMAKE_REQUIRED_LIBRARIES ${TAGLIB_LIBRARIES})
|
||||
check_cxx_source_compiles(
|
||||
"#include <tfile.h>
|
||||
int main()
|
||||
{
|
||||
TagLib::FileName fileName1(\"char\");
|
||||
TagLib::FileName fileName2(L\"wchar\");
|
||||
return 0;
|
||||
}" ${TAGLIB_FILENAME_COMPLEX})
|
||||
endmacro (CHECK_TAGLIB_FILENAME)
|
@@ -1,42 +0,0 @@
|
||||
# - Find libechonest
|
||||
# Find the libechonest includes and the libechonest libraries
|
||||
# This module defines
|
||||
# ECHONEST_INCLUDE_DIR, root echonest include dir. Include echonest includes with echonest/foo.h
|
||||
# ECHONEST_LIBRARIES, the path to libechonest
|
||||
# ECHONEST_FOUND, whether libechonest was found
|
||||
|
||||
FIND_PACKAGE(PkgConfig QUIET)
|
||||
|
||||
if( TOMAHAWK_QT5 )
|
||||
set(LIBECHONEST_SUFFIX "5")
|
||||
endif()
|
||||
|
||||
PKG_CHECK_MODULES(PC_ECHONEST QUIET libechonest${LIBECHONEST_SUFFIX})
|
||||
|
||||
FIND_PATH(ECHONEST_INCLUDE_DIR NAMES echonest${LIBECHONEST_SUFFIX}/Track.h
|
||||
HINTS
|
||||
${PC_ECHONEST_INCLUDEDIR}
|
||||
${PC_ECHONEST_INCLUDE_DIRS}
|
||||
${CMAKE_INSTALL_INCLUDEDIR}
|
||||
${KDE4_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
FIND_LIBRARY(ECHONEST_LIBRARIES NAMES echonest${LIBECHONEST_SUFFIX}
|
||||
HINTS
|
||||
${PC_ECHONEST_LIBDIR}
|
||||
${PC_ECHONEST_LIBRARY_DIRS}
|
||||
${CMAKE_INSTALL_LIBDIR}
|
||||
${KDE4_LIB_DIR}
|
||||
)
|
||||
|
||||
IF(ECHONEST_LIBRARIES AND ECHONEST_INCLUDE_DIR AND NOT PC_ECHONEST_VERSION)
|
||||
MESSAGE(WARNING "You don't have pkg-config and so the libechonest version check does not work!")
|
||||
set(PC_ECHONEST_VERSION "999.9.9")
|
||||
ENDIF()
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Echonest
|
||||
REQUIRED_VARS ECHONEST_LIBRARIES ECHONEST_INCLUDE_DIR
|
||||
VERSION_VAR PC_ECHONEST_VERSION)
|
||||
|
||||
MARK_AS_ADVANCED(ECHONEST_INCLUDE_DIR ECHONEST_LIBRARIES)
|
@@ -6,31 +6,22 @@
|
||||
# LIBJREEN_FOUND, whether libjreen was found
|
||||
|
||||
FIND_PACKAGE(PkgConfig QUIET)
|
||||
if( TOMAHAWK_QT5 )
|
||||
set(JREEN_LIB_SUFFIX "-qt5")
|
||||
set(JREEN_INCLUDE_SUFFIX ${JREEN_LIB_SUFFIX})
|
||||
else()
|
||||
set(JREEN_INCLUDE_SUFFIX "-qt4")
|
||||
endif()
|
||||
PKG_CHECK_MODULES(PC_JREEN QUIET libjreen${JREEN_LIB_SUFFIX})
|
||||
PKG_CHECK_MODULES(PC_JREEN QUIET libjreen-qt5)
|
||||
|
||||
FIND_PATH(JREEN_INCLUDE_DIR NAMES jreen/jreen.h
|
||||
HINTS
|
||||
${PC_JREEN_INCLUDEDIR}
|
||||
${PC_JREEN_INCLUDE_DIRS}
|
||||
${CMAKE_INSTALL_INCLUDEDIR}
|
||||
${KDE4_INCLUDE_DIR}
|
||||
PATH_SUFFIXES
|
||||
jreen${JREEN_INCLUDE_SUFFIX}
|
||||
|
||||
jreen-qt5
|
||||
)
|
||||
|
||||
FIND_LIBRARY(JREEN_LIBRARIES NAMES jreen${JREEN_LIB_SUFFIX}
|
||||
FIND_LIBRARY(JREEN_LIBRARIES NAMES jreen-qt5
|
||||
HINTS
|
||||
${PC_JREEN_LIBDIR}
|
||||
${PC_JREEN_LIBRARY_DIRS}
|
||||
${CMAKE_INSTALL_LIBDIR}
|
||||
${KDE4_LIB_DIR}
|
||||
)
|
||||
|
||||
IF(JREEN_LIBRARIES AND JREEN_INCLUDE_DIR AND NOT PC_JREEN_VERSION)
|
||||
|
@@ -1,20 +0,0 @@
|
||||
# Simple hack to detect wether KDE4 is *installed* -- not anything about the development environment!
|
||||
|
||||
FILE(TO_CMAKE_PATH "$ENV{KDEDIRS}" _KDEDIRS)
|
||||
|
||||
# For KDE4 kde-config has been renamed to kde4-config
|
||||
FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde4-config
|
||||
# the suffix must be used since KDEDIRS can be a list of directories which don't have bin/ appended
|
||||
PATH_SUFFIXES bin
|
||||
HINTS
|
||||
${CMAKE_INSTALL_PREFIX}
|
||||
${_KDEDIRS}
|
||||
/opt/kde4
|
||||
ONLY_CMAKE_FIND_ROOT_PATH
|
||||
)
|
||||
|
||||
IF (KDE4_KDECONFIG_EXECUTABLE)
|
||||
SET (KDE4_INSTALLED TRUE)
|
||||
message(STATUS "KDE4 is installed, will install protocol file")
|
||||
ENDIF (KDE4_KDECONFIG_EXECUTABLE)
|
||||
|
@@ -6,19 +6,16 @@ find_path(LIBVLC_INCLUDE_DIR vlc/vlc.h
|
||||
HINTS
|
||||
${PC_LIBVLC_INCLUDEDIR}
|
||||
${PC_LIBVLC_INCLUDE_DIRS}
|
||||
/usr/local/opt/vlc/include
|
||||
)
|
||||
|
||||
find_library(LIBVLC_LIBRARY NAMES vlc libvlc
|
||||
HINTS
|
||||
${PC_LIBVLC_LIBDIR}
|
||||
${PC_LIBVLC_LIBRARY_DIRS}
|
||||
/usr/local/opt/vlc/lib
|
||||
)
|
||||
|
||||
find_library(LIBVLCCORE_LIBRARY NAMES vlccore libvlccore
|
||||
HINTS
|
||||
${PC_LIBVLC_LIBDIR}
|
||||
${PC_LIBVLC_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
set(LIBVLC_VERSION ${PC_LIBVLC_VERSION})
|
||||
|
||||
@@ -32,8 +29,6 @@ int main(int argc, char *argv[]) {
|
||||
HAVE_VLC_ALBUMARTIST)
|
||||
|
||||
find_package_handle_standard_args(LibVLC
|
||||
REQUIRED_VARS LIBVLC_LIBRARY LIBVLCCORE_LIBRARY LIBVLC_INCLUDE_DIR
|
||||
REQUIRED_VARS LIBVLC_LIBRARY LIBVLC_INCLUDE_DIR
|
||||
VERSION_VAR LIBVLC_VERSION
|
||||
)
|
||||
|
||||
|
||||
|
@@ -7,21 +7,15 @@
|
||||
# (c) Dominik Schmidt <dev@dominik-schmidt.de>
|
||||
#
|
||||
|
||||
if( TOMAHAWK_QT5 )
|
||||
set(LASTFM_LIB_SUFFIX "5")
|
||||
endif()
|
||||
|
||||
# Include dir
|
||||
find_path(LIBLASTFM_INCLUDE_DIR
|
||||
# Track.h doesn't exist in liblastfm-0.3.1, was called Track back then
|
||||
NAMES lastfm${LASTFM_LIB_SUFFIX}/Track.h
|
||||
PATHS ${KDE4_INCLUDE_DIR}
|
||||
NAMES lastfm5/Track.h
|
||||
)
|
||||
|
||||
# Finally the library itself
|
||||
find_library(LIBLASTFM_LIBRARY
|
||||
NAMES lastfm${LASTFM_LIB_SUFFIX}
|
||||
PATHS ${KDE4_LIB_DIR}
|
||||
NAMES lastfm5
|
||||
)
|
||||
|
||||
set(LIBLASTFM_LIBRARIES ${LIBLASTFM_LIBRARY})
|
||||
|
@@ -74,10 +74,10 @@ FIND_PATH(LUCENEPP_LIBRARY_DIR
|
||||
IF (LUCENEPP_LIBRARY_DIR)
|
||||
MESSAGE(STATUS "Found Lucene++ library dir: ${LUCENEPP_LIBRARY_DIR}")
|
||||
|
||||
IF (LUCENEPP_VERSION STRLESS "${LUCENEPP_MIN_VERSION}")
|
||||
IF (LUCENEPP_VERSION VERSION_LESS "${LUCENEPP_MIN_VERSION}")
|
||||
MESSAGE(ERROR " Lucene++ version ${LUCENEPP_VERSION} is less than the required minimum ${LUCENEPP_MIN_VERSION}")
|
||||
SET(LUCENEPP_GOOD_VERSION FALSE)
|
||||
ENDIF (LUCENEPP_VERSION STRLESS "${LUCENEPP_MIN_VERSION}")
|
||||
ENDIF (LUCENEPP_VERSION VERSION_LESS "${LUCENEPP_MIN_VERSION}")
|
||||
ENDIF (LUCENEPP_LIBRARY_DIR)
|
||||
|
||||
IF(LUCENEPP_INCLUDE_DIR AND LUCENEPP_LIBRARIES AND LUCENEPP_LIBRARY_DIR AND LUCENEPP_GOOD_VERSION)
|
||||
|
@@ -1,89 +0,0 @@
|
||||
# - Try to find the OggVorbis libraries
|
||||
# Once done this will define
|
||||
#
|
||||
# OGGVORBIS_FOUND - system has OggVorbis
|
||||
# OGGVORBIS_VERSION - set either to 1 or 2
|
||||
# OGGVORBIS_INCLUDE_DIR - the OggVorbis include directory
|
||||
# OGGVORBIS_LIBRARIES - The libraries needed to use OggVorbis
|
||||
# OGG_LIBRARY - The Ogg library
|
||||
# VORBIS_LIBRARY - The Vorbis library
|
||||
# VORBISFILE_LIBRARY - The VorbisFile library
|
||||
# VORBISENC_LIBRARY - The VorbisEnc library
|
||||
|
||||
# Copyright (c) 2006, Richard Laerkaeng, <richard@goteborg.utfors.se>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
|
||||
include (CheckLibraryExists)
|
||||
|
||||
find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h)
|
||||
find_path(OGG_INCLUDE_DIR ogg/ogg.h)
|
||||
|
||||
find_library(OGG_LIBRARY NAMES ogg)
|
||||
find_library(VORBIS_LIBRARY NAMES vorbis)
|
||||
find_library(VORBISFILE_LIBRARY NAMES vorbisfile)
|
||||
find_library(VORBISENC_LIBRARY NAMES vorbisenc)
|
||||
|
||||
mark_as_advanced(VORBIS_INCLUDE_DIR OGG_INCLUDE_DIR
|
||||
OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY VORBISENC_LIBRARY)
|
||||
|
||||
|
||||
if (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBISENC_LIBRARY)
|
||||
set(OGGVORBIS_FOUND TRUE)
|
||||
|
||||
set(OGGVORBIS_LIBRARIES ${OGG_LIBRARY} ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY} ${VORBISENC_LIBRARY})
|
||||
|
||||
set(_CMAKE_REQUIRED_LIBRARIES_TMP ${CMAKE_REQUIRED_LIBRARIES})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${OGGVORBIS_LIBRARIES})
|
||||
check_library_exists(vorbis vorbis_bitrate_addblock "" HAVE_LIBVORBISENC2)
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${_CMAKE_REQUIRED_LIBRARIES_TMP})
|
||||
|
||||
if (HAVE_LIBVORBISENC2)
|
||||
set (OGGVORBIS_VERSION 2)
|
||||
else (HAVE_LIBVORBISENC2)
|
||||
set (OGGVORBIS_VERSION 1)
|
||||
endif (HAVE_LIBVORBISENC2)
|
||||
|
||||
else (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBISENC_LIBRARY)
|
||||
set (OGGVORBIS_VERSION)
|
||||
set(OGGVORBIS_FOUND FALSE)
|
||||
endif (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBISENC_LIBRARY)
|
||||
|
||||
|
||||
if (OGGVORBIS_FOUND)
|
||||
if (NOT OggVorbis_FIND_QUIETLY)
|
||||
message(STATUS "Found OggVorbis: ${OGGVORBIS_LIBRARIES}")
|
||||
endif (NOT OggVorbis_FIND_QUIETLY)
|
||||
else (OGGVORBIS_FOUND)
|
||||
if (OggVorbis_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could NOT find OggVorbis libraries")
|
||||
endif (OggVorbis_FIND_REQUIRED)
|
||||
if (NOT OggVorbis_FIND_QUITELY)
|
||||
message(STATUS "Could NOT find OggVorbis libraries")
|
||||
endif (NOT OggVorbis_FIND_QUITELY)
|
||||
endif (OGGVORBIS_FOUND)
|
||||
|
||||
#check_include_files(vorbis/vorbisfile.h HAVE_VORBISFILE_H)
|
||||
#check_library_exists(ogg ogg_page_version "" HAVE_LIBOGG)
|
||||
#check_library_exists(vorbis vorbis_info_init "" HAVE_LIBVORBIS)
|
||||
#check_library_exists(vorbisfile ov_open "" HAVE_LIBVORBISFILE)
|
||||
#check_library_exists(vorbisenc vorbis_info_clear "" HAVE_LIBVORBISENC)
|
||||
#check_library_exists(vorbis vorbis_bitrate_addblock "" HAVE_LIBVORBISENC2)
|
||||
|
||||
#if (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE AND HAVE_LIBVORBISENC)
|
||||
# message(STATUS "Ogg/Vorbis found")
|
||||
# set (VORBIS_LIBS "-lvorbis -logg")
|
||||
# set (VORBISFILE_LIBS "-lvorbisfile")
|
||||
# set (VORBISENC_LIBS "-lvorbisenc")
|
||||
# set (OGGVORBIS_FOUND TRUE)
|
||||
# if (HAVE_LIBVORBISENC2)
|
||||
# set (HAVE_VORBIS 2)
|
||||
# else (HAVE_LIBVORBISENC2)
|
||||
# set (HAVE_VORBIS 1)
|
||||
# endif (HAVE_LIBVORBISENC2)
|
||||
#else (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE AND HAVE_LIBVORBISENC)
|
||||
# message(STATUS "Ogg/Vorbis not found")
|
||||
#endif (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE AND HAVE_LIBVORBISENC)
|
||||
|
@@ -1,29 +0,0 @@
|
||||
# Find QJSON - JSON handling library for Qt
|
||||
#
|
||||
# This module defines
|
||||
# QJSON_FOUND - whether the qsjon library was found
|
||||
# QJSON_LIBRARIES - the qjson library
|
||||
# QJSON_INCLUDE_DIR - the include path of the qjson library
|
||||
#
|
||||
|
||||
find_library (QJSON_LIBRARIES
|
||||
NAMES
|
||||
qjson
|
||||
PATHS
|
||||
${QJSON_LIBRARY_DIRS}
|
||||
${LIB_INSTALL_DIR}
|
||||
${KDE4_LIB_DIR}
|
||||
)
|
||||
|
||||
find_path (QJSON_INCLUDE_DIR
|
||||
NAMES
|
||||
qjson/parser.h
|
||||
PATHS
|
||||
${QJSON_INCLUDE_DIRS}
|
||||
${INCLUDE_INSTALL_DIR}
|
||||
${KDE4_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(QJSON DEFAULT_MSG QJSON_LIBRARIES QJSON_INCLUDE_DIR)
|
||||
|
@@ -5,22 +5,12 @@
|
||||
# QTSPARKLE_LIBRARY, the path to qtsparkle
|
||||
# QTSPARKLE_FOUND, whether qtsparkle was found
|
||||
|
||||
if( TOMAHAWK_QT5 )
|
||||
set(QTSPARKLE_SUFFIX "-qt5")
|
||||
else()
|
||||
set(QTSPARKLE_SUFFIX "")
|
||||
endif()
|
||||
|
||||
FIND_PATH(QTSPARKLE_INCLUDE_DIR NAMES qtsparkle${QTSPARKLE_SUFFIX}/Updater
|
||||
HINTS
|
||||
${CMAKE_INSTALL_INCLUDEDIR}
|
||||
${KDE4_INCLUDE_DIR}
|
||||
FIND_PATH(QTSPARKLE_INCLUDE_DIR NAMES qtsparkle-qt5/Updater
|
||||
HINTS ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
|
||||
FIND_LIBRARY(QTSPARKLE_LIBRARIES NAMES qtsparkle${QTSPARKLE_SUFFIX}
|
||||
HINTS
|
||||
${CMAKE_INSTALL_LIBDIR}
|
||||
${KDE4_LIB_DIR}
|
||||
FIND_LIBRARY(QTSPARKLE_LIBRARIES NAMES qtsparkle-qt5
|
||||
HINTS ${CMAKE_INSTALL_LIBDIR}
|
||||
)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
|
@@ -9,18 +9,15 @@ IF (QUAZIP_INCLUDE_DIRS AND QUAZIP_LIBRARIES)
|
||||
# in cache already
|
||||
SET(QUAZIP_FOUND TRUE)
|
||||
ELSE (QUAZIP_INCLUDE_DIRS AND QUAZIP_LIBRARIES)
|
||||
IF (Qt5Core_FOUND)
|
||||
set(QUAZIP_LIB_VERSION_SUFFIX 5)
|
||||
ENDIF()
|
||||
IF (WIN32)
|
||||
FIND_PATH(QUAZIP_LIBRARY_DIR
|
||||
WIN32_DEBUG_POSTFIX d
|
||||
NAMES libquazip${QUAZIP_LIB_VERSION_SUFFIX}.dll
|
||||
NAMES libquazip5.dll
|
||||
HINTS "C:/Programme/" "C:/Program Files"
|
||||
PATH_SUFFIXES QuaZip/lib
|
||||
)
|
||||
FIND_LIBRARY(QUAZIP_LIBRARIES NAMES libquazip${QUAZIP_LIB_VERSION_SUFFIX}.dll HINTS ${QUAZIP_LIBRARY_DIR})
|
||||
FIND_PATH(QUAZIP_INCLUDE_DIR NAMES quazip.h HINTS ${QUAZIP_LIBRARY_DIR}/../ PATH_SUFFIXES include/quazip${QUAZIP_LIB_VERSION_SUFFIX})
|
||||
FIND_LIBRARY(QUAZIP_LIBRARIES NAMES libquazip5.dll HINTS ${QUAZIP_LIBRARY_DIR})
|
||||
FIND_PATH(QUAZIP_INCLUDE_DIR NAMES quazip.h HINTS ${QUAZIP_LIBRARY_DIR}/../ PATH_SUFFIXES include/quazip5)
|
||||
FIND_PATH(QUAZIP_ZLIB_INCLUDE_DIR NAMES zlib.h)
|
||||
ELSE(WIN32)
|
||||
FIND_PACKAGE(PkgConfig)
|
||||
@@ -28,12 +25,12 @@ ELSE (QUAZIP_INCLUDE_DIRS AND QUAZIP_LIBRARIES)
|
||||
pkg_check_modules(PC_QUAZIP quazip)
|
||||
FIND_LIBRARY(QUAZIP_LIBRARIES
|
||||
WIN32_DEBUG_POSTFIX d
|
||||
NAMES quazip${QUAZIP_LIB_VERSION_SUFFIX}
|
||||
NAMES quazip5
|
||||
HINTS /usr/lib /usr/lib64
|
||||
)
|
||||
FIND_PATH(QUAZIP_INCLUDE_DIR quazip.h
|
||||
HINTS /usr/include /usr/local/include
|
||||
PATH_SUFFIXES quazip${QUAZIP_LIB_VERSION_SUFFIX}
|
||||
PATH_SUFFIXES quazip5
|
||||
)
|
||||
FIND_PATH(QUAZIP_ZLIB_INCLUDE_DIR zlib.h HINTS /usr/include /usr/local/include)
|
||||
ENDIF (WIN32)
|
||||
|
@@ -1,89 +1,90 @@
|
||||
# - Try to find the Taglib library
|
||||
# Once done this will define
|
||||
#.rst:
|
||||
# FindTaglib
|
||||
# ----------
|
||||
#
|
||||
# TAGLIB_FOUND - system has the taglib library
|
||||
# TAGLIB_CFLAGS - the taglib cflags
|
||||
# TAGLIB_LIBRARIES - The libraries needed to use taglib
|
||||
|
||||
# Copyright (c) 2006, Laurent Montel, <montel@kde.org>
|
||||
# Try to find the Taglib library.
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
# This will define the following variables:
|
||||
#
|
||||
# ``Taglib_FOUND``
|
||||
# True if the system has the taglib library of at least the minimum
|
||||
# version specified by the version parameter to find_package()
|
||||
# ``Taglib_INCLUDE_DIRS``
|
||||
# The taglib include dirs for use with target_include_directories
|
||||
# ``Taglib_LIBRARIES``
|
||||
# The taglib libraries for use with target_link_libraries()
|
||||
# ``Taglib_VERSION``
|
||||
# The version of taglib that was found
|
||||
#
|
||||
# If ``Taglib_FOUND`` is TRUE, it will also define the following imported
|
||||
# target:
|
||||
#
|
||||
# ``Taglib::Taglib``
|
||||
# The Taglib library
|
||||
#
|
||||
# Since 5.72.0
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2006 Laurent Montel <montel@kde.org>
|
||||
# SPDX-FileCopyrightText: 2019 Heiko Becker <heirecka@exherbo.org>
|
||||
# SPDX-FileCopyrightText: 2020 Elvis Angelaccio <elvis.angelaccio@kde.org>
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
IF(TAGLIB_FOUND)
|
||||
MESSAGE(STATUS "Using manually specified taglib locations")
|
||||
ELSE()
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
if(NOT TAGLIB_MIN_VERSION)
|
||||
set(TAGLIB_MIN_VERSION "1.6")
|
||||
endif(NOT TAGLIB_MIN_VERSION)
|
||||
pkg_search_module(PC_TAGLIB QUIET taglib)
|
||||
|
||||
if(NOT WIN32)
|
||||
find_program(TAGLIBCONFIG_EXECUTABLE NAMES taglib-config PATHS
|
||||
${BIN_INSTALL_DIR}
|
||||
)
|
||||
endif(NOT WIN32)
|
||||
find_path(Taglib_INCLUDE_DIRS
|
||||
NAMES tag.h
|
||||
PATH_SUFFIXES taglib
|
||||
HINTS ${PC_TAGLIB_INCLUDEDIR}
|
||||
)
|
||||
|
||||
#reset vars
|
||||
set(TAGLIB_LIBRARIES)
|
||||
set(TAGLIB_CFLAGS)
|
||||
find_library(Taglib_LIBRARIES
|
||||
NAMES tag
|
||||
HINTS ${PC_TAGLIB_LIBDIR}
|
||||
)
|
||||
|
||||
# MESSAGE( STATUS "PATHS: ${PATHS}")
|
||||
# if taglib-config has been found
|
||||
if(TAGLIBCONFIG_EXECUTABLE)
|
||||
set(Taglib_VERSION ${PC_TAGLIB_VERSION})
|
||||
|
||||
exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_VERSION)
|
||||
if (Taglib_INCLUDE_DIRS AND NOT Taglib_VERSION)
|
||||
if(EXISTS "${Taglib_INCLUDE_DIRS}/taglib.h")
|
||||
file(READ "${Taglib_INCLUDE_DIRS}/taglib.h" TAGLIB_H)
|
||||
|
||||
if(TAGLIB_VERSION VERSION_LESS "${TAGLIB_MIN_VERSION}")
|
||||
message(STATUS "TagLib version not found: version searched :${TAGLIB_MIN_VERSION}, found ${TAGLIB_VERSION}")
|
||||
set(TAGLIB_FOUND FALSE)
|
||||
else(TAGLIB_VERSION VERSION_LESS "${TAGLIB_MIN_VERSION}")
|
||||
string(REGEX MATCH "#define TAGLIB_MAJOR_VERSION[ ]+[0-9]+" TAGLIB_MAJOR_VERSION_MATCH ${TAGLIB_H})
|
||||
string(REGEX MATCH "#define TAGLIB_MINOR_VERSION[ ]+[0-9]+" TAGLIB_MINOR_VERSION_MATCH ${TAGLIB_H})
|
||||
string(REGEX MATCH "#define TAGLIB_PATCH_VERSION[ ]+[0-9]+" TAGLIB_PATCH_VERSION_MATCH ${TAGLIB_H})
|
||||
|
||||
exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_LIBRARIES)
|
||||
string(REGEX REPLACE ".*_MAJOR_VERSION[ ]+(.*)" "\\1" TAGLIB_MAJOR_VERSION "${TAGLIB_MAJOR_VERSION_MATCH}")
|
||||
string(REGEX REPLACE ".*_MINOR_VERSION[ ]+(.*)" "\\1" TAGLIB_MINOR_VERSION "${TAGLIB_MINOR_VERSION_MATCH}")
|
||||
string(REGEX REPLACE ".*_PATCH_VERSION[ ]+(.*)" "\\1" TAGLIB_PATCH_VERSION "${TAGLIB_PATCH_VERSION_MATCH}")
|
||||
|
||||
exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_CFLAGS)
|
||||
set(Taglib_VERSION "${TAGLIB_MAJOR_VERSION}.${TAGLIB_MINOR_VERSION}.${TAGLIB_PATCH_VERSION}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(TAGLIB_LIBRARIES AND TAGLIB_CFLAGS)
|
||||
set(TAGLIB_FOUND TRUE)
|
||||
# message(STATUS "Found taglib: ${TAGLIB_LIBRARIES}")
|
||||
endif(TAGLIB_LIBRARIES AND TAGLIB_CFLAGS)
|
||||
string(REGEX REPLACE " *-I" ";" TAGLIB_INCLUDES "${TAGLIB_CFLAGS}")
|
||||
endif(TAGLIB_VERSION VERSION_LESS "${TAGLIB_MIN_VERSION}")
|
||||
mark_as_advanced(TAGLIB_CFLAGS TAGLIB_LIBRARIES TAGLIB_INCLUDES)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Taglib
|
||||
FOUND_VAR
|
||||
Taglib_FOUND
|
||||
REQUIRED_VARS
|
||||
Taglib_LIBRARIES
|
||||
Taglib_INCLUDE_DIRS
|
||||
VERSION_VAR
|
||||
Taglib_VERSION
|
||||
)
|
||||
|
||||
else(TAGLIBCONFIG_EXECUTABLE)
|
||||
if (Taglib_FOUND AND NOT TARGET Taglib::Taglib)
|
||||
add_library(Taglib::Taglib UNKNOWN IMPORTED)
|
||||
set_target_properties(Taglib::Taglib PROPERTIES
|
||||
IMPORTED_LOCATION "${Taglib_LIBRARIES}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Taglib_INCLUDE_DIRS}"
|
||||
)
|
||||
endif()
|
||||
|
||||
include(FindLibraryWithDebug)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
mark_as_advanced(Taglib_LIBRARIES Taglib_INCLUDE_DIRS)
|
||||
|
||||
find_path(TAGLIB_INCLUDES
|
||||
NAMES
|
||||
tag.h
|
||||
PATH_SUFFIXES taglib
|
||||
PATHS
|
||||
${KDE4_INCLUDE_DIR}
|
||||
${INCLUDE_INSTALL_DIR}
|
||||
)
|
||||
|
||||
find_library_with_debug(TAGLIB_LIBRARIES
|
||||
WIN32_DEBUG_POSTFIX d
|
||||
NAMES tag
|
||||
PATHS
|
||||
${KDE4_LIB_DIR}
|
||||
${LIB_INSTALL_DIR}
|
||||
)
|
||||
|
||||
find_package_handle_standard_args(Taglib DEFAULT_MSG
|
||||
TAGLIB_INCLUDES TAGLIB_LIBRARIES)
|
||||
endif(TAGLIBCONFIG_EXECUTABLE)
|
||||
ENDIF()
|
||||
|
||||
if(TAGLIB_FOUND)
|
||||
if(NOT Taglib_FIND_QUIETLY AND TAGLIBCONFIG_EXECUTABLE)
|
||||
message(STATUS "Found TagLib: ${TAGLIB_LIBRARIES}")
|
||||
endif(NOT Taglib_FIND_QUIETLY AND TAGLIBCONFIG_EXECUTABLE)
|
||||
else(TAGLIB_FOUND)
|
||||
if(Taglib_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could not find Taglib")
|
||||
endif(Taglib_FIND_REQUIRED)
|
||||
endif(TAGLIB_FOUND)
|
||||
include(FeatureSummary)
|
||||
set_package_properties(Taglib PROPERTIES
|
||||
URL "https://taglib.org/"
|
||||
DESCRIPTION "A library for reading and editing the meta-data of audio formats"
|
||||
)
|
||||
|
@@ -2,25 +2,14 @@
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
if( NOT BUILD_WITH_QT4 )
|
||||
find_package(TelepathyQt5 NO_MODULE)
|
||||
set(TelepathyQt_FOUND ${TelepathyQt5_FOUND})
|
||||
set(TELEPATHY_QT_VERSION ${TELEPATHY_QT5_VERSION})
|
||||
set(TELEPATHY_QT_INSTALL_DIR ${TELEPATHY_QT5_INSTALL_DIR})
|
||||
set(TELEPATHY_QT_INCLUDE_DIR ${TELEPATHY_QT5_INCLUDE_DIR})
|
||||
set(TELEPATHY_QT_LIB_DIR ${TELEPATHY_QT5_LIB_DIR})
|
||||
set(TELEPATHY_QT_SHARE_DIR ${TELEPATHY_QT5_SHARE_DIR})
|
||||
set(TELEPATHY_QT_LIBRARIES ${TELEPATHY_QT5_LIBRARIES})
|
||||
else()
|
||||
find_package(TelepathyQt4 NO_MODULE)
|
||||
set(TelepathyQt_FOUND ${TelepathyQt4_FOUND})
|
||||
set(TELEPATHY_QT_VERSION ${TELEPATHY_QT4_VERSION})
|
||||
set(TELEPATHY_QT_INSTALL_DIR ${TELEPATHY_QT4_INSTALL_DIR})
|
||||
set(TELEPATHY_QT_INCLUDE_DIR ${TELEPATHY_QT4_INCLUDE_DIR})
|
||||
set(TELEPATHY_QT_LIB_DIR ${TELEPATHY_QT4_LIB_DIR})
|
||||
set(TELEPATHY_QT_SHARE_DIR ${TELEPATHY_QT4_SHARE_DIR})
|
||||
set(TELEPATHY_QT_LIBRARIES ${TELEPATHY_QT4_LIBRARIES})
|
||||
endif()
|
||||
find_package(TelepathyQt5 NO_MODULE)
|
||||
set(TelepathyQt_FOUND ${TelepathyQt5_FOUND})
|
||||
set(TELEPATHY_QT_VERSION ${TELEPATHY_QT5_VERSION})
|
||||
set(TELEPATHY_QT_INSTALL_DIR ${TELEPATHY_QT5_INSTALL_DIR})
|
||||
set(TELEPATHY_QT_INCLUDE_DIR ${TELEPATHY_QT5_INCLUDE_DIR})
|
||||
set(TELEPATHY_QT_LIB_DIR ${TELEPATHY_QT5_LIB_DIR})
|
||||
set(TELEPATHY_QT_SHARE_DIR ${TELEPATHY_QT5_SHARE_DIR})
|
||||
set(TELEPATHY_QT_LIBRARIES ${TELEPATHY_QT5_LIBRARIES})
|
||||
|
||||
set(TELEPATHY_QT_FOUND ${TelepathyQt_FOUND})
|
||||
|
||||
|
@@ -1,182 +0,0 @@
|
||||
# - Define GNU standard installation directories
|
||||
# Provides install directory variables as defined for GNU software:
|
||||
# http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
|
||||
# Inclusion of this module defines the following variables:
|
||||
# CMAKE_INSTALL_<dir> - destination for files of a given type
|
||||
# CMAKE_INSTALL_FULL_<dir> - corresponding absolute path
|
||||
# where <dir> is one of:
|
||||
# BINDIR - user executables (bin)
|
||||
# SBINDIR - system admin executables (sbin)
|
||||
# LIBEXECDIR - program executables (libexec)
|
||||
# SYSCONFDIR - read-only single-machine data (etc)
|
||||
# SHAREDSTATEDIR - modifiable architecture-independent data (com)
|
||||
# LOCALSTATEDIR - modifiable single-machine data (var)
|
||||
# LIBDIR - object code libraries (lib or lib64)
|
||||
# INCLUDEDIR - C header files (include)
|
||||
# OLDINCLUDEDIR - C header files for non-gcc (/usr/include)
|
||||
# DATAROOTDIR - read-only architecture-independent data root (share)
|
||||
# DATADIR - read-only architecture-independent data (DATAROOTDIR)
|
||||
# INFODIR - info documentation (DATAROOTDIR/info)
|
||||
# LOCALEDIR - locale-dependent data (DATAROOTDIR/locale)
|
||||
# MANDIR - man documentation (DATAROOTDIR/man)
|
||||
# DOCDIR - documentation root (DATAROOTDIR/doc/PROJECT_NAME)
|
||||
# Each CMAKE_INSTALL_<dir> value may be passed to the DESTINATION options of
|
||||
# install() commands for the corresponding file type. If the includer does
|
||||
# not define a value the above-shown default will be used and the value will
|
||||
# appear in the cache for editing by the user.
|
||||
# Each CMAKE_INSTALL_FULL_<dir> value contains an absolute path constructed
|
||||
# from the corresponding destination by prepending (if necessary) the value
|
||||
# of CMAKE_INSTALL_PREFIX.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Nikita Krupen'ko <krnekit@gmail.com>
|
||||
# Copyright 2011 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# Installation directories
|
||||
#
|
||||
if(NOT DEFINED CMAKE_INSTALL_BINDIR)
|
||||
set(CMAKE_INSTALL_BINDIR "bin" CACHE PATH "user executables (bin)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_SBINDIR)
|
||||
set(CMAKE_INSTALL_SBINDIR "sbin" CACHE PATH "system admin executables (sbin)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_LIBEXECDIR)
|
||||
set(CMAKE_INSTALL_LIBEXECDIR "libexec" CACHE PATH "program executables (libexec)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_SYSCONFDIR)
|
||||
set(CMAKE_INSTALL_SYSCONFDIR "etc" CACHE PATH "read-only single-machine data (etc)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_SHAREDSTATEDIR)
|
||||
set(CMAKE_INSTALL_SHAREDSTATEDIR "com" CACHE PATH "modifiable architecture-independent data (com)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_LOCALSTATEDIR)
|
||||
set(CMAKE_INSTALL_LOCALSTATEDIR "var" CACHE PATH "modifiable single-machine data (var)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||
set(_LIBDIR_DEFAULT "lib")
|
||||
# Override this default 'lib' with 'lib64' iff:
|
||||
# - we are on Linux system but NOT cross-compiling
|
||||
# - we are NOT on debian
|
||||
# - we are on a 64 bits system
|
||||
# reason is: amd64 ABI: http://www.x86-64.org/documentation/abi.pdf
|
||||
# Note that the future of multi-arch handling may be even
|
||||
# more complicated than that: http://wiki.debian.org/Multiarch
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux"
|
||||
AND NOT CMAKE_CROSSCOMPILING
|
||||
AND NOT EXISTS "/etc/debian_version")
|
||||
if(NOT DEFINED CMAKE_SIZEOF_VOID_P)
|
||||
message(AUTHOR_WARNING
|
||||
"Unable to determine default CMAKE_INSTALL_LIBDIR directory because no target architecture is known. "
|
||||
"Please enable at least one language before including GNUInstallDirs.")
|
||||
else()
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(_LIBDIR_DEFAULT "lib64")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
set(CMAKE_INSTALL_LIBDIR "${_LIBDIR_DEFAULT}" CACHE PATH "object code libraries (${_LIBDIR_DEFAULT})")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_INCLUDEDIR)
|
||||
set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE PATH "C header files (include)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_OLDINCLUDEDIR)
|
||||
set(CMAKE_INSTALL_OLDINCLUDEDIR "/usr/include" CACHE PATH "C header files for non-gcc (/usr/include)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_DATAROOTDIR)
|
||||
set(CMAKE_INSTALL_DATAROOTDIR "share" CACHE PATH "read-only architecture-independent data root (share)")
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Values whose defaults are relative to DATAROOTDIR. Store empty values in
|
||||
# the cache and store the defaults in local variables if the cache values are
|
||||
# not set explicitly. This auto-updates the defaults as DATAROOTDIR changes.
|
||||
|
||||
if(NOT CMAKE_INSTALL_DATADIR)
|
||||
set(CMAKE_INSTALL_DATADIR "" CACHE PATH "read-only architecture-independent data (DATAROOTDIR)")
|
||||
set(CMAKE_INSTALL_DATADIR "${CMAKE_INSTALL_DATAROOTDIR}")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_INFODIR)
|
||||
set(CMAKE_INSTALL_INFODIR "" CACHE PATH "info documentation (DATAROOTDIR/info)")
|
||||
set(CMAKE_INSTALL_INFODIR "${CMAKE_INSTALL_DATAROOTDIR}/info")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_LOCALEDIR)
|
||||
set(CMAKE_INSTALL_LOCALEDIR "" CACHE PATH "locale-dependent data (DATAROOTDIR/locale)")
|
||||
set(CMAKE_INSTALL_LOCALEDIR "${CMAKE_INSTALL_DATAROOTDIR}/locale")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_MANDIR)
|
||||
set(CMAKE_INSTALL_MANDIR "" CACHE PATH "man documentation (DATAROOTDIR/man)")
|
||||
set(CMAKE_INSTALL_MANDIR "${CMAKE_INSTALL_DATAROOTDIR}/man")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_DOCDIR)
|
||||
set(CMAKE_INSTALL_DOCDIR "" CACHE PATH "documentation root (DATAROOTDIR/doc/PROJECT_NAME)")
|
||||
set(CMAKE_INSTALL_DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}")
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
mark_as_advanced(
|
||||
CMAKE_INSTALL_BINDIR
|
||||
CMAKE_INSTALL_SBINDIR
|
||||
CMAKE_INSTALL_LIBEXECDIR
|
||||
CMAKE_INSTALL_SYSCONFDIR
|
||||
CMAKE_INSTALL_SHAREDSTATEDIR
|
||||
CMAKE_INSTALL_LOCALSTATEDIR
|
||||
CMAKE_INSTALL_LIBDIR
|
||||
CMAKE_INSTALL_INCLUDEDIR
|
||||
CMAKE_INSTALL_OLDINCLUDEDIR
|
||||
CMAKE_INSTALL_DATAROOTDIR
|
||||
CMAKE_INSTALL_DATADIR
|
||||
CMAKE_INSTALL_INFODIR
|
||||
CMAKE_INSTALL_LOCALEDIR
|
||||
CMAKE_INSTALL_MANDIR
|
||||
CMAKE_INSTALL_DOCDIR
|
||||
)
|
||||
|
||||
# Result directories
|
||||
#
|
||||
foreach(dir
|
||||
BINDIR
|
||||
SBINDIR
|
||||
LIBEXECDIR
|
||||
SYSCONFDIR
|
||||
SHAREDSTATEDIR
|
||||
LOCALSTATEDIR
|
||||
LIBDIR
|
||||
INCLUDEDIR
|
||||
OLDINCLUDEDIR
|
||||
DATAROOTDIR
|
||||
DATADIR
|
||||
INFODIR
|
||||
LOCALEDIR
|
||||
MANDIR
|
||||
DOCDIR
|
||||
)
|
||||
if(NOT IS_ABSOLUTE ${CMAKE_INSTALL_${dir}})
|
||||
set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${dir}}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_${dir}}")
|
||||
endif()
|
||||
endforeach()
|
@@ -93,7 +93,7 @@ MACRO(MACRO_LOG_FEATURE _var _package _description _url ) # _required _minvers _
|
||||
FILE(APPEND "${_LOGFILENAME}" "${_logtext}\n")
|
||||
|
||||
IF(COMMAND SET_PACKAGE_INFO) # in FeatureSummary.cmake since CMake 2.8.3
|
||||
SET_PACKAGE_INFO("${_package}" "\"${_description}\"" "${_url}" "\"${_comments}\"")
|
||||
SET_PACKAGE_PROPERTIES("${_package}" PROPERTIES DESCRIPTION "\"${_description}\"" URL "${_url}" PURPOSE "\"${_comments}\"")
|
||||
ENDIF(COMMAND SET_PACKAGE_INFO)
|
||||
|
||||
ENDMACRO(MACRO_LOG_FEATURE)
|
||||
|
@@ -18,11 +18,10 @@
|
||||
!ifndef MINGW_ROOT
|
||||
!define MINGW_ROOT "/usr/i686-w64-mingw32/sys-root/mingw"
|
||||
!endif
|
||||
|
||||
!define APPLICATION_NAME "Tomahawk"
|
||||
!define TARGET_NAME "tomahawk"
|
||||
!define APPLICATION_NAME "@CPACK_PACKAGE_NAME@"
|
||||
!define TARGET_NAME "@CPACK_PACKAGE_TARGET_NAME@"
|
||||
;define app id needed for Windows 8 notifications
|
||||
!define AppUserModelId @TOMAHAWK_APPLICATION_PACKAGE_NAME@
|
||||
!define AppUserModelId "@TOMAHAWK_APPLICATION_PACKAGE_NAME@"
|
||||
|
||||
!define MINGW_BIN "${MINGW_ROOT}/bin"
|
||||
!define MINGW_LIB "${MINGW_ROOT}/lib"
|
||||
@@ -347,101 +346,108 @@ Section "${APPLICATION_NAME}" SEC_TOMAHAWK_PLAYER
|
||||
File "${QT_DLL_PATH}\icudata56.dll"
|
||||
File "${QT_DLL_PATH}\icui18n56.dll"
|
||||
|
||||
;SQLite driver
|
||||
SetOutPath "$INSTDIR\sqldrivers"
|
||||
File "${SQLITE_DLL_PATH}\qsqlite.dll"
|
||||
SetOutPath "$INSTDIR"
|
||||
File "${MINGW_BIN}\libsqlite3-0.dll"
|
||||
;SQLite driver
|
||||
SetOutPath "$INSTDIR\sqldrivers"
|
||||
File "${SQLITE_DLL_PATH}\qsqlite.dll"
|
||||
SetOutPath "$INSTDIR"
|
||||
File "${MINGW_BIN}\libsqlite3-0.dll"
|
||||
|
||||
;Qt platform plugins
|
||||
SetOutPath "$INSTDIR\platforms"
|
||||
File "${MINGW_LIB}/qt5/plugins/platforms/qwindows.dll"
|
||||
SetOutPath "$INSTDIR"
|
||||
;Qt platform plugins
|
||||
SetOutPath "$INSTDIR\platforms"
|
||||
File "${MINGW_LIB}/qt5/plugins/platforms/qwindows.dll"
|
||||
SetOutPath "$INSTDIR"
|
||||
|
||||
;Image plugins
|
||||
SetOutPath "$INSTDIR\imageformats"
|
||||
File "${IMAGEFORMATS_DLL_PATH}\qgif.dll"
|
||||
File "${IMAGEFORMATS_DLL_PATH}\qjpeg.dll"
|
||||
File "${IMAGEFORMATS_DLL_PATH}\qsvg.dll"
|
||||
SetOutPath "$INSTDIR"
|
||||
;Image plugins
|
||||
SetOutPath "$INSTDIR\imageformats"
|
||||
File "${IMAGEFORMATS_DLL_PATH}\qgif.dll"
|
||||
File "${IMAGEFORMATS_DLL_PATH}\qjpeg.dll"
|
||||
File "${IMAGEFORMATS_DLL_PATH}\qsvg.dll"
|
||||
SetOutPath "$INSTDIR"
|
||||
|
||||
;Qt qml plugins
|
||||
SetOutPath "$INSTDIR\QtQuick.2"
|
||||
File /r /x *.debug "${QT_QML_PATH}\QtQuick.2\*"
|
||||
SetOutPath "$INSTDIR\QtQuick\Window.2"
|
||||
File /r /x *.debug "${QT_QML_PATH}\QtQuick\Window.2\*"
|
||||
SetOutPath "$INSTDIR"
|
||||
;Qt qml plugins
|
||||
SetOutPath "$INSTDIR\QtQuick.2"
|
||||
File /r /x *.debug "${QT_QML_PATH}\QtQuick.2\*"
|
||||
SetOutPath "$INSTDIR\QtQuick\Window.2"
|
||||
File /r /x *.debug "${QT_QML_PATH}\QtQuick\Window.2\*"
|
||||
SetOutPath "$INSTDIR"
|
||||
|
||||
;Cygwin/c++ stuff
|
||||
File "${MINGW_BIN}\libgcc_s_sjlj-1.dll"
|
||||
File "${MINGW_BIN}\libstdc++-6.dll"
|
||||
;Cygwin/c++ stuff
|
||||
File "${MINGW_BIN}\libgcc_s_sjlj-1.dll"
|
||||
File "${MINGW_BIN}\libstdc++-6.dll"
|
||||
|
||||
;VLC
|
||||
File "${VLC_BIN}\libvlc.dll"
|
||||
File "${VLC_BIN}\libvlccore.dll"
|
||||
SetOutPath "$INSTDIR\plugins"
|
||||
File /r "${VLC_PLUGIN_PATH}\*.dll"
|
||||
SetOutPath "$INSTDIR"
|
||||
;VLC
|
||||
File "${VLC_BIN}\libvlc.dll"
|
||||
File "${VLC_BIN}\libvlccore.dll"
|
||||
SetOutPath "$INSTDIR\plugins"
|
||||
File /r "${VLC_PLUGIN_PATH}\*.dll"
|
||||
SetOutPath "$INSTDIR"
|
||||
|
||||
; Other
|
||||
File "${MINGW_BIN}\libtag.dll"
|
||||
File "${MINGW_BIN}\libpng16-16.dll"
|
||||
File "${MINGW_BIN}\libjpeg-8.dll"
|
||||
File "${MINGW_BIN}\zlib1.dll"
|
||||
File "${MINGW_BIN}\libfreetype-6.dll"
|
||||
File "${MINGW_BIN}\libglib-2.0-0.dll"
|
||||
File "${MINGW_BIN}\libharfbuzz-0.dll"
|
||||
; Other
|
||||
File "${MINGW_BIN}\libtag.dll"
|
||||
File "${MINGW_BIN}\libpng16-16.dll"
|
||||
File "${MINGW_BIN}\libjpeg-8.dll"
|
||||
File "${MINGW_BIN}\zlib1.dll"
|
||||
File "${MINGW_BIN}\libfreetype-6.dll"
|
||||
File "${MINGW_BIN}\libglib-2.0-0.dll"
|
||||
File "${MINGW_BIN}\libharfbuzz-0.dll"
|
||||
|
||||
File "${MINGW_BIN}\libechonest5.dll"
|
||||
File "${MINGW_BIN}\liblastfm5.dll"
|
||||
File "${MINGW_BIN}\libquazip5.dll"
|
||||
File "${MINGW_BIN}\libqt5keychain.dll"
|
||||
; ANGLE
|
||||
File "${MINGW_BIN}\D3DCompiler_43.dll"
|
||||
|
||||
; GnuTLS
|
||||
File "${MINGW_BIN}\libgnutls-28.dll"
|
||||
File "${MINGW_BIN}\libtasn1-6.dll"
|
||||
File "${MINGW_BIN}\libgmp-10.dll"
|
||||
File "${MINGW_BIN}\libhogweed-2-4.dll"
|
||||
File "${MINGW_BIN}\libintl-8.dll"
|
||||
File "${MINGW_BIN}\libnettle-4-6.dll"
|
||||
File "${MINGW_BIN}\libp11-kit-0.dll"
|
||||
File "${MINGW_BIN}\libffi-6.dll"
|
||||
File "${MINGW_BIN}\libechonest5.dll"
|
||||
File "${MINGW_BIN}\liblastfm5.dll"
|
||||
File "${MINGW_BIN}\libquazip5.dll"
|
||||
File "${MINGW_BIN}\libqt5keychain.dll"
|
||||
|
||||
; Snorenotify
|
||||
File "${MINGW_BIN}\SnoreToast.exe"
|
||||
File "${MINGW_BIN}\libsnore-qt5.dll"
|
||||
File "${MINGW_BIN}\snoresettings.exe"
|
||||
File "${MINGW_LIB}\plugins\libsnore-qt5\libsnore_backend_growl.dll"
|
||||
File "${MINGW_LIB}\plugins\libsnore-qt5\libsnore_backend_snarl.dll"
|
||||
File "${MINGW_LIB}\plugins\libsnore-qt5\libsnore_backend_snore.dll"
|
||||
File "${MINGW_LIB}\plugins\libsnore-qt5\libsnore_backend_snoretoast.dll"
|
||||
; GnuTLS
|
||||
File "${MINGW_BIN}\libgnutls-28.dll"
|
||||
File "${MINGW_BIN}\libtasn1-6.dll"
|
||||
File "${MINGW_BIN}\libgmp-10.dll"
|
||||
File "${MINGW_BIN}\libhogweed-4-1.dll"
|
||||
File "${MINGW_BIN}\libintl-8.dll"
|
||||
File "${MINGW_BIN}\libnettle-6-1.dll"
|
||||
File "${MINGW_BIN}\libp11-kit-0.dll"
|
||||
File "${MINGW_BIN}\libffi-6.dll"
|
||||
|
||||
; Snoregrowl
|
||||
File "${MINGW_BIN}\libsnoregrowl++.dll"
|
||||
File "${MINGW_BIN}\libsnoregrowl.dll"
|
||||
; Snorenotify
|
||||
File "${MINGW_BIN}\SnoreToast.exe"
|
||||
File "${MINGW_BIN}\libsnore-qt5.dll"
|
||||
File "${MINGW_BIN}\libsnoresettings-qt5.dll"
|
||||
File "${MINGW_BIN}\snoresettings.exe"
|
||||
File "${MINGW_LIB}\plugins\libsnore-qt5\libsnore_backend_growl.dll"
|
||||
File "${MINGW_LIB}\plugins\libsnore-qt5\libsnore_settings_backend_growl.dll"
|
||||
File "${MINGW_LIB}\plugins\libsnore-qt5\libsnore_backend_snarl.dll"
|
||||
File "${MINGW_LIB}\plugins\libsnore-qt5\libsnore_settings_backend_snarl.dll"
|
||||
File "${MINGW_LIB}\plugins\libsnore-qt5\libsnore_backend_snore.dll"
|
||||
File "${MINGW_LIB}\plugins\libsnore-qt5\libsnore_settings_backend_snore.dll"
|
||||
File "${MINGW_LIB}\plugins\libsnore-qt5\libsnore_backend_windowstoast.dll"
|
||||
|
||||
; Snoregrowl
|
||||
File "${MINGW_BIN}\libsnoregrowl++.dll"
|
||||
File "${MINGW_BIN}\libsnoregrowl.dll"
|
||||
|
||||
; Jabber
|
||||
File "${MINGW_BIN}\libjreen-qt5.dll"
|
||||
File "${MINGW_BIN}\libidn-11.dll"
|
||||
File "${MINGW_BIN}\libgsasl-7.dll"
|
||||
File "${MINGW_BIN}\libqca-qt5.dll"
|
||||
SetOutPath "$INSTDIR\crypto"
|
||||
File "${MINGW_LIB}\qca-qt5\crypto\libqca-ossl.dll"
|
||||
SetOutPath "$INSTDIR"
|
||||
File "${MINGW_BIN}\libssl-10.dll"
|
||||
File "${MINGW_BIN}\libcrypto-10.dll"
|
||||
File "${MINGW_BIN}\libjreen-qt5.dll"
|
||||
File "${MINGW_BIN}\libidn-11.dll"
|
||||
File "${MINGW_BIN}\libgsasl-7.dll"
|
||||
File "${MINGW_BIN}\libqca-qt5.dll"
|
||||
SetOutPath "$INSTDIR\crypto"
|
||||
File "${MINGW_LIB}\qca-qt5\crypto\libqca-ossl.dll"
|
||||
SetOutPath "$INSTDIR"
|
||||
File "${MINGW_BIN}\libssl-10.dll"
|
||||
File "${MINGW_BIN}\libcrypto-10.dll"
|
||||
|
||||
; LucenePlusPlus
|
||||
File "${MINGW_BIN}\liblucene++.dll"
|
||||
File "${MINGW_BIN}\libboost_system-mt.dll"
|
||||
File "${MINGW_BIN}\libboost_filesystem-mt.dll"
|
||||
File "${MINGW_BIN}\libboost_iostreams-mt.dll"
|
||||
File "${MINGW_BIN}\libboost_regex-mt.dll"
|
||||
File "${MINGW_BIN}\libboost_thread-mt.dll"
|
||||
File "${MINGW_BIN}\libbz2-1.dll"
|
||||
; LucenePlusPlus
|
||||
File "${MINGW_BIN}\liblucene++.dll"
|
||||
File "${MINGW_BIN}\libboost_system-mt.dll"
|
||||
File "${MINGW_BIN}\libboost_filesystem-mt.dll"
|
||||
File "${MINGW_BIN}\libboost_iostreams-mt.dll"
|
||||
File "${MINGW_BIN}\libboost_regex-mt.dll"
|
||||
File "${MINGW_BIN}\libboost_thread-mt.dll"
|
||||
File "${MINGW_BIN}\libbz2-1.dll"
|
||||
|
||||
File "${MINGW_BIN}\libqtsparkle-qt5.dll"
|
||||
File "${MINGW_BIN}\libKF5Attica.dll"
|
||||
File "${MINGW_BIN}\libqtsparkle-qt5.dll"
|
||||
File "${MINGW_BIN}\libKF5Attica.dll"
|
||||
SectionEnd
|
||||
|
||||
SectionGroup "Shortcuts"
|
||||
|
@@ -1,6 +1,7 @@
|
||||
Version 0.9.0:
|
||||
* Resolved various playback issues by switching to a new audio engine.
|
||||
* Fixed collection sorting.
|
||||
* Fixed volume/mute state not being reset correctly on startup.
|
||||
|
||||
Version 0.8.4:
|
||||
* Fixed drag & drop issues on sidebar.
|
||||
|
2
Docker/Docker.variables
Normal file
2
Docker/Docker.variables
Normal file
@@ -0,0 +1,2 @@
|
||||
DOCKER_IMAGE_NAME=tomahawkmusicplayer/ubuntu
|
||||
DOCKER_IMAGE_VER=latest
|
149
Docker/Dockerfile
Normal file
149
Docker/Dockerfile
Normal file
@@ -0,0 +1,149 @@
|
||||
FROM ubuntu:19.04 as base
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
ninja-build \
|
||||
openssh-client \
|
||||
curl \
|
||||
gnupg2 \
|
||||
gosu \
|
||||
wget \
|
||||
locales \
|
||||
git \
|
||||
subversion \
|
||||
make \
|
||||
pkg-config \
|
||||
unzip \
|
||||
xz-utils \
|
||||
software-properties-common \
|
||||
sudo \
|
||||
apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# LLVM/Clang
|
||||
ENV CLANG_VERSION=9
|
||||
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
|
||||
&& apt-add-repository "deb http://apt.llvm.org/disco/ llvm-toolchain-disco-$CLANG_VERSION main" \
|
||||
&& apt-get update && apt-get install -y \
|
||||
clang-$CLANG_VERSION \
|
||||
clang-tidy-$CLANG_VERSION \
|
||||
clang-format-$CLANG_VERSION \
|
||||
llvm-$CLANG_VERSION-dev \
|
||||
libclang-$CLANG_VERSION-dev \
|
||||
&& update-alternatives \
|
||||
--install /usr/bin/clang clang /usr/bin/clang-$CLANG_VERSION 100 \
|
||||
--slave /usr/bin/clang++ clang++ /usr/bin/clang++-$CLANG_VERSION \
|
||||
--slave /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-$CLANG_VERSION \
|
||||
--slave /usr/bin/clang-format clang-format /usr/bin/clang-format-$CLANG_VERSION
|
||||
|
||||
# GCC
|
||||
ENV GCC_VERSION=9
|
||||
RUN sudo apt-get update \
|
||||
&& sudo apt-get install -y --no-install-recommends \
|
||||
g++-$GCC_VERSION \
|
||||
gcc-$GCC_VERSION \
|
||||
&& sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9
|
||||
|
||||
# Tomahawk deps
|
||||
RUN sudo apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
cmake \
|
||||
libattica-dev \
|
||||
libboost-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-iostreams-dev \
|
||||
libboost-thread-dev \
|
||||
libfftw3-dev \
|
||||
libgnutls28-dev \
|
||||
libgsasl7-dev \
|
||||
liblastfm-dev \
|
||||
liblastfm5-dev \
|
||||
liblucene++-dev \
|
||||
libphonon-dev \
|
||||
libphononexperimental-dev \
|
||||
libqca-qt5-2-dev \
|
||||
libqca2-dev \
|
||||
libqca2-plugins \
|
||||
libqjson-dev \
|
||||
libqt5svg5-dev \
|
||||
libqt5webkit5-dev \
|
||||
libqt5webkit5\
|
||||
libsamplerate0-dev \
|
||||
libsparsehash-dev \
|
||||
libssl-dev \
|
||||
libtelepathy-qt5-dev \
|
||||
libvlc-dev \
|
||||
libvlccore-dev \
|
||||
libx11-dev \
|
||||
libz-dev \
|
||||
qt5-default \
|
||||
qtbase5-dev \
|
||||
qttools5-dev \
|
||||
qttools5-dev-tools \
|
||||
zlib1g-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN git clone --depth 1 https://github.com/zaphoyd/websocketpp.git --branch master --single-branch websocketpp \
|
||||
&& mkdir websocketpp/build && cd websocketpp/build \
|
||||
&& cmake .. \
|
||||
&& sudo cmake --build . -j 16 --target install \
|
||||
&& cd ../.. \
|
||||
&& rm -r websocketpp
|
||||
|
||||
RUN git clone --depth 1 https://github.com/frankosterfeld/qtkeychain.git --branch master --single-branch qtkeychain \
|
||||
&& mkdir qtkeychain/build && cd qtkeychain/build \
|
||||
&& cmake .. \
|
||||
&& sudo cmake --build . -j 16 --target install \
|
||||
&& cd ../.. \
|
||||
&& rm -r qtkeychain
|
||||
|
||||
RUN git clone --depth 1 https://github.com/taglib/taglib.git --branch master --single-branch taglib \
|
||||
&& mkdir taglib/build && cd taglib/build \
|
||||
&& cmake -DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_SHARED_LIBS=ON .. \
|
||||
&& sudo cmake --build . -j 16 --target install \
|
||||
&& cd ../.. \
|
||||
&& rm -r taglib
|
||||
|
||||
RUN git clone --depth 1 https://anongit.kde.org/extra-cmake-modules.git --branch master --single-branch ecm \
|
||||
&& mkdir ecm/build && cd ecm/build \
|
||||
&& cmake -DCMAKE_BUILD_TYPE=Release .. \
|
||||
&& sudo cmake --build . -j 16 --target install \
|
||||
&& cd ../.. \
|
||||
&& rm -r ecm
|
||||
|
||||
RUN git clone --depth 1 https://github.com/KDE/attica.git --branch master --single-branch attica \
|
||||
&& mkdir attica/build && cd attica/build \
|
||||
&& cmake -DCMAKE_BUILD_TYPE=Release .. \
|
||||
&& sudo cmake --build . -j 16 --target install \
|
||||
&& cd ../.. \
|
||||
&& rm -r attica
|
||||
|
||||
RUN git clone --depth 1 https://github.com/stachenov/quazip.git --branch master --single-branch quazip \
|
||||
&& mkdir quazip/build && cd quazip/build \
|
||||
&& cmake -DCMAKE_BUILD_TYPE=Release .. \
|
||||
&& sudo cmake --build . -j 16 --target install \
|
||||
&& cd ../.. \
|
||||
&& rm -r quazip
|
||||
|
||||
RUN git clone --depth 1 https://github.com/euroelessar/jreen.git --branch master --single-branch jreen \
|
||||
&& mkdir jreen/build && cd jreen/build \
|
||||
&& cmake -DCMAKE_BUILD_TYPE=Release .. \
|
||||
&& sudo cmake --build . -j 16 --target install \
|
||||
&& cd ../.. \
|
||||
&& rm -r jreen
|
||||
|
||||
# Language
|
||||
ENV LANG=en_US.UTF-8
|
||||
RUN echo "$LANG UTF-8" > /etc/locale.gen && locale-gen $LANG && update-locale LANG=$LANG
|
||||
|
||||
#entrypoint, if it is last here makes it easy to build new image without rebuilding all layers
|
||||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
COPY build-and-test.sh /usr/local/bin/build-and-test.sh
|
||||
RUN chmod +x /usr/local/bin/build-and-test.sh
|
||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||
|
||||
WORKDIR /tmp/workspace
|
8
Docker/build-and-test.sh
Executable file
8
Docker/build-and-test.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G Ninja -DCMAKE_BUILD_TYPE=${BUILD_TYPE:-Debug} ..
|
||||
ninja
|
||||
ninja install
|
||||
env CTEST_OUTPUT_ON_FAILURE=1 ninja test
|
79
Docker/docker-commands.sh
Executable file
79
Docker/docker-commands.sh
Executable file
@@ -0,0 +1,79 @@
|
||||
#!/bin/bash
|
||||
|
||||
get_repository_root(){
|
||||
local REPOSITORY_ROOT="$(git rev-parse --show-toplevel)"
|
||||
echo "$REPOSITORY_ROOT"
|
||||
}
|
||||
|
||||
get_repository_subdir(){
|
||||
REPOSITORY_ROOT=$(get_repository_root)
|
||||
CUR_DIR=$(pwd)
|
||||
SUB_DIR=$(echo "$CUR_DIR" | grep -oP "^$REPOSITORY_ROOT\K.*")
|
||||
echo "$SUB_DIR"
|
||||
}
|
||||
|
||||
# Run commands inside docker container
|
||||
_docker_run() {
|
||||
REPOSITORY_ROOT=$(get_repository_root)
|
||||
SUB_DIR=$(get_repository_subdir)
|
||||
|
||||
echo "SUB_DIR: " "$SUB_DIR"
|
||||
|
||||
source $REPOSITORY_ROOT/Docker/Docker.variables
|
||||
echo "Starting container: " "$DOCKER_IMAGE_NAME:$DOCKER_IMAGE_VER"
|
||||
|
||||
echo "Got command: " "$*"
|
||||
USER_ID=$(id -u $USER)
|
||||
echo "Using USER_ID:" $USER_ID
|
||||
|
||||
docker run --env LOCAL_USER_ID=$USER_ID \
|
||||
--rm \
|
||||
--volume $REPOSITORY_ROOT:/tmp/workspace \
|
||||
--workdir /tmp/workspace$SUB_DIR \
|
||||
--env "TERM=xterm-256color" \
|
||||
--tty \
|
||||
--privileged \
|
||||
"$DOCKER_IMAGE_NAME:$DOCKER_IMAGE_VER" \
|
||||
$*
|
||||
}
|
||||
|
||||
# 1st command: Run make target inside docker
|
||||
docker-make() {
|
||||
_docker_run make "${@}"
|
||||
}
|
||||
|
||||
# 2nd command: Run bash command inside docker
|
||||
docker-run() {
|
||||
_docker_run "${@}"
|
||||
}
|
||||
|
||||
# 3rd command: Run bash interactive inside docker
|
||||
docker-interactive() {
|
||||
REPOSITORY_ROOT=$(get_repository_root)
|
||||
SUB_DIR=$(get_repository_subdir)
|
||||
|
||||
echo "SUB_DIR: " "$SUB_DIR"
|
||||
|
||||
source $REPOSITORY_ROOT/Docker/Docker.variables
|
||||
echo "Starting container: " "$DOCKER_IMAGE_NAME:$DOCKER_IMAGE_VER"
|
||||
|
||||
echo "Got command: " "$*"
|
||||
USER_ID=$(id -u $USER)
|
||||
echo "Using USER_ID:" $USER_ID
|
||||
|
||||
docker run --env LOCAL_USER_ID=$USER_ID \
|
||||
--rm \
|
||||
--interactive \
|
||||
--volume $REPOSITORY_ROOT:/tmp/workspace \
|
||||
--workdir /tmp/workspace$SUB_DIR \
|
||||
--env "TERM=xterm-256color" \
|
||||
--tty \
|
||||
"$DOCKER_IMAGE_NAME:$DOCKER_IMAGE_VER" /bin/bash
|
||||
}
|
||||
|
||||
docker-help() {
|
||||
echo "docker-make - Run a make target inside docker container"
|
||||
echo "docker-run - Run a specific bash command inside docker container and remove container on exit"
|
||||
echo "docker-interactive - Start an interactive bash session inside docker container and remove it on exit"
|
||||
echo "docker-help - Show this help text"
|
||||
}
|
30
Docker/entrypoint.sh
Executable file
30
Docker/entrypoint.sh
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Add local user
|
||||
# Either use the LOCAL_USER_ID if passed in at runtime or
|
||||
# fallback
|
||||
USER_ID=${LOCAL_USER_ID:-9001}
|
||||
USER=docker
|
||||
UPWD=Docker!
|
||||
|
||||
echo "Starting with USER: $USER and UID : $USER_ID"
|
||||
useradd --shell /bin/bash -u $USER_ID -o -c "docker user" -m "$USER"
|
||||
export HOME=/home/$USER
|
||||
|
||||
# Add user to sudoers
|
||||
echo "docker ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/10-installer
|
||||
# Add root password
|
||||
echo "root":$UPWD | chpasswd
|
||||
# Add user password
|
||||
echo "$USER:$UPWD" | chpasswd
|
||||
|
||||
if [ -z "$CLANG_VERSION" ]; then
|
||||
echo "No CLANG_VERSION set"
|
||||
else
|
||||
echo "alias clang=clang-$CLANG_VERSION" >> $HOME/.bashrc
|
||||
echo "alias clang-tidy=clang-tidy-$CLANG_VERSION" >> $HOME/.bashrc
|
||||
echo "alias clang-format=clang-format-$CLANG_VERSION" >> $HOME/.bashrc
|
||||
fi
|
||||
|
||||
# Startup user
|
||||
exec gosu "$USER" "$@"
|
@@ -39,18 +39,10 @@ Tomahawk provides some tools that help highlight where crashes (of course we onl
|
||||
|
||||
Build the account plugin for Hatchet (http://hatchet.is). Requires [websocketpp](https://github.com/zaphoyd/websocketpp).
|
||||
|
||||
##### ```BUILD_WITH_QT4``` (boolean) (default: ON)
|
||||
|
||||
This enforces CMake to link against Qt4 regardless of whether Qt5 was found or not. Currently Qt4 is still our main development target, so this is still recommended. If you feel adventurous or are preparing Qt5 repositories for your distribution, feel free to give ```-DBUILD_WITH_QT4=OFF``` a shot.
|
||||
|
||||
##### ```WITH_CRASHREPORTER``` (boolean) (default: ON)
|
||||
|
||||
The crash reporter is built by default if libcrashreporter-qt is available in ```thirdparty/libcrashreporter-qt/``` (for example via git submodule). Usually distributions don't allow packagers to upload debug symbols to the Tomahawk HQ so to give crash reports more meaning for us, that's why we have no standardised submit process in place yet. If you can do that in your distribution, please get in touch with us!
|
||||
|
||||
##### ```WITH_KDE``` (boolean) (default: ON)
|
||||
|
||||
The KDE Telepathy plugin to configure Telepathy accounts from our Telepathy plugin can be disabled, if for some reason KDE is available in your build environment but you don't need this plugin.
|
||||
|
||||
##### ```WITH_UPOWER``` (boolean) (default on Linux: ON)
|
||||
|
||||
Build with support for UPower events.
|
||||
|
17
README.md
17
README.md
@@ -1,3 +1,7 @@
|
||||
# This project is essentially abandoned
|
||||
There is no one working on it.
|
||||
There isn't much sense in adding any new issues in the issue tracker unless you want to fix them yourself.
|
||||
|
||||
# WHAT TOMAHAWK IS
|
||||
|
||||
Tomahawk is a free multi-source and cross-platform music player. An application that can play not only your local files, but also stream from services like Spotify, Beats, SoundCloud, Google Music, YouTube and many others. You can even connect with your friends' Tomahawks, share your musical gems or listen along with them. Let the music play!
|
||||
@@ -63,23 +67,22 @@ You can download one of our nightly or stable builds:
|
||||
|
||||
### Detailed Build Instructions
|
||||
|
||||
| Linux: | [Arch](http://wiki.tomahawk-player.org/index.php/Building_ArchLinux_package) **-** [Debian](http://wiki.tomahawk-player.org/index.php/Building_on_Debian) **-** [Fedora](http://wiki.tomahawk-player.org/index.php/Building_on_Fedora) **-** [openSUSE](http://wiki.tomahawk-player.org/index.php/Building_on_openSUSE) **-** [Ubuntu](http://wiki.tomahawk-player.org/index.php/Building_on_Ubuntu) |
|
||||
| Linux: | [Arch](https://github.com/tomahawk-player/tomahawk/wiki/ArchLinux---Build-Instructions) **-** [Debian](https://github.com/tomahawk-player/tomahawk/wiki/Debian-Build-Instructions) **-** [Fedora](https://github.com/tomahawk-player/tomahawk/wiki/Fedora-Build-Instructions) **-** [Ubuntu](https://github.com/tomahawk-player/tomahawk/wiki/Ubuntu---Build-Instructions) |
|
||||
|------:|:------|
|
||||
| **Windows**: | [**Windows**](http://wiki.tomahawk-player.org/index.php/Building_Windows_Binary) |
|
||||
| **Mac**: | [**OS X**](http://wiki.tomahawk-player.org/index.php/Building_OS_X_Application_Bundle) |
|
||||
| **Windows**: | [**Windows**](https://github.com/tomahawk-player/tomahawk/wiki/Windows-Build-Instructions) |
|
||||
| **Mac**: | [**OS X**](https://github.com/tomahawk-player/tomahawk/wiki/OS-X---Build-Instructions) |
|
||||
|
||||
### Dependencies
|
||||
|
||||
Required dependencies:
|
||||
|
||||
* [CMake 3](http://www.cmake.org/)
|
||||
* [Qt 5.4.0](http://qt-project.org/)
|
||||
* [Qt >= 5.4.0](http://qt-project.org/)
|
||||
* [VLC 2.1.0](https://videolan.org/vlc/)
|
||||
* [SQLite 3.6.22](http://www.sqlite.org/)
|
||||
* [TagLib 1.8](https://taglib.github.io/)
|
||||
* [Boost 1.3](http://www.boost.org/)
|
||||
* [Lucene++ 3.0.6](https://github.com/luceneplusplus/LucenePlusPlus/)
|
||||
* [libechonest 2.3.1](http://projects.kde.org/projects/playground/libs/libechonest/)
|
||||
* [Attica 5.6.0](http://ftp.kde.org/stable/attica/)
|
||||
* [QuaZip 0.4.3](http://quazip.sourceforge.net/)
|
||||
* [liblastfm 1.0.9](https://github.com/lastfm/liblastfm/)
|
||||
@@ -87,6 +90,10 @@ Required dependencies:
|
||||
* [Sparsehash](https://code.google.com/p/sparsehash/)
|
||||
* [GnuTLS](http://gnutls.org/)
|
||||
|
||||
If you are using Qt>5.6 you need to build and install QtWebKit
|
||||
|
||||
* [QtWebKit](https://github.com/qt/qtwebkit)
|
||||
|
||||
The following dependencies are optional (but *recommended*):
|
||||
|
||||
* [Jreen 1.1.1](http://qutim.org/jreen/)
|
||||
|
@@ -25,13 +25,13 @@ function(tomahawk_add_library)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
if(LIBRARY_UI)
|
||||
qt_wrap_ui(LIBRARY_UI_SOURCES ${LIBRARY_UI})
|
||||
qt5_wrap_ui(LIBRARY_UI_SOURCES ${LIBRARY_UI})
|
||||
list(APPEND LIBRARY_SOURCES ${LIBRARY_UI_SOURCES})
|
||||
endif()
|
||||
|
||||
# add resources from current dir
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/resources.qrc")
|
||||
qt_add_resources(LIBRARY_RC_SOURCES "resources.qrc")
|
||||
qt5_add_resources(LIBRARY_RC_SOURCES "resources.qrc")
|
||||
list(APPEND LIBRARY_SOURCES ${LIBRARY_RC_SOURCES})
|
||||
unset(LIBRARY_RC_SOURCES)
|
||||
endif()
|
||||
@@ -45,9 +45,6 @@ function(tomahawk_add_library)
|
||||
add_library(${target} SHARED ${LIBRARY_SOURCES})
|
||||
endif()
|
||||
|
||||
# HACK: add qt modules - every lib should define its own set of modules
|
||||
qt5_use_modules(${target} Core Network Widgets Sql Xml ${LIBRARY_QT5_MODULES})
|
||||
|
||||
# definitions - can this be moved into set_target_properties below?
|
||||
add_definitions(${QT_DEFINITIONS})
|
||||
set_target_properties(${target} PROPERTIES AUTOMOC TRUE)
|
||||
@@ -70,12 +67,12 @@ function(tomahawk_add_library)
|
||||
endif()
|
||||
|
||||
# add link targets
|
||||
target_link_libraries(${target} ${TOMAHAWK_LIBRARIES})
|
||||
target_link_libraries(${target} PRIVATE ${TOMAHAWK_LIBRARIES})
|
||||
if(LIBRARY_LINK_LIBRARIES)
|
||||
target_link_libraries(${target} ${LIBRARY_LINK_LIBRARIES})
|
||||
target_link_libraries(${target} PUBLIC ${LIBRARY_LINK_LIBRARIES})
|
||||
endif()
|
||||
if(LIBRARY_LINK_PRIVATE_LIBRARIES)
|
||||
target_link_libraries(${target} LINK_PRIVATE ${LIBRARY_LINK_PRIVATE_LIBRARIES})
|
||||
target_link_libraries(${target} PRIVATE ${LIBRARY_LINK_PRIVATE_LIBRARIES})
|
||||
endif()
|
||||
|
||||
# add soversion
|
||||
|
@@ -2,7 +2,7 @@ INCLUDE( InstallRequiredSystemLibraries )
|
||||
|
||||
SET( CPACK_PACKAGE_CONTACT "Dominik Schmidt <domme@tomahawk-player.org>" )
|
||||
|
||||
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
|
||||
SET( CPACK_PACKAGE_FILE_NAME "${TOMAHAWK_TARGET_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_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
|
||||
@@ -13,7 +13,9 @@ SET( CPACK_PACKAGE_DESCRIPTION_SUMMARY ${TOMAHAWK_DESCRIPTION_SUMMARY} ) # Des
|
||||
SET( CPACK_PACKAGE_INSTALL_DIRECTORY ${TOMAHAWK_APPLICATION_NAME} ) # Installation directory on the target system -> C:\Program Files\fellody
|
||||
SET( CPACK_PACKAGE_INSTALL_REGISTRY_KEY ${TOMAHAWK_APPLICATION_NAME} ) # Registry key used when installing this project CMake 2.5.0
|
||||
SET( CPACK_PACKAGE_NAME ${TOMAHAWK_APPLICATION_NAME} ) # Package name, defaults to the project name
|
||||
SET( CPACK_PACKAGE_TARGET_NAME ${TOMAHAWK_TARGET_NAME} ) # Used to build library and executable names
|
||||
SET( CPACK_PACKAGE_VENDOR ${TOMAHAWK_ORGANIZATION_NAME} ) # Package vendor name
|
||||
SET( TOMAHAWK_APPLICATION_PACKAGE_NAME ${TOMAHAWK_APPLICATION_PACKAGE_NAME} )
|
||||
SET( CPACK_PACKAGE_VERSION_MAJOR ${TOMAHAWK_VERSION_MAJOR} )
|
||||
SET( CPACK_PACKAGE_VERSION_MINOR ${TOMAHAWK_VERSION_MINOR} )
|
||||
SET( CPACK_PACKAGE_VERSION_PATCH ${TOMAHAWK_VERSION_PATCH} )
|
||||
|
@@ -1,105 +1,3 @@
|
||||
#FIXME: this duplicates top level cmakelists: how can we reduce code duplication?
|
||||
|
||||
set( TOMAHAWK_QT5 @TOMAHAWK_QT5@ )
|
||||
|
||||
if(TOMAHAWK_QT5)
|
||||
message(STATUS "Found Qt5! Be aware that Qt5-support is still experimental and not officially supported!")
|
||||
|
||||
# CMAKE 2.8.13+/3.0.0+ requires these for IMPORTed targets
|
||||
find_package(Qt5Core REQUIRED)
|
||||
find_package(Qt5Concurrent REQUIRED)
|
||||
find_package(Qt5Svg REQUIRED)
|
||||
find_package(Qt5UiTools REQUIRED)
|
||||
find_package(Qt5WebKitWidgets REQUIRED)
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
find_package(Qt5Xml REQUIRED)
|
||||
find_package(Qt5Sql REQUIRED)
|
||||
|
||||
macro(qt_wrap_ui)
|
||||
qt5_wrap_ui(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(qt_add_resources)
|
||||
qt5_add_resources(${ARGN})
|
||||
endmacro()
|
||||
|
||||
find_package(Qt5LinguistTools REQUIRED)
|
||||
macro(qt_add_translation)
|
||||
qt5_add_translation(${ARGN})
|
||||
endmacro()
|
||||
|
||||
if( UNIX AND NOT APPLE )
|
||||
# We need this to find the paths to qdbusxml2cpp and co
|
||||
find_package(Qt5DBus REQUIRED)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
find_package(Qt5MacExtras REQUIRED)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
find_package(Qt5WinExtras REQUIRED)
|
||||
endif()
|
||||
|
||||
macro(qt_wrap_ui)
|
||||
qt5_wrap_ui(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(qt_add_resources)
|
||||
qt5_add_resources(${ARGN})
|
||||
endmacro()
|
||||
|
||||
find_package(Qt5LinguistTools REQUIRED)
|
||||
macro(qt_add_translation)
|
||||
qt5_add_translation(${ARGN})
|
||||
endmacro()
|
||||
|
||||
if( UNIX AND NOT APPLE )
|
||||
macro(qt_add_dbus_interface)
|
||||
qt5_add_dbus_interface(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(qt_add_dbus_adaptor)
|
||||
qt5_add_dbus_adaptor(${ARGN})
|
||||
endmacro()
|
||||
endif()
|
||||
|
||||
macro(setup_qt)
|
||||
endmacro()
|
||||
|
||||
set(QT_RCC_EXECUTABLE "${Qt5Core_RCC_EXECUTABLE}")
|
||||
#FIXME: CrashReporter depends on deprecated QHttp
|
||||
set(WITH_KDE4 OFF)
|
||||
|
||||
else(TOMAHAWK_QT5)
|
||||
find_package(Qt4 COMPONENTS QtNetwork QtCore QtGui QtSql REQUIRED)
|
||||
include( ${QT_USE_FILE} )
|
||||
|
||||
set(NEEDED_QT4_COMPONENTS "QtCore" "QtXml" "QtNetwork")
|
||||
if(BUILD_GUI OR NOT DEFINED BUILD_GUI)
|
||||
list(APPEND NEEDED_QT4_COMPONENTS "QtGui" "QtWebkit" "QtUiTools" "QtSvg")
|
||||
endif()
|
||||
|
||||
find_package(Qt4 4.7.0 COMPONENTS ${NEEDED_QT4_COMPONENTS})
|
||||
include( ${QT_USE_FILE} )
|
||||
|
||||
macro(qt5_use_modules)
|
||||
endmacro()
|
||||
|
||||
macro(qt_wrap_ui)
|
||||
qt4_wrap_ui(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(qt_add_resources)
|
||||
qt4_add_resources(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(qt_add_translation)
|
||||
qt4_add_translation(${ARGN})
|
||||
endmacro()
|
||||
endif(TOMAHAWK_QT5)
|
||||
|
||||
|
||||
if(NOT TOMAHAWK_CMAKE_DIR)
|
||||
set(TOMAHAWK_CMAKE_DIR ${CMAKE_CURRENT_LIST_DIR})
|
||||
endif()
|
||||
|
@@ -5,23 +5,23 @@
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Tomahawk</string>
|
||||
<string>@TOMAHAWK_APPLICATION_NAME@</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.tomahawk-player.Tomahawk</string>
|
||||
<string>@TOMAHAWK_APPLICATION_PACKAGE_NAME@</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>TOMAHAWK_VERSION</string>
|
||||
<string>@TOMAHAWK_VERSION@</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>TOMAHAWK_VERSION</string>
|
||||
<string>@TOMAHAWK_VERSION@</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>tomahawk</string>
|
||||
<string>@TOMAHAWK_BASE_TARGET_NAME@</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>Tomahawk.icns</string>
|
||||
<string>@TOMAHAWK_APPLICATION_NAME@.icns</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Tomahawk</string>
|
||||
<string>@TOMAHAWK_APPLICATION_NAME@</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.7.0</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
@@ -29,7 +29,7 @@
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<true />
|
||||
<key>SUFeedURL</key>
|
||||
<string>http://download.tomahawk-player.org/sparkle/update.php</string>
|
||||
<string>@TOMAHAWK_SPARKLE_UPDATE_URL@</string>
|
||||
<key>SUPublicDSAKeyFile</key>
|
||||
<string>sparkle_pub.pem</string>
|
||||
<key>SUEnableSystemProfiling</key>
|
||||
|
@@ -4,8 +4,9 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
set -e
|
||||
TARGET_NAME="Tomahawk"
|
||||
|
||||
set -e
|
||||
|
||||
function header {
|
||||
echo -e "\033[0;34m==>\033[0;0;1m $1 \033[0;0m"
|
||||
@@ -31,30 +32,28 @@ CERT_SIGNER=$2
|
||||
################################################################################
|
||||
|
||||
header "Fixing and copying libraries"
|
||||
$ROOT/../admin/mac/macdeploy.py Tomahawk.app quiet
|
||||
$ROOT/../admin/mac/macdeploy.py "${TARGET_NAME}.app" quiet
|
||||
|
||||
cd Tomahawk.app
|
||||
cd "${TARGET_NAME}.app"
|
||||
|
||||
cp $ROOT/../admin/mac/qt.conf Contents/Resources/qt.conf
|
||||
|
||||
# header "Copying Sparkle framework"
|
||||
# cp -R /Library/Frameworks/Sparkle.framework Contents/Frameworks
|
||||
|
||||
header "Creating DMG"
|
||||
cd ..
|
||||
header "Fixing fonts"
|
||||
mkdir "${ROOT}/${TARGET_NAME}.app/Contents/Resources/Fonts"
|
||||
cp -R $ROOT/../data/fonts/*.ttf "${ROOT}/${TARGET_NAME}.app/Contents/Resources/Fonts"
|
||||
|
||||
header "Signing bundle"
|
||||
# codesign -s "Developer ID Application: $CERT_SIGNER" -f -v ./Tomahawk.app
|
||||
|
||||
cd ..
|
||||
if [ -f ~/sign_step.sh ];
|
||||
then
|
||||
~/sign_step.sh "$CERT_SIGNER" "Tomahawk.app" || true
|
||||
~/sign_step.sh "$CERT_SIGNER" "${TARGET_NAME}.app"
|
||||
fi
|
||||
|
||||
$ROOT/../admin/mac/create-dmg.sh Tomahawk.app
|
||||
mv Tomahawk.dmg Tomahawk-$VERSION.dmg
|
||||
header "Creating DMG"
|
||||
$ROOT/../admin/mac/create-dmg.sh "${TARGET_NAME}.app"
|
||||
mv "${TARGET_NAME}.dmg" "${TARGET_NAME}-$VERSION.dmg"
|
||||
|
||||
header "Creating signed Sparkle update"
|
||||
$ROOT/../admin/mac/sign_bundle.rb $VERSION ~/tomahawk_sparkle_privkey.pem
|
||||
# $ROOT/../admin/mac/sign_bundle.rb "${TARGET_NAME}" $VERSION ~/tomahawk_sparkle_privkey.pem
|
||||
|
||||
header "Done!"
|
||||
|
@@ -43,7 +43,7 @@ ln -s /Applications "$TMP/Applications"
|
||||
cp -R "$IN" "$TMP"
|
||||
|
||||
# create
|
||||
hdiutil makehybrid -hfs -hfs-volume-name Tomahawk -hfs-openfolder "$TMP" "$TMP" -o tmp.dmg
|
||||
hdiutil makehybrid -hfs -hfs-volume-name "$NAME" -hfs-openfolder "$TMP" "$TMP" -o tmp.dmg
|
||||
hdiutil convert -format UDZO -imagekey zlib-level=9 tmp.dmg -o "$OUT"
|
||||
|
||||
# cleanup
|
||||
|
@@ -22,171 +22,170 @@ import commands
|
||||
import sys
|
||||
import glob
|
||||
|
||||
TARGET_NAME="tomahawk"
|
||||
|
||||
FRAMEWORK_SEARCH_PATH=[
|
||||
'/Library/Frameworks',
|
||||
os.path.join(os.environ['HOME'], 'Library/Frameworks')
|
||||
]
|
||||
|
||||
LIBRARY_SEARCH_PATH=['/usr/local/lib', '/usr/local/Cellar/gettext/0.19.2/lib', '.']
|
||||
LIBRARY_SEARCH_PATH=['/usr/local/lib', '/usr/local/opt/vlc/lib', '/usr/local/Cellar/gettext/0.19.2/lib', '.']
|
||||
|
||||
VLC_PLUGINS=[
|
||||
'access/libattachment_plugin.dylib',
|
||||
#'access/libaccess_avio_plugin.dylib',
|
||||
#'access/libaccess_fake_plugin.dylib',
|
||||
'access/libftp_plugin.dylib',
|
||||
'access/libhttp_plugin.dylib',
|
||||
'access/libimem_plugin.dylib',
|
||||
#'access/libaccess_mmap_plugin.dylib',
|
||||
'access/libaccess_mms_plugin.dylib',
|
||||
'access/libaccess_realrtsp_plugin.dylib',
|
||||
'access/libtcp_plugin.dylib',
|
||||
'access/libudp_plugin.dylib',
|
||||
'access/libcdda_plugin.dylib',
|
||||
'access/libfilesystem_plugin.dylib',
|
||||
'access/libqtcapture_plugin.dylib',
|
||||
'access/librtp_plugin.dylib',
|
||||
'access/libzip_plugin.dylib',
|
||||
'access_output/libaccess_output_dummy_plugin.dylib',
|
||||
'access_output/libaccess_output_file_plugin.dylib',
|
||||
'access_output/libaccess_output_http_plugin.dylib',
|
||||
'access_output/libaccess_output_shout_plugin.dylib',
|
||||
'access_output/libaccess_output_udp_plugin.dylib',
|
||||
'audio_filter/liba52tofloat32_plugin.dylib',
|
||||
'audio_filter/liba52tospdif_plugin.dylib',
|
||||
'audio_filter/libaudio_format_plugin.dylib',
|
||||
'audio_filter/libaudiobargraph_a_plugin.dylib',
|
||||
'audio_filter/libchorus_flanger_plugin.dylib',
|
||||
'libattachment_plugin.dylib',
|
||||
#'libaccess_avio_plugin.dylib',
|
||||
#'libaccess_fake_plugin.dylib',
|
||||
'libftp_plugin.dylib',
|
||||
'libhttp_plugin.dylib',
|
||||
'libhttplive_plugin.dylib',
|
||||
'libimem_plugin.dylib',
|
||||
#'libaccess_mmap_plugin.dylib',
|
||||
'libaccess_mms_plugin.dylib',
|
||||
'libaccess_realrtsp_plugin.dylib',
|
||||
'libtcp_plugin.dylib',
|
||||
'libudp_plugin.dylib',
|
||||
'libcdda_plugin.dylib',
|
||||
'libfilesystem_plugin.dylib',
|
||||
'libqtcapture_plugin.dylib',
|
||||
'librtp_plugin.dylib',
|
||||
'libzip_plugin.dylib',
|
||||
'liba52tofloat32_plugin.dylib',
|
||||
'liba52tospdif_plugin.dylib',
|
||||
'libaudio_format_plugin.dylib',
|
||||
'libaudiobargraph_a_plugin.dylib',
|
||||
'libchorus_flanger_plugin.dylib',
|
||||
#'libconverter_fixed_plugin.dylib',
|
||||
'audio_filter/libdolby_surround_decoder_plugin.dylib',
|
||||
'audio_filter/libdtstofloat32_plugin.dylib',
|
||||
'audio_filter/libdtstospdif_plugin.dylib',
|
||||
'audio_filter/libequalizer_plugin.dylib',
|
||||
'audio_filter/libheadphone_channel_mixer_plugin.dylib',
|
||||
'audio_filter/libmono_plugin.dylib',
|
||||
'audio_filter/libmpgatofixed32_plugin.dylib',
|
||||
'audio_filter/libnormvol_plugin.dylib',
|
||||
'audio_filter/libparam_eq_plugin.dylib',
|
||||
'audio_filter/libscaletempo_plugin.dylib',
|
||||
'audio_filter/libsimple_channel_mixer_plugin.dylib',
|
||||
'audio_filter/libspatializer_plugin.dylib',
|
||||
'audio_filter/libtrivial_channel_mixer_plugin.dylib',
|
||||
'audio_filter/libugly_resampler_plugin.dylib',
|
||||
'audio_mixer/libfloat_mixer_plugin.dylib',
|
||||
'libdolby_surround_decoder_plugin.dylib',
|
||||
'libdtstofloat32_plugin.dylib',
|
||||
'libdtstospdif_plugin.dylib',
|
||||
'libequalizer_plugin.dylib',
|
||||
'libheadphone_channel_mixer_plugin.dylib',
|
||||
'libmono_plugin.dylib',
|
||||
'libmpgatofixed32_plugin.dylib',
|
||||
'libnormvol_plugin.dylib',
|
||||
'libparam_eq_plugin.dylib',
|
||||
'libscaletempo_plugin.dylib',
|
||||
'libsimple_channel_mixer_plugin.dylib',
|
||||
'libspatializer_plugin.dylib',
|
||||
'libtrivial_channel_mixer_plugin.dylib',
|
||||
'libugly_resampler_plugin.dylib',
|
||||
'libfloat_mixer_plugin.dylib',
|
||||
#'libspdif_mixer_plugin.dylib',
|
||||
#'libtrivial_mixer_plugin.dylib',
|
||||
#'libaout_file_plugin.dylib',
|
||||
'audio_output/libauhal_plugin.dylib',
|
||||
'codec/liba52_plugin.dylib',
|
||||
'codec/libadpcm_plugin.dylib',
|
||||
'codec/libaes3_plugin.dylib',
|
||||
'codec/libaraw_plugin.dylib',
|
||||
'codec/libavcodec_plugin.dylib',
|
||||
'codec/libcc_plugin.dylib',
|
||||
'codec/libcdg_plugin.dylib',
|
||||
'codec/libdts_plugin.dylib',
|
||||
'codec/libfaad_plugin.dylib',
|
||||
'libauhal_plugin.dylib',
|
||||
'liba52_plugin.dylib',
|
||||
'libadpcm_plugin.dylib',
|
||||
'libaes3_plugin.dylib',
|
||||
'libaraw_plugin.dylib',
|
||||
'libavcodec_plugin.dylib',
|
||||
'libcc_plugin.dylib',
|
||||
'libcdg_plugin.dylib',
|
||||
'libdts_plugin.dylib',
|
||||
'libfaad_plugin.dylib',
|
||||
#'libfake_plugin.dylib',
|
||||
'codec/libflac_plugin.dylib',
|
||||
'libflac_plugin.dylib',
|
||||
#'libfluidsynth_plugin.dylib',
|
||||
#'libinvmem_plugin.dylib',
|
||||
'codec/liblpcm_plugin.dylib',
|
||||
'codec/libmpeg_audio_plugin.dylib',
|
||||
'codec/libpng_plugin.dylib',
|
||||
'codec/librawvideo_plugin.dylib',
|
||||
'codec/libspeex_plugin.dylib',
|
||||
'codec/libspudec_plugin.dylib',
|
||||
'codec/libtheora_plugin.dylib',
|
||||
'codec/libtwolame_plugin.dylib',
|
||||
'codec/libvorbis_plugin.dylib',
|
||||
#'control/libgestures_plugin.dylib',
|
||||
'liblpcm_plugin.dylib',
|
||||
'libmpeg_audio_plugin.dylib',
|
||||
'libpng_plugin.dylib',
|
||||
'librawvideo_plugin.dylib',
|
||||
'libspeex_plugin.dylib',
|
||||
'libspudec_plugin.dylib',
|
||||
'libtheora_plugin.dylib',
|
||||
'libtwolame_plugin.dylib',
|
||||
'libvorbis_plugin.dylib',
|
||||
#'libgestures_plugin.dylib',
|
||||
#'libhotkeys_plugin.dylib',
|
||||
#'libmotion_plugin.dylib',
|
||||
#'libnetsync_plugin.dylib',
|
||||
#'libsignals_plugin.dylib',
|
||||
'demux/libaiff_plugin.dylib',
|
||||
'demux/libasf_plugin.dylib',
|
||||
'demux/libau_plugin.dylib',
|
||||
'libaiff_plugin.dylib',
|
||||
'libasf_plugin.dylib',
|
||||
'libau_plugin.dylib',
|
||||
#'libavformat_plugin.dylib',
|
||||
'demux/libavi_plugin.dylib',
|
||||
'demux/libdemux_cdg_plugin.dylib',
|
||||
'demux/libdemuxdump_plugin.dylib',
|
||||
'demux/libdiracsys_plugin.dylib',
|
||||
'demux/libes_plugin.dylib',
|
||||
'demux/libflacsys_plugin.dylib',
|
||||
'access/liblive555_plugin.dylib',
|
||||
'demux/libmkv_plugin.dylib',
|
||||
'demux/libmod_plugin.dylib',
|
||||
'demux/libmp4_plugin.dylib',
|
||||
'demux/libmpc_plugin.dylib',
|
||||
'demux/libmpgv_plugin.dylib',
|
||||
'demux/libnsc_plugin.dylib',
|
||||
'demux/libnsv_plugin.dylib',
|
||||
'demux/libnuv_plugin.dylib',
|
||||
'demux/libogg_plugin.dylib',
|
||||
'demux/libplaylist_plugin.dylib',
|
||||
'demux/libps_plugin.dylib',
|
||||
'demux/libpva_plugin.dylib',
|
||||
'demux/librawaud_plugin.dylib',
|
||||
'demux/librawdv_plugin.dylib',
|
||||
'demux/librawvid_plugin.dylib',
|
||||
'demux/libreal_plugin.dylib',
|
||||
'demux/libsmf_plugin.dylib',
|
||||
'demux/libts_plugin.dylib',
|
||||
'demux/libtta_plugin.dylib',
|
||||
'demux/libty_plugin.dylib',
|
||||
'demux/libvc1_plugin.dylib',
|
||||
'demux/libvoc_plugin.dylib',
|
||||
'demux/libwav_plugin.dylib',
|
||||
'demux/libxa_plugin.dylib',
|
||||
'meta_engine/libfolder_plugin.dylib',
|
||||
'meta_engine/libtaglib_plugin.dylib',
|
||||
'libavi_plugin.dylib',
|
||||
'libdemux_cdg_plugin.dylib',
|
||||
'libdemuxdump_plugin.dylib',
|
||||
'libdiracsys_plugin.dylib',
|
||||
'libes_plugin.dylib',
|
||||
'libflacsys_plugin.dylib',
|
||||
'liblive555_plugin.dylib',
|
||||
'libmkv_plugin.dylib',
|
||||
'libmod_plugin.dylib',
|
||||
'libmp4_plugin.dylib',
|
||||
'libmpc_plugin.dylib',
|
||||
'libmpgv_plugin.dylib',
|
||||
'libnsc_plugin.dylib',
|
||||
'libnsv_plugin.dylib',
|
||||
'libnuv_plugin.dylib',
|
||||
'libogg_plugin.dylib',
|
||||
'libplaylist_plugin.dylib',
|
||||
'libps_plugin.dylib',
|
||||
'libpva_plugin.dylib',
|
||||
'librawaud_plugin.dylib',
|
||||
'librawdv_plugin.dylib',
|
||||
'librawvid_plugin.dylib',
|
||||
'libreal_plugin.dylib',
|
||||
'libsmf_plugin.dylib',
|
||||
'libts_plugin.dylib',
|
||||
'libtta_plugin.dylib',
|
||||
'libty_plugin.dylib',
|
||||
'libvc1_plugin.dylib',
|
||||
'libvoc_plugin.dylib',
|
||||
'libwav_plugin.dylib',
|
||||
'libxa_plugin.dylib',
|
||||
'libfolder_plugin.dylib',
|
||||
'libtaglib_plugin.dylib',
|
||||
#'libaudioscrobbler_plugin.dylib',
|
||||
'control/libdummy_plugin.dylib',
|
||||
'misc/libexport_plugin.dylib',
|
||||
'libdummy_plugin.dylib',
|
||||
'libexport_plugin.dylib',
|
||||
#'libfreetype_plugin.dylib',
|
||||
#'libgnutls_plugin.dylib',
|
||||
'misc/liblogger_plugin.dylib',
|
||||
'lua/liblua_plugin.dylib',
|
||||
'liblogger_plugin.dylib',
|
||||
'liblua_plugin.dylib',
|
||||
#'libosd_parser_plugin.dylib',
|
||||
#'libquartztext_plugin.dylib',
|
||||
#'libstats_plugin.dylib',
|
||||
'misc/libvod_rtsp_plugin.dylib',
|
||||
'misc/libxml_plugin.dylib',
|
||||
'libvod_rtsp_plugin.dylib',
|
||||
'libxml_plugin.dylib',
|
||||
#'libxtag_plugin.dylib',
|
||||
'video_chroma/libi420_rgb_mmx_plugin.dylib',
|
||||
'video_chroma/libi420_yuy2_mmx_plugin.dylib',
|
||||
'video_chroma/libi422_yuy2_mmx_plugin.dylib',
|
||||
'libi420_rgb_mmx_plugin.dylib',
|
||||
'libi420_yuy2_mmx_plugin.dylib',
|
||||
'libi422_yuy2_mmx_plugin.dylib',
|
||||
#'libmemcpymmx_plugin.dylib',
|
||||
#'libmemcpymmxext_plugin.dylib',
|
||||
'mux/libmux_asf_plugin.dylib',
|
||||
'mux/libmux_avi_plugin.dylib',
|
||||
'mux/libmux_dummy_plugin.dylib',
|
||||
'mux/libmux_mp4_plugin.dylib',
|
||||
'mux/libmux_mpjpeg_plugin.dylib',
|
||||
'mux/libmux_ogg_plugin.dylib',
|
||||
'mux/libmux_ps_plugin.dylib',
|
||||
'mux/libmux_ts_plugin.dylib',
|
||||
'mux/libmux_wav_plugin.dylib',
|
||||
'packetizer/libpacketizer_copy_plugin.dylib',
|
||||
'packetizer/libpacketizer_dirac_plugin.dylib',
|
||||
'packetizer/libpacketizer_flac_plugin.dylib',
|
||||
'packetizer/libpacketizer_h264_plugin.dylib',
|
||||
'packetizer/libpacketizer_mlp_plugin.dylib',
|
||||
'packetizer/libpacketizer_mpeg4audio_plugin.dylib',
|
||||
'packetizer/libpacketizer_mpeg4video_plugin.dylib',
|
||||
'packetizer/libpacketizer_mpegvideo_plugin.dylib',
|
||||
'packetizer/libpacketizer_vc1_plugin.dylib',
|
||||
'video_chroma/libi420_rgb_sse2_plugin.dylib',
|
||||
'video_chroma/libi420_yuy2_sse2_plugin.dylib',
|
||||
'video_chroma/libi422_yuy2_sse2_plugin.dylib',
|
||||
'stream_filter/libdecomp_plugin.dylib',
|
||||
#'access/libstream_filter_rar_plugin.dylib',
|
||||
'stream_filter/librecord_plugin.dylib',
|
||||
'libmux_asf_plugin.dylib',
|
||||
'libmux_avi_plugin.dylib',
|
||||
'libmux_dummy_plugin.dylib',
|
||||
'libmux_mp4_plugin.dylib',
|
||||
'libmux_mpjpeg_plugin.dylib',
|
||||
'libmux_ogg_plugin.dylib',
|
||||
'libmux_ps_plugin.dylib',
|
||||
'libmux_ts_plugin.dylib',
|
||||
'libmux_wav_plugin.dylib',
|
||||
'libpacketizer_copy_plugin.dylib',
|
||||
'libpacketizer_dirac_plugin.dylib',
|
||||
'libpacketizer_flac_plugin.dylib',
|
||||
'libpacketizer_h264_plugin.dylib',
|
||||
'libpacketizer_mlp_plugin.dylib',
|
||||
'libpacketizer_mpeg4audio_plugin.dylib',
|
||||
'libpacketizer_mpeg4video_plugin.dylib',
|
||||
'libpacketizer_mpegvideo_plugin.dylib',
|
||||
'libpacketizer_vc1_plugin.dylib',
|
||||
'libi420_rgb_sse2_plugin.dylib',
|
||||
'libi420_yuy2_sse2_plugin.dylib',
|
||||
'libi422_yuy2_sse2_plugin.dylib',
|
||||
'libdecomp_plugin.dylib',
|
||||
#'libstream_filter_rar_plugin.dylib',
|
||||
'librecord_plugin.dylib',
|
||||
#'libvisual_plugin.dylib',
|
||||
'libsecuretransport_plugin.dylib'
|
||||
]
|
||||
|
||||
VLC_SEARCH_PATH=[
|
||||
'/usr/local/lib/vlc/plugins/',
|
||||
'/usr/local/opt/vlc/lib/vlc/plugins/',
|
||||
]
|
||||
|
||||
QT_PLUGINS = [
|
||||
@@ -201,39 +200,39 @@ QT_PLUGINS = [
|
||||
]
|
||||
|
||||
SNORE_PLUGINS = [
|
||||
# 'libsnore_backend_growl.so',
|
||||
# 'libsnore_backend_osxnotificationcenter.so',
|
||||
'libsnore_backend_growl.so',
|
||||
'libsnore_backend_osxnotificationcenter.so',
|
||||
]
|
||||
|
||||
TOMAHAWK_PLUGINS = [
|
||||
'libtomahawk_account_xmpp.dylib',
|
||||
'libtomahawk_account_google.so',
|
||||
'libtomahawk_account_zeroconf.so',
|
||||
# 'libtomahawk_account_hatchet.so',
|
||||
'libtomahawk_infoplugin_adium.so',
|
||||
'libtomahawk_infoplugin_charts.so',
|
||||
'libtomahawk_infoplugin_discogs.so',
|
||||
'libtomahawk_infoplugin_echonest.so',
|
||||
'libtomahawk_infoplugin_hypem.so',
|
||||
'libtomahawk_infoplugin_musicbrainz.so',
|
||||
'libtomahawk_infoplugin_musixmatch.so',
|
||||
'libtomahawk_infoplugin_newreleases.so',
|
||||
'libtomahawk_infoplugin_rovi.so',
|
||||
# 'libtomahawk_infoplugin_snorenotify.so',
|
||||
'libtomahawk_infoplugin_spotify.so',
|
||||
'libtomahawk_viewpage_dashboard.so',
|
||||
# 'libtomahawk_viewpage_networkactivity.so',
|
||||
'libtomahawk_viewpage_charts.so',
|
||||
'libtomahawk_viewpage_newreleases.so',
|
||||
'libtomahawk_viewpage_whatsnew_0_8.so',
|
||||
'lib%s_account_xmpp.dylib' % TARGET_NAME,
|
||||
'lib%s_account_google.so' % TARGET_NAME,
|
||||
'lib%s_account_zeroconf.so' % TARGET_NAME,
|
||||
'lib%s_account_hatchet.so' % TARGET_NAME,
|
||||
'lib%s_infoplugin_adium.so' % TARGET_NAME,
|
||||
'lib%s_infoplugin_charts.so' % TARGET_NAME,
|
||||
# 'lib%s_infoplugin_discogs.so' % TARGET_NAME,
|
||||
'lib%s_infoplugin_echonest.so' % TARGET_NAME,
|
||||
'lib%s_infoplugin_hypem.so' % TARGET_NAME,
|
||||
# 'lib%s_infoplugin_musicbrainz.so' % TARGET_NAME,
|
||||
'lib%s_infoplugin_musixmatch.so' % TARGET_NAME,
|
||||
'lib%s_infoplugin_newreleases.so' % TARGET_NAME,
|
||||
# 'lib%s_infoplugin_rovi.so' % TARGET_NAME,
|
||||
'lib%s_infoplugin_snorenotify.so' % TARGET_NAME,
|
||||
'lib%s_infoplugin_spotify.so' % TARGET_NAME,
|
||||
'lib%s_viewpage_dashboard.so' % TARGET_NAME,
|
||||
# 'lib%s_viewpage_networkactivity.so' % TARGET_NAME,
|
||||
'lib%s_viewpage_charts.so' % TARGET_NAME,
|
||||
'lib%s_viewpage_newreleases.so' % TARGET_NAME,
|
||||
'lib%s_viewpage_whatsnew_0_8.so' % TARGET_NAME,
|
||||
]
|
||||
|
||||
QT_PLUGINS_SEARCH_PATH=[
|
||||
'/usr/local/Cellar/qt5/5.4.0/plugins',
|
||||
'/usr/local/opt/qt5/plugins',
|
||||
]
|
||||
|
||||
SNORE_PLUGINS_SEARCH_PATH=[
|
||||
'/usr/local/Cellar/snorenotify/HEAD/lib/libsnore',
|
||||
'/usr/local/opt/snorenotify/lib/plugins/libsnore-qt5',
|
||||
]
|
||||
|
||||
class Error(Exception):
|
||||
@@ -247,6 +246,8 @@ class CouldNotFindQtPluginErrorFindFrameworkError(Error):
|
||||
class InstallNameToolError(Error):
|
||||
pass
|
||||
|
||||
class CouldNotFindFrameworkError(Error):
|
||||
pass
|
||||
|
||||
class CouldNotFindQtPluginError(Error):
|
||||
pass
|
||||
@@ -308,7 +309,7 @@ def GetBrokenLibraries(binary):
|
||||
continue # unix style system library
|
||||
elif re.match(r'Breakpad', line):
|
||||
continue # Manually added by cmake.
|
||||
elif re.match(r'^\s*@executable_path', line) or re.match(r'^\s*@loader_path', line):
|
||||
elif re.match(r'^\s*@executable_path', line) or re.match(r'^\s*@loader_path', line) and not re.match(r'^\s*@loader_path/../lib', line):
|
||||
# Potentially already fixed library
|
||||
if '.framework' in line:
|
||||
relative_path = os.path.join(*line.split('/')[3:])
|
||||
@@ -332,6 +333,11 @@ def FindFramework(path):
|
||||
if os.path.exists(abs_path):
|
||||
return abs_path
|
||||
|
||||
# replace rpath with /Library/Frameworks for Sparkle
|
||||
abs_path = path.replace("@rpath/", "/Library/Frameworks/")
|
||||
if os.path.exists(abs_path):
|
||||
return abs_path
|
||||
|
||||
raise CouldNotFindFrameworkError(path)
|
||||
|
||||
def FindLibrary(path):
|
||||
@@ -576,12 +582,12 @@ for plugin in TOMAHAWK_PLUGINS:
|
||||
FixPlugin(plugin, '../MacOS')
|
||||
|
||||
for plugin in SNORE_PLUGINS:
|
||||
FixPlugin(FindSnorePlugin(plugin), '../MacOS/libsnore')
|
||||
FixPlugin(FindSnorePlugin(plugin), '../lib/plugins/libsnore-qt5')
|
||||
|
||||
try:
|
||||
FixPlugin('tomahawk_crash_reporter', '../MacOS')
|
||||
FixPlugin('%s_crash_reporter' % TARGET_NAME, '../MacOS')
|
||||
except:
|
||||
print 'Failed to find tomahawk_crash_reporter'
|
||||
print 'Failed to find %s_crash_reporter' % TARGET_NAME
|
||||
|
||||
for plugin in QT_PLUGINS:
|
||||
FixPlugin(FindQtPlugin(plugin), os.path.dirname(plugin))
|
||||
|
@@ -6,9 +6,9 @@ if ARGV.length < 2
|
||||
exit
|
||||
end
|
||||
|
||||
tarball = "tomahawk-#{ARGV[0]}.tar.bz2"
|
||||
tarball = "#{ARGV[0].downcase}-#{ARGV[1]}.tar.bz2"
|
||||
puts "Zipping: #{tarball}..."
|
||||
`tar jcvf "#{tarball}" Tomahawk.app`
|
||||
`tar jcvf "#{tarball}" #{ARGV[0]}.app`
|
||||
|
||||
puts "Signing..."
|
||||
puts `openssl dgst -sha1 -binary < "#{tarball}" | openssl dgst -dss1 -sign "#{ARGV[1]}" | openssl enc -base64`
|
||||
puts `openssl dgst -sha1 -binary < "#{tarball}" | openssl dgst -dss1 -sign "#{ARGV[2]}" | openssl enc -base64`
|
||||
|
@@ -1,12 +0,0 @@
|
||||
[Protocol]
|
||||
exec=/path/to/binary "%u"
|
||||
protocol=tomahawk
|
||||
input=none
|
||||
output=none
|
||||
helper=true
|
||||
listing=
|
||||
reading=false
|
||||
writing=false
|
||||
makedir=false
|
||||
deleting=false
|
||||
|
@@ -9,19 +9,20 @@ fi
|
||||
|
||||
rm -rvf vlc/
|
||||
|
||||
VLC_TARBALL="vlc.tar.bz2"
|
||||
|
||||
echo "Download phonon archive..."
|
||||
# wget -c "http://downloads.sourceforge.net/project/vlc/1.1.9/win32/vlc-1.1.9-win32.7z?r=http%3A%2F%2Fwww.videolan.org%2Fvlc%2Fdownload-windows.html&ts=1306272584&use_mirror=leaseweb"
|
||||
# wget -c "http://download.tomahawk-player.org/tomahawk-vlc-0.1.zip"
|
||||
# wget -c http://people.videolan.org/~jb/phonon/phonon-vlc-last.7z
|
||||
# wget -c http://people.videolan.org/~jb/phonon/phonon_phonon-vlc_20111128.7z
|
||||
wget -c http://download.tomahawk-player.org/test/vlc.tar.bz2
|
||||
wget -c "http://download.tomahawk-player.org/test/$VLC_TARBALL"
|
||||
|
||||
echo "Extract binary..."
|
||||
# 7z x phonon*.7z
|
||||
# mv -v vlc-*/ vlc/
|
||||
# unzip tomahawk-vlc-0.1.zip
|
||||
tar xvjf vlc.tar.bz2
|
||||
tar xvjf "$VLC_TARBALL"
|
||||
|
||||
# echo "Download phonon_vlc_no_video.dll..."
|
||||
# wget -c http://people.videolan.org/~jb/phonon/phonon_vlc_no_video.dll
|
||||
@@ -72,7 +73,9 @@ rm -rvf \
|
||||
**/libi420* \
|
||||
**/libi422* \
|
||||
mux/ \
|
||||
stream_filter/ \
|
||||
stream_filter/*dash* \
|
||||
stream_filter/*smooth* \
|
||||
stream_filter/*record* \
|
||||
**/libtheora_plugin* \
|
||||
**/liblibbluray_plugin* \
|
||||
**/libdtv_plugin* \
|
||||
|
13
data/images/folder.svg
Normal file
13
data/images/folder.svg
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="86px" height="86px" viewBox="0 0 86 86" 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>folder</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="folder" sketch:type="MSLayerGroup" transform="translate(0.000000, 13.000000)" fill="#000000">
|
||||
<g id="Page-1" sketch:type="MSShapeGroup">
|
||||
<path d="M84.1450038,10.4833376 C82.8248024,9.1092149 80.9427764,8.3195294 78.9789985,8.3195294 L72.233622,8.3195294 L34.4730823,8.3195294 L34.4730823,7.0184614 C34.4730823,3.1483061 31.3247762,0 27.4563602,0 L10.1441555,0 C6.27226058,0 3.12569415,3.1500456 3.12569415,7.0184614 L3.12569415,9.4918821 C1.2088801,10.761641 0,12.9237099 0,15.3362515 L0,54.4987445 C0,54.5057021 0,54.5178779 0.0017394,54.5265748 L0,54.5439688 C0,58.3897726 3.14656684,61.5154666 7.0184614,61.5154666 L72.2336242,61.5154666 C72.4736608,61.5154666 72.7102186,61.5050302 72.9432977,61.4789393 C72.9850432,61.4771999 73.028528,61.4650241 73.0702735,61.4615453 C73.2616071,61.4389332 73.4529406,61.4145816 73.6390559,61.3745755 C73.6686257,61.3693573 73.6947166,61.3606604 73.7242863,61.3519634 C73.9225774,61.3119573 74.1208685,61.2597754 74.3139414,61.200636 C74.3243778,61.1954178 74.3348142,61.191939 74.3452506,61.1884602 C76.756053,60.4300837 78.5998126,58.4123847 79.1059765,55.9198305 C79.1077159,55.912873 79.1077159,55.9024366 79.1077159,55.895479 C79.1512008,55.6937091 79.18251,55.4919392 79.2051221,55.2797329 C79.2103403,55.2240723 79.2155585,55.1684116 79.2190373,55.1092721 C79.2277343,55.0136054 79.2433888,54.9266356 79.2451282,54.8309688 L85.9539776,15.7937099 L85.9939837,15.4127822 C86.0705187,13.5587047 85.4147685,11.8086925 84.1450038,10.4833376 C84.1450038,10.4833376 85.4147685,11.8086925 84.1450038,10.4833376 L84.1450038,10.4833376" id="Shape"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.1 KiB |
55
data/images/nav-back.svg
Normal file
55
data/images/nav-back.svg
Normal file
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="24px" height="24px" viewBox="0 0 24 24" 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>nav-back</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="nav-back" sketch:type="MSLayerGroup" transform="translate(4.000000, 6.000000)">
|
||||
<g id="Layer_2"></g>
|
||||
<g id="Layer_3"></g>
|
||||
<g id="Layer_4"></g>
|
||||
<g id="Layer_5"></g>
|
||||
<g id="Layer_6"></g>
|
||||
<g id="Layer_8"></g>
|
||||
<g id="Layer_9"></g>
|
||||
<g id="Layer_10"></g>
|
||||
<g id="Layer_11"></g>
|
||||
<g id="Layer_12"></g>
|
||||
<g id="Layer_13"></g>
|
||||
<g id="Layer_14"></g>
|
||||
<g id="Layer_15"></g>
|
||||
<g id="Layer_16"></g>
|
||||
<g id="Layer_17"></g>
|
||||
<g id="Layer_18"></g>
|
||||
<g id="Layer_19"></g>
|
||||
<g id="Layer_20"></g>
|
||||
<g id="Layer_21"></g>
|
||||
<g id="Layer_24"></g>
|
||||
<g id="Layer_25"></g>
|
||||
<g id="Layer_26"></g>
|
||||
<g id="Layer_27"></g>
|
||||
<g id="Layer_28"></g>
|
||||
<g id="Layer_29"></g>
|
||||
<g id="Layer_47"></g>
|
||||
<g id="Layer_30"></g>
|
||||
<g id="Layer_31"></g>
|
||||
<g id="Layer_32"></g>
|
||||
<g id="Layer_33"></g>
|
||||
<g id="Layer_34"></g>
|
||||
<g id="Layer_35"></g>
|
||||
<g id="Layer_36"></g>
|
||||
<g id="Layer_37"></g>
|
||||
<g id="Layer_38" transform="translate(2.000000, 0.000000)" fill="#000000" sketch:type="MSShapeGroup">
|
||||
<path d="M9.7,13.9 L-0.3,7 L9.7,0.1 L10.3,0.9 L1.5,7 L10.3,13.1 L9.7,13.9 Z" id="Shape"></path>
|
||||
</g>
|
||||
<g id="Layer_39"></g>
|
||||
<g id="Layer_40"></g>
|
||||
<g id="Layer_41"></g>
|
||||
<g id="Layer_42"></g>
|
||||
<g id="Layer_43"></g>
|
||||
<g id="Layer_44"></g>
|
||||
<g id="Layer_45"></g>
|
||||
<g id="Layer_46"></g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.2 KiB |
55
data/images/nav-forward.svg
Normal file
55
data/images/nav-forward.svg
Normal file
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="24px" height="24px" viewBox="0 0 24 24" 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>nav-forward</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="nav-forward" sketch:type="MSLayerGroup" transform="translate(6.000000, 6.000000)">
|
||||
<g id="Layer_2"></g>
|
||||
<g id="Layer_3"></g>
|
||||
<g id="Layer_4"></g>
|
||||
<g id="Layer_5"></g>
|
||||
<g id="Layer_6"></g>
|
||||
<g id="Layer_8"></g>
|
||||
<g id="Layer_9"></g>
|
||||
<g id="Layer_10"></g>
|
||||
<g id="Layer_11"></g>
|
||||
<g id="Layer_12"></g>
|
||||
<g id="Layer_13"></g>
|
||||
<g id="Layer_14"></g>
|
||||
<g id="Layer_15"></g>
|
||||
<g id="Layer_16"></g>
|
||||
<g id="Layer_17"></g>
|
||||
<g id="Layer_18"></g>
|
||||
<g id="Layer_19"></g>
|
||||
<g id="Layer_20"></g>
|
||||
<g id="Layer_21"></g>
|
||||
<g id="Layer_24"></g>
|
||||
<g id="Layer_25"></g>
|
||||
<g id="Layer_26"></g>
|
||||
<g id="Layer_27"></g>
|
||||
<g id="Layer_28"></g>
|
||||
<g id="Layer_29"></g>
|
||||
<g id="Layer_47"></g>
|
||||
<g id="Layer_30"></g>
|
||||
<g id="Layer_31"></g>
|
||||
<g id="Layer_32"></g>
|
||||
<g id="Layer_33"></g>
|
||||
<g id="Layer_34"></g>
|
||||
<g id="Layer_35"></g>
|
||||
<g id="Layer_36"></g>
|
||||
<g id="Layer_37"></g>
|
||||
<g id="Layer_38"></g>
|
||||
<g id="Layer_39"></g>
|
||||
<g id="Layer_40"></g>
|
||||
<g id="Layer_41" transform="translate(2.000000, 0.000000)" fill="#000000" sketch:type="MSShapeGroup">
|
||||
<path d="M0.5,13.7 L-0.1,12.9 L8.3,7 L-0.1,1.1 L0.5,0.3 L10.1,7 L0.5,13.7 Z" id="Shape"></path>
|
||||
</g>
|
||||
<g id="Layer_42"></g>
|
||||
<g id="Layer_43"></g>
|
||||
<g id="Layer_44"></g>
|
||||
<g id="Layer_45"></g>
|
||||
<g id="Layer_46"></g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.2 KiB |
@@ -42,6 +42,8 @@ Tomahawk.apiVersion = "0.2.2";
|
||||
//Statuses considered a success for HTTP request
|
||||
var httpSuccessStatuses = [200, 201];
|
||||
|
||||
Tomahawk.error = console.error;
|
||||
|
||||
// install RSVP error handler for uncaught(!) errors
|
||||
RSVP.on('error', function (reason) {
|
||||
var resolverName = "";
|
||||
@@ -49,9 +51,9 @@ RSVP.on('error', function (reason) {
|
||||
resolverName = Tomahawk.resolver.instance.settings.name + " - ";
|
||||
}
|
||||
if (reason) {
|
||||
console.error(resolverName + 'Uncaught error:', reason);
|
||||
Tomahawk.error(resolverName + 'Uncaught error:', reason);
|
||||
} else {
|
||||
console.error(resolverName + 'Uncaught error: error thrown from RSVP but it was empty');
|
||||
Tomahawk.error(resolverName + 'Uncaught error: error thrown from RSVP but it was empty');
|
||||
}
|
||||
});
|
||||
|
||||
@@ -273,30 +275,45 @@ Tomahawk.Resolver = {
|
||||
getStreamUrl: function (params) {
|
||||
return params;
|
||||
},
|
||||
getDownloadUrl: function (params) {
|
||||
return params;
|
||||
},
|
||||
resolve: function() {
|
||||
},
|
||||
_adapter_resolve: function (params) {
|
||||
return RSVP.Promise.resolve(this.resolve(params)).then(function (results) {
|
||||
return {
|
||||
'tracks': results
|
||||
};
|
||||
if(Array.isArray(results)) {
|
||||
return {
|
||||
'tracks': results
|
||||
};
|
||||
}
|
||||
|
||||
return results;
|
||||
});
|
||||
},
|
||||
|
||||
_adapter_search: function (params) {
|
||||
return RSVP.Promise.resolve(this.search(params)).then(function (results) {
|
||||
return {
|
||||
'tracks': results
|
||||
};
|
||||
if(Array.isArray(results)) {
|
||||
return {
|
||||
'tracks': results
|
||||
};
|
||||
}
|
||||
|
||||
return results;
|
||||
});
|
||||
},
|
||||
|
||||
_adapter_testConfig: function (config) {
|
||||
return RSVP.Promise.resolve(this.testConfig(config)).then(function () {
|
||||
return {result: Tomahawk.ConfigTestResultType.Success};
|
||||
return RSVP.Promise.resolve(this.testConfig(config)).then(function (results) {
|
||||
results = results || Tomahawk.ConfigTestResultType.Success;
|
||||
return results;
|
||||
}, function (error) {
|
||||
return error;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// help functions
|
||||
|
||||
Tomahawk.valueForSubNode = function (node, tag) {
|
||||
@@ -367,48 +384,6 @@ Tomahawk.retrievedMetadata = function (metadataId, metadata, error) {
|
||||
delete Tomahawk.retrieveMetadataCallbacks[metadataId];
|
||||
};
|
||||
|
||||
/**
|
||||
* Internal counter used to identify asyncRequest callback from native code.
|
||||
*/
|
||||
Tomahawk.asyncRequestIdCounter = 0;
|
||||
/**
|
||||
* Internal map used to map asyncRequestIds to the respective javascript
|
||||
* callback functions.
|
||||
*/
|
||||
Tomahawk.asyncRequestCallbacks = {};
|
||||
|
||||
/**
|
||||
* Pass the natively retrieved reply back to the javascript callback
|
||||
* and augment the fake XMLHttpRequest object.
|
||||
*
|
||||
* Internal use only!
|
||||
*/
|
||||
Tomahawk.nativeAsyncRequestDone = function (reqId, xhr) {
|
||||
// Check that we have a matching callback stored.
|
||||
if (!Tomahawk.asyncRequestCallbacks.hasOwnProperty(reqId)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Call the real callback
|
||||
if (xhr.readyState == 4 && httpSuccessStatuses.indexOf(xhr.status) != -1) {
|
||||
// Call the real callback
|
||||
if (Tomahawk.asyncRequestCallbacks[reqId].callback) {
|
||||
Tomahawk.asyncRequestCallbacks[reqId].callback(xhr);
|
||||
}
|
||||
} else if (xhr.readyState === 4) {
|
||||
Tomahawk.log("Failed to do nativeAsyncRequest");
|
||||
Tomahawk.log("Status Code was: " + xhr.status);
|
||||
if (Tomahawk.asyncRequestCallbacks[reqId].errorHandler) {
|
||||
Tomahawk.asyncRequestCallbacks[reqId].errorHandler(xhr);
|
||||
}
|
||||
}
|
||||
|
||||
// Callbacks are only used once.
|
||||
delete Tomahawk.asyncRequestCallbacks[reqId];
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This method is externalized from Tomahawk.asyncRequest, so that other clients
|
||||
* (like tomahawk-android) can inject their own logic that determines whether or not to do a request
|
||||
@@ -423,9 +398,9 @@ var shouldDoNativeRequest = function (options) {
|
||||
|| extraHeaders.hasOwnProperty("User-Agent")));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Possible options:
|
||||
* - url: The URL to call
|
||||
* - method: The HTTP request method (default: GET)
|
||||
* - username: The username for HTTP Basic Auth
|
||||
* - password: The password for HTTP Basic Auth
|
||||
@@ -443,7 +418,12 @@ var doRequest = function(options) {
|
||||
return this.responseHeaders;
|
||||
};
|
||||
xhr.getResponseHeader = function (header) {
|
||||
return this.responseHeaders[header];
|
||||
for(key in xhr.responseHeaders) {
|
||||
if(key.toLowerCase() === header.toLowerCase()) {
|
||||
return xhr.responseHeaders[key];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
return xhr;
|
||||
@@ -735,7 +715,6 @@ Tomahawk.base64Encode = function (b) {
|
||||
return window.btoa(b);
|
||||
};
|
||||
|
||||
|
||||
Tomahawk.PluginManager = {
|
||||
wrapperPrefix: '_adapter_',
|
||||
objects: {},
|
||||
@@ -766,8 +745,6 @@ Tomahawk.PluginManager = {
|
||||
methodName = this.wrapperPrefix + methodName;
|
||||
}
|
||||
|
||||
|
||||
var pluginManager = this;
|
||||
if (!this.objects[objectId]) {
|
||||
Tomahawk.log("Object not found! objectId: " + objectId + " methodName: " + methodName);
|
||||
} else {
|
||||
@@ -788,20 +765,21 @@ Tomahawk.PluginManager = {
|
||||
invoke: function (requestId, objectId, methodName, params) {
|
||||
RSVP.Promise.resolve(this.invokeSync(requestId, objectId, methodName, params))
|
||||
.then(function (result) {
|
||||
Tomahawk.reportScriptJobResults({
|
||||
var params = {
|
||||
requestId: requestId,
|
||||
data: result
|
||||
});
|
||||
};
|
||||
Tomahawk.reportScriptJobResults(encodeParamsToNativeFunctions(params));
|
||||
}, function (error) {
|
||||
Tomahawk.reportScriptJobResults({
|
||||
var params = {
|
||||
requestId: requestId,
|
||||
error: error
|
||||
});
|
||||
};
|
||||
Tomahawk.reportScriptJobResults(encodeParamsToNativeFunctions(params));
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
var encodeParamsToNativeFunctions = function(param) {
|
||||
return param;
|
||||
};
|
||||
@@ -815,7 +793,7 @@ Tomahawk.NativeScriptJobManager = {
|
||||
var requestId = this.idCounter++;
|
||||
var deferred = RSVP.defer();
|
||||
this.deferreds[requestId] = deferred;
|
||||
Tomahawk.invokeNativeScriptJob(requestId, methodName, encodeParamsToNativeFunctions(params));;
|
||||
Tomahawk.invokeNativeScriptJob(requestId, methodName, encodeParamsToNativeFunctions(params));
|
||||
return deferred.promise;
|
||||
},
|
||||
reportNativeScriptJobResult: function(requestId, result) {
|
||||
@@ -1484,9 +1462,7 @@ Tomahawk.Collection = {
|
||||
return new RSVP.Promise(function (resolve, reject) {
|
||||
that.cachedDbs[id].changeVersion(that.cachedDbs[id].version, "", null,
|
||||
function (err) {
|
||||
if (console.error) {
|
||||
console.error("Error!: %o", err);
|
||||
}
|
||||
Tomahawk.error("Error trying to change db version!", err);
|
||||
reject();
|
||||
}, function () {
|
||||
delete that.cachedDbs[id];
|
||||
@@ -1790,6 +1766,9 @@ Tomahawk.Collection = {
|
||||
this.settings.capabilities = [Tomahawk.Collection.BrowseCapability.Artists,
|
||||
Tomahawk.Collection.BrowseCapability.Albums,
|
||||
Tomahawk.Collection.BrowseCapability.Tracks];
|
||||
if (!this.settings.weight && this.resolver && this.resolver.settings.weight) {
|
||||
this.settings.weight = this.resolver.settings.weight;
|
||||
}
|
||||
return this.settings;
|
||||
},
|
||||
|
||||
@@ -1798,6 +1777,14 @@ Tomahawk.Collection = {
|
||||
return this.resolver.getStreamUrl(params);
|
||||
}
|
||||
|
||||
return params;
|
||||
},
|
||||
|
||||
getDownloadUrl: function(params) {
|
||||
if(this.resolver) {
|
||||
return this.resolver.getDownloadUrl(params);
|
||||
}
|
||||
|
||||
return params;
|
||||
}
|
||||
};
|
||||
|
BIN
data/sounds/silence.ogg
Normal file
BIN
data/sounds/silence.ogg
Normal file
Binary file not shown.
@@ -19,9 +19,11 @@ macro(add_tomahawk_translations language)
|
||||
set( tomahawk_i18n_qrc_content "${tomahawk_i18n_qrc_content}</qresource>\n" )
|
||||
set( tomahawk_i18n_qrc_content "${tomahawk_i18n_qrc_content}</RCC>\n" )
|
||||
|
||||
file( WRITE ${CMAKE_BINARY_DIR}/lang/tomahawk_i18n.qrc "${tomahawk_i18n_qrc_content}" )
|
||||
# Write file and configure it aferwards to make it a BYPRODUCT: https://gitlab.kitware.com/cmake/cmake/issues/16367
|
||||
file( WRITE ${CMAKE_BINARY_DIR}/lang/tomahawk_i18n.qrc.in "${tomahawk_i18n_qrc_content}" )
|
||||
configure_file(${CMAKE_BINARY_DIR}/lang/tomahawk_i18n.qrc.in ${CMAKE_BINARY_DIR}/lang/tomahawk_i18n.qrc COPYONLY)
|
||||
|
||||
qt_add_translation(QM_FILES ${TS_FILES})
|
||||
qt5_add_translation(QM_FILES ${TS_FILES})
|
||||
|
||||
## HACK HACK HACK - around rcc limitations to allow out of source-tree building
|
||||
set( trans_file tomahawk_i18n )
|
||||
|
@@ -3,6 +3,7 @@
|
||||
<file>data/images/collection_background.png</file>
|
||||
<file>data/images/playlist_background.png</file>
|
||||
<file>data/images/filter.svg</file>
|
||||
<file>data/images/folder.svg</file>
|
||||
<file>data/images/loved.svg</file>
|
||||
<file>data/images/love.svg</file>
|
||||
<file>data/images/not-loved.svg</file>
|
||||
@@ -167,5 +168,8 @@
|
||||
<file>data/images/repeat-one.svg</file>
|
||||
<file>data/images/downloads.svg</file>
|
||||
<file>data/images/downloadbutton.svg</file>
|
||||
<file>data/images/nav-back.svg</file>
|
||||
<file>data/images/nav-forward.svg</file>
|
||||
<file>data/sounds/silence.ogg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@@ -1,7 +1,5 @@
|
||||
include( ${PROJECT_BINARY_DIR}/TomahawkUse.cmake )
|
||||
|
||||
setup_qt()
|
||||
|
||||
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/libtomahawk )
|
||||
include_directories( ${CMAKE_CURRENT_LIST_DIR}/libtomahawk )
|
||||
|
||||
|
@@ -24,13 +24,6 @@ include_directories(
|
||||
|
||||
add_definitions(-D_WEBSOCKETPP_CPP11_STL_)
|
||||
|
||||
if(APPLE)
|
||||
# http://stackoverflow.com/questions/7226753/osx-lion-xcode-4-1-how-do-i-setup-a-c0x-project/7236451#7236451
|
||||
add_definitions(-std=c++11 -stdlib=libc++ -U__STRICT_ANSI__)
|
||||
set(PLATFORM_SPECIFIC_LINK_LIBRARIES "/usr/lib/libc++.dylib")
|
||||
else()
|
||||
add_definitions(-std=c++0x)
|
||||
endif()
|
||||
|
||||
tomahawk_add_plugin(hatchet
|
||||
TYPE account
|
||||
|
@@ -25,11 +25,6 @@
|
||||
#include "utils/Logger.h"
|
||||
#include "TomahawkSettings.h"
|
||||
|
||||
// Forward Declarations breaking QSharedPointer
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include "Source.h"
|
||||
#endif
|
||||
|
||||
|
||||
// remove now playing status after PAUSE_TIMEOUT seconds
|
||||
static const int PAUSE_TIMEOUT = 10;
|
||||
@@ -69,6 +64,13 @@ Tomahawk::InfoSystem::XmppInfoPlugin::init()
|
||||
}
|
||||
|
||||
|
||||
const QString
|
||||
Tomahawk::InfoSystem::XmppInfoPlugin::friendlyName() const
|
||||
{
|
||||
return "xmpp";
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Tomahawk::InfoSystem::XmppInfoPlugin::pushInfo( Tomahawk::InfoSystem::InfoPushData pushData )
|
||||
{
|
||||
|
@@ -38,16 +38,18 @@ namespace Tomahawk {
|
||||
XmppInfoPlugin(XmppSipPlugin* parent);
|
||||
virtual ~XmppInfoPlugin();
|
||||
|
||||
const QString friendlyName() const override;
|
||||
|
||||
signals:
|
||||
void publishTune( QUrl url, Tomahawk::InfoSystem::InfoStringHash trackInfo );
|
||||
|
||||
public slots:
|
||||
void notInCacheSlot( const Tomahawk::InfoSystem::InfoStringHash criteria, Tomahawk::InfoSystem::InfoRequestData requestData );
|
||||
void notInCacheSlot( const Tomahawk::InfoSystem::InfoStringHash criteria, Tomahawk::InfoSystem::InfoRequestData requestData ) override;
|
||||
|
||||
protected slots:
|
||||
void init();
|
||||
void pushInfo( Tomahawk::InfoSystem::InfoPushData pushData );
|
||||
void getInfo( Tomahawk::InfoSystem::InfoRequestData requestData );
|
||||
void init() override;
|
||||
void pushInfo( Tomahawk::InfoSystem::InfoPushData pushData ) override;
|
||||
void getInfo( Tomahawk::InfoSystem::InfoRequestData requestData ) override;
|
||||
|
||||
private slots:
|
||||
void audioStarted( const Tomahawk::InfoSystem::PushInfoPair& pushInfoPair );
|
||||
|
@@ -66,29 +66,6 @@ using namespace Accounts;
|
||||
#define TOMAHAWK_CAP_NODE_NAME QLatin1String( "http://tomahawk-player.org/" )
|
||||
|
||||
|
||||
#if QT_VERSION <= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
void
|
||||
JreenMessageHandler( QtMsgType type, const char *msg )
|
||||
{
|
||||
switch ( type )
|
||||
{
|
||||
case QtDebugMsg:
|
||||
tDebug( LOGTHIRDPARTY ).nospace() << JREEN_LOG_INFIX << ":" << "Debug:" << msg;
|
||||
break;
|
||||
case QtWarningMsg:
|
||||
tDebug( LOGTHIRDPARTY ).nospace() << JREEN_LOG_INFIX << ":" << "Warning:" << msg;
|
||||
break;
|
||||
case QtCriticalMsg:
|
||||
tDebug( LOGTHIRDPARTY ).nospace() << JREEN_LOG_INFIX << ":" << "Critical:" << msg;
|
||||
break;
|
||||
case QtFatalMsg:
|
||||
tDebug( LOGTHIRDPARTY ).nospace() << JREEN_LOG_INFIX << ":" << "Fatal:" << msg;
|
||||
abort();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
XmppSipPlugin::XmppSipPlugin( Account* account )
|
||||
: SipPlugin( account )
|
||||
, m_state( Account::Disconnected )
|
||||
@@ -96,9 +73,6 @@ XmppSipPlugin::XmppSipPlugin( Account* account )
|
||||
, m_xmlConsole( nullptr )
|
||||
, m_pubSubManager( nullptr )
|
||||
{
|
||||
#if QT_VERSION <= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
Jreen::Logger::addHandler( JreenMessageHandler );
|
||||
#endif
|
||||
|
||||
m_currentUsername = readUsername();
|
||||
m_currentServer = readServer();
|
||||
@@ -194,9 +168,9 @@ InfoSystem::InfoPluginPtr
|
||||
XmppSipPlugin::infoPlugin()
|
||||
{
|
||||
if ( m_infoPlugin.isNull() )
|
||||
m_infoPlugin = QPointer< Tomahawk::InfoSystem::XmppInfoPlugin >( new Tomahawk::InfoSystem::XmppInfoPlugin( this ) );
|
||||
m_infoPlugin = QSharedPointer< Tomahawk::InfoSystem::XmppInfoPlugin >( new Tomahawk::InfoSystem::XmppInfoPlugin( this ) );
|
||||
|
||||
return InfoSystem::InfoPluginPtr( m_infoPlugin.data() );
|
||||
return m_infoPlugin;
|
||||
}
|
||||
|
||||
|
||||
@@ -285,7 +259,7 @@ XmppSipPlugin::onConnect()
|
||||
// load XmppInfoPlugin
|
||||
if ( infoPlugin() && Tomahawk::InfoSystem::InfoSystem::instance()->workerThread() )
|
||||
{
|
||||
infoPlugin().data()->moveToThread( Tomahawk::InfoSystem::InfoSystem::instance()->workerThread().data() );
|
||||
infoPlugin()->moveToThread( Tomahawk::InfoSystem::InfoSystem::instance()->workerThread().data() );
|
||||
Tomahawk::InfoSystem::InfoSystem::instance()->addInfoPlugin( infoPlugin() );
|
||||
}
|
||||
|
||||
@@ -359,7 +333,6 @@ XmppSipPlugin::onDisconnect( Jreen::Client::DisconnectReason reason )
|
||||
if ( !m_infoPlugin.isNull() )
|
||||
{
|
||||
Tomahawk::InfoSystem::InfoSystem::instance()->removeInfoPlugin( infoPlugin() );
|
||||
delete m_infoPlugin;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -128,7 +128,7 @@ private:
|
||||
int m_currentPort;
|
||||
QString m_currentResource;
|
||||
|
||||
QPointer< Tomahawk::InfoSystem::XmppInfoPlugin > m_infoPlugin;
|
||||
QSharedPointer< Tomahawk::InfoSystem::XmppInfoPlugin > m_infoPlugin;
|
||||
Tomahawk::Accounts::Account::ConnectionState m_state;
|
||||
|
||||
// sort out
|
||||
|
@@ -54,14 +54,14 @@ public:
|
||||
Account::ConnectionState connectionState() const;
|
||||
|
||||
public slots:
|
||||
void connectPlugin();
|
||||
void disconnectPlugin();
|
||||
void connectPlugin() override;
|
||||
void disconnectPlugin() override;
|
||||
|
||||
void advertise();
|
||||
|
||||
virtual void sendSipInfos( const Tomahawk::peerinfo_ptr& /* receiver */, const QList<SipInfo>& /* info */ ) {}
|
||||
virtual void sendSipInfos( const Tomahawk::peerinfo_ptr& /* receiver */, const QList<SipInfo>& /* info */ ) override {}
|
||||
void broadcastMsg( const QString& ) {}
|
||||
bool addContact( const QString&, AddContactOptions, const QString& ) { return false; }
|
||||
bool addContact( const QString&, AddContactOptions, const QString& ) override { return false; }
|
||||
|
||||
private slots:
|
||||
void lanHostFound( const QString& host, int port, const QString& name, const QString& nodeid );
|
||||
|
@@ -3,13 +3,11 @@ cmake_policy(SET CMP0017 NEW)
|
||||
|
||||
set(TOMAHAWK_CRASH_REPORTER_TARGET ${TOMAHAWK_BASE_TARGET_NAME}_crash_reporter)
|
||||
|
||||
setup_qt()
|
||||
|
||||
list(APPEND crashreporter_SOURCES main.cpp)
|
||||
list(APPEND crashreporter_RC resources.qrc)
|
||||
|
||||
qt_wrap_ui( crashreporter_UI_HEADERS ${crashreporter_UI} )
|
||||
qt_add_resources( crashreporter_RC_RCC ${crashreporter_RC} )
|
||||
qt5_wrap_ui( crashreporter_UI_HEADERS ${crashreporter_UI} )
|
||||
qt5_add_resources( crashreporter_RC_RCC ${crashreporter_RC} )
|
||||
|
||||
|
||||
if(BUILD_RELEASE)
|
||||
@@ -43,7 +41,7 @@ target_link_libraries( ${TOMAHAWK_CRASH_REPORTER_TARGET}
|
||||
${QT_LIBRARIES}
|
||||
)
|
||||
|
||||
target_link_libraries(${TOMAHAWK_CRASH_REPORTER_TARGET} Qt5::Widgets Qt5::Network)
|
||||
|
||||
set_target_properties(${TOMAHAWK_CRASH_REPORTER_TARGET} PROPERTIES AUTOMOC ON)
|
||||
install(TARGETS ${TOMAHAWK_CRASH_REPORTER_TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR})
|
||||
|
||||
qt5_use_modules(${TOMAHAWK_CRASH_REPORTER_TARGET} Widgets Network)
|
||||
|
@@ -174,7 +174,7 @@ int main( int argc, char* argv[] )
|
||||
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.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><p>Can you tell us what you were doing when this happened?</p></body></html>");
|
||||
|
||||
reporter.setReportData( "BuildID", CRASHREPORTER_BUILD_ID );
|
||||
reporter.setReportData( "ProductName", CRASHREPORTER_PRODUCT_NAME );
|
||||
|
@@ -1,5 +1,4 @@
|
||||
include_directories(
|
||||
${ECHONEST_INCLUDE_DIR}
|
||||
${Boost_INCLUDE_DIR}
|
||||
)
|
||||
if(WIN32 OR APPLE)
|
||||
@@ -15,14 +14,13 @@ endif()
|
||||
endif(WIN32 OR APPLE)
|
||||
|
||||
list(APPEND simple_plugins
|
||||
Echonest
|
||||
Charts
|
||||
NewReleases
|
||||
Spotify
|
||||
#Spotify
|
||||
Hypem
|
||||
MusixMatch
|
||||
MusicBrainz
|
||||
Rovi
|
||||
#Rovi
|
||||
Discogs
|
||||
)
|
||||
|
||||
|
@@ -23,11 +23,7 @@
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/NetworkAccessManager.h"
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
#include <echonest5/ArtistTypes.h>
|
||||
#else
|
||||
#include <echonest/ArtistTypes.h>
|
||||
#endif
|
||||
|
||||
#include <QNetworkConfiguration>
|
||||
|
||||
|
@@ -25,11 +25,7 @@
|
||||
#include "infosystem/InfoSystem.h"
|
||||
#include "infosystem/InfoSystemWorker.h"
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
#include <echonest5/Artist.h>
|
||||
#else
|
||||
#include <echonest/Artist.h>
|
||||
#endif
|
||||
|
||||
#include <QObject>
|
||||
|
||||
|
@@ -22,6 +22,7 @@
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/NetworkAccessManager.h"
|
||||
#include "TomahawkVersion.h"
|
||||
|
||||
#include <QNetworkReply>
|
||||
#include <QDomDocument>
|
||||
@@ -88,6 +89,16 @@ MusicBrainzPlugin::getInfo( Tomahawk::InfoSystem::InfoRequestData requestData )
|
||||
}
|
||||
}
|
||||
|
||||
QNetworkReply*
|
||||
MusicBrainzPlugin::getUrl(QUrl url, QVariant requestData)
|
||||
{
|
||||
QNetworkRequest request = QNetworkRequest( url );
|
||||
QByteArray userAgent = TomahawkUtils::userAgentString( TOMAHAWK_APPLICATION_NAME, TOMAHAWK_VERSION ).toUtf8();
|
||||
request.setRawHeader( "User-Agent", userAgent );
|
||||
QNetworkReply* reply = Tomahawk::Utils::nam()->get( request );
|
||||
reply->setProperty( "requestData", requestData );
|
||||
return reply;
|
||||
}
|
||||
|
||||
void
|
||||
MusicBrainzPlugin::notInCacheSlot( InfoStringHash criteria, InfoRequestData requestData )
|
||||
@@ -111,8 +122,7 @@ MusicBrainzPlugin::notInCacheSlot( InfoStringHash criteria, InfoRequestData requ
|
||||
TomahawkUtils::urlAddQueryItem( url, "limit", "100" );
|
||||
|
||||
tDebug() << Q_FUNC_INFO << url.toString();
|
||||
QNetworkReply* reply = Tomahawk::Utils::nam()->get( QNetworkRequest( url ) );
|
||||
reply->setProperty( "requestData", QVariant::fromValue< Tomahawk::InfoSystem::InfoRequestData >( requestData ) );
|
||||
QNetworkReply* reply = getUrl( url, QVariant::fromValue< Tomahawk::InfoSystem::InfoRequestData >( requestData ) );
|
||||
|
||||
connect( reply, SIGNAL( finished() ), SLOT( gotReleaseGroupsSlot() ) );
|
||||
|
||||
@@ -131,8 +141,7 @@ MusicBrainzPlugin::notInCacheSlot( InfoStringHash criteria, InfoRequestData requ
|
||||
TomahawkUtils::urlAddQueryItem( url, "limit", "100" );
|
||||
|
||||
tDebug() << Q_FUNC_INFO << url.toString();
|
||||
QNetworkReply* reply = Tomahawk::Utils::nam()->get( QNetworkRequest( url ) );
|
||||
reply->setProperty( "requestData", QVariant::fromValue< Tomahawk::InfoSystem::InfoRequestData >( requestData ) );
|
||||
QNetworkReply* reply = getUrl( url, QVariant::fromValue< Tomahawk::InfoSystem::InfoRequestData >( requestData ) );
|
||||
|
||||
connect( reply, SIGNAL( finished() ), SLOT( gotReleasesSlot() ) );
|
||||
|
||||
@@ -154,6 +163,7 @@ MusicBrainzPlugin::gotReleaseGroupsSlot()
|
||||
if ( !oldReply )
|
||||
return; //timeout will handle it
|
||||
oldReply->deleteLater();
|
||||
tDebug() << Q_FUNC_INFO << "HTTP response code:" << oldReply->attribute( QNetworkRequest::HttpStatusCodeAttribute ).toInt();
|
||||
|
||||
QDomDocument doc;
|
||||
doc.setContent( oldReply->readAll() );
|
||||
@@ -237,8 +247,7 @@ MusicBrainzPlugin::gotReleasesSlot()
|
||||
TomahawkUtils::urlAddQueryItem( url, "inc", "recordings" );
|
||||
tDebug() << Q_FUNC_INFO << url.toString();
|
||||
|
||||
QNetworkReply* newReply = Tomahawk::Utils::nam()->get( QNetworkRequest( url ) );
|
||||
newReply->setProperty( "requestData", oldReply->property( "requestData" ) );
|
||||
QNetworkReply* newReply = getUrl( url, oldReply->property( "requestData" ) );
|
||||
connect( newReply, SIGNAL( finished() ), SLOT( gotRecordingsSlot() ) );
|
||||
|
||||
break;
|
||||
@@ -261,6 +270,8 @@ MusicBrainzPlugin::gotRecordingsSlot()
|
||||
return; //timeout will handle it
|
||||
reply->deleteLater();
|
||||
|
||||
tDebug() << Q_FUNC_INFO << "HTTP response code:" << reply->attribute( QNetworkRequest::HttpStatusCodeAttribute ).toInt();
|
||||
|
||||
QDomDocument doc;
|
||||
doc.setContent( reply->readAll() );
|
||||
QDomNodeList mediumList = doc.elementsByTagName( "medium-list" );
|
||||
|
@@ -59,6 +59,7 @@ private slots:
|
||||
void gotReleaseGroupsSlot();
|
||||
void gotReleasesSlot();
|
||||
void gotRecordingsSlot();
|
||||
QNetworkReply* getUrl( QUrl url, QVariant requestData );
|
||||
};
|
||||
|
||||
}
|
||||
|
@@ -36,19 +36,6 @@
|
||||
#include <QPixmap>
|
||||
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
namespace Qt
|
||||
{
|
||||
inline QString escape( const QString &x )
|
||||
{
|
||||
return x.toHtmlEscaped();
|
||||
}
|
||||
}
|
||||
#else
|
||||
// QTextDocument provides Qt::escape()
|
||||
#include <QTextDocument>
|
||||
#endif
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
@@ -63,8 +50,8 @@ SnoreNotifyPlugin::SnoreNotifyPlugin()
|
||||
m_supportedPushTypes << InfoNotifyUser << InfoNowPlaying << InfoTrackUnresolved << InfoNowStopped << InfoInboxReceived;
|
||||
|
||||
Snore::SnoreCore &snore = Snore::SnoreCore::instance();
|
||||
snore.loadPlugins( Snore::SnorePlugin::BACKEND | Snore::SnorePlugin::SECONDARY_BACKEND );
|
||||
snore.setDefaultSettingsValue("Silent", true, Snore::LOCAL_SETTING);
|
||||
snore.loadPlugins( Snore::SnorePlugin::Backend | Snore::SnorePlugin::SecondaryBackend );
|
||||
snore.setDefaultSettingsValue( {QStringLiteral("Silent"), Snore::LocalSetting}, true );
|
||||
|
||||
m_application = Snore::Application( qApp->applicationName(), m_defaultIcon );
|
||||
m_application.hints().setValue( "use-markup", true );
|
||||
@@ -174,11 +161,11 @@ SnoreNotifyPlugin::nowPlaying( const QVariant& input )
|
||||
// Remark: If using xml-based markup in notifications, the supplied strings need to be escaped.
|
||||
QString album;
|
||||
if ( !hash[ "album" ].isEmpty() )
|
||||
album = QString( "<br><i>%1</i> %2" ).arg( tr( "on", "'on' is followed by an album name" ) ).arg( Qt::escape( hash[ "album" ] ) );
|
||||
album = QString( "<br><i>%1</i> %2" ).arg( tr( "on", "'on' is followed by an album name" ) ).arg( hash[ "album" ].toHtmlEscaped() );
|
||||
|
||||
messageText = tr( "%1%4 %2%3.", "%1 is a title, %2 is an artist and %3 is replaced by either the previous message or nothing, %4 is the preposition used to link track and artist ('by' in english)" )
|
||||
.arg( Qt::escape( hash[ "title" ] ) )
|
||||
.arg( Qt::escape( hash[ "artist" ] ) )
|
||||
.arg( hash[ "title" ].toHtmlEscaped() )
|
||||
.arg( hash[ "artist" ].toHtmlEscaped() )
|
||||
.arg( album )
|
||||
.arg( QString( "<br><i>%1</i>" ).arg( tr( "by", "preposition to link track and artist" ) ) );
|
||||
|
||||
@@ -224,9 +211,9 @@ SnoreNotifyPlugin::inboxReceived( const QVariant& input )
|
||||
QString messageText;
|
||||
// Remark: If using xml-based markup in notifications, the supplied strings need to be escaped.
|
||||
messageText = tr( "%1 sent you\n%2%4 %3.", "%1 is a nickname, %2 is a title, %3 is an artist, %4 is the preposition used to link track and artist ('by' in english)" )
|
||||
.arg( Qt::escape( src["friendlyname"] ) )
|
||||
.arg( Qt::escape( hash[ "title" ] ) )
|
||||
.arg( Qt::escape( hash[ "artist" ] ) )
|
||||
.arg( src["friendlyname"].toHtmlEscaped() )
|
||||
.arg( hash[ "title" ].toHtmlEscaped() )
|
||||
.arg( hash[ "artist" ].toHtmlEscaped() )
|
||||
.arg( QString( "\n<i>%1</i>" ).arg( tr( "by", "preposition to link track and artist" ) ) );
|
||||
|
||||
// Dirty hack(TM) so that KNotify/QLabel recognizes the message as Rich Text
|
||||
|
@@ -2,13 +2,14 @@ SET(fdo_srcs
|
||||
fdonotify/FdoNotifyPlugin.cpp
|
||||
fdonotify/ImageConverter.cpp
|
||||
)
|
||||
SET(FDO_LINK_LIBRARIES ${LINK_LIBRARIES})
|
||||
qt_add_dbus_interface(fdo_srcs fdonotify/org.freedesktop.Notifications.xml
|
||||
SET(FDO_LINK_LIBRARIES ${LINK_LIBRARIES} Qt5::DBus)
|
||||
qt5_add_dbus_interface(fdo_srcs fdonotify/org.freedesktop.Notifications.xml
|
||||
FreedesktopNotificationsProxy)
|
||||
|
||||
tomahawk_add_plugin(fdonotify
|
||||
TYPE infoplugin EXPORT_MACRO INFOPLUGINDLLEXPORT_PRO
|
||||
SOURCES "${fdo_srcs}" LINK_LIBRARIES "${FDO_LINK_LIBRARIES}"
|
||||
SOURCES "${fdo_srcs}"
|
||||
LINK_LIBRARIES "${FDO_LINK_LIBRARIES}"
|
||||
)
|
||||
|
||||
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} )
|
||||
@@ -16,9 +17,9 @@ SET(mpris_srcs
|
||||
mpris/MprisPlugin.cpp
|
||||
)
|
||||
|
||||
qt_add_dbus_adaptor(mpris_srcs mpris/MprisPluginRootAdaptor.xml
|
||||
qt5_add_dbus_adaptor(mpris_srcs mpris/MprisPluginRootAdaptor.xml
|
||||
mpris/MprisPlugin.h Tomahawk::InfoSystem::MprisPlugin MprisPluginRootAdaptor MprisPluginRootAdaptor)
|
||||
qt_add_dbus_adaptor(mpris_srcs mpris/MprisPluginPlayerAdaptor.xml
|
||||
qt5_add_dbus_adaptor(mpris_srcs mpris/MprisPluginPlayerAdaptor.xml
|
||||
mpris/MprisPlugin.h Tomahawk::InfoSystem::MprisPlugin MprisPluginPlayerAdaptor MprisPluginPlayerAdaptor)
|
||||
|
||||
tomahawk_add_plugin(mpris
|
||||
|
@@ -55,11 +55,6 @@
|
||||
#include <QDBusPendingCallWatcher>
|
||||
#include <QImage>
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
// QTextDocument provides Qt::escape()
|
||||
#include <QTextDocument>
|
||||
#endif
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
@@ -67,11 +62,7 @@ namespace InfoSystem
|
||||
{
|
||||
|
||||
QString escapeHtml( const QString& str ) {
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
return str.toHtmlEscaped();
|
||||
#else
|
||||
return Qt::escape( str );
|
||||
#endif
|
||||
}
|
||||
|
||||
FdoNotifyPlugin::FdoNotifyPlugin()
|
||||
@@ -80,7 +71,7 @@ FdoNotifyPlugin::FdoNotifyPlugin()
|
||||
, m_wmSupportsBodyMarkup( false )
|
||||
{
|
||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO;
|
||||
m_supportedPushTypes << InfoNotifyUser << InfoNowPlaying << InfoTrackUnresolved << InfoNowStopped << InfoInboxReceived;
|
||||
m_supportedPushTypes << InfoNotifyUser << InfoNowPlaying << InfoNowResumed << InfoTrackUnresolved << InfoNowStopped << InfoInboxReceived;
|
||||
|
||||
// Query the window manager for its capabilties in styling notifications.
|
||||
notifications_interface = new org::freedesktop::Notifications( "org.freedesktop.Notifications", "/org/freedesktop/Notifications",
|
||||
@@ -139,6 +130,7 @@ FdoNotifyPlugin::pushInfo( Tomahawk::InfoSystem::InfoPushData pushData )
|
||||
return;
|
||||
|
||||
case Tomahawk::InfoSystem::InfoNowPlaying:
|
||||
case Tomahawk::InfoSystem::InfoNowResumed:
|
||||
nowPlaying( pushData.infoPair.second );
|
||||
return;
|
||||
|
||||
|
@@ -27,12 +27,6 @@
|
||||
|
||||
#include "../../InfoPluginDllMacro.h"
|
||||
|
||||
// Forward Declarations breaking QSharedPointer
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include "PlaylistInterface.h"
|
||||
#endif
|
||||
|
||||
|
||||
#include <QObject>
|
||||
#include <QVariant>
|
||||
#include <QtDBus/QtDBus>
|
||||
|
@@ -24,6 +24,7 @@ tomahawk_add_library(${TOMAHAWK_PLAYDARAPI_LIBRARY_TARGET}
|
||||
qtcertificateaddon
|
||||
${GNUTLS_LIBRARIES}
|
||||
EXPORT TomahawkLibraryDepends
|
||||
EXPORT_MACRO TOMAHAWK_WIDGETS_EXPORT_PRO
|
||||
VERSION ${TOMAHAWK_VERSION_SHORT}
|
||||
)
|
||||
|
||||
|
@@ -23,7 +23,7 @@
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#ifndef TOMAHAWK_PLAYDARAPI_EXPORT
|
||||
# if defined (tomahawk_playdarapi_EXPORTS)
|
||||
# if defined (TOMAHAWK_WIDGETS_EXPORT_PRO)
|
||||
# define TOMAHAWK_PLAYDARAPI_EXPORT Q_DECL_EXPORT
|
||||
# else
|
||||
# define TOMAHAWK_PLAYDARAPI_EXPORT Q_DECL_IMPORT
|
||||
|
@@ -34,7 +34,7 @@ public:
|
||||
* Creates a Playdar HTTP interface
|
||||
* @param ha Address to listen on
|
||||
* @param port Port to listen on with HTTP
|
||||
* @param sport Pot to listen on with HTTPS
|
||||
* @param sport Port to listen on with HTTPS
|
||||
* @param parent
|
||||
*/
|
||||
explicit PlaydarApi( QHostAddress ha, qint16 port, qint16 sport, QObject *parent = 0 );
|
||||
|
@@ -13,5 +13,6 @@ tomahawk_add_library(${TOMAHAWK_WIDGETS_LIBRARY_TARGET}
|
||||
SOURCES ${${TOMAHAWK_WIDGETS_LIBRARY_TARGET}_SOURCES}
|
||||
UI ${${TOMAHAWK_WIDGETS_LIBRARY_TARGET}_UI}
|
||||
EXPORT TomahawkLibraryDepends
|
||||
EXPORT_MACRO TOMAHAWK_WIDGETS_EXPORT_PRO
|
||||
VERSION ${TOMAHAWK_VERSION_SHORT}
|
||||
)
|
||||
|
@@ -64,7 +64,7 @@ PlaylistDelegate::PlaylistDelegate()
|
||||
void
|
||||
PlaylistDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const
|
||||
{
|
||||
QStyleOptionViewItemV4 opt = option;
|
||||
QStyleOptionViewItem opt = option;
|
||||
initStyleOption( &opt, QModelIndex() );
|
||||
qApp->style()->drawControl( QStyle::CE_ItemViewItem, &opt, painter );
|
||||
|
||||
|
@@ -23,7 +23,7 @@
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#ifndef TOMAHAWK_WIDGETS_EXPORT
|
||||
# if defined (tomahawk_widgets_EXPORTS)
|
||||
# if defined (TOMAHAWK_WIDGETS_EXPORT_PRO)
|
||||
# define TOMAHAWK_WIDGETS_EXPORT Q_DECL_EXPORT
|
||||
# else
|
||||
# define TOMAHAWK_WIDGETS_EXPORT Q_DECL_IMPORT
|
||||
|
@@ -30,11 +30,6 @@
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
// Forward Declarations breaking QSharedPointer
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include "Query.h"
|
||||
#endif
|
||||
|
||||
|
||||
ActionCollection* ActionCollection::s_instance = 0;
|
||||
ActionCollection* ActionCollection::instance()
|
||||
@@ -62,6 +57,8 @@ ActionCollection::~ActionCollection()
|
||||
void
|
||||
ActionCollection::initActions()
|
||||
{
|
||||
// ATTENTION: Don't set ApplicationSpecificRole for submenu actions: they won't show up on OS X (Qt 5.5)
|
||||
|
||||
QAction *latchOn = new QAction( tr( "&Listen Along" ), this );
|
||||
latchOn->setIcon( ImageRegistry::instance()->icon( RESPATH "images/headphones.svg" ) );
|
||||
m_actionCollection[ "latchOn" ] = latchOn;
|
||||
@@ -118,9 +115,12 @@ ActionCollection::initActions()
|
||||
m_actionCollection[ "createPlaylist" ] = new QAction( tr( "Create Playlist" ), this );
|
||||
m_actionCollection[ "createPlaylist" ]->setShortcut( QKeySequence( "Ctrl+N" ) );
|
||||
m_actionCollection[ "createPlaylist" ]->setShortcutContext( Qt::ApplicationShortcut );
|
||||
// echonest is dead, disable stations
|
||||
/*
|
||||
m_actionCollection[ "createStation" ] = new QAction( tr( "Create Station" ), this );
|
||||
m_actionCollection[ "createStation" ]->setShortcut( QKeySequence( "Ctrl+S" ) );
|
||||
m_actionCollection[ "createStation" ]->setShortcutContext( Qt::ApplicationShortcut );
|
||||
*/
|
||||
#ifdef Q_OS_MAC
|
||||
m_actionCollection[ "minimize" ] = new QAction( tr( "Minimize" ), this );
|
||||
m_actionCollection[ "minimize" ]->setShortcut( QKeySequence( "Ctrl+M" ) );
|
||||
@@ -147,7 +147,6 @@ ActionCollection::initActions()
|
||||
#endif
|
||||
m_actionCollection[ "crashNow" ] = new QAction( "Crash now...", this );
|
||||
m_actionCollection[ "whatsnew_0_8" ] = new QAction( tr( "%applicationName 0.8" ) , this );
|
||||
m_actionCollection[ "whatsnew_0_8" ]->setMenuRole( QAction::ApplicationSpecificRole );
|
||||
m_actionCollection[ "reportBug" ] = new QAction( tr( "Report a Bug" ) , this );
|
||||
m_actionCollection[ "getSupport" ] = new QAction( tr( "Get Support" ) , this );
|
||||
m_actionCollection[ "helpTranslate" ] = new QAction( tr( "Help Us Translate" ) , this );
|
||||
@@ -170,7 +169,8 @@ ActionCollection::createMenuBar( QWidget *parent )
|
||||
controlsMenu->addAction( m_actionCollection[ "showOfflineSources" ] );
|
||||
controlsMenu->addSeparator();
|
||||
controlsMenu->addAction( m_actionCollection[ "createPlaylist" ] );
|
||||
controlsMenu->addAction( m_actionCollection[ "createStation" ] );
|
||||
// echonest is dead, disable stations
|
||||
// controlsMenu->addAction( m_actionCollection[ "createStation" ] );
|
||||
controlsMenu->addAction( m_actionCollection[ "importPlaylist" ] );
|
||||
controlsMenu->addAction( m_actionCollection[ "updateCollection" ] );
|
||||
controlsMenu->addAction( m_actionCollection[ "rescanCollection" ] );
|
||||
|
@@ -33,6 +33,7 @@
|
||||
|
||||
#include <QReadWriteLock>
|
||||
#include <QPixmapCache>
|
||||
#include <QCoreApplication>
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
@@ -75,6 +76,7 @@ Album::get( const Tomahawk::artist_ptr& artist, const QString& name, bool autoCr
|
||||
}
|
||||
|
||||
album_ptr album = album_ptr( new Album( name, artist ), &Album::deleteLater );
|
||||
album->moveToThread( QCoreApplication::instance()->thread() );
|
||||
album->setWeakRef( album.toWeakRef() );
|
||||
album->loadId( autoCreate );
|
||||
s_albumsByName.insert( key, album );
|
||||
|
@@ -25,11 +25,6 @@
|
||||
#include <QPixmap>
|
||||
#include <QFuture>
|
||||
|
||||
// Forward Declarations breaking QSharedPointer
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include "collection/Collection.h"
|
||||
#endif
|
||||
|
||||
#include "infosystem/InfoSystem.h"
|
||||
#include "DllMacro.h"
|
||||
#include "Typedefs.h"
|
||||
|
@@ -36,6 +36,7 @@
|
||||
|
||||
#include <QReadWriteLock>
|
||||
#include <QPixmapCache>
|
||||
#include <QCoreApplication>
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
@@ -109,6 +110,7 @@ Artist::get( unsigned int id, const QString& name )
|
||||
}
|
||||
|
||||
artist_ptr a = artist_ptr( new Artist( id, name ), &Artist::deleteLater );
|
||||
a->moveToThread( QCoreApplication::instance()->thread() );
|
||||
a->setWeakRef( a.toWeakRef() );
|
||||
s_artistsByName.insert( key, a );
|
||||
|
||||
|
@@ -67,7 +67,7 @@ AtticaManager::AtticaManager( QObject* parent )
|
||||
connect( &m_manager, SIGNAL( providerAdded( Attica::Provider ) ), this, SLOT( providerAdded( Attica::Provider ) ) );
|
||||
|
||||
// resolvers
|
||||
// m_manager.addProviderFile( QUrl( "http://bakery.tomahawk-player.org/resolvers/providers.xml" ) );
|
||||
// m_manager.addProviderFile( QUrl( "http://v09.bakery.tomahawk-player.org/resolvers/providers.xml" ) );
|
||||
|
||||
const QString url = QString( "%1/resolvers/providers.xml?version=%2" ).arg( hostname() ).arg( TomahawkUtils::appFriendlyVersion() );
|
||||
QNetworkReply* reply = Tomahawk::Utils::nam()->get( QNetworkRequest( QUrl( url ) ) );
|
||||
@@ -116,7 +116,7 @@ AtticaManager::fetchMissingIcons()
|
||||
QString
|
||||
AtticaManager::hostname() const
|
||||
{
|
||||
return "http://bakery.tomahawk-player.org";
|
||||
return "http://v09.bakery.tomahawk-player.org";
|
||||
}
|
||||
|
||||
|
||||
|
@@ -37,6 +37,7 @@ set( libGuiSources
|
||||
jobview/ErrorStatusMessage.cpp
|
||||
jobview/IndexingJobItem.cpp
|
||||
jobview/InboxJobItem.cpp
|
||||
jobview/ScriptErrorStatusMessage.cpp
|
||||
|
||||
playlist/InboxModel.cpp
|
||||
playlist/InboxView.cpp
|
||||
@@ -73,9 +74,6 @@ set( libGuiSources
|
||||
playlist/dynamic/DynamicPlaylist.cpp
|
||||
playlist/dynamic/DynamicView.cpp
|
||||
playlist/dynamic/DynamicModel.cpp
|
||||
playlist/dynamic/echonest/EchonestGenerator.cpp
|
||||
playlist/dynamic/echonest/EchonestControl.cpp
|
||||
playlist/dynamic/echonest/EchonestSteerer.cpp
|
||||
playlist/dynamic/widgets/DynamicWidget.cpp
|
||||
playlist/dynamic/widgets/DynamicControlWrapper.cpp
|
||||
playlist/dynamic/widgets/DynamicControlList.cpp
|
||||
@@ -145,6 +143,7 @@ set( libGuiSources
|
||||
widgets/ClickableLabel.cpp
|
||||
widgets/ComboBox.cpp
|
||||
widgets/DropDownButton.cpp
|
||||
widgets/DownloadButton.cpp
|
||||
widgets/ElidedLabel.cpp
|
||||
widgets/FilterHeader.cpp
|
||||
widgets/CaptionLabel.cpp
|
||||
@@ -174,14 +173,6 @@ if(QCA2_FOUND)
|
||||
set( libGuiSources ${libGuiSources} utils/GroovesharkParser.cpp )
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE AND NOT Qt5Core_DIR)
|
||||
if(BUILD_GUI AND X11_FOUND)
|
||||
include_directories( ${THIRDPARTY_DIR}/libqnetwm )
|
||||
list(APPEND libSources ${libSources} ${THIRDPARTY_DIR}/libqnetwm/libqnetwm/netwm.cpp)
|
||||
list(APPEND LINK_LIBRARIES ${X11_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list(APPEND libSources
|
||||
TomahawkSettings.cpp
|
||||
SourceList.cpp
|
||||
@@ -206,7 +197,6 @@ list(APPEND libSources
|
||||
PlaylistInterface.cpp
|
||||
UrlHandler.cpp
|
||||
|
||||
EchonestCatalogSynchronizer.cpp
|
||||
|
||||
accounts/AccountManager.cpp
|
||||
accounts/Account.cpp
|
||||
@@ -411,13 +401,12 @@ include_directories(
|
||||
|
||||
${QT_INCLUDE_DIR}
|
||||
${QJSON_INCLUDE_DIR}
|
||||
${ECHONEST_INCLUDE_DIR}
|
||||
${LUCENEPP_INCLUDE_DIRS}
|
||||
${LIBVLC_INCLUDE_DIR}
|
||||
${Boost_INCLUDE_DIR}
|
||||
|
||||
${LIBPORTFWD_INCLUDE_DIR}
|
||||
${QUAZIP_INCLUDE_DIR}
|
||||
${QUAZIP_INCLUDE_DIRS}
|
||||
${QTKEYCHAIN_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
@@ -425,9 +414,7 @@ IF(LIBATTICA_FOUND)
|
||||
SET( libGuiSources ${libGuiSources} AtticaManager.cpp )
|
||||
INCLUDE_DIRECTORIES( ${LIBATTICA_INCLUDE_DIR} )
|
||||
LIST(APPEND PRIVATE_LINK_LIBRARIES ${LIBATTICA_LIBRARIES} ${LibAttica_LIBRARIES} ${QUAZIP_LIBRARIES})
|
||||
IF( TOMAHAWK_QT5 )
|
||||
LIST(APPEND LINK_LIBRARIES KF5::Attica )
|
||||
ENDIF( TOMAHAWK_QT5 )
|
||||
LIST(APPEND LINK_LIBRARIES KF5::Attica)
|
||||
ENDIF(LIBATTICA_FOUND)
|
||||
|
||||
if(HAVE_X11)
|
||||
@@ -489,7 +476,7 @@ IF(BUILD_GUI)
|
||||
LIST(APPEND libSources ${libGuiSources} )
|
||||
ENDIF()
|
||||
|
||||
qt_wrap_ui(libUI_H ${libUI})
|
||||
qt5_wrap_ui(libUI_H ${libUI})
|
||||
|
||||
SET( libSources ${libSources} ${libUI_H} )
|
||||
|
||||
@@ -500,15 +487,15 @@ set_target_properties(
|
||||
AUTOMOC TRUE
|
||||
VERSION ${TOMAHAWK_VERSION_SHORT}
|
||||
SOVERSION ${TOMAHAWK_VERSION_SHORT}
|
||||
OUTPUT_NAME ${TOMAHAWK_TARGET_NAME}
|
||||
OUTPUT_NAME ${TOMAHAWK_BASE_TARGET_NAME}
|
||||
)
|
||||
|
||||
|
||||
qt5_use_modules(${TOMAHAWK_LIBRARY} Widgets Network Sql WebKitWidgets Concurrent Xml UiTools Svg)
|
||||
IF(APPLE)
|
||||
qt5_use_modules(${TOMAHAWK_LIBRARY} MacExtras)
|
||||
ENDIF()
|
||||
|
||||
target_link_libraries(${TOMAHAWK_LIBRARY} PUBLIC
|
||||
Qt5::Widgets Qt5::Network Qt5::Sql Qt5::WebKitWidgets Qt5::Concurrent Qt5::Xml Qt5::UiTools Qt5::Svg
|
||||
)
|
||||
if(APPLE)
|
||||
target_link_libraries(${TOMAHAWK_LIBRARY} PRIVATE Qt5::MacExtras)
|
||||
endif()
|
||||
|
||||
IF(QCA2_FOUND)
|
||||
INCLUDE_DIRECTORIES( ${QCA2_INCLUDE_DIR} )
|
||||
@@ -517,24 +504,20 @@ ENDIF(QCA2_FOUND)
|
||||
|
||||
IF( UNIX AND NOT APPLE )
|
||||
LIST(APPEND LINK_LIBRARIES ${QT_QTDBUS_LIBRARIES} )
|
||||
qt5_use_modules(${TOMAHAWK_LIBRARY} DBus)
|
||||
ENDIF( UNIX AND NOT APPLE )
|
||||
|
||||
TARGET_LINK_LIBRARIES( ${TOMAHAWK_LIBRARY}
|
||||
LINK_PRIVATE
|
||||
TARGET_LINK_LIBRARIES(${TOMAHAWK_LIBRARY} PRIVATE
|
||||
${LIBVLC_LIBRARY}
|
||||
${LIBVLCCORE_LIBRARY}
|
||||
|
||||
# Thirdparty shipped with tomahawk
|
||||
${LIBPORTFWD_LIBRARIES}
|
||||
${QTKEYCHAIN_LIBRARIES}
|
||||
${PRIVATE_LINK_LIBRARIES}
|
||||
|
||||
LINK_PUBLIC
|
||||
PUBLIC
|
||||
# External deps
|
||||
${QJSON_LIBRARIES}
|
||||
${LUCENEPP_LIBRARIES}
|
||||
${ECHONEST_LIBRARIES}
|
||||
${QT_QTSQL_LIBRARY}
|
||||
${QT_QTUITOOLS_LIBRARY}
|
||||
${QT_QTGUI_LIBRARY}
|
||||
@@ -550,8 +533,13 @@ TARGET_LINK_LIBRARIES( ${TOMAHAWK_LIBRARY}
|
||||
)
|
||||
|
||||
# TagLib
|
||||
TARGET_LINK_LIBRARIES(${TOMAHAWK_LIBRARY} LINK_PUBLIC ${TAGLIB_LIBRARIES})
|
||||
TARGET_INCLUDE_DIRECTORIES(${TOMAHAWK_LIBRARY} PUBLIC ${TAGLIB_INCLUDES})
|
||||
target_link_libraries(${TOMAHAWK_LIBRARY} LINK_PUBLIC Taglib::Taglib)
|
||||
# Necessary workaround until we can depend on >1.11.1
|
||||
if (NOT Taglib_VERSION VERSION_GREATER 1.11.1)
|
||||
if(ZLIB_FOUND)
|
||||
target_link_libraries(${TOMAHAWK_LIBRARY} PUBLIC -lz)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
INSTALL( TARGETS ${TOMAHAWK_LIBRARY}
|
||||
EXPORT TomahawkLibraryDepends
|
||||
@@ -578,7 +566,7 @@ file( GLOB networkHeaders "network/*.h" )
|
||||
file( GLOB playlistHeaders "playlist/*.h" )
|
||||
file( GLOB playlistDynamicHeaders "playlist/dynamic/*.h" )
|
||||
file( GLOB playlistDynamicDatabaseHeaders "playlist/dynamic/database/*.h" )
|
||||
file( GLOB playlistDynamicEchonestHeaders "playlist/dynamic/echonest/*.h" )
|
||||
# file( GLOB playlistDynamicEchonestHeaders "playlist/dynamic/echonest/*.h" )
|
||||
file( GLOB playlistDynamicWidgetsHeaders "playlist/dynamic/widgets/*.h" )
|
||||
file( GLOB resolversHeaders "resolvers/*.h" )
|
||||
file( GLOB sipHeaders "sip/*.h" )
|
||||
@@ -607,7 +595,7 @@ install( FILES ${networkHeaders} DESTINATION include/libtomahawk/network )
|
||||
install( FILES ${playlistHeaders} DESTINATION include/libtomahawk/playlist )
|
||||
install( FILES ${playlistDynamicHeaders} DESTINATION include/libtomahawk/playlist/dynamic )
|
||||
install( FILES ${playlistDynamicDatabaseHeaders} DESTINATION include/libtomahawk/playlist/dynamic/database )
|
||||
install( FILES ${playlistDynamicEchonestHeaders} DESTINATION include/libtomahawk/playlist/dynamic/echonest )
|
||||
# install( FILES ${playlistDynamicEchonestHeaders} DESTINATION include/libtomahawk/playlist/dynamic/echonest )
|
||||
install( FILES ${playlistDynamicWidgetsHeaders} DESTINATION include/libtomahawk/playlist/dynamic/widgets )
|
||||
install( FILES ${resolversHeaders} DESTINATION include/libtomahawk/resolvers )
|
||||
install( FILES ${sipHeaders} DESTINATION include/libtomahawk/sip )
|
||||
|
@@ -37,6 +37,9 @@
|
||||
#include "utils/ImageRegistry.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
#include <QDesktopServices>
|
||||
#include <QFileInfo>
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
|
||||
@@ -51,7 +54,7 @@ ContextMenu::ContextMenu( QWidget* parent )
|
||||
m_sigmap = new QSignalMapper( this );
|
||||
connect( m_sigmap, SIGNAL( mapped( int ) ), SLOT( onTriggered( int ) ) );
|
||||
|
||||
m_supportedActions = ActionPlay | ActionQueue | ActionPlaylist | ActionCopyLink | ActionLove | ActionStopAfter | ActionPage | ActionEditMetadata | ActionSend;
|
||||
clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +72,7 @@ ContextMenu::clear()
|
||||
m_albums.clear();
|
||||
m_artists.clear();
|
||||
|
||||
m_supportedActions = ActionPlay | ActionQueue | ActionPlaylist | ActionCopyLink | ActionLove | ActionStopAfter | ActionPage | ActionEditMetadata | ActionSend;
|
||||
m_supportedActions = ActionPlay | ActionQueue | ActionPlaylist | ActionCopyLink | ActionLove | ActionStopAfter | ActionPage | ActionEditMetadata | ActionSend | ActionOpenFileManager;
|
||||
}
|
||||
|
||||
|
||||
@@ -216,10 +219,23 @@ ContextMenu::setQueries( const QList<Tomahawk::query_ptr>& queries )
|
||||
addSeparator();
|
||||
|
||||
if ( m_supportedActions & ActionCopyLink && itemCount() == 1 )
|
||||
{
|
||||
m_sigmap->setMapping( addAction( tr( "&Copy Track Link" ) ), ActionCopyLink );
|
||||
}
|
||||
|
||||
if ( m_supportedActions & ActionOpenFileManager &&
|
||||
queries.length() == 1 &&
|
||||
queries.first()->numResults() &&
|
||||
queries.first()->results().first()->isLocal() )
|
||||
{
|
||||
m_sigmap->setMapping( addAction( ImageRegistry::instance()->icon( RESPATH "images/folder.svg" ),
|
||||
tr( "Open Folder in File Manager..." ) ), ActionOpenFileManager );
|
||||
}
|
||||
|
||||
if ( m_supportedActions & ActionEditMetadata && itemCount() == 1 )
|
||||
{
|
||||
m_sigmap->setMapping( addAction( tr( "Properties..." ) ), ActionEditMetadata );
|
||||
}
|
||||
|
||||
addSeparator();
|
||||
|
||||
@@ -239,6 +255,8 @@ ContextMenu::setQueries( const QList<Tomahawk::query_ptr>& queries )
|
||||
m_sigmap->setMapping( addAction( tr( "Mark as &Listened" ) ), ActionMarkListened );
|
||||
}
|
||||
|
||||
addSeparator();
|
||||
|
||||
if ( m_supportedActions & ActionDelete )
|
||||
m_sigmap->setMapping( addAction( queries.count() > 1 ? tr( "&Remove Items" ) : tr( "&Remove Item" ) ), ActionDelete );
|
||||
|
||||
@@ -394,6 +412,15 @@ ContextMenu::onTriggered( int action )
|
||||
}
|
||||
break;
|
||||
|
||||
case ActionOpenFileManager:
|
||||
{
|
||||
result_ptr result = m_queries.first()->results().first();
|
||||
QString path = QFileInfo( result->url() ).path();
|
||||
tLog() << Q_FUNC_INFO << "open directory" << path;
|
||||
QDesktopServices::openUrl( path );
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
emit triggered( action );
|
||||
}
|
||||
|
@@ -37,21 +37,22 @@ Q_OBJECT
|
||||
public:
|
||||
enum MenuActions
|
||||
{
|
||||
ActionPlay = 1,
|
||||
ActionQueue = 2,
|
||||
ActionDelete = 4,
|
||||
ActionCopyLink = 8,
|
||||
ActionLove = 16,
|
||||
ActionStopAfter = 32,
|
||||
ActionPage = 64,
|
||||
ActionTrackPage = 128,
|
||||
ActionArtistPage = 256,
|
||||
ActionAlbumPage = 512,
|
||||
ActionEditMetadata = 1024,
|
||||
ActionPlaylist = 2048,
|
||||
ActionSend = 4096,
|
||||
ActionMarkListened = 8192,
|
||||
ActionDownload = 16384
|
||||
ActionPlay = 1,
|
||||
ActionQueue = 2,
|
||||
ActionDelete = 4,
|
||||
ActionCopyLink = 8,
|
||||
ActionLove = 16,
|
||||
ActionStopAfter = 32,
|
||||
ActionPage = 64,
|
||||
ActionTrackPage = 128,
|
||||
ActionArtistPage = 256,
|
||||
ActionAlbumPage = 512,
|
||||
ActionEditMetadata = 1024,
|
||||
ActionPlaylist = 2048,
|
||||
ActionSend = 4096,
|
||||
ActionMarkListened = 8192,
|
||||
ActionDownload = 16384,
|
||||
ActionOpenFileManager = 32768
|
||||
};
|
||||
|
||||
explicit ContextMenu( QWidget* parent = 0 );
|
||||
|
@@ -118,7 +118,7 @@ DownloadJob::localFile() const
|
||||
|
||||
|
||||
QString
|
||||
DownloadJob::localPath() const
|
||||
DownloadJob::localPath( const Tomahawk::album_ptr& album )
|
||||
{
|
||||
QDir dir = TomahawkSettings::instance()->downloadsPath();
|
||||
|
||||
@@ -127,7 +127,7 @@ DownloadJob::localPath() const
|
||||
dir.mkpath( "." );
|
||||
}
|
||||
|
||||
QString path = QString( "%1/%2" ).arg( safeEncode( m_track->artist(), true ) ).arg( safeEncode( m_track->album(), true ) );
|
||||
QString path = QString( "%1/%2" ).arg( safeEncode( album->artist()->name(), true ) ).arg( safeEncode( album->name(), true ) );
|
||||
dir.mkpath( path );
|
||||
|
||||
return QString( dir.path() + "/" + path ).replace( "//", "/" );
|
||||
@@ -138,7 +138,7 @@ QUrl
|
||||
DownloadJob::prepareFilename()
|
||||
{
|
||||
QString filename = QString( "%1. %2.%3" ).arg( m_track->albumpos() ).arg( safeEncode( m_track->track() ) ).arg( m_format.extension );
|
||||
QString path = localPath();
|
||||
QString path = localPath( m_track->albumPtr() );
|
||||
QString localFile = QString( path + "/" + filename );
|
||||
|
||||
if ( !m_tryResuming )
|
||||
@@ -206,22 +206,17 @@ DownloadJob::download()
|
||||
{
|
||||
if ( m_state == Running )
|
||||
return true;
|
||||
|
||||
setState( Running );
|
||||
|
||||
if ( m_result->resolvedByCollection() )
|
||||
{
|
||||
Tomahawk::ScriptCollection* collection = qobject_cast<Tomahawk::ScriptCollection*>( m_result->resolvedByCollection().data() );
|
||||
if ( collection )
|
||||
{
|
||||
QVariantMap arguments;
|
||||
arguments[ "url" ] = m_format.url;
|
||||
|
||||
// HACK: *shrug* WIP.
|
||||
Tomahawk::ScriptJob* job = collection->scriptObject()->invoke( "getStreamUrl", arguments );
|
||||
connect( job, SIGNAL( done(QVariantMap) ), SLOT( onUrlRetrieved(QVariantMap) ) );
|
||||
job->start();
|
||||
}
|
||||
if (m_result->resolvedBy() != nullptr) {
|
||||
Tomahawk::ScriptJob *job = m_result->resolvedBy()->getDownloadUrl( m_result, m_format );
|
||||
connect( job, SIGNAL( done(QVariantMap) ), SLOT( onUrlRetrieved(QVariantMap) ) );
|
||||
job->start();
|
||||
} else {
|
||||
onUrlRetrieved({{"url", m_format.url}});
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -444,7 +439,7 @@ DownloadJob::checkForResumedFile()
|
||||
|
||||
|
||||
QString
|
||||
DownloadJob::safeEncode( const QString& filename, bool removeTrailingDots ) const
|
||||
DownloadJob::safeEncode( const QString& filename, bool removeTrailingDots )
|
||||
{
|
||||
//FIXME: make it a regexp
|
||||
QString res = QString( filename ).toLatin1().replace( "/", "_" ).replace( "\\", "_" )
|
||||
|
@@ -58,7 +58,7 @@ public:
|
||||
long receivedSize() const { return m_rcvdSize; }
|
||||
long fileSize() const { return m_fileSize; }
|
||||
|
||||
QString localPath() const;
|
||||
static QString localPath( const Tomahawk::album_ptr& album );
|
||||
QString localFile() const;
|
||||
DownloadFormat format() const;
|
||||
|
||||
@@ -90,7 +90,7 @@ private slots:
|
||||
|
||||
private:
|
||||
void storeState();
|
||||
QString safeEncode( const QString& filename, bool removeTrailingDots = false ) const;
|
||||
static QString safeEncode( const QString& filename, bool removeTrailingDots = false );
|
||||
bool checkForResumedFile();
|
||||
QUrl prepareFilename();
|
||||
|
||||
|
@@ -24,6 +24,8 @@
|
||||
#include "TomahawkSettings.h"
|
||||
#include "infosystem/InfoSystem.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "Result.h"
|
||||
#include "Query.h"
|
||||
|
||||
DownloadManager* DownloadManager::s_instance = 0;
|
||||
|
||||
@@ -85,6 +87,36 @@ DownloadManager::localFileForDownload( const QString& url ) const
|
||||
}
|
||||
|
||||
|
||||
QUrl
|
||||
DownloadManager::localUrlForDownload( const Tomahawk::query_ptr& query ) const
|
||||
{
|
||||
Tomahawk::result_ptr result = query->numResults( true ) ? query->results().first() : Tomahawk::result_ptr();
|
||||
if ( result )
|
||||
{
|
||||
return localUrlForDownload( result );
|
||||
}
|
||||
|
||||
return QUrl();
|
||||
}
|
||||
|
||||
|
||||
QUrl
|
||||
DownloadManager::localUrlForDownload( const Tomahawk::result_ptr& result ) const
|
||||
{
|
||||
if ( result && !result->downloadFormats().isEmpty() &&
|
||||
!localFileForDownload( result->downloadFormats().first().url.toString() ).isEmpty() )
|
||||
{
|
||||
return QUrl::fromLocalFile( QFileInfo( DownloadManager::instance()->localFileForDownload( result->downloadFormats().first().url.toString() ) ).absolutePath() );
|
||||
}
|
||||
else if ( result && result->downloadJob() && result->downloadJob()->state() == DownloadJob::Finished )
|
||||
{
|
||||
return QUrl::fromLocalFile( QFileInfo( result->downloadJob()->localFile() ).absolutePath() );
|
||||
}
|
||||
|
||||
return QUrl();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DownloadManager::storeJobs( const QList<downloadjob_ptr>& jobs )
|
||||
{
|
||||
|
@@ -45,6 +45,8 @@ public:
|
||||
|
||||
void storeJobs( const QList<downloadjob_ptr>& jobs );
|
||||
QString localFileForDownload( const QString& url ) const;
|
||||
QUrl localUrlForDownload( const Tomahawk::result_ptr& result ) const;
|
||||
QUrl localUrlForDownload( const Tomahawk::query_ptr& query ) const;
|
||||
|
||||
public slots:
|
||||
bool addJob( const downloadjob_ptr& job );
|
||||
|
@@ -263,9 +263,14 @@ bool
|
||||
DropJob::validateLocalFiles(const QString &paths, const QString &suffix)
|
||||
{
|
||||
QStringList filePaths = paths.split( QRegExp( "\\s+" ), QString::SkipEmptyParts );
|
||||
for ( QStringList::iterator it = filePaths.begin(); it != filePaths.end(); ++it )
|
||||
QStringList::iterator it = filePaths.begin();
|
||||
while ( it != filePaths.end() )
|
||||
{
|
||||
if ( !validateLocalFile( *it, suffix ) )
|
||||
filePaths.erase( it );
|
||||
it = filePaths.erase( it );
|
||||
else
|
||||
++it;
|
||||
}
|
||||
return !filePaths.isEmpty();
|
||||
}
|
||||
|
||||
@@ -975,7 +980,7 @@ DropJob::removeRemoteSources()
|
||||
|
||||
foreach ( const Tomahawk::result_ptr& result, item->results() )
|
||||
{
|
||||
if ( !result->resolvedByCollection().isNull() && !result->resolvedByCollection()->isLocal() )
|
||||
if ( !result->isLocal() )
|
||||
{
|
||||
list.append( item );
|
||||
break;
|
||||
|
@@ -34,13 +34,8 @@
|
||||
#include "TomahawkSettings.h"
|
||||
#include "Track.h"
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
#include <echonest5/CatalogUpdateEntry.h>
|
||||
#include <echonest5/Config.h>
|
||||
#else
|
||||
#include <echonest/CatalogUpdateEntry.h>
|
||||
#include <echonest/Config.h>
|
||||
#endif
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
|
@@ -22,11 +22,7 @@
|
||||
#include "DllMacro.h"
|
||||
#include "Query.h"
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
#include <echonest5/Catalog.h>
|
||||
#else
|
||||
#include <echonest/Catalog.h>
|
||||
#endif
|
||||
|
||||
#include <QObject>
|
||||
#include <QQueue>
|
||||
|
@@ -1,14 +1,14 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright (C) 2011 Leo Franchi <lfranchi@kde.org>
|
||||
* Copyright (C) 2011, Jeff Mitchell <jeff@tomahawk-player.org>
|
||||
* Copyright (C) 2011-2014, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
* Copyright (C) 2013, Uwe L. Korn <uwelk@xhochy.com>
|
||||
* Copyright (C) 2013, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2011, Leo Franchi <lfranchi@kde.org>
|
||||
* Copyright 2011-2016, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
* Copyright 2011, Jeff Mitchell <jeff@tomahawk-player.org>
|
||||
* Copyright 2013, Uwe L. Korn <uwelk@xhochy.com>
|
||||
* Copyright 2013, Teo Mrnjavac <teo@kde.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 2 of the License, or
|
||||
* 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,
|
||||
@@ -20,7 +20,6 @@
|
||||
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include "GlobalActionManager.h"
|
||||
|
||||
#include "accounts/AccountManager.h"
|
||||
@@ -47,12 +46,6 @@
|
||||
#include "TomahawkSettings.h"
|
||||
#include "ViewManager.h"
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
#include <echonest5/Playlist.h>
|
||||
#else
|
||||
#include <echonest/Playlist.h>
|
||||
#endif
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QFileInfo>
|
||||
|
||||
@@ -913,144 +906,144 @@ GlobalActionManager::loadDynamicPlaylist( const QUrl& url, bool station )
|
||||
{
|
||||
dyncontrol_ptr c = pl->generator()->createControl( "Artist" );
|
||||
c->setInput( param.second );
|
||||
c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::ArtistRadioType ) );
|
||||
controls << c;
|
||||
// c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::ArtistRadioType ) );
|
||||
// controls << c;
|
||||
}
|
||||
else if ( param.first == "artist_limitto" )
|
||||
{
|
||||
dyncontrol_ptr c = pl->generator()->createControl( "Artist" );
|
||||
c->setInput( param.second );
|
||||
c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::ArtistType ) );
|
||||
controls << c;
|
||||
// c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::ArtistType ) );
|
||||
// controls << c;
|
||||
}
|
||||
else if ( param.first == "description" )
|
||||
{
|
||||
dyncontrol_ptr c = pl->generator()->createControl( "Artist Description" );
|
||||
c->setInput( param.second );
|
||||
c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::ArtistDescriptionType ) );
|
||||
controls << c;
|
||||
// c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::ArtistDescriptionType ) );
|
||||
// controls << c;
|
||||
}
|
||||
else if ( param.first == "variety" )
|
||||
{
|
||||
dyncontrol_ptr c = pl->generator()->createControl( "Variety" );
|
||||
c->setInput( param.second );
|
||||
c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::Variety ) );
|
||||
controls << c;
|
||||
// c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::Variety ) );
|
||||
// controls << c;
|
||||
}
|
||||
else if ( param.first.startsWith( "tempo" ) )
|
||||
{
|
||||
dyncontrol_ptr c = pl->generator()->createControl( "Tempo" );
|
||||
int extra = param.first.endsWith( "_max" ) ? -1 : 0;
|
||||
c->setInput( param.second );
|
||||
c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::MinTempo + extra ) );
|
||||
controls << c;
|
||||
// c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::MinTempo + extra ) );
|
||||
// controls << c;
|
||||
}
|
||||
else if ( param.first.startsWith( "duration" ) )
|
||||
{
|
||||
dyncontrol_ptr c = pl->generator()->createControl( "Duration" );
|
||||
int extra = param.first.endsWith( "_max" ) ? -1 : 0;
|
||||
c->setInput( param.second );
|
||||
c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::MinDuration + extra ) );
|
||||
controls << c;
|
||||
// c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::MinDuration + extra ) );
|
||||
// controls << c;
|
||||
}
|
||||
else if ( param.first.startsWith( "loudness" ) )
|
||||
{
|
||||
dyncontrol_ptr c = pl->generator()->createControl( "Loudness" );
|
||||
int extra = param.first.endsWith( "_max" ) ? -1 : 0;
|
||||
c->setInput( param.second );
|
||||
c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::MinLoudness + extra ) );
|
||||
controls << c;
|
||||
// c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::MinLoudness + extra ) );
|
||||
// controls << c;
|
||||
}
|
||||
else if ( param.first.startsWith( "danceability" ) )
|
||||
{
|
||||
dyncontrol_ptr c = pl->generator()->createControl( "Danceability" );
|
||||
int extra = param.first.endsWith( "_max" ) ? 1 : 0;
|
||||
c->setInput( param.second );
|
||||
c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::MinDanceability + extra ) );
|
||||
controls << c;
|
||||
// c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::MinDanceability + extra ) );
|
||||
// controls << c;
|
||||
}
|
||||
else if ( param.first.startsWith( "energy" ) )
|
||||
{
|
||||
dyncontrol_ptr c = pl->generator()->createControl( "Energy" );
|
||||
int extra = param.first.endsWith( "_max" ) ? 1 : 0;
|
||||
c->setInput( param.second );
|
||||
c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::MinEnergy + extra ) );
|
||||
controls << c;
|
||||
// c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::MinEnergy + extra ) );
|
||||
// controls << c;
|
||||
}
|
||||
else if ( param.first.startsWith( "artist_familiarity" ) )
|
||||
{
|
||||
dyncontrol_ptr c = pl->generator()->createControl( "Artist Familiarity" );
|
||||
int extra = param.first.endsWith( "_max" ) ? -1 : 0;
|
||||
c->setInput( param.second );
|
||||
c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::ArtistMinFamiliarity + extra ) );
|
||||
controls << c;
|
||||
// c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::ArtistMinFamiliarity + extra ) );
|
||||
// controls << c;
|
||||
}
|
||||
else if ( param.first.startsWith( "artist_hotttnesss" ) )
|
||||
{
|
||||
dyncontrol_ptr c = pl->generator()->createControl( "Artist Hotttnesss" );
|
||||
int extra = param.first.endsWith( "_max" ) ? -1 : 0;
|
||||
c->setInput( param.second );
|
||||
c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::ArtistMinHotttnesss + extra ) );
|
||||
controls << c;
|
||||
// c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::ArtistMinHotttnesss + extra ) );
|
||||
// controls << c;
|
||||
}
|
||||
else if ( param.first.startsWith( "song_hotttnesss" ) )
|
||||
{
|
||||
dyncontrol_ptr c = pl->generator()->createControl( "Song Hotttnesss" );
|
||||
int extra = param.first.endsWith( "_max" ) ? -1 : 0;
|
||||
c->setInput( param.second );
|
||||
c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::SongMinHotttnesss + extra ) );
|
||||
controls << c;
|
||||
// c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::SongMinHotttnesss + extra ) );
|
||||
// controls << c;
|
||||
}
|
||||
else if ( param.first.startsWith( "longitude" ) )
|
||||
{
|
||||
dyncontrol_ptr c = pl->generator()->createControl( "Longitude" );
|
||||
int extra = param.first.endsWith( "_max" ) ? 1 : 0;
|
||||
c->setInput( param.second );
|
||||
c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::ArtistMinLongitude + extra ) );
|
||||
controls << c;
|
||||
// c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::ArtistMinLongitude + extra ) );
|
||||
// controls << c;
|
||||
}
|
||||
else if ( param.first.startsWith( "latitude" ) )
|
||||
{
|
||||
dyncontrol_ptr c = pl->generator()->createControl( "Latitude" );
|
||||
int extra = param.first.endsWith( "_max" ) ? 1 : 0;
|
||||
c->setInput( param.second );
|
||||
c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::ArtistMinLatitude + extra ) );
|
||||
controls << c;
|
||||
// c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::ArtistMinLatitude + extra ) );
|
||||
// controls << c;
|
||||
}
|
||||
else if ( param.first == "key" )
|
||||
{
|
||||
dyncontrol_ptr c = pl->generator()->createControl( "Key" );
|
||||
c->setInput( param.second );
|
||||
c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::Key ) );
|
||||
controls << c;
|
||||
// c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::Key ) );
|
||||
// controls << c;
|
||||
}
|
||||
else if ( param.first == "mode" )
|
||||
{
|
||||
dyncontrol_ptr c = pl->generator()->createControl( "Mode" );
|
||||
c->setInput( param.second );
|
||||
c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::Mode ) );
|
||||
controls << c;
|
||||
// c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::Mode ) );
|
||||
// controls << c;
|
||||
}
|
||||
else if ( param.first == "mood" )
|
||||
{
|
||||
dyncontrol_ptr c = pl->generator()->createControl( "Mood" );
|
||||
c->setInput( param.second );
|
||||
c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::Mood ) );
|
||||
controls << c;
|
||||
// c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::Mood ) );
|
||||
// controls << c;
|
||||
}
|
||||
else if ( param.first == "style" )
|
||||
{
|
||||
dyncontrol_ptr c = pl->generator()->createControl( "Style" );
|
||||
c->setInput( param.second );
|
||||
c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::Style ) );
|
||||
controls << c;
|
||||
// c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::Style ) );
|
||||
// controls << c;
|
||||
}
|
||||
else if ( param.first == "song" )
|
||||
{
|
||||
dyncontrol_ptr c = pl->generator()->createControl( "Song" );
|
||||
c->setInput( param.second );
|
||||
c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::SongRadioType ) );
|
||||
controls << c;
|
||||
// c->setMatch( QString::number( (int)Echonest::DynamicPlaylist::SongRadioType ) );
|
||||
// controls << c;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,21 +1,21 @@
|
||||
/*
|
||||
Copyright (C) 2011 Leo Franchi <lfranchi@kde.org>
|
||||
|
||||
This program 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 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2011, Leo Franchi <lfranchi@kde.org>
|
||||
* Copyright 2011-2016, Christian Muehlhaeuser <muesli@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 GLOBALACTIONMANAGER_H
|
||||
#define GLOBALACTIONMANAGER_H
|
||||
|
@@ -29,11 +29,6 @@
|
||||
|
||||
#include <QAction>
|
||||
|
||||
// Forward Declarations breaking QSharedPointer
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include "Result.h"
|
||||
#endif
|
||||
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
|
@@ -36,7 +36,7 @@
|
||||
#define MAX_CONCURRENT_QUERIES 16
|
||||
#define CLEANUP_TIMEOUT 5 * 60 * 1000
|
||||
#define MINSCORE 0.5
|
||||
#define DEFAULT_RESOLVER_TIMEOUT 5000 //5 seconds
|
||||
#define DEFAULT_RESOLVER_TIMEOUT 5000 // 5 seconds
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
@@ -149,6 +149,15 @@ Pipeline::removeResolver( Resolver* r )
|
||||
}
|
||||
|
||||
|
||||
QList< Tomahawk::Resolver* >
|
||||
Pipeline::resolvers() const
|
||||
{
|
||||
Q_D( const Pipeline );
|
||||
|
||||
return d->resolvers;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Pipeline::addResolver( Resolver* r )
|
||||
{
|
||||
@@ -533,12 +542,12 @@ Pipeline::shuntNext()
|
||||
q->setCurrentResolver( 0 );
|
||||
}
|
||||
|
||||
//Zero-patient, a stub so that query is not resolved until we go through
|
||||
//all resolvers
|
||||
//As query considered as 'finished trying to resolve' when there are no
|
||||
//more qid entries in qidsState we'll put one as sort of 'keep this until
|
||||
//we kick off all our resolvers' entry
|
||||
//once we kick off all resolvers we'll remove this entry
|
||||
// Zero-patient, a stub so that query is not resolved until we go through
|
||||
// all resolvers
|
||||
// As query considered as 'finished trying to resolve' when there are no
|
||||
// more qid entries in qidsState we'll put one as sort of 'keep this until
|
||||
// we kick off all our resolvers' entry
|
||||
// once we kick off all resolvers we'll remove this entry
|
||||
incQIDState( q, nullptr );
|
||||
checkQIDState( q );
|
||||
}
|
||||
@@ -586,8 +595,8 @@ Pipeline::shunt( const query_ptr& q )
|
||||
// we get here if we disable a resolver while a query is resolving
|
||||
// OR we are just out of resolvers while query is still resolving
|
||||
|
||||
//since we seem to at least tried to kick off all of the resolvers,
|
||||
//remove the '.keep' entry
|
||||
// since we seem to at least tried to kick off all of the resolvers,
|
||||
// remove the '.keep' entry
|
||||
decQIDState( q, nullptr );
|
||||
return;
|
||||
}
|
||||
@@ -627,7 +636,7 @@ Pipeline::checkQIDState( const Tomahawk::query_ptr& query )
|
||||
Q_D( Pipeline );
|
||||
QMutexLocker lock( &d->mut );
|
||||
|
||||
tDebug() << Q_FUNC_INFO << " " << query->id() << " " << d->qidsState.count( query->id() );
|
||||
tDebug() << Q_FUNC_INFO << query->id() << d->qidsState.count( query->id() );
|
||||
|
||||
if ( d->qidsState.contains( query->id() ) )
|
||||
{
|
||||
@@ -664,7 +673,7 @@ Pipeline::decQIDState( const Tomahawk::query_ptr& query, Tomahawk::Resolver* r )
|
||||
{
|
||||
{
|
||||
QMutexLocker lock( &d->mut );
|
||||
d->qidsState.remove( query->id(), r );//Removes all matching pairs
|
||||
d->qidsState.remove( query->id(), r ); // Removes all matching pairs
|
||||
}
|
||||
|
||||
checkQIDState( query );
|
||||
|
@@ -66,6 +66,7 @@ public:
|
||||
QList< QPointer< ExternalResolver > > scriptResolvers() const;
|
||||
Tomahawk::ExternalResolver* resolverForPath( const QString& scriptPath );
|
||||
|
||||
QList< Resolver* > resolvers() const;
|
||||
void addResolver( Resolver* r );
|
||||
void removeResolver( Resolver* r );
|
||||
|
||||
|
@@ -289,9 +289,4 @@ private:
|
||||
|
||||
Q_DECLARE_METATYPE( QSharedPointer< Tomahawk::Playlist > )
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
// Qt5 automatically generated this Metatype
|
||||
Q_DECLARE_METATYPE( QList< QSharedPointer< Tomahawk::Query > > )
|
||||
#endif
|
||||
|
||||
#endif // PLAYLIST_H
|
||||
|
@@ -33,6 +33,7 @@
|
||||
|
||||
#include <QtAlgorithms>
|
||||
#include <QDebug>
|
||||
#include <QCoreApplication>
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
@@ -47,6 +48,7 @@ Query::get( const QString& artist, const QString& track, const QString& album, c
|
||||
autoResolve = false;
|
||||
|
||||
query_ptr q = query_ptr( new Query( Track::get( artist, track, album ), qid, autoResolve ), &QObject::deleteLater );
|
||||
q->moveToThread( QCoreApplication::instance()->thread() );
|
||||
q->setWeakRef( q.toWeakRef() );
|
||||
|
||||
if ( autoResolve )
|
||||
@@ -192,7 +194,7 @@ Query::addResults( const QList< Tomahawk::result_ptr >& newresults )
|
||||
}*/
|
||||
|
||||
d->results << newresults;
|
||||
qStableSort( d->results.begin(), d->results.end(), std::bind( &Query::resultSorter, this, std::placeholders::_1, std::placeholders::_2 ) );
|
||||
sortResults();
|
||||
|
||||
// hook up signals, and check solved status
|
||||
foreach( const result_ptr& rp, newresults )
|
||||
@@ -256,7 +258,7 @@ Query::onResultStatusChanged()
|
||||
Q_D( Query );
|
||||
QMutexLocker lock( &d->mutex );
|
||||
if ( !d->results.isEmpty() )
|
||||
qStableSort( d->results.begin(), d->results.end(), std::bind( &Query::resultSorter, this, std::placeholders::_1, std::placeholders::_2 ) );
|
||||
sortResults();
|
||||
}
|
||||
|
||||
checkResults();
|
||||
@@ -271,6 +273,11 @@ Query::removeResult( const Tomahawk::result_ptr& result )
|
||||
Q_D( Query );
|
||||
QMutexLocker lock( &d->mutex );
|
||||
d->results.removeAll( result );
|
||||
if ( d->preferredResult == result )
|
||||
{
|
||||
d->preferredResult.clear();
|
||||
}
|
||||
sortResults();
|
||||
}
|
||||
|
||||
emit resultsRemoved( result );
|
||||
@@ -394,21 +401,35 @@ Query::id() const
|
||||
bool
|
||||
Query::resultSorter( const result_ptr& left, const result_ptr& right )
|
||||
{
|
||||
Q_D( Query );
|
||||
if ( !d->preferredResult.isNull() )
|
||||
{
|
||||
if ( d->preferredResult == left )
|
||||
return true;
|
||||
if ( d->preferredResult == right )
|
||||
return false;
|
||||
}
|
||||
|
||||
const float ls = left->isOnline() ? howSimilar( left ) : 0.0;
|
||||
const float rs = right->isOnline() ? howSimilar( right ) : 0.0;
|
||||
|
||||
if ( ls == rs )
|
||||
{
|
||||
if ( right->resolvedByCollection() && right->resolvedByCollection()->isLocal() )
|
||||
if ( right->isLocal() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if ( !right->isPreview() )
|
||||
if ( left->isPreview() != right->isPreview() )
|
||||
{
|
||||
return false;
|
||||
return !left->isPreview();
|
||||
}
|
||||
|
||||
return true;
|
||||
if ( left->resolvedBy() != nullptr && right->resolvedBy() != nullptr )
|
||||
{
|
||||
return left->resolvedBy()->weight() > right->resolvedBy()->weight();
|
||||
}
|
||||
|
||||
return left->id() > right->id();
|
||||
}
|
||||
|
||||
if ( left->isPreview() != right->isPreview() )
|
||||
@@ -420,6 +441,30 @@ Query::resultSorter( const result_ptr& left, const result_ptr& right )
|
||||
}
|
||||
|
||||
|
||||
result_ptr
|
||||
Query::preferredResult() const
|
||||
{
|
||||
Q_D( const Query );
|
||||
return d->preferredResult;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Query::setPreferredResult( const result_ptr& result )
|
||||
{
|
||||
{
|
||||
Q_D( Query );
|
||||
QMutexLocker lock( &d->mutex );
|
||||
|
||||
Q_ASSERT( d->results.contains( result ) );
|
||||
d->preferredResult = result;
|
||||
sortResults();
|
||||
}
|
||||
|
||||
emit resultsChanged();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Query::setCurrentResolver( Tomahawk::Resolver* resolver )
|
||||
{
|
||||
@@ -615,6 +660,10 @@ float
|
||||
Query::howSimilar( const Tomahawk::result_ptr& r )
|
||||
{
|
||||
Q_D( Query );
|
||||
if (d->howSimilarCache.find(r->id()) != d->howSimilarCache.end())
|
||||
{
|
||||
return d->howSimilarCache[r->id()];
|
||||
}
|
||||
// result values
|
||||
const QString& rArtistname = r->track()->artistSortname();
|
||||
const QString& rAlbumname = r->track()->albumSortname();
|
||||
@@ -636,6 +685,13 @@ Query::howSimilar( const Tomahawk::result_ptr& r )
|
||||
qTrackname = queryTrack()->trackSortname();
|
||||
}
|
||||
|
||||
static const QRegExp filterOutChars = QRegExp(QString::fromUtf8("[-`´~!@#$%^&*()_—+=|:;<>«»,.?/{}\'\"\\[\\]\\\\]"));
|
||||
|
||||
//Cleanup symbols for minor naming differences
|
||||
qArtistname.remove(filterOutChars);
|
||||
qTrackname.remove(filterOutChars);
|
||||
qAlbumname.remove(filterOutChars);
|
||||
|
||||
// normal edit distance
|
||||
const int artdist = TomahawkUtils::levenshtein( qArtistname, rArtistname );
|
||||
const int trkdist = TomahawkUtils::levenshtein( qTrackname, rTrackname );
|
||||
@@ -666,12 +722,16 @@ Query::howSimilar( const Tomahawk::result_ptr& r )
|
||||
const int mlatr = qMax( artistTrackname.length(), rArtistTrackname.length() );
|
||||
const float dcatr = (float)( mlatr - atrdist ) / mlatr;
|
||||
|
||||
return qMax( dctrk, qMax( dcatr, qMax( dcart, dcalb ) ) );
|
||||
float resultScore = qMax( dctrk, qMax( dcatr, qMax( dcart, dcalb ) ) );
|
||||
d->howSimilarCache[r->id()] = resultScore;
|
||||
return resultScore;
|
||||
}
|
||||
else
|
||||
{
|
||||
// weighted, so album match is worth less than track title
|
||||
return ( dcart * 4 + dcalb + dctrk * 5 ) / 10;
|
||||
float resultScore = ( dcart * 4 + dcalb + dctrk * 5 ) / 10;
|
||||
d->howSimilarCache[r->id()] = resultScore;
|
||||
return resultScore;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -722,3 +782,11 @@ Query::setWeakRef( QWeakPointer<Query> weakRef )
|
||||
Q_D( Query );
|
||||
d->ownRef = weakRef;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Query::sortResults()
|
||||
{
|
||||
Q_D( Query );
|
||||
qStableSort( d->results.begin(), d->results.end(), std::bind( &Query::resultSorter, this, std::placeholders::_1, std::placeholders::_2 ) );
|
||||
}
|
||||
|
@@ -112,6 +112,8 @@ public:
|
||||
|
||||
/// sorter for list of results
|
||||
bool resultSorter( const result_ptr& left, const result_ptr& right );
|
||||
result_ptr preferredResult() const;
|
||||
void setPreferredResult( const result_ptr& result );
|
||||
|
||||
signals:
|
||||
void resultsAdded( const QList<Tomahawk::result_ptr>& );
|
||||
@@ -158,6 +160,7 @@ private:
|
||||
void setCurrentResolver( Tomahawk::Resolver* resolver );
|
||||
void clearResults();
|
||||
void checkResults();
|
||||
void sortResults();
|
||||
};
|
||||
|
||||
} //ns
|
||||
|
@@ -4,6 +4,7 @@
|
||||
#include "Query.h"
|
||||
|
||||
#include <QMutex>
|
||||
#include <map>
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
@@ -39,6 +40,7 @@ private:
|
||||
QList< Tomahawk::artist_ptr > artists;
|
||||
QList< Tomahawk::album_ptr > albums;
|
||||
QList< Tomahawk::result_ptr > results;
|
||||
Tomahawk::result_ptr preferredResult;
|
||||
|
||||
float score;
|
||||
bool solved;
|
||||
@@ -58,6 +60,8 @@ private:
|
||||
|
||||
mutable QMutex mutex;
|
||||
QWeakPointer< Tomahawk::Query > ownRef;
|
||||
|
||||
std::map<QString, float> howSimilarCache;
|
||||
};
|
||||
|
||||
} // Tomahawk
|
||||
|
@@ -35,6 +35,8 @@
|
||||
#include "Track.h"
|
||||
#include "Typedefs.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
static QHash< QString, result_wptr > s_results;
|
||||
@@ -69,6 +71,7 @@ Result::get( const QString& url, const track_ptr& track )
|
||||
}
|
||||
|
||||
result_ptr r = result_ptr( new Result( url, track ), &Result::deleteLater );
|
||||
r->moveToThread( QCoreApplication::instance()->thread() );
|
||||
r->setWeakRef( r.toWeakRef() );
|
||||
s_results.insert( url, r );
|
||||
|
||||
@@ -132,11 +135,19 @@ Result::deleteLater()
|
||||
void
|
||||
Result::onResolverRemoved( Tomahawk::Resolver* resolver )
|
||||
{
|
||||
m_mutex.lock();
|
||||
|
||||
if ( m_resolver.data() == resolver )
|
||||
{
|
||||
m_resolver = 0;
|
||||
m_mutex.unlock();
|
||||
|
||||
emit statusChanged();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_mutex.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -150,6 +161,8 @@ Result::resolvedByCollection() const
|
||||
QString
|
||||
Result::url() const
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
return m_url;
|
||||
}
|
||||
|
||||
@@ -157,6 +170,8 @@ Result::url() const
|
||||
bool
|
||||
Result::checked() const
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
return m_checked;
|
||||
}
|
||||
|
||||
@@ -164,6 +179,8 @@ Result::checked() const
|
||||
bool
|
||||
Result::isPreview() const
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
return m_isPreview;
|
||||
}
|
||||
|
||||
@@ -171,6 +188,8 @@ Result::isPreview() const
|
||||
QString
|
||||
Result::mimetype() const
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
return m_mimetype;
|
||||
}
|
||||
|
||||
@@ -178,6 +197,8 @@ Result::mimetype() const
|
||||
RID
|
||||
Result::id() const
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
if ( m_rid.isEmpty() )
|
||||
m_rid = uuid();
|
||||
|
||||
@@ -194,6 +215,8 @@ Result::isOnline() const
|
||||
}
|
||||
else
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
return !m_resolver.isNull();
|
||||
}
|
||||
}
|
||||
@@ -211,27 +234,36 @@ Result::playable() const
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
Result::isLocal() const
|
||||
{
|
||||
return resolvedByCollection().isNull() ? false : resolvedByCollection()->isLocal();
|
||||
}
|
||||
|
||||
|
||||
QVariant
|
||||
Result::toVariant() const
|
||||
{
|
||||
track_ptr t = track();
|
||||
|
||||
QVariantMap m;
|
||||
m.insert( "artist", m_track->artist() );
|
||||
m.insert( "album", m_track->album() );
|
||||
m.insert( "track", m_track->track() );
|
||||
m.insert( "artist", t->artist() );
|
||||
m.insert( "album", t->album() );
|
||||
m.insert( "track", t->track() );
|
||||
m.insert( "source", friendlySource() );
|
||||
m.insert( "mimetype", mimetype() );
|
||||
m.insert( "size", size() );
|
||||
m.insert( "bitrate", bitrate() );
|
||||
m.insert( "duration", m_track->duration() );
|
||||
m.insert( "duration", t->duration() );
|
||||
// m.insert( "score", score() );
|
||||
m.insert( "sid", id() );
|
||||
m.insert( "discnumber", m_track->discnumber() );
|
||||
m.insert( "albumpos", m_track->albumpos() );
|
||||
m.insert( "discnumber", t->discnumber() );
|
||||
m.insert( "albumpos", t->albumpos() );
|
||||
m.insert( "preview", isPreview() );
|
||||
m.insert( "purchaseUrl", purchaseUrl() );
|
||||
|
||||
if ( !m_track->composer().isEmpty() )
|
||||
m.insert( "composer", m_track->composer() );
|
||||
if ( !t->composer().isEmpty() )
|
||||
m.insert( "composer", t->composer() );
|
||||
|
||||
return m;
|
||||
}
|
||||
@@ -240,20 +272,25 @@ Result::toVariant() const
|
||||
QString
|
||||
Result::toString() const
|
||||
{
|
||||
if ( m_track )
|
||||
m_mutex.lock();
|
||||
track_ptr track = m_track;
|
||||
QString url = m_url;
|
||||
m_mutex.unlock();
|
||||
|
||||
if ( track )
|
||||
{
|
||||
return QString( "Result(%1) %2 - %3%4 (%5)" )
|
||||
.arg( id() )
|
||||
.arg( m_track->artist() )
|
||||
.arg( m_track->track() )
|
||||
.arg( m_track->album().isEmpty() ? QString() : QString( " on %1" ).arg( m_track->album() ) )
|
||||
.arg( m_url );
|
||||
.arg( track->artist() )
|
||||
.arg( track->track() )
|
||||
.arg( track->album().isEmpty() ? QString() : QString( " on %1" ).arg( track->album() ) )
|
||||
.arg( url );
|
||||
}
|
||||
else
|
||||
{
|
||||
return QString( "Result(%1) (%2)" )
|
||||
.arg( id() )
|
||||
.arg( m_url );
|
||||
.arg( url );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -261,6 +298,8 @@ Result::toString() const
|
||||
Tomahawk::query_ptr
|
||||
Result::toQuery()
|
||||
{
|
||||
QMutexLocker l( &m_mutex );
|
||||
|
||||
if ( m_query.isNull() )
|
||||
{
|
||||
query_ptr query = Tomahawk::Query::get( m_track );
|
||||
@@ -270,12 +309,15 @@ Result::toQuery()
|
||||
m_query = query->weakRef();
|
||||
|
||||
QList<Tomahawk::result_ptr> rl;
|
||||
rl << weakRef().toStrongRef();
|
||||
rl << m_ownRef.toStrongRef();
|
||||
m_mutex.unlock();
|
||||
query->addResults( rl );
|
||||
m_mutex.lock();
|
||||
query->setResolveFinished( true );
|
||||
return query;
|
||||
}
|
||||
|
||||
|
||||
return m_query.toStrongRef();
|
||||
}
|
||||
|
||||
@@ -295,9 +337,10 @@ Result::onOffline()
|
||||
|
||||
|
||||
void
|
||||
Result::setResolvedByCollection( const Tomahawk::collection_ptr& collection , bool emitOnlineEvents )
|
||||
Result::setResolvedByCollection( const Tomahawk::collection_ptr& collection, bool emitOnlineEvents )
|
||||
{
|
||||
m_collection = collection;
|
||||
|
||||
if ( emitOnlineEvents )
|
||||
{
|
||||
Q_ASSERT( !collection.isNull() );
|
||||
@@ -311,6 +354,8 @@ Result::setResolvedByCollection( const Tomahawk::collection_ptr& collection , bo
|
||||
void
|
||||
Result::setFriendlySource( const QString& s )
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
m_friendlySource = s;
|
||||
}
|
||||
|
||||
@@ -318,6 +363,8 @@ Result::setFriendlySource( const QString& s )
|
||||
void
|
||||
Result::setPreview( bool isPreview )
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
m_isPreview = isPreview;
|
||||
}
|
||||
|
||||
@@ -325,6 +372,8 @@ Result::setPreview( bool isPreview )
|
||||
void
|
||||
Result::setPurchaseUrl( const QString& u )
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
m_purchaseUrl = u;
|
||||
}
|
||||
|
||||
@@ -332,6 +381,8 @@ Result::setPurchaseUrl( const QString& u )
|
||||
void
|
||||
Result::setLinkUrl( const QString& u )
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
m_linkUrl = u;
|
||||
}
|
||||
|
||||
@@ -339,6 +390,8 @@ Result::setLinkUrl( const QString& u )
|
||||
void
|
||||
Result::setChecked( bool checked )
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
m_checked = checked;
|
||||
}
|
||||
|
||||
@@ -346,6 +399,8 @@ Result::setChecked( bool checked )
|
||||
void
|
||||
Result::setMimetype( const QString& mimetype )
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
m_mimetype = mimetype;
|
||||
}
|
||||
|
||||
@@ -353,6 +408,8 @@ Result::setMimetype( const QString& mimetype )
|
||||
void
|
||||
Result::setBitrate( unsigned int bitrate )
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
m_bitrate = bitrate;
|
||||
}
|
||||
|
||||
@@ -360,6 +417,8 @@ Result::setBitrate( unsigned int bitrate )
|
||||
void
|
||||
Result::setSize( unsigned int size )
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
m_size = size;
|
||||
}
|
||||
|
||||
@@ -367,6 +426,8 @@ Result::setSize( unsigned int size )
|
||||
void
|
||||
Result::setModificationTime( unsigned int modtime )
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
m_modtime = modtime;
|
||||
}
|
||||
|
||||
@@ -374,6 +435,8 @@ Result::setModificationTime( unsigned int modtime )
|
||||
void
|
||||
Result::setTrack( const track_ptr& track )
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
m_track = track;
|
||||
}
|
||||
|
||||
@@ -381,6 +444,8 @@ Result::setTrack( const track_ptr& track )
|
||||
unsigned int
|
||||
Result::fileId() const
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
return m_fileId;
|
||||
}
|
||||
|
||||
@@ -390,6 +455,8 @@ Result::friendlySource() const
|
||||
{
|
||||
if ( resolvedByCollection().isNull() )
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
return m_friendlySource;
|
||||
}
|
||||
else
|
||||
@@ -400,6 +467,8 @@ Result::friendlySource() const
|
||||
QString
|
||||
Result::purchaseUrl() const
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
return m_purchaseUrl;
|
||||
}
|
||||
|
||||
@@ -407,6 +476,8 @@ Result::purchaseUrl() const
|
||||
QString
|
||||
Result::linkUrl() const
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
return m_linkUrl;
|
||||
}
|
||||
|
||||
@@ -416,6 +487,8 @@ Result::sourceIcon( TomahawkUtils::ImageMode style, const QSize& desiredSize ) c
|
||||
{
|
||||
if ( resolvedByCollection().isNull() )
|
||||
{
|
||||
//QMutexLocker lock( &m_mutex );
|
||||
|
||||
const ExternalResolver* resolver = qobject_cast< ExternalResolver* >( m_resolver.data() );
|
||||
if ( !resolver )
|
||||
{
|
||||
@@ -466,6 +539,8 @@ Result::sourceIcon( TomahawkUtils::ImageMode style, const QSize& desiredSize ) c
|
||||
unsigned int
|
||||
Result::bitrate() const
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
return m_bitrate;
|
||||
}
|
||||
|
||||
@@ -473,6 +548,8 @@ Result::bitrate() const
|
||||
unsigned int
|
||||
Result::size() const
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
return m_size;
|
||||
}
|
||||
|
||||
@@ -480,6 +557,8 @@ Result::size() const
|
||||
unsigned int
|
||||
Result::modificationTime() const
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
return m_modtime;
|
||||
}
|
||||
|
||||
@@ -487,6 +566,8 @@ Result::modificationTime() const
|
||||
void
|
||||
Result::setFileId( unsigned int id )
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
m_fileId = id;
|
||||
}
|
||||
|
||||
@@ -494,6 +575,8 @@ Result::setFileId( unsigned int id )
|
||||
Tomahawk::Resolver*
|
||||
Result::resolvedBy() const
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
if ( !m_collection.isNull() )
|
||||
return m_collection.data();
|
||||
|
||||
@@ -504,12 +587,16 @@ Result::resolvedBy() const
|
||||
void
|
||||
Result::setResolvedByResolver( Tomahawk::Resolver* resolver )
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
m_resolver = QPointer< Tomahawk::Resolver >( resolver );
|
||||
}
|
||||
|
||||
|
||||
QPointer< Resolver > Result::resolvedByResolver() const
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
return m_resolver;
|
||||
}
|
||||
|
||||
@@ -525,16 +612,29 @@ Result::doneEditing()
|
||||
track_ptr
|
||||
Result::track() const
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
return m_track;
|
||||
}
|
||||
|
||||
|
||||
QList< DownloadFormat >
|
||||
Result::downloadFormats() const
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
return m_formats;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Result::setDownloadFormats( const QList<DownloadFormat>& formats )
|
||||
{
|
||||
if ( formats.isEmpty() )
|
||||
return;
|
||||
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
m_formats.clear();
|
||||
foreach ( const DownloadFormat& format, formats )
|
||||
{
|
||||
@@ -562,7 +662,7 @@ Result::setDownloadFormats( const QList<DownloadFormat>& formats )
|
||||
void
|
||||
Result::onSettingsChanged()
|
||||
{
|
||||
if ( TomahawkSettings::instance()->downloadsPreferredFormat().toLower() != m_formats.first().extension.toLower() )
|
||||
if ( TomahawkSettings::instance()->downloadsPreferredFormat().toLower() != downloadFormats().first().extension.toLower() )
|
||||
{
|
||||
setDownloadFormats( downloadFormats() );
|
||||
emit updated();
|
||||
@@ -599,6 +699,8 @@ Result::onDownloadJobStateChanged( DownloadJob::TrackState newState, DownloadJob
|
||||
QWeakPointer<Result>
|
||||
Result::weakRef()
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
return m_ownRef;
|
||||
}
|
||||
|
||||
@@ -606,5 +708,7 @@ Result::weakRef()
|
||||
void
|
||||
Result::setWeakRef( QWeakPointer<Result> weakRef )
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
m_ownRef = weakRef;
|
||||
}
|
||||
|
@@ -31,6 +31,7 @@
|
||||
#include <QPixmap>
|
||||
#include <QPointer>
|
||||
#include <QVariant>
|
||||
#include <QMutex>
|
||||
|
||||
class MetadataEditor;
|
||||
|
||||
@@ -93,6 +94,12 @@ public:
|
||||
bool isOnline() const;
|
||||
bool playable() const;
|
||||
|
||||
/**
|
||||
* @brief whether this result isLocal, i.e. resolved by a local collection
|
||||
* @return isLocal
|
||||
*/
|
||||
bool isLocal() const;
|
||||
|
||||
QString url() const;
|
||||
/**
|
||||
* Has the given url been checked that it is accessible/valid.
|
||||
@@ -131,7 +138,7 @@ public:
|
||||
|
||||
track_ptr track() const;
|
||||
|
||||
QList<DownloadFormat> downloadFormats() const { return m_formats; }
|
||||
QList< DownloadFormat > downloadFormats() const;
|
||||
void setDownloadFormats( const QList<DownloadFormat>& formats );
|
||||
|
||||
downloadjob_ptr downloadJob() const { return m_downloadJob; }
|
||||
@@ -161,6 +168,8 @@ private:
|
||||
explicit Result( const QString& url, const Tomahawk::track_ptr& track );
|
||||
explicit Result();
|
||||
|
||||
mutable QMutex m_mutex;
|
||||
|
||||
mutable RID m_rid;
|
||||
collection_wptr m_collection;
|
||||
QPointer< Tomahawk::Resolver > m_resolver;
|
||||
|
@@ -1,13 +1,9 @@
|
||||
#include <QtPlugin>
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#if defined(Q_EXPORT_PLUGIN)
|
||||
#undef Q_EXPORT_PLUGIN
|
||||
#undef Q_EXPORT_PLUGIN2
|
||||
#endif
|
||||
#if defined(Q_EXPORT_PLUGIN)
|
||||
#undef Q_EXPORT_PLUGIN
|
||||
#undef Q_EXPORT_PLUGIN2
|
||||
#endif
|
||||
|
||||
#define Q_EXPORT_PLUGIN(a)
|
||||
#define Q_EXPORT_PLUGIN2(a, b)
|
||||
#else
|
||||
# define Q_PLUGIN_METADATA(a)
|
||||
#endif
|
||||
#define Q_EXPORT_PLUGIN(a)
|
||||
#define Q_EXPORT_PLUGIN2(a, b)
|
||||
|
@@ -34,14 +34,8 @@
|
||||
#include "PlaylistInterface.h"
|
||||
#include "Source.h"
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
|
||||
#include <qtkeychain/keychain.h>
|
||||
#include <QDesktopServices>
|
||||
#else
|
||||
#include <qt5keychain/keychain.h>
|
||||
#include <QStandardPaths>
|
||||
#endif
|
||||
|
||||
#include <qt5keychain/keychain.h>
|
||||
#include <QStandardPaths>
|
||||
#include <QDir>
|
||||
|
||||
using namespace Tomahawk;
|
||||
@@ -733,11 +727,7 @@ TomahawkSettings::genericCacheVersion() const
|
||||
QString
|
||||
TomahawkSettings::storageCacheLocation() const
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
return QStandardPaths::writableLocation( QStandardPaths::CacheLocation );
|
||||
#else
|
||||
return QDesktopServices::storageLocation( QDesktopServices::CacheLocation );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -746,11 +736,7 @@ TomahawkSettings::scannerPaths() const
|
||||
{
|
||||
QString musicLocation;
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
musicLocation = QStandardPaths::writableLocation( QStandardPaths::MusicLocation );
|
||||
#else
|
||||
musicLocation = QDesktopServices::storageLocation( QDesktopServices::MusicLocation );
|
||||
#endif
|
||||
|
||||
return value( "scanner/paths", musicLocation ).toStringList();
|
||||
}
|
||||
@@ -887,6 +873,20 @@ TomahawkSettings::setCrashReporterEnabled( bool enable )
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
TomahawkSettings::exitOnClose() const
|
||||
{
|
||||
return value( "ui/exitOnClose", false ).toBool();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkSettings::setExitOnClose( bool enable )
|
||||
{
|
||||
setValue( "ui/exitOnClose", enable );
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
TomahawkSettings::songChangeNotificationEnabled() const
|
||||
{
|
||||
@@ -929,6 +929,20 @@ TomahawkSettings::setVolume( unsigned int volume )
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
TomahawkSettings::muted() const
|
||||
{
|
||||
return value( "audio/muted" ).toBool();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkSettings::setMuted( bool muted )
|
||||
{
|
||||
setValue( "audio/muted", muted );
|
||||
}
|
||||
|
||||
|
||||
QString
|
||||
TomahawkSettings::proxyHost() const
|
||||
{
|
||||
@@ -1750,3 +1764,15 @@ TomahawkSettings::setPlaydarKey( const QByteArray& key )
|
||||
setValue( "playdar/key", key );
|
||||
}
|
||||
|
||||
QString
|
||||
TomahawkSettings::vlcArguments() const
|
||||
{
|
||||
return value( "vlc/cmdline_args" ).value< QString >();
|
||||
}
|
||||
|
||||
void
|
||||
TomahawkSettings::setVlcArguments( const QString& args )
|
||||
{
|
||||
setValue( "vlc/cmdline_args", args);
|
||||
}
|
||||
|
||||
|
@@ -107,6 +107,9 @@ public:
|
||||
unsigned int volume() const;
|
||||
void setVolume( unsigned int volume );
|
||||
|
||||
bool muted() const;
|
||||
void setMuted( bool muted );
|
||||
|
||||
/// Playlist stuff
|
||||
QByteArray playlistColumnSizes( const QString& playlistid ) const;
|
||||
void setPlaylistColumnSizes( const QString& playlistid, const QByteArray& state );
|
||||
@@ -160,6 +163,9 @@ public:
|
||||
bool crashReporterEnabled() const; /// true by default
|
||||
void setCrashReporterEnabled( bool enable );
|
||||
|
||||
bool exitOnClose() const; /// false by default
|
||||
void setExitOnClose( bool enable );
|
||||
|
||||
bool songChangeNotificationEnabled() const; /// true by default
|
||||
void setSongChangeNotificationEnabled( bool enable );
|
||||
|
||||
@@ -250,6 +256,10 @@ public:
|
||||
QByteArray playdarKey() const;
|
||||
void setPlaydarKey( const QByteArray& key );
|
||||
|
||||
// VLC Settings
|
||||
QString vlcArguments() const;
|
||||
void setVlcArguments( const QString& arguments );
|
||||
|
||||
signals:
|
||||
void changed();
|
||||
void recentlyPlayedPlaylistAdded( const QString& playlistId, int sourceId );
|
||||
|
@@ -37,6 +37,7 @@
|
||||
#include <QtAlgorithms>
|
||||
#include <QDateTime>
|
||||
#include <QReadWriteLock>
|
||||
#include <QCoreApplication>
|
||||
|
||||
|
||||
using namespace Tomahawk;
|
||||
@@ -92,6 +93,7 @@ Track::get( const QString& artist, const QString& track, const QString& album, c
|
||||
}
|
||||
|
||||
track_ptr t = track_ptr( new Track( artist, track, album, albumArtist, duration, composer, albumpos, discnumber ), &Track::deleteLater );
|
||||
t->moveToThread( QCoreApplication::instance()->thread() );
|
||||
t->setWeakRef( t.toWeakRef() );
|
||||
s_tracksByName.insert( key, t );
|
||||
|
||||
@@ -211,19 +213,11 @@ Track::init()
|
||||
Q_D( Track );
|
||||
updateSortNames();
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
QObject::connect( d->trackData.data(), &TrackData::attributesLoaded, this, &Track::attributesLoaded );
|
||||
QObject::connect( d->trackData.data(), &TrackData::socialActionsLoaded, this, &Track::socialActionsLoaded );
|
||||
QObject::connect( d->trackData.data(), &TrackData::statsLoaded, this, &Track::statsLoaded );
|
||||
QObject::connect( d->trackData.data(), &TrackData::similarTracksLoaded, this, &Track::similarTracksLoaded );
|
||||
QObject::connect( d->trackData.data(), &TrackData::lyricsLoaded, this, &Track::lyricsLoaded );
|
||||
#else
|
||||
connect( d->trackData.data(), SIGNAL( attributesLoaded() ), SIGNAL( attributesLoaded() ) );
|
||||
connect( d->trackData.data(), SIGNAL( socialActionsLoaded() ), SIGNAL( socialActionsLoaded() ) );
|
||||
connect( d->trackData.data(), SIGNAL( statsLoaded() ), SIGNAL( statsLoaded() ) );
|
||||
connect( d->trackData.data(), SIGNAL( similarTracksLoaded() ), SIGNAL( similarTracksLoaded() ) );
|
||||
connect( d->trackData.data(), SIGNAL( lyricsLoaded() ), SIGNAL( lyricsLoaded() ) );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@@ -19,8 +19,7 @@
|
||||
|
||||
#include "TrackData.h"
|
||||
|
||||
#include <QtAlgorithms>
|
||||
#include <QReadWriteLock>
|
||||
|
||||
|
||||
#include "audio/AudioEngine.h"
|
||||
#include "collection/Collection.h"
|
||||
@@ -41,6 +40,10 @@
|
||||
#include "PlaylistEntry.h"
|
||||
#include "SourceList.h"
|
||||
|
||||
#include <QtAlgorithms>
|
||||
#include <QReadWriteLock>
|
||||
#include <QCoreApplication>
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
QHash< QString, trackdata_wptr > TrackData::s_trackDatasByName = QHash< QString, trackdata_wptr >();
|
||||
@@ -84,6 +87,7 @@ TrackData::get( unsigned int id, const QString& artist, const QString& track )
|
||||
}
|
||||
|
||||
trackdata_ptr t = trackdata_ptr( new TrackData( id, artist, track ), &TrackData::deleteLater );
|
||||
t->moveToThread( QCoreApplication::instance()->thread() );
|
||||
t->setWeakRef( t.toWeakRef() );
|
||||
s_trackDatasByName.insert( key, t );
|
||||
|
||||
|
@@ -253,7 +253,7 @@ namespace Tomahawk
|
||||
typedef QHash< QString, QString > InfoStringHash;
|
||||
typedef QPair< QVariantMap, QVariant > PushInfoPair;
|
||||
|
||||
typedef QPointer< InfoPlugin > InfoPluginPtr;
|
||||
typedef QSharedPointer< InfoPlugin > InfoPluginPtr;
|
||||
}
|
||||
|
||||
namespace Network
|
||||
|
@@ -76,6 +76,8 @@ public:
|
||||
*/
|
||||
virtual bool addPageItem() const;
|
||||
|
||||
virtual bool isRemovable() const { return false; }
|
||||
|
||||
/**
|
||||
* This page is actually a constant page that will be shown on every
|
||||
* restart of Tomahawk until the user selects it to be removed.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user