summaryrefslogtreecommitdiffstats
path: root/src/macdeployqt/macdeployqt/main.cpp
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@digia.com>2014-03-24 09:18:35 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-26 10:25:18 +0100
commit15b56c2f8948de0aabfe44d7b3ccb0712d48c664 (patch)
tree22a1b556d3f92a2350e86f3004bdfa5ffcc7c46f /src/macdeployqt/macdeployqt/main.cpp
parent6b8a875f630a554a43edaadcf1d6312ed4f19ffd (diff)
MacDeployQt: Add -always-overwrite option.
Support incrementally re-deploying to an existing app bundle. Overwrite files that already exist in the bundle. Disable the "Can not find Qt" warning. Skip plugin deployment if Qt can not be found. Remove usages of the Qt4-style binary packages from /Developer. Task-number: QTBUG-36043 Change-Id: I11d1e36e6beef24b55979fc4d853e19b60551740 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/macdeployqt/macdeployqt/main.cpp')
-rw-r--r--src/macdeployqt/macdeployqt/main.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/macdeployqt/macdeployqt/main.cpp b/src/macdeployqt/macdeployqt/main.cpp
index 811e5d610..b4881789e 100644
--- a/src/macdeployqt/macdeployqt/main.cpp
+++ b/src/macdeployqt/macdeployqt/main.cpp
@@ -58,6 +58,7 @@ int main(int argc, char **argv)
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() << " -qmldir=<path> : Deploy imports used by .qml files in the given path";
+ qDebug() << " -always-overwrite : Copy files enven if the target file exists";
qDebug() << "";
qDebug() << "macdeployqt takes an application bundle as input and makes it";
qDebug() << "self-contained by copying in the Qt frameworks and plugins that";
@@ -85,6 +86,7 @@ int main(int argc, char **argv)
bool dmg = false;
bool useDebugLibs = false;
extern bool runStripEnabled;
+ extern bool alwaysOwerwriteEnabled;
QStringList additionalExecutables;
QStringList qmlDirs;
@@ -126,6 +128,9 @@ int main(int argc, char **argv)
LogError() << "Missing qml directory path";
else
qmlDirs << argument.mid(index+1);
+ } else if (argument == QByteArray("-always-overwrite")) {
+ LogDebug() << "Argument found:" << argument;
+ alwaysOwerwriteEnabled = true;
} else if (argument.startsWith("-")) {
LogError() << "Unknown argument" << argument << "\n";
return 0;
@@ -134,12 +139,8 @@ int main(int argc, char **argv)
DeploymentInfo deploymentInfo = deployQtFrameworks(appBundlePath, additionalExecutables, useDebugLibs);
- if (plugins) {
- if (deploymentInfo.qtPath.isEmpty())
- deploymentInfo.pluginPath = "/Developer/Applications/Qt/plugins"; // Assume binary package.
- else
- deploymentInfo.pluginPath = deploymentInfo.qtPath + "/plugins";
-
+ if (plugins && !deploymentInfo.qtPath.isEmpty()) {
+ deploymentInfo.pluginPath = deploymentInfo.qtPath + "/plugins";
LogNormal();
deployPlugins(appBundlePath, deploymentInfo, useDebugLibs);
createQtConf(appBundlePath);