From f67db7ef92ca4038a11281ef1e8a8e7c96596136 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 30 Sep 2014 17:09:12 +0200 Subject: Fix patching of libexec path on Windows We place all libexec content into bin on Windows. Task-number: QTBUG-41599 Change-Id: I17c8c2f8183af210b416c1169b3f45c5ab0b0158 Reviewed-by: Alessandro Portale --- src/libs/installer/qtpatchoperation.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/libs/installer/qtpatchoperation.cpp b/src/libs/installer/qtpatchoperation.cpp index e9fbb65c5..e47baba77 100644 --- a/src/libs/installer/qtpatchoperation.cpp +++ b/src/libs/installer/qtpatchoperation.cpp @@ -57,7 +57,7 @@ using namespace QInstaller; static QHash generatePatchValueHash(const QByteArray &newQtPath, - const QHash &qmakeValueHash) + const QHash &qmakeValueHash, const QString &type) { QHash replaceHash; //first == searchstring: second == replace string char nativeSeperator = QDir::separator().toLatin1(); @@ -84,8 +84,15 @@ static QHash generatePatchValueHash(const QByteArray &ne QByteArray("qt_libspath=%1/lib").replace("%1/", newQtPath + nativeSeperator)); oldValue = qmakeValueHash.value(QLatin1String("QT_INSTALL_LIBEXECS")); - replaceHash.insert(QByteArray("qt_lbexpath=%1").replace("%1", oldValue), - QByteArray("qt_lbexpath=%1/libexec").replace("%1/", newQtPath + nativeSeperator)); + if (type == QLatin1String("windows")) { + replaceHash.insert(QByteArray("qt_lbexpath=%1").replace("%1", oldValue), + QByteArray("qt_lbexpath=%1/bin").replace("%1/", + newQtPath + nativeSeperator)); + } else { + replaceHash.insert(QByteArray("qt_lbexpath=%1").replace("%1", oldValue), + QByteArray("qt_lbexpath=%1/libexec").replace("%1/", + newQtPath + nativeSeperator)); + } oldValue = qmakeValueHash.value(QLatin1String("QT_INSTALL_BINS")); replaceHash.insert(QByteArray("qt_binspath=%1").replace("%1", oldValue), @@ -405,7 +412,7 @@ bool QtPatchOperation::performOperation() prefix += QLatin1Char('/'); //BEGIN - patch binary files - QHash patchValueHash = generatePatchValueHash(newQtPath, qmakeValueHash); + QHash patchValueHash = generatePatchValueHash(newQtPath, qmakeValueHash, type); foreach (QString fileName, filesToPatch) { fileName.prepend(prefix); -- cgit v1.2.3