Phonon on windows, xine on everything else

This commit is contained in:
David Sansome 2010-02-21 21:55:03 +00:00
parent c16288874d
commit f8808baa1d
2 changed files with 28 additions and 19 deletions

View File

@ -1,9 +1,13 @@
#include "player.h"
#include "playlist.h"
#include "xine-engine.h"
#include "phononengine.h"
#include "lastfmservice.h"
#ifdef Q_OS_WIN32
# include "phononengine.h"
#else
# include "xine-engine.h"
#endif
#include <QtDebug>
#include <QtConcurrentRun>
@ -17,11 +21,11 @@ Player::Player(Playlist* playlist, LastFMService* lastfm, QObject* parent)
engine_(NULL),
init_engine_watcher_(new QFutureWatcher<bool>(this))
{
//#ifdef Q_OS_WIN32
#ifdef Q_OS_WIN32
engine_ = new PhononEngine;
//#else
// engine_ = new XineEngine;
//#endif
#else
engine_ = new XineEngine;
#endif
settings_.beginGroup("Player");

View File

@ -4,8 +4,7 @@ VERSION = 0.1
QT += sql \
network \
xml \
opengl \
phonon
opengl
TARGET = clementine
TEMPLATE = app
SOURCES += main.cpp \
@ -20,8 +19,6 @@ SOURCES += main.cpp \
analyzers/analyzerbase.cpp \
fht.cpp \
analyzers/blockanalyzer.cpp \
xine-engine.cpp \
xine-scope.c \
sliderwidget.cpp \
playlistview.cpp \
backgroundthread.cpp \
@ -54,8 +51,7 @@ SOURCES += main.cpp \
librarydirectorymodel.cpp \
libraryconfigdialog.cpp \
lastfmconfigdialog.cpp \
about.cpp \
phononengine.cpp
about.cpp
HEADERS += mainwindow.h \
player.h \
library.h \
@ -68,8 +64,6 @@ HEADERS += mainwindow.h \
analyzers/analyzerbase.h \
fht.h \
analyzers/blockanalyzer.h \
xine-engine.h \
xine-scope.h \
sliderwidget.h \
playlistview.h \
backgroundthread.h \
@ -109,8 +103,7 @@ HEADERS += mainwindow.h \
librarydirectorymodel.h \
libraryconfigdialog.h \
lastfmconfigdialog.h \
about.h \
phononengine.h
about.h
FORMS += mainwindow.ui \
libraryconfig.ui \
fileview.ui \
@ -128,6 +121,19 @@ OTHER_FILES += ../data/schema.sql \
../data/mainwindow.css
RC_FILE += ../dist/windres.rc
# Xine on unix, phonon on windows
win32|fedora-win32-cross {
QT += phonon
SOURCES += phononengine.cpp
HEADERS += phononengine.h
}
!win32:!fedora-win32-cross {
SOURCES += xine-engine.cpp \
xine-scope.c
HEADERS += xine-engine.h \
xine-scope.h
}
# Last.fm
LIBS += -llastfm
@ -153,7 +159,6 @@ LIBS += -llastfm
}
}
win32|fedora-win32-cross:LIBS += -ltag \
-lxine \
-lpthreadGC2
# OSD
@ -187,8 +192,8 @@ unix:!fedora-win32-cross:SOURCES += ../3rdparty/qtsingleapplication/qtlockedfile
win32|fedora-win32-cross:SOURCES += ../3rdparty/qtsingleapplication/qtlockedfile_win.cpp
# Hide the console on windows
#win32|fedora-win32-cross:LIBS += -Wl,-subsystem,windows
CONFIG += console
win32|fedora-win32-cross:LIBS += -Wl,-subsystem,windows
#CONFIG += console
# Installs
target.path = $${install_prefix}/bin/