summaryrefslogtreecommitdiffstats
path: root/src/libs/kdtools
Commit message (Collapse)AuthorAgeFilesLines
* Add verbose levels and cleanup log categoriesKatja Marttila2020-08-245-14/+14
| | | | | | | | | Setting several verbose switches enables more logging and performs component checking. Also cleanup some logging categories and unify the rules. Task-number: QTIFW-1914 Change-Id: I9195f4bb02affaa87e66cf9023a3512e65e0645b Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add possibility to auto accept or reject IFW queries from CLIKatja Marttila2020-04-151-1/+1
| | | | | | | | | | | | | | | Added new command line switches accept-messages and reject-messages to automatically accept or reject installer message queries. Also removed Retry option in CLI when archive or hash download failed. With GUI it is possible to try Retry in case either is missing but without GUI Retry will cause infinite loop. Added unit tests for accept-messages and reject-messages using CLI. Task-number: QTIFW-1736 Change-Id: Ie87d2d8157be772b790415c96e5b94fc882d4be7 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Fix license check failuresSimo Fält2020-02-282-24/+34
| | | | | Change-Id: I123b1c6a06717c37387a636aae8296e27c1df8c0 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* CLI: decrease the amount of default debug printsKatja Marttila2020-02-203-4/+4
| | | | | | | | | | Debug prints can be suppressed or extended with logging rules. Make the default usage so that only relevant information will be shown to user, such as uninstall/install progress, server information, warning messages and package name, version and displayname. Change-Id: I09be754a36dd97530d75cdea3edb5fc77e67a856 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Use of QLoggingCategoryKatja Marttila2020-02-137-28/+36
| | | | | | | | The change enables easier filtering of log messages Change-Id: I769f7c163e20f34c37fa0fe2b0729867ffca5bcb Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Documentation fixesKatja Marttila2019-12-172-6/+17
| | | | | Change-Id: Ibffb5470d374c8d612791f48c951deddd00f3121 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Refactor setting and checking of file permissionsArttu Tarkiainen2019-08-301-0/+6
| | | | | | | | | | | | | | | | | | | | | | | Create methods to explicitly set default file permissions on Unix platforms, use these on installer created files and installation target directory. Add unit test for introduced functions. Remove method introduced in 46aecc23b2983c807ff2232ae9cb9651b4d2fdc2 as the same effect is achieved more efficiently by ensuring target directory will be written with explicit permissions on initial installation. Unlike the removed method, this will also not break if an installed component contains owner non-writable directories. Further simplify PackageManagerCore::directoryWritable() introduced in 89f772f819178ee2502768c3d259d22ecb910fbe. Remove orphan unit test for removed PackageManagerCore::subdirectoriesWritable(). This does not change permissions of files and directories extracted for installed components. Task-number: QTIFW-1412 Change-Id: I59698c78aceef874b1f79482bff5a618b9a1b536 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Update usage of Apple-related terminologyArttu Tarkiainen2019-08-161-1/+1
| | | | | | | | | | | Replace deprecated Q_OS_OSX macro used in several places with the newer Q_OS_MACOS. Old style reference of Apple's desktop operating system name as "OS X" in documentation and files are also replaced with "macOS" where applicable. Task-number: QTIFW-1406 Change-Id: I0561d5e0d964917ac4fca0702d58a06b85d30e57 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix update with long version numbersKatja Marttila2019-03-251-5/+5
| | | | | | | | | | Update fails if version number is longer than 32bit int. Fixed so that the value is converted to 64bit int instead so the int overflow will not happen. Change-Id: If7ab57e89b155793e9fab3ba5dad9c734adc2234 Fixes: QTIFW-1310 Reviewed-by: Konstantin Podsvirov <konstantin@podsvirov.pro> Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Fix tmp file removalKatja Marttila2019-01-222-15/+0
| | | | | | | | | | | | | | | Tmp files were not removed when all or these were met: 1. Using Linux 2. Installing to a folder which needs authorization 3. Installing a component which has no metadata Tmp 'remoterepo-XXXXXX' is created before acquiring authorization. In previous version if above list was met, a tmp folder was created inside remoterepo-XXXXX after authorization leading to permission error when deleting the folder. Task-id: QTIFW-1268 Change-Id: I937fe3ce13440c817d1264c80ad060dfc966e456 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Merge remote-tracking branch 'origin/3.0' into masterKatja Marttila2018-06-062-0/+14
|\ | | | | | | Change-Id: Ia00c88061f15fc9c9517b536609ac3260c0df2ef
| * Decrease metadata dowload amountKatja Marttila2018-06-012-0/+14
| | | | | | | | | | | | | | | | | | | | If there are no Script, Translations, Licenses nor UserInterfaces -tags in Updates.xml, there is no metadata. In such case, do not download the empty metadata to decrease the time used in downloading metadata. Task-number: QTIFW-975 Change-Id: I1b81a07b5ad43677e190fb058ece8b06382d215b Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Merge remote-tracking branch 'origin/3.0' into masterKatja Marttila2018-03-201-1/+1
|\| | | | | | | Change-Id: I601b783a9d2eed009737b2779803457949cbb014
| * Fix infinite wait if downloadable package is missingKatja Marttila2018-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | Instead of waiting for a package that is missing, show error message and abort installation Task-number: QTIFW-1064 Change-Id: I021e7ece9e4020a85380318185cdb6a424dc26fa Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Merge remote-tracking branch 'origin/3.0' into masterKatja Marttila2018-02-261-0/+7
|\| | | | | | | Change-Id: Ic74ee1485204e09e2baa384468b581ba0d9c79cd
| * Fix Mkdir operation in uninstallKatja Marttila2018-02-211-0/+7
| | | | | | | | | | | | | | | | | | | | | | If Mkdir generates directories to target dir, then uninstall will fail to remove those as targetDir is replaced with @RELOCATABLE_PATH@ when the operations are written to dat file. Fixed so that @RELOCATABLE_PATH@ is replaced with targetDir. Task-number: QTIFW-1099 Change-Id: I52a0330a2645e2d4a5371ce0d6f1fb296878752f Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Merge remote-tracking branch 'origin/3.0' into masterKatja Marttila2018-02-083-23/+226
|\| | | | | | | Change-Id: I8d0c8b9faa9537b50e989ec264ed7bfe8d2e358b
| * Avoid another null pointer dereferenceVille Voutilainen2017-12-121-1/+1
| | | | | | | | | | | | Task-number: QTIFW-1064 Change-Id: I053071292ef8786f6d829b57e45091e881ce3d4d Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Do not retry a download immediately after an errorVille Voutilainen2017-12-121-2/+1
| | | | | | | | | | Change-Id: I1751b5274b3f2f6c69482d98c8beb2c1ef77ae70 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Fix crash when httpReadyRead is signaled after shutdownVille Voutilainen2017-12-111-0/+2
| | | | | | | | | | | | Task-number: QTIFW-1064 Change-Id: Id300f5838fb5f7e72a5e77415ac1832faa2d7c84 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Implement package download resumeVille Voutilainen2017-11-033-23/+225
| | | | | | | | | | | | | | | | | | This doesn't implement a resume for checksum files and resource files; there's no pressing need for those. Task-number: QTIFW-5 Change-Id: Id14a3d9b46f2e16a15f52ae536d060d505b2f4f0 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Enable expanding items by defaultRiho Pihlak2018-01-032-2/+11
| | | | | | | | | | | | | | | | | | | | An item can be expanded by default in component tree by setting ExpandedByDefault to true in package.xml file. Change-Id: Ib324327cf6ef6e2dda3271e704f3ced523c6579c Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Allow comparing non-numeric versionsKonstantin Podsvirov2017-11-131-14/+42
|/ | | | | | | | | | | | Changes: - Improve KDUpdater::compareVersion method; - Add tst_CompareVersion test. Task-number: QTIFW-948 Change-Id: If64f807cfb04e56d2bdd5fa250f456631df3f239 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Merge remote-tracking branch 'origin/2.0' into 3.0Katja Marttila2017-08-211-0/+7
|\ | | | | | | | | | | | | | | Conflicts: src/libs/installer/downloadfiletask.cpp src/sdk/translations/ru.ts Change-Id: Ibce8b9592c98cec5af3521f4ae6f850c2b8f45ac
| * Fix translation contexts in classes not derived from qobject2.0Sergey Belyashov2017-08-211-0/+7
| | | | | | | | | | | | Change-Id: I0afbc19a27179b0646564cbb195683279175e98c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Add progressbar to indicate unzip job is proceedingKatja Marttila2017-05-102-3/+2
| | | | | | | | | | | | | | | | | | | | | | When a big compressed package is unzipped, it seemed that the installer hanged as there was no indication that the job is still ongoing. Added undetermined state to progress bar as unzip job does not inform the progress state. Task-number: QTIFW-967 Change-Id: I21ca394e1856038c51413f9e5011307ae7a9850a Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Merge remote-tracking branch 'origin/2.0' into 3.0Katja Marttila2017-03-302-0/+2
|\| | | | | | | | | | | | | Conflicts: src/libs/installer/downloadfiletask.cpp Change-Id: Ie4b07c402a63c7a12ecf24e52e197507bbb2c5df
| * 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>