From edd088927da4cff3d23f4d7f553d648cca0d25bc Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Wed, 4 May 2022 23:11:53 +0200 Subject: [PATCH] macdeployqt: List missing gstreamer plugins instead of failing Fixes #936 --- 3rdparty/macdeployqt/shared.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/3rdparty/macdeployqt/shared.cpp b/3rdparty/macdeployqt/shared.cpp index 04a0eff7c..155492077 100644 --- a/3rdparty/macdeployqt/shared.cpp +++ b/3rdparty/macdeployqt/shared.cpp @@ -1228,13 +1228,15 @@ void deployPlugins(const ApplicationBundleInfo &appBundleInfo, const QString &pl } const QStringList giomodules = QStringList() << "libgiognutls.so" << "libgioopenssl.so"; + bool have_giomodule = false; for (const QString &giomodule : giomodules) { const QString sourcePath = giomodule_path + "/" + giomodule; QFileInfo fileinfo(sourcePath); if (!fileinfo.exists()) { LogError() << "Missing GIO module" << fileinfo.baseName(); - qFatal("Missing GIO modules."); + continue; } + have_giomodule = true; const QString destinationPath = appBundleInfo.path + "/Contents/PlugIns/gio-modules/" + giomodule; QDir dir; if (dir.mkpath(QFileInfo(destinationPath).path()) && copyFilePrintStatus(sourcePath, destinationPath)) { @@ -1243,6 +1245,11 @@ void deployPlugins(const ApplicationBundleInfo &appBundleInfo, const QString &pl deployQtFrameworks(frameworks, appBundleInfo.path, QStringList() << destinationPath, useDebugLibs, deploymentInfo.useLoaderPath); } } + + if (!have_giomodule) { + qFatal("Missing GIO modules."); + } + } // gst-plugin-scanner @@ -1336,13 +1343,16 @@ void deployPlugins(const ApplicationBundleInfo &appBundleInfo, const QString &pl } } + QStringList missing_gst_plugins; + for (const QString &plugin : gstreamer_plugins) { QFileInfo info(gstreamer_plugins_dir + "/" + plugin); if (!info.exists()) { info.setFile(gstreamer_plugins_dir + "/" + info.baseName() + QString(".so")); if (!info.exists()) { LogError() << "Missing gstreamer plugin" << info.baseName(); - qFatal("Missing %s", info.baseName().toUtf8().constData()); + missing_gst_plugins << info.baseName(); + continue; } } const QString &sourcePath = info.filePath(); @@ -1354,6 +1364,10 @@ void deployPlugins(const ApplicationBundleInfo &appBundleInfo, const QString &pl } } + if (!missing_gst_plugins.isEmpty()) { + LogError() << "Missing gstreamer plugins" << missing_gst_plugins; + } + } void createQtConf(const QString &appBundlePath)