mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-01-18 19:50:38 +01:00
Make macdeployqt use environment variables for gstreamer
This commit is contained in:
parent
87dad82210
commit
9498638988
6
.github/workflows/ccpp.yml
vendored
6
.github/workflows/ccpp.yml
vendored
@ -1063,7 +1063,8 @@ jobs:
|
||||
PKG_CONFIG_PATH: /usr/local/lib/pkgconfig
|
||||
Qt6_DIR: /usr/local/opt/qt6/lib/cmake
|
||||
Qt5LinguistTools_DIR: /usr/local/opt/qt6/lib/cmake/Qt6LinguistTools
|
||||
GST_SCANNER_PATH: /usr/local/opt/gstreamer/libexec/gstreamer-1.0/gst-plugin-scanner
|
||||
GIO_EXTRA_MODULES: /usr/local/lib/gio/modules
|
||||
GST_PLUGIN_SCANNER: /usr/local/opt/gstreamer/libexec/gstreamer-1.0/gst-plugin-scanner
|
||||
GST_PLUGIN_PATH: /usr/local/lib/gstreamer-1.0
|
||||
working-directory: build
|
||||
run: cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_WITH_QT6=ON -DBUILD_WERROR=ON -DUSE_BUNDLE=ON -DCMAKE_PREFIX_PATH=/usr/local/opt/qt6/lib/cmake
|
||||
@ -1135,7 +1136,8 @@ jobs:
|
||||
PKG_CONFIG_PATH: /usr/local/lib/pkgconfig
|
||||
Qt5_DIR: /usr/local/opt/qt6/lib/cmake
|
||||
Qt5LinguistTools_DIR: /usr/local/opt/qt6/lib/cmake/Qt6LinguistTools
|
||||
GST_SCANNER_PATH: /usr/local/opt/gstreamer/libexec/gstreamer-1.0/gst-plugin-scanner
|
||||
GIO_EXTRA_MODULES: /usr/local/lib/gio/modules
|
||||
GST_PLUGIN_SCANNER: /usr/local/opt/gstreamer/libexec/gstreamer-1.0/gst-plugin-scanner
|
||||
GST_PLUGIN_PATH: /usr/local/lib/gstreamer-1.0
|
||||
working-directory: build
|
||||
run: cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_WITH_QT6=ON -DBUILD_WERROR=ON -DUSE_BUNDLE=ON -DCMAKE_PREFIX_PATH=/usr/local/opt/qt6/lib/cmake
|
||||
|
19
3rdparty/macdeployqt/shared.cpp
vendored
19
3rdparty/macdeployqt/shared.cpp
vendored
@ -1196,7 +1196,13 @@ void deployPlugins(const ApplicationBundleInfo &appBundleInfo, const QString &pl
|
||||
|
||||
// GIO modules
|
||||
{
|
||||
const QString sourcePath = "/usr/local/lib/gio/modules/libgiognutls.so";
|
||||
QString sourcePath = qgetenv("GIO_EXTRA_MODULES");
|
||||
if (sourcePath.isEmpty()) {
|
||||
sourcePath = "/usr/local/lib/gio/modules/libgiognutls.so";
|
||||
}
|
||||
else {
|
||||
sourcePath = sourcePath + "/libgiognutls.so";
|
||||
}
|
||||
const QString destinationPath = appBundleInfo.path + "/Contents/PlugIns/gio-modules/libgiognutls.so";
|
||||
QDir dir;
|
||||
if (dir.mkpath(QFileInfo(destinationPath).path()) && copyFilePrintStatus(sourcePath, destinationPath)) {
|
||||
@ -1208,7 +1214,10 @@ void deployPlugins(const ApplicationBundleInfo &appBundleInfo, const QString &pl
|
||||
|
||||
// gst-plugin-scanner
|
||||
{
|
||||
const QString sourcePath = "/usr/local/opt/gstreamer/libexec/gstreamer-1.0/gst-plugin-scanner";
|
||||
QString sourcePath = qgetenv("GST_PLUGIN_SCANNER");
|
||||
if (sourcePath.isEmpty()) {
|
||||
sourcePath = "/usr/local/opt/gstreamer/libexec/gstreamer-1.0/gst-plugin-scanner";
|
||||
}
|
||||
const QString destinationPath = appBundleInfo.path + "/" + "Contents/PlugIns/gst-plugin-scanner";
|
||||
QDir dir;
|
||||
if (dir.mkpath(QFileInfo(destinationPath).path()) && copyFilePrintStatus(sourcePath, destinationPath)) {
|
||||
@ -1269,7 +1278,11 @@ void deployPlugins(const ApplicationBundleInfo &appBundleInfo, const QString &pl
|
||||
<< "libgstlame.dylib"
|
||||
<< "libgstmusepack.dylib";
|
||||
|
||||
QString gstreamer_plugins_dir = "/usr/local/lib/gstreamer-1.0";
|
||||
QString gstreamer_plugins_dir = qgetenv("GST_PLUGIN_PATH");
|
||||
if (gstreamer_plugins_dir.isEmpty()) {
|
||||
gstreamer_plugins_dir = "/usr/local/lib/gstreamer-1.0";
|
||||
}
|
||||
|
||||
for (const QString &plugin : gstreamer_plugins) {
|
||||
const QString sourcePath = gstreamer_plugins_dir + "/" + plugin;
|
||||
const QString destinationPath = appBundleInfo.path + "/Contents/PlugIns/gstreamer/" + plugin;
|
||||
|
Loading…
Reference in New Issue
Block a user