Merged upstream and added nsis uninstaller path fix.
1
.gitignore
vendored
@@ -9,3 +9,4 @@ Makefile*
|
||||
moc_*
|
||||
*~
|
||||
/tomahawk
|
||||
thirdparty/qtweetlib/WARNING-twitter-api-keys
|
||||
|
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule "thirdparty/jreen"]
|
||||
path = thirdparty/jreen
|
||||
url = git://gitorious.org/jreen/jreen.git
|
16
AUTHORS
Normal file
@@ -0,0 +1,16 @@
|
||||
Tomahawk is primarily authored by:
|
||||
|
||||
* Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
|
||||
Contributors include:
|
||||
|
||||
* Leo Franchi <lfranchi@kde.org>
|
||||
* Dominik Schmidt <dev@dominik-schmidt.de>
|
||||
* Jeff Mitchell <mitchell@kde.org>
|
||||
* J Herskowitz <jherskow@gmail.com>
|
||||
* Alejandro Wainzinger <aikawarazuni@gmail.com>
|
||||
|
||||
Thanks to:
|
||||
|
||||
* Harald Sitter <sitter@kde.org>
|
||||
* Steve Robertson
|
107
CMakeLists.txt
@@ -1,28 +1,109 @@
|
||||
PROJECT( tomahawk )
|
||||
CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
|
||||
|
||||
SET( CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules" )
|
||||
###
|
||||
### Tomahawk application info
|
||||
###
|
||||
SET( ORGANIZATION_NAME "Tomahawk" )
|
||||
SET( ORGANIZATION_DOMAIN "tomahawk-player.org" )
|
||||
SET( APPLICATION_NAME "Tomahawk" )
|
||||
SET( VERSION "0.0.2" )
|
||||
|
||||
|
||||
# set paths
|
||||
SET( CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_SOURCE_DIR}/CMakeModules" )
|
||||
SET( THIRDPARTY_DIR ${CMAKE_SOURCE_DIR}/thirdparty )
|
||||
|
||||
# Check if we need qtgui:
|
||||
IF( "${gui}" STREQUAL "no" )
|
||||
ADD_DEFINITIONS( -DENABLE_HEADLESS )
|
||||
MESSAGE( STATUS "Building in HEADLESS mode ***" )
|
||||
FIND_PACKAGE( Qt4 4.6.0 COMPONENTS QtCore QtXml QtNetwork REQUIRED )
|
||||
FIND_PACKAGE( Qt4 4.7.0 COMPONENTS QtCore QtXml QtNetwork REQUIRED )
|
||||
ELSE()
|
||||
MESSAGE( STATUS "Building full GUI version ***" )
|
||||
FIND_PACKAGE( Qt4 4.6.0 COMPONENTS QtGui QtCore QtXml QtNetwork REQUIRED )
|
||||
FIND_PACKAGE( Qt4 4.7.0 COMPONENTS QtGui QtCore QtXml QtNetwork REQUIRED )
|
||||
ENDIF()
|
||||
|
||||
FIND_PACKAGE( Taglib 1.6.0 REQUIRED )
|
||||
FIND_PACKAGE( LibLastFm REQUIRED )
|
||||
#deps
|
||||
INCLUDE( MacroOptionalFindPackage )
|
||||
INCLUDE( MacroLogFeature )
|
||||
|
||||
IF( UNIX AND NOT APPLE )
|
||||
ADD_SUBDIRECTORY( alsa-playback )
|
||||
ELSE()
|
||||
ADD_SUBDIRECTORY( rtaudio )
|
||||
ENDIF( UNIX AND NOT APPLE )
|
||||
# required
|
||||
#While we distribute our own liblastfm2, don't need to look for it
|
||||
#macro_optional_find_package(LibLastFm 0.3.3)
|
||||
#macro_log_feature(LIBLASTFM_FOUND "LastFm" "Qt library for the Last.fm webservices" "https://github.com/mxcl/liblastfm" FALSE "" "liblastfm is needed for scrobbling tracks to Last.fm and fetching cover artwork")
|
||||
set(LIBLASTFM_FOUND true)
|
||||
|
||||
ADD_SUBDIRECTORY( libportfwd )
|
||||
ADD_SUBDIRECTORY( qxt )
|
||||
macro_optional_find_package(LibEchonest 1.1.1)
|
||||
macro_log_feature(LIBECHONEST_FOUND "Echonest" "Qt library for communicating with The Echo Nest" "http://projects.kde.org/libechonest" TRUE "" "libechonest is needed for dynamic playlists and the infosystem")
|
||||
|
||||
macro_optional_find_package(CLucene 0.9.23)
|
||||
macro_log_feature(CLucene_FOUND "CLucene" "The open-source, C++ search engine" "http://clucene.sf.net" TRUE "" "CLucene is used for indexing the collection")
|
||||
|
||||
macro_optional_find_package(QJSON)
|
||||
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")
|
||||
|
||||
macro_optional_find_package(Taglib 1.6.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")
|
||||
|
||||
# we need pthreads too
|
||||
find_package(Threads)
|
||||
|
||||
include( CheckTagLibFileName )
|
||||
check_taglib_filename( COMPLEX_TAGLIB_FILENAME )
|
||||
|
||||
# optional
|
||||
macro_optional_find_package(Jreen)
|
||||
IF( ENABLE_JREEN AND NOT LIBJREEN_FOUND )
|
||||
ADD_SUBDIRECTORY( thirdparty/jreen )
|
||||
SET( LIBJREEN_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/thirdparty/jreen/include )
|
||||
IF( UNIX AND NOT APPLE )
|
||||
SET( LIBJREEN_LIBRARY ${CMAKE_CURRENT_BINARY_DIR}/thirdparty/jreen/libjreen.so )
|
||||
ENDIF( UNIX AND NOT APPLE )
|
||||
IF( WIN32 )
|
||||
SET( LIBJREEN_LIBRARY ${CMAKE_CURRENT_BINARY_DIR}/thirdparty/jreen/libjreen.dll )
|
||||
ENDIF( WIN32 )
|
||||
SET( LIBJREEN_FOUND true )
|
||||
MESSAGE(STATUS "Internal libjreen: ${LIBJREEN_INCLUDE_DIR}, ${LIBJREEN_LIBRARY}")
|
||||
ENDIF( ENABLE_JREEN AND NOT LIBJREEN_FOUND )
|
||||
|
||||
IF( WIN32 )
|
||||
find_library(QTSPARKLE_LIBRARIES qtsparkle)
|
||||
ENDIF( WIN32 )
|
||||
|
||||
macro_log_feature(JREEN_FOUND "Jreen" "Qt XMPP library" "http://gitorious.org/jreen" FALSE "" "Jreen is needed for the alternative/new Jabber SIP plugin. Built automatically inside Tomahawk, if not installed systemwide and ENABLE_JREEN is true")
|
||||
|
||||
macro_optional_find_package(Gloox 1.0)
|
||||
IF( ENABLE_JREEN )
|
||||
set( GLOOX_FOUND false )
|
||||
ENDIF( ENABLE_JREEN)
|
||||
macro_log_feature(GLOOX_FOUND "Gloox" "A portable high-level Jabber/XMPP library for C++" "http://camaya.net/gloox" FALSE "" "Gloox is needed for the Jabber SIP plugin and the XMPP-Bot")
|
||||
#show dep log
|
||||
macro_display_feature_log()
|
||||
MESSAGE("WARNING!")
|
||||
MESSAGE("Phonon is going to replace our own audio abstraction layer soon so we didn't")
|
||||
MESSAGE("add checks for libmad, libvorbis and libflac. Make sure they are installed!")
|
||||
MESSAGE("")
|
||||
MESSAGE("-----------------------------------------------------------------------------")
|
||||
|
||||
SET( INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" )
|
||||
|
||||
# make uninstall support
|
||||
CONFIGURE_FILE(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||
IMMEDIATE @ONLY)
|
||||
|
||||
ADD_CUSTOM_TARGET(uninstall
|
||||
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
|
||||
|
||||
|
||||
IF( NOT APPLE )
|
||||
# Make linking as strict on linux as it is on osx. Then we don't break linking on mac so often
|
||||
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--no-undefined" )
|
||||
ENDIF( NOT APPLE )
|
||||
|
||||
ADD_SUBDIRECTORY( thirdparty )
|
||||
ADD_SUBDIRECTORY( src/libtomahawk )
|
||||
ADD_SUBDIRECTORY( src )
|
||||
|
||||
ADD_SUBDIRECTORY( admin )
|
||||
|
15
CMakeModules/CheckTagLibFileName.cmake
Normal file
@@ -0,0 +1,15 @@
|
||||
# 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)
|
114
CMakeModules/FindCLucene.cmake
Normal file
@@ -0,0 +1,114 @@
|
||||
#
|
||||
# This module looks for clucene (http://clucene.sf.net) support
|
||||
# It will define the following values
|
||||
#
|
||||
# CLUCENE_INCLUDE_DIR = where CLucene/StdHeader.h can be found
|
||||
# CLUCENE_LIBRARY_DIR = where CLucene/clucene-config.h can be found
|
||||
# CLUCENE_LIBRARIES = the libraries to link against CLucene
|
||||
# CLUCENE_VERSION = The CLucene version string
|
||||
# CLucene_FOUND = set to 1 if clucene is found
|
||||
#
|
||||
|
||||
INCLUDE(CheckSymbolExists)
|
||||
INCLUDE(FindLibraryWithDebug)
|
||||
|
||||
if(NOT CLUCENE_MIN_VERSION)
|
||||
set(CLUCENE_MIN_VERSION "0.9.23")
|
||||
endif(NOT CLUCENE_MIN_VERSION)
|
||||
|
||||
IF(EXISTS ${PROJECT_CMAKE}/CLuceneConfig.cmake)
|
||||
INCLUDE(${PROJECT_CMAKE}/CLuceneConfig.cmake)
|
||||
ENDIF(EXISTS ${PROJECT_CMAKE}/CLuceneConfig.cmake)
|
||||
|
||||
SET(TRIAL_LIBRARY_PATHS
|
||||
$ENV{CLUCENE_HOME}/lib${LIB_SUFFIX}
|
||||
${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
|
||||
/usr/local/lib${LIB_SUFFIX}
|
||||
/usr/lib${LIB_SUFFIX}
|
||||
/sw/lib${LIB_SUFFIX}
|
||||
/usr/pkg/lib${LIB_SUFFIX}
|
||||
/usr/lib64
|
||||
)
|
||||
SET(TRIAL_INCLUDE_PATHS
|
||||
$ENV{CLUCENE_HOME}/include
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
/sw/include
|
||||
/usr/pkg/include
|
||||
)
|
||||
FIND_LIBRARY_WITH_DEBUG(CLUCENE_CORE_LIBRARY
|
||||
WIN32_DEBUG_POSTFIX d
|
||||
NAMES clucene-core
|
||||
PATHS ${TRIAL_LIBRARY_PATHS})
|
||||
IF (CLUCENE_CORE_LIBRARY)
|
||||
MESSAGE(STATUS "Found CLucene core library: ${CLUCENE_CORE_LIBRARY}")
|
||||
ENDIF (CLUCENE_CORE_LIBRARY)
|
||||
FIND_LIBRARY_WITH_DEBUG(CLUCENE_SHARED_LIBRARY
|
||||
WIN32_DEBUG_POSTFIX d
|
||||
NAMES clucene-shared
|
||||
PATHS ${TRIAL_LIBRARY_PATHS})
|
||||
IF (CLUCENE_SHARED_LIBRARY)
|
||||
MESSAGE(STATUS "Found CLucene shared library: ${CLUCENE_SHARED_LIBRARY}")
|
||||
ENDIF (CLUCENE_SHARED_LIBRARY)
|
||||
|
||||
IF(CLUCENE_CORE_LIBRARY AND CLUCENE_SHARED_LIBRARY)
|
||||
SET(CLUCENE_LIBRARIES ${CLUCENE_CORE_LIBRARY} ${CLUCENE_SHARED_LIBRARY})
|
||||
ENDIF(CLUCENE_CORE_LIBRARY AND CLUCENE_SHARED_LIBRARY)
|
||||
|
||||
FIND_PATH(CLUCENE_INCLUDE_DIR
|
||||
NAMES CLucene.h
|
||||
PATHS ${TRIAL_INCLUDE_PATHS})
|
||||
|
||||
IF (CLUCENE_INCLUDE_DIR)
|
||||
MESSAGE(STATUS "Found CLucene include dir: ${CLUCENE_INCLUDE_DIR}")
|
||||
ENDIF (CLUCENE_INCLUDE_DIR)
|
||||
|
||||
IF(WIN32)
|
||||
SET(TRIAL_LIBRARY_PATHS ${CLUCENE_INCLUDE_DIR})
|
||||
ENDIF(WIN32)
|
||||
|
||||
SET(CLUCENE_GOOD_VERSION TRUE)
|
||||
|
||||
FIND_PATH(CLUCENE_LIBRARY_DIR
|
||||
NAMES CLuceneConfig.cmake/CLuceneConfig.cmake CLucene/CLuceneConfig.cmake
|
||||
PATHS ${TRIAL_LIBRARY_PATHS} ${TRIAL_INCLUDE_PATHS} NO_DEFAULT_PATH)
|
||||
IF (CLUCENE_LIBRARY_DIR)
|
||||
MESSAGE(STATUS "Found CLucene library dir: ${CLUCENE_LIBRARY_DIR}")
|
||||
# include CLuceneConfig/CLuceneConfig.cmake
|
||||
IF(EXISTS ${CLUCENE_LIBRARY_DIR}/CLuceneConfig.cmake/CLuceneConfig.cmake)
|
||||
INCLUDE(${CLUCENE_LIBRARY_DIR}/CLuceneConfig.cmake/CLuceneConfig.cmake)
|
||||
ENDIF(EXISTS ${CLUCENE_LIBRARY_DIR}/CLuceneConfig.cmake/CLuceneConfig.cmake)
|
||||
# include CLucene/CLuceneConfig.cmake
|
||||
IF(EXISTS ${CLUCENE_LIBRARY_DIR}/CLucene/CLuceneConfig.cmake)
|
||||
INCLUDE(${CLUCENE_LIBRARY_DIR}/CLucene/CLuceneConfig.cmake)
|
||||
ENDIF(EXISTS ${CLUCENE_LIBRARY_DIR}/CLucene/CLuceneConfig.cmake)
|
||||
IF (CLUCENE_VERSION STRLESS "${CLUCENE_MIN_VERSION}")
|
||||
MESSAGE(ERROR " CLucene version ${CLUCENE_VERSION} is less than the required minimum ${CLUCENE_MIN_VERSION}")
|
||||
SET(CLUCENE_GOOD_VERSION FALSE)
|
||||
ENDIF (CLUCENE_VERSION STRLESS "${CLUCENE_MIN_VERSION}")
|
||||
IF (CLUCENE_VERSION STREQUAL "0.9.17")
|
||||
MESSAGE(ERROR "CLucene version 0.9.17 is not supported.")
|
||||
SET(CLUCENE_GOOD_VERSION FALSE)
|
||||
ENDIF (CLUCENE_VERSION STREQUAL "0.9.17")
|
||||
ENDIF (CLUCENE_LIBRARY_DIR)
|
||||
|
||||
IF(CLUCENE_INCLUDE_DIR AND CLUCENE_LIBRARIES AND CLUCENE_LIBRARY_DIR AND CLUCENE_GOOD_VERSION)
|
||||
SET(CLucene_FOUND TRUE)
|
||||
ENDIF(CLUCENE_INCLUDE_DIR AND CLUCENE_LIBRARIES AND CLUCENE_LIBRARY_DIR AND CLUCENE_GOOD_VERSION)
|
||||
|
||||
IF(CLucene_FOUND)
|
||||
IF(NOT CLucene_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found CLucene: ${CLUCENE_LIBRARIES} version ${CLUCENE_VERSION}")
|
||||
ENDIF(NOT CLucene_FIND_QUIETLY)
|
||||
ELSE(CLucene_FOUND)
|
||||
IF(CLucene_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find CLucene.")
|
||||
ENDIF(CLucene_FIND_REQUIRED)
|
||||
ENDIF(CLucene_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
CLUCENE_INCLUDE_DIR
|
||||
CLUCENE_LIBRARY_DIR
|
||||
CLUCENE_LIBRARIES
|
||||
)
|
23
CMakeModules/FindGloox.cmake
Normal file
@@ -0,0 +1,23 @@
|
||||
# - Try to find GLOOX
|
||||
# Find GLOOX headers, libraries and the answer to all questions.
|
||||
#
|
||||
# GLOOX_FOUND True if gloox got found
|
||||
# GLOOX_INCLUDE_DIR Location of gloox headers
|
||||
# GLOOX_LIBRARIES List of libaries to use gloox
|
||||
#
|
||||
# Copyright (c) 2009 Nigmatullin Ruslan <euroelessar@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the New
|
||||
# BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
#
|
||||
|
||||
FIND_PATH( GLOOX_INCLUDE_DIR "gloox/gloox.h" )
|
||||
FIND_LIBRARY( GLOOX_LIBRARIES gloox )
|
||||
|
||||
if( GLOOX_LIBRARIES AND GLOOX_INCLUDE_DIR )
|
||||
message( STATUS "Found gloox: ${GLOOX_LIBRARIES}" )
|
||||
set( GLOOX_FOUND 1 )
|
||||
else( GLOOX_LIBRARIES AND GLOOX_INCLUDE_DIR )
|
||||
message( STATUS "Could NOT find gloox" )
|
||||
endif( GLOOX_LIBRARIES AND GLOOX_INCLUDE_DIR )
|
42
CMakeModules/FindJreen.cmake
Normal file
@@ -0,0 +1,42 @@
|
||||
# - Find libjreen
|
||||
# Find the libjreen includes and the libjreen libraries
|
||||
# This module defines
|
||||
# LIBJREEN_INCLUDE_DIR, root jreen include dir. Include jreen includes with jreen/foo.h
|
||||
# LIBJREEN_LIBRARY, the path to libjreen
|
||||
# LIBJREEN_FOUND, whether libjreen was found
|
||||
|
||||
|
||||
find_path(LIBJREEN_INCLUDE_DIR NAMES jreen.h
|
||||
HINTS
|
||||
~/usr/include
|
||||
/opt/local/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/kde4/include
|
||||
${KDE4_INCLUDE_DIR}
|
||||
PATH_SUFFIXES jreen
|
||||
)
|
||||
|
||||
find_library( LIBJREEN_LIBRARY NAMES jreen
|
||||
PATHS
|
||||
~/usr/lib
|
||||
/opt/local/lib
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/local/lib
|
||||
/opt/kde4/lib
|
||||
${KDE4_LIB_DIR}
|
||||
)
|
||||
|
||||
|
||||
if(LIBJREEN_INCLUDE_DIR AND LIBJREEN_LIBRARY)
|
||||
set(LIBJREEN_FOUND TRUE)
|
||||
message(STATUS "Found libjreen: ${LIBJREEN_INCLUDE_DIR}, ${LIBJREEN_LIBRARY}")
|
||||
else(LIBJREEN_INCLUDE_DIR AND LIBJREEN_LIBRARY)
|
||||
set(LIBJREEN_FOUND FALSE)
|
||||
if (LIBJREEN_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could NOT find required package libjreen")
|
||||
endif(LIBJREEN_FIND_REQUIRED)
|
||||
endif(LIBJREEN_INCLUDE_DIR AND LIBJREEN_LIBRARY)
|
||||
|
||||
mark_as_advanced(LIBJREEN_INCLUDE_DIR LIBJREEN_LIBRARY)
|
42
CMakeModules/FindLibEchonest.cmake
Normal file
@@ -0,0 +1,42 @@
|
||||
# - Find libechonest
|
||||
# Find the libechonest includes and the libechonest libraries
|
||||
# This module defines
|
||||
# LIBECHONEST_INCLUDE_DIR, root echonest include dir. Include echonest includes with echonest/foo.h
|
||||
# LIBECHONEST_LIBRARY, the path to libechonest
|
||||
# LIBECHONEST_FOUND, whether libechonest was found
|
||||
|
||||
|
||||
find_path(LIBECHONEST_INCLUDE_DIR NAMES echonest_export.h
|
||||
HINTS
|
||||
~/usr/include
|
||||
/opt/local/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/kde4/include
|
||||
${KDE4_INCLUDE_DIR}
|
||||
PATH_SUFFIXES echonest
|
||||
)
|
||||
|
||||
find_library( LIBECHONEST_LIBRARY NAMES echonest
|
||||
PATHS
|
||||
~/usr/lib
|
||||
/opt/local/lib
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/local/lib
|
||||
/opt/kde4/lib
|
||||
${KDE4_LIB_DIR}
|
||||
)
|
||||
|
||||
|
||||
if(LIBECHONEST_INCLUDE_DIR AND LIBECHONEST_LIBRARY)
|
||||
set(LIBECHONEST_FOUND TRUE)
|
||||
message(STATUS "Found libechonest: ${LIBECHONEST_INCLUDE_DIR}, ${LIBECHONEST_LIBRARY}")
|
||||
else(LIBECHONEST_INCLUDE_DIR AND LIBECHONEST_LIBRARY)
|
||||
set(LIBECHONEST_FOUND FALSE)
|
||||
if (LIBECHONEST_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could NOT find required package libechonest")
|
||||
endif(LIBECHONEST_FIND_REQUIRED)
|
||||
endif(LIBECHONEST_INCLUDE_DIR AND LIBECHONEST_LIBRARY)
|
||||
|
||||
mark_as_advanced(LIBECHONEST_INCLUDE_DIR LIBECHONEST_LIBRARY)
|
@@ -10,8 +10,8 @@ find_path(LIBLASTFM_INCLUDE_DIR NAMES Audioscrobbler
|
||||
HINTS
|
||||
~/usr/include
|
||||
/opt/local/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
/opt/kde4/include
|
||||
${KDE4_INCLUDE_DIR}
|
||||
PATH_SUFFIXES lastfm
|
||||
@@ -21,9 +21,9 @@ find_library( LIBLASTFM_LIBRARY NAMES lastfm
|
||||
PATHS
|
||||
~/usr/lib
|
||||
/opt/local/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/local/lib
|
||||
/opt/kde4/lib
|
||||
${KDE4_LIB_DIR}
|
||||
)
|
||||
|
46
CMakeModules/FindQJSON.cmake
Normal file
@@ -0,0 +1,46 @@
|
||||
# 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
|
||||
#
|
||||
|
||||
if (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)
|
||||
|
||||
# Already in cache
|
||||
set (QJSON_FOUND TRUE)
|
||||
|
||||
else (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)
|
||||
|
||||
if (NOT WIN32)
|
||||
# use pkg-config to get the values of QJSON_INCLUDE_DIRS
|
||||
# and QJSON_LIBRARY_DIRS to add as hints to the find commands.
|
||||
include (FindPkgConfig)
|
||||
pkg_check_modules (QJSON REQUIRED QJson>=0.5)
|
||||
endif (NOT WIN32)
|
||||
|
||||
find_library (QJSON_LIBRARIES
|
||||
NAMES
|
||||
qjson
|
||||
PATHS
|
||||
${QJSON_LIBRARY_DIRS}
|
||||
${LIB_INSTALL_DIR}
|
||||
${KDE4_LIB_DIR}
|
||||
)
|
||||
|
||||
find_path (QJSON_INCLUDE_DIR
|
||||
NAMES
|
||||
parser.h
|
||||
PATH_SUFFIXES
|
||||
qjson
|
||||
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)
|
||||
|
||||
endif (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)
|
157
CMakeModules/MacroLogFeature.cmake
Normal file
@@ -0,0 +1,157 @@
|
||||
# This file defines the Feature Logging macros.
|
||||
#
|
||||
# MACRO_LOG_FEATURE(VAR FEATURE DESCRIPTION URL [REQUIRED [MIN_VERSION [COMMENTS]]])
|
||||
# Logs the information so that it can be displayed at the end
|
||||
# of the configure run
|
||||
# VAR : TRUE or FALSE, indicating whether the feature is supported
|
||||
# FEATURE: name of the feature, e.g. "libjpeg"
|
||||
# DESCRIPTION: description what this feature provides
|
||||
# URL: home page
|
||||
# REQUIRED: TRUE or FALSE, indicating whether the featue is required
|
||||
# MIN_VERSION: minimum version number. empty string if unneeded
|
||||
# COMMENTS: More info you may want to provide. empty string if unnecessary
|
||||
#
|
||||
# MACRO_DISPLAY_FEATURE_LOG()
|
||||
# Call this to display the collected results.
|
||||
# Exits CMake with a FATAL error message if a required feature is missing
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# INCLUDE(MacroLogFeature)
|
||||
#
|
||||
# FIND_PACKAGE(JPEG)
|
||||
# MACRO_LOG_FEATURE(JPEG_FOUND "libjpeg" "Support JPEG images" "http://www.ijg.org" TRUE "3.2a" "")
|
||||
# ...
|
||||
# MACRO_DISPLAY_FEATURE_LOG()
|
||||
|
||||
# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
|
||||
# Copyright (c) 2006, Allen Winter, <winter@kde.org>
|
||||
# Copyright (c) 2009, Sebastian Trueg, <trueg@kde.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
IF (NOT _macroLogFeatureAlreadyIncluded)
|
||||
SET(_file ${CMAKE_BINARY_DIR}/MissingRequirements.txt)
|
||||
IF (EXISTS ${_file})
|
||||
FILE(REMOVE ${_file})
|
||||
ENDIF (EXISTS ${_file})
|
||||
|
||||
SET(_file ${CMAKE_BINARY_DIR}/EnabledFeatures.txt)
|
||||
IF (EXISTS ${_file})
|
||||
FILE(REMOVE ${_file})
|
||||
ENDIF (EXISTS ${_file})
|
||||
|
||||
SET(_file ${CMAKE_BINARY_DIR}/DisabledFeatures.txt)
|
||||
IF (EXISTS ${_file})
|
||||
FILE(REMOVE ${_file})
|
||||
ENDIF (EXISTS ${_file})
|
||||
|
||||
SET(_macroLogFeatureAlreadyIncluded TRUE)
|
||||
|
||||
INCLUDE(FeatureSummary)
|
||||
|
||||
ENDIF (NOT _macroLogFeatureAlreadyIncluded)
|
||||
|
||||
|
||||
MACRO(MACRO_LOG_FEATURE _var _package _description _url ) # _required _minvers _comments)
|
||||
|
||||
STRING(TOUPPER "${ARGV4}" _required)
|
||||
SET(_minvers "${ARGV5}")
|
||||
SET(_comments "${ARGV6}")
|
||||
|
||||
IF (${_var})
|
||||
SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/EnabledFeatures.txt)
|
||||
ELSE (${_var})
|
||||
IF ("${_required}" STREQUAL "TRUE")
|
||||
SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/MissingRequirements.txt)
|
||||
ELSE ("${_required}" STREQUAL "TRUE")
|
||||
SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/DisabledFeatures.txt)
|
||||
ENDIF ("${_required}" STREQUAL "TRUE")
|
||||
ENDIF (${_var})
|
||||
|
||||
SET(_logtext " * ${_package}")
|
||||
|
||||
IF (NOT ${_var})
|
||||
IF (${_minvers} MATCHES ".*")
|
||||
SET(_logtext "${_logtext} (${_minvers} or higher)")
|
||||
ENDIF (${_minvers} MATCHES ".*")
|
||||
SET(_logtext "${_logtext} <${_url}>\n ")
|
||||
ELSE (NOT ${_var})
|
||||
SET(_logtext "${_logtext} - ")
|
||||
ENDIF (NOT ${_var})
|
||||
|
||||
SET(_logtext "${_logtext}${_description}")
|
||||
|
||||
IF (NOT ${_var})
|
||||
IF (${_comments} MATCHES ".*")
|
||||
SET(_logtext "${_logtext}\n ${_comments}")
|
||||
ENDIF (${_comments} MATCHES ".*")
|
||||
# SET(_logtext "${_logtext}\n") #double-space missing features?
|
||||
ENDIF (NOT ${_var})
|
||||
|
||||
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}\"")
|
||||
ENDIF(COMMAND SET_PACKAGE_INFO)
|
||||
|
||||
ENDMACRO(MACRO_LOG_FEATURE)
|
||||
|
||||
|
||||
MACRO(MACRO_DISPLAY_FEATURE_LOG)
|
||||
IF(COMMAND FEATURE_SUMMARY) # in FeatureSummary.cmake since CMake 2.8.3
|
||||
FEATURE_SUMMARY(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/FindPackageLog.txt
|
||||
WHAT ALL)
|
||||
ENDIF(COMMAND FEATURE_SUMMARY)
|
||||
|
||||
SET(_missingFile ${CMAKE_BINARY_DIR}/MissingRequirements.txt)
|
||||
SET(_enabledFile ${CMAKE_BINARY_DIR}/EnabledFeatures.txt)
|
||||
SET(_disabledFile ${CMAKE_BINARY_DIR}/DisabledFeatures.txt)
|
||||
|
||||
IF (EXISTS ${_missingFile} OR EXISTS ${_enabledFile} OR EXISTS ${_disabledFile})
|
||||
SET(_printSummary TRUE)
|
||||
ENDIF (EXISTS ${_missingFile} OR EXISTS ${_enabledFile} OR EXISTS ${_disabledFile})
|
||||
|
||||
IF(_printSummary)
|
||||
SET(_missingDeps 0)
|
||||
IF (EXISTS ${_enabledFile})
|
||||
FILE(READ ${_enabledFile} _enabled)
|
||||
FILE(REMOVE ${_enabledFile})
|
||||
SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following external packages were located on your system.\n-- This installation will have the extra features provided by these packages.\n-----------------------------------------------------------------------------\n${_enabled}")
|
||||
ENDIF (EXISTS ${_enabledFile})
|
||||
|
||||
|
||||
IF (EXISTS ${_disabledFile})
|
||||
SET(_missingDeps 1)
|
||||
FILE(READ ${_disabledFile} _disabled)
|
||||
FILE(REMOVE ${_disabledFile})
|
||||
SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following OPTIONAL packages could NOT be located on your system.\n-- Consider installing them to enable more features from this software.\n-----------------------------------------------------------------------------\n${_disabled}")
|
||||
ENDIF (EXISTS ${_disabledFile})
|
||||
|
||||
|
||||
IF (EXISTS ${_missingFile})
|
||||
SET(_missingDeps 1)
|
||||
FILE(READ ${_missingFile} _requirements)
|
||||
SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following REQUIRED packages could NOT be located on your system.\n-- You must install these packages before continuing.\n-----------------------------------------------------------------------------\n${_requirements}")
|
||||
FILE(REMOVE ${_missingFile})
|
||||
SET(_haveMissingReq 1)
|
||||
ENDIF (EXISTS ${_missingFile})
|
||||
|
||||
|
||||
IF (NOT ${_missingDeps})
|
||||
SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- Congratulations! All external packages have been found.")
|
||||
ENDIF (NOT ${_missingDeps})
|
||||
|
||||
|
||||
MESSAGE(${_summary})
|
||||
MESSAGE("-----------------------------------------------------------------------------\n")
|
||||
|
||||
|
||||
IF(_haveMissingReq)
|
||||
MESSAGE(FATAL_ERROR "Exiting: Missing Requirements")
|
||||
ENDIF(_haveMissingReq)
|
||||
|
||||
ENDIF(_printSummary)
|
||||
|
||||
ENDMACRO(MACRO_DISPLAY_FEATURE_LOG)
|
48
CMakeModules/MacroOptionalFindPackage.cmake
Normal file
@@ -0,0 +1,48 @@
|
||||
# - MACRO_OPTIONAL_FIND_PACKAGE() combines FIND_PACKAGE() with an OPTION()
|
||||
# MACRO_OPTIONAL_FIND_PACKAGE( <name> [QUIT] )
|
||||
# This macro is a combination of OPTION() and FIND_PACKAGE(), it
|
||||
# works like FIND_PACKAGE(), but additionally it automatically creates
|
||||
# an option name WITH_<name>, which can be disabled via the cmake GUI.
|
||||
# or via -DWITH_<name>=OFF
|
||||
# The standard <name>_FOUND variables can be used in the same way
|
||||
# as when using the normal FIND_PACKAGE()
|
||||
|
||||
# Copyright (c) 2006-2010 Alexander Neundorf, <neundorf@kde.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
# This is just a helper macro to set a bunch of variables empty.
|
||||
# We don't know whether the package uses UPPERCASENAME or CamelCaseName, so we try both:
|
||||
macro(_MOFP_SET_EMPTY_IF_DEFINED _name _var)
|
||||
if(DEFINED ${_name}_${_var})
|
||||
set(${_name}_${_var} "")
|
||||
endif(DEFINED ${_name}_${_var})
|
||||
|
||||
string(TOUPPER ${_name} _nameUpper)
|
||||
if(DEFINED ${_nameUpper}_${_var})
|
||||
set(${_nameUpper}_${_var} "")
|
||||
endif(DEFINED ${_nameUpper}_${_var})
|
||||
endmacro(_MOFP_SET_EMPTY_IF_DEFINED _package _var)
|
||||
|
||||
|
||||
macro (MACRO_OPTIONAL_FIND_PACKAGE _name )
|
||||
option(WITH_${_name} "Search for ${_name} package" ON)
|
||||
if (WITH_${_name})
|
||||
find_package(${_name} ${ARGN})
|
||||
else (WITH_${_name})
|
||||
string(TOUPPER ${_name} _nameUpper)
|
||||
set(${_name}_FOUND FALSE)
|
||||
set(${_nameUpper}_FOUND FALSE)
|
||||
|
||||
_mofp_set_empty_if_defined(${_name} INCLUDE_DIRS)
|
||||
_mofp_set_empty_if_defined(${_name} INCLUDE_DIR)
|
||||
_mofp_set_empty_if_defined(${_name} INCLUDES)
|
||||
_mofp_set_empty_if_defined(${_name} LIBRARY)
|
||||
_mofp_set_empty_if_defined(${_name} LIBRARIES)
|
||||
_mofp_set_empty_if_defined(${_name} LIBS)
|
||||
_mofp_set_empty_if_defined(${_name} FLAGS)
|
||||
_mofp_set_empty_if_defined(${_name} DEFINITIONS)
|
||||
endif (WITH_${_name})
|
||||
endmacro (MACRO_OPTIONAL_FIND_PACKAGE)
|
||||
|
24
ChangeLog
Normal file
@@ -0,0 +1,24 @@
|
||||
Version 0.0.3:
|
||||
* Properly honor the chosen port number if a static host and port are
|
||||
marked as preferred.
|
||||
|
||||
Version 0.0.2:
|
||||
* Don't reconnect to Jabber if the settings dialog is closed successfully
|
||||
but the Jabber settings haven't changed.
|
||||
* Don't run a rescan of the local collection if the settings dialog is
|
||||
closed successfully but the path hasn't changed.
|
||||
* Don't attempt to connect to unavailable Twitter peers over and over.
|
||||
* Find Twitter peers if the peer's Got Tomahawk? tweet is not their latest
|
||||
tweet.
|
||||
* Got Tomahawk? tweets can now be sent directly to specific users or in
|
||||
private direct messages.
|
||||
* Display a helpful message when someone sends a normal instant message to
|
||||
the Tomahawk XMPP presence.
|
||||
* Incompatible change: Twitter SIP protocol has changed slightly. 0.0.1
|
||||
clients will not be able to talk to newer clients.
|
||||
* Hopefully fixed crashes during Twitter authentication.
|
||||
* Don't let long playlist or summary names force a large Tomahawk window.
|
||||
* Tomahawk now asks you to authorize new contacts.
|
||||
|
||||
Version 0.0.1:
|
||||
* First public release.
|
117
README
@@ -1,53 +1,82 @@
|
||||
Quickstart on Ubuntu
|
||||
--------------------
|
||||
|
||||
sudo apt-get install build-essential cmake libtag1c2a libtag1-dev liblastfm-dev \
|
||||
libqt4-dev libqt4-sql-sqlite libvorbis-dev libmad0-dev \
|
||||
libasound2-dev libboost-dev zlib1g-dev libgnutls-dev pkg-config
|
||||
$ sudo apt-get install build-essential cmake libtag1c2a libtag1-dev libqt4-dev libqt4-sql-sqlite \
|
||||
libvorbis-dev libmad0-dev libflac++-dev libasound2-dev libboost-dev zlib1g-dev \
|
||||
libgnutls-dev pkg-config
|
||||
|
||||
|
||||
Gloox 1.0 (XMPP library)
|
||||
------------------------
|
||||
On Ubuntu 10.10:
|
||||
$ sudo apt-get install libgloox-dev
|
||||
On Ubuntu 10.10 (and higher):
|
||||
$ sudo apt-get install libgloox-dev
|
||||
|
||||
Otherwise see: http://camaya.net/glooxdownload
|
||||
You need to build gloox 1.0 from source, Ubuntu 10.04 only packages v0.9.
|
||||
You need to build gloox 1.0 from source, Ubuntu 10.04 only packages version 0.9.
|
||||
|
||||
$ # Download and unpack tarball
|
||||
$ ./configure --without-openssl --with-gnutls --without-libidn --with-zlib --without-examples --without-tests
|
||||
$ CXXFLAGS=-fPIC make
|
||||
$ sudo make install
|
||||
Download and unpack tarball:
|
||||
$ ./configure --without-openssl --with-gnutls --without-libidn --with-zlib --without-examples --without-tests
|
||||
$ CXXFLAGS=-fPIC make
|
||||
$ sudo make install
|
||||
|
||||
QJson (Qt JSON library)
|
||||
-----------------------
|
||||
On Ubuntu 10.04:
|
||||
$ sudo apt-get install libqjson-dev
|
||||
On Ubuntu 10.04 (and higher):
|
||||
$ sudo apt-get install libqjson-dev
|
||||
|
||||
Otherwise see: http://sourceforge.net/projects/qjson/files/ (developed using 0.7.1)
|
||||
Otherwise see: http://sourceforge.net/projects/qjson/files/ (developed using version 0.7.1)
|
||||
|
||||
$ # Download and unpack tarball
|
||||
$ ./configure && make
|
||||
$ sudo make install
|
||||
Download and unpack tarball:
|
||||
$ ./configure && make
|
||||
$ sudo make install
|
||||
|
||||
libEchonest 0.1
|
||||
libEchonest 1.1.4
|
||||
---------------
|
||||
See: http://projects.kde.org/projects/playground/libs/libechonest/
|
||||
|
||||
$ git clone git://git.kde.org/libechonest.git
|
||||
$ cd libechonest
|
||||
$ mkdir build && cd build
|
||||
$ cmake ..
|
||||
$ make
|
||||
$ sudo make install
|
||||
Download and unpack tarball:
|
||||
$ mkdir build && cd build
|
||||
$ cmake ..
|
||||
$ make
|
||||
$ sudo make install
|
||||
|
||||
CLucene 0.9.23
|
||||
---------------
|
||||
See: http://clucene.sourceforge.net/download.shtml
|
||||
|
||||
Clone from git and build CLucene:
|
||||
$ git clone git://clucene.git.sourceforge.net/gitroot/clucene/clucene
|
||||
$ cd clucene && mkdir build && cd build
|
||||
$ cmake ..
|
||||
$ make
|
||||
$ sudo make install
|
||||
|
||||
|
||||
Quickstart on OS X
|
||||
------------------
|
||||
|
||||
Install homebrew
|
||||
$ ruby -e "$(curl -fsSL https://gist.github.com/raw/323731/install_homebrew.rb)"
|
||||
$ brew install cmake qt qjson gloox libmad libvorbis flac taglib boost
|
||||
|
||||
Install libEchnoest & CLucene as per the above instructions.
|
||||
|
||||
If liblastfm gives problems, do the below:
|
||||
$ brew edit liblastfm
|
||||
Change the url to https://github.com/davidsansome/liblastfm/tarball/0.3.1
|
||||
$ brew install liblastfm
|
||||
Copy the md5 hash it returns.
|
||||
$ brew edit liblastfm
|
||||
Replace the md5 hash with the new one you copied.
|
||||
$ brew install liblastfm
|
||||
|
||||
|
||||
Now compile Tomahawk
|
||||
--------------------
|
||||
$ sudo ldconfig -v | grep -Ei 'qjson|gloox|echonest'
|
||||
$ mkdir build && cd build
|
||||
$ cmake ..
|
||||
$ make
|
||||
$ ./tomahawk
|
||||
$ mkdir build && cd build
|
||||
$ cmake ..
|
||||
$ make
|
||||
$ ./tomahawk
|
||||
|
||||
|
||||
Dependencies
|
||||
@@ -60,38 +89,36 @@ Dependencies
|
||||
SQLite 3.6.22 http://www.sqlite.org/
|
||||
TagLib 1.6.2 http://developer.kde.org/~wheeler/taglib.html
|
||||
Boost 1.3x http://www.boost.org/
|
||||
|
||||
Unless you enable the headless mode (no GUI), we also require the following libraries:
|
||||
|
||||
CLucene 0.9.23 (0.9.21 will fail) http://clucene.sourceforge.net/download.shtml
|
||||
libmad 0.15.1b http://www.underbit.com/products/mad/
|
||||
libvorbis 1.2.3 http://xiph.org/vorbis/
|
||||
libogg 1.1.4 http://xiph.org/ogg/
|
||||
liblastfm 0.3.3 http://github.com/mxcl/liblastfm/
|
||||
libechonest 0.1.2 http://projects.kde.org/projects/playground/libs/libechonest/
|
||||
libflac++ 1.2.0 http://flac.sourceforge.net/
|
||||
libechonest 1.1.4 http://projects.kde.org/projects/playground/libs/libechonest/
|
||||
|
||||
Third party libraries that we ship with our source:
|
||||
|
||||
RtAudio 4.0.7 http://www.music.mcgill.ca/~gary/rtaudio/
|
||||
MiniUPnP http://miniupnp.free.fr/
|
||||
liblastfm 0.4.0 http://github.com/jonocole/liblastfm/
|
||||
|
||||
|
||||
To build the app:
|
||||
-----------------
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
|
||||
(Pick one of the following two choices. If unsure pick the second one, you probably want a GUI)
|
||||
$ cmake -Dgui=no .. # enables headless mode, build without GUI
|
||||
$ cmake .. # normal build including GUI
|
||||
|
||||
$ make
|
||||
$ mkdir build && cd build
|
||||
$ cmake ..
|
||||
$ make
|
||||
|
||||
To run the app:
|
||||
---------------
|
||||
(Only run the next two commands if you installed any of the dependencies from source on Linux)
|
||||
$ export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
|
||||
$ sudo ldconfig -v
|
||||
Only run the next two commands if you installed any of the dependencies from source on Linux.
|
||||
$ export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
|
||||
$ sudo ldconfig -v
|
||||
|
||||
$ ./tomahawk
|
||||
Start the application on Linux:
|
||||
$ ./tomahawk
|
||||
|
||||
Start the application on OS X:
|
||||
$ open tomahawk.app
|
||||
|
||||
Enjoy!
|
||||
|
3
admin/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
IF(WIN32)
|
||||
INSTALL(DIRECTORY win DESTINATION share/tomahawk/admin )
|
||||
ENDIF(WIN32)
|
BIN
admin/mac/DS_Store.in
Normal file
@@ -5,24 +5,58 @@
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>tomahawk</string>
|
||||
<string>Tomahawk</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.tomahawk.Tomahawk</string>
|
||||
<string>org.tomahawk-player.Tomahawk</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.0.1.0</string>
|
||||
<string>0.0.2.0</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.0.1</string>
|
||||
<string>0.0.2</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>tomahawk</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>tomahawk.icns</string>
|
||||
<string>Tomahawk.icns</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Tomahawk</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.5.0</string>
|
||||
<string>10.5.0</string>
|
||||
<key>SUFeedURL</key>
|
||||
<string>http://download.tomahawk-player.org/sparkle</string>
|
||||
<key>SUPublicDSAKeyFile</key>
|
||||
<string>sparkle_pub.pem</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>Tomahawk URL</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>tomahawk</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>xspf</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>Generic.icns</string>
|
||||
<key>CFBundleTypeMIMETypes</key>
|
||||
<array>
|
||||
<string>application/xspf+xml</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>XSPF Playlist</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@@ -9,6 +9,8 @@
|
||||
# sqldrivers/libsqlite.dylib
|
||||
################################################################################
|
||||
|
||||
QT_FRAMEWORKS_DIR="$QTDIR/lib"
|
||||
QT_PLUGINS_DIR="$QTDIR/plugins"
|
||||
|
||||
if [[ ! -d "$QTDIR/lib/QtCore.framework" ]]
|
||||
then
|
||||
@@ -18,12 +20,10 @@ then
|
||||
QT_FRAMEWORKS_DIR=/Library/Frameworks
|
||||
QT_PLUGINS_DIR=/Developer/Applications/Qt/plugins
|
||||
fi
|
||||
elif [[ $QTDIR ]]
|
||||
then
|
||||
QT_FRAMEWORKS_DIR="$QTDIR/lib"
|
||||
QT_PLUGINS_DIR="$QTDIR/plugins"
|
||||
fi
|
||||
|
||||
echo "Plugins go to: $QT_PLUGINS_DIR"
|
||||
|
||||
if [ -z $QTDIR ]
|
||||
then
|
||||
echo QTDIR must be set, or install the official Qt dmg
|
||||
@@ -38,26 +38,18 @@ for x in $1
|
||||
do
|
||||
echo "C $x"
|
||||
cp -R $QT_FRAMEWORKS_DIR/$x.framework Contents/Frameworks/
|
||||
chmod -R u+rw Contents/Frameworks/
|
||||
done
|
||||
|
||||
#plugins
|
||||
shift
|
||||
mkdir -p Contents/MacOS
|
||||
while (( "$#" ))
|
||||
do
|
||||
echo "C $1"
|
||||
mkdir -p Contents/MacOS/sqldrivers
|
||||
mkdir -p Contents/MacOS/imageformats
|
||||
|
||||
if [[ -d $QT_PLUGINS_DIR/$1 ]]
|
||||
then
|
||||
cp -R $QT_PLUGINS_DIR/$1 Contents/MacOS
|
||||
else
|
||||
dir=$(basename $(dirname $1))
|
||||
mkdir Contents/MacOS/$dir
|
||||
cp $QT_PLUGINS_DIR/$1 Contents/MacOS/$dir
|
||||
fi
|
||||
|
||||
shift
|
||||
done
|
||||
cp -R $QT_PLUGINS_DIR/sqldrivers/libqsqlite.dylib Contents/MacOS/sqldrivers/
|
||||
cp -R $QT_PLUGINS_DIR/imageformats/libqgif.dylib Contents/MacOS/imageformats/
|
||||
cp -R $QT_PLUGINS_DIR/imageformats/libqjpeg.dylib Contents/MacOS/imageformats/
|
||||
|
||||
#cleanup
|
||||
find Contents/Frameworks -name Headers -o -name \*.prl -o -name \*_debug | xargs rm -rf
|
||||
|
@@ -1,8 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Usage: dist/build-relese-osx.sh [-j] [--no-clean]
|
||||
# Usage: ./admin/mac/build-release-osx.sh [--no-clean]
|
||||
#
|
||||
# Adding the -j parameter results in building a japanese version.
|
||||
################################################################################
|
||||
|
||||
|
||||
@@ -17,17 +16,27 @@ function die {
|
||||
}
|
||||
################################################################################
|
||||
|
||||
if [ -z $1 ]
|
||||
then
|
||||
echo This script expects the version number as a parameter, e.g. 1.0.0
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ROOT=`pwd`
|
||||
|
||||
QTDIR=`which qmake`
|
||||
LINKDIR=`readlink $QTDIR`
|
||||
QTDIR=`dirname $QTDIR`
|
||||
QTDIR=$QTDIR/`dirname $LINKDIR`
|
||||
QTDIR=`dirname $QTDIR`
|
||||
test -L "$QTDIR" && QTDIR=`readlink $QTDIR`
|
||||
|
||||
echo "Goes here: $QTDIR"
|
||||
|
||||
export QMAKESPEC='macx-g++'
|
||||
export QTDIR
|
||||
export VERSION
|
||||
export QTVERSION='4.7.2'
|
||||
################################################################################
|
||||
|
||||
|
||||
@@ -35,14 +44,34 @@ CLEAN='1'
|
||||
BUILD='1'
|
||||
NOTQUICK='1'
|
||||
CREATEDMG='1'
|
||||
VERSION=$1
|
||||
|
||||
header addQt
|
||||
header "Adding Qt to app bundle"
|
||||
cd tomahawk.app
|
||||
# $ROOT/admin/mac/add-Qt-to-bundle.sh \
|
||||
# 'QtCore QtGui QtXml QtNetwork QtSql'
|
||||
$ROOT/../admin/mac/add-Qt-to-bundle.sh \
|
||||
'QtCore QtGui QtXml QtNetwork QtSql QtXmlPatterns QtWebKit phonon'
|
||||
|
||||
header deposx
|
||||
$ROOT/admin/mac/deposx.sh
|
||||
header "Running install_name_tool"
|
||||
$ROOT/../admin/mac/deposx.sh
|
||||
|
||||
header "Renaming files"
|
||||
mv Contents/Resources/tomahawkSources.icns Contents/Resources/Tomahawk.icns
|
||||
mv Contents/MacOS/tomahawk Contents/MacOS/Tomahawk
|
||||
# cp $ROOT/../admin/mac/Info.plist Contents/Info.plist
|
||||
|
||||
header "Copying Sparkle pubkey & framework, and qt.conf"
|
||||
cp $ROOT/../admin/mac/sparkle_pub.pem Contents/Resources
|
||||
cp -R /Library/Frameworks/Sparkle.framework Contents/Frameworks
|
||||
cp $ROOT/../admin/mac/qt.conf Contents/Resources
|
||||
|
||||
header "Creating DMG"
|
||||
cd ..
|
||||
mv tomahawk.app Tomahawk.app
|
||||
$ROOT/../admin/mac/create-dmg.sh Tomahawk.app
|
||||
mv Tomahawk.dmg Tomahawk-$VERSION.dmg
|
||||
|
||||
header Done!
|
||||
header "Creating signed Sparkle update"
|
||||
$ROOT/../admin/mac/sign_bundle.rb $VERSION ~/tomahawk_sparkle_privkey.pem
|
||||
mv Tomahawk.app tomahawk.app
|
||||
|
||||
header "Done!"
|
||||
|
59
admin/mac/create-dmg.sh
Executable file
@@ -0,0 +1,59 @@
|
||||
#!/bin/sh
|
||||
# author: max@last.fm, muesli@tomahawk-player.org
|
||||
# brief: Produces a compressed DMG from a bundle directory
|
||||
# usage: Pass the bundle directory as the only parameter
|
||||
# note: This script depends on the Tomahawk build system, and must be run from
|
||||
# the build directory
|
||||
################################################################################
|
||||
|
||||
|
||||
#if [ -z $VERSION ]
|
||||
#then
|
||||
# echo VERSION must be set
|
||||
# exit 2
|
||||
#fi
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "Please pass the bundle.app directory as the first parameter."
|
||||
exit 3
|
||||
fi
|
||||
################################################################################
|
||||
|
||||
|
||||
NAME=$(basename "$1" | perl -pe 's/(.*).app/\1/')
|
||||
IN="$1"
|
||||
TMP="dmg/$NAME"
|
||||
OUT="$NAME.dmg"
|
||||
mkdir -p "$TMP"
|
||||
################################################################################
|
||||
|
||||
|
||||
# clean up
|
||||
rm -rf "$TMP"
|
||||
rm -f "$OUT"
|
||||
|
||||
# create DMG contents and copy files
|
||||
mkdir -p "$TMP/.background"
|
||||
cp ../admin/mac/dmg_background.png "$TMP/.background/background.png"
|
||||
cp ../admin/mac/DS_Store.in "$TMP/.DS_Store"
|
||||
chmod go-rwx "$TMP/.DS_Store"
|
||||
ln -s /Applications "$TMP/Applications"
|
||||
# copies the prepared bundle into the dir that will become the DMG
|
||||
cp -R "$IN" "$TMP"
|
||||
|
||||
# create
|
||||
hdiutil makehybrid -hfs -hfs-volume-name Tomahawk -hfs-openfolder "$TMP" "$TMP" -o tmp.dmg
|
||||
hdiutil convert -format UDZO -imagekey zlib-level=9 tmp.dmg -o "$OUT"
|
||||
|
||||
# cleanup
|
||||
rm tmp.dmg
|
||||
|
||||
#hdiutil create -srcfolder "$TMP" \
|
||||
# -format UDZO -imagekey zlib-level=9 \
|
||||
# -scrub \
|
||||
# "$OUT" \
|
||||
# || die "Error creating DMG :("
|
||||
|
||||
# done !
|
||||
echo 'DMG size:' `du -hs "$OUT" | awk '{print $1}'`
|
@@ -9,6 +9,16 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z $QTVERSION ]
|
||||
then
|
||||
echo QTVERSION must be set
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ..
|
||||
ORIGROOT=`pwd`
|
||||
cd -
|
||||
|
||||
cd Contents
|
||||
|
||||
QTLIBS=`ls Frameworks | cut -d. -f1`
|
||||
@@ -16,19 +26,27 @@ LIBS=`cd MacOS && ls -fR1 | grep dylib`
|
||||
################################################################################
|
||||
|
||||
|
||||
function import_lib
|
||||
{
|
||||
echo "L \`$1'"
|
||||
cp -R -L $1 MacOS/`basename $1`
|
||||
chmod u+rw MacOS/`basename $1`
|
||||
deplib_change MacOS/`basename $1`
|
||||
deposx_change MacOS/`basename $1`
|
||||
}
|
||||
|
||||
function deposx_change
|
||||
{
|
||||
echo "D \`$1'"
|
||||
echo $QTDIR
|
||||
|
||||
|
||||
for y in $QTLIBS
|
||||
do
|
||||
install_name_tool -change $QTDIR/lib/$y.framework/Versions/4/$y \
|
||||
@executable_path/../Frameworks/$y.framework/Versions/4/$y \
|
||||
"$1"
|
||||
|
||||
install_name_tool -change $QTDIR/Cellar/qt/4.6.2/lib/$y.framework/Versions/4/$y \
|
||||
install_name_tool -change /usr/local/Cellar/qt/$QTVERSION/lib/$y.framework/Versions/4/$y \
|
||||
@executable_path/../Frameworks/$y.framework/Versions/4/$y \
|
||||
"$1"
|
||||
done
|
||||
@@ -40,6 +58,35 @@ function deposx_change
|
||||
"$1"
|
||||
done
|
||||
}
|
||||
|
||||
function deplib_change
|
||||
{
|
||||
install_name_tool -change /usr/local/Cellar/liblastfm/0.3.3/lib/liblastfm.0.dylib @executable_path/liblastfm.0.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/qjson/0.7.1/lib/libqjson.0.7.1.dylib @executable_path/libqjson.0.7.1.dylib $1
|
||||
install_name_tool -change /usr/local/lib/libechonest.1.1.dylib @executable_path/libechonest.1.1.dylib $1
|
||||
install_name_tool -change /usr/local/lib/libclucene-core.0.9.23.dylib @executable_path/libclucene-core.0.9.23.dylib $1
|
||||
install_name_tool -change /usr/local/lib/libclucene-shared.0.9.23.dylib @executable_path/libclucene-shared.0.9.23.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/gloox/1.0/lib/libgloox.8.dylib @executable_path/libgloox.8.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/taglib/1.6.3/lib/libtag.1.dylib @executable_path/libtag.1.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/libogg/1.2.0/lib/libogg.0.dylib @executable_path/libogg.0.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbis.0.dylib @executable_path/libvorbis.0.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbisfile.3.dylib @executable_path/libvorbisfile.3.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/mad/0.15.1b/lib/libmad.0.dylib @executable_path/libmad.0.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/flac/1.2.1/lib/libFLAC++.6.dylib @executable_path/libFLAC++.6.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/flac/1.2.1/lib/libFLAC.8.dylib @executable_path/libFLAC.8.dylib $1
|
||||
install_name_tool -change $ORIGROOT/src/libtomahawk/libtomahawklib.dylib @executable_path/libtomahawklib.dylib $1
|
||||
install_name_tool -change $ORIGROOT/libtomahawk_sipjabber.dylib @executable_path/libtomahawk_sipjabber.dylib $1
|
||||
install_name_tool -change $ORIGROOT/libtomahawk_siptwitter.dylib @executable_path/libtomahawk_siptwitter.dylib $1
|
||||
install_name_tool -change $ORIGROOT/libtomahawk_sipzeroconf.dylib @executable_path/libtomahawk_sipzeroconf.dylib $1
|
||||
install_name_tool -change $ORIGROOT/thirdparty/jdns/libtomahawk_jdns.dylib @executable_path/libtomahawk_jdns.dylib $1
|
||||
install_name_tool -change $ORIGROOT/thirdparty/qtweetlib/libtomahawk_qtweetlib.dylib @executable_path/libtomahawk_qtweetlib.dylib $1
|
||||
|
||||
install_name_tool -change libqjson.0.7.1.dylib @executable_path/libqjson.0.7.1.dylib $1
|
||||
install_name_tool -change libechonest.1.1.dylib @executable_path/libechonest.1.1.dylib $1
|
||||
install_name_tool -change libclucene-core.0.9.23.dylib @executable_path/libclucene-core.0.9.23.dylib $1
|
||||
install_name_tool -change libclucene-shared.0.9.23.dylib @executable_path/libclucene-shared.0.9.23.dylib $1
|
||||
}
|
||||
|
||||
################################################################################
|
||||
|
||||
|
||||
@@ -48,19 +95,30 @@ find MacOS -type f -a -perm -100 | while read x
|
||||
do
|
||||
echo $x
|
||||
y=$(file "$x" | grep 'Mach-O')
|
||||
test -n "$y" && deposx_change "$x"
|
||||
|
||||
install_name_tool -change liblastfm.0.dylib @executable_path/liblastfm.0.dylib $x
|
||||
install_name_tool -change /usr/local/Cellar/gloox/1.0/lib/libgloox.8.dylib @executable_path/libgloox.8.dylib $x
|
||||
install_name_tool -change /usr/local/lib/libgloox.8.dylib @executable_path/libgloox.8.dylib $x
|
||||
install_name_tool -change /usr/local/Cellar/taglib/1.6/lib/libtag.1.dylib @executable_path/libtag.1.dylib $x
|
||||
install_name_tool -change /usr/local/Cellar/libogg/1.2.0/lib/libogg.0.dylib @executable_path/libogg.0.dylib $x
|
||||
install_name_tool -change /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbisfile.3.dylib @executable_path/libvorbisfile.3.dylib $x
|
||||
install_name_tool -change /usr/local/Cellar/mad/0.15.1b/lib/libmad.0.dylib @executable_path/libmad.0.dylib $x
|
||||
deposx_change "$x"
|
||||
deplib_change "$x"
|
||||
done
|
||||
|
||||
deposx_change MacOS/libqjson.0.7.1.dylib
|
||||
deposx_change MacOS/liblastfm.0.dylib
|
||||
import_lib /usr/local/Cellar/qjson/0.7.1/lib/libqjson.0.7.1.dylib
|
||||
import_lib /usr/local/Cellar/liblastfm/0.3.3/lib/liblastfm.0.dylib
|
||||
import_lib /usr/local/Cellar/gloox/1.0/lib/libgloox.8.dylib
|
||||
import_lib /usr/local/Cellar/taglib/1.6.3/lib/libtag.1.dylib
|
||||
import_lib /usr/local/Cellar/libogg/1.2.0/lib/libogg.0.dylib
|
||||
import_lib /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbis.0.dylib
|
||||
import_lib /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbisfile.3.dylib
|
||||
import_lib /usr/local/Cellar/mad/0.15.1b/lib/libmad.0.dylib
|
||||
import_lib /usr/local/Cellar/flac/1.2.1/lib/libFLAC++.6.dylib
|
||||
import_lib /usr/local/Cellar/flac/1.2.1/lib/libFLAC.8.dylib
|
||||
import_lib /usr/local/lib/libechonest.1.1.dylib
|
||||
import_lib /usr/local/lib/libclucene-core.0.9.23.dylib
|
||||
import_lib /usr/local/lib/libclucene-shared.0.9.23.dylib
|
||||
|
||||
import_lib ../../libtomahawk_sipjabber.dylib
|
||||
import_lib ../../libtomahawk_siptwitter.dylib
|
||||
import_lib ../../libtomahawk_sipzeroconf.dylib
|
||||
import_lib ../../src/libtomahawk/libtomahawklib.dylib
|
||||
import_lib ../../thirdparty/jdns/libtomahawk_jdns.dylib
|
||||
import_lib ../../thirdparty/qtweetlib/libtomahawk_qtweetlib.dylib
|
||||
|
||||
# now Qt
|
||||
for x in $QTLIBS
|
||||
|
BIN
admin/mac/dmg_background.png
Normal file
After Width: | Height: | Size: 99 KiB |
2
admin/mac/qt.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
[Paths]
|
||||
Plugins = PlugIns
|
14
admin/mac/sign_bundle.rb
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/ruby
|
||||
if ARGV.length < 2
|
||||
puts "Usage: ruby sign_update.rb version private_key_file"
|
||||
puts "\nCall this from the build directory."
|
||||
puts "If you don't have the tomahawk private key and you think you should, ask leo :)"
|
||||
exit
|
||||
end
|
||||
|
||||
tarball = "tomahawk-#{ARGV[0]}.tar.bz2"
|
||||
puts "Zipping: #{tarball}..."
|
||||
`tar jcvf "#{tarball}" Tomahawk.app`
|
||||
|
||||
puts "Signing..."
|
||||
puts `openssl dgst -sha1 -binary < "#{tarball}" | openssl dgst -dss1 -sign "#{ARGV[1]}" | openssl enc -base64`
|
25
admin/mac/sparkle-beta.rss
Executable file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<channel>
|
||||
<title>Tomahawk Player Changelog</title>
|
||||
<link>http://www.gettomahawk.com</link>
|
||||
<description>Tomahawk Player Beta</description>
|
||||
<language>en</language>
|
||||
<item>
|
||||
<title>Version 0.0.1 (Tomahawk Player Beta - It Lives?)</title>
|
||||
<sparkle:releaseNotesLink>
|
||||
https://github.com/tomahawk-player/tomahawk/raw/0.0.1/ChangeLog
|
||||
</sparkle:releaseNotesLink>
|
||||
<pubDate>Fri, 25 Mar 2011 00:00:01 +0100</pubDate>
|
||||
<enclosure url="http://download.tomahawk-player.org/sparkle-debug/updates/tomahawk-0.0.1.tar.bz2" sparkle:version="0.0.1" length="10627176" type="application/octet-stream" sparkle:dsaSignature="MC0CFAyYNZq58X7hPC7Qn+DtotVgym7pAhUA5hkLGllYxjOwwCf7i2LxUsvGyps=" />
|
||||
</item>
|
||||
<item>
|
||||
<title>Version 0.0.2 (Tomahawk Player Beta - It Lives?)</title>
|
||||
<sparkle:releaseNotesLink>
|
||||
https://github.com/tomahawk-player/tomahawk/raw/stable/ChangeLog
|
||||
</sparkle:releaseNotesLink>
|
||||
<pubDate>Mon, 28 Mar 2011 06:13:01 +0100</pubDate>
|
||||
<enclosure url="http://download.tomahawk-player.org/sparkle/updates/tomahawk-0.0.2.tar.bz2" sparkle:version="0.0.2" length="19835237" type="application/octet-stream" sparkle:dsaSignature="MCwCFGb6yhKUO3+lH3eNaURvwtctLVMUAhQM8mp8yEwcU3ZoaJMTqb387dYccA==" />
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
25
admin/mac/sparkle.rss
Executable file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<channel>
|
||||
<title>Tomahawk Player Changelog</title>
|
||||
<link>http://www.gettomahawk.com</link>
|
||||
<description>Tomahawk Player</description>
|
||||
<language>en</language>
|
||||
<item>
|
||||
<title>Version 0.0.1 (Tomahawk Player - It Lives!)</title>
|
||||
<sparkle:releaseNotesLink>
|
||||
https://github.com/tomahawk-player/tomahawk/raw/0.0.1/ChangeLog
|
||||
</sparkle:releaseNotesLink>
|
||||
<pubDate>Fri, 25 Mar 2011 00:00:01 +0100</pubDate>
|
||||
<enclosure url="http://download.tomahawk-player.org/sparkle/updates/tomahawk-0.0.1.tar.bz2" sparkle:version="0.0.1" length="10627176" type="application/octet-stream" sparkle:dsaSignature="MC0CFAyYNZq58X7hPC7Qn+DtotVgym7pAhUA5hkLGllYxjOwwCf7i2LxUsvGyps=" />
|
||||
</item>
|
||||
<item>
|
||||
<title>Version 0.0.2 (Tomahawk Player - It Lives!)</title>
|
||||
<sparkle:releaseNotesLink>
|
||||
https://github.com/tomahawk-player/tomahawk/raw/stable/ChangeLog
|
||||
</sparkle:releaseNotesLink>
|
||||
<pubDate>Mon, 28 Mar 2011 06:13:01 +0100</pubDate>
|
||||
<enclosure url="http://download.tomahawk-player.org/sparkle/updates/tomahawk-0.0.2.tar.bz2" sparkle:version="0.0.2" length="19835237" type="application/octet-stream" sparkle:dsaSignature="MCwCFGb6yhKUO3+lH3eNaURvwtctLVMUAhQM8mp8yEwcU3ZoaJMTqb387dYccA==" />
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
20
admin/mac/sparkle_pub.pem
Normal file
@@ -0,0 +1,20 @@
|
||||
-----BEGIN PUBLIC KEY-----
|
||||
MIIDOzCCAi0GByqGSM44BAEwggIgAoIBAQDRltnNbKWFroVCsG1nTSdlTDmo7fjl
|
||||
tgOuQ0YB2s0a1bcqgQ5YJRE59pFvF/z2pkHEHdyBA6USd9N7/T9lolwNcJoByJpO
|
||||
MobUNs04elqZXliriaAdoSb2g6ZpxiedppbbyNP/BlK6o+zpyn0LVYXDI/OwJFzS
|
||||
xjGXM+rBEWdUJnogZxV31gF9W3yD1Quz6icBulT9V/Soo6me9Mc60ooKSYj4Zgqd
|
||||
3ln8tG90RFnWfbb0nbrITvR3ll6XXLfn081tjhymcXqHcgvaaqcmpKWL6ZWwX1mH
|
||||
3t1pImnif/tSSZPG21KGE3FtuQ/+YFo19apQ6U6l8kaSFxqcDLAYzBy9AhUA/QfN
|
||||
8WEIvzOEZ9uSWT7lYy64mUkCggEABsUmcs3kwjrmszIAAmPIowA0DBrxWZL03JBV
|
||||
bDKT6tNHZaFFlCufVSjiL1EFZjRARC16OWYaDcElUsZYFMcsNIIa8LyDQaq6+SSm
|
||||
quhMO5heeJiYPrutDiJzbJr0+HoY77Ll+Q4/cEkl0UAN4Ovp18WKwaq6GpHAvBnv
|
||||
71LunLGAKsVb5joXBQ8In6zQkibJhgiBJwzLK90/j0OTiDaaOwM3PsAegORBVlVE
|
||||
TAk4AQmawmF8nBGLzTyKXl83J571ku1Mm2JTl16jMYziKARKXYBmkcP1at0YddVK
|
||||
WWpAwRKSxOucVJYfV58JqmjZqst8BBeH6esQKr5dklUvvDMaEwOCAQYAAoIBAQCw
|
||||
5mo+8/R3S9cNYg9o8JNJGdSbMhSkurILHh9WNElsIC3RNtPcpijmAnWtXTVDhe6w
|
||||
77wLj37tUuFGbsu2qPXtZoup35emf9DDshZ5w5UOclPaZ9HYjlC1H64c6d66Rllk
|
||||
fY6FRDv9qVfjT84APbvMDrk6csJ5YHxFPDaqeQaFB0nxFiCMVwjEx+ZSvQNK1jJ2
|
||||
o2gtuOvSPVSphsMeJ72DDNxO+SRRVnOmWaxg9rlmFuGle6Z+UJ2FItfmPEvhSBMY
|
||||
hzndUbC7Wi4sIpBzbm9O5MiPYMv0VmN+0t1156EiC9uR4f7AKH2S94dnQob/YeY0
|
||||
jMH+XxU/wzGUCmsOx1lx
|
||||
-----END PUBLIC KEY-----
|
12
admin/unix/tomahawk.protocol
Normal file
@@ -0,0 +1,12 @@
|
||||
[Protocol]
|
||||
exec=/home/leo/kde/tomahawk/build/tomahawk "%u"
|
||||
protocol=tomahawk
|
||||
input=none
|
||||
output=none
|
||||
helper=true
|
||||
listing=
|
||||
reading=false
|
||||
writing=false
|
||||
makedir=false
|
||||
deleting=false
|
||||
|
@@ -1,3 +0,0 @@
|
||||
# windres.exe tomahawk.rx -O coff -o tomahawk.res
|
||||
|
||||
# SEE: http://stackoverflow.com/questions/708238/how-do-i-add-an-icon-to-a-mingw-gcc-compiled-executable
|
@@ -1 +0,0 @@
|
||||
TO DO
|
20
admin/win/Toolchain-mingw32-openSUSE.cmake
Normal file
@@ -0,0 +1,20 @@
|
||||
# this one is important
|
||||
SET(CMAKE_SYSTEM_NAME Windows)
|
||||
|
||||
# specify the cross compiler
|
||||
SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
|
||||
SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
|
||||
|
||||
# where is the target environment containing libraries
|
||||
SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32/sys-root/mingw)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
|
||||
# windres executable for application icon support
|
||||
SET(WINDRES_EXECUTABLE /usr/bin/i686-w64-mingw32-windres)
|
||||
|
||||
# libs with broken find modules
|
||||
SET(TAGLIB_FOUND true)
|
||||
SET(TAGLIB_LIBRARIES ${CMAKE_FIND_ROOT_PATH}/lib/libtag.dll.a)
|
||||
SET(TAGLIB_INCLUDES ${CMAKE_FIND_ROOT_PATH}/include/taglib)
|
1
admin/win/nsi/RELEASE_NOTES.txt
Executable file
@@ -0,0 +1 @@
|
||||
See http://github.com/tomahawk-player/tomahawk/blob/stable/ChangeLog
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
BIN
admin/win/nsi/page_header.bmp
Executable file
After Width: | Height: | Size: 25 KiB |
1
admin/win/nsi/revision.txt
Normal file
@@ -0,0 +1 @@
|
||||
96
|
@@ -15,15 +15,15 @@
|
||||
;-----------------------------------------------------------------------------
|
||||
; Some paths.
|
||||
;-----------------------------------------------------------------------------
|
||||
!define MING_PATH "/usr/i686-pc-mingw32/sys-root/mingw"
|
||||
!define MING_PATH "/usr/i686-w64-mingw32/sys-root/mingw"
|
||||
!define MING_BIN "${MING_PATH}/bin"
|
||||
!define MING_DLL_PATH "${MING_BIN}"
|
||||
!define MING_LIB "${MING_PATH}/lib"
|
||||
!define ROOT_PATH "..\.." ; assuming the script is in ROOT/admin/win/
|
||||
!define ROOT_PATH "..\..\.." ; assuming the script is in ROOT/admin/win/nsi
|
||||
!define BUILD_PATH "${ROOT_PATH}\build"
|
||||
!define QT_DLL_PATH "${MING_BIN}"
|
||||
!define SQLITE_DLL_PATH "${MING_LIB}/qt4/plugins/sqldrivers"
|
||||
!define RTAUDIO_DLL_PATH "../../rtaudio/"
|
||||
!define QXTWEB_DLL_PATH "../../qxt/qxtweb-standalone/"
|
||||
!define IMAGEFORMATS_DLL_PATH "${MING_LIB}/qt4/plugins/imageformats"
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
; Increment installer revision number as part of this script.
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
!define VER_MAJOR "0"
|
||||
!define VER_MINOR "0"
|
||||
!define VER_BUILD "0"
|
||||
!define VER_BUILD "2"
|
||||
|
||||
!define VERSION "${VER_MAJOR}.${VER_MINOR}.${VER_BUILD}"
|
||||
|
||||
@@ -250,8 +250,32 @@ Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
|
||||
SetDetailsPrint listonly
|
||||
SetOutPath "$INSTDIR"
|
||||
|
||||
;Main executable.
|
||||
File "${ROOT_PATH}\build\tomahawk.exe"
|
||||
!ifdef INSTALL_PATH
|
||||
;Main executable.
|
||||
File "${INSTALL_PATH}\bin\tomahawk.exe"
|
||||
|
||||
File "${INSTALL_PATH}\lib\librtaudio.dll"
|
||||
File "${INSTALL_PATH}\lib\libqxtweb-standalone.dll"
|
||||
File "${INSTALL_PATH}\lib\libtomahawk_jdns.dll"
|
||||
File "${INSTALL_PATH}\lib\libtomahawk_qtweetlib.dll"
|
||||
File "${INSTALL_PATH}\lib\libtomahawklib.dll"
|
||||
File "${INSTALL_PATH}\lib\libtomahawk_sipjabber.dll"
|
||||
File "${INSTALL_PATH}\lib\libtomahawk_siptwitter.dll"
|
||||
File "${INSTALL_PATH}\lib\libtomahawk_sipzeroconf.dll"
|
||||
!endif
|
||||
!ifndef INSTALL_PATH
|
||||
;Main executable.
|
||||
File "${BUILD_PATH}\tomahawk.exe"
|
||||
|
||||
File "${BUILD_PATH}\thirdparty\rtaudio\librtaudio.dll"
|
||||
File "${BUILD_PATH}\thirdparty\qxt\qxtweb-standalone\libqxtweb-standalone.dll"
|
||||
File "${BUILD_PATH}\thirdparty\jdns\libtomahawk_jdns.dll"
|
||||
File "${BUILD_PATH}\thirdparty\qtweetlib\libtomahawk_qtweetlib.dll"
|
||||
File "${BUILD_PATH}\src\libtomahawk\libtomahawklib.dll"
|
||||
File "${BUILD_PATH}\libtomahawk_sipjabber.dll"
|
||||
File "${BUILD_PATH}\libtomahawk_siptwitter.dll"
|
||||
File "${BUILD_PATH}\libtomahawk_sipzeroconf.dll"
|
||||
!endif
|
||||
|
||||
;License & release notes.
|
||||
File "${ROOT_PATH}\LICENSE.txt"
|
||||
@@ -263,11 +287,18 @@ Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
|
||||
File "${QT_DLL_PATH}\QtNetwork4.dll"
|
||||
File "${QT_DLL_PATH}\QtSql4.dll"
|
||||
File "${QT_DLL_PATH}\QtXml4.dll"
|
||||
File "${QT_DLL_PATH}\QtWebKit4.dll"
|
||||
|
||||
;SQLite driver
|
||||
SetOutPath "$INSTDIR\sqldrivers"
|
||||
File "${SQLITE_DLL_PATH}\qsqlite4.dll"
|
||||
SetOutPath "$INSTDIR"
|
||||
|
||||
;Image plugins
|
||||
SetOutPath "$INSTDIR\imageformats"
|
||||
File "${IMAGEFORMATS_DLL_PATH}\qgif4.dll"
|
||||
File "${IMAGEFORMATS_DLL_PATH}\qjpeg4.dll"
|
||||
SetOutPath "$INSTDIR"
|
||||
|
||||
;Cygwin/c++ stuff
|
||||
;File "${MING_DLL_PATH}\cygmad-0.dll"
|
||||
@@ -277,24 +308,28 @@ Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
|
||||
File "${MING_DLL_PATH}\libstdc++-6.dll"
|
||||
|
||||
;Audio stuff
|
||||
;File "${MING_DLL_PATH}\libmad.dll"
|
||||
;File "${MING_DLL_PATH}\librtaudio.dll"
|
||||
File "${RTAUDIO_DLL_PATH}\librtaudio.dll"
|
||||
File "${MING_DLL_PATH}\libmad-0.dll"
|
||||
File "${MING_DLL_PATH}\libogg-0.dll"
|
||||
File "${MING_DLL_PATH}\libvorbisfile-3.dll"
|
||||
File "${MING_DLL_PATH}\libvorbis-0.dll"
|
||||
File "${MING_DLL_PATH}\libFLAC-8.dll"
|
||||
File "${MING_DLL_PATH}\libFLAC++-6.dll"
|
||||
|
||||
;Other
|
||||
File "${MING_DLL_PATH}\libqjson.dll"
|
||||
File "${MING_DLL_PATH}\libtag.dll"
|
||||
File "${MING_DLL_PATH}\libgloox-8.dll"
|
||||
File "${MING_DLL_PATH}\libpng14-14.dll"
|
||||
File "${MING_DLL_PATH}\libpng15-15.dll"
|
||||
File "${MING_DLL_PATH}\libjpeg-8.dll"
|
||||
File "${MING_DLL_PATH}\zlib1.dll"
|
||||
|
||||
File "${MING_DLL_PATH}\libechonest.dll"
|
||||
File "${MING_DLL_PATH}\liblastfm.dll"
|
||||
|
||||
File "${QXTWEB_DLL_PATH}\libqxtweb-standalone.dll"
|
||||
File "${MING_LIB}\libclucene-core.dll"
|
||||
File "${MING_LIB}\libclucene-shared.dll"
|
||||
|
||||
File "${MING_BIN}\libqtsparkle.dll"
|
||||
SectionEnd
|
||||
|
||||
SectionGroup "Shortcuts"
|
||||
@@ -519,6 +554,13 @@ Function .onInit
|
||||
StrCmp $R0 0 +3
|
||||
MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running."
|
||||
Abort
|
||||
|
||||
;Use available InstallLocation when possible. This is useful in the uninstaller
|
||||
;via re-install, which would otherwise use a default location - a bug.
|
||||
ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tomahawk" "InstallLocation"
|
||||
StrCmp $R0 "" SkipSetInstDir
|
||||
StrCpy $INSTDIR $R0
|
||||
SkipSetInstDir:
|
||||
FunctionEnd
|
||||
|
||||
Function .onInstSuccess
|
BIN
admin/win/nsi/welcome.bmp
Executable file
After Width: | Height: | Size: 151 KiB |
@@ -1 +0,0 @@
|
||||
37
|
17
admin/win/sparklewin-beta.rss
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<channel>
|
||||
<title>Tomahawk Player</title>
|
||||
<link>http://www.gettomahawk.com</link>
|
||||
<description>Tomahawk Player Beta</description>
|
||||
<language>en</language>
|
||||
<item>
|
||||
<title>Version 0.0.1 (Tomahawk Player Beta - It Lives?)</title>
|
||||
<sparkle:releaseNotesLink>
|
||||
https://github.com/tomahawk-player/tomahawk/raw/stable/ChangeLog
|
||||
</sparkle:releaseNotesLink>
|
||||
<pubDate>Fri, 25 Mar 2011 00:00:01 +0100</pubDate>
|
||||
<enclosure url="http://download.tomahawk-player.org/tomahawk-beta-0.0.1.exe" sparkle:version="0.0.1" />
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
17
admin/win/sparklewin.rss
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<channel>
|
||||
<title>Tomahawk Player</title>
|
||||
<link>http://www.gettomahawk.com</link>
|
||||
<description>Tomahawk Player</description>
|
||||
<language>en</language>
|
||||
<item>
|
||||
<title>Version 0.0.1 (Tomahawk Player - It Lives!)</title>
|
||||
<sparkle:releaseNotesLink>
|
||||
https://github.com/tomahawk-player/tomahawk/raw/0.0.1/ChangeLog
|
||||
</sparkle:releaseNotesLink>
|
||||
<pubDate>Fri, 25 Mar 2011 00:00:01 +0100</pubDate>
|
||||
<enclosure url="http://download.tomahawk-player.org/tomahawk-0.0.1.exe" sparkle:version="0.0.1" />
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
@@ -1 +0,0 @@
|
||||
ID ICON "data/tomahawk_logo_32x32.ico"
|
21
cmake_uninstall.cmake.in
Normal file
@@ -0,0 +1,21 @@
|
||||
IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
|
||||
ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
|
||||
FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
|
||||
STRING(REGEX REPLACE "\n" ";" files "${files}")
|
||||
FOREACH(file ${files})
|
||||
MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
|
||||
IF(EXISTS "$ENV{DESTDIR}${file}")
|
||||
EXEC_PROGRAM(
|
||||
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RETURN_VALUE rm_retval
|
||||
)
|
||||
IF(NOT "${rm_retval}" STREQUAL 0)
|
||||
MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
|
||||
ENDIF(NOT "${rm_retval}" STREQUAL 0)
|
||||
ELSE(EXISTS "$ENV{DESTDIR}${file}")
|
||||
MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
|
||||
ENDIF(EXISTS "$ENV{DESTDIR}${file}")
|
||||
ENDFOREACH(file)
|
302
data/icons/tomahawk-icon.svg
Normal file
@@ -0,0 +1,302 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="841.89px" height="595.28px" viewBox="0 0 841.89 595.28" enable-background="new 0 0 841.89 595.28" xml:space="preserve">
|
||||
<path fill="#010101" d="M543.773,253.359c0-49.962-19.305-86.572-54.194-104.54C477.838,71.133,405.027,13.418,316.568,13.418
|
||||
c-86.917,0-159.483,56.481-172.605,132.58c-38.049,16.818-59.889,55.24-59.889,107.361c0,27.029,7.186,51.825,20.321,71.748
|
||||
c-1.816,1.566-3.444,3.283-4.768,5.24c0,0,2.582,2.36,3.689,3.374c-4.262,2.123-8.22,4.322-11.555,6.669
|
||||
c0,0,3.022,7.355,5.898,14.352c-11.991,9.687-21.314,18.92-27.553,27.51c0,0,1.612,1.789,2.011,2.224
|
||||
c-12.355,9.158-22.133,18.206-28.528,27.021c0,0,6.925,7.351,12.408,13.167c-17.824,28.759-43.348,74.85-43.348,102.987
|
||||
c0,3.281,0.346,6.318,1.093,9.054c1.764,6.442,5.752,11.437,11.229,14.058c15.255,7.311,39.648-6.364,72.589-40.434
|
||||
c-0.828,8.288-1.457,16.663-1.457,24.737c0,16.804,2.266,32.07,8.77,41.249c4.886,6.895,10.898,9.07,15.084,9.683
|
||||
c6.721,0.989,26.375,3.796,57.992-61.296c2.678,0.705,5.421,1.179,8.235,1.179c8.798,0,17.067-3.425,23.287-9.639
|
||||
c4.286-4.288,7.133-9.584,8.562-15.313c7.516-2.129,14.555-6.702,20.779-13.191c19.563,24.861,44.78,37.643,75.38,37.643
|
||||
c7.318,0,14.474-0.755,21.281-2.243c0.392-0.075,2.555-0.622,2.555-0.622l0.62-0.167c23.05-5.824,42.463-20.41,58-43.254
|
||||
c7.2,9.231,15.733,15.994,24.849,19.458c1.139,6.658,4.224,12.806,9.1,17.69c6.22,6.214,14.488,9.639,23.288,9.639
|
||||
c8.798,0,17.065-3.425,23.285-9.639c6.221-6.228,9.649-14.494,9.649-23.292s-3.429-17.066-9.649-23.294
|
||||
c-2.988-2.988-6.476-5.296-10.248-6.923c0.277-2.947,0.613-5.848,0.613-9.007c0-10.031-1.4-20.982-4.192-31.9
|
||||
c-1.196-4.672-2.757-8.745-4.511-12.567c2.838-6.467,4.805-13.268,4.805-20.426c0-7.317-1.74-14.422-4.706-21.011
|
||||
C509.263,358.346,543.773,313.068,543.773,253.359z M451.232,150.998c-33.395-54.619-88.048-93.359-134.569-85.472
|
||||
c-49.024-7.864-102.777,30.64-135.326,85.018c-2.648,0.208-5.278,0.497-7.875,0.88c8.694-54.414,69.429-111.108,143.107-111.108
|
||||
c74.113,0,135.141,57.197,143.269,112.08C457.013,151.799,454.137,151.348,451.232,150.998z"/>
|
||||
<path fill="#010101" stroke="#FFFFFF" stroke-width="4.8437" d="M110.937,367.38c-72.03,93.07-97.843,163.348-81.865,170.997
|
||||
c15.97,7.654,74.912-46.056,139.701-143.288c45.751-68.648,60.797-94.429,45.68-95.922l20.614-43.357l-10.685-6.644l-33.912,33.371
|
||||
C179.323,272.615,166.073,296.146,110.937,367.38z"/>
|
||||
<path fill="#010101" stroke="#FFFFFF" stroke-width="4.8437" d="M140.932,379.755c-39.099,113.042-39.738,189.89-20.813,192.654
|
||||
c18.912,2.787,59.039-67.616,89.306-182.6c21.381-81.178,27.255-111.03,11.438-108.001l5.133-48.806l-13.207-3.354l-22.194,42.936
|
||||
C175.736,266.142,170.865,293.244,140.932,379.755z"/>
|
||||
<circle fill="none" stroke="#010101" stroke-width="4.8437" cx="410.28" cy="388.831" r="37.801"/>
|
||||
<path fill="#ED2224" stroke="#010101" stroke-width="4.8437" d="M475.237,157.792c-7.115-73.197-76.231-130.645-160.495-130.645
|
||||
c-83.402,0-152.009,56.27-160.306,128.393c-39.809,13.607-58.455,52.219-58.455,97.818c0,56.947,34.681,103.109,89.925,103.109
|
||||
c35.784,0,67.089-19.432,84.771-48.551c14.01,3.533,28.778,5.463,44.066,5.463c13.16,0,25.932-1.438,38.173-4.077
|
||||
c17.966,28.357,49.108,47.165,84.604,47.165c55.665,0,90.696-46.162,90.696-103.109
|
||||
C528.216,210.073,512.208,173.073,475.237,157.792z M314.742,274.908c-10.501,0-20.723-0.878-30.584-2.506
|
||||
c1.125-6.177,1.778-12.527,1.778-19.043c0-56.941-44.786-103.104-100.03-103.104c-4.858,0-9.597,0.478-14.271,1.169
|
||||
c8.694-54.414,69.43-111.108,143.107-111.108c74.113,0,135.142,57.197,143.268,112.08c-6.617-1.398-13.471-2.141-20.49-2.141
|
||||
c-55.675,0-100.801,46.163-100.801,103.104c0,6.852,0.687,13.536,1.931,20.013C330.872,274.364,322.888,274.908,314.742,274.908z"/>
|
||||
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-55.6953" y1="95.2363" x2="39.7773" y2="95.2363" gradientTransform="matrix(-0.3782 -0.8348 1.083 -0.4907 70.5233 338.0542)">
|
||||
<stop offset="0" style="stop-color:#010101"/>
|
||||
<stop offset="0.2606" style="stop-color:#3E221C"/>
|
||||
<stop offset="0.7732" style="stop-color:#B03126"/>
|
||||
<stop offset="1" style="stop-color:#ED2224"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_1_)" d="M153.69,260.35c31.322-14.19,65.739-18.887,77.129,6.254c11.391,25.14-4.763,57.027-36.091,71.213
|
||||
c-31.323,14.194-65.948,5.312-77.338-19.829C106,292.849,122.366,274.543,153.69,260.35z"/>
|
||||
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="-180.8516" y1="181.2642" x2="-85.3789" y2="181.2642" gradientTransform="matrix(-0.9008 -0.3607 0.555 -1.386 252.7537 479.2919)">
|
||||
<stop offset="0" style="stop-color:#B11F24"/>
|
||||
<stop offset="0.1017" style="stop-color:#B62024"/>
|
||||
<stop offset="1" style="stop-color:#ED2224"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_2_)" d="M427.738,265.165c16.043-40.085,41.342-74.985,68.473-64.122
|
||||
c27.122,10.86,36.111,52.165,20.056,92.248c-16.053,40.089-51.062,63.772-78.189,52.911
|
||||
C410.95,335.343,411.683,305.253,427.738,265.165z"/>
|
||||
<path fill="#010101" stroke="#010101" stroke-width="4.8437" d="M448.219,425.226c7.776,30.397,3.982,62.358-14.521,62.358
|
||||
c-16.301,0-34.904-17.333-42.675-47.733c-7.777-30.4,4.243-75.016,14.521-62.365C423.583,399.707,440.442,394.825,448.219,425.226z"
|
||||
/>
|
||||
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="217.0322" y1="557.499" x2="165.1699" y2="467.6709" gradientTransform="matrix(0.9868 0.0515 0.0515 0.7987 -5.5217 21.3475)">
|
||||
<stop offset="0" style="stop-color:#5B3E1D"/>
|
||||
<stop offset="0.1121" style="stop-color:#42301B"/>
|
||||
<stop offset="0.2377" style="stop-color:#2E2316"/>
|
||||
<stop offset="0.3753" style="stop-color:#1D1710"/>
|
||||
<stop offset="0.5292" style="stop-color:#0E0C08"/>
|
||||
<stop offset="0.7122" style="stop-color:#030302"/>
|
||||
<stop offset="1" style="stop-color:#000000"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_3_)" stroke="#010101" stroke-width="4.8437" d="M184.076,437.859c-6.111,23.875,1.745,46.508,17.54,50.549
|
||||
c15.79,4.039,33.552-12.045,39.658-35.924c6.101-23.881-9.153-57.129-24.947-61.17C200.537,387.275,190.178,413.973,184.076,437.859
|
||||
z"/>
|
||||
<path fill="#010101" stroke="#010101" stroke-width="4.8437" d="M314.837,65.525c72.755-12.333,165.503,89.311,165.503,187.528
|
||||
c0,98.215-74.305,162.834-165.707,162.834"/>
|
||||
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="194.4072" y1="374.3564" x2="358.2427" y2="90.5851">
|
||||
<stop offset="0" style="stop-color:#000000"/>
|
||||
<stop offset="1" style="stop-color:#5B3E1D"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_4_)" stroke="#010101" stroke-width="4.8437" d="M314.634,415.888c-91.402,0-165.297-64.619-165.297-162.834
|
||||
c0-98.218,88.615-199.862,165.5-187.528"/>
|
||||
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="297.3164" y1="139.4717" x2="418.2684" y2="-70.0234" gradientTransform="matrix(-0.6092 0.7802 -0.4118 -0.3216 476.7253 -96.4624)">
|
||||
<stop offset="0" style="stop-color:#8B654B"/>
|
||||
<stop offset="1" style="stop-color:#000000"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_5_)" d="M169.611,266.578c-27.578-21.539-16.863-81.354,23.935-133.604
|
||||
c40.802-52.245,93.808-72.894,126.21-59.689c26.67,10.864,14.474,85.434-26.328,137.681
|
||||
C252.63,263.215,197.193,288.112,169.611,266.578z"/>
|
||||
<circle fill="#010101" cx="214.367" cy="388.831" r="34.682"/>
|
||||
<g>
|
||||
<path fill="#F4DFED" d="M131.831,427.709c-23.973,79.733-18.741,132.267-9.011,135.459c10.855,3.563,43.561-47.223,60.839-128.324
|
||||
c12.189-57.265,11.727-83.75,0.009-81.625l3.505-31.111l-8.901-2.432l-14.271,32.445
|
||||
C152.554,347.564,150.184,366.689,131.831,427.709z"/>
|
||||
<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="148.1519" y1="319.6758" x2="148.1518" y2="563.168">
|
||||
<stop offset="0" style="stop-color:#571A54"/>
|
||||
<stop offset="0.2641" style="stop-color:#7C5378"/>
|
||||
<stop offset="0.528" style="stop-color:#A78AA3"/>
|
||||
<stop offset="0.7459" style="stop-color:#CDBCCB"/>
|
||||
<stop offset="0.9095" style="stop-color:#EAE1E8"/>
|
||||
<stop offset="1" style="stop-color:#F9F3F8"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_6_)" d="M146.41,479.117l-22.914,19.186l35.325-65.182l4.683-17.371c0,0,3.098-26.758-24.228,14.713
|
||||
c16.962-56.432,32.317-62.998,32.317-62.998l11.404-46.658l-4.725-1.131l-14.702,30.23c-11.429-4.588-13.859,14.521-32.392,75.485
|
||||
c-24.224,79.655-20.501,124.085-8.358,137.776L146.41,479.117z"/>
|
||||
|
||||
<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="75.7998" y1="402.9658" x2="43.9086" y2="490.7602" gradientTransform="matrix(0.9399 -0.3414 0.3414 0.9399 -44.7892 56.207)">
|
||||
<stop offset="0" style="stop-color:#802986"/>
|
||||
<stop offset="0.2641" style="stop-color:#9D66A2"/>
|
||||
<stop offset="0.528" style="stop-color:#BE9BC2"/>
|
||||
<stop offset="0.7459" style="stop-color:#DBC8DE"/>
|
||||
<stop offset="0.9095" style="stop-color:#F0E6F1"/>
|
||||
<stop offset="1" style="stop-color:#F9F3F8"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_7_)" d="M147.332,501.478l31.839-92.4c0,0,6.608,60.692-7.474,93.405
|
||||
c1.438-44.878-2.328-36.951-9.176-25.254C159.71,482.03,147.332,501.478,147.332,501.478z"/>
|
||||
|
||||
<linearGradient id="SVGID_8_" gradientUnits="userSpaceOnUse" x1="100.2559" y1="370.0205" x2="67.8228" y2="459.3065" gradientTransform="matrix(0.9399 -0.3414 0.3414 0.9399 -44.7892 56.207)">
|
||||
<stop offset="0" style="stop-color:#802986"/>
|
||||
<stop offset="0.2641" style="stop-color:#9D66A2"/>
|
||||
<stop offset="0.528" style="stop-color:#BE9BC2"/>
|
||||
<stop offset="0.7459" style="stop-color:#DBC8DE"/>
|
||||
<stop offset="0.9095" style="stop-color:#F0E6F1"/>
|
||||
<stop offset="1" style="stop-color:#F9F3F8"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_8_)" d="M156.286,463.716l38.825-93.952c0,0,2.251,62.278-11.831,94.991
|
||||
c-0.298-44.249-5.388-28.089-8.538-23.508C165.662,454.416,156.286,463.716,156.286,463.716z"/>
|
||||
|
||||
<linearGradient id="SVGID_9_" gradientUnits="userSpaceOnUse" x1="19.1768" y1="337.1123" x2="-32.4432" y2="389.2988" gradientTransform="matrix(0.711 -0.7032 0.7032 0.711 -56.5767 131.5096)">
|
||||
<stop offset="0" style="stop-color:#571A54"/>
|
||||
<stop offset="0.2641" style="stop-color:#7C5378"/>
|
||||
<stop offset="0.528" style="stop-color:#A78AA3"/>
|
||||
<stop offset="0.7459" style="stop-color:#CDBCCB"/>
|
||||
<stop offset="0.9095" style="stop-color:#EAE1E8"/>
|
||||
<stop offset="1" style="stop-color:#F9F3F8"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_9_)" d="M180.916,431.115l9.787-73.404c0,0,18.589,43.111,16.428,71.425
|
||||
c-11.773-30.423-13.671-21.048-17.578-14.96C187.396,417.538,180.916,431.115,180.916,431.115z"/>
|
||||
<path fill="#1E3D73" d="M174.914,335.556L158.76,362.31l-23.24,76.647c0,0,1.211-8.173,1.788-15.883l-18.783,50.773
|
||||
c0,0,8.386-31.226,3.609-28.382c-4.777,2.84,4.225-21.91-23.102,13.729c5.316-18.514,20.495-39.508,33.324-54.9
|
||||
c-2.172,0.474-7.1,4.788-18.387,18.374c4.38-15.232,14.957-32.934,25.358-47.898c-1.159-2.683-5.151-3.889-21.234,5.221
|
||||
C134.366,356.719,174.914,335.556,174.914,335.556z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#F4DFED" d="M94.453,401.163c-49.752,66.752-62.779,117.913-54.719,124.242c8.987,7.059,57.064-29.51,100.989-99.844
|
||||
c31.011-49.657,39.62-74.709,27.879-76.714l13.916-28.052l-7.539-5.319L150.496,341.1
|
||||
C141.291,332.911,132.531,350.072,94.453,401.163z"/>
|
||||
<path fill="#656B84" d="M90.603,454.464L62.515,464.67l55.456-49.201l10.331-14.731c0,0,12.047-24.096-27.794,5.558
|
||||
c35.211-47.255,51.89-48.182,51.89-48.182l26.641-39.956l-4.058-2.681l-24.133,23.399c-9.177-8.222-17.989,8.911-56.224,59.885
|
||||
c-49.96,66.6-61.634,109.635-54.889,126.645L90.603,454.464z"/>
|
||||
<linearGradient id="SVGID_10_" gradientUnits="userSpaceOnUse" x1="106.2383" y1="485.0312" x2="121.9901" y2="395.6984">
|
||||
<stop offset="0" style="stop-color:#571A54"/>
|
||||
<stop offset="0.2641" style="stop-color:#7C5378"/>
|
||||
<stop offset="0.528" style="stop-color:#A78AA3"/>
|
||||
<stop offset="0.7459" style="stop-color:#CDBCCB"/>
|
||||
<stop offset="0.9095" style="stop-color:#EAE1E8"/>
|
||||
<stop offset="1" style="stop-color:#F9F3F8"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_10_)" d="M83.829,475.791l61.474-75.981c0,0-14.507,59.304-38.916,85.248
|
||||
c16.678-41.696,12.058-33.368,0-26.873C101.491,460.821,83.829,475.791,83.829,475.791z"/>
|
||||
<linearGradient id="SVGID_11_" gradientUnits="userSpaceOnUse" x1="130.9844" y1="453.7012" x2="146.8758" y2="363.5764">
|
||||
<stop offset="0" style="stop-color:#571A54"/>
|
||||
<stop offset="0.2641" style="stop-color:#7C5378"/>
|
||||
<stop offset="0.528" style="stop-color:#A78AA3"/>
|
||||
<stop offset="0.7459" style="stop-color:#CDBCCB"/>
|
||||
<stop offset="0.9095" style="stop-color:#EAE1E8"/>
|
||||
<stop offset="1" style="stop-color:#F9F3F8"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_11_)" d="M105.143,443.356l68.564-75.05c0,0-19.143,59.297-43.551,85.248
|
||||
c14.824-41.701,10.567-27.993,0-25.023C124.802,430.041,105.143,443.356,105.143,443.356z"/>
|
||||
<path fill="#656B84" d="M139.423,421.124l34.26-65.654c0,0,2.748,46.867-8.945,72.74c-0.676-32.615-3.041-28.432-11.413-20.06
|
||||
C150.5,410.974,139.423,421.124,139.423,421.124z"/>
|
||||
<path fill="#656B84" d="M166.408,329.256l-24.322,19.63l-48.011,64.112c0,0,3.931-7.274,7.104-14.322l-34.994,41.313
|
||||
c0,0,18.552-26.484,13.089-25.448c-5.464,1.04,11.451-19.148-26.399,5.019c11.313-15.587,32.751-30.137,50.064-40.227
|
||||
c-2.205-0.298-8.316,2.077-23.552,10.989c9.313-12.818,25.302-25.842,40.183-36.357c-0.175-2.919-3.515-5.416-21.74-2.346
|
||||
C121.065,335.3,166.408,329.256,166.408,329.256z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#D9AF82" enable-background="new " d="M315.05,115.063c-50.514,0-83.218,15.021-109.641,64.839
|
||||
c-2.502,4.713-0.232,14.337-2.796,19.152c-13.845,26.007-37.089,48.236-37.089,71.707c0,34.337,19.1,65.637,42.505,89.297
|
||||
c12.185,71.644,34.7,151.593,104.339,151.593"/>
|
||||
<path fill="#010101" d="M203.271,178.766c-1.519,2.855-1.59,6.774-1.656,10.562c-0.062,3.283-0.123,6.677-1.14,8.588
|
||||
c-4.537,8.519-10.146,16.707-15.577,24.624c-11.21,16.353-21.797,31.798-21.797,48.221c0,30.307,15.166,62.382,42.666,90.413
|
||||
c12.578,73.606,36.115,150.477,106.6,150.477v-1.546c-67.084,0-89.722-78.554-101.95-150.453l-0.127-0.748l-0.54-0.549
|
||||
c-26.957-27.255-41.805-58.361-41.805-87.594c0-14.923,10.174-29.766,20.949-45.482c5.501-8.027,11.192-16.327,15.857-25.087
|
||||
c1.56-2.935,1.636-6.92,1.707-10.773c0.057-3.221,0.118-6.551,1.088-8.381c24.256-45.734,54.398-65.974,107.503-65.974v-2.422
|
||||
C259.849,112.641,228.506,131.181,203.271,178.766z"/>
|
||||
</g>
|
||||
<path fill="#8B654B" d="M312.368,511.65c72.045,0,92.163-79.949,104.338-151.593c23.405-23.66,42.512-54.96,42.512-89.297
|
||||
c0-37.004-22.588-49.51-38.609-77.154c-5.681-9.798-1.496-24.634-8.084-33.382c-26.905-35.728-53.772-45.162-97.475-45.162"/>
|
||||
<ellipse fill="#D9AF82" cx="313.792" cy="343.947" rx="21.906" ry="68.144"/>
|
||||
<path fill="#8B654B" d="M342.916,373.454c0,7.813-14.98,12.535-27.275,12.535c-12.293,0-27.808-4.735-27.808-12.549
|
||||
c3.43-3.43,15.246,4.886,27.544,4.886C334.789,378.326,342.916,312.495,342.916,373.454z"/>
|
||||
<path fill="#D9AF82" d="M335.697,435.217c0,37.637-9.81,68.831-21.91,68.831c-12.096,0-21.901-31.194-21.901-68.831
|
||||
c0-37.639,9.882-50.259,21.977-50.259C325.962,384.958,335.697,397.578,335.697,435.217z"/>
|
||||
<path opacity="0.36" fill="#8A644B" d="M328.365,281.605c-1.826,24.681-14.186-7.573-34.757,20.974
|
||||
c-8.672,12.026-23.23,10.877-38.845,10.877c-39.61,0-66.544-26.03-67.859-38.868c-2.517-24.557,29.024-39.586,71.464-39.586
|
||||
C297.028,235.002,329.255,269.622,328.365,281.605z"/>
|
||||
<linearGradient id="SVGID_12_" gradientUnits="userSpaceOnUse" x1="214.7554" y1="341.0537" x2="290.4385" y2="341.0537">
|
||||
<stop offset="0" style="stop-color:#D9AF82"/>
|
||||
<stop offset="0.0786" style="stop-color:#DFB791"/>
|
||||
<stop offset="0.2053" style="stop-color:#E7C1A5"/>
|
||||
<stop offset="0.345" style="stop-color:#EDC9B5"/>
|
||||
<stop offset="0.5023" style="stop-color:#F1CFC0"/>
|
||||
<stop offset="0.6917" style="stop-color:#F4D3C7"/>
|
||||
<stop offset="1" style="stop-color:#F5D4C9"/>
|
||||
</linearGradient>
|
||||
<path opacity="0.36" fill="url(#SVGID_12_)" d="M272.246,361.529c-28.722,19.46-56.346-24.299-57.491-43.314
|
||||
c15.913,13.821,62.032,18.457,75.683-2.517L272.246,361.529z"/>
|
||||
<path opacity="0.36" fill="#8A644B" d="M313.706,461.213c-38.167,0-61.231-13.681-61.231-31.63c0-6.048,15.651-24.078,37.32-49.365
|
||||
c5.952-3.699,7.464,10.038,14.958,4.731C331.61,392.044,328.318,461.213,313.706,461.213z"/>
|
||||
<g>
|
||||
<path fill="#8A644B" d="M260.464,472.116c8.339,23.94,32.817,36.466,52.688,36.466v-4.845
|
||||
C294.99,503.737,268.056,493.921,260.464,472.116L260.464,472.116z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#8A644B" d="M180.954,271.658c0,21.359,5.388,36.679,27.099,48.222c0.587,1.121,7.021,13.387,7.021,13.387
|
||||
c8.916,16.375,19.02,34.94,19.02,54.406h4.844c0-20.699-10.416-39.839-19.612-56.725l-7.586-14.455l-0.709-0.426
|
||||
C190.509,305.4,180.954,291.289,180.954,271.658L180.954,271.658z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#010101" d="M208.814,230.649l-0.104-0.97c-3.108-15.25-3.226-33.651-0.312-49.217l-4.764-0.889
|
||||
C200.613,195.722,205.583,214.815,208.814,230.649z"/>
|
||||
</g>
|
||||
<linearGradient id="SVGID_13_" gradientUnits="userSpaceOnUse" x1="191.0591" y1="310.5205" x2="451.5771" y2="310.5205">
|
||||
<stop offset="0" style="stop-color:#5B3E1D"/>
|
||||
<stop offset="1" style="stop-color:#010101"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_13_)" d="M423.943,199.054c-3.983-11.059-0.737-20.853-8.061-31.231
|
||||
c-19.885-28.185-51.072-56.27-108.998-52.618l5.212,140.363c0,0-122.733-25.589-121.021,15.935c0.227,5.387,40.188,2.88,63.46,4.428
|
||||
c-26.092,4.566-32.185,5.898-32.185,8.838c0,6.206,21.863,0.683,25.108,2.467c4.976,2.739-43.139,7.052-34.351,8.757
|
||||
c10.057,1.951,44.474,3.086,57.444,3.086c28.929,0,41.077-25.412,41.077-4.485c7.346,27.893,14.739,59.24,13.972,69.882
|
||||
c-1.475,20.662-19.62,20.188-19.62,20.188l5.089,24.285c-8.557,0.439-6.245-1.324-13.85-0.549
|
||||
c-14.427,0-32.354,13.032-32.354,16.054l39.989,0.435c0,0-29.081,13.771-22.975,22.928c4.763,7.143,20.316,13.378,31.091,13.424
|
||||
c0,0,3.273,8.55,3.273,22.352c0,13.811-4.035,22.565-4.035,22.565c46.171,0,67.49-49.036,80.324-118.446
|
||||
c6.083-32.876,20.018-58.106,36.034-71.657c15.742-13.321,23.008-26.641,23.008-52.071
|
||||
C451.577,249.847,443.574,230.354,423.943,199.054z"/>
|
||||
<path fill="#D9AF82" d="M325.395,252.416l-13.297,4.328c0,0-65.848-96.356-46.493-121.312
|
||||
c12.682-16.357,24.611-18.136,40.046-19.238c13.519-0.965,21.294,16.525,27.302,24.271
|
||||
C350.375,162.927,325.395,252.416,325.395,252.416z"/>
|
||||
<linearGradient id="SVGID_14_" gradientUnits="userSpaceOnUse" x1="260.7119" y1="113.4033" x2="349.5527" y2="113.4033" gradientTransform="matrix(0.676 0.6564 -0.9247 0.9523 168.3961 -132.5865)">
|
||||
<stop offset="0" style="stop-color:#FFFFFF"/>
|
||||
<stop offset="0.0769" style="stop-color:#F4E9DD"/>
|
||||
<stop offset="0.1814" style="stop-color:#EBD6BF"/>
|
||||
<stop offset="0.2951" style="stop-color:#E5C7A8"/>
|
||||
<stop offset="0.419" style="stop-color:#DFBC96"/>
|
||||
<stop offset="0.5585" style="stop-color:#DCB58B"/>
|
||||
<stop offset="0.7265" style="stop-color:#DAB084"/>
|
||||
<stop offset="1" style="stop-color:#D9AF82"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_14_)" d="M305.253,199.27c-26.745,27.542-70.168,41.961-81.283,24.357
|
||||
c-14.513-22.972-12.896-47.545,13.854-75.082c26.74-27.547,64.922-33.847,85.28-14.081
|
||||
C343.464,154.233,332.003,171.726,305.253,199.27z"/>
|
||||
<linearGradient id="SVGID_15_" gradientUnits="userSpaceOnUse" x1="241.0796" y1="401.8057" x2="241.0796" y2="318.2148">
|
||||
<stop offset="0" style="stop-color:#D9AF82"/>
|
||||
<stop offset="0.1127" style="stop-color:#BD936E"/>
|
||||
<stop offset="0.2679" style="stop-color:#A57C5E"/>
|
||||
<stop offset="0.4437" style="stop-color:#966E53"/>
|
||||
<stop offset="0.6554" style="stop-color:#8D664D"/>
|
||||
<stop offset="1" style="stop-color:#8A644B"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_15_)" d="M272.246,361.529c0,46.274-35.419,42.799-45.106,36.896c0-45.751-17.227-80.21-17.227-80.21
|
||||
S249.882,354.221,272.246,361.529z"/>
|
||||
<linearGradient id="SVGID_16_" gradientUnits="userSpaceOnUse" x1="175.4648" y1="345.0176" x2="128.5757" y2="362.0838" gradientTransform="matrix(-1 0 0 1 538.9277 0)">
|
||||
<stop offset="0" style="stop-color:#382815"/>
|
||||
<stop offset="0.4081" style="stop-color:#553E2B"/>
|
||||
<stop offset="1" style="stop-color:#8B654B"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_16_)" d="M359.338,356.35c0,46.27,21.504,44.032,31.073,44.032c7.488-45.135,35.671-81.515,35.671-81.515
|
||||
S381.703,349.045,359.338,356.35z"/>
|
||||
<path fill="none" stroke="#010101" stroke-width="4.8437" d="M173.934,294.978"/>
|
||||
<g>
|
||||
<path fill="#010101" d="M311.507,115.089c53.106,0,83.247,20.214,107.503,65.948c0.904,1.702,0.904,4.883,0.904,7.96
|
||||
c-0.005,4.146-0.005,8.432,2.029,11.419c16.157,23.757,31.933,48.809,31.933,70.969c0,32.381-12.818,62.458-37.074,86.969
|
||||
l-0.541,0.549l-0.128,0.748c-12.222,71.899-36.672,150.453-103.765,150.453v1.517c70.499,0,95.847-76.845,108.416-150.456
|
||||
c24.801-25.335,37.935-56.354,37.935-89.78c0-23.537-16.19-49.311-32.774-73.694c-1.153-1.698-1.192-5.061-1.192-8.37
|
||||
c0-0.109,0.004-0.537,0.004-0.646c0-3.567-0.041-7.221-1.469-9.91c-25.237-47.585-56.579-66.125-111.78-66.125V115.089z"/>
|
||||
</g>
|
||||
<polygon fill="#010101" points="339.974,84.79 334.59,115.675 300.608,113.719 312.435,66.413 "/>
|
||||
<circle fill="#010101" stroke="#010101" stroke-width="4.8437" cx="452.06" cy="492.948" r="19.204"/>
|
||||
<g>
|
||||
<linearGradient id="SVGID_17_" gradientUnits="userSpaceOnUse" x1="109.1782" y1="336.3027" x2="170.7935" y2="336.3027">
|
||||
<stop offset="0" style="stop-color:#571A54"/>
|
||||
<stop offset="0.2641" style="stop-color:#7C5378"/>
|
||||
<stop offset="0.528" style="stop-color:#A78AA3"/>
|
||||
<stop offset="0.7459" style="stop-color:#CDBCCB"/>
|
||||
<stop offset="0.9095" style="stop-color:#EAE1E8"/>
|
||||
<stop offset="1" style="stop-color:#F9F3F8"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_17_)" d="M109.178,338.034c9.592-7.823,34.696,4.862,34.833,4.862l26.782-8.396
|
||||
C170.211,334.501,120.246,321.648,109.178,338.034z"/>
|
||||
</g>
|
||||
<linearGradient id="SVGID_18_" gradientUnits="userSpaceOnUse" x1="-102.0645" y1="221.0444" x2="-84.4219" y2="221.0444" gradientTransform="matrix(-0.0113 -0.7169 1.2476 -0.0198 36.6184 302.7065)">
|
||||
<stop offset="0" style="stop-color:#D9AF82"/>
|
||||
<stop offset="0.0786" style="stop-color:#DFB791"/>
|
||||
<stop offset="0.2053" style="stop-color:#E7C1A5"/>
|
||||
<stop offset="0.345" style="stop-color:#EDC9B5"/>
|
||||
<stop offset="0.5023" style="stop-color:#F1CFC0"/>
|
||||
<stop offset="0.6917" style="stop-color:#F4D3C7"/>
|
||||
<stop offset="1" style="stop-color:#F5D4C9"/>
|
||||
</linearGradient>
|
||||
<path opacity="0.36" fill="url(#SVGID_18_)" d="M313.352,358.852c6.074-0.1,11.045,2.653,11.102,6.149
|
||||
c0.058,3.49-4.829,6.399-10.907,6.498c-6.078,0.101-11.045-2.657-11.107-6.153C302.388,361.854,307.269,358.946,313.352,358.852z"/>
|
||||
<path fill="#483218" d="M397.109,309.378c15.699-3.759,26.445-18.402,20.099-27.063c-38.74,19.354-75.295,11.369-85.531,9.147
|
||||
C368.014,309.492,371.117,315.595,397.109,309.378z"/>
|
||||
<path fill="#B4B4B4" d="M310.92,73.714c-38.372,0-93.118,22.758-117.549,74.944c-6.089,12.999-6.656,32.87,0.638,45.014
|
||||
c0,0,18.604-81.43,108.231-86.494"/>
|
||||
</svg>
|
After Width: | Height: | Size: 23 KiB |
BIN
data/images/arrow-down-double.png
Normal file
After Width: | Height: | Size: 691 B |
BIN
data/images/arrow-right-double.png
Normal file
After Width: | Height: | Size: 666 B |
BIN
data/images/arrow-up-double.png
Normal file
After Width: | Height: | Size: 650 B |
BIN
data/images/back.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
data/images/cover-shadow.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
data/images/echonest_logo.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
data/images/forward.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
data/images/home.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
data/images/list-add.png
Normal file
After Width: | Height: | Size: 564 B |
BIN
data/images/list-remove.png
Normal file
After Width: | Height: | Size: 332 B |
BIN
data/images/loading-animation.gif
Normal file
After Width: | Height: | Size: 7.3 KiB |
BIN
data/images/music-icon.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 519 B After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 324 B After Width: | Height: | Size: 3.6 KiB |
BIN
data/images/view-refresh.png
Normal file
After Width: | Height: | Size: 931 B |
64
data/www/auth.html
Normal file
@@ -0,0 +1,64 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Allow Tomahawk Access</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font: normal 12px 'Verdana', sans-serif;
|
||||
}
|
||||
a img,
|
||||
img {
|
||||
border: 0;
|
||||
}
|
||||
a {
|
||||
color: #598d0c;
|
||||
}
|
||||
a#head {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 68px;
|
||||
background: #cbdab1;
|
||||
}
|
||||
div#content {
|
||||
margin: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
div#content p {
|
||||
margin: 0 0 25px 0;
|
||||
}
|
||||
input.button {
|
||||
border: 1px solid #999;
|
||||
padding: 4px 10px;
|
||||
border-color: #999 #555 #555 #999;
|
||||
background: #ddd;
|
||||
}
|
||||
input.confirm {
|
||||
background: #81bd0e;
|
||||
color: #fff;
|
||||
border-color: #6ba318 #426c0b #426c0b #6ba318;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<a href="http://www.playdar.org/" title="Tomahawk - Powered by Playdar" id="head">
|
||||
<img alt="Tomahawk - Powered by Playdar" src="/staticdata/tomahawk_auth_logo.png" width="196" height="45"/>
|
||||
</a>
|
||||
|
||||
<div id="content">
|
||||
<form method="post" action="/auth_2/" id="auth">
|
||||
<p>Allow access to Tomahawk from <a href="<%WEBSITE%>"><%NAME%></a></p>
|
||||
<p class="buttons">
|
||||
<input type="button" value="Deny" class="button" onclick="window.close();" />
|
||||
<input type="submit" value="Allow" class="confirm button" />
|
||||
</p>
|
||||
<input type="hidden" name="formtoken" value="<%FORMTOKEN%>" />
|
||||
<input type="hidden" name="receiverurl" value="<%URL%>" />
|
||||
<input type="hidden" name="website" value="<%WEBSITE%>" />
|
||||
<input type="hidden" name="name" value="<%NAME%>" />
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
44
data/www/auth.na.html
Normal file
@@ -0,0 +1,44 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Allow Tomahawk Access</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font: normal 12px 'Verdana', sans-serif;
|
||||
}
|
||||
a img,
|
||||
img {
|
||||
border: 0;
|
||||
}
|
||||
a {
|
||||
color: #598d0c;
|
||||
}
|
||||
a#head {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 68px;
|
||||
background: #cbdab1;
|
||||
}
|
||||
div#content {
|
||||
margin: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
div#content p {
|
||||
margin: 0 0 25px 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<a href="http://www.gettomahawk.com/" title="Tomahawk - Powered by Playdar" id="head">
|
||||
<img alt="Tomahawk - Powered by Playdar" src="/staticdata/tomahawk_auth_logo.png" width="196" height="45"/>
|
||||
</a>
|
||||
|
||||
<div id="content">
|
||||
<p>You have allowed access to Tomahawk from <a href="<%WEBSITE%>"><%NAME%></a></p>
|
||||
<p>Copy and paste this authentication <strong>token</strong> into the status bar then close this window.</p>
|
||||
<p>Token: <input type="text" value="<%AUTHCODE%>" size="35" onclick="this.focus(); this.select();" />
|
||||
</body>
|
||||
</html>
|
BIN
data/www/playdar_auth_logo.gif
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
data/www/tomahawk_banner_small.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
@@ -1,64 +0,0 @@
|
||||
#ifndef TOMAHAWKALBUM_H
|
||||
#define TOMAHAWKALBUM_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QSharedPointer>
|
||||
|
||||
#include "tomahawk/typedefs.h"
|
||||
#include "tomahawk/artist.h"
|
||||
#include "tomahawk/collection.h"
|
||||
|
||||
#include "tomahawk/playlistinterface.h"
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
class Album : public QObject, public PlaylistInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static album_ptr get( unsigned int id, const QString& name, const Tomahawk::artist_ptr& artist, const Tomahawk::collection_ptr& collection );
|
||||
|
||||
Album( unsigned int id, const QString& name, const Tomahawk::artist_ptr& artist, const Tomahawk::collection_ptr& collection );
|
||||
|
||||
unsigned int id() const { return m_id; }
|
||||
QString name() const { return m_name; }
|
||||
artist_ptr artist() const { return m_artist; }
|
||||
|
||||
Tomahawk::collection_ptr collection() const { return m_collection; }
|
||||
QList<Tomahawk::query_ptr> tracks();
|
||||
|
||||
virtual int trackCount() const { return m_queries.count(); }
|
||||
virtual Tomahawk::result_ptr siblingItem( int itemsAway );
|
||||
|
||||
virtual PlaylistInterface::RepeatMode repeatMode() const { return PlaylistInterface::NoRepeat; }
|
||||
virtual bool shuffled() const { return false; }
|
||||
|
||||
virtual void setRepeatMode( PlaylistInterface::RepeatMode ) {}
|
||||
virtual void setShuffled( bool ) {}
|
||||
|
||||
signals:
|
||||
void repeatModeChanged( PlaylistInterface::RepeatMode mode );
|
||||
void shuffleModeChanged( bool enabled );
|
||||
|
||||
void tracksAdded( const QList<Tomahawk::query_ptr>& tracks, const Tomahawk::collection_ptr& );
|
||||
void trackCountChanged( unsigned int tracks );
|
||||
|
||||
private slots:
|
||||
void onTracksAdded( const QList<Tomahawk::query_ptr>& tracks, const Tomahawk::collection_ptr& collection );
|
||||
|
||||
private:
|
||||
unsigned int m_id;
|
||||
QString m_name;
|
||||
|
||||
artist_ptr m_artist;
|
||||
QList<Tomahawk::query_ptr> m_queries;
|
||||
Tomahawk::collection_ptr m_collection;
|
||||
|
||||
unsigned int m_currentTrack;
|
||||
};
|
||||
|
||||
}; // ns
|
||||
|
||||
#endif
|
@@ -1,27 +0,0 @@
|
||||
#ifndef TOMAHAWKARTIST_H
|
||||
#define TOMAHAWKARTIST_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QSharedPointer>
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
class Artist : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Artist( const QString& name )
|
||||
: m_name( name )
|
||||
{};
|
||||
|
||||
QString name() const { return m_name; }
|
||||
|
||||
private:
|
||||
QString m_name;
|
||||
};
|
||||
|
||||
}; // ns
|
||||
|
||||
#endif
|
@@ -1,79 +0,0 @@
|
||||
/*
|
||||
The collection - acts as container for someones music library
|
||||
load() -> async populate by calling addArtists etc,
|
||||
then finishedLoading() is emitted.
|
||||
then use artists() etc to get the data.
|
||||
*/
|
||||
|
||||
#ifndef TOMAHAWK_COLLECTION_H
|
||||
#define TOMAHAWK_COLLECTION_H
|
||||
|
||||
#include <QHash>
|
||||
#include <QList>
|
||||
#include <QSharedPointer>
|
||||
#include <QDebug>
|
||||
|
||||
#include "tomahawk/functimeout.h"
|
||||
#include "tomahawk/playlist.h"
|
||||
#include "tomahawk/source.h"
|
||||
#include "tomahawk/typedefs.h"
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
class Collection : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Collection( const source_ptr& source, const QString& name, QObject* parent = 0 );
|
||||
virtual ~Collection();
|
||||
|
||||
virtual QString name() const;
|
||||
|
||||
virtual void loadPlaylists() { qDebug() << Q_FUNC_INFO; }
|
||||
virtual void loadTracks() { qDebug() << Q_FUNC_INFO; }
|
||||
|
||||
virtual Tomahawk::playlist_ptr playlist( const QString& guid );
|
||||
virtual void addPlaylist( const Tomahawk::playlist_ptr& p );
|
||||
virtual void deletePlaylist( const Tomahawk::playlist_ptr& p );
|
||||
|
||||
virtual QList< Tomahawk::playlist_ptr > playlists() { return m_playlists; }
|
||||
virtual QList< Tomahawk::query_ptr > tracks() { return m_tracks; }
|
||||
|
||||
const source_ptr& source() const { return m_source; }
|
||||
unsigned int lastmodified() const { return m_lastmodified; }
|
||||
|
||||
signals:
|
||||
void tracksAdded( const QList<Tomahawk::query_ptr>& tracks, const Tomahawk::collection_ptr& );
|
||||
void tracksRemoved( const QList<QVariant>&, const Tomahawk::collection_ptr& );
|
||||
void tracksFinished( const Tomahawk::collection_ptr& );
|
||||
|
||||
void playlistsAdded( const QList<Tomahawk::playlist_ptr>& );
|
||||
void playlistsDeleted( const QList<Tomahawk::playlist_ptr>& );
|
||||
|
||||
public slots:
|
||||
virtual void addTracks( const QList<QVariant> &newitems ) = 0;
|
||||
virtual void removeTracks( const QList<QVariant> &olditems ) = 0;
|
||||
|
||||
void setPlaylists( const QList<Tomahawk::playlist_ptr>& plists );
|
||||
void setTracks( const QList<Tomahawk::query_ptr>& tracks, Tomahawk::collection_ptr collection );
|
||||
|
||||
protected:
|
||||
QString m_name;
|
||||
unsigned int m_lastmodified; // unix time of last change to collection
|
||||
|
||||
private:
|
||||
source_ptr m_source;
|
||||
QList< Tomahawk::playlist_ptr > m_playlists;
|
||||
QList< Tomahawk::query_ptr > m_tracks;
|
||||
};
|
||||
|
||||
}; // ns
|
||||
|
||||
inline uint qHash( const QSharedPointer<Tomahawk::Collection>& key )
|
||||
{
|
||||
return qHash( (void *)key.data() );
|
||||
}
|
||||
|
||||
#endif // TOMAHAWK_COLLECTION_H
|
@@ -1,51 +0,0 @@
|
||||
#ifndef FUNCTIMEOUT_H
|
||||
#define FUNCTIMEOUT_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QTimer>
|
||||
#include <QDebug>
|
||||
|
||||
#include "boost/function.hpp"
|
||||
#include "boost/bind.hpp"
|
||||
|
||||
/*
|
||||
I want to do:
|
||||
QTimer::singleShot(1000, this, SLOT(doSomething(x)));
|
||||
instead, I'm doing:
|
||||
new FuncTimeout(1000, boost::bind(&MyClass::doSomething, this, x));
|
||||
|
||||
*/
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
class FuncTimeout : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FuncTimeout( int ms, boost::function<void()> func )
|
||||
: m_func( func )
|
||||
{
|
||||
//qDebug() << Q_FUNC_INFO;
|
||||
QTimer::singleShot( ms, this, SLOT(exec() ) );
|
||||
};
|
||||
|
||||
~FuncTimeout()
|
||||
{
|
||||
//qDebug() << Q_FUNC_INFO;
|
||||
};
|
||||
|
||||
public slots:
|
||||
void exec()
|
||||
{
|
||||
m_func();
|
||||
this->deleteLater();
|
||||
};
|
||||
|
||||
private:
|
||||
boost::function<void()> m_func;
|
||||
};
|
||||
|
||||
}; // ns
|
||||
|
||||
#endif // FUNCTIMEOUT_H
|
@@ -1,19 +1,39 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2011, 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 TOMAHAWK_INFOSYSTEM_H
|
||||
#define TOMAHAWK_INFOSYSTEM_H
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QtDebug>
|
||||
#include <QtCore/qmap.h>
|
||||
#include <QtCore/qsharedpointer.h>
|
||||
#include <QtCore/qset.h>
|
||||
#include <QtCore/qlinkedlist.h>
|
||||
#include <QtCore/qvariant.h>
|
||||
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QWeakPointer>
|
||||
#include <QtCore/QSet>
|
||||
#include <QtCore/QLinkedList>
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtCore/QThread>
|
||||
|
||||
namespace Tomahawk {
|
||||
|
||||
namespace InfoSystem {
|
||||
|
||||
class InfoSystemCache;
|
||||
|
||||
enum InfoType {
|
||||
InfoTrackID,
|
||||
InfoTrackArtist,
|
||||
@@ -60,37 +80,42 @@ enum InfoType {
|
||||
InfoAlbumDate,
|
||||
InfoAlbumGenre,
|
||||
InfoAlbumComposer,
|
||||
InfoAlbumCoverArt,
|
||||
|
||||
InfoMiscTopHotttness,
|
||||
InfoMiscTopTerms,
|
||||
|
||||
InfoMiscSubmitNowPlaying,
|
||||
InfoMiscSubmitScrobble,
|
||||
|
||||
InfoNoInfo
|
||||
};
|
||||
|
||||
typedef QMap< InfoType, QVariant > InfoMap;
|
||||
typedef QMap< QString, QMap< QString, QString > > InfoGenericMap;
|
||||
typedef QHash<QString, QVariant> InfoCustomDataHash;
|
||||
typedef QHash<QString, QString> MusixMatchHash;
|
||||
typedef QHash< QString, QVariant > InfoCustomDataHash;
|
||||
|
||||
class InfoPlugin : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
InfoPlugin(QObject *parent)
|
||||
:QObject(parent)
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
}
|
||||
~InfoPlugin()
|
||||
InfoPlugin( QObject *parent );
|
||||
|
||||
virtual ~InfoPlugin()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
}
|
||||
|
||||
virtual void getInfo(const QString &caller, const InfoType type, const QVariant &data, Tomahawk::InfoSystem::InfoCustomDataHash customData) = 0;
|
||||
virtual void getInfo( const QString &caller, const InfoType type, const QVariant &data, Tomahawk::InfoSystem::InfoCustomDataHash customData ) = 0;
|
||||
|
||||
signals:
|
||||
void info(QString caller, Tomahawk::InfoSystem::InfoType type, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomDataHash customData);
|
||||
void finished(QString, Tomahawk::InfoSystem::InfoType);
|
||||
void info( QString caller, Tomahawk::InfoSystem::InfoType type, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomDataHash customData );
|
||||
void getCachedInfo( QHash< QString, QString > criteria, QString caller, Tomahawk::InfoSystem::InfoType type, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomDataHash customData );
|
||||
void finished( QString, Tomahawk::InfoSystem::InfoType );
|
||||
|
||||
//public slots:
|
||||
//void notInCacheSlot( QString caller, Tomahawk::InfoSystem::InfoType type, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomDataHash customData ) = 0;
|
||||
|
||||
protected:
|
||||
InfoType m_type;
|
||||
@@ -103,46 +128,44 @@ class InfoSystem : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
InfoSystem( QObject *parent );
|
||||
~InfoSystem();
|
||||
|
||||
void registerInfoTypes( const InfoPluginPtr &plugin, const QSet< InfoType > &types );
|
||||
|
||||
InfoSystem(QObject *parent);
|
||||
~InfoSystem()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
}
|
||||
void getInfo( const QString &caller, const InfoType type, const QVariant &data, InfoCustomDataHash customData );
|
||||
void getInfo( const QString &caller, const InfoMap &input, InfoCustomDataHash customData );
|
||||
|
||||
void registerInfoTypes(const InfoPluginPtr &plugin, const QSet< InfoType > &types);
|
||||
|
||||
void getInfo(const QString &caller, const InfoType type, const QVariant &data, InfoCustomDataHash customData);
|
||||
void getInfo(const QString &caller, const InfoMap &input, InfoCustomDataHash customData);
|
||||
InfoSystemCache* getCache() { return m_cache; }
|
||||
|
||||
signals:
|
||||
void info(QString caller, Tomahawk::InfoSystem::InfoType, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomDataHash customData);
|
||||
void finished(QString target);
|
||||
void info( QString caller, Tomahawk::InfoSystem::InfoType, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomDataHash customData );
|
||||
void finished( QString target );
|
||||
|
||||
public slots:
|
||||
void infoSlot(QString target, Tomahawk::InfoSystem::InfoType type, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomDataHash customData);
|
||||
void finishedSlot(QString target,Tomahawk::InfoSystem::InfoType type);
|
||||
void infoSlot( QString target, Tomahawk::InfoSystem::InfoType type, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomDataHash customData );
|
||||
void finishedSlot( QString target,Tomahawk::InfoSystem::InfoType type);
|
||||
|
||||
private:
|
||||
|
||||
QLinkedList< InfoPluginPtr > determineOrderedMatches(const InfoType type) const;
|
||||
QLinkedList< InfoPluginPtr > determineOrderedMatches( const InfoType type ) const;
|
||||
|
||||
QMap< InfoType, QLinkedList<InfoPluginPtr> > m_infoMap;
|
||||
QMap< InfoType, QLinkedList< InfoPluginPtr > > m_infoMap;
|
||||
|
||||
// For now, statically instantiate plugins; this is just somewhere to keep them
|
||||
QLinkedList<InfoPluginPtr> m_plugins;
|
||||
QLinkedList< InfoPluginPtr > m_plugins;
|
||||
|
||||
QHash< QString, QHash< Tomahawk::InfoSystem::InfoType, int > > m_dataTracker;
|
||||
|
||||
InfoSystemCache* m_cache;
|
||||
QThread* m_infoSystemCacheThreadController;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(Tomahawk::InfoSystem::InfoGenericMap)
|
||||
Q_DECLARE_METATYPE(Tomahawk::InfoSystem::InfoCustomDataHash);
|
||||
Q_DECLARE_METATYPE(Tomahawk::InfoSystem::MusixMatchHash)
|
||||
Q_DECLARE_METATYPE( Tomahawk::InfoSystem::InfoGenericMap )
|
||||
Q_DECLARE_METATYPE( Tomahawk::InfoSystem::InfoCustomDataHash );
|
||||
|
||||
#endif // TOMAHAWK_INFOSYSTEM_H
|
||||
|
@@ -1,70 +0,0 @@
|
||||
#ifndef PIPELINE_H
|
||||
#define PIPELINE_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QMutex>
|
||||
|
||||
#include "tomahawk/typedefs.h"
|
||||
#include "tomahawk/query.h"
|
||||
#include "tomahawk/result.h"
|
||||
#include "tomahawk/resolver.h"
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
class Resolver;
|
||||
|
||||
class Pipeline : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Pipeline( QObject* parent = 0 );
|
||||
|
||||
// const query_ptr& query( QID qid ) const;
|
||||
// result_ptr result( RID rid ) const;
|
||||
|
||||
void reportResults( QID qid, const QList< result_ptr >& results );
|
||||
|
||||
/// sorter to rank resolver priority
|
||||
static bool resolverSorter( const Resolver* left, const Resolver* right );
|
||||
|
||||
void addResolver( Resolver* r, bool sort = true );
|
||||
void removeResolver( Resolver* r );
|
||||
|
||||
query_ptr query( const QID& qid ) const
|
||||
{
|
||||
return m_qids.value( qid );
|
||||
}
|
||||
|
||||
result_ptr result( const RID& rid ) const
|
||||
{
|
||||
return m_rids.value( rid );
|
||||
}
|
||||
|
||||
public slots:
|
||||
void add( const query_ptr& q );
|
||||
void add( const QList<query_ptr>& qlist );
|
||||
void databaseReady();
|
||||
|
||||
private slots:
|
||||
void shunt( const query_ptr& q );
|
||||
void indexReady();
|
||||
|
||||
private:
|
||||
QList< Resolver* > m_resolvers;
|
||||
QMap< QID, query_ptr > m_qids;
|
||||
QMap< RID, result_ptr > m_rids;
|
||||
|
||||
QMutex m_mut; // for m_qids, m_rids
|
||||
|
||||
// store queries here until DB index is loaded, then shunt them all
|
||||
QList< query_ptr > m_queries_pending;
|
||||
bool m_index_ready;
|
||||
};
|
||||
|
||||
}; //ns
|
||||
|
||||
#endif // PIPELINE_H
|
@@ -1,35 +0,0 @@
|
||||
#ifndef PLAYLISTINTERFACE_H
|
||||
#define PLAYLISTINTERFACE_H
|
||||
|
||||
#include <QModelIndex>
|
||||
|
||||
#include "tomahawk/typedefs.h"
|
||||
|
||||
class PlaylistInterface
|
||||
{
|
||||
public:
|
||||
enum RepeatMode { NoRepeat, RepeatOne, RepeatAll };
|
||||
|
||||
PlaylistInterface() {}
|
||||
virtual ~PlaylistInterface() {}
|
||||
|
||||
virtual int trackCount() const = 0;
|
||||
|
||||
virtual Tomahawk::result_ptr previousItem() { return siblingItem( -1 ); }
|
||||
virtual Tomahawk::result_ptr nextItem() { return siblingItem( 1 ); }
|
||||
virtual Tomahawk::result_ptr siblingItem( int itemsAway ) = 0;
|
||||
|
||||
virtual PlaylistInterface::RepeatMode repeatMode() const = 0;
|
||||
virtual bool shuffled() const = 0;
|
||||
|
||||
public slots:
|
||||
virtual void setRepeatMode( RepeatMode mode ) = 0;
|
||||
virtual void setShuffled( bool enabled ) = 0;
|
||||
|
||||
signals:
|
||||
virtual void repeatModeChanged( PlaylistInterface::RepeatMode mode ) = 0;
|
||||
virtual void shuffleModeChanged( bool enabled ) = 0;
|
||||
virtual void trackCountChanged( unsigned int tracks ) = 0;
|
||||
};
|
||||
|
||||
#endif // PLAYLISTINTERFACE_H
|
@@ -1,3 +1,21 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2011, 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 PLUGIN_INCLUDES_H
|
||||
#define PLUGIN_INCLUDES_H
|
||||
|
||||
|
@@ -1,47 +0,0 @@
|
||||
#ifndef PLUGINAPI_H
|
||||
#define PLUGINAPI_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QSharedPointer>
|
||||
|
||||
#include "tomahawk/collection.h"
|
||||
#include "tomahawk/source.h"
|
||||
|
||||
/*
|
||||
This is the only API plugins have access to.
|
||||
This class must proxy calls to internal functions, because plugins can't
|
||||
get a pointer to any old object and start calling methods on it.
|
||||
*/
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
class Resolver;
|
||||
class Pipeline;
|
||||
|
||||
class PluginAPI : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit PluginAPI( Pipeline * p );
|
||||
|
||||
/// call every time new results are available for a running query
|
||||
// void reportResults( const QString& qid, const QList<QVariantMap>& results );
|
||||
|
||||
/// add/remove sources (which have collections)
|
||||
void addSource( source_ptr s );
|
||||
void removeSource( source_ptr s );
|
||||
|
||||
/// register object capable of searching
|
||||
void addResolver( Resolver * r );
|
||||
|
||||
Pipeline * pipeline() const { return m_pipeline; }
|
||||
|
||||
private:
|
||||
Pipeline * m_pipeline;
|
||||
};
|
||||
|
||||
|
||||
}; //ns
|
||||
|
||||
#endif // PLUGINAPI_H
|
@@ -1,80 +0,0 @@
|
||||
#ifndef QUERY_H
|
||||
#define QUERY_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QMutex>
|
||||
#include <QList>
|
||||
#include <QVariant>
|
||||
|
||||
#include "tomahawk/collection.h"
|
||||
#include "tomahawk/result.h"
|
||||
#include "tomahawk/typedefs.h"
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
class Query : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Query( const QVariant& v );
|
||||
|
||||
QVariant toVariant() const { return m_v; }
|
||||
|
||||
/// returns list of all results so far
|
||||
QList< result_ptr > results() const;
|
||||
|
||||
/// how many results found so far?
|
||||
unsigned int numResults() const;
|
||||
|
||||
QID id() const;
|
||||
|
||||
/// sorter for list of results
|
||||
static bool resultSorter( const result_ptr &left, const result_ptr& right );
|
||||
|
||||
/// solved=true when a perfect result has been found (score of 1.0)
|
||||
bool solved() const { return m_solved; }
|
||||
|
||||
unsigned int lastPipelineWeight() const { return m_lastpipelineweight; }
|
||||
void setLastPipelineWeight( unsigned int w ) { m_lastpipelineweight = w;}
|
||||
|
||||
/// for debug output:
|
||||
QString toString() const
|
||||
{
|
||||
return QString( "Query(%1, %2 - %3)" ).arg( id() ).arg( artist() ).arg( track() );
|
||||
}
|
||||
|
||||
QString artist() const { return m_artist; }
|
||||
QString album() const { return m_album; }
|
||||
QString track() const { return m_track; }
|
||||
|
||||
signals:
|
||||
void resultsAdded( const QList<Tomahawk::result_ptr>& );
|
||||
void resultsRemoved( const Tomahawk::result_ptr& );
|
||||
void solvedStateChanged( bool state );
|
||||
|
||||
public slots:
|
||||
/// (indirectly) called by resolver plugins when results are found
|
||||
void addResults( const QList< Tomahawk::result_ptr >& );
|
||||
void removeResult( const Tomahawk::result_ptr& );
|
||||
|
||||
private slots:
|
||||
void resultUnavailable();
|
||||
|
||||
private:
|
||||
mutable QMutex m_mut;
|
||||
mutable QVariant m_v;
|
||||
QList< Tomahawk::result_ptr > m_results;
|
||||
bool m_solved;
|
||||
mutable QID m_qid;
|
||||
unsigned int m_lastpipelineweight;
|
||||
|
||||
QString m_artist;
|
||||
QString m_album;
|
||||
QString m_track;
|
||||
};
|
||||
|
||||
}; //ns
|
||||
|
||||
#endif // QUERY_H
|
@@ -1,44 +0,0 @@
|
||||
#ifndef RESOLVER_H
|
||||
#define RESOLVER_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include "tomahawk/pluginapi.h"
|
||||
|
||||
// implement this if you can resolve queries to content
|
||||
|
||||
/*
|
||||
Weight: 1-100, 100 being the best
|
||||
Timeout: some millisecond value, after which we try the next highest
|
||||
weighted resolver
|
||||
|
||||
*/
|
||||
namespace Tomahawk
|
||||
{
|
||||
class PluginAPI;
|
||||
|
||||
class Resolver : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Resolver() {};
|
||||
|
||||
virtual QString name() const = 0;
|
||||
virtual unsigned int weight() const = 0;
|
||||
virtual unsigned int preference() const { return 100; };
|
||||
virtual unsigned int timeout() const = 0;
|
||||
virtual void resolve( const QVariant& ) = 0;
|
||||
|
||||
//virtual QWidget * configUI() { return 0; };
|
||||
//etc
|
||||
|
||||
PluginAPI * api() const { return m_api; }
|
||||
|
||||
private:
|
||||
PluginAPI * m_api;
|
||||
};
|
||||
|
||||
}; //ns
|
||||
|
||||
#endif // RESOLVER_H
|
@@ -1,69 +0,0 @@
|
||||
#ifndef RESULT_H
|
||||
#define RESULT_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include "tomahawk/typedefs.h"
|
||||
#include "collection.h"
|
||||
#include "artist.h"
|
||||
#include "album.h"
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
class Result : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Result( const QVariant& v, const collection_ptr& collection );
|
||||
QVariant toVariant() const { return m_v; }
|
||||
|
||||
float score() const;
|
||||
RID id() const;
|
||||
collection_ptr collection() const { return m_collection; }
|
||||
|
||||
Tomahawk::artist_ptr artist() const { return m_artist; }
|
||||
Tomahawk::album_ptr album() const { return m_album; }
|
||||
QString track() const { return m_track; }
|
||||
QString url() const { return m_url; }
|
||||
QString mimetype() const { return m_mimetype; }
|
||||
|
||||
unsigned int duration() const { return m_duration; }
|
||||
unsigned int bitrate() const { return m_bitrate; }
|
||||
unsigned int size() const { return m_size; }
|
||||
unsigned int albumpos() const { return m_albumpos; }
|
||||
unsigned int modificationTime() const { return m_modtime; }
|
||||
|
||||
unsigned int dbid() const { return m_id; }
|
||||
|
||||
// for debug output:
|
||||
QString toString() const;
|
||||
|
||||
signals:
|
||||
// emitted when the collection this result comes from is going offline:
|
||||
void becomingUnavailable();
|
||||
|
||||
private:
|
||||
QVariant m_v;
|
||||
mutable RID m_rid;
|
||||
collection_ptr m_collection;
|
||||
|
||||
Tomahawk::artist_ptr m_artist;
|
||||
Tomahawk::album_ptr m_album;
|
||||
QString m_track;
|
||||
QString m_url;
|
||||
QString m_mimetype;
|
||||
|
||||
unsigned int m_duration;
|
||||
unsigned int m_bitrate;
|
||||
unsigned int m_size;
|
||||
unsigned int m_albumpos;
|
||||
unsigned int m_modtime;
|
||||
|
||||
unsigned int m_id;
|
||||
};
|
||||
|
||||
}; //ns
|
||||
|
||||
#endif // RESULT_H
|
@@ -1,80 +0,0 @@
|
||||
#ifndef SOURCE_H
|
||||
#define SOURCE_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QSharedPointer>
|
||||
#include <QVariantMap>
|
||||
|
||||
#include "dbsyncconnection.h"
|
||||
#include "collection.h"
|
||||
#include "typedefs.h"
|
||||
|
||||
class ControlConnection;
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
class Source : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Source( const QString& username, ControlConnection* cc );
|
||||
explicit Source( const QString& username );
|
||||
virtual ~Source();
|
||||
|
||||
bool isLocal() const { return m_isLocal; }
|
||||
bool isOnline() const { return m_online; }
|
||||
|
||||
const QString& userName() const { return m_username; }
|
||||
QString friendlyName() const;
|
||||
void setFriendlyName( const QString& fname ) { m_friendlyname = fname; }
|
||||
|
||||
collection_ptr collection() const;
|
||||
void addCollection( QSharedPointer<Collection> c );
|
||||
void removeCollection( QSharedPointer<Collection> c );
|
||||
|
||||
unsigned int id() const { return m_id; }
|
||||
ControlConnection* controlConnection() const { return m_cc; }
|
||||
|
||||
void scanningProgress( unsigned int files ) { emit loadingStateChanged( DBSyncConnection::SCANNING, DBSyncConnection::UNKNOWN, QString::number( files ) ); }
|
||||
|
||||
signals:
|
||||
void syncedWithDatabase();
|
||||
void online();
|
||||
void offline();
|
||||
|
||||
void collectionAdded( QSharedPointer<Collection> );
|
||||
void collectionRemoved( QSharedPointer<Collection> );
|
||||
|
||||
void stats( const QVariantMap& );
|
||||
void usernameChanged( const QString& );
|
||||
|
||||
// this signal is emitted from DBSyncConnection:
|
||||
void loadingStateChanged( DBSyncConnection::State newstate, DBSyncConnection::State oldstate, const QString& info );
|
||||
|
||||
public slots:
|
||||
void doDBSync();
|
||||
void setStats( const QVariantMap& m );
|
||||
|
||||
protected:
|
||||
void setOffline();
|
||||
void setOnline();
|
||||
|
||||
private slots:
|
||||
void dbLoaded( unsigned int id, const QString& fname );
|
||||
void remove();
|
||||
|
||||
private:
|
||||
bool m_isLocal;
|
||||
bool m_online;
|
||||
QString m_username, m_friendlyname;
|
||||
unsigned int m_id;
|
||||
QList< QSharedPointer<Collection> > m_collections;
|
||||
ControlConnection* m_cc;
|
||||
QVariantMap m_stats;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
#endif // SOURCE_H
|
@@ -1,40 +0,0 @@
|
||||
#ifndef SOURCELIST_H
|
||||
#define SOURCELIST_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QMutex>
|
||||
#include <QMap>
|
||||
|
||||
#include "tomahawk/source.h"
|
||||
#include "tomahawk/typedefs.h"
|
||||
|
||||
class SourceList : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SourceList( QObject* parent = 0 );
|
||||
|
||||
const Tomahawk::source_ptr& getLocal();
|
||||
void add( const Tomahawk::source_ptr& s );
|
||||
void remove( const Tomahawk::source_ptr& s );
|
||||
void remove( Tomahawk::Source* s );
|
||||
|
||||
QList<Tomahawk::source_ptr> sources() const;
|
||||
Tomahawk::source_ptr lookup( const QString& username ) const;
|
||||
Tomahawk::source_ptr lookup( unsigned int id ) const;
|
||||
unsigned int count() const;
|
||||
|
||||
signals:
|
||||
void sourceAdded( const Tomahawk::source_ptr& );
|
||||
void sourceRemoved( const Tomahawk::source_ptr& );
|
||||
|
||||
private:
|
||||
QMap<QString, Tomahawk::source_ptr > m_sources;
|
||||
QMap<unsigned int, QString> m_sources_id2name;
|
||||
|
||||
Tomahawk::source_ptr m_local;
|
||||
mutable QMutex m_mut; // mutable so const methods can use a lock
|
||||
};
|
||||
|
||||
#endif // SOURCELIST_H
|
@@ -1,63 +1,75 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2011, 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 TOMAHAWKAPP_H
|
||||
#define TOMAHAWKAPP_H
|
||||
|
||||
#define APP TomahawkApp::instance()
|
||||
|
||||
#define RESPATH ":/data/"
|
||||
|
||||
#include "headlesscheck.h"
|
||||
#include "config.h"
|
||||
|
||||
#include "mac/tomahawkapp_mac.h" // for PlatforInterface
|
||||
|
||||
#include <QRegExp>
|
||||
#include <QFile>
|
||||
#include <QSettings>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QDir>
|
||||
|
||||
#include "QxtHttpServerConnector"
|
||||
#include "QxtHttpSessionManager"
|
||||
|
||||
#include "tomahawk/functimeout.h"
|
||||
#include "tomahawk/typedefs.h"
|
||||
#include "tomahawk/tomahawkplugin.h"
|
||||
#include "tomahawk/playlist.h"
|
||||
#include "tomahawk/pipeline.h"
|
||||
#include "typedefs.h"
|
||||
#include "playlist.h"
|
||||
#include "resolver.h"
|
||||
#include "network/servent.h"
|
||||
|
||||
#include "utils/tomahawkutils.h"
|
||||
|
||||
#include "sourcelist.h"
|
||||
#include "servent.h"
|
||||
|
||||
class AudioEngine;
|
||||
class Database;
|
||||
class Jabber;
|
||||
class XMPPBot;
|
||||
class TomahawkZeroconf;
|
||||
class SipHandler;
|
||||
class TomahawkSettings;
|
||||
class XMPPBot;
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
class ShortcutHandler;
|
||||
namespace InfoSystem
|
||||
{
|
||||
class InfoSystem;
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef NO_LIBLASTFM
|
||||
#ifdef LIBLASTFM_FOUND
|
||||
#include <lastfm/NetworkAccessManager>
|
||||
#include "scrobbler.h"
|
||||
#endif
|
||||
|
||||
#ifndef TOMAHAWK_HEADLESS
|
||||
class TomahawkWindow;
|
||||
class PlaylistManager;
|
||||
#include <QStackedWidget>
|
||||
#endif
|
||||
|
||||
|
||||
// this also acts as a a container for important top-level objects
|
||||
// that other parts of the app need to find
|
||||
// (eg, library, pipeline, friends list)
|
||||
class TomahawkApp : public TOMAHAWK_APPLICATION
|
||||
class TomahawkApp : public TOMAHAWK_APPLICATION, public Tomahawk::PlatformInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -67,45 +79,28 @@ public:
|
||||
|
||||
static TomahawkApp* instance();
|
||||
|
||||
Tomahawk::Pipeline* pipeline() { return &m_pipeline; }
|
||||
AudioEngine* audioEngine() { return m_audioEngine; }
|
||||
Database* database() { return m_db; }
|
||||
SourceList& sourcelist() { return m_sources; }
|
||||
Servent& servent() { return m_servent; }
|
||||
QNetworkAccessManager* nam() { return m_nam; }
|
||||
QNetworkProxy* proxy() { return m_proxy; }
|
||||
SipHandler* sipHandler() { return m_sipHandler; }
|
||||
Tomahawk::InfoSystem::InfoSystem* infoSystem() { return m_infoSystem; }
|
||||
XMPPBot* xmppBot() { return m_xmppBot; }
|
||||
const QString& nodeID() const;
|
||||
|
||||
|
||||
#ifndef TOMAHAWK_HEADLESS
|
||||
AudioControls* audioControls();
|
||||
PlaylistManager* playlistManager();
|
||||
TomahawkWindow* mainWindow() const { return m_mainwindow; }
|
||||
#endif
|
||||
|
||||
void registerIODeviceFactory( const QString &proto, boost::function<QSharedPointer<QIODevice>(Tomahawk::result_ptr)> fac );
|
||||
QSharedPointer<QIODevice> localFileIODeviceFactory( const Tomahawk::result_ptr& result );
|
||||
QSharedPointer<QIODevice> httpIODeviceFactory( const Tomahawk::result_ptr& result );
|
||||
void addScriptResolver( const QString& scriptPath );
|
||||
void removeScriptResolver( const QString& scriptPath );
|
||||
|
||||
TomahawkSettings* settings() { return m_settings; }
|
||||
// PlatformInterface
|
||||
virtual void activate();
|
||||
virtual bool loadUrl( const QString& url );
|
||||
|
||||
signals:
|
||||
void settingsChanged();
|
||||
// because QApplication::arguments() is expensive
|
||||
bool scrubFriendlyName() const { return m_scrubFriendlyName; }
|
||||
|
||||
public slots:
|
||||
QSharedPointer<QIODevice> getIODeviceForUrl( const Tomahawk::result_ptr& result );
|
||||
void reconnectJabber();
|
||||
|
||||
private slots:
|
||||
void jabberMessage( const QString&, const QString& );
|
||||
void jabberPeerOffline( const QString& );
|
||||
void jabberPeerOnline( const QString& );
|
||||
void jabberAuthError( int code, const QString& msg );
|
||||
void jabberDisconnected();
|
||||
void jabberConnected();
|
||||
|
||||
void lanHostFound( const QString&, int, const QString&, const QString& );
|
||||
void setupSIP();
|
||||
void messageReceived( const QString& );
|
||||
|
||||
private:
|
||||
void initLocalCollection();
|
||||
@@ -113,23 +108,21 @@ private:
|
||||
void registerMetaTypes();
|
||||
void startServent();
|
||||
void setupDatabase();
|
||||
void setupJabber();
|
||||
void setupPipeline();
|
||||
void startHTTP();
|
||||
|
||||
QList<Tomahawk::collection_ptr> m_collections;
|
||||
QList<TomahawkPlugin*> m_plugins;
|
||||
QList<Tomahawk::ExternalResolver*> m_scriptResolvers;
|
||||
|
||||
Tomahawk::Pipeline m_pipeline;
|
||||
Database* m_database;
|
||||
AudioEngine* m_audioEngine;
|
||||
Database* m_db;
|
||||
Servent m_servent;
|
||||
SourceList m_sources;
|
||||
TomahawkZeroconf* m_zeroconf;
|
||||
QSharedPointer<Jabber> m_jabber;
|
||||
SipHandler* m_sipHandler;
|
||||
Servent* m_servent;
|
||||
XMPPBot* m_xmppBot;
|
||||
|
||||
#ifndef NO_LIBLASTFM
|
||||
Tomahawk::ShortcutHandler* m_shortcutHandler;
|
||||
bool m_scrubFriendlyName;
|
||||
|
||||
#ifdef LIBLASTFM_FOUND
|
||||
Scrobbler* m_scrobbler;
|
||||
#endif
|
||||
|
||||
@@ -137,13 +130,7 @@ private:
|
||||
TomahawkWindow* m_mainwindow;
|
||||
#endif
|
||||
|
||||
QMap< QString,boost::function<QSharedPointer<QIODevice>(Tomahawk::result_ptr)> > m_iofactories;
|
||||
|
||||
bool m_headless;
|
||||
TomahawkSettings* m_settings;
|
||||
|
||||
QNetworkAccessManager* m_nam;
|
||||
QNetworkProxy* m_proxy;
|
||||
|
||||
Tomahawk::InfoSystem::InfoSystem* m_infoSystem;
|
||||
|
||||
|
@@ -1,30 +0,0 @@
|
||||
#ifndef TOMAHAWK_PLUGIN_H
|
||||
#define TOMAHAWK_PLUGIN_H
|
||||
#include <QString>
|
||||
#include <QtPlugin>
|
||||
|
||||
#include "tomahawk/pluginapi.h"
|
||||
|
||||
class TomahawkPlugin
|
||||
{
|
||||
public:
|
||||
TomahawkPlugin(){};
|
||||
TomahawkPlugin(Tomahawk::PluginAPI * api)
|
||||
: m_api(api) {};
|
||||
|
||||
virtual TomahawkPlugin * factory(Tomahawk::PluginAPI * api) = 0;
|
||||
|
||||
virtual QString name() const = 0;
|
||||
virtual QString description() const = 0;
|
||||
|
||||
protected:
|
||||
Tomahawk::PluginAPI * api() const { return m_api; };
|
||||
|
||||
private:
|
||||
Tomahawk::PluginAPI * m_api;
|
||||
|
||||
};
|
||||
|
||||
Q_DECLARE_INTERFACE(TomahawkPlugin, "org.tomahawk.TomahawkPlugin/1.0")
|
||||
|
||||
#endif
|
@@ -1,33 +0,0 @@
|
||||
#ifndef TOMAHAWKTRACK_H
|
||||
#define TOMAHAWKTRACK_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QSharedPointer>
|
||||
|
||||
#include "tomahawk/artist.h"
|
||||
#include "tomahawk/typedefs.h"
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
class Track : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Track( Tomahawk::artist_ptr artist, const QString& name )
|
||||
: m_name( name )
|
||||
, m_artist( artist )
|
||||
{}
|
||||
|
||||
const QString& name() const { return m_name; }
|
||||
const artist_ptr artist() const { return m_artist; }
|
||||
|
||||
private:
|
||||
QString m_name;
|
||||
artist_ptr m_artist;
|
||||
};
|
||||
|
||||
}; // ns
|
||||
|
||||
#endif
|
@@ -1,45 +0,0 @@
|
||||
#ifndef TYPEDEFS_H
|
||||
#define TYPEDEFS_H
|
||||
|
||||
#include <QSharedPointer>
|
||||
#include <QUuid>
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
class Artist;
|
||||
class Album;
|
||||
class Collection;
|
||||
class Playlist;
|
||||
class PlaylistEntry;
|
||||
class Query;
|
||||
class Result;
|
||||
class Source;
|
||||
|
||||
typedef QSharedPointer<Collection> collection_ptr;
|
||||
typedef QSharedPointer<Playlist> playlist_ptr;
|
||||
typedef QSharedPointer<PlaylistEntry> plentry_ptr;
|
||||
typedef QSharedPointer<Query> query_ptr;
|
||||
typedef QSharedPointer<Result> result_ptr;
|
||||
typedef QSharedPointer<Source> source_ptr;
|
||||
typedef QSharedPointer<Artist> artist_ptr;
|
||||
typedef QSharedPointer<Album> album_ptr;
|
||||
|
||||
// let's keep these typesafe, they are different kinds of GUID:
|
||||
typedef QString QID; //query id
|
||||
typedef QString RID; //result id
|
||||
|
||||
}; // ns
|
||||
|
||||
typedef int AudioErrorCode;
|
||||
|
||||
// creates 36char ascii guid without {} around it
|
||||
inline static QString uuid()
|
||||
{
|
||||
// kinda lame, but
|
||||
QString q = QUuid::createUuid();
|
||||
q.remove( 0, 1 );
|
||||
q.chop( 1 );
|
||||
return q;
|
||||
}
|
||||
|
||||
#endif // TYPEDEFS_H
|