diff --git a/src/tools/macdeployqt/shared/shared.cpp b/src/tools/macdeployqt/shared/shared.cpp index 6ff269b36df..8d75cd705cc 100644 --- a/src/tools/macdeployqt/shared/shared.cpp +++ b/src/tools/macdeployqt/shared/shared.cpp @@ -663,17 +663,17 @@ void recursiveCopyAndDeploy(const QString &appBundlePath, const QList & QDir().mkpath(destinationPath); LogNormal() << "copy:" << sourcePath << destinationPath; - const bool isDwarfPath = sourcePath.endsWith("DWARF"); const QDir sourceDir(sourcePath); const QStringList files = sourceDir.entryList(QStringList() << QStringLiteral("*"), QDir::Files | QDir::NoDotAndDotDot); for (const QString &file : files) { + if (file.endsWith("_debug.dylib")) + continue; // Skip debug versions + const QString fileSourcePath = sourcePath + u'/' + file; - if (file.endsWith("_debug.dylib")) { - continue; // Skip debug versions - } else if (!isDwarfPath && file.endsWith(QStringLiteral(".dylib"))) { + if (file.endsWith(QStringLiteral(".dylib"))) { // App store code signing rules forbids code binaries in Contents/Resources/, // which poses a problem for deploying mixed .qml/.dylib Qt Quick imports. // Solve this by placing the dylibs in Contents/PlugIns/quick, and then @@ -715,6 +715,9 @@ void recursiveCopyAndDeploy(const QString &appBundlePath, const QList & const QStringList subdirs = sourceDir.entryList(QStringList() << QStringLiteral("*"), QDir::Dirs | QDir::NoDotAndDotDot); for (const QString &dir : subdirs) { + if (dir.endsWith(".dSYM")) + continue; + recursiveCopyAndDeploy(appBundlePath, rpaths, sourcePath + u'/' + dir, destinationPath + u'/' + dir); } }