mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-09-07 04:30:43 +02:00
Compare commits
38 Commits
vlc-meta-r
...
0.8.0rc2
Author | SHA1 | Date | |
---|---|---|---|
|
6b8386db51 | ||
|
1201b5b534 | ||
|
9d6bcfefdf | ||
|
0799a7ddc3 | ||
|
b9f4f7f48a | ||
|
c9291a0d3f | ||
|
40610e2c6e | ||
|
d462499ff7 | ||
|
5a74c40208 | ||
|
0721f91f75 | ||
|
fb18bcbac7 | ||
|
0a8183ee24 | ||
|
aa09ee86be | ||
|
3aaaf872f0 | ||
|
c9dd4418da | ||
|
0701c752d6 | ||
|
4ba370590e | ||
|
200201b572 | ||
|
5797b1c6fa | ||
|
82014f3445 | ||
|
93784abe75 | ||
|
0c37308c9c | ||
|
d1bf26dfd5 | ||
|
f42595ac94 | ||
|
427d559c96 | ||
|
fbbdeb851f | ||
|
6c387045aa | ||
|
771182bc88 | ||
|
d05ce9a932 | ||
|
3e2c344f99 | ||
|
3294565a47 | ||
|
a93663f8db | ||
|
35fa38577c | ||
|
ce8c4df159 | ||
|
79f1354b8b | ||
|
8526aac3f0 | ||
|
fdfbf8c3e4 | ||
|
6369a20c08 |
@@ -20,6 +20,11 @@ SET( TOMAHAWK_ORGANIZATION_NAME "Tomahawk" )
|
||||
SET( TOMAHAWK_ORGANIZATION_DOMAIN "tomahawk-player.org" )
|
||||
SET( TOMAHAWK_APPLICATION_NAME "Tomahawk" )
|
||||
SET( TOMAHAWK_DESCRIPTION_SUMMARY "The social media player" )
|
||||
IF(APPLE)
|
||||
SET( TOMAHAWK_TARGET_NAME "Tomahawk" )
|
||||
ELSE()
|
||||
SET( TOMAHAWK_TARGET_NAME "tomahawk" )
|
||||
ENDIF()
|
||||
|
||||
IF( WIN32 )
|
||||
SET( TOMAHAWK_SYSTEM "Windows" )
|
||||
@@ -34,7 +39,7 @@ ENDIF()
|
||||
SET( TOMAHAWK_VERSION_MAJOR 0 )
|
||||
SET( TOMAHAWK_VERSION_MINOR 8 )
|
||||
SET( TOMAHAWK_VERSION_PATCH 0 )
|
||||
SET( TOMAHAWK_VERSION_RC 1 )
|
||||
SET( TOMAHAWK_VERSION_RC 2 )
|
||||
|
||||
SET( TOMAHAWK_TRANSLATION_LANGUAGES ar bg bn_IN ca cs de en el es fi fr hi_IN hu gl it ja lt pl pt_BR ro ru sv tr zh_CN zh_TW )
|
||||
|
||||
@@ -52,10 +57,17 @@ tomahawk_add_definitions( "-fvisibility=hidden" )
|
||||
tomahawk_add_definitions( "-DQT_STRICT_ITERATORS" )
|
||||
|
||||
# build options
|
||||
option(BUILD_GUI "Build Tomahawk with GUI" ON)
|
||||
option(BUILD_RELEASE "Generate TOMAHAWK_VERSION without GIT info" OFF)
|
||||
option(BUILD_TESTS "Build Tomahawk with unit tests" ON)
|
||||
option(BUILD_HATCHET "Build the Hatchet plugin" OFF)
|
||||
if(BUILD_RELEASE)
|
||||
set(BUILD_NO_RELEASE OFF)
|
||||
else()
|
||||
set(BUILD_NO_RELEASE ON)
|
||||
endif()
|
||||
|
||||
option(BUILD_GUI "Build Tomahawk with GUI" ON)
|
||||
option(BUILD_TESTS "Build Tomahawk with unit tests" ${BUILD_NO_RELEASE})
|
||||
option(BUILD_TOOLS "Build Tomahawk helper tools" ${BUILD_NO_RELEASE})
|
||||
option(BUILD_HATCHET "Build the Hatchet plugin" ON)
|
||||
option(BUILD_WITH_QT4 "Build Tomahawk with Qt4 no matter if Qt5 was found" ON)
|
||||
|
||||
option(WITH_CRASHREPORTER "Build with CrashReporter" ON)
|
||||
@@ -80,27 +92,29 @@ ENDIF()
|
||||
# generate version string
|
||||
|
||||
# base string used in release and unstable builds
|
||||
SET( TOMAHAWK_VERSION ${TOMAHAWK_VERSION_MAJOR}.${TOMAHAWK_VERSION_MINOR}.${TOMAHAWK_VERSION_PATCH} )
|
||||
SET( TOMAHAWK_VERSION_SHORT "${TOMAHAWK_VERSION}" )
|
||||
SET( TOMAHAWK_VERSION_TMP "${TOMAHAWK_VERSION_MAJOR}.${TOMAHAWK_VERSION_MINOR}.${TOMAHAWK_VERSION_PATCH}")
|
||||
SET( TOMAHAWK_VERSION_SHORT "${TOMAHAWK_VERSION_TMP}" )
|
||||
IF( TOMAHAWK_VERSION_RC )
|
||||
SET( TOMAHAWK_VERSION ${TOMAHAWK_VERSION}rc${TOMAHAWK_VERSION_RC} )
|
||||
SET( TOMAHAWK_VERSION "${TOMAHAWK_VERSION_TMP}rc${TOMAHAWK_VERSION_RC}" CACHE STRING "Tomahawk Version")
|
||||
ENDIF()
|
||||
|
||||
|
||||
# additional info for non-release builds
|
||||
IF( NOT BUILD_RELEASE AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git/" )
|
||||
INCLUDE( CMakeDateStamp )
|
||||
SET( TOMAHAWK_VERSION_DATE "${CMAKE_DATESTAMP_YEAR}${CMAKE_DATESTAMP_MONTH}${CMAKE_DATESTAMP_DAY}" )
|
||||
IF( TOMAHAWK_VERSION_DATE GREATER 0 )
|
||||
SET( TOMAHAWK_VERSION ${TOMAHAWK_VERSION}.${TOMAHAWK_VERSION_DATE} )
|
||||
SET( TOMAHAWK_VERSION_TMP ${TOMAHAWK_VERSION}.${TOMAHAWK_VERSION_DATE} )
|
||||
ENDIF()
|
||||
|
||||
INCLUDE( CMakeVersionSource )
|
||||
IF( CMAKE_VERSION_SOURCE )
|
||||
SET( TOMAHAWK_VERSION ${TOMAHAWK_VERSION}-${CMAKE_VERSION_SOURCE} )
|
||||
SET( TOMAHAWK_VERSION_TMP ${TOMAHAWK_VERSION_TMP}-${CMAKE_VERSION_SOURCE} )
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# write Tomahawk version to cache
|
||||
SET(TOMAHAWK_VERSION "${TOMAHAWK_VERSION_TMP}" CACHE STRING "Tomahawk Version")
|
||||
|
||||
|
||||
# set paths
|
||||
SET( THIRDPARTY_DIR "${CMAKE_SOURCE_DIR}/thirdparty" )
|
||||
@@ -235,7 +249,8 @@ else( Qt5Core_DIR )
|
||||
endif( Qt5Core_DIR )
|
||||
|
||||
if( BUILD_GUI AND UNIX AND NOT APPLE )
|
||||
find_package( X11 )
|
||||
macro_optional_find_package( X11 )
|
||||
macro_log_feature(X11_FOUND "X11" "The Xorg libraries" "http://www.x.org/wiki/" TRUE "" "Xorg libraries are used by libqnetwm to bring windows to front reliably")
|
||||
endif()
|
||||
|
||||
# Check if we can use <functional> or need <tr1/functional>
|
||||
|
31
ChangeLog
31
ChangeLog
@@ -1,32 +1,47 @@
|
||||
Version 0.9.0:
|
||||
|
||||
Version 0.8.0:
|
||||
* Redesigned - Shiny new interface. Simplified. New icons.
|
||||
* Added Friend Feed.
|
||||
* Now Playing notifications (OS X & Windows) - support for OS-level notification systems
|
||||
(e.g. Notification Center) with fallback to its own native notification system.
|
||||
* Many actions now available in context menu - including Favorite and Send to a Friend.
|
||||
* Drag and drop support for iTunes, Deezer, Beats Music, Rdio, Spotify, SoundCloud links (into Tomahawk)
|
||||
for playlists/tracks/artists/album links.
|
||||
* Support for clicking source icon for currently playing track in audio controls to take user to associated page
|
||||
on source's site
|
||||
* Added Hatchet plug-in.
|
||||
* Added Google Play Music and Beats Music support.
|
||||
* Add links to Support site, Bug Reports and Translations to Help menu.
|
||||
* Add "What's New" page to display on first launch (or until user dismisses it) - also available from Help menu.
|
||||
* Changed label from "Resolvers" and "Services" to more generic "Plug-Ins".
|
||||
* Clarified some labels, help text and status messages.
|
||||
* Changed icon color a bit.
|
||||
* Added "Acoustic" and "Electric" songtypes to Stations options.
|
||||
* Removed some stale Chart sources.
|
||||
* Playback Queue now saves its state across sessions.
|
||||
* Queue now moved to sidebar.
|
||||
* Added "Inbox" feature, showing incoming song recommendations. Dropping
|
||||
a track on a user in the sidebar sends a recommendation to them.
|
||||
* You will now be asked whether you want to trust invalid SSL certificates.
|
||||
* Improved connecting between Tomahawk peers and support having multiple IPs
|
||||
(including IPv6).
|
||||
* Removed Top Loved from sidebar.
|
||||
* JavaScript-Resolver can now handle URLs (e.g. when dropped from a browser)
|
||||
and resolve them to Playlists/Tracks/Artists/Albums.
|
||||
* Removed Spotify playlist syncing (we will bring it back in future versions).
|
||||
* HTTP(S) streaming is now done by Tomahawk instead of the Phonon backend
|
||||
(fixed HTTPS streaming on MacOS).
|
||||
* Heavily reduced memory footprint during and after indexing the database.
|
||||
* Retina display and DPI scaling fixes.
|
||||
* New Collection views.
|
||||
* New Collection views. Re-added support for tracklist view of Collection.
|
||||
* Added Telepathy support.
|
||||
* Plugin refactoring (and .AXE resolver binaries).
|
||||
* Removed Twitter due to change in Twitter's API.
|
||||
* Removed auto-playlists.
|
||||
* Improved error messages.
|
||||
* Added basic remote control API.
|
||||
* Add support for Opus codec (requires TagLib 1.9).
|
||||
* Support rtmp:// streams.
|
||||
* Dropped QJson as a dependency for Qt5.
|
||||
* Support additional headers in CustomUrlHandler.
|
||||
* Support custom headers in CustomUrlHandler.
|
||||
* Fuzzy search indices for JS Resolvers.
|
||||
* Add metadata retrieval of HTTP(S) streams in JavaScript resolvers.
|
||||
* Support for Windows, OS X and Growl notifications.
|
||||
|
||||
Version 0.7.0:
|
||||
* JavaScript Resolvers can now expose collections.
|
||||
|
73
PACKAGING.md
Normal file
73
PACKAGING.md
Normal file
@@ -0,0 +1,73 @@
|
||||
# Packaging Tomahawk
|
||||
|
||||
General distribution agnostic packaging documentation for Linux.
|
||||
|
||||
## Stay up to date!
|
||||
|
||||
We will try to keep this document up to date, but we also let our packagers know if our dependencies get important updates - especially if they fix crashes or add new features - or if we add completely new ones. Last but not least, of course we want to let you know about new releases of Tomahawk!
|
||||
|
||||
If you want to be notified too subscribe to our [Google Group](https://groups.google.com/forum/#!forum/tomahawk-packagers).
|
||||
|
||||
## CMake build options
|
||||
|
||||
CMake build options are prefixed with ```-D``` and get their value passed after an ```=```.
|
||||
You could for example specify the build type like this ```-DCMAKE_BUILD_TYPE=RelWithDebInfo```.
|
||||
This document contains only options relevant to packaging, to have a complete overview you should check our CMake scripts yourself. Looking at it the other way round, this also means that you should read everything in here really carefully.
|
||||
|
||||
|
||||
##### ```CMAKE_BUILD_TYPE```
|
||||
|
||||
Make sure to specify the build type as ```Release``` or even better ```RelWithDebInfo``` if your distribution supports debug packages. If you do not do this, your users might see asserts (that look like crashes to them) which are only really useful to developers.
|
||||
|
||||
##### ```BUILD_RELEASE``` (boolean) (default: OFF)
|
||||
|
||||
If you're not using our tarballs you can turn this on to suppress putting Git revision hashes into the version string. This also disables building tools and tests by default (although you can do that manually) it's more future-proof to simply pass ```-DBUILD_RELEASE=ON``` because we might make use of it in later releases.
|
||||
|
||||
##### ```BUILD_TOOLS``` (boolean) (default: OFF, when BUILD_RELEASE=ON)
|
||||
|
||||
Tomahawk provides some tools that help highlight where crashes (of course we only crash in theory!) come from. To make them really useful, we need debug symbols to be available. If your distribution supports/allows it, you could put them into the -debug package.
|
||||
|
||||
##### ```BUILD_HATCHET``` (boolean) (default: ON)
|
||||
|
||||
Build the account plugin for Hatchet (http://hatchet.is). Requires [websocketpp](https://github.com/zaphoyd/websocketpp).
|
||||
|
||||
##### ```BUILD_WITH_QT4``` (boolean) (default: ON)
|
||||
|
||||
This enforces CMake to link against Qt4 regardless of whether Qt5 was found or not. Currently Qt4 is still our main development target, so this is still recommended. If you feel adventurous or are preparing Qt5 repositories for your distribution, feel free to give ```-DBUILD_WITH_QT4=OFF``` a shot.
|
||||
|
||||
##### ```WITH_CRASHREPORTER``` (boolean) (default: ON)
|
||||
|
||||
The crash reporter is built by default if libcrashreporter-qt is available in ```thirdparty/libcrashreporter-qt/``` (for example via git submodule). Usually distributions don't allow packagers to upload debug symbols to the Tomahawk HQ so to give crash reports more meaning for us, that's why we have no standardised submit process in place yet. If you can do that in your distribution, please get in touch with us!
|
||||
|
||||
##### ```WITH_KDE``` (boolean) (default: ON)
|
||||
|
||||
The KDE Telepathy plugin to configure Telepathy accounts from our Telepathy plugin can be disabled, if for some reason KDE is available in your build environment but you don't need this plugin.
|
||||
|
||||
##### ```WITH_UPOWER``` (boolean) (default on Linux: ON)
|
||||
|
||||
Build with support for UPower events.
|
||||
|
||||
##### ```WITH_GNOMESHORTCUTHANDLER``` (boolean) (default on Linux: ON)
|
||||
|
||||
Build with shortcut handler for GNOME.
|
||||
|
||||
#### Runtime dependencies
|
||||
|
||||
##### QSql
|
||||
|
||||
If your distribution splits the QSqlite plugin for QSql into a separate package, make it a requirement of Tomahawk - otherwise it might fail to start.
|
||||
|
||||
##### XMPP / jreen
|
||||
|
||||
Either jreen or (at least) Tomahawk's package should require the qca-ossl plugin, otherwise there will be no GTalk/Jabber support.
|
||||
|
||||
##### Audio / Phonon
|
||||
Tomahawk requires phonon-vlc >= 0.4.1 or phonon-gstreamer >= 4.6.1 (esp. phonon-xine in any version will not work!).
|
||||
|
||||
### Icon caches
|
||||
|
||||
In openSUSE there are macros for updating icon caches in KDE and GNOME (```%desktop_database_post[un]``` ```%icon_theme_cache_post[un]```) after [un]installation, check if your distribution offers the same.
|
||||
|
||||
### Firewall
|
||||
|
||||
Tomahawk offers P2P functionality, if your distribution offers a default firewall, it's nice to support a default profile for the standard Tomahawk P2P-port (50210). (cf. [openSUSE integration](https://build.opensuse.org/package/view_file/KDE:Extra/tomahawk/tomahawk.SuSEfirewall2?expand=1))
|
@@ -4,6 +4,8 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
set -e
|
||||
|
||||
|
||||
function header {
|
||||
echo -e "\033[0;34m==>\033[0;0;1m $1 \033[0;0m"
|
||||
@@ -27,9 +29,6 @@ VERSION=$1
|
||||
|
||||
################################################################################
|
||||
|
||||
mv tomahawk.app Tomahawk.app
|
||||
mv Tomahawk.app/Contents/MacOS/tomahawk Tomahawk.app/Contents/MacOS/Tomahawk
|
||||
|
||||
header "Fixing and copying libraries"
|
||||
$ROOT/../admin/mac/macdeploy.py Tomahawk.app quiet
|
||||
|
||||
@@ -38,19 +37,24 @@ VERSION=$1
|
||||
cp $ROOT/../admin/mac/qt.conf Contents/Resources/qt.conf
|
||||
|
||||
header "Copying Sparkle framework"
|
||||
cp -R /Library/Frameworks/Sparkle.framework Contents/Frameworks
|
||||
|
||||
rm -rf Contents/Frameworks/Sparkle.framework
|
||||
cp -R /Library/Frameworks/Sparkle.framework Contents/Frameworks/
|
||||
|
||||
header "Creating DMG"
|
||||
cd ..
|
||||
|
||||
header "Signing bundle"
|
||||
codesign -s "Developer ID Application: Leonardo Franchi" -f -v ./Tomahawk.app
|
||||
|
||||
if [ -f ~/sign_step.sh ];
|
||||
then
|
||||
~/sign_step.sh
|
||||
fi
|
||||
|
||||
$ROOT/../admin/mac/create-dmg.sh Tomahawk.app
|
||||
mv Tomahawk.dmg Tomahawk-$VERSION.dmg
|
||||
|
||||
|
||||
header "Creating signed Sparkle update"
|
||||
$ROOT/../admin/mac/sign_bundle.rb $VERSION ~/tomahawk_sparkle_privkey.pem
|
||||
mv Tomahawk.app tomahawk.app
|
||||
|
||||
header "Done!"
|
||||
|
@@ -444,8 +444,10 @@ def CopyPlugin(path, subdir):
|
||||
|
||||
def CopyFramework(path):
|
||||
parts = path.split(os.sep)
|
||||
name = ''
|
||||
for i, part in enumerate(parts):
|
||||
if re.match(r'\w+\.framework', part):
|
||||
name = part[:-10]
|
||||
full_path = os.path.join(frameworks_dir, *parts[i:-1])
|
||||
break
|
||||
args = ['mkdir', '-p', full_path]
|
||||
@@ -457,9 +459,47 @@ def CopyFramework(path):
|
||||
|
||||
menu_nib = os.path.join(os.path.split(path)[0], 'Resources', 'qt_menu.nib')
|
||||
if os.path.exists(menu_nib):
|
||||
args = ['cp', '-r', menu_nib, resources_dir]
|
||||
args = ['cp', '-rf', menu_nib, resources_dir]
|
||||
commands.append(args)
|
||||
|
||||
framework_versions_dir = os.path.join(full_path, '..', '..', 'Versions')
|
||||
framework_resources_current_dir = os.path.join(full_path, 'Resources')
|
||||
framework_resources_main_dir = os.path.join(full_path, '..', '..', 'Resources')
|
||||
framework_current_version = full_path.split(os.sep)[-1]
|
||||
|
||||
# link /Versions/Current to /Versions/$currentVersion
|
||||
args = ['ln', '-Fs', framework_current_version, os.path.join(framework_versions_dir, 'Current')]
|
||||
commands.append(args)
|
||||
|
||||
# Copy Contents/Info.plist to Resources/Info.plist if Resources/Info.plist does not exist
|
||||
# If Contents/Info.plist doesn't exist either, error out. If we actually see this, we can copy QtCore's Info.plist
|
||||
info_plist_in_resources = os.path.join(os.path.split(path)[0], '..', '..', 'Resources', 'Info.plist')
|
||||
if not os.path.exists(info_plist_in_resources):
|
||||
info_plist_in_contents = os.path.join(os.path.split(path)[0], '..', '..', 'Contents', 'Info.plist')
|
||||
args = ['mkdir', '-p', framework_resources_current_dir]
|
||||
commands.append(args)
|
||||
if os.path.exists(info_plist_in_contents):
|
||||
args = ['cp', '-rf', info_plist_in_contents, framework_resources_current_dir]
|
||||
commands.append(args)
|
||||
else:
|
||||
print "%s: Framework does not contain an Info.plist file in Contents/ or Resources/ folder." % (path)
|
||||
sys.exit(-1)
|
||||
|
||||
# link /Resources to /Versions/Current/Resources
|
||||
args = ['ln', '-Fs', 'Versions/Current/Resources', framework_resources_main_dir]
|
||||
commands.append(args)
|
||||
|
||||
# link /$name to /Versions/Current/$name
|
||||
args = ['ln', '-Fs', os.path.join('Versions/Current/', name), os.path.join(full_path, '..', '..', name)]
|
||||
commands.append(args)
|
||||
|
||||
# HACK: CopyFramework is called repeatedly for the same frameworks, but we can't check for the existence of the link from python
|
||||
# as the commands are only executed in the end, that's why we remove wrong symlinks afterwards
|
||||
args = ['rm', '-rf', os.path.join(framework_resources_main_dir, 'Resources')]
|
||||
commands.append(args)
|
||||
args = ['rm', '-rf', os.path.join(framework_versions_dir, 'Current', framework_current_version)]
|
||||
commands.append(args)
|
||||
|
||||
return os.path.join(full_path, parts[-1])
|
||||
|
||||
def FixId(path, library_name):
|
||||
|
@@ -8,6 +8,8 @@ SET(CMAKE_SYSTEM_NAME Windows)
|
||||
SET(CMAKE_C_COMPILER ${MINGW_PREFIX}-gcc)
|
||||
SET(CMAKE_CXX_COMPILER ${MINGW_PREFIX}-g++)
|
||||
SET(CMAKE_RC_COMPILER ${MINGW_PREFIX}-windres)
|
||||
SET(CMAKE_AR /usr/bin/${MINGW_PREFIX}-ar CACHE FILEPATH "ar")
|
||||
|
||||
|
||||
# where is the target environment containing libraries
|
||||
SET(CMAKE_FIND_ROOT_PATH /usr/${MINGW_PREFIX}/sys-root/mingw)
|
||||
@@ -26,12 +28,11 @@ SET(QT_PLUGINS_DIR ${CMAKE_FIND_ROOT_PATH}/lib/qt4/plugins)
|
||||
SET(QT_MKSPECS_DIR ${CMAKE_FIND_ROOT_PATH}/share/qt4/mkspecs)
|
||||
SET(QT_QT_INCLUDE_DIR ${CMAKE_FIND_ROOT_PATH}/include)
|
||||
|
||||
# qt tools
|
||||
SET(QT_QMAKE_EXECUTABLE ${MINGW_PREFIX}-qmake )
|
||||
SET(QT_MOC_EXECUTABLE ${MINGW_PREFIX}-moc)
|
||||
SET(QT_RCC_EXECUTABLE ${MINGW_PREFIX}-rcc)
|
||||
SET(QT_UIC_EXECUTABLE ${MINGW_PREFIX}-uic)
|
||||
SET(QT_LRELEASE_EXECUTABLE ${MINGW_PREFIX}-lrelease)
|
||||
SET(QT_QMAKE_EXECUTABLE /usr/bin/${MINGW_PREFIX}-qmake CACHE FILEPATH "qmake" )
|
||||
SET(QT_MOC_EXECUTABLE /usr/bin/${MINGW_PREFIX}-moc CACHE FILEPATH "moc")
|
||||
SET(QT_RCC_EXECUTABLE /usr/bin/${MINGW_PREFIX}-rcc CACHE FILEPATH "rcc")
|
||||
SET(QT_UIC_EXECUTABLE /usr/bin/${MINGW_PREFIX}-uic CACHE FILEPATH "uic")
|
||||
SET(QT_LRELEASE_EXECUTABLE /usr/bin/${MINGW_PREFIX}-lrelease CACHE FILEPATH "lrelease")
|
||||
|
||||
# phonon -_-
|
||||
SET(Automoc4_DIR "/usr/lib64/automoc4/")
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 29 KiB |
Binary file not shown.
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 151 KiB |
@@ -50,6 +50,7 @@ tar xvjf pvlc.tar.bz2
|
||||
|
||||
|
||||
# this is for vlc-2.x
|
||||
cd vlc/plugins
|
||||
rm -rvf \
|
||||
video_*/ \
|
||||
gui/ \
|
||||
@@ -76,8 +77,8 @@ rm -rvf \
|
||||
**/liblibbluray_plugin* \
|
||||
**/libdtv_plugin* \
|
||||
**/*.dll.a \
|
||||
**/*.la
|
||||
**/*.la \
|
||||
misc/liblogger_plugin*
|
||||
|
||||
|
||||
echo "Downloaded and stripped VLC"
|
||||
|
||||
|
@@ -23,7 +23,9 @@ add_subdirectory( viewpages )
|
||||
add_subdirectory( tomahawk )
|
||||
|
||||
# tools
|
||||
add_subdirectory( tools )
|
||||
if(BUILD_TOOLS)
|
||||
add_subdirectory( tools )
|
||||
endif()
|
||||
|
||||
if(WITH_CRASHREPORTER)
|
||||
add_subdirectory( crashreporter )
|
||||
|
@@ -29,6 +29,7 @@ set( libGuiSources
|
||||
jobview/JobStatusItem.cpp
|
||||
jobview/AclJobItem.cpp
|
||||
jobview/PipelineStatusItem.cpp
|
||||
jobview/ScannerStatusItem.cpp
|
||||
jobview/TransferStatusItem.cpp
|
||||
jobview/LatchedStatusItem.cpp
|
||||
jobview/ErrorStatusMessage.cpp
|
||||
|
@@ -493,20 +493,6 @@ Source::dbLoaded( unsigned int id, const QString& fname )
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Source::scanningProgress( unsigned int files )
|
||||
{
|
||||
Q_D( Source );
|
||||
|
||||
if ( files )
|
||||
d->textStatus = tr( "Scanning (%L1 tracks)" ).arg( files );
|
||||
else
|
||||
d->textStatus = tr( "Scanning" );
|
||||
|
||||
emit stateChanged();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Source::scanningFinished( bool updateGUI )
|
||||
{
|
||||
|
@@ -93,7 +93,6 @@ public:
|
||||
|
||||
const QSet< Tomahawk::peerinfo_ptr > peerInfos() const;
|
||||
|
||||
void scanningProgress( unsigned int files );
|
||||
void scanningFinished( bool updateGUI );
|
||||
|
||||
unsigned int trackCount() const;
|
||||
|
@@ -307,7 +307,8 @@ AccountManager::finishLoadingFromConfig( const QString& csid )
|
||||
if ( m_accountFactories.contains( pluginFactory ) )
|
||||
{
|
||||
Account* account = loadPlugin( accountId );
|
||||
addAccount( account );
|
||||
if ( account )
|
||||
addAccount( account );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -336,10 +337,14 @@ AccountManager::loadPlugin( const QString& accountId )
|
||||
QString factoryName = factoryFromId( accountId );
|
||||
|
||||
Q_ASSERT( m_accountFactories.contains( factoryName ) );
|
||||
if ( !m_accountFactories.contains( factoryName ) )
|
||||
return 0;
|
||||
|
||||
Account* account = m_accountFactories[ factoryName ]->createAccount( accountId );
|
||||
hookupAccount( account );
|
||||
if ( !account )
|
||||
return 0;
|
||||
|
||||
hookupAccount( account );
|
||||
return account;
|
||||
}
|
||||
|
||||
|
@@ -157,16 +157,17 @@ Database::~Database()
|
||||
workerThread->quit();
|
||||
}
|
||||
|
||||
emit waitingForWorkers();
|
||||
if ( m_workerRW )
|
||||
{
|
||||
m_workerRW.data()->wait( 60000 );
|
||||
m_workerRW.data()->wait();
|
||||
delete m_workerRW.data();
|
||||
}
|
||||
foreach ( QPointer< DatabaseWorkerThread > workerThread, m_workerThreads )
|
||||
{
|
||||
if ( workerThread )
|
||||
{
|
||||
workerThread.data()->wait( 60000 );
|
||||
workerThread.data()->wait();
|
||||
delete workerThread.data();
|
||||
}
|
||||
}
|
||||
@@ -176,6 +177,7 @@ Database::~Database()
|
||||
qDeleteAll( m_commandFactories.values() );
|
||||
delete m_impl;
|
||||
|
||||
emit workersFinished();
|
||||
}
|
||||
|
||||
|
||||
|
@@ -108,6 +108,9 @@ signals:
|
||||
void newJobRO( Tomahawk::dbcmd_ptr );
|
||||
void newJobRW( Tomahawk::dbcmd_ptr );
|
||||
|
||||
void waitingForWorkers();
|
||||
void workersFinished();
|
||||
|
||||
public slots:
|
||||
void enqueue( const Tomahawk::dbcmd_ptr& lc );
|
||||
void enqueue( const QList< Tomahawk::dbcmd_ptr >& lc );
|
||||
|
@@ -142,12 +142,16 @@ DatabaseCommand_AllTracks::exec( DatabaseImpl* dbi )
|
||||
artist, track, album,
|
||||
duration, composer,
|
||||
albumpos, discnumber );
|
||||
if ( !t )
|
||||
continue;
|
||||
|
||||
if ( m_album || m_artist ) {
|
||||
if ( m_album || m_artist )
|
||||
t->loadAttributes();
|
||||
}
|
||||
|
||||
Tomahawk::result_ptr result = Tomahawk::Result::get( url, t );
|
||||
if ( !result )
|
||||
continue;
|
||||
|
||||
result->setSize( size );
|
||||
result->setBitrate( bitrate );
|
||||
result->setModificationTime( modificationTime );
|
||||
|
@@ -35,8 +35,6 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
void
|
||||
@@ -139,7 +137,6 @@ MusicScanner::MusicScanner( MusicScanner::ScanMode scanMode, const QStringList&
|
||||
, m_scanMode( scanMode )
|
||||
, m_paths( paths )
|
||||
, m_scanned( 0 )
|
||||
, m_showProgress( true )
|
||||
, m_dryRun( false )
|
||||
, m_verbose( false )
|
||||
, m_cmdQueue( 0 )
|
||||
@@ -164,20 +161,6 @@ MusicScanner::~MusicScanner()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MusicScanner::showProgress( bool _showProgress )
|
||||
{
|
||||
m_showProgress = _showProgress;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
MusicScanner::showingProgress()
|
||||
{
|
||||
return m_showProgress;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MusicScanner::setDryRun( bool _dryRun )
|
||||
{
|
||||
@@ -213,10 +196,7 @@ MusicScanner::startScan()
|
||||
m_scanned = m_skipped = m_cmdQueue = 0;
|
||||
m_skippedFiles.clear();
|
||||
|
||||
if ( m_showProgress )
|
||||
{
|
||||
SourceList::instance()->getLocal()->scanningProgress( m_scanned );
|
||||
}
|
||||
emit progress( m_scanned );
|
||||
|
||||
// trigger the scan once we've loaded old filemtimes
|
||||
//FIXME: For multiple collection support make sure the right prefix gets passed in...or not...
|
||||
@@ -467,8 +447,9 @@ MusicScanner::readFile( const QFileInfo& fi )
|
||||
const QVariant m = readTags( fi );
|
||||
|
||||
if ( m_scanned )
|
||||
if ( m_scanned % 3 == 0 && m_showProgress )
|
||||
SourceList::instance()->getLocal()->scanningProgress( m_scanned );
|
||||
if ( m_scanned % 3 == 0 )
|
||||
emit progress( m_scanned );
|
||||
|
||||
if ( m_scanned % 100 == 0 || m_verbose )
|
||||
tDebug( LOGINFO ) << "Scanning file:" << m_scanned << fi.canonicalFilePath();
|
||||
|
||||
|
@@ -107,9 +107,6 @@ public:
|
||||
MusicScanner( MusicScanner::ScanMode scanMode, const QStringList& paths, quint32 bs = 0 );
|
||||
~MusicScanner();
|
||||
|
||||
void showProgress( bool _showProgress );
|
||||
bool showingProgress();
|
||||
|
||||
/**
|
||||
* Specify if we want a dry run, i.e. not change any of the internal data stores.
|
||||
*
|
||||
@@ -130,6 +127,7 @@ signals:
|
||||
//void fileScanned( QVariantMap );
|
||||
void finished();
|
||||
void batchReady( const QVariantList&, const QVariantList& );
|
||||
void progress( unsigned int files );
|
||||
|
||||
private:
|
||||
QVariant readFile( const QFileInfo& fi );
|
||||
@@ -152,7 +150,6 @@ private:
|
||||
QStringList m_paths;
|
||||
unsigned int m_scanned;
|
||||
unsigned int m_skipped;
|
||||
bool m_showProgress;
|
||||
bool m_dryRun;
|
||||
bool m_verbose;
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
* Copyright 2010-2014, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
* Copyright 2010-2012, Jeff Mitchell <jeff@tomahawk-player.org>
|
||||
*
|
||||
* Tomahawk is free software: you can redistribute it and/or modify
|
||||
@@ -56,6 +56,7 @@ MusicScannerThreadController::run()
|
||||
{
|
||||
m_musicScanner = QPointer< MusicScanner >( new MusicScanner( m_mode, m_paths, m_bs ) );
|
||||
connect( m_musicScanner.data(), SIGNAL( finished() ), parent(), SLOT( scannerFinished() ), Qt::QueuedConnection );
|
||||
connect( m_musicScanner.data(), SIGNAL( progress( unsigned int ) ), parent(), SIGNAL( progress( unsigned int ) ), Qt::QueuedConnection );
|
||||
QMetaObject::invokeMethod( m_musicScanner.data(), "startScan", Qt::QueuedConnection );
|
||||
|
||||
exec();
|
||||
@@ -88,17 +89,6 @@ ScanManager::ScanManager( QObject* parent )
|
||||
m_scanTimer = new QTimer( this );
|
||||
m_scanTimer->setSingleShot( false );
|
||||
m_scanTimer->setInterval( TomahawkSettings::instance()->scannerTime() * 1000 );
|
||||
|
||||
connect( TomahawkSettings::instance(), SIGNAL( changed() ), SLOT( onSettingsChanged() ) );
|
||||
connect( m_scanTimer, SIGNAL( timeout() ), SLOT( scanTimerTimeout() ) );
|
||||
|
||||
if ( TomahawkSettings::instance()->hasScannerPaths() )
|
||||
{
|
||||
m_cachedScannerDirs = TomahawkSettings::instance()->scannerPaths();
|
||||
m_scanTimer->start();
|
||||
if ( TomahawkSettings::instance()->watchForChanges() )
|
||||
QTimer::singleShot( 1000, this, SLOT( runStartupScan() ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -118,6 +108,22 @@ ScanManager::~ScanManager()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ScanManager::init()
|
||||
{
|
||||
connect( TomahawkSettings::instance(), SIGNAL( changed() ), SLOT( onSettingsChanged() ) );
|
||||
connect( m_scanTimer, SIGNAL( timeout() ), SLOT( scanTimerTimeout() ) );
|
||||
|
||||
if ( TomahawkSettings::instance()->hasScannerPaths() )
|
||||
{
|
||||
m_cachedScannerDirs = TomahawkSettings::instance()->scannerPaths();
|
||||
m_scanTimer->start();
|
||||
if ( TomahawkSettings::instance()->watchForChanges() )
|
||||
QTimer::singleShot( 1000, this, SLOT( runStartupScan() ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ScanManager::onSettingsChanged()
|
||||
{
|
||||
|
@@ -52,7 +52,7 @@ private:
|
||||
QPointer< MusicScanner > m_musicScanner;
|
||||
MusicScanner::ScanMode m_mode;
|
||||
QStringList m_paths;
|
||||
quint32 m_bs;
|
||||
quint32 m_bs;
|
||||
};
|
||||
|
||||
|
||||
@@ -66,7 +66,11 @@ public:
|
||||
explicit ScanManager( QObject* parent = 0 );
|
||||
virtual ~ScanManager();
|
||||
|
||||
void init();
|
||||
|
||||
signals:
|
||||
void started();
|
||||
void progress( unsigned int files );
|
||||
void finished();
|
||||
|
||||
public slots:
|
||||
|
@@ -28,6 +28,7 @@
|
||||
#include "Source.h"
|
||||
#include "IndexingJobItem.h"
|
||||
#include "PipelineStatusItem.h"
|
||||
#include "ScannerStatusItem.h"
|
||||
#include "TransferStatusItem.h"
|
||||
#include "LatchedStatusItem.h"
|
||||
|
||||
@@ -95,6 +96,7 @@ JobStatusView::JobStatusView( AnimatedSplitter* parent )
|
||||
|
||||
new IndexStatusManager( this );
|
||||
new PipelineStatusManager( this );
|
||||
new ScannerStatusManager( this );
|
||||
new TransferStatusManager( this );
|
||||
new LatchedStatusManager( this );
|
||||
|
||||
|
92
src/libtomahawk/jobview/ScannerStatusItem.cpp
Normal file
92
src/libtomahawk/jobview/ScannerStatusItem.cpp
Normal file
@@ -0,0 +1,92 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2014, 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/>.
|
||||
*/
|
||||
|
||||
#include "ScannerStatusItem.h"
|
||||
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
|
||||
#include "JobStatusModel.h"
|
||||
#include "JobStatusView.h"
|
||||
#include "filemetadata/ScanManager.h"
|
||||
#include "Source.h"
|
||||
#include "Track.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
|
||||
ScannerStatusItem::ScannerStatusItem()
|
||||
: JobStatusItem()
|
||||
, m_scannedFiles( 0 )
|
||||
{
|
||||
connect( ScanManager::instance(), SIGNAL( progress( unsigned int ) ), SLOT( onProgress( unsigned int ) ) );
|
||||
connect( ScanManager::instance(), SIGNAL( finished() ), SIGNAL( finished() ) );
|
||||
}
|
||||
|
||||
|
||||
ScannerStatusItem::~ScannerStatusItem()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
QString
|
||||
ScannerStatusItem::rightColumnText() const
|
||||
{
|
||||
return QString( "%1" ).arg( m_scannedFiles );
|
||||
}
|
||||
|
||||
|
||||
QString
|
||||
ScannerStatusItem::mainText() const
|
||||
{
|
||||
return tr( "Scanning Collection" );
|
||||
}
|
||||
|
||||
|
||||
QPixmap
|
||||
ScannerStatusItem::icon() const
|
||||
{
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::Search );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ScannerStatusItem::onProgress( unsigned int files )
|
||||
{
|
||||
m_scannedFiles = files;
|
||||
emit statusChanged();
|
||||
}
|
||||
|
||||
|
||||
ScannerStatusManager::ScannerStatusManager( QObject* parent )
|
||||
: QObject( parent )
|
||||
{
|
||||
connect( ScanManager::instance(), SIGNAL( progress( unsigned int ) ), SLOT( onProgress( unsigned int ) ) );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ScannerStatusManager::onProgress( unsigned int files )
|
||||
{
|
||||
Q_UNUSED( files );
|
||||
|
||||
if ( !m_curItem )
|
||||
{
|
||||
// No current query item and we're resolving something, so show it
|
||||
m_curItem = QPointer< ScannerStatusItem >( new ScannerStatusItem() );
|
||||
JobStatusView::instance()->model()->addJob( m_curItem.data() );
|
||||
}
|
||||
}
|
65
src/libtomahawk/jobview/ScannerStatusItem.h
Normal file
65
src/libtomahawk/jobview/ScannerStatusItem.h
Normal file
@@ -0,0 +1,65 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2014, 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 SCANNERSTATUSITEM_H
|
||||
#define SCANNERSTATUSITEM_H
|
||||
|
||||
#include "jobview/JobStatusItem.h"
|
||||
#include "Query.h"
|
||||
|
||||
#include <QPixmap>
|
||||
#include <QPointer>
|
||||
|
||||
class ScannerStatusItem : public JobStatusItem
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ScannerStatusItem();
|
||||
virtual ~ScannerStatusItem();
|
||||
|
||||
virtual QString rightColumnText() const;
|
||||
virtual QString mainText() const;
|
||||
virtual QPixmap icon() const;
|
||||
|
||||
virtual QString type() const { return "scanner"; }
|
||||
|
||||
virtual bool collapseItem() const { return false; } // We can't collapse, since we use this meta-item instead of one per resolve
|
||||
|
||||
private slots:
|
||||
void onProgress( unsigned int files );
|
||||
|
||||
private:
|
||||
unsigned int m_scannedFiles;
|
||||
};
|
||||
|
||||
class ScannerStatusManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ScannerStatusManager( QObject* parent = 0 );
|
||||
virtual ~ScannerStatusManager() {}
|
||||
|
||||
private slots:
|
||||
void onProgress( unsigned int files );
|
||||
|
||||
private:
|
||||
QPointer<ScannerStatusItem> m_curItem;
|
||||
};
|
||||
|
||||
|
||||
#endif // PIPELINESTATUSITEM_H
|
@@ -96,7 +96,7 @@ TrackDetailView::TrackDetailView( QWidget* parent )
|
||||
m_resultsBoxLabel->setStyleSheet( "QLabel { color: rgba( 0, 0, 0, 50% ) }" );
|
||||
m_resultsBoxLabel->setText( tr( "Alternate Sources:" ) );
|
||||
m_resultsBoxLabel->setFixedWidth( width() - 4 );
|
||||
m_resultsBoxLabel->setFixedHeight( m_resultsBoxLabel->sizeHint().height() * 0.8 );
|
||||
// m_resultsBoxLabel->setFixedHeight( m_resultsBoxLabel->sizeHint().height() * 0.8 );
|
||||
m_resultsBoxLabel->hide();
|
||||
|
||||
m_resultsBox = new QWidget;
|
||||
|
@@ -83,21 +83,21 @@ log( const char *msg, unsigned int debugLevel, bool toDisk = true )
|
||||
{
|
||||
// Do not use locales anymore in shutdown
|
||||
logStream << QDate::currentDate().day() << "."
|
||||
<< QDate::currentDate().month() << "."
|
||||
<< QDate::currentDate().year() << " - "
|
||||
<< QTime::currentTime().hour() << ":"
|
||||
<< QTime::currentTime().minute() << ":"
|
||||
<< QTime::currentTime().second()
|
||||
<< " [" << QString::number( debugLevel ).toUtf8().data() << "]: "
|
||||
<< msg << endl;
|
||||
<< QDate::currentDate().month() << "."
|
||||
<< QDate::currentDate().year() << " - "
|
||||
<< QTime::currentTime().hour() << ":"
|
||||
<< QTime::currentTime().minute() << ":"
|
||||
<< QTime::currentTime().second()
|
||||
<< " [" << QString::number( debugLevel ).toUtf8().data() << "]: "
|
||||
<< msg << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
logStream << QDate::currentDate().toString().toUtf8().data()
|
||||
<< " - "
|
||||
<< QTime::currentTime().toString().toUtf8().data()
|
||||
<< " [" << QString::number( debugLevel ).toUtf8().data() << "]: "
|
||||
<< msg << endl;
|
||||
<< " - "
|
||||
<< QTime::currentTime().toString().toUtf8().data()
|
||||
<< " [" << QString::number( debugLevel ).toUtf8().data() << "]: "
|
||||
<< msg << endl;
|
||||
}
|
||||
|
||||
logStream.flush();
|
||||
@@ -110,16 +110,16 @@ log( const char *msg, unsigned int debugLevel, bool toDisk = true )
|
||||
if ( shutdownInProgress )
|
||||
{
|
||||
wcout << QTime::currentTime().hour() << ":"
|
||||
<< QTime::currentTime().minute() << ":"
|
||||
<< QTime::currentTime().second()
|
||||
<< " [" << QString::number( debugLevel ).toStdWString().c_str() << "]: "
|
||||
<< msg << endl;
|
||||
<< QTime::currentTime().minute() << ":"
|
||||
<< QTime::currentTime().second()
|
||||
<< " [" << QString::number( debugLevel ).toStdWString().c_str() << "]: "
|
||||
<< msg << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
wcout << QTime::currentTime().toString().toUtf8().data()
|
||||
<< " [" << QString::number( debugLevel ).toStdWString().c_str() << "]: "
|
||||
<< msg << endl;
|
||||
<< " [" << QString::number( debugLevel ).toStdWString().c_str() << "]: "
|
||||
<< msg << endl;
|
||||
}
|
||||
|
||||
wcout.flush();
|
||||
|
@@ -336,7 +336,7 @@ SearchWidget::onResultsFound( const QList<Tomahawk::result_ptr>& results )
|
||||
for ( int i = 0; i < m_resultsModel->rowCount( QModelIndex() ); i++ )
|
||||
{
|
||||
PlayableItem* item = m_resultsModel->itemFromIndex( m_resultsModel->index( i, 0, QModelIndex() ) );
|
||||
if ( item && item->query() )
|
||||
if ( item && item->query() && item->query()->numResults( true ) )
|
||||
{
|
||||
if ( item->query()->results().first()->score() < q->results().first()->score() )
|
||||
{
|
||||
|
@@ -45,7 +45,7 @@ QSize
|
||||
CaptionLabel::sizeHint() const
|
||||
{
|
||||
QFontMetrics fm( font() );
|
||||
return QSize( fm.width( text().toUpper() ), fm.height() * 1.7 );
|
||||
return QSize( fm.width( text().toUpper() ), fm.height() + 9 );
|
||||
}
|
||||
|
||||
|
||||
|
@@ -59,9 +59,9 @@ if( APPLE )
|
||||
FILE( WRITE ${CMAKE_BINARY_DIR}/Info.plist "${edited_plist}" )
|
||||
|
||||
FILE(COPY ${CMAKE_SOURCE_DIR}/admin/mac/sparkle_pub.pem
|
||||
DESTINATION "${CMAKE_BINARY_DIR}/tomahawk.app/Contents/Resources")
|
||||
DESTINATION "${CMAKE_BINARY_DIR}/Tomahawk.app/Contents/Resources")
|
||||
|
||||
FILE(COPY /usr/bin/SetFile DESTINATION "${CMAKE_BINARY_DIR}/tomahawk.app/Contents/MacOS")
|
||||
FILE(COPY /usr/bin/GetFileInfo DESTINATION "${CMAKE_BINARY_DIR}/tomahawk.app/Contents/MacOS")
|
||||
FILE(COPY /usr/bin/SetFile DESTINATION "${CMAKE_BINARY_DIR}/Tomahawk.app/Contents/MacOS")
|
||||
FILE(COPY /usr/bin/GetFileInfo DESTINATION "${CMAKE_BINARY_DIR}/Tomahawk.app/Contents/MacOS")
|
||||
|
||||
endif (APPLE)
|
||||
|
@@ -151,13 +151,18 @@ qt_add_resources( RC_SRCS "../../resources.qrc" )
|
||||
|
||||
SET( final_src ${final_src} ${tomahawkUI_H} ${tomahawkMoc} ${tomahawkSources} ${RC_SRCS} )
|
||||
|
||||
if(APPLE)
|
||||
set(TOMAHAWK_RUNTIME_OUTPUT_NAME "Tomahawk")
|
||||
else()
|
||||
set(TOMAHAWK_RUNTIME_OUTPUT_NAME "tomahawk")
|
||||
endif()
|
||||
|
||||
ADD_EXECUTABLE( tomahawk_bin WIN32 MACOSX_BUNDLE ${final_src} )
|
||||
SET_TARGET_PROPERTIES(tomahawk_bin
|
||||
PROPERTIES
|
||||
AUTOMOC TRUE
|
||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_BINARY_DIR}/Info.plist"
|
||||
RUNTIME_OUTPUT_NAME tomahawk
|
||||
RUNTIME_OUTPUT_NAME ${TOMAHAWK_RUNTIME_OUTPUT_NAME}
|
||||
)
|
||||
|
||||
|
||||
@@ -194,7 +199,7 @@ TARGET_LINK_LIBRARIES( tomahawk_bin
|
||||
IF( APPLE )
|
||||
IF( HAVE_SPARKLE )
|
||||
MESSAGE("Sparkle Found, installing framekwork in bundle")
|
||||
INSTALL(DIRECTORY "${SPARKLE}/Versions/Current/Resources" DESTINATION "${CMAKE_BINARY_DIR}/tomahawk.app/Contents/Frameworks/Sparkle.framework")
|
||||
INSTALL(DIRECTORY "${SPARKLE}/Versions/Current/Resources" DESTINATION "${CMAKE_BINARY_DIR}/Tomahawk.app/Contents/Frameworks/Sparkle.framework")
|
||||
|
||||
ENDIF( HAVE_SPARKLE )
|
||||
ENDIF( APPLE )
|
||||
|
@@ -103,6 +103,7 @@
|
||||
#include <QTime>
|
||||
#include <QMessageBox>
|
||||
#include <QNetworkReply>
|
||||
#include <QProgressDialog>
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QTranslator>
|
||||
@@ -469,6 +470,8 @@ TomahawkApp::initDatabase()
|
||||
m_database = QPointer<Tomahawk::Database>( new Tomahawk::Database( dbpath, this ) );
|
||||
// this also connects dbImpl schema update signals
|
||||
|
||||
connect( m_database.data(), SIGNAL( waitingForWorkers() ), SLOT( onShutdownDelayed() ) );
|
||||
|
||||
Pipeline::instance()->databaseReady();
|
||||
}
|
||||
|
||||
@@ -593,6 +596,25 @@ TomahawkApp::initSIP()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkApp::onShutdownDelayed()
|
||||
{
|
||||
QProgressDialog* d = new QProgressDialog( tr( "Tomahawk is updating the database. Please wait, this may take a minute!" ), QString(),
|
||||
0, 0, 0, Qt::Tool
|
||||
| Qt::WindowTitleHint
|
||||
| Qt::CustomizeWindowHint );
|
||||
d->setModal( true );
|
||||
d->setAutoClose( false );
|
||||
d->setAutoReset( false );
|
||||
d->setWindowTitle( tr( "Tomahawk" ) );
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
d->setAttribute( Qt::WA_MacAlwaysShowToolWindow );
|
||||
#endif
|
||||
d->show();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkApp::onInfoSystemReady()
|
||||
{
|
||||
@@ -606,6 +628,7 @@ TomahawkApp::onInfoSystemReady()
|
||||
Echonest::Config::instance()->setNetworkAccessManager( Tomahawk::Utils::nam() );
|
||||
EchonestGenerator::setupCatalogs();
|
||||
|
||||
m_scanManager = QPointer<ScanManager>( new ScanManager( this ) );
|
||||
if ( !m_headless )
|
||||
{
|
||||
tDebug() << "Init MainWindow.";
|
||||
@@ -624,10 +647,10 @@ TomahawkApp::onInfoSystemReady()
|
||||
tDebug() << "Init Pipeline.";
|
||||
initPipeline();
|
||||
|
||||
m_scanManager = QPointer<ScanManager>( new ScanManager( this ) );
|
||||
m_scanManager->init();
|
||||
if ( arguments().contains( "--filescan" ) )
|
||||
{
|
||||
m_scanManager.data()->runFullRescan();
|
||||
m_scanManager->runFullRescan();
|
||||
}
|
||||
|
||||
// load remote list of resolvers able to be installed
|
||||
|
@@ -102,13 +102,14 @@ public slots:
|
||||
void instanceStarted( KDSingleApplicationGuard::Instance );
|
||||
|
||||
private slots:
|
||||
void playlistRemoved( const Tomahawk::playlist_ptr& playlist );
|
||||
void initServent();
|
||||
void initSIP();
|
||||
void initHTTP();
|
||||
void initFactoriesForAccountManager();
|
||||
void initEnergyEventHandler();
|
||||
|
||||
void onShutdownDelayed();
|
||||
|
||||
void spotifyApiCheckFinished();
|
||||
void onInfoSystemReady();
|
||||
|
||||
@@ -120,6 +121,7 @@ private slots:
|
||||
void updateSplashWidgetMessage( const QString& message );
|
||||
void killSplashWidget();
|
||||
|
||||
void playlistRemoved( const Tomahawk::playlist_ptr& playlist );
|
||||
void ipDetectionFailed( QNetworkReply::NetworkError error, QString errorString );
|
||||
|
||||
private:
|
||||
|
@@ -113,7 +113,9 @@ TomahawkWindow::TomahawkWindow( QWidget* parent )
|
||||
, m_trayIcon( 0 )
|
||||
, m_audioRetryCounter( 0 )
|
||||
{
|
||||
#ifndef Q_OS_MAC
|
||||
setWindowIcon( QIcon( RESPATH "icons/tomahawk-icon-128x128.png" ) );
|
||||
#endif
|
||||
|
||||
new ViewManager( this );
|
||||
QueueView* queueView = new QueueView();
|
||||
|
@@ -87,7 +87,7 @@ SourceDelegate::sizeHint( const QStyleOptionViewItem& option, const QModelIndex&
|
||||
}
|
||||
else if ( type == SourcesModel::Group )
|
||||
{
|
||||
const int groupSpacer = index.row() > 0 ? option.fontMetrics.height() * 2.5 : option.fontMetrics.height() * 0.8;
|
||||
const int groupSpacer = index.row() > 0 ? option.fontMetrics.height() * 2.5 : option.fontMetrics.height() * 1.8;
|
||||
return QSize( option.rect.width(), option.fontMetrics.height() + groupSpacer );
|
||||
}
|
||||
else
|
||||
|
@@ -47,7 +47,6 @@ main( int argc, char* argv[] )
|
||||
MusicScanner scanner( MusicScanner::DirScan, paths, 0 );
|
||||
|
||||
// We want a dry-run of the scanner and not update any internal data.
|
||||
scanner.showProgress( false );
|
||||
scanner.setDryRun( true );
|
||||
scanner.setVerbose( true );
|
||||
|
||||
@@ -68,4 +67,3 @@ main( int argc, char* argv[] )
|
||||
std::cerr << "Unknown path (type) given, cannot handle this." << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user