summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArttu Tarkiainen <arttu.tarkiainen@qt.io>2021-04-14 17:56:42 +0300
committerArttu Tarkiainen <arttu.tarkiainen@qt.io>2021-04-27 11:48:38 +0000
commit35f79da9cb99c7c0456f002829dc0fdfe55b4f8d (patch)
treec923b8c145f6f11017502308d04f0ce2d9bc7a66
parent4daa21b7b974eebd373b061b90afe0d82f0617ae (diff)
CLI: Print warning when creating over 4GB installers on Windows
Task-number: QTIFW-2199 Change-Id: I56f3663ae605b2c568925702e06c4438e11830ac Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
-rw-r--r--src/libs/installer/packagemanagercore.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp
index 375cb6018..663304367 100644
--- a/src/libs/installer/packagemanagercore.cpp
+++ b/src/libs/installer/packagemanagercore.cpp
@@ -70,7 +70,8 @@
#include "updateoperationfactory.h"
#ifdef Q_OS_WIN
-# include "qt_windows.h"
+#include "qt_windows.h"
+#include <limits>
#endif
#include <QStandardPaths>
@@ -2760,6 +2761,13 @@ bool PackageManagerCore::checkAvailableSpace(QString &message) const
message = tr("The volume you selected for installation seems to have sufficient "
"space for installation, but there will be less than 100 MB available afterwards.");
}
+#ifdef Q_OS_WIN
+ if (isOfflineGenerator() && (required > UINT_MAX)) {
+ message = tr("The estimated installer size %1 would exceed the supported executable "
+ "size limit of %2. The application may not be able to run.")
+ .arg(humanReadableSize(required), humanReadableSize(UINT_MAX));
+ }
+#endif
}
message = QString::fromLatin1("%1 %2").arg(message, tr("Installation will use %1 of disk space.")
.arg(humanReadableSize(requiredDiskSpace()))).simplified();