summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-04-24 12:44:08 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-04-30 08:58:42 +0000
commitc401dd9059bf6ed204debba8a0d4930f76c38eb5 (patch)
tree772ad5ef925de3d5c081989ff0fa25cc78a1969c
parent975763169166961f66826998ac44d88ffe3e535e (diff)
windeployqt: Append Qt bin directory to path.v5.5.0-beta1
Ensure qt.conf is taken into account when running qmake -query. Task-number: QTBUG-39177 Change-Id: I0a8260033f49ddb21bf46ccbfe576ddb00db5679 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
-rw-r--r--src/windeployqt/main.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp
index a35068790..89bf64440 100644
--- a/src/windeployqt/main.cpp
+++ b/src/windeployqt/main.cpp
@@ -1350,6 +1350,14 @@ int main(int argc, char **argv)
QCoreApplication a(argc, argv);
QCoreApplication::setApplicationVersion(QLatin1String(QT_VERSION_STR));
+ const QByteArray qtBinPath = QFile::encodeName(QDir::toNativeSeparators(QCoreApplication::applicationDirPath()));
+ QByteArray path = qgetenv("PATH");
+ if (!path.contains(qtBinPath)) { // QTBUG-39177, ensure Qt is in the path so that qt.conf is taken into account.
+ path += ';';
+ path += qtBinPath;
+ qputenv("PATH", path);
+ }
+
Options options;
QString errorMessage;
const QMap<QString, QString> qmakeVariables = queryQMakeAll(&errorMessage);