1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-01-31 19:45:31 +01:00

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

View File

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