mirror of
https://github.com/clementine-player/Clementine
synced 2025-02-07 06:35:15 +01:00
Mac deployment fixes for gstreamer.
This commit is contained in:
parent
d51c7444ab
commit
821baa2211
62
macdeploy.py
62
macdeploy.py
@ -21,7 +21,7 @@ import subprocess
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
FRAMEWORK_SEARCH_PATH=[
|
FRAMEWORK_SEARCH_PATH=[
|
||||||
# '/usr/local/Trolltech/Qt-4.7.0/lib',
|
'/usr/local/Trolltech/Qt-4.7.0/lib',
|
||||||
'/Library/Frameworks',
|
'/Library/Frameworks',
|
||||||
os.path.join(os.environ['HOME'], 'Library/Frameworks')
|
os.path.join(os.environ['HOME'], 'Library/Frameworks')
|
||||||
]
|
]
|
||||||
@ -53,6 +53,45 @@ XINEPLUGIN_SEARCH_PATH=[
|
|||||||
'/sw/lib/xine/plugins',
|
'/sw/lib/xine/plugins',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
GSTREAMER_PLUGINS=[
|
||||||
|
# Core plugins
|
||||||
|
'libgstaudioconvert.so',
|
||||||
|
'libgstaudioresample.so',
|
||||||
|
'libgstautodetect.so',
|
||||||
|
'libgstcoreelements.so',
|
||||||
|
'libgstdecodebin.so',
|
||||||
|
'libgstgio.so',
|
||||||
|
'libgstladspa.so',
|
||||||
|
'libgstosxaudio.so',
|
||||||
|
'libgsttypefindfunctions.so',
|
||||||
|
'libgstvolume.so',
|
||||||
|
|
||||||
|
# Codecs
|
||||||
|
'libgstaacparse.so',
|
||||||
|
'libgstaiff.so',
|
||||||
|
'libgstequalizer.so',
|
||||||
|
'libgstfaac.so',
|
||||||
|
'libgstfaad.so',
|
||||||
|
'libgstflac.so',
|
||||||
|
'libgstid3demux.so',
|
||||||
|
'libgstmad.so',
|
||||||
|
'libgstmpegaudioparse.so',
|
||||||
|
'libgstmusepack.so',
|
||||||
|
'libgstogg.so',
|
||||||
|
'libgstpnm.so',
|
||||||
|
'libgstvorbis.so',
|
||||||
|
|
||||||
|
# HTTP src support
|
||||||
|
'libgstneonhttpsrc.so',
|
||||||
|
]
|
||||||
|
|
||||||
|
GSTREAMER_SEARCH_PATH=[
|
||||||
|
'/usr/local/gstreamer-0.10',
|
||||||
|
'/usr/local/gstreamer-0.10/gstreamer-0.10',
|
||||||
|
'/sw/lib/gstreamer-0.10',
|
||||||
|
'/sw/lib/gstreamer-0.10/gstreamer-0.10',
|
||||||
|
]
|
||||||
|
|
||||||
QT_PLUGINS = [
|
QT_PLUGINS = [
|
||||||
'accessible/libqtaccessiblewidgets.dylib',
|
'accessible/libqtaccessiblewidgets.dylib',
|
||||||
'codecs/libqcncodecs.dylib',
|
'codecs/libqcncodecs.dylib',
|
||||||
@ -69,7 +108,7 @@ QT_PLUGINS = [
|
|||||||
'sqldrivers/libqsqlite.dylib',
|
'sqldrivers/libqsqlite.dylib',
|
||||||
]
|
]
|
||||||
QT_PLUGINS_SEARCH_PATH=[
|
QT_PLUGINS_SEARCH_PATH=[
|
||||||
# '/usr/local/Trolltech/Qt-4.7.0/plugins',
|
'/usr/local/Trolltech/Qt-4.7.0/plugins',
|
||||||
'/Developer/Applications/Qt/plugins',
|
'/Developer/Applications/Qt/plugins',
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -94,6 +133,10 @@ class CouldNotFindQtPluginError(Error):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class CouldNotFindGstreamerPluginError(Error):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
if len(sys.argv) < 2:
|
if len(sys.argv) < 2:
|
||||||
print 'Usage: %s <bundle.app>' % sys.argv[0]
|
print 'Usage: %s <bundle.app>' % sys.argv[0]
|
||||||
|
|
||||||
@ -286,10 +329,21 @@ def FindQtPlugin(name):
|
|||||||
raise CouldNotFindQtPluginError(name)
|
raise CouldNotFindQtPluginError(name)
|
||||||
|
|
||||||
|
|
||||||
|
def FindGstreamerPlugin(name):
|
||||||
|
for path in GSTREAMER_SEARCH_PATH:
|
||||||
|
if os.path.exists(path):
|
||||||
|
for dir, dirs, files in os.walk(path):
|
||||||
|
if name in files:
|
||||||
|
return os.path.join(dir, name)
|
||||||
|
raise CouldNotFindGstreamerPluginError(name)
|
||||||
|
|
||||||
|
|
||||||
FixBinary(binary)
|
FixBinary(binary)
|
||||||
|
|
||||||
for plugin in XINE_PLUGINS:
|
for plugin in GSTREAMER_PLUGINS:
|
||||||
FixPlugin(FindXinePlugin(plugin), 'xine')
|
FixPlugin(FindGstreamerPlugin(plugin), 'gstreamer')
|
||||||
|
|
||||||
|
FixPlugin(FindGstreamerPlugin('gst-plugin-scanner'), '.')
|
||||||
|
|
||||||
for plugin in QT_PLUGINS:
|
for plugin in QT_PLUGINS:
|
||||||
FixPlugin(FindQtPlugin(plugin), os.path.dirname(plugin))
|
FixPlugin(FindQtPlugin(plugin), os.path.dirname(plugin))
|
||||||
|
@ -59,7 +59,16 @@ bool GstEnginePipeline::Init(const QUrl &url) {
|
|||||||
// audiosink
|
// audiosink
|
||||||
|
|
||||||
// Source
|
// Source
|
||||||
|
#ifdef Q_OS_DARWIN
|
||||||
|
// giosrc from Fink does not support HTTP.
|
||||||
|
if (url.scheme() == "http") {
|
||||||
|
src_ = GstEngine::CreateElement("neonhttpsrc");
|
||||||
|
} else {
|
||||||
|
src_ = GstEngine::CreateElement("giosrc");
|
||||||
|
}
|
||||||
|
#else
|
||||||
src_ = GstEngine::CreateElement("giosrc");
|
src_ = GstEngine::CreateElement("giosrc");
|
||||||
|
#endif
|
||||||
if (!src_)
|
if (!src_)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -57,6 +57,7 @@ bool GlobalShortcuts::RegisterGnome() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool GlobalShortcuts::RegisterQxt() {
|
bool GlobalShortcuts::RegisterQxt() {
|
||||||
|
#ifndef Q_OS_DARWIN
|
||||||
QxtGlobalShortcut* play_pause = new QxtGlobalShortcut(QKeySequence("Media Play"), this);
|
QxtGlobalShortcut* play_pause = new QxtGlobalShortcut(QKeySequence("Media Play"), this);
|
||||||
QxtGlobalShortcut* stop = new QxtGlobalShortcut(QKeySequence("Media Stop"), this);
|
QxtGlobalShortcut* stop = new QxtGlobalShortcut(QKeySequence("Media Stop"), this);
|
||||||
QxtGlobalShortcut* next = new QxtGlobalShortcut(QKeySequence("Media Next"), this);
|
QxtGlobalShortcut* next = new QxtGlobalShortcut(QKeySequence("Media Next"), this);
|
||||||
@ -66,6 +67,7 @@ bool GlobalShortcuts::RegisterQxt() {
|
|||||||
connect(stop, SIGNAL(activated()), SIGNAL(Stop()));
|
connect(stop, SIGNAL(activated()), SIGNAL(Stop()));
|
||||||
connect(next, SIGNAL(activated()), SIGNAL(Next()));
|
connect(next, SIGNAL(activated()), SIGNAL(Next()));
|
||||||
connect(prev, SIGNAL(activated()), SIGNAL(Previous()));
|
connect(prev, SIGNAL(activated()), SIGNAL(Previous()));
|
||||||
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -115,6 +115,14 @@ int main(int argc, char *argv[]) {
|
|||||||
MPRIS mpris;
|
MPRIS mpris;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef Q_OS_DARWIN
|
||||||
|
QString scanner_path = QCoreApplication::applicationDirPath() + "/../PlugIns/gst-plugin-scanner";
|
||||||
|
QString plugin_path = QCoreApplication::applicationDirPath() + "/../PlugIns/gstreamer";
|
||||||
|
setenv("GST_PLUGIN_SCANNER", scanner_path.toAscii().constData(), 1);
|
||||||
|
setenv("GST_PLUGIN_PATH", plugin_path.toAscii().constData(), 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// Window
|
// Window
|
||||||
MainWindow w(&network);;
|
MainWindow w(&network);;
|
||||||
a.setActivationWindow(&w);
|
a.setActivationWindow(&w);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user