summaryrefslogtreecommitdiffstats
path: root/src/macdeployqt/macdeployqt/main.cpp
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@theqtcompany.com>2015-08-12 10:32:29 +0200
committerMorten Johan Sørvig <morten.sorvig@theqtcompany.com>2015-08-13 09:04:01 +0000
commitf14366819d1745b54c90a86ba8b0fdbd6dd246e1 (patch)
tree55552a46b9c194421b55fa43e292d275b5390597 /src/macdeployqt/macdeployqt/main.cpp
parent7a3718b02ca782c25ccc9de5c92664fccd6907bf (diff)
macdeployqt: halt on missing qmlimportscanner
This is going to produce a broken bundle; stop and print the error. Change-Id: Ie58d357b97adc229393d80e9dde5e10c65c9bc99 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Diffstat (limited to 'src/macdeployqt/macdeployqt/main.cpp')
-rw-r--r--src/macdeployqt/macdeployqt/main.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/macdeployqt/macdeployqt/main.cpp b/src/macdeployqt/macdeployqt/main.cpp
index 9dc53ae31..9c6e3fe03 100644
--- a/src/macdeployqt/macdeployqt/main.cpp
+++ b/src/macdeployqt/macdeployqt/main.cpp
@@ -87,6 +87,7 @@ int main(int argc, char **argv)
extern bool runStripEnabled;
extern bool alwaysOwerwriteEnabled;
QStringList additionalExecutables;
+ bool qmldirArgumentUsed = false;
QStringList qmlDirs;
extern bool runCodesign;
extern QString codesignIdentiy;
@@ -125,6 +126,7 @@ int main(int argc, char **argv)
additionalExecutables << argument.mid(index+1);
} else if (argument.startsWith(QByteArray("-qmldir"))) {
LogDebug() << "Argument found:" << argument;
+ qmldirArgumentUsed = true;
int index = argument.indexOf('=');
if (index == -1)
LogError() << "Missing qml directory path";
@@ -162,7 +164,9 @@ int main(int argc, char **argv)
}
if (!qmlDirs.isEmpty()) {
- deployQmlImports(appBundlePath, deploymentInfo, qmlDirs);
+ bool ok = deployQmlImports(appBundlePath, deploymentInfo, qmlDirs);
+ if (!ok && qmldirArgumentUsed)
+ return 1; // exit if the user explicitly asked for qml import deployment
// Update deploymentInfo.deployedFrameworks - the QML imports
// may have brought in extra frameworks as dependencies.