summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Workaround QSettings / QDateTime incompatibility with Qt 6 applicationsArttu Tarkiainen2022-05-173-12/+67
| | | | | | | | | | | | | | | | | This causes problems when installers created with IFW share config files with Qt 6 applications. If the config file contains keys with QDateTime values written by the other application, the installer and maintenance tool will segfault when attempting to sync the file, even if we do not overwrite the values. This is fixed to recent Qt 5 and 6 versions with the submitted patches to QTBUG-102334. But as this requires updating the baseline Qt version for both the Qt IFW and the Qt 6 application, apply the workaround suggested in the issue comments, to avoid the crash in meantime. Task-number: QTIFW-2610 Change-Id: I968e293324775dc650315e223f549a81657a27a3 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Swap priority of remote and binary resource package sourcesArttu Tarkiainen2022-05-171-3/+3
| | | | | | | | | | | | | | | | | | | | When a component with the same name and equal version is available from both remote repository and installer binary, it makes more sense to use the installer resource as the package source for the component. This also fixes the issue of erroneously registering duplicate archives to a single resource collection. Because both the internal resources and downloaded archives are registered in the same naming scheme of "installer://<component>/<version><archive>", we would register the same archive second time when using the remote source. If the packager has not explicitly added Extract operations for the component, these would be created automatically by looking for archive entries from the component's resource collection, and so the same operation would be added twice. Task-number: QTIFW-2242 Change-Id: I82d4ed8a94a67d982b016bf7cec972e43bef8f03 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix calculating autodependencies for install/uninstallKatja Marttila2022-05-175-13/+53
| | | | | | | | | | | Autodependencies can be added also from script. The uninstaller and installer calculators ignored the values set from script depending on at what state of the script run the autodependencies were added. Fixed so that at any point the autodependencies are added from script, the installer and uninstaller calculators has correct values. Change-Id: If993bcce72f889b51e4b981473540c4e1ccd6067 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Do not install new dependencies for installed componentsKatja Marttila2022-05-1620-19/+175
| | | | | | | | | | | | | | | | If component is updated to repository, and new dependencies are added, the dependencies should be installed only when fresh install to component is made or the component is updated. This change adds a new LocalDependencies value to component. It keeps track of the dependencies the local installed packages has. Fixes also a bug in uninstallecalculator, where we should also read the dependencies from local installed packages instead of newly introduced repositories. Task-number: QTIFW-2624 Change-Id: I0557e5adf1e87c0a1238cc455cfb2c90f6b05c87 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Fix updating autodependency componentsKatja Marttila2022-05-1310-15/+78
| | | | | | | | | | | Autodependency components were always forcely updated, even if 'Deselect All' was selected in component selection page. Fixed so that the autodependency component update is updated only when one of its dependants is updated. Task-number: QTIFW-2595 Change-Id: I05ececc45ef32ff80d53b008f839b358158a3316 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Tests: Use data driven tests for commandlineupdateKatja Marttila2022-05-1321-146/+469
| | | | | | | | This change allows more freely to add new test cases as the test cases are now independent on each other. Change-Id: Ia0635cf44b51095ef7be8bd829474233fb075e7a Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Save sorting priority of components to local package hubArttu Tarkiainen2022-05-135-0/+10
| | | | | | | | | | Before this change, components that declared explicit SortingPriority value would be sorted incorrectly with the default sorting value if the repositories were not available after installation. Task-number: QTIFW-2631 Change-Id: I3d18d6c6a5444eb3d2d700f12ed61da72431b8a4 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Update Korean translation fileArttu Tarkiainen2022-05-121-22/+139
| | | | | | Task-number: QTIFW-2622 Change-Id: I8451b4c7a4b6533efcfef09ec1c44d3aa7183066 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Update Polish translation fileArttu Tarkiainen2022-05-121-19/+127
| | | | | | | Task-number: QTIFW-2622 Change-Id: I780802300c380c3e84af58d3e79ad199f679e74e Reviewed-by: Krzysztof Guć <krzysiek@gemsnet.pl> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Update Spanish translation fileArttu Tarkiainen2022-05-121-22/+137
| | | | | | Task-number: QTIFW-2622 Change-Id: I3b2e7fa2be859df300917da67392b57a067a284a Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Tests: Add detailed information about installer resource failsKatja Marttila2022-05-121-5/+7
| | | | | Change-Id: Id6cac37c1c5cb760ea5303a4fdbf53cf02fcda0a Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Update German translation fileArttu Tarkiainen2022-05-101-22/+140
| | | | | | Task-number: QTIFW-2622 Change-Id: I4862ac23acc4a1e5417a3432902a879b8028d9a3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add more generic trace messages for concurrent operationsArttu Tarkiainen2022-05-0911-61/+298
| | | | | | | | | This makes the output more consistent between operations in Unpack and Install phase and removes the need to hard code some print to the operation side. Change-Id: Ia955f479cb138fcf0ffd6a73a06de6a74df6ed13 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Do not recalculate local installed componentsKatja Marttila2022-05-069-35/+43
| | | | | | | | | | | | | | | | No need to recalculate local installed components if no changes has been made. This makes the component selection quicker if there are lots of components to be installed. Local components are already calculated and listed in LocalPackageHub. Using this class directly instead of calculating own local component hash table. This changes the localInstalledPackages() from QHash to QMap, which is not as optimized for searching components, but overall performance is still now way better. Task-number: QTIFW-2522 Change-Id: I8c16060f4b4014f740be0c7c43ece5e659d92987 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* COIN: Build IFW with 64bit MSVC2019Katja Marttila2022-05-062-6/+6
| | | | | | Task-number: QTIFW-2544 Change-Id: I0db216634bb15fae352f4fc2a1118e32a47e712f Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Remove unnecessary unstable calculationKatja Marttila2022-05-052-20/+13
| | | | | | | | | | | | Removed unnecessary dependency component calculation for unstable components. We mark the dependee components unstable already in setUnstable() -function where we mark the original component unstable. This change speeds up building the component tree from zero to fifty percent depending on the number of script all components have. Task-number: QTIFW-2626 Change-Id: I11b35cfd981cea8b8ed958a5af51b695cc47e9c5 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Doc: fix wrong qdoc commands for parametersArttu Tarkiainen2022-05-051-1/+1
| | | | | Change-Id: I9089e814426e177d5af38d19363cdd97189fa0d3 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Doc: fix include paths for 3rdparty librariesArttu Tarkiainen2022-05-051-2/+3
| | | | | | | This removes a lot of "unknown type name" qdoc errors. Change-Id: I41bd9fa1ea6f163b7a49450b05489bc774764021 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Do not emit dataChanged when model check state changesKatja Marttila2022-05-051-15/+6
| | | | | | | | | | | | | | Single items check state is not tracked anywhere else but in the model, so we do not need to send dataChanged -signal to every item when the model check state changes. The correct check state is already set to every item above, so this emit seems unnecessary. This has significant effect on 'Select All', 'Deselect All' and 'Default' -buttons. If there are hundreds of items in the tree, this speeds up the button press in best case over 50 percent. Task-number: QTIFW-2623 Change-Id: If3c2aaebcc0dd6619179c31a51c8a57fdcec5c66 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* macOS: Create alias of maintenance tool to Applications directoryArttu Tarkiainen2022-05-058-4/+163
| | | | | | | | | | | | This makes maintenance tool startable from Launchpad and Spotlight search. Add "MaintenanceToolAlias" configuration variable for setting the name of the alias, which may differ from the actual file name in installation directory. Task-number: QTIFW-2535 Task-number: QTIFW-2478 Change-Id: I73ae5bbf5d0196b2512b5517cb02c391b2ab278c Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix "Can't unlink already-existing object" errors on extractArttu Tarkiainen2022-05-041-4/+10
| | | | | | | | | | | | | | | | | | | | | | On Windows, extracting archives containing same files and directories would sometimes cause "Can't unlink already-existing object: Permission denied" error when replacing existing files. This was caused by releasing the FileGuard lock object for the archive entry without ensuring the entry was closed. Normally libarchive clients do not need to care about this, as the entry is closed automatically by archive_write_header() and archive_write_close() as required, but in our case there is a need access synchronization because archives can extract entries with the same entry paths in parallel. Fix by calling archive_write_finish_entry() before releasing the lock, so that no file handles are left open and no file attribute changes are left pending for the implicit closing on writing the next entry header. Task-number: QTIFW-2620 Change-Id: I7e7322927964296c3b32ef4a052a91f1ba29aac3 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add documentation for typedefs AutoDependencyHash and DependencyHashKatja Marttila2022-05-025-11/+26
| | | | | | | | Also use the typedefs in the code when possible. Change-Id: Ie5aa55997051afc864de87d58a10db1c33312ff2 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* AspectRatioLabel: center the pixmap by defaultArttu Tarkiainen2022-04-291-0/+1
| | | | | | | | This looks better when the pixmap cannot be scaled to the entire viewport because of its aspect ratio. Change-Id: I5826412124363ab38cb07dcc35ff5387e8baa380 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* installerfw.pri: fix POST_TARGETDEPS for app project templatesArttu Tarkiainen2022-04-291-3/+9
| | | | | | | | | | The libinstaller dependency for application project templates was listed under wrong scope, and was only added when building with LZMA SDK. Consequently this broke rebuilding installerbase when making changes only to the libinstaller sub-project. Change-Id: I98cf391bcf502130ca8316c0d749f95b89485a38 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Speed up component selection in component selection pagesKatja Marttila2022-04-2814-241/+515
| | | | | | | | | | | | | | | | | If a lot of components are installed, maintenancetool was slow to select/unselect a single component. This was caused because the whole tree's components were recalculated. Fixed so that only the selected/unselected components and their dependencies and autodependencies are recalculated instead of whole tree. This change speeds up clicking tree item from zero to 90 percent, depending on how much components are already installed. The more components are installed as autodependency, the slower it gets to select the items. Task-number: QTIFW-2522 Change-Id: I5e824aed8787fd7ecdce72b15a1b13848f0a3923 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Print uninstallation progress on archive level with normal verbosityArttu Tarkiainen2022-04-282-1/+6
| | | | | | | | | | | | | | Don't print the name of every single removed file and directory unless the verbosity level is set to detailed, as this really chokes the UI thread. QPlainTextEdit would have had better performance for a real-time output log widget than QTextEdit, but we cannot use it as we require support for displaying and automatically aligning text also for RTL languages. Task-number: QTIFW-2615 Change-Id: Ie2938941b32bb387c0528b894cd058f395561814 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Use fixed width font for the license text browserArttu Tarkiainen2022-04-281-0/+2
| | | | | | | | | Some licenses use ASCII art to display tables, etc. which requires that the font is of fixed width. Task-number: QTIFW-2613 Change-Id: I0f473e6320912702c5df01d99a573ee820da3c1b Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Don't print warnings for backup operations when installer is canceledArttu Tarkiainen2022-04-281-0/+3
| | | | | | | | | Before this change we would print a warning for each operation when iterating over the results of their asynchronous execution. These are unnecessary as canceling is a conscious action from the user. Change-Id: I2b9bd469b3a3e1c9794c6f2c4952896640cd88da Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* libarchive: add more descriptive error messagesArttu Tarkiainen2022-04-281-36/+70
| | | | | | | | Some of the error paths, especially when packaging archives, gave too vague information about what went wrong. Change-Id: I04388a6d333533fb370a472fa82d9562b17df37e Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix rollback of extract when archive lists file entries firstArttu Tarkiainen2022-04-211-2/+22
| | | | | | | | | | | | | | | | | At least with the 7z format packaged with a recent archivegen version, the directory entries from archives get processed last when extracting. We remember the path of each extracted entry in the order the writing happens, to be able to undo the extract later. The directories need to be empty for the removing to succeed, so we cannot rely that the entry order from extraction is correct. Ensure files are removed before directories and that the directories are removed in an order starting from the deepest subdirectory level. Task-number: QTIFW-2594 Change-Id: I8a914c4bf69147b845b12f0481c49c93408b51fd Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add option for specifying maximum concurrent unpack operationsArttu Tarkiainen2022-04-219-3/+77
| | | | | | | | | | For tracing issues with the multithreaded extraction and limiting the processor load from the installer. Task-number: QTIFW-2586 Change-Id: I5df0bf6be30b4ee5ef8470c407281e2a4318ed0c Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Show additional progress information on PerformInstallationPageArttu Tarkiainen2022-04-219-32/+87
| | | | | | | | | | | | In a similar fashion to the archive download status, display: * Performed operations - total operations, on unpack. * Installed components - total components, on install. * Rolled back operations - total undo operations, on uninstall. Task-number: QTIFW-2513 Change-Id: I61690a25afadd1ca1e4a46b5b980ac094429135b Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Use archive sizes for sorting and calculating progress of Extract opsArttu Tarkiainen2022-04-215-3/+54
| | | | | | | | | | | | | | | | This makes the progress appear smoother when the archives to extract differ in size. The sorting based on the archive sizes provides some improvement to optimal thread utilization, as the larger archives get more time to complete from the start. We are less likely to find ourselves in a situation where any of the last operations left to be run with less than ideal thread count take significantly more time to complete than the others. Task-number: QTIFW-2431 Change-Id: I2534b6f18997d73c4ce1fb8b26900e30e1c6a76f Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add support for parallel extraction of component archivesArttu Tarkiainen2022-04-2133-189/+874
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce ConcurrentOperationRunner class used for running installer operations concurrently in the global thread pool. Add execution groups for operations; Unpack operations are run concurrently for all components requesting installation, operations belonging to Install group are run sequentially for sorted components one at a time as before. From the default registered operations the Extract op is moved to Unpack group. Move the previously on-the-fly backup steps of Extract operation to the ExtractArchiveOperation::backup(), so that backups are done before any archives are extracted, and that we know if any of the archives requires administrator privileges to unpack. Reparent QInstaller::Error to QException to support throwing and catching exceptions across thread boundaries. Use RAII for the server-side objects of the classes supporting the remote client-server protocol of installer framework. The concurrent extraction revealed that it was still possible that the local socket was disconnected and thus the RemoteServer- Connection thread finished before receiving and processing the final "Destroy" command packet, leaking the dynamically allocated objects. Task-number: QTIFW-2566 Change-Id: Ib8c2928b9405b7b3465c731018df73acb51e949f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Speed up Next button click in tree viewKatja Marttila2022-04-212-4/+3
| | | | | | | | | | | | | Components were recalculated when leaving the tree view. This is unnecessary as we have just calculated the components. Moving the recalculation to Introduction page so alternate pressing of 'Add or remove components' and 'Update components' will cause the recalculation as we need that to keep the component install states in sync. Task-number: QTIFW-2598 Task-number: QTIFW-694 Change-Id: Ia84a01b4f1d0b39b4844c02470b764c4940e943c Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* AspectRatioLabel: prevent setting non-scaled pixmapsArttu Tarkiainen2022-04-212-2/+16
| | | | | | | | | | | | | | | | | The function signature for setting a pixmap for the label changed from 'setPixmap(const QPixmap &pixmap)' to 'setPixmapAndUrl(const QPixmap &pixmap, const QString &url)' when we enabled support for click URLs. Redefine (again) the base class QLabel::setPixmap() slot to make it harder for callers to set non-scaled pixmaps accidentally. This is still a bit bad however as it is possible to get different client-visible results by calling the method with a base class pointer. Task-number: QTIFW-2612 Change-Id: Ic79b3d71ffd5baf2108768ad3b867ddbcb33833b Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix wrong ApplicationsDir value on macOSArttu Tarkiainen2022-04-211-1/+3
| | | | | | | | | | | | | | | | | | | This has been already fixed but the change was overwritten by a merge commit. From original commit message: QStandardPaths::standardLocations(QStandardPaths::ApplicationsLocation) first element returns $HOME/Applications, as being user writable it has a higher priority. Change the variable to return system wide /Applications as it is a more expected default. Task-number: QTIFW-1011 Change-Id: Iff4f65450db03ed412d4cb97db5f294bf52ffc72 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add Qt Creator generated clangd directory to .gitignoreArttu Tarkiainen2022-04-211-0/+1
| | | | | Change-Id: Ia4eafadfa4087364333d117e2bb56d01b4f76719 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add missing mnemonic for the "Settings" buttonArttu Tarkiainen2022-04-2117-17/+17
| | | | | | | | | | The "Cancel" button on bottom of the wizard is also missing a shortcut. But this behavior is inherited from QWizard, where it appears to be intentional. Task-number: QTIFW-2206 Change-Id: I53e595591679f5d22b2b381f86974dfc963d2bd4 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Update libarchive sources to 3.6.1 releaseArttu Tarkiainen2022-04-2112-44/+106
| | | | | | | | | Release details: https://github.com/libarchive/libarchive/releases/tag/v3.6.1 Change-Id: I57275393c785195cf0ae19bfc59be42c7c5e4875 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Print archive and compression library versions with --version optionArttu Tarkiainen2022-04-132-3/+18
| | | | | | Task-number: QTIFW-2507 Change-Id: I566dc4984df305fb0b5e7b9a1fe7ea9628ac02d4 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Move LZMA SDK to 3rdparty subdirectoryArttu Tarkiainen2022-04-13593-528/+39
| | | | | | | | | Also add attribution document. Task-number: QTIFW-2336 Change-Id: I91546bc6c3ace244e4b546b945f40b7d204f7463 Reviewed-by: Katja Marttila <katja.marttila@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* 3rdparty: deprecate usage of LZMA SDKArttu Tarkiainen2022-04-1313-49/+98
| | | | | | | | | | | | | | | | The 3rd-party sources haven't been updated in a long time, and is missing some features compared to libarchive (which the official IFW binaries use), like symbolic link support on Windows. Add deprecation warning when compiling with LZMA SDK, and make building the library and related client code conditional behind a separate config feature. Update docs to emphasize that libarchive is the recommended build option for archive handler. Change-Id: I70ed5f9b5d13e2243778f7c44b4ea833c8092ae0 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add a signal which is emitted when the downloads are finishedArttu Tarkiainen2022-04-113-0/+16
| | | | | | Task-number: QTIFW-2269 Change-Id: I7ec5931e8475a3477ba2c05ba9e8ed0620b02206 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* binarycreator: do not require -p option when -rcc option is usedArttu Tarkiainen2022-04-011-1/+1
| | | | | | | | Compiling the update resource doesn't require specifying a package or repository directory. Change-Id: I2a8541b610e90755fb49ae9568ac7ee0756e3058 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Doc: add reference of metadata formats supported by repogenArttu Tarkiainen2022-03-311-0/+12
| | | | | | Change-Id: Ie36c8fdad257b08e8a6238f5460fd2de15682253 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Repogen: allow usage of --update-new-components with unified metadataArttu Tarkiainen2022-03-312-14/+40
| | | | | | | | | | I couldn't find a reason why this combination wouldn't work. If there are no known issues the option should be allowed. Task-number: QTIFW-2558 Change-Id: I9bceddc70e3ea4edeb1af2fe873f96bf815900d3 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Doc: Add instructions for promoting maintenance tool updatesArttu Tarkiainen2022-03-311-0/+101
| | | | | | | Task-number: QTIFW-2440 Change-Id: Ia34524072d7e1e7ca321d4e0ba4013ce4fc012a0 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Coin: update zlib paths to match provisioned versionArttu Tarkiainen2022-03-311-2/+2
| | | | | Change-Id: I2d290f97c11e424e70134c66b8877207e0f1d5cb Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* CLI: Add error message for trying to install unstable componentsArttu Tarkiainen2022-03-292-7/+17
| | | | | | | | | | Also print a general message when no components from the user selection are valid - in case the installer misses the detailed reason why components cannot be selected, at least some information is printed. Task-number: QTIFW-2591 Change-Id: I1b10e7601527ddc0192417b41691691b517139a5 Reviewed-by: Katja Marttila <katja.marttila@qt.io>