summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Add option for specifying maximum concurrent unpack operationsArttu Tarkiainen2022-04-218-3/+71
| | | | | | | | | | 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-2126-185/+856
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 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-131-1/+14
| | | | | | Task-number: QTIFW-2507 Change-Id: I566dc4984df305fb0b5e7b9a1fe7ea9628ac02d4 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Move LZMA SDK to 3rdparty subdirectoryArttu Tarkiainen2022-04-13592-525/+36
| | | | | | | | | 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-134-18/+33
| | | | | | | | | | | | | | | | 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-112-0/+10
| | | | | | 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>
* CLI: Add error message for trying to install unstable componentsArttu Tarkiainen2022-03-291-2/+7
| | | | | | | | | | 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>
* Update libarchive sources to 3.6.0 releaseArttu Tarkiainen2022-03-2449-727/+1880
| | | | | | | | | | Release details: https://github.com/libarchive/libarchive/releases/tag/v3.6.0 Change-Id: Ia3d322ffbea70aad2713b7641832f6a56bb75645 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add install reason why component is uninstalledKatja Marttila2022-03-245-6/+100
| | | | | | | | | | In details view uninstallable and installable components are listed. For installable components a reason is shown why the component is installed. Added similar kind of message for uninstallable components as well. Task-number: QTIFW-2581 Change-Id: Idbf31200793a6c89a4ed4a6fc115f49889b5f9b5 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Merge remote-tracking branch 'origin/4.3' into masterKatja Marttila2022-03-227-58/+125
|\ | | | | | | Change-Id: I449320b3af2c561a0b4a4cb689d072533d8fdb8f
| * Fix replaced component uninstall4.3Katja Marttila2022-03-223-30/+47
| | | | | | | | | | | | | | | | | | | | Replaced component was uninstalled when installing other components although no update or install was requested to the component. Fixes also a bug when some components were uninstalled unvisible from user. Task-number: QTIFW-2577 Change-Id: I6a7e9ce4a56991dfbdea53eb376d782dfb5d050a Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
| * Show 'components to be removed' message in updater viewKatja Marttila2022-03-181-10/+7
| | | | | | | | | | | | | | | | | | | | | | Components might be uninstalled also in updater view, for example if the component is replaced with another components. This was not shown to the user. Task-number: QTIFW-2576 Change-Id: I143324eeb4830d15a718005992b3cb35d0f6696d Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
| * Do not uninstall needed virtual dependenciesKatja Marttila2022-03-184-7/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Virtual dependencies are uninstalled if all dependencies to the component is removed. Virtual dependencies were calculated using recent components in repository, which is wrong as the dependencies may have changed in the repository, causing the dependencies to be uninstalled although those are still needed. Fixed so that the uninstallable virtual components are calculated from repository components if the component is going to be updated, otherwise the dependeny is calculated from the local installed packages. Task-number: QTIFW-2573 Change-Id: If9cc59fa7f453d502ec1883f27273ef604128a6e Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
| * Revert "Simplify QInstaller::generateTemporaryFileName()"Arttu Tarkiainen2022-03-151-11/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 270c5dfd9b6c86bec8eaf34d0a2c3d3b945ed5e5. Reason for revert: This caused a regression when an absolute path pointing to a directory non-writable by current user was used. QTemporaryFile uses its own file engine so we need to use QFile instead to forward the calls to the elevated privilege installer process with the Qt Installer Framework's RemoteFileEngine. Task-number: QTIFW-2575 Change-Id: I47f5bea06f9e1689ee322d972b405d8127967a98 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Add click option for product imageKatja Marttila2022-03-218-46/+133
| | | | | | | | | | | | | | | | | | | | Product image can now be clicked. It opens either url in Web browser or if file reference is given, then it will be opened with the suitable application. Task-number: QTIFW-2361 Change-Id: I59ed1355e90c23c8d0a5124779725825ca1ee2c8 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Add locale include, needed for VS2019 buildKatja Marttila2022-03-081-0/+4
| | | | | | | | | | Change-Id: I29827c4197249b289641693b691a8a5d72277458 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Merge remote-tracking branch 'origin/4.3' into masterKatja Marttila2022-02-223-10/+9
|\| | | | | | | Change-Id: I4c2d440a82ceb4d48a97c78fa14fb15cc56596f0
| * Fix 'Execute' operation arguments with Linux separators4.3.0Katja Marttila2022-02-221-8/+5
| | | | | | | | | | | | | | | | | | | | | | This bug was caused by the previous change which allowed the Windows separators to be saved to dat file without converting to normalized separators Task-number: QTIFW-2501 Change-Id: Iaeb70da0eaaa5c677c72178fcb8b336bc50a6842 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
| * CLI: Fix missing warnings when trying to install invalid componentsArttu Tarkiainen2022-02-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | If there was at least one valid component argument, the installer would silently ignore any invalid component arguments. Instead print the appropriate "cannot install" reason for such components but still don't block installation for others. Change-Id: I7325d151385744ac46fcb5fa04c0eaf6acade3f3 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Fix minor Japanese translationsKatja Marttila2022-02-211-2/+2
| | | | | | | | | | Change-Id: Id7396eec7cc21e8011c716564adf9c9019eddb84 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Merge remote-tracking branch 'origin/4.3' into masterKatja Marttila2022-02-1816-240/+716
|\| | | | | | | Change-Id: I8204fdbae2602f3dfb6eb04dc28d2e59606594ea
| * Fix extracting entries with file paths that contain unicode charactersArttu Tarkiainen2022-02-171-32/+236
| | | | | | | | | | | | | | | | | | | | | | | | Libarchive stores most paths internally in a multistring that can contain a combination of a wide character string, multibyte string in current locale or unicode string encoded as UTF-8. Try to retrieve and set a variant of the string with the correct encoding when converting libarchive strings to/from Qt string classes. Task-number: QTIFW-2506 Change-Id: I7e7c1e3c5709b669df68b2f3918789ad4ebe4f13 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Update Japanese translation fileKatja Marttila2022-02-161-0/+16
| | | | | | | | | | | | Task-number: QTIFW-2436 Change-Id: I9b89eb86c33fbc39b77b96af963f1aaa02051374 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Update Chinese translation fileLiang Qi2022-02-101-10/+17
| | | | | | | | | | | | Task-number: QTIFW-2436 Change-Id: I9f3d81a5eb7c3ae1c5f596a1ba4a992bb99a1b8f Reviewed-by: Liang Qi <liang.qi@qt.io>
| * Update Chinese translation fileLiang Qi2022-02-091-32/+48
| | | | | | | | | | Change-Id: I144d3f1b955b92b8a0f46704016c9fe75f8c3ffa Reviewed-by: Liang Qi <liang.qi@qt.io>
| * Update Polish translation fileKrzysztof Guć2022-02-091-108/+147
| | | | | | | | | | | | | | All translations with unfinished status have been translated Change-Id: I0c4b0b15c3a1296f2e10cbd5c2dde631e34dc384 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Use of separators in Execute operationKatja Marttila2022-02-033-12/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | Execute -operation might be strict with the path separators. If wrong separators are used the Execute -operation might fail. Fixed so that Execute -operations paths are saved to dat file without converting to normalized separators. As the target dir is saved as @RELOCATABLE_PATH@ also for Execute -operation, check from the next available separator which separator should be used for operation. Task-number: QTIFW-2501 Change-Id: Ia9969bbe3177a6b2daab21c026df88d4e2ec2bb0 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
| * Libarchive: include errno code description in error stringsArttu Tarkiainen2022-02-022-20/+37
| | | | | | | | | | | | | | | | | | Sometimes the textual error message returned by archive_error_string() does not reveal enough useful information, add also the error code from archive_errno(). Change-Id: Icc62168bc862484bfa1efc70dd8ca2e341b3394f Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Gain admin rights when user is missing privilege to create symlinksArttu Tarkiainen2022-01-317-7/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, the non-admin users cannot create symbolic links by default. Extracting archives containing symlinks would fail if the installer was no started as administrator. Catch the case and auto-elevate installer to extract such archives. Do not elevate installer if the current user has the privilege for symlink creation, or if the Developer mode is enabled, allowing unprivileged creation of symlinks. Task-number: QTIFW-2428 Change-Id: I0b6b1079daabb9727055dce8a9475c203d7e92b0 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Doc: Update toNativeSeparators/fromNativeSeparators docKatja Marttila2022-01-311-0/+10
| | | | | | | | | | | | | | | | | | | | Add information that the predefined variables are not resolved when calling this function. Task-number: QTIFW-2488 Change-Id: Ic6da8323c74c216f09dd54610ee9095d0a32c27c Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
| * Remove extra linebreak from ConsumeOutput operationKatja Marttila2022-01-311-1/+1
| | | | | | | | | | | | | | | | | | ConsumeOutput may be run to fetch a file path. Extra line break in the end will cause problems. Change-Id: I61133a66fb3d3a6961e9f79c11f783b5d103f046 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
| * Do not check file existence in ConsumeOutput operationKatja Marttila2022-01-311-20/+8
| | | | | | | | | | | | | | | | | | | | | | ConsumeOutput operation executable might be a system executable. Checking with QFileInfo if the file exists or is an executable does not work then as QFileInfo expects the given path to be full. QProcess might still find the executable although QFileInfo does not. Task-number: QTIFW-2499 Change-Id: I355f24c0c97947f8247667f54f203189b3830ead Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Update license headerKatja Marttila2022-01-278-122/+39
|/ | | | | | | | Some of the license headers were still LGPL. Changed those to use GPL-EXCEPT. Change-Id: I26fd46b1f226b2898c7296737c12c679bf3cc9e1 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Update license headerKatja Marttila2022-01-2414-25/+25
| | | | | | | Use https instead of http in www.qt.io/licensing Change-Id: I0a2e97afcda03d50fd823be8e11426c2399a3b8f Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Update Russian translation fileKatja Marttila2022-01-241-0/+16
| | | | | | Task-number: QTIFW-2436 Change-Id: Ib1308b78d4e793f9d94bc2b891b7646799b11337 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Make 'override' specifier usage consistentArttu Tarkiainen2022-01-2148-353/+355
| | | | | | | | | Add where missing. Replace occurrences of Q_DECL_OVERRIDE macro, building IFW requires a C++11 compatible compiler so the language specifier is preferred. Change-Id: Idb75e2813d26b9da85e03891f0ae9537c6524c56 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Update libarchive sources to 3.5.2 releaseArttu Tarkiainen2022-01-2132-677/+1412
| | | | | | | | | Upstream details: https://github.com/libarchive/libarchive/releases/tag/v3.5.2 Change-Id: I92bc5911bde854c30d0b6515c49b5d512210401f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* MT: Fix setting incorrect TargetDir value when started as rootArttu Tarkiainen2022-01-201-1/+1
| | | | | | | | | | | | | | | Maintenance tool was using the vendor configured default target directory for system wide installations instead of the actual application path. In addition to possibly several other things breaking as the variable is used extensively by the framework, this would make the installation appear corrupted as the local package hub file could not be read from the incorrect location. Task-number: QTIFW-2486 Change-Id: I31676e57d83409022e6908e64fac636b12d8262d Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* RemoteObject: Fix warning on calling QLocalSocket::waitForDisconnected()Arttu Tarkiainen2022-01-201-3/+6
| | | | | Change-Id: I1d5fdfedaee35c530b383951e6fc69b75bd67d64 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Replace unnecessary includes with forward declarationsArttu Tarkiainen2022-01-2011-24/+37
| | | | | Change-Id: I4e5d627ae1832f6db63decfe1df4309bee938972 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Enable 'Enter' to click Next -button in macOSKatja Marttila2022-01-201-0/+5
| | | | | | | | | | | | | Removing QWizard::NoDefaultButton will enable enter clicking in macos. This will also keep the Spacebar -key press to accept the Next -button. Adding also Qt::StrongFocus to Next -button, otherwise for example the radio buttons in Introduction -page will get the Spacebar -key press, even when those are set invisible, causing the installer to be converted to package manager. Task-number: QTIFW-2409 Change-Id: I2ad0e98b5be635c2f9e53ec1b6262bd37be22cae Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Fix hard restart of maintenance toolArttu Tarkiainen2022-01-201-9/+16
| | | | | | | | | | This was only working when a component containing maintenance tool replacement was updated. For other 'Essential' and 'ForcedUpdate' components nothing happened after clicking the restart button. Task-number: QTIFW-2381 Change-Id: Ie59315b1d7e123af7169dff267ee2e1a4cf6b470 Reviewed-by: Katja Marttila <katja.marttila@qt.io>