diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-22 03:02:30 +0200 |
---|---|---|
committer | Paul Wicking <paul.wicking@qt.io> | 2019-10-22 10:28:38 +0200 |
commit | b2f3eb655ccd1b6cc1c83a33b8a8157f406e91e3 (patch) | |
tree | 7de025c51d4994936306e4b30ebbfda16b51cba0 /src/macdeployqt/shared/shared.cpp | |
parent | 25ebbbf6f3ed849992692b247fc16ce079dedf86 (diff) | |
parent | 435a795b6ad899afe49e56130300ab0d966d0bd7 (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I5f916f50d54ba36f9dd5b6c2c9aa6ce7fa2172bb
Diffstat (limited to 'src/macdeployqt/shared/shared.cpp')
-rw-r--r-- | src/macdeployqt/shared/shared.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/macdeployqt/shared/shared.cpp b/src/macdeployqt/shared/shared.cpp index a43267ae4..454e72b7c 100644 --- a/src/macdeployqt/shared/shared.cpp +++ b/src/macdeployqt/shared/shared.cpp @@ -53,6 +53,7 @@ bool alwaysOwerwriteEnabled = false; bool runCodesign = false; QStringList librarySearchPath; QString codesignIdentiy; +bool hardenedRuntime = false; bool appstoreCompliant = false; int logLevel = 1; bool deployFramework = false; @@ -1371,11 +1372,18 @@ void codesignFile(const QString &identity, const QString &filePath) if (!runCodesign) return; - LogNormal() << "codesign" << filePath; + QString codeSignLogMessage = "codesign"; + if (hardenedRuntime) + codeSignLogMessage += ", enable hardned runtime"; + LogNormal() << codeSignLogMessage << filePath; + + QStringList codeSignOptions = { "--preserve-metadata=identifier,entitlements", "--force", "-s", + identity, filePath }; + if (hardenedRuntime) + codeSignOptions << "-o" << "runtime"; QProcess codesign; - codesign.start("codesign", QStringList() << "--preserve-metadata=identifier,entitlements" - << "--force" << "-s" << identity << filePath); + codesign.start("codesign", codeSignOptions); codesign.waitForFinished(-1); QByteArray err = codesign.readAllStandardError(); |