summaryrefslogtreecommitdiffstats
path: root/src/libs/kdtools
Commit message (Collapse)AuthorAgeFilesLines
...
| * QRegExp include cleanupSamuel Gaist2017-03-132-0/+2
| | | | | | | | | | | | | | This patch adds the missing include statements for QRegExp. Change-Id: I05fed3e83514af895b95a3df746b0ae1e6b31828 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge remote-tracking branch 'origin/2.0'Katja Marttila2017-01-3042-679/+469
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Changelog dist/config/config.xml dist/packages/org.qtproject.ifw.binaries/meta/package.xml dist/packages/org.qtproject.ifw/meta/package.xml installerfw.pri src/libs/installer/lib7z_create.h src/libs/kdtools/kdgenericfactory.cpp src/libs/kdtools/kdgenericfactory.h src/libs/kdtools/kdupdaterapplication.cpp src/libs/kdtools/kdupdaterapplication.h src/libs/kdtools/kdupdaterupdatesourcesinfo.cpp src/libs/kdtools/kdupdaterupdatesourcesinfo.h src/libs/kdtools/localpackagehub.cpp src/libs/kdtools/localpackagehub.h src/libs/kdtools/updatefinder.cpp src/libs/kdtools/updatefinder.h tools/binarycreator/resources/mkdmg.sh Change-Id: Iab2513f549832d2e750e77131c673457ab265af4
| * License header update to GPL-EXCEPTKatja Marttila2017-01-2648-775/+535
| | | | | | | | | | Change-Id: I6426c4e8f932cf26c6c638dec18d0c12e22972d1 Reviewed-by: Janne Anttila <janne.anttila@theqtcompany.com>
* | allow installing compressed packagesKatja Marttila2016-11-093-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces new feature to add 7z packages to be installed. Packages must be installer repositories (created with repogen), compressed to 7z file and named as qtbsp or 7z. Selecting compressed package is done either with button in component selection page or with --installCompressedRepository parameter given to installer or to maintenancetool. Button will not be created by default. If you want to show the button either build IFW with DEFINES+=INSTALLCOMPRESSED or enable the button in control script with allowCompressedRepositoryInstall() in ComponentSelectionPageCallback Task-number: QTIFW-886 Change-Id: Ia060092c348991d5195393b7dc154205f8bf92a5 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Merge remote-tracking branch 'origin/2.0'Katja Marttila2016-06-211-0/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Changelog dist/config/config.xml dist/packages/org.qtproject.ifw.binaries/meta/package.xml dist/packages/org.qtproject.ifw/meta/package.xml installerfw.pri src/libs/7zip/7zip.pro src/libs/7zip/win/CPP/7zip/UI/Common/Update.cpp src/libs/installer/component.cpp src/libs/installer/lib7z_facade.cpp src/libs/installer/packagemanagercore.cpp src/libs/installer/proxycredentialsdialog.h src/sdk/translations/ja.ts tests/auto/installer/messageboxhandler/tst_messageboxhandler.cpp tests/auto/installer/scriptengine/tst_scriptengine.cpp tests/auto/installer/settings/tst_settings.cpp Change-Id: I3bb98b8490b3c3eb7f664c1abb7417155b5430b2
| * Make IFW compile with FreeBSDKatja Marttila2016-04-261-0/+9
| | | | | | | | | | | | | | Change-Id: Ibebc25b738c843c0eb4291faa2bba7ac9836b008 Task-number: QTIFW-841 Reviewed-by: Ralf Nolden <nolden@kde.org> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Add a logging category and debug for http downloadKatja Marttila2016-04-071-1/+16
| | | | | | | | | | | | | | | | | | | | | | Sometimes installing fails due to a problem in server. Since downloading can happen from mirror, it is hard to detect where the problem is. Print the IP address where the download actually happens to ease the problem solving. Change-Id: I31e15c2b1926745c251093cd1663d1ca1c65bff6 Task-number: QTIFW-813 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Fixed deleting files when uninstalling on OS XFrerich Raabe2016-02-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Uninstalling packages on OS X didn't seem to work very reliably, it often (always?) seemed to not remove a couple of files. When clicking the 'Show Progress' button while uninstalling, it became apparent that the paths to all the files to remove were computed wrongly: instead of deleting e.g. the file /tmp/installdir/foo.txt The uninstaller attempted to remove /tmp/installdir/Uninstall.app/foo.txt What happens is when uninstalling, the ExtractArchiveOperation class (which performs deletion of installed files in its 'undoOperation' reimplementation) reads the files which were installed from the XML markup embedded in the maintenance tool binary (this happens in UpdateOperation::fromXml()). The paths to the files which were installed make use of a special '@RELOCATABLE_PATH@' placeholder which denotes the effective installation directory. This placeholder is meant to be replaced with the actual installation directory, which is assumed to be the directory where the maintenance tool resides, i.e. what QCoreApplication::applicationDirPath();. On OS X however, the maintenance tool is an app bundle, i.e. the actual binary is not in /tmp/installdir/Uninstall but rather /tmp/installdir/Uninstall.app/Contents/MacOS/Uninstall The code already called the QInstaller:isInBundle() utility function to handle this case, but did so wrongly: isInBundle() returns the directory to the app bundle, i.e. /tmp/installdir/Uninstall.app What we want though is just '/tmp/installdir'. Hence, let's go one directory up. Change-Id: I927a453d7fbdd1048ff3d2172bd3cfec3a563b4a Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Doc: removed qdoc var declaration pixmapNico Vertriest2016-01-211-4/+0
| | | | | | | | | | | | | | | | Variable had previously been removed from localpackagehub.h Change-Id: I9673de6bbc1f5fedd6957b53a059e654930f77c2 Task-number: QTBUG-50557 Reviewed-by: Topi Reiniƶ <topi.reinio@theqtcompany.com>
* | Merge remote-tracking branch 'origin/2.0'Iikka Eklund2016-01-2042-133/+91
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: installerfw.pri src/libs/kdtools/kdgenericfactory.cpp src/libs/kdtools/kdgenericfactory.h src/libs/kdtools/kdupdaterapplication.cpp src/libs/kdtools/kdupdaterapplication.h src/libs/kdtools/kdupdaterupdatesourcesinfo.cpp src/libs/kdtools/kdupdaterupdatesourcesinfo.h sync.profile Change-Id: Ifdc8b065f89b7e241bd3788ed79768e21888161f
| * Update license headersIikka Eklund2015-12-2948-151/+103
| | | | | | | | | | | | | | | | | | Update existing license headers. LGPL -> LGPLv21. Update copyright year as well. Change-Id: Ie1d71f8c68186b8f625f409ddf94691f178093c9 Reviewed-by: Katja Marttila <katja.marttila@theqtcompany.com> Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* | Allow defining non-checkable itemsKatja Marttila2016-01-182-3/+13
| | | | | | | | | | | | | | | | | | | | | | This change will introduce new element 'Checkable' for package. Setting checkable to false will hide checkbox. Useful if use case is to install one sub item instead of all sub items. Change-Id: I8c731e77353b6da539dddcecdc8495b28ef5f7ea Task-number: QTIFW-773 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* | Missed to rename classes and to update docs and tests.Karsten Heimrich2015-09-0716-115/+135
| | | | | | | | | | Change-Id: I2d79ab4094cb9706287d44160543c19b35a66c95 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* | Merge remote-tracking branch 'origin/2.0'Kai Koehne2015-08-191-1/+18
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Changelog dist/config/config.xml dist/packages/org.qtproject.ifw.binaries/meta/package.xml dist/packages/org.qtproject.ifw/meta/package.xml installerfw.pri src/libs/installer/component.cpp src/libs/kdtools/updatesinfo.cpp Change-Id: I0a1b4a464f7d9008b589b54dd7aed0cac71bd666
| * Unify handling of translationsKai Koehne2015-06-301-7/+18
| | | | | | | | | | | | | | | | | | | | | | Mimic the logic implemented in installerbase/QTranslator::load() by - using QLocale().uiLanguages() - splitting up the locales into candidates (first en-US, then en ...) - implicitly assuming the default is English Task-number: QTIFW-390 Change-Id: I294288d5fc739ebf12c93a0e1a43d613b3834721 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Fix missing KD* documentation.Karsten Heimrich2015-08-071-0/+11
| | | | | | | | | | Change-Id: I4916c786ac946d58044eb6938801af93de82d6c4 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
* | Adjust include guards.Karsten Heimrich2015-07-1422-66/+66
| | | | | | | | | | Change-Id: I0252c934b3bcdca254ae6915904d84d5cf013f5a Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Rename files. Remove {kd} prefix. Remove {kdupdater} prefix.Karsten Heimrich2015-07-1441-94/+100
| | | | | | | | | | Change-Id: I88c93cab718f4659296d5f7f562beefd747a366f Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Make the installation relocatable (with some limitations).Karsten Heimrich2015-07-141-8/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the install path with a constant that's updated while loading the stored configuration and operation values. Dynamic variables now need to be set after reading the .ini file, cause there we store the values we found during installation. Makes an installation relocatable, though with some limitations: * Uninstaller entry might break on Windows * Start menu sortcuts might break on Windows * Everything else written to the system using full path Task-number: QTIFW-653 Change-Id: Ie3255299460d4ad7f18c88de9044c95db10d17ac Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Make use of the new varadic template feature + cosmetic changes.Karsten Heimrich2015-07-106-38/+40
| | | | | | | | | | | | | | | | Change constructor to take the a package manager argument. Add a package manager member to the operation. Remove setter function. Change-Id: Iffb860e24089beb6496ac4ee479d547a29463728 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Add factory auto test. Update template parameter + documentation.Karsten Heimrich2015-07-102-32/+75
| | | | | | | | | | | | | | | | The create function cannot be documented properly, cause qdoc does not understand the ellipsis(...) operator as of right now. Change-Id: I6569372ed37621eeaaa7a41ea49aa795676ca65b Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Sanitize QDebug outputKai Koehne2015-07-093-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | Prefer using the stream operator logic instead of using QString::fromLatin1. Add a noquote() where a QString should be printed without any quotes/escapes. This also fixes the tests with Qt 5.5, where QString's are further escaped. Change-Id: Ie3afd14b9355101d3c0b52f30f66ec759c76526c Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Remove superfluous clone() method. Prepare for next patch.Karsten Heimrich2015-06-254-48/+0
| | | | | | | | | | | | | | Task-number: QTIFW-180 Change-Id: I6aa8b409e323d14e353a1f80b0b2ec54daad184f Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Implement generic factory using c++11 variadic template feature.Karsten Heimrich2015-06-254-163/+30
| | | | | | | | | | | | Change-Id: I65bbb82ef1bd8c1a94100b583f504a86d64015de Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Add getter and setter for package manager.Karsten Heimrich2015-06-243-3/+19
| | | | | | | | | | | | Change-Id: Iff8ac5fc97f73939e0cbfea21370bb63e94b7782 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Unify translated error messagesKai Koehne2015-06-2410-64/+97
| | | | | | | | | | | | | | | | | | | | | | | | * Enclose file paths in "" * Localize file paths with QDir::toNativeSeparators. * Make sure sentences end with a '.' * Append error details always by ':', e.g. tr("Failed to copy file '%1': %2").(...) * Use 'directory' instead of 'folder' everywhere Change-Id: Ie045f429f72ad5045c96537465c5fb9d2e99d250 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Fix missing operation 'installer' value and update documentation.Karsten Heimrich2015-06-231-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 478a8a1db3eed2 was done under the assumption that after UpdateOperation::fromXml(...) existing values are still set. That is wrong and we have to set the 'installer' value again. The same commit was trying to fix the empty 'installer' value in the operations destructor, though the value got removed in PackageManagerCore::writeMaintenanceToolBinaryData() already. We now skip it once we write out the XML. Change-Id: Ia029ae4583862f4cbc6feb1c757604bf7b042a8f Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Convert to Qt 5 connect syntaxKai Koehne2015-06-153-17/+13
| | | | | | | | | | | | | | | | | | | | | | | | Convert to new signal/slot syntax where it does not make things more complicated: connections where the signal or slot is an overloaded method, or where the receiver method is not in a QObject, are left alone. The new syntax allows compile-time checking of the connection. Change-Id: I2cc3c93b9812797bd67f64a8728569491eeec668 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Add method to lookup if a product is registered in the factory.Karsten Heimrich2015-06-102-0/+11
| | | | | | | | | | | | | | | | Make use of the new method to search for registered operations. Note: commit 81ad56fdd0afe3baf84ad1fb removed a similar method. Change-Id: Ie698020dae51c9fca962b99333e405a5db342045 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Fix compilation error in testsKai Koehne2015-06-092-1/+3
| | | | | | | | | | | | | | | | | | Commit 947e85b47c caused QDomElement to be referenced in the headers included by the testcases. Rather forward declare it to avoid having to add QT += xml to all tests. Change-Id: I85427efb5d76eea7b086382ff2dbe823faeecdad Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Store AutoDependOn inside components.xmlJarek Kobus2015-06-052-27/+41
| | | | | | | | | | Change-Id: Id304ca857ee1897c35171d6c293774f1d638bc02 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Reuse existing structures inside Update class.Jarek Kobus2015-06-053-35/+15
| | | | | | | | | | Change-Id: I481b0129c5263da4969053d658e30fb671acf74e Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Implemented xml:lang attribute support for DisplayName tag.Dmitry Mordvinov2015-05-082-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Components in tree view are often need to be localized. Therefore packages.xml syntax is extended with possibility to specify xml:lang attribute for DisplayName tag (similarly to Description one). Test data extended with root component localization. Added new testcase that changes default locale and checks that loaded component names correspond to hard-coded ones. Docs updated with new feature description. Change-Id: Ic330c3c6684e763eb48a2e99e71784913544e686 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Remove pseudo static core instance, fixes autotests.Karsten Heimrich2015-05-063-5/+19
| | | | | | | | | | | | | | | | | | | | | | We need the core engine in operations anyway, so pass the pointer to the create function instead of setting it on our own after the operation was created. The only reason to introduce the static was the ~UpdateOperation() destructor, which now can get the value from its internal data instead of using the static instance call. Change-Id: Ide27542837355ec8c642a6687ca02977983f84fa Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Use QMap instead of QHash to keep the stored order on disk.Karsten Heimrich2015-05-062-22/+18
| | | | | | | | | | | | | | Some minor other changes as suggested by Jarek on cd75e52e. Change-Id: I39ad5335c0ea19821c98fa3c575a3405f2ebcda7 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Rename the files to match the class name.Karsten Heimrich2015-05-064-4/+4
| | | | | | | | | | Change-Id: I018445cbfc1d9278c549f3f56145dd12c4921000 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Rename classes to reflect their use. Remove typedef.Karsten Heimrich2015-05-064-63/+74
| | | | | | | | | | Change-Id: I5abb64d356a0951671487b60529a0ca26b0909be Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Replace UpdateSourcesInfo and UpdateSourceInfo classes.Karsten Heimrich2015-05-065-308/+28
| | | | | | | | | | | | | | | | | | | | | | | | Introduce a new struct PackageInfo, which is similar to the removed UpdateSourceInfo struct. The new struct name reflects the actual use better, as we deal with package here (either packages to install or updates to apply) and not updates only. Also remove the container class UpdateSourcesInfo, we can simple reuse a existing Qt container here. Adjust all occurrences that use/ used the classes. Change-Id: I526e24cbf1664f0ab0ad18153f60c2c10b6909d8 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Fix issue with accessing install target directory.Karsten Heimrich2015-05-061-3/+1
| | | | | | | | | | | | | | | | | | | | | | In case we run as installer, do not look into the installation target directory to read the package XML file. This needs only be done to get installed packages, read the application name and version to compare updates and online components against. Change-Id: Ie5b82854e41dc2f11ae5668c5839351c2fc52e04 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Rewrite to use QHash instead of QVector.Karsten Heimrich2015-05-062-95/+63
| | | | | | | | | | | | | | | | | | Since add and remove are the most common tasks of the class, and both functions did linear lookups for the package, a hash should be the better container to use here. Change-Id: I0ea8cb8683bc106c3b33e3bba7ff4c9af2b7611b Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Rename function name.Karsten Heimrich2015-05-052-5/+5
| | | | | | | | | | | | | | | | The function actually adds the package info to the known installed packages, it does not install them on its own as, the name suggests. Change-Id: I256300497fce04fb1fd74f26dc1d4fa77ba15f41 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Remove (KDUpdater}Application, functionality has been merge.Karsten Heimrich2015-05-054-300/+4
| | | | | | | | | | | | Task-number: QTIFW-215 Change-Id: I7a9215c8c5d5eae0d66d57650f5b8b82dd4d40b4 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Take over the last used methods from {KD}Application.Karsten Heimrich2015-05-051-2/+3
| | | | | | | | | | Change-Id: I9aaac261bef7aaa48cf0beaee83e15cc5bccd437 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Move the PackagesInfo handling out of {KDUpdater}Application.Karsten Heimrich2015-05-056-115/+29
| | | | | | | | | | | | | | | | | | Do not hide the class behind {KDUpdater}Application, we can use it directly. Also remove unused code from the PackagesInfo class itself. Change-Id: I6876a5887c498aa20fb54e016159223e336d9362 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Move the UpdateSourcesInfo out of {KDUpdater}Application.Karsten Heimrich2015-05-056-439/+61
| | | | | | | | | | | | | | | | | | Do not hide the class behind {KDUpdater}Application, we can use it directly. Also remove unused code from the UpdateSourcesInfo class itself. Change-Id: I99cc34e9089da63087892d8d3540522e9f59b2c8 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Merge remote-tracking branch 'origin/2.0'Kai Koehne2015-04-211-0/+1
|\| | | | | | | | | | | | | Conflicts: Changelog Change-Id: Idd7d569f97fba75b05bfc006c7a5b0b9cf8ccf73
| * Compile with Qt 5.5kh2015-04-131-0/+1
| | | | | | | | | | Change-Id: Iaab5bd3821bc4f1d4a826c9fee0c2a8c75d06bba Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Merge remote-tracking branch 'origin/2.0'Kai Koehne2015-03-171-19/+23
|\| | | | | | | Change-Id: I3b38821be20c02d41d9db1c5eee78be1502cba6b
| * Doc: Add missing docs for KDUpdater::PackagesInfoLeena Miettinen2015-02-271-19/+23
| | | | | | | | | | | | | | | | Fix references to non-existing package information file elements. Change-Id: I6167b66284ad018057610f38f8a5c4d3cd67806d Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com> Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* | CleanupJarek Kobus2015-02-273-47/+62
|/ | | | | | | | | | | | | | | 1. Add a checkArgumentCount() helper method. 2. Fix a plural form of the check method. 3. Remove repeating translation for every UpdateOperation subclass. 4. Use always QList.at() for checking arguments, instead of random usage of first(), last() and at(). 5. Fix const corectness. 6. Move isPersistant into #ifdef Q_OS_WIN inside EnvironmentVariableOperation. Change-Id: Idaa12265f1816871de0a4ea3ae586512859a04e3 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>