From fe992358dbd449fbdc303af38907e62098daad44 Mon Sep 17 00:00:00 2001 From: Iikka Eklund Date: Fri, 9 Aug 2013 15:52:13 +0300 Subject: Update files-to-patch-* for 5.2 "host-bin/" added for b2qt and files-to-patch-macx-emb-arm added for iOS. Change-Id: I982648dbd9983eb8617a066c65c171742d59f2b0 Reviewed-by: Niels Weber Reviewed-by: Karsten Heimrich Reviewed-by: Tim Jenssen --- src/libs/installer/resources/files-to-patch-linux-emb-arm | 3 +++ src/libs/installer/resources/files-to-patch-macx-emb-arm | 9 +++++++++ src/libs/installer/resources/files-to-patch-windows-emb-arm | 3 +++ src/libs/installer/resources/patch_file_lists.qrc | 1 + 4 files changed, 16 insertions(+) create mode 100644 src/libs/installer/resources/files-to-patch-macx-emb-arm diff --git a/src/libs/installer/resources/files-to-patch-linux-emb-arm b/src/libs/installer/resources/files-to-patch-linux-emb-arm index c01fe17a1..f6a4b59b7 100644 --- a/src/libs/installer/resources/files-to-patch-linux-emb-arm +++ b/src/libs/installer/resources/files-to-patch-linux-emb-arm @@ -1,6 +1,9 @@ bin/qmake bin/lrelease bin/qdoc +host-bin/qmake +host-bin/lrelease +host-bin/qdoc %% *.la *.prl diff --git a/src/libs/installer/resources/files-to-patch-macx-emb-arm b/src/libs/installer/resources/files-to-patch-macx-emb-arm new file mode 100644 index 000000000..c01fe17a1 --- /dev/null +++ b/src/libs/installer/resources/files-to-patch-macx-emb-arm @@ -0,0 +1,9 @@ +bin/qmake +bin/lrelease +bin/qdoc +%% +*.la +*.prl +*.pc + + diff --git a/src/libs/installer/resources/files-to-patch-windows-emb-arm b/src/libs/installer/resources/files-to-patch-windows-emb-arm index f0c1c3c73..674adaff6 100644 --- a/src/libs/installer/resources/files-to-patch-windows-emb-arm +++ b/src/libs/installer/resources/files-to-patch-windows-emb-arm @@ -1,6 +1,9 @@ bin/qmake.exe bin/lrelease.exe bin/qdoc.exe +host-bin/qmake.exe +host-bin/lrelease.exe +host-bin/qdoc.exe %% *.la *.prl diff --git a/src/libs/installer/resources/patch_file_lists.qrc b/src/libs/installer/resources/patch_file_lists.qrc index fe4b77046..e898b9b23 100644 --- a/src/libs/installer/resources/patch_file_lists.qrc +++ b/src/libs/installer/resources/patch_file_lists.qrc @@ -8,5 +8,6 @@ files-to-patch-macx-qt5 files-to-patch-linux-emb-arm files-to-patch-windows-emb-arm + files-to-patch-macx-emb-arm -- cgit v1.2.3 From a45d263aba2d3cdd7f5b2fdd538a3e88cf11250b Mon Sep 17 00:00:00 2001 From: Niels Weber Date: Tue, 27 Aug 2013 13:02:44 +0200 Subject: Add a line to --help about multiple repositories. Also document --updater and --manage-packages options. Task-number: QTIFW-348 Task-number: QTIFW-350 Change-Id: Icdb2fe04adbdebc11cf929b5f2f6880835c989ec Reviewed-by: Karsten Heimrich --- src/sdk/installerbase_p.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sdk/installerbase_p.cpp b/src/sdk/installerbase_p.cpp index 0d59e541e..1df3e0943 100644 --- a/src/sdk/installerbase_p.cpp +++ b/src/sdk/installerbase_p.cpp @@ -308,6 +308,10 @@ void InstallerBase::showUsage() << "Show current version" << std::endl; std::cout << std::setw(55) << std::setiosflags(std::ios::left) << " --checkupdates" << std::setw(40) << "Check for updates and return an XML file of the available updates" << std::endl; + std::cout << std::setw(55) << std::setiosflags(std::ios::left) << " --updater" << std::setw(40) + << "Start in updater mode." << std::endl; + std::cout << std::setw(55) << std::setiosflags(std::ios::left) << " --manage-packages" << std::setw(40) + << "Start in packagemanager mode." << std::endl; std::cout << std::setw(55) << std::setiosflags(std::ios::left) << " --proxy" << std::setw(40) << "Set system proxy on Win and Mac. This option has no effect on Linux." << std::endl; std::cout << std::setw(55) << std::setiosflags(std::ios::left) << " --verbose" << std::setw(40) @@ -337,6 +341,8 @@ void InstallerBase::showUsage() << std::endl; std::cout << std::setw(55) << std::setiosflags(std::ios::left) << " " << std::setw(40) << "Note: URI " "must be prefixed with the protocol, i.e. file:/// , http:// or ftp://" << std::endl; + std::cout << std::setw(55) << std::setiosflags(std::ios::left) << " " << std::setw(40) << "Note: URI " + "can consist of multiple addresses separated by comma only." << std::endl; std::cout << std::setw(55) << std::setiosflags(std::ios::left) << " --show-virtual-components" << std::setw(40) << "Show virtual components in package manager and updater" << std::endl; std::cout << std::setw(55) << std::setiosflags(std::ios::left) -- cgit v1.2.3 From f9bd0527e48916a38582b638b32c8456f656f1a5 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Tue, 27 Aug 2013 18:57:03 +0200 Subject: Fix installer.dat not found issue * use applicationDirPath() instead of applicationFilePath() Change-Id: I2f25dd88d3c024b20d0ef1937e7a8e50a8183594 Reviewed-by: Tim Jenssen --- src/libs/installer/binaryformat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/installer/binaryformat.cpp b/src/libs/installer/binaryformat.cpp index 61429b019..f8b6b7732 100644 --- a/src/libs/installer/binaryformat.cpp +++ b/src/libs/installer/binaryformat.cpp @@ -855,7 +855,7 @@ BinaryContent BinaryContent::readFromApplicationFile() { #ifdef Q_OS_MAC // On Mac, data is always in a separate file so that the binary can be signed - QDir dataPath(QCoreApplication::applicationFilePath()); + QDir dataPath(QCoreApplication::applicationDirPath()); dataPath.cdUp(); dataPath.cd(QLatin1String("Resources")); return BinaryContent::readFromBinary(dataPath.filePath(QLatin1String("installer.dat"))); -- cgit v1.2.3 From be8a80f1e750f0a0930a271452ca4686d8b37c29 Mon Sep 17 00:00:00 2001 From: Niels Weber Date: Wed, 28 Aug 2013 13:20:56 +0200 Subject: Cleanup and improve output of --help Change-Id: I1bfe519e858cfcb698522c8e8890c16c52669d81 Reviewed-by: Tim Jenssen --- src/sdk/installerbase_p.cpp | 92 +++++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 44 deletions(-) diff --git a/src/sdk/installerbase_p.cpp b/src/sdk/installerbase_p.cpp index 1df3e0943..6e4002f30 100644 --- a/src/sdk/installerbase_p.cpp +++ b/src/sdk/installerbase_p.cpp @@ -298,65 +298,69 @@ int InstallerBase::replaceMaintenanceToolBinary(QStringList arguments) /* static*/ void InstallerBase::showUsage() { +#define WIDTH1 46 +#define WIDTH2 40 MyApplicationConsole c; std::cout << "Usage: SDKMaintenanceTool [OPTIONS]" << std::endl << std::endl; std::cout << "User:"< Date: Thu, 29 Aug 2013 15:17:17 +0200 Subject: Bump version Change-Id: Ie18e88bb65a8765afdd3e1e8767ad0cb9b584d77 Reviewed-by: Niels Weber Reviewed-by: Karsten Heimrich --- dist/config/config.xml | 4 ++-- dist/packages/org.qtproject.ifw.binaries/meta/package.xml | 2 +- dist/packages/org.qtproject.ifw/meta/package.xml | 2 +- installerfw.pri | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/config/config.xml b/dist/config/config.xml index 5824b9d8f..e5bf2ffe6 100644 --- a/dist/config/config.xml +++ b/dist/config/config.xml @@ -1,7 +1,7 @@ Qt Installer Framework - Qt Installer Framework 1.4.0 + Qt Installer Framework 1.4.1 1.0.0 Qt Project http://qt-project.org @@ -9,5 +9,5 @@ Uninstaller - @homeDir@/Qt/QtIFW-1.4.0 + @homeDir@/Qt/QtIFW-1.4.1 diff --git a/dist/packages/org.qtproject.ifw.binaries/meta/package.xml b/dist/packages/org.qtproject.ifw.binaries/meta/package.xml index a7954497f..ac75cedfa 100644 --- a/dist/packages/org.qtproject.ifw.binaries/meta/package.xml +++ b/dist/packages/org.qtproject.ifw.binaries/meta/package.xml @@ -2,7 +2,7 @@ Qt Installer Framework Binaries Installs the binaries, examples and help files. - 1.4.0 + 1.4.1 2013-07-03 True diff --git a/dist/packages/org.qtproject.ifw/meta/package.xml b/dist/packages/org.qtproject.ifw/meta/package.xml index dedb672df..443930a45 100644 --- a/dist/packages/org.qtproject.ifw/meta/package.xml +++ b/dist/packages/org.qtproject.ifw/meta/package.xml @@ -2,7 +2,7 @@ Qt Installer Framework Installs the Qt Installer Framework. - 1.4.0 + 1.4.1 2013-07-03 diff --git a/installerfw.pri b/installerfw.pri index 5fd735016..4a42d3325 100644 --- a/installerfw.pri +++ b/installerfw.pri @@ -3,7 +3,7 @@ } IFW_PRI_INCLUDED = 1 -IFW_VERSION = 1.4.0 +IFW_VERSION = 1.4.1 IFW_REPOSITORY_FORMAT_VERSION = 1.0.0 -- cgit v1.2.3 From 1628bb2327817a524f09a8efd717bf69cba39a7c Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 29 Aug 2013 15:15:21 +0200 Subject: Doc: Clarify AutoDependsOn Change-Id: I49a9db7642a0723dd31aa712fbdef78242fdda1d Reviewed-by: Niels Weber Reviewed-by: Tim Jenssen --- doc/installerfw.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/installerfw.qdoc b/doc/installerfw.qdoc index 682bca95a..baf6f1261 100644 --- a/doc/installerfw.qdoc +++ b/doc/installerfw.qdoc @@ -441,7 +441,7 @@ \row \o AutoDependOn \o Opposite of dependencies. Defines that this component should be - loaded if the specified component is loaded. + loaded if all of the specified components are loaded. \row \o Virtual \o Set to \c true to hide the component from the installer. -- cgit v1.2.3 From 84c8a408327f7386905d7faa4c682618cbf46455 Mon Sep 17 00:00:00 2001 From: kh1 Date: Wed, 4 Sep 2013 20:28:06 +0200 Subject: Add support to update only new components. Task-number: QTIFW-234 Change-Id: I49f1714925e7c83e06c86c9022cc8ae8ff01a840 Reviewed-by: Niels Weber Reviewed-by: Iikka Eklund --- tools/repogen/repogen.cpp | 69 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 63 insertions(+), 6 deletions(-) diff --git a/tools/repogen/repogen.cpp b/tools/repogen/repogen.cpp index 9f0452b92..e0e0a88c0 100644 --- a/tools/repogen/repogen.cpp +++ b/tools/repogen/repogen.cpp @@ -43,10 +43,12 @@ #include #include #include +#include #include #include #include +#include #include #include #include @@ -73,12 +75,16 @@ static void printUsage() std::cout << " --update Update a set of existing components (defined by " << std::endl; std::cout << " --include or --exclude) in the repository" << std::endl; + std::cout << " --update-new-components Update a set of existing components (defined by " << std::endl; + std::cout << " --include or --exclude) in the repository with all new components" + << std::endl; + std::cout << " -v|--verbose Verbose output" << std::endl; std::cout << std::endl; std::cout << "Example:" << std::endl; - std::cout << " " << appName << " -p ../examples/packages -u " - "http://www.example.com:8080 repository/" << std::endl; + std::cout << " " << appName << " -p ../examples/packages -u http://www.example.com:8080 repository/" + << std::endl; } static int printErrorAndUsageAndExit(const QString &err) @@ -104,6 +110,7 @@ int main(int argc, char** argv) QString packagesDir; QInstallerTools::FilterType filterType = QInstallerTools::Exclude; bool remove = false; + bool updateExistingRepositoryWithNewComponents = false; //TODO: use a for loop without removing values from args like it is in binarycreator.cpp //for (QStringList::const_iterator it = args.begin(); it != args.end(); ++it) { @@ -133,6 +140,9 @@ int main(int argc, char** argv) } else if (args.first() == QLatin1String("--update")) { args.removeFirst(); updateExistingRepository = true; + } else if (args.first() == QLatin1String("--update-new-components")) { + args.removeFirst(); + updateExistingRepositoryWithNewComponents = true; } else if (args.first() == QLatin1String("-p") || args.first() == QLatin1String("--packages")) { args.removeFirst(); if (args.isEmpty()) { @@ -168,16 +178,17 @@ int main(int argc, char** argv) return 1; } - if (remove && updateExistingRepository) { - throw QInstaller::Error(QObject::tr("Argument -r|--remove and --update are mutually " - "exclusive!")); + const bool update = updateExistingRepository || updateExistingRepositoryWithNewComponents; + if (remove && update) { + throw QInstaller::Error(QObject::tr("Argument -r|--remove and --update|--update-new-components " + "are mutually exclusive!")); } const QString repositoryDir = QInstallerTools::makePathAbsolute(args.first()); if (remove) QInstaller::removeDirectory(repositoryDir); - if (!updateExistingRepository && QFile::exists(repositoryDir) && !QDir(repositoryDir).entryList( + if (!update && QFile::exists(repositoryDir) && !QDir(repositoryDir).entryList( QDir::AllEntries | QDir::NoDotAndDotDot).isEmpty()) { throw QInstaller::Error(QObject::tr("Repository target folder %1 already exists!") @@ -186,6 +197,52 @@ int main(int argc, char** argv) QInstallerTools::PackageInfoVector packages = QInstallerTools::createListOfPackages(packagesDir, &filteredPackages, filterType); + + if (updateExistingRepositoryWithNewComponents) { + QDomDocument doc; + QFile file(repositoryDir + QLatin1String("/Updates.xml")); + if (file.open(QFile::ReadOnly) && doc.setContent(&file)) { + const QDomElement root = doc.documentElement(); + if (root.tagName() != QLatin1String("Updates")) + throw QInstaller::Error(QObject::tr("Invalid content in '%1'.").arg(file.fileName())); + file.close(); // close the file, we read the content already + + // read the already existing updates xml content + const QDomNodeList children = root.childNodes(); + QHash hash; + for (int i = 0; i < children.count(); ++i) { + const QDomElement el = children.at(i).toElement(); + if ((!el.isNull()) && (el.tagName() == QLatin1String("PackageUpdate"))) { + QInstallerTools::PackageInfo info; + const QDomNodeList c2 = el.childNodes(); + for (int j = 0; j < c2.count(); ++j) { + if (c2.at(j).toElement().tagName() == scName) + info.name = c2.at(j).toElement().text(); + else if (c2.at(j).toElement().tagName() == scRemoteVersion) + info.version = c2.at(j).toElement().text(); + } + hash.insert(info.name, info); + } + } + + // remove all components that have no update (decision based on the version tag) + for (int i = packages.count() - 1; i >= 0; --i) { + const QInstallerTools::PackageInfo info = packages.at(i); + if (!hash.contains(info.name)) + continue; // the component is not there, keep it + + if (KDUpdater::compareVersion(info.version, hash.value(info.name).version) < 1) + packages.remove(i); // the version did not change, no need to update the component + } + + if (packages.isEmpty()) { + std::cout << QString::fromLatin1("Could not find new components to update '%1'.") + .arg(repositoryDir); + return EXIT_SUCCESS; + } + } + } + QHash pathToVersionMapping = QInstallerTools::buildPathToVersionMapping(packages); foreach (const QInstallerTools::PackageInfo &package, packages) { -- cgit v1.2.3 From a4139682a7277385b5e2bc35829e94137584573a Mon Sep 17 00:00:00 2001 From: kh1 Date: Fri, 6 Sep 2013 12:37:07 +0200 Subject: fix progress for redirected HTTP Downloads - do not emit the progress in the redirect case for the redirect data Task-number: QTIFW-267 Change-Id: Id32018a92df3098e45c963b4dcf7924bebdd1354 Reviewed-by: Karsten Heimrich Reviewed-by: Niels Weber --- src/libs/kdtools/kdupdaterfiledownloader.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libs/kdtools/kdupdaterfiledownloader.cpp b/src/libs/kdtools/kdupdaterfiledownloader.cpp index fee2a853e..a7fbfe85b 100644 --- a/src/libs/kdtools/kdupdaterfiledownloader.cpp +++ b/src/libs/kdtools/kdupdaterfiledownloader.cpp @@ -979,6 +979,12 @@ void KDUpdater::HttpDownloader::httpReqFinished() void KDUpdater::HttpDownloader::httpReadProgress(qint64 done, qint64 total) { + if (d->http) { + const QUrl redirectUrl = d->http->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl(); + if (followRedirects() && redirectUrl.isValid()) + return; // if we are a redirection, do not emit the progress + } + setProgress(done, total); emit downloadProgress(calcProgress(done, total)); } -- cgit v1.2.3