summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-11-06 11:42:00 +0100
committerJani Heikkinen <jani.heikkinen@theqtcompany.com>2014-11-21 11:44:45 +0100
commit5060a0ec7dcb26826b19eefbd6063efcbde6101f (patch)
treef2ce3550305787587c1274852f12185a39f5e381
parent75041cd2744f2a90de21977cebdbf519c408f7b8 (diff)
macdeployqt: Also deploy framework's Libraries and Helpersv5.4.0
QtWebEngine can't put all its external data in qrc files and have a few files lying around in the Qt installation. To allow it to be bundled with applications, those files are now placed into the QtWebEngineCore framework. This patch allows Helpers/QtWebEngineProcess.app as well as Libraries/ffmpegsumo.so to be deployed when macdeployqt is run on an application linking to QtWebEngine. This link mention that Libraries is a standard directory: https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html This link mention that Helpers is a standard directory for application bundles, but I haven't seen any mention regarding frameworks: https://developer.apple.com/library/mac/technotes/tn2206/_index.html Task-number: QTBUG-41611 Change-Id: I27f662747bd3dff4b9fc8706ecbd2f16f057e857 (cherry picked from commit 5984871db094182b89d2b8e0b142817b227afa4d) Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
-rw-r--r--src/macdeployqt/shared/shared.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/macdeployqt/shared/shared.cpp b/src/macdeployqt/shared/shared.cpp
index a8716d753..a6f0d1220 100644
--- a/src/macdeployqt/shared/shared.cpp
+++ b/src/macdeployqt/shared/shared.cpp
@@ -381,8 +381,10 @@ QStringList getBinaryDependencies(const QString executablePath, const QString &p
}
// copies everything _inside_ sourcePath to destinationPath
-void recursiveCopy(const QString &sourcePath, const QString &destinationPath)
+bool recursiveCopy(const QString &sourcePath, const QString &destinationPath)
{
+ if (!QDir(sourcePath).exists())
+ return false;
QDir().mkpath(destinationPath);
LogNormal() << "copy:" << sourcePath << destinationPath;
@@ -398,6 +400,7 @@ void recursiveCopy(const QString &sourcePath, const QString &destinationPath)
foreach (QString dir, subdirs) {
recursiveCopy(sourcePath + "/" + dir, destinationPath + "/" + dir);
}
+ return true;
}
void recursiveCopyAndDeploy(const QString &appBundlePath, const QString &sourcePath, const QString &destinationPath)
@@ -516,10 +519,16 @@ QString copyFramework(const FrameworkInfo &framework, const QString path)
// Copy framework binary
copyFilePrintStatus(framework.sourceFilePath, frameworkDestinationBinaryPath);
- // Copy Resouces/
+ // Copy Resouces/, Libraries/ and Helpers/
const QString resourcesSourcePath = framework.frameworkPath + "/Resources";
const QString resourcesDestianationPath = frameworkDestinationDirectory + "/Versions/" + framework.version + "/Resources";
recursiveCopy(resourcesSourcePath, resourcesDestianationPath);
+ const QString librariesSourcePath = framework.frameworkPath + "/Libraries";
+ const QString librariesDestianationPath = frameworkDestinationDirectory + "/Versions/" + framework.version + "/Libraries";
+ bool createdLibraries = recursiveCopy(librariesSourcePath, librariesDestianationPath);
+ const QString helpersSourcePath = framework.frameworkPath + "/Helpers";
+ const QString helpersDestianationPath = frameworkDestinationDirectory + "/Versions/" + framework.version + "/Helpers";
+ bool createdHelpers = recursiveCopy(helpersSourcePath, helpersDestianationPath);
// Create symlink structure. Links at the framework root point to Versions/Current/
// which again points to the actual version:
@@ -528,6 +537,10 @@ QString copyFramework(const FrameworkInfo &framework, const QString path)
// QtFoo.framework/Versions/Current -> 5
linkFilePrintStatus("Versions/Current/" + framework.binaryName, frameworkDestinationDirectory + "/" + framework.binaryName);
linkFilePrintStatus("Versions/Current/Resources", frameworkDestinationDirectory + "/Resources");
+ if (createdLibraries)
+ linkFilePrintStatus("Versions/Current/Libraries", frameworkDestinationDirectory + "/Libraries");
+ if (createdHelpers)
+ linkFilePrintStatus("Versions/Current/Helpers", frameworkDestinationDirectory + "/Helpers");
linkFilePrintStatus(framework.version, frameworkDestinationDirectory + "/Versions/Current");
// Correct Info.plist location for frameworks produced by older versions of qmake