From 48d4c91556f773098aa1caa0a8af8d4f3064b4d1 Mon Sep 17 00:00:00 2001 From: probonopd Date: Mon, 5 Sep 2016 23:42:17 +0200 Subject: [PATCH] Remove more macOS specific code --- linuxdeployqt/main.cpp | 3 ++- shared/shared.cpp | 24 +++--------------------- shared/shared.h | 3 +-- 3 files changed, 6 insertions(+), 24 deletions(-) diff --git a/linuxdeployqt/main.cpp b/linuxdeployqt/main.cpp index c1d1387..9580887 100644 --- a/linuxdeployqt/main.cpp +++ b/linuxdeployqt/main.cpp @@ -177,7 +177,8 @@ int main(int argc, char **argv) // Update deploymentInfo.deployedFrameworks - the QML imports // may have brought in extra frameworks as dependencies. - deploymentInfo.deployedFrameworks += findAppFrameworkNames(appBundlePath); + // deploymentInfo.deployedFrameworks += findAppFrameworkNames(appBundlePath); + deploymentInfo.deployedFrameworks += findAppLibraries(appBundlePath); deploymentInfo.deployedFrameworks = deploymentInfo.deployedFrameworks.toSet().toList(); } diff --git a/shared/shared.cpp b/shared/shared.cpp index dbc49bd..b3ee495 100644 --- a/shared/shared.cpp +++ b/shared/shared.cpp @@ -131,7 +131,7 @@ bool linkFilePrintStatus(const QString &file, const QString &link) if (QFile(link).symLinkTarget().isEmpty()) LogError() << link << "exists but it's a file."; else - LogNormal() << "Symlink exists, skipping:" << link; + qDebug() << "Symlink exists, skipping:" << link; return false; } else if (QFile::link(file, link)) { LogNormal() << " symlink" << link; @@ -315,24 +315,6 @@ QString findAppBinary(const QString &appBundlePath) return QString(); } -QStringList findAppFrameworkNames(const QString &appBundlePath) -{ - QStringList frameworks; - - // populate the frameworks list with QtFoo.framework etc, - // as found in /Contents/Frameworks/ - QString searchPath = appBundlePath + bundleFrameworkDirectory; - QDirIterator iter(searchPath, QStringList() << QString::fromLatin1("*.framework"), QDir::Dirs); - while (iter.hasNext()) { - iter.next(); - frameworks << iter.fileInfo().fileName(); - } - - return frameworks; -} - - - QStringList findAppLibraries(const QString &appBundlePath) { QStringList result; @@ -606,7 +588,7 @@ void runStrip(const QString &binaryPath) return; if (strip.readAllStandardError().contains("Not enough room for program headers")) { - LogError() << QFileInfo(binaryPath).completeBaseName() << "already stripped."; + qDebug() << QFileInfo(binaryPath).completeBaseName() << "already stripped."; } else { LogError() << "Error stripping" << QFileInfo(binaryPath).completeBaseName() << ":" << strip.readAllStandardError(); LogError() << "Error stripping" << QFileInfo(binaryPath).completeBaseName() << ":" << strip.readAllStandardOutput(); @@ -648,7 +630,7 @@ DeploymentInfo deployQtFrameworks(QList frameworks, if (framework.frameworkDirectory.startsWith(bundlePath)) { - LogError() << framework.frameworkName << "already deployed, skipping."; + qDebug() << framework.frameworkName << "already deployed, skipping."; continue; } diff --git a/shared/shared.h b/shared/shared.h index 1fa1bf1..283031e 100644 --- a/shared/shared.h +++ b/shared/shared.h @@ -123,8 +123,7 @@ void changeInstallName(const QString &oldName, const QString &newName, const QSt void runStrip(const QString &binaryPath); void stripAppBinary(const QString &bundlePath); QString findAppBinary(const QString &appBundlePath); -QStringList findAppFrameworkNames(const QString &appBundlePath); -QStringList findAppFrameworkPaths(const QString &appBundlePath); +QStringList findAppLibraries(const QString &appBundlePath); void createAppImage(const QString &appBundlePath);