From c401dd9059bf6ed204debba8a0d4930f76c38eb5 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 24 Apr 2015 12:44:08 +0200 Subject: [PATCH] windeployqt: Append Qt bin directory to path. Ensure qt.conf is taken into account when running qmake -query. Task-number: QTBUG-39177 Change-Id: I0a8260033f49ddb21bf46ccbfe576ddb00db5679 Reviewed-by: Oliver Wolff --- src/windeployqt/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp index a350687..89bf644 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 qmakeVariables = queryQMakeAll(&errorMessage); -- 2.7.4