summaryrefslogtreecommitdiffstats
path: root/src/macdeployqt/shared/shared.cpp
diff options
context:
space:
mode:
authorSamuel Gaist <samuel.gaist@edeltech.ch>2018-01-18 08:09:51 +0100
committerSamuel Gaist <samuel.gaist@edeltech.ch>2018-01-23 13:49:51 +0000
commitb6713898a2eb277b7ed8cea0f3c3192124e0bb51 (patch)
tree083a62bdc042678492cb7267f3b70812c19d630a /src/macdeployqt/shared/shared.cpp
parentb9834c0651a46ec43c891ec097252af260429304 (diff)
macdeployqt: Implement selection of file system for .dmg file
With macOS High Sierra, Apple machines using SSD see their file system changed for APFS automatically. hdiutil by default uses the current file system to build the dmg file which in this case makes them unusable on older version of macOS that don't have support for APFS. This patch adds an additional option to macdeployqt to select the file system to use when building the .dmg. It defaults to HFS+ which was the official file system used until now for all currently supported version of macOS. [ChangeLog][macdeployqt][feature] Added support for selecting the file system type to use when building a .dmg file. Defaults to HFS+ to support a wider range of macOS versions. Task-number: QTBUG-65844 Change-Id: Ic66856344f96c6536b224d13d309715b34eb0874 Reviewed-by: André Hartmann <aha_1980@gmx.de>
Diffstat (limited to 'src/macdeployqt/shared/shared.cpp')
-rw-r--r--src/macdeployqt/shared/shared.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/macdeployqt/shared/shared.cpp b/src/macdeployqt/shared/shared.cpp
index 49dbe5426..90cfaf2ee 100644
--- a/src/macdeployqt/shared/shared.cpp
+++ b/src/macdeployqt/shared/shared.cpp
@@ -1493,7 +1493,7 @@ void codesign(const QString &identity, const QString &appBundlePath) {
codesignBundle(identity, appBundlePath, QList<QString>());
}
-void createDiskImage(const QString &appBundlePath)
+void createDiskImage(const QString &appBundlePath, const QString &filesystemType)
{
QString appBaseName = appBundlePath;
appBaseName.chop(4); // remove ".app" from end
@@ -1511,16 +1511,22 @@ void createDiskImage(const QString &appBundlePath)
LogNormal() << "Creating disk image (.dmg) for" << appBundlePath;
}
+ LogNormal() << "Image will use" << filesystemType;
+
// More dmg options can be found in the hdiutil man page.
QStringList options = QStringList()
<< "create" << dmgName
<< "-srcfolder" << appBundlePath
<< "-format" << "UDZO"
+ << "-fs" << filesystemType
<< "-volname" << appBaseName;
QProcess hdutil;
hdutil.start("hdiutil", options);
hdutil.waitForFinished(-1);
+ if (hdutil.exitCode() != 0) {
+ LogError() << "Bundle creation error:" << hdutil.readAllStandardError();
+ }
}
void fixupFramework(const QString &frameworkName)