macdeployqt: Skip dSYM bundles when deploying QML modules
The logic for deploying QML modules copies the entire QML module directory, which includes build artifacts such as dSYM bundles. It's unclear why we special case QML resources, as the needs of a Qt module to deploy its resources goes beyond QML, but that's for later investigations. For now let's skip the dSYM bundles explicitly. Fixes: QTBUG-56590 Pick-to: 6.7 6.5 6.2 Change-Id: I0f87c452ca3f8f58b0b2a407159881cff071eac0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 35801a6a8c6c5f1e89e5e3132ae103e7a3bf1812) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
591a9512a2
commit
a8ec0858a5
@ -663,17 +663,17 @@ void recursiveCopyAndDeploy(const QString &appBundlePath, const QList<QString> &
|
||||
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<QString> &
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user