summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@theqtcompany.com>2015-08-12 08:45:06 +0200
committerMorten Johan Sørvig <morten.sorvig@theqtcompany.com>2015-08-13 09:03:57 +0000
commit7a3718b02ca782c25ccc9de5c92664fccd6907bf (patch)
tree1ad6bad1c8e6b9f4fce5657e690ab2ffa27d3961
parent85e64f95c8637f876ba84dcbd01e375050e76d8c (diff)
downloadqttools-7a3718b02ca782c25ccc9de5c92664fccd6907bf.tar.gz
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 <timur.pocheptsov@theqtcompany.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
-rw-r--r--src/macdeployqt/macdeployqt/main.cpp3
-rw-r--r--src/macdeployqt/shared/shared.cpp5
-rw-r--r--src/macdeployqt/shared/shared.h1
3 files changed, 9 insertions, 0 deletions
diff --git a/src/macdeployqt/macdeployqt/main.cpp b/src/macdeployqt/macdeployqt/main.cpp
index 450d11447..9dc53ae31 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 c5eb9f9d0..2328ad5df 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 c3cbf1d67..b561a5ed9 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);