diff options
22 files changed, 5 insertions, 761 deletions
@@ -38,6 +38,7 @@ - Improved documentation. (QTIFW-526) - Updated and improved translations. - Removed SetQtCreatorArrayValue, AddQtCreatorArrayValue operations. +- Removed ApplyProductKey, ReplaceInstallNames, QtPatch operations. Thanks go to Christoph VogtlÃĪnder, Sze Howe Koh, Ray Donnelly, Tasuku Suzuki and Sascha Cunz for contributions. diff --git a/src/libs/installer/applyproductkeyoperation.cpp b/src/libs/installer/applyproductkeyoperation.cpp deleted file mode 100644 index 01c46a0a2..000000000 --- a/src/libs/installer/applyproductkeyoperation.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/************************************************************************** -** -** Copyright (C) 2012-2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Installer Framework. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** -** $QT_END_LICENSE$ -** -**************************************************************************/ - -#include "applyproductkeyoperation.h" -#include "productkeycheck.h" - -using namespace QInstaller; - -ApplyProductKeyOperation::ApplyProductKeyOperation() -{ - setName(QLatin1String("ApplyProductKey")); -} - -void ApplyProductKeyOperation::backup() -{ -} - -bool ApplyProductKeyOperation::performOperation() -{ - if (!ProductKeyCheck::instance()->applyKey(arguments())) { - setError(UserDefinedError); - setErrorString(ProductKeyCheck::instance()->lastErrorString()); - return false; - } - return true; -} - -bool ApplyProductKeyOperation::undoOperation() -{ - return true; -} - -bool ApplyProductKeyOperation::testOperation() -{ - return true; -} - -Operation *ApplyProductKeyOperation::clone() const -{ - return new ApplyProductKeyOperation(); -} diff --git a/src/libs/installer/applyproductkeyoperation.h b/src/libs/installer/applyproductkeyoperation.h deleted file mode 100644 index 0573181de..000000000 --- a/src/libs/installer/applyproductkeyoperation.h +++ /dev/null @@ -1,56 +0,0 @@ -/************************************************************************** -** -** Copyright (C) 2012-2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Installer Framework. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** -** $QT_END_LICENSE$ -** -**************************************************************************/ - -#ifndef APPLYPRODUCTKEYOPERATION_H -#define APPLYPRODUCTKEYOPERATION_H - -#include "qinstallerglobal.h" - -namespace QInstaller { - -class INSTALLER_EXPORT ApplyProductKeyOperation : public Operation -{ -public: - ApplyProductKeyOperation(); - - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); - Operation *clone() const; -}; - -} // namespace - -#endif // APPLYPRODUCTKEYOPERATION_H diff --git a/src/libs/installer/init.cpp b/src/libs/installer/init.cpp index fcd14f3f2..5d9f8a162 100644 --- a/src/libs/installer/init.cpp +++ b/src/libs/installer/init.cpp @@ -51,16 +51,9 @@ #include "linereplaceoperation.h" #include "minimumprogressoperation.h" #include "licenseoperation.h" -#include "applyproductkeyoperation.h" #include "settingsoperation.h" - -// QtSDK specific -#include "qtpatchoperation.h" #include "consumeoutputoperation.h" -#ifdef Q_OS_OSX -# include "macreplaceinstallnamesoperation.h" -#endif // Q_OS_OSX #include "utils.h" @@ -130,7 +123,6 @@ static void initArchives() #if defined(QT_STATIC) static void initResources() { - Q_INIT_RESOURCE(patch_file_lists); Q_INIT_RESOURCE(installer); } #endif @@ -228,17 +220,10 @@ void QInstaller::init() factory.registerUpdateOperation<LineReplaceOperation>(QLatin1String("LineReplace")); factory.registerUpdateOperation<MinimumProgressOperation>(QLatin1String("MinimumProgress")); factory.registerUpdateOperation<LicenseOperation>(QLatin1String("License")); - factory.registerUpdateOperation<ApplyProductKeyOperation>(QLatin1String("ApplyProductKey")); factory.registerUpdateOperation<ConsumeOutputOperation>(QLatin1String("ConsumeOutput")); factory.registerUpdateOperation<SettingsOperation>(QLatin1String("Settings")); - // QtSDK specific - factory.registerUpdateOperation<QtPatchOperation>(QLatin1String("QtPatch")); - FileDownloaderFactory::setFollowRedirects(true); -#ifdef Q_OS_OSX - factory.registerUpdateOperation<MacReplaceInstallNamesOperation>(QLatin1String("ReplaceInstallNames")); -#endif // Q_OS_OSX qInstallMessageHandler(messageHandler); } diff --git a/src/libs/installer/installer.pro b/src/libs/installer/installer.pro index 3e69b4e1b..aa9d4b099 100644 --- a/src/libs/installer/installer.pro +++ b/src/libs/installer/installer.pro @@ -51,7 +51,6 @@ HEADERS += packagemanagercore.h \ componentmodel.h \ qinstallerglobal.h \ qtpatch.h \ - qtpatchoperation.h \ consumeoutputoperation.h \ replaceoperation.h \ linereplaceoperation.h \ @@ -88,7 +87,6 @@ HEADERS += packagemanagercore.h \ link.h \ createlinkoperation.h \ packagemanagercoredata.h \ - applyproductkeyoperation.h \ globals.h \ graph.h \ settingsoperation.h \ @@ -135,7 +133,6 @@ SOURCES += packagemanagercore.cpp \ scriptengine.cpp \ componentmodel.cpp \ qtpatch.cpp \ - qtpatchoperation.cpp \ consumeoutputoperation.cpp \ replaceoperation.cpp \ linereplaceoperation.cpp \ @@ -169,7 +166,6 @@ SOURCES += packagemanagercore.cpp \ link.cpp \ createlinkoperation.cpp \ packagemanagercoredata.cpp \ - applyproductkeyoperation.cpp \ globals.cpp \ settingsoperation.cpp \ testrepository.cpp \ @@ -194,18 +190,13 @@ SOURCES += packagemanagercore.cpp \ FORMS += proxycredentialsdialog.ui -RESOURCES += resources/patch_file_lists.qrc \ - resources/installer.qrc +RESOURCES += resources/installer.qrc -macx { - HEADERS += \ - macreplaceinstallnamesoperation.h - SOURCES += adminauthorization_mac.cpp \ - macreplaceinstallnamesoperation.cpp +unix { + osx: SOURCES += adminauthorization_mac.cpp + else: SOURCES += adminauthorization_x11.cpp } -unix:!macx:SOURCES += adminauthorization_x11.cpp - LIBS += -l7z win32 { SOURCES += adminauthorization_win.cpp sysinfo_win.cpp diff --git a/src/libs/installer/macreplaceinstallnamesoperation.cpp b/src/libs/installer/macreplaceinstallnamesoperation.cpp deleted file mode 100644 index 10869d964..000000000 --- a/src/libs/installer/macreplaceinstallnamesoperation.cpp +++ /dev/null @@ -1,237 +0,0 @@ -/************************************************************************** -** -** Copyright (C) 2012-2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Installer Framework. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** -** $QT_END_LICENSE$ -** -**************************************************************************/ - -#include "macreplaceinstallnamesoperation.h" - -#include "qprocesswrapper.h" - -#include <QBuffer> -#include <QDebug> -#include <QDirIterator> - -using namespace QInstaller; - -MacReplaceInstallNamesOperation::MacReplaceInstallNamesOperation() -{ - setName(QLatin1String("ReplaceInstallNames")); -} - -void MacReplaceInstallNamesOperation::backup() -{ -} - -bool MacReplaceInstallNamesOperation::performOperation() -{ - // Arguments: - // 1. search string, means the beginning till that string will be replaced - // 2. new/current target install directory(the replacement) - // 3. directory containing frameworks - // 4. other directory containing frameworks - // 5. other directory containing frameworks - // 6. ... - - if (arguments().count() < 3) { - setError(InvalidArguments); - setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") - .arg(name()).arg(arguments().count()).arg(tr("at least 3"), QLatin1String(""))); - return false; - } - - const QString searchString = arguments().at(0); - const QString installationDir = arguments().at(1); - const QStringList searchDirList = arguments().mid(2); - if (searchString.isEmpty() || installationDir.isEmpty() || searchDirList.isEmpty()) { - setError(InvalidArguments); - setErrorString(tr("One of the given arguments is empty. Argument1=%1; Argument2=%2, Argument3=%3") - .arg(searchString, installationDir, searchDirList.join(QLatin1String(" ")))); - return false; - } - foreach (const QString &searchDir, searchDirList) - apply(searchString, installationDir, searchDir); - - return error() == NoError; -} - -bool MacReplaceInstallNamesOperation::undoOperation() -{ - return true; -} - -bool MacReplaceInstallNamesOperation::testOperation() -{ - return true; -} - -Operation *MacReplaceInstallNamesOperation::clone() const -{ - return new MacReplaceInstallNamesOperation; -} - -QSet<MacBinaryInfo> MacReplaceInstallNamesOperation::collectPatchableBinaries(const QString &searchDir) -{ - QSet<MacBinaryInfo> patchableBinaries; - QDirIterator dirIterator(searchDir, QDirIterator::Subdirectories); - while (dirIterator.hasNext()) { - const QString fileName = dirIterator.next(); - const QFileInfo fileInfo = dirIterator.fileInfo(); - if (fileInfo.isDir() || fileInfo.isSymLink()) - continue; - - MacBinaryInfo binaryInfo; - binaryInfo.fileName = fileName; - - // try to find libraries in frameworks - if (fileName.contains(QLatin1String(".framework/")) && !fileName.contains(QLatin1String("/Headers/")) - && updateExecutableInfo(&binaryInfo) == 0) { - patchableBinaries.insert(binaryInfo); - } else if (fileName.endsWith(QLatin1String(".dylib")) && updateExecutableInfo(&binaryInfo) == 0) { - patchableBinaries.insert(binaryInfo); - } // the endsWith checks are here because there might be wrongly committed files in the repositories - else if (dirIterator.fileInfo().isExecutable() && !fileName.endsWith(QLatin1String(".h")) - && !fileName.endsWith(QLatin1String(".cpp")) && !fileName.endsWith(QLatin1String(".pro")) - && !fileName.endsWith(QLatin1String(".pri")) && updateExecutableInfo(&binaryInfo) == 0) { - patchableBinaries.insert(binaryInfo); - } - } - return patchableBinaries; -} - -bool MacReplaceInstallNamesOperation::apply(const QString &searchString, const QString &replacement, - const QString &searchDir) -{ - foreach (const MacBinaryInfo &info, collectPatchableBinaries(searchDir)) - relocateBinary(info, searchString, replacement); - - return error() == NoError; -} - -int MacReplaceInstallNamesOperation::updateExecutableInfo(MacBinaryInfo *binaryInfo) -{ - QProcessWrapper otool; - otool.start(QLatin1String("xcrun"), QStringList(QLatin1String("otool")) << QLatin1String("-l") << binaryInfo->fileName); - if (!otool.waitForStarted()) { - setError(UserDefinedError, tr("Cannot run otool. Is Xcode installed?")); - return -1; - } - otool.waitForFinished(); - enum State { - State_Start, - State_LC_ID_DYLIB, - State_LC_LOAD_DYLIB - }; - State state = State_Start; - QByteArray outputData = otool.readAllStandardOutput(); - if (outputData.contains("is not an object file")) - return -1; - - QBuffer output(&outputData); - output.open(QBuffer::ReadOnly); - while (!output.atEnd()) { - QString line = QString::fromLocal8Bit(output.readLine()).trimmed(); - if (line.startsWith(QLatin1String("cmd "))) { - line.remove(0, 4); - if (line == QLatin1String("LC_LOAD_DYLIB")) - state = State_LC_LOAD_DYLIB; - else if (line == QLatin1String("LC_ID_DYLIB")) - state = State_LC_ID_DYLIB; - else - state = State_Start; - } else if (state != State_Start && line.startsWith(QLatin1String("name "))) { - line.remove(0, 5); - int idx = line.indexOf(QLatin1String("(offset")); - if (idx > 0) - line.truncate(idx); - line = line.trimmed(); - if (state == State_LC_LOAD_DYLIB) - binaryInfo->dependentDynamicLibs.append(line); - if (state == State_LC_ID_DYLIB) - binaryInfo->dynamicLibId = line; - } - } - return otool.exitCode(); -} - -void MacReplaceInstallNamesOperation::relocateBinary(const MacBinaryInfo &info, const QString &searchString, - const QString &replacement) -{ - qDebug() << QString::fromLatin1("Got the following information(fileName: %1, dynamicLibId: %2, " - "dynamicLibs: \n\t%3,").arg(info.fileName, info.dynamicLibId, info.dependentDynamicLibs - .join(QLatin1String("|"))); - - - // change framework ID only if dynamicLibId isn't only the filename, if it has no relative path ("@") - if (!info.dynamicLibId.isEmpty() && (info.dynamicLibId != QFileInfo(info.fileName).fileName()) - && !info.dynamicLibId.contains(QLatin1String("@"))) { - // error is set inside the execCommand method - if (!execCommand(QLatin1String("xcrun"), QStringList(QLatin1String("install_name_tool")) - << QLatin1String("-id") << info.fileName << info.fileName)) { - return; - } - } - - QStringList args; - foreach (const QString &dynamicLib, info.dependentDynamicLibs) { - if (!dynamicLib.contains(searchString)) - continue; - args << QLatin1String("-change") << dynamicLib << replacement + dynamicLib.section(searchString, -1); - } - - // nothing found to patch - if (args.empty()) - return; - - // error is set inside the execCommand method - // last argument is the file target which will be patched - execCommand(QLatin1String("xcrun"), QStringList(QLatin1String("install_name_tool")) << args << info.fileName); -} - -bool MacReplaceInstallNamesOperation::execCommand(const QString &cmd, const QStringList &args) -{ - qDebug() << Q_FUNC_INFO << cmd << " " << args; - - QProcessWrapper process; - process.start(cmd, args); - if (!process.waitForStarted()) { - setError(UserDefinedError, tr("Cannot start process %0.").arg(cmd)); - return false; - } - process.waitForFinished(); - if (process.exitCode() != 0) { - const QString errorMessage = QLatin1String("Command %1 failed.\nArguments: %2\nOutput: %3\n"); - setError(UserDefinedError, errorMessage.arg(cmd, args.join(QLatin1String(" ")), - QString::fromLocal8Bit(process.readAll()))); - return false; - } - return true; -} diff --git a/src/libs/installer/macreplaceinstallnamesoperation.h b/src/libs/installer/macreplaceinstallnamesoperation.h deleted file mode 100644 index 34c5aab5d..000000000 --- a/src/libs/installer/macreplaceinstallnamesoperation.h +++ /dev/null @@ -1,81 +0,0 @@ -/************************************************************************** -** -** Copyright (C) 2012-2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Installer Framework. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** -** $QT_END_LICENSE$ -** -**************************************************************************/ - -#ifndef MACREPLACEINSTALLNAMESOPERATION_H -#define MACREPLACEINSTALLNAMESOPERATION_H - -#include "qinstallerglobal.h" - -namespace QInstaller { - -struct MacBinaryInfo { - QString fileName; - QString dynamicLibId; // if that is empty, it is an executable - QStringList dependentDynamicLibs; - - uint qHash(const MacBinaryInfo &info); - bool operator==(const MacBinaryInfo &rhs) const - { - return fileName == rhs.fileName; - } - -}; - -inline uint qHash(const MacBinaryInfo &info) -{ - return qHash(info.fileName) ^ qHash(info.dynamicLibId); -} - -class INSTALLER_EXPORT MacReplaceInstallNamesOperation : public Operation -{ -public: - MacReplaceInstallNamesOperation(); - - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); - Operation *clone() const; - -private: - bool apply(const QString &searchString, const QString &replacement, const QString &searchDir); - QSet<MacBinaryInfo> collectPatchableBinaries(const QString &searchDir); - int updateExecutableInfo(MacBinaryInfo *binaryInfo); - void relocateBinary(const MacBinaryInfo &info, const QString &searchString, const QString &replacement); - bool execCommand(const QString &cmd, const QStringList &args); -}; - -} // namespace QInstaller - -#endif // MACREPLACEINSTALLNAMESOPERATION_H diff --git a/src/libs/installer/productkeycheck.h b/src/libs/installer/productkeycheck.h index db8a6a8d6..94bc4fa60 100644 --- a/src/libs/installer/productkeycheck.h +++ b/src/libs/installer/productkeycheck.h @@ -60,7 +60,6 @@ public: QString lastErrorString(); QString maintainanceToolDetailErrorNotice(); - //is used in the generic ApplyProductKeyOperation, for example to patch things bool applyKey(const QStringList &arguments); // to filter none valid licenses diff --git a/src/libs/installer/qtpatchoperation.h b/src/libs/installer/qtpatchoperation.h deleted file mode 100644 index 94b94397c..000000000 --- a/src/libs/installer/qtpatchoperation.h +++ /dev/null @@ -1,59 +0,0 @@ -/************************************************************************** -** -** Copyright (C) 2012-2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Installer Framework. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** -** $QT_END_LICENSE$ -** -**************************************************************************/ - -#ifndef QTPATCHOPERATION_H -#define QTPATCHOPERATION_H - -#include "qinstallerglobal.h" - -namespace QInstaller { - -class INSTALLER_EXPORT QtPatchOperation : public Operation -{ -public: - QtPatchOperation(); - - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); - Operation *clone() const; - -private: - QStringList getDirContent(const QString& aPath, QStringList aFilters); -}; - -} // namespace QInstaller - -#endif // QTPATCHOPERATION_H diff --git a/src/libs/installer/resources/files-to-patch-linux b/src/libs/installer/resources/files-to-patch-linux deleted file mode 100644 index 760127f99..000000000 --- a/src/libs/installer/resources/files-to-patch-linux +++ /dev/null @@ -1,10 +0,0 @@ -bin/qmake -bin/lrelease -lib/libQtCore.so -%% -*.la -*.prl -*.pc -*.pri -mkspecs/default-host/qmake.conf - diff --git a/src/libs/installer/resources/files-to-patch-linux-emb-arm b/src/libs/installer/resources/files-to-patch-linux-emb-arm deleted file mode 100644 index 8ea297b50..000000000 --- a/src/libs/installer/resources/files-to-patch-linux-emb-arm +++ /dev/null @@ -1,12 +0,0 @@ -bin/qmake -bin/lrelease -bin/qdoc -host-bin/qmake -host-bin/lrelease -host-bin/qdoc -%% -*.la -*.prl -*.pc -*.pri -*.cmake diff --git a/src/libs/installer/resources/files-to-patch-linux-emb-arm-qt4 b/src/libs/installer/resources/files-to-patch-linux-emb-arm-qt4 deleted file mode 100644 index f6a4b59b7..000000000 --- a/src/libs/installer/resources/files-to-patch-linux-emb-arm-qt4 +++ /dev/null @@ -1,12 +0,0 @@ -bin/qmake -bin/lrelease -bin/qdoc -host-bin/qmake -host-bin/lrelease -host-bin/qdoc -%% -*.la -*.prl -*.pc - - diff --git a/src/libs/installer/resources/files-to-patch-linux-emb-arm-qt5 b/src/libs/installer/resources/files-to-patch-linux-emb-arm-qt5 deleted file mode 100644 index 8ea297b50..000000000 --- a/src/libs/installer/resources/files-to-patch-linux-emb-arm-qt5 +++ /dev/null @@ -1,12 +0,0 @@ -bin/qmake -bin/lrelease -bin/qdoc -host-bin/qmake -host-bin/lrelease -host-bin/qdoc -%% -*.la -*.prl -*.pc -*.pri -*.cmake diff --git a/src/libs/installer/resources/files-to-patch-linux-qt5 b/src/libs/installer/resources/files-to-patch-linux-qt5 deleted file mode 100644 index b6af9ccf5..000000000 --- a/src/libs/installer/resources/files-to-patch-linux-qt5 +++ /dev/null @@ -1,12 +0,0 @@ -bin/qmake -bin/lrelease -bin/qdoc -lib/libQt5Core.so -%% -*.la -*.prl -*.pc -*.pri -lib/cmake/Qt5LinguistTools/Qt5LinguistToolsConfig.cmake -mkspecs/default-host/qmake.conf - diff --git a/src/libs/installer/resources/files-to-patch-macx b/src/libs/installer/resources/files-to-patch-macx deleted file mode 100644 index 20644f2d1..000000000 --- a/src/libs/installer/resources/files-to-patch-macx +++ /dev/null @@ -1,24 +0,0 @@ -bin/qmake -bin/lrelease -bin/lconvert -bin/lupdate -bin/macdeployqt -bin/qcollectiongenerator -bin/qdoc3 -bin/qhelpgenerator -bin/qt3to4 -bin/xmlpatterns -bin/xmlpatternsvalidator -lib/QtCore.framework/QtCore -lib/QtCore.framework/QtCore_debug -bin/Designer.app/Contents/MacOS/Designer -bin/Linguist.app/Contents/MacOS/Linguist -bin/qhelpconverter.app/Contents/MacOS/qhelpconverter -bin/QMLViewer.app/Contents/MacOS/QMLViewer -bin/qttracereplay.app/Contents/MacOS/qttracereplay -%% -*.la -*.prl -*.pc -*.pri -mkspecs/default-host/qmake.conf
\ No newline at end of file diff --git a/src/libs/installer/resources/files-to-patch-macx-qt5 b/src/libs/installer/resources/files-to-patch-macx-qt5 deleted file mode 100644 index 62c85a63d..000000000 --- a/src/libs/installer/resources/files-to-patch-macx-qt5 +++ /dev/null @@ -1,26 +0,0 @@ -bin/qmake -bin/lrelease -bin/lconvert -bin/lupdate -bin/macdeployqt -bin/qcollectiongenerator -bin/qdoc -bin/qhelpgenerator -bin/qt3to4 -bin/xmlpatterns -bin/xmlpatternsvalidator -lib/QtCore.framework/QtCore -lib/QtCore.framework/QtCore_debug -bin/Designer.app/Contents/MacOS/Designer -bin/Linguist.app/Contents/MacOS/Linguist -bin/qhelpconverter.app/Contents/MacOS/qhelpconverter -bin/QMLViewer.app/Contents/MacOS/QMLViewer -bin/qttracereplay.app/Contents/MacOS/qttracereplay -%% -*.la -*.prl -*.pc -*.pri -lib/cmake/Qt5LinguistTools/Qt5LinguistToolsConfig.cmake -mkspecs/default-host/qmake.conf - diff --git a/src/libs/installer/resources/files-to-patch-windows b/src/libs/installer/resources/files-to-patch-windows deleted file mode 100644 index 6f931ec4f..000000000 --- a/src/libs/installer/resources/files-to-patch-windows +++ /dev/null @@ -1,15 +0,0 @@ -bin/qmake.exe -bin/lrelease.exe -bin/QtCore4.dll -bin/QtCored4.dll -lib/QtCore4.dll -lib/QtCored4.dll -%% -mkspecs/default/qmake.conf -mkspecs/default-host/qmake.conf -.qmake.cache -*.prl -*.pc -*.la -*.pri -lib/prl.txt diff --git a/src/libs/installer/resources/files-to-patch-windows-emb-arm b/src/libs/installer/resources/files-to-patch-windows-emb-arm deleted file mode 100644 index a43229d18..000000000 --- a/src/libs/installer/resources/files-to-patch-windows-emb-arm +++ /dev/null @@ -1,13 +0,0 @@ -bin/qmake.exe -bin/lrelease.exe -bin/qdoc.exe -host-bin/qmake.exe -host-bin/lrelease.exe -host-bin/qdoc.exe -%% -*.la -*.prl -*.pc -*.pri -*.cmake - diff --git a/src/libs/installer/resources/files-to-patch-windows-emb-arm-qt5 b/src/libs/installer/resources/files-to-patch-windows-emb-arm-qt5 deleted file mode 100644 index a43229d18..000000000 --- a/src/libs/installer/resources/files-to-patch-windows-emb-arm-qt5 +++ /dev/null @@ -1,13 +0,0 @@ -bin/qmake.exe -bin/lrelease.exe -bin/qdoc.exe -host-bin/qmake.exe -host-bin/lrelease.exe -host-bin/qdoc.exe -%% -*.la -*.prl -*.pc -*.pri -*.cmake - diff --git a/src/libs/installer/resources/files-to-patch-windows-qt5 b/src/libs/installer/resources/files-to-patch-windows-qt5 deleted file mode 100644 index d529396d9..000000000 --- a/src/libs/installer/resources/files-to-patch-windows-qt5 +++ /dev/null @@ -1,19 +0,0 @@ -bin/qmake.exe -bin/lrelease.exe -bin/qdoc.exe -bin/Qt5Core.dll -bin/Qt5Cored.dll -lib/Qt5Core.dll -lib/Qt5Cored.dll -%% -*.la -*.prl -*.pc -*.pri -mkspecs/default/qmake.conf -mkspecs/default-host/qmake.conf -.qmake.cache -lib/cmake/Qt5LinguistTools/Qt5LinguistToolsConfig.cmake -lib/prl.txt - - diff --git a/src/libs/installer/resources/patch_file_lists.qrc b/src/libs/installer/resources/patch_file_lists.qrc deleted file mode 100644 index b300b69ac..000000000 --- a/src/libs/installer/resources/patch_file_lists.qrc +++ /dev/null @@ -1,15 +0,0 @@ -<RCC> - <qresource prefix="/"> - <file>files-to-patch-linux</file> - <file>files-to-patch-windows</file> - <file>files-to-patch-macx</file> - <file>files-to-patch-linux-qt5</file> - <file>files-to-patch-windows-qt5</file> - <file>files-to-patch-macx-qt5</file> - <file>files-to-patch-linux-emb-arm</file> - <file>files-to-patch-windows-emb-arm</file> - <file>files-to-patch-windows-emb-arm-qt5</file> - <file>files-to-patch-macx-emb-arm-qt5</file> - <file>files-to-patch-linux-emb-arm-qt5</file> - </qresource> -</RCC> diff --git a/tests/auto/installer/consumeoutputoperationtest/tst_consumeoutputoperationtest.cpp b/tests/auto/installer/consumeoutputoperationtest/tst_consumeoutputoperationtest.cpp index 538513939..ec595bdd7 100644 --- a/tests/auto/installer/consumeoutputoperationtest/tst_consumeoutputoperationtest.cpp +++ b/tests/auto/installer/consumeoutputoperationtest/tst_consumeoutputoperationtest.cpp @@ -36,7 +36,6 @@ #include <consumeoutputoperation.h> #include <qinstallerglobal.h> #include <fileutils.h> -#include <qtpatchoperation.h> #include <errors.h> #include <QObject> @@ -59,28 +58,12 @@ class tst_consumeoutputoperationtest : public QObject private slots: void initTestCase() { -#if defined(Q_OS_WIN) - m_binSuffix = ".exe"; -#endif // be aware that this would enable eating the qDebug output //QInstaller::init(); - // if we don't use the init method we need to register the in QtPatchOperation used - // patch_file_lists manually -#if defined(QT_STATIC) - Q_INIT_RESOURCE(patch_file_lists); -#endif m_fakeQtPath = QDir::toNativeSeparators(qApp->applicationDirPath()) + QDir::separator() + "fakeQt" + QDir::separator(); QVERIFY(QDir().mkpath(m_fakeQtPath + "bin")); - - QFile orgQmake(QUOTE(QMAKE_BINARY)); - // use lrelease filename which will be patched by the QtPatch operation, but it hides that this - // fake Qt contains a qmake which would be used to get the patch paths (instead of using the qmake - // output we want to use our installer value) - m_binaryInFakeQt = m_fakeQtPath + "bin" + QDir::separator() + "lrelease" + m_binSuffix; - - QVERIFY2(orgQmake.copy(m_binaryInFakeQt), qPrintable(orgQmake.errorString())); } void testMissingArguments() @@ -115,31 +98,6 @@ private slots: QCOMPARE(m_core.value("testConsumeOutputKey"), testOutput); } - void testPatchFakeQt() - { - return; -#if defined(Q_OS_WIN) - QString patchType = "windows"; -#elif defined(Q_OS_OSX) - QString patchType = "mac"; -#else - QString patchType = "linux"; -#endif - - QtPatchOperation patchOperation; - patchOperation.setValue(QLatin1String("installer"), QVariant::fromValue(&m_core)); - - // testConsumeOutputKey comes from testGetOutputFromQmake() before and it can not use qmake, - // because it does not exist in the m_fakeQtPath - patchOperation.setArguments(QStringList() << "QmakeOutputInstallerKey=testConsumeOutputKey" - << patchType << m_fakeQtPath); - QVERIFY2(patchOperation.performOperation(), qPrintable(patchOperation.errorString())); - - QString patchedBinaryOutput = getOutputFrom(m_binaryInFakeQt, QStringList("-query")); - QVERIFY(getOutputFrom(QUOTE(QMAKE_BINARY), QStringList("-query")) != patchedBinaryOutput); - QVERIFY(patchedBinaryOutput.contains(m_fakeQtPath)); - } - void cleanupTestCase() { try { @@ -167,8 +125,6 @@ private: PackageManagerCore m_core; QString m_fakeQtPath; - QString m_binaryInFakeQt; - QString m_binSuffix; }; QTEST_MAIN(tst_consumeoutputoperationtest) |