From 7a3718b02ca782c25ccc9de5c92664fccd6907bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Wed, 12 Aug 2015 08:45:06 +0200 Subject: macdeployqt: strip the application binary In addition to running 'strip' on the framework and plugin binaries. Change-Id: I90b1f50f8212d1399933d4cd5c35aaee8e5212f2 Task-number: QTBUG-17447 Reviewed-by: Timur Pocheptsov Reviewed-by: Gabriel de Dietrich --- src/macdeployqt/macdeployqt/main.cpp | 3 +++ src/macdeployqt/shared/shared.cpp | 5 +++++ src/macdeployqt/shared/shared.h | 1 + 3 files changed, 9 insertions(+) diff --git a/src/macdeployqt/macdeployqt/main.cpp b/src/macdeployqt/macdeployqt/main.cpp index 450d1144..9dc53ae3 100644 --- a/src/macdeployqt/macdeployqt/main.cpp +++ b/src/macdeployqt/macdeployqt/main.cpp @@ -177,6 +177,9 @@ int main(int argc, char **argv) createQtConf(appBundlePath); } + if (runStripEnabled) + stripAppBinary(appBundlePath); + if (runCodesign) codesign(codesignIdentiy, appBundlePath); diff --git a/src/macdeployqt/shared/shared.cpp b/src/macdeployqt/shared/shared.cpp index c5eb9f9d..2328ad5d 100644 --- a/src/macdeployqt/shared/shared.cpp +++ b/src/macdeployqt/shared/shared.cpp @@ -821,6 +821,11 @@ void runStrip(const QString &binaryPath) } } +void stripAppBinary(const QString &bundlePath) +{ + runStrip(findAppBinary(bundlePath)); +} + /* Deploys the the listed frameworks listed into an app bundle. The frameworks are searched for dependencies, which are also deployed. diff --git a/src/macdeployqt/shared/shared.h b/src/macdeployqt/shared/shared.h index c3cbf1d6..b561a5ed 100644 --- a/src/macdeployqt/shared/shared.h +++ b/src/macdeployqt/shared/shared.h @@ -104,6 +104,7 @@ void deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf void changeIdentification(const QString &id, const QString &binaryPath); void changeInstallName(const QString &oldName, const QString &newName, const QString &binaryPath); void runStrip(const QString &binaryPath); +void stripAppBinary(const QString &bundlePath); QString findAppBinary(const QString &appBundlePath); QStringList findAppFrameworkNames(const QString &appBundlePath); void codesignFile(const QString &identity, const QString &filePath); -- cgit v1.2.3