summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2016-07-14 14:19:48 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2016-07-18 07:35:19 +0000
commit9245911e1ff533743341a9d7533d028bb3932515 (patch)
treed8b987d0e40cd7d12aaf7ac2c86895c6547bacda
parentb51f10e957dc0733b60d0d985c37a0ef43d9f26d (diff)
downloadqttools-9245911e1ff533743341a9d7533d028bb3932515.tar.gz
windeployqt: Fix option --dry-run
Suppress patching of Qt5Core and the creation of the translations directory when the option is set. Task-number: QTBUG-54765 Change-Id: I599925db49750014b54d4d8976f0ee4d05d6ca58 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-rw-r--r--src/windeployqt/main.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp
index 6c7835318..d11454717 100644
--- a/src/windeployqt/main.cpp
+++ b/src/windeployqt/main.cpp
@@ -254,7 +254,7 @@ struct Options {
, angleDetection(AngleDetectionAuto), softwareRasterizer(true), platform(Windows)
, additionalLibraries(0), disabledLibraries(0)
, updateFileFlags(0), json(0), list(ListNone), debugDetection(DebugDetectionAuto)
- , deployPdb(false) {}
+ , deployPdb(false), dryRun(false) {}
bool plugins;
bool libraries;
@@ -278,6 +278,7 @@ struct Options {
ListOption list;
DebugDetection debugDetection;
bool deployPdb;
+ bool dryRun;
inline bool isWinRtOrWinPhone() const {
return (platform == WinPhoneArm || platform == WinPhoneIntel
@@ -528,8 +529,10 @@ static inline int parseArguments(const QStringList &arguments, QCommandLineParse
if (parser->isSet(forceOption))
options->updateFileFlags |= ForceUpdateFile;
- if (parser->isSet(dryRunOption))
+ if (parser->isSet(dryRunOption)) {
+ options->dryRun = true;
options->updateFileFlags |= SkipUpdateFile;
+ }
for (size_t i = 0; i < qtModulesCount; ++i) {
if (parser->isSet(*enabledModules.at(int(i)).first.data()))
@@ -1359,7 +1362,7 @@ static DeployResult deploy(const Options &options,
return result;
}
- if (!options.isWinRtOrWinPhone()) {
+ if (!options.isWinRtOrWinPhone() && !options.dryRun) {
const QString qt5CoreName = QFileInfo(libraryPath(libraryLocation, "Qt5Core", qtLibInfix,
options.platform, isDebug)).fileName();
@@ -1437,10 +1440,11 @@ static DeployResult deploy(const Options &options,
} // optQuickImports
if (options.translations) {
- if (!createDirectory(options.translationsDirectory, errorMessage)
- || !deployTranslations(qmakeVariables.value(QStringLiteral("QT_INSTALL_TRANSLATIONS")),
- result.deployedQtLibraries, options.translationsDirectory,
- options.updateFileFlags, errorMessage)) {
+ if (!options.dryRun && !createDirectory(options.translationsDirectory, errorMessage))
+ return result;
+ if (!deployTranslations(qmakeVariables.value(QStringLiteral("QT_INSTALL_TRANSLATIONS")),
+ result.deployedQtLibraries, options.translationsDirectory,
+ options.updateFileFlags, errorMessage)) {
return result;
}
}