summaryrefslogtreecommitdiffstats
path: root/src/macdeployqt/macdeployqt/main.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@nokia.com>2011-09-14 14:14:34 +0200
committerQt by Nokia <qt-info@nokia.com>2012-02-01 14:04:30 +0100
commit42076738c5c73b2bc61d021fa02a06e46ef46bce (patch)
treede3e3e3c132e812c898c13a7919fda8d9185d48c /src/macdeployqt/macdeployqt/main.cpp
parent7e521f6539ed325b7b97ffaf83f3b9abe715c513 (diff)
Add the possibility to patch additional executables.
Change-Id: I47ecf04f538e094fe67110e627a5f17a34438df9 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Diffstat (limited to 'src/macdeployqt/macdeployqt/main.cpp')
-rw-r--r--src/macdeployqt/macdeployqt/main.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/macdeployqt/macdeployqt/main.cpp b/src/macdeployqt/macdeployqt/main.cpp
index 688756df1..ec1253658 100644
--- a/src/macdeployqt/macdeployqt/main.cpp
+++ b/src/macdeployqt/macdeployqt/main.cpp
@@ -51,11 +51,12 @@ int main(int argc, char **argv)
qDebug() << "Usage: macdeployqt app-bundle [options]";
qDebug() << "";
qDebug() << "Options:";
- qDebug() << " -verbose=<0-3> : 0 = no output, 1 = error/warning (default), 2 = normal, 3 = debug";
- qDebug() << " -no-plugins : Skip plugin deployment";
- qDebug() << " -dmg : Create a .dmg disk image";
- qDebug() << " -no-strip : Don't run 'strip' on the binaries";
- qDebug() << " -use-debug-libs : Deploy with debug versions of frameworks and plugins (implies -no-strip)";
+ qDebug() << " -verbose=<0-3> : 0 = no output, 1 = error/warning (default), 2 = normal, 3 = debug";
+ qDebug() << " -no-plugins : Skip plugin deployment";
+ qDebug() << " -dmg : Create a .dmg disk image";
+ qDebug() << " -no-strip : Don't run 'strip' on the binaries";
+ qDebug() << " -use-debug-libs : Deploy with debug versions of frameworks and plugins (implies -no-strip)";
+ qDebug() << " -executable=<path> : Let the given executable use the deployed frameworks too";
qDebug() << "";
qDebug() << "macdeployqt takes an application bundle as input and makes it";
qDebug() << "self-contained by copying in the Qt frameworks and plugins that";
@@ -83,6 +84,7 @@ int main(int argc, char **argv)
bool dmg = false;
bool useDebugLibs = false;
extern bool runStripEnabled;
+ QStringList additionalExecutables;
for (int i = 2; i < argc; ++i) {
QByteArray argument = QByteArray(argv[i]);
@@ -108,13 +110,20 @@ int main(int argc, char **argv)
LogError() << "Could not parse verbose level";
else
logLevel = number;
+ } else if (argument.startsWith(QByteArray("-executable"))) {
+ LogDebug() << "Argument found:" << argument;
+ int index = argument.indexOf("=");
+ if (index < 0 || index >= argument.size())
+ LogError() << "Missing executable path";
+ else
+ additionalExecutables << argument.mid(index+1);
} else if (argument.startsWith("-")) {
LogError() << "Unknown argument" << argument << "\n";
return 0;
}
}
- DeploymentInfo deploymentInfo = deployQtFrameworks(appBundlePath, useDebugLibs);
+ DeploymentInfo deploymentInfo = deployQtFrameworks(appBundlePath, additionalExecutables, useDebugLibs);
if (plugins) {
if (deploymentInfo.qtPath.isEmpty())