Mac build fixes for musicbrainz integration.
This commit is contained in:
parent
05a4cae370
commit
703a3b43d6
31
dist/macdeploy.py
vendored
31
dist/macdeploy.py
vendored
@ -131,6 +131,22 @@ SCRIPT_PLUGINS_SEARCH_PATH = [
|
||||
'/Library/Python/2.6/site-packages',
|
||||
]
|
||||
|
||||
TUNEPIMP_PLUGINS = [
|
||||
'flac.tpp',
|
||||
'mp3.tpp',
|
||||
'mp4.tpp',
|
||||
'mpc.tpp',
|
||||
'speex.tpp',
|
||||
'tta.tpp',
|
||||
'vorbis.tpp',
|
||||
'wav.tpp',
|
||||
'wma.tpp',
|
||||
'wv.tpp',
|
||||
]
|
||||
TUNEPIMP_PLUGINS_SEARCH_PATH = [
|
||||
'/usr/local/lib/tunepimp/plugins',
|
||||
]
|
||||
|
||||
|
||||
class Error(Exception):
|
||||
pass
|
||||
@ -160,6 +176,10 @@ class CouldNotFindScriptPluginError(Error):
|
||||
pass
|
||||
|
||||
|
||||
class CouldNotFindTunepimpPluginError(Error):
|
||||
pass
|
||||
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print 'Usage: %s <bundle.app>' % sys.argv[0]
|
||||
|
||||
@ -380,6 +400,14 @@ def FindScriptPlugin(name):
|
||||
raise CouldNotFindScriptPluginError(name)
|
||||
|
||||
|
||||
def FindTunepimpPlugin(name):
|
||||
for path in TUNEPIMP_PLUGINS_SEARCH_PATH:
|
||||
if os.path.exists(path):
|
||||
if os.path.exists(os.path.join(path, name)):
|
||||
return os.path.join(path, name)
|
||||
raise CouldNotFindTunepimpPluginError(name)
|
||||
|
||||
|
||||
FixBinary(binary)
|
||||
|
||||
for plugin in GSTREAMER_PLUGINS:
|
||||
@ -393,6 +421,9 @@ for plugin in QT_PLUGINS:
|
||||
for plugin in SCRIPT_PLUGINS:
|
||||
FixPlugin(FindScriptPlugin(plugin), os.path.dirname(plugin))
|
||||
|
||||
for plugin in TUNEPIMP_PLUGINS:
|
||||
FixPlugin(FindTunepimpPlugin(plugin), 'tunepimp')
|
||||
|
||||
if len(sys.argv) <= 2:
|
||||
print 'Would run %d commands:' % len(commands)
|
||||
for command in commands:
|
||||
|
@ -18,11 +18,14 @@
|
||||
#include "tagfetcher.h"
|
||||
|
||||
#include <QtDebug>
|
||||
#include <QCoreApplication>
|
||||
#include <QFile>
|
||||
#include <QMutex>
|
||||
#include <QNetworkReply>
|
||||
#include <QStringList>
|
||||
|
||||
#include "version.h"
|
||||
|
||||
#ifdef HAVE_LIBTUNEPIMP
|
||||
|
||||
const char* kMusicBrainzLookupUrl = "http://musicbrainz.org/ws/1/track/?type=xml&puid=%1";
|
||||
@ -32,7 +35,18 @@ TagFetcher::TagFetcher(QObject *parent)
|
||||
network_(new NetworkAccessManager(this)),
|
||||
pimp_(NULL)
|
||||
{
|
||||
pimp_ = tp_New("FETCHTAG", "0.1");
|
||||
QString plugin_path =
|
||||
#ifdef Q_OS_DARWIN
|
||||
QCoreApplication::applicationDirPath() + "/../PlugIns/tunepimp";
|
||||
#else
|
||||
"";
|
||||
#endif
|
||||
pimp_ = tp_NewWithArgs(
|
||||
QCoreApplication::applicationName().toAscii().constData(),
|
||||
CLEMENTINE_VERSION,
|
||||
TP_THREAD_ALL,
|
||||
plugin_path.toLocal8Bit().constData());
|
||||
|
||||
tp_SetDebug(pimp_, true);
|
||||
tp_SetAutoSaveThreshold(pimp_, -1);
|
||||
tp_SetMoveFiles(pimp_, false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user