summaryrefslogtreecommitdiffstats
path: root/src/libs/installer
Commit message (Collapse)AuthorAgeFilesLines
* Update CLI wording when component is not foundKatja Marttila2 days2-2/+2
| | | | | | | | | When trying to install or update component which is not found, a warning is dispayed. Changed the wording so that the texts fits both to update and install commands. Change-Id: I06c58624fc33586f64a2c63768690ab431e661e8 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Fix metadata fetch in updater modeKatja Marttila2 days3-12/+33
| | | | | | | | | | If no component is given to update command, look for updates from all categories so no update is missed. If component is given, utilize the meta fetch from default repositories first. Checkupdates command searches update from all categories. Change-Id: I6dbd9f130c9b008cb066ad7767d2b9a287ecac9f Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Fetch all metadata when using package viewerKatja Marttila5 days1-0/+2
| | | | | | | | | As the search pattern can be regexp, the search can match to basically anything. Enabling all categories when doing such searches Task-number: QTIFW-3356 Change-Id: I46bd25e2a1493b4ebba245910c2a5f7505a67af5 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Fix signal about loaded languageKatja Marttila8 days2-2/+2
| | | | | | | | | | QLocale::Languege does not distinguish between Brazilian Portuguese and European Portuguese. Sending the QLocale object in defaultTranslationsLoadedForLanguage signal to make a difference between these languages. Change-Id: I95994e00b67e2bd18a611d4c9a14d4a6cf57b204 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Fix occasional crash in install phaseKatja Marttila2024-04-097-34/+32
| | | | | | | | | | | Progress information is printed using same static instance of the coordinator by different operations. The operation object pointer was saved as key to QHash so that progress could be tracked. This has caused problems in installer as QHash insert occasionally caused segmentation fault. Fixed so that the progress information is no longer tracked based on operation object pointer, instead object name is used. Task-number: QTIFW-3314 Change-Id: Ic4007f226321e109109006c5c89415308920c614 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Allow overwriting undo in some operationsKatja Marttila2024-04-055-5/+5
| | | | | | | | | | | | | | Added possibility to overwrite undo in copy, move, delete, mkdir, rmdir, appendfile and prependfile operations. Undo is performed when component is uninstalled or updated, by adding UNDOOPERATION to the end of argument list will skip the undo operation. Also added unit tests for rmdir and prependfile operations Task-number: QTIFW-3333 Task-number: QTIFW-393 Change-Id: I88dbb16d2ebabe42b4ff810e6196da0be8b4cc65 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Save used CLI arguments for later usageKatja Marttila2024-04-052-0/+20
| | | | | | | | | | | | Qt Installer will send information to backend if unstable components are found (e.g. dependency is missing), to better track for problems the CLI arguments are needed as well. Options which are not defined in installer are not saved, also option arguments which may contain confident information are not saved either. Task-number: QTIFW-3070 Change-Id: Iff5bfad725d1f56b7fb6c501138427ef4c58b5c3 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add possibility to add extra log when meta fetch failsKatja Marttila2024-04-045-1/+16
| | | | | | | | | Also if the log contains links or html, added link interaction possibility and correct html syntax to messagebox and error messages. Task-number: QTIFW-3012 Change-Id: Ibf20f50c0f06fdbb8325f93dbdf78ba36d4fe4e5 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Fix proxy authentication loginKatja Marttila2024-04-021-6/+15
| | | | | | | | | Proxy authentication did not work with CLI installs as it tried to open a dialog. Fixed it so that the username and password is asked from CLi when proxy requires authentication instead of trying to open a dialog. Change-Id: Iea92fa2934d103e4982f4792041512ea3f7b1033 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Fix http authorization loginKatja Marttila2024-04-023-6/+77
| | | | | | | | | | | | | | | | Setting http authorization login credentials had no effect, the metadatajob did not refetch the repositories after login credentials were given. Also when using CLI install, installer crashed when login credentials were needed as it tried to open a dialog. Fixing the crash so that when using CLI install, user is asked for the credentials from terminal, and reseting metadatajob so that credentials are taken into account. Task-number: QTIFW-3301 Change-Id: I72d254c5c44413e2d893f7c686001c2d0de0e8e9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Fix QDesktopServices propertiesKatja Marttila2024-04-021-1/+6
| | | | | | | | | | QStandardPaths has changed in Qt 6.6, changing the script properties for script usage accordingly. Task-number: QTIFW-3334 Change-Id: Ib0bf1f0370d8f8691436df0df28a445e39bdb39f Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Remove unused Url loggingKatja Marttila2024-04-021-7/+0
| | | | | | | | Url logging does not nowadays provide any useful information as the meta is read from cache, and the cache path is already printed to log once. Change-Id: I9845ad9ecf2dac53b3775a07b1702f938632b64a Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Fix maintenance tool register path parametersKatja Marttila2024-03-281-3/+7
| | | | | | | | | | | In Windows, maintenance tool is written to registry. 'Add or remove' program in Windows settings uses the registry, and maintenancetool can be started using the settings. Fixing the maintenancetool parameters so that selecting 'Modify' will open the maintenancetool in packagemanager mode, and 'Uninstall' will open the maintenancetool in uninstaller mode. Change-Id: Ib1e8c80132f6e2eb2f8cfa22910b4ad1ca696f06 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Fix productType function return value in macosKatja Marttila2024-03-281-1/+1
| | | | | | | | In Qt6, productType is macos, whereas in Qt5 it was osx. Task-number: QTIFW-3309 Change-Id: I403c8a2734eac7a511f742bdd1be130090f7af07 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Speed up cache validationKatja Marttila2024-03-222-13/+5
| | | | | | | | | | | | | Cache validation takes some time especially in Windows, mostly the time is spent in opening the files for the integrity check. Instead of writing the sha checksum to file to verify the integrity, name the file itself with the sha checksum. Then it is enough to check if the correct file exists and we don't need to open the file. Task-number: QTIFW-3328 Change-Id: I36835d783ccf2f6aad8c83e14ec19cbdfc6db71e Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Remove unused performUndo value in delete operationKatja Marttila2024-03-222-4/+0
| | | | | Change-Id: I50ff0eb9dd1f3c2bbcc20abbed5244e46229468a Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Disable 'clear cache' button until new cache settings are appliedArttu Tarkiainen2024-03-144-0/+16
| | | | | | | | | | | | | | Check the cache validity and use it as the initial state for the button. After clearing the cache, regardless of success, the cache will become invalid so the button should stay disabled until new settings are applied and the cache is reinitialized. Also disable the button in case the selected cache path does not match the one currently applied in the settings. Task-number: QTIFW-3252 Change-Id: I1b403fbc8a6680dfd5222296479ab0821cdb4a37 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add detailed warning when hash verification failsKatja Marttila2024-03-141-2/+4
| | | | | | | Added expected and calculated hash values to warning Change-Id: I2646b139c756ba7903fe2a05bab39b7c9cbbe62a Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add security warning possibility when using additional repositoriesKatja Marttila2024-03-133-0/+8
| | | | | | | | | | When installing from CLI and the installable component is not in default categories, developer has possibility to override ProductkeyCheck and return custom security message warning. Task-number: QTIFW-3305 Change-Id: Ie321af6796bf19c910216be2c6ee521aa63788d8 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add possibility to add additional license text to CLIKatja Marttila2024-03-114-0/+31
| | | | | | | | | | | | Developer can override productkeycheck, there can be cases that developer wants to show some additional license text in CLI before accepting the licenses. The license text can be accepted or rejected by CLI command Accept/Reject, or by using --accept-licenses switch for non-interactive acceptance. Task-number: QTIFW-3319 Change-Id: I60e1ea36cf3f7f98af62c06c2535342003ceb9a6 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Include minimal qt.conf fileKatja Marttila2024-03-112-0/+1
| | | | | | | | | | Qt uses qt.conf file to load various Qt paths. To prevent that installer would accidently use the qt.conf file which does not belong to it, generate dummy qt.conf file so that the installer won't break. Task-number: QTIFW-3292 Change-Id: I22cf745f991e33607de12e43f2c8c6665b1714e3 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add possibility for additional license checkKatja Marttila2024-03-053-1/+7
| | | | | | | | Productkeycheck, or repository, can implement additional license checkings. Added possibility to enable the next button in license agreement page when productkeycheck has also validated that the license check is ok. By default productkeycheck returns true for additional license checks, the developer can override the productkeycheck to add additional checks. Task-number: QTIFW-3319 Change-Id: Ie7e3d84eb800edb6c5c9731afa6bfe464e4ae4d1 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* CLI: Perform commands primarily from default repositoriesKatja Marttila2024-03-054-54/+192
| | | | | | | | | | | | | | | | | | Especially in installers which contains huge amount of repositories, it takes a long time to perform commands from CLI. If the repositories are filtered using categories, it saves a lot of time if the components to install/update etc. are tried to install/update from the defaultly selected repository categories. Assuming that the component is found from the defaultly selected repositories. If the component is not found from defaultly selected repository categories, then all categories are searched for the component. Implemented also a filter logic, where the components to install are searched earlier, if the component is not found then we can exit early. Task-number: QTIFW-3251 Change-Id: I1274b5f56dbff293554cb21839a8cea63a7d2dcc Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Move non-ui related functionality to coreKatja Marttila2024-02-2310-144/+209
| | | | | | | | We need to access the core functionality despite of what user interface is used. Change-Id: I6c4c7e8526ff24a479128061aa40fba66e61660c Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add possibility to change button textKatja Marttila2024-02-224-4/+28
| | | | | | | | | | Sometimes the button texts in installer are not something that is suitable. Added possibility to change button texts from script to a specific installer page. Task-number: QTIFW-711 Change-Id: I2883cda6d770843c3617fda4e6b07d102a357730 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Fix EnvironmentVariable undoKatja Marttila2024-02-141-4/+5
| | | | | | | | | | | | | | | If EnvironmentVariable value contains both @TargetDir@ and hardcoded windows path separators, installer is unable to undo the EnvironmentVariable in uninstall. Fixed so that the path separators are ignored when comparing the values in undo. Another fix would be to use Linux native separators when setting the value, or resolve @TargetDir@, and calling installer.toNativeSeparators() before calling addOperation() Task-number: QTIFW-1148 Change-Id: I2eb8f9a0580e0c3f7e6dbdbef5ecbf6cd8940481 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Merge remote-tracking branch 'origin/4.7' into masterKatja Marttila2024-02-051-3/+3
|\ | | | | | | Change-Id: I308a30ca62f06520431a145dd31c28e6ba663729
| * Update translationsKatja Marttila2024-01-311-3/+3
| | | | | | | | | | | | Task-number: QTIFW-3253 Change-Id: Iecd60d7f4c13976b49df80d65d3cbb3744a0daf7 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Merge remote-tracking branch 'origin/4.7' into masterKatja Marttila2024-01-228-31/+88
|\| | | | | | | Change-Id: Id9fe7a127a72b58732f5dffd11c4c9c7c1c56060
| * Fix CLI fail on huge amount of Updates.xml downloadKatja Marttila2024-01-182-27/+54
| | | | | | | | | | | | | | | | | | | | | | Especially in machines which are not very effective, installer gets stuck when trying to fetch large amount of Updates.xml files. Implementing same kind of feature what we have in metadata download, that the files are fetched in smaller chunks. Task-number: QTIFW-3249 Change-Id: Ic29e2b544dea9cc0d71a21491a6e4bc22735b7eb Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
| * Fix offline generator state not resetting when navigating backArttu Tarkiainen2024-01-083-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In case the user chose to generate offline installer by clicking the "Create Offline Installer" button on ComponentSelectionPage, navigating back to the page did not reset the internal binary marker. This made it impossible to perform a normal installation afterwards. Fix by resetting the state on ComponentSelectionPage::entering(). Task-number: QTIFW-3236 Change-Id: I0951ec90e70dff9e8e233dee0cc5592c5c509c28 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Allow disabling usage of configured repositories for offline installersArttu Tarkiainen2023-12-294-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, offline installers did not consider configured repositories for metadata fetch, but this was changed in a fix for bug report QTIFW-3078. Some users were relying on the previous behavior, so make it configurable in the installer's config file, and default to the new behavior. Task-number: QTIFW-3160 Change-Id: I26c0ab825f080f81ce2320e0be5f75334207c33e Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Fix automatic page switching on offline generationArttu Tarkiainen2023-12-271-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a missing connection of signal PackageManagerCore::offlineGenerationFinished to slot PackageManagerGui::showFinishedPage. This caused the installer to prevent navigating forward after successfully creating an offline installer, in case the details view was hidden. If the details view was shown, the Cancel button was also incorrectly still enabled. Adding the missing signal connection fixes both issues. Task-number: QTIFW-3237 Change-Id: Idf7f24aae354fdfb09106e595f8b8fc312bfd817 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Doc: Fix documentation build configurationTopi Reinio2023-12-085-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The custom qmake documentation build target did not correctly locate private include paths for Qt modules. Fix this by replacing dashes with underscores (e.g. qtcore-private -> qtcore_private) before querying the paths. Remove duplicate entry for qtcore-private (it's already added at top level). In ifw.qdocconf, fix relative additional include paths. Remove all non-existent paths from the configuration. Use the correct URL for the online documentation. Remove the now-obsolete custom module header, and let QDoc build an artificial one based on 'headerdirs'. In passing, fix minor issues in the documentation sources. Change-Id: I5cdbd64307448014fa8b73a70378627fdb89b942 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Prevent uninstalling forced componentKatja Marttila2023-12-082-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | If forced installation is used, then the item is uncheckable. This was not correctly saved to component's internal variable. Also although item is not user checkable, the check state needs to be counted in the model. Uncheckable items might have for example child items and then the uncheckable item is also installed (or uninstalled, depending on selection). Task-number: QTIFW-2589 Change-Id: I9ea967e34cf3f2048312fb5eacd6d0b397d7215c Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Replace predefined variables in StartMenuDirKatja Marttila2023-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | If StartMenuDir was defined for example like @Publisher@, the value was seen as is in the StartMenuDir and it was not resolved. Task-number: QTIFW-3028 Change-Id: Ifc8b7a2f2f09cfbf1b6edb607b2cb5b5f8c68684 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Chop subtitle into two linesKatja Marttila2023-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | The subtitle in component selection page is long and is chopped into two lines by QWizard. Chop the title from more suitable place for it to show up nicely. Task-number: QTIFW-3102 Change-Id: I6d45864a6b162922d0f461620fab75eea7baa98c Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | DOC: Remove unused signalKatja Marttila2023-12-072-21/+0
| | | | | | | | | | | | | | | | | | rootComponentsAdded -signal is not used anywhere, in case the components are added connect to componentAdded -signal instead Task-number: QTIFW-807 Change-Id: I148e74bd9f1650ae09f0020269fb7ed2349b5d3b Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Allow setting repositories for offline installerKatja Marttila2023-12-071-1/+1
|/ | | | | | | | | | | If user selects Settings->Repositories and adds a repository to a maintenancetool which does not have any repositories (is offline installation), the repository was not saved for future use. Fixed so that repositories can be always added to maintenance tool. Task-number: QTIFW-3179 Change-Id: I6d0e4d85fb72180944a6cfbdde840e681a1a1453 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add buildCpuArchitecture() to systemInfoKatja Marttila2023-11-222-4/+29
| | | | | | | | To access buildCpuArchitecture from script Task-number: QTIFW-3224 Change-Id: I02086f7d3e064fe53d6fa9322b8832110c40c6b1 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* ComponentAlias: fix missing data when multiple keys have same valueArttu Tarkiainen2023-11-011-3/+4
| | | | | | | | | | | | | When populating ComponentAlias data from an alias source file, there was an oversight with the logic of getting the key by a value when iterating the AliasData map. For example with the text values, like DisplayName and Description, there may be same values and the logic breaks. Instead use an iterator with the map. Change-Id: I59c2f45849533d1e664c3e9e2ccd9bba142a7b57 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* ComponentAlias: add "releasedate" as known configuration elementArttu Tarkiainen2023-10-261-1/+2
| | | | | | | | This is expected to be included in the .json definition files for Qt Online Installer. Change-Id: I3914b513dbdf6134ccd7ca4cd218adb7ec43a728 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* ComponentSelectionPage: use vertial layout for right side buttonsArttu Tarkiainen2023-10-241-8/+4
| | | | | | | | | | To allow the texts of the "Browse QBSP files" and "Create Offline Installer" buttons to fit better with all translations, use a vertical layout instead of a horizontal one. Task-number: QTIFW-3138 Change-Id: Ic8e77590ced75e06f125c489abfbcf38fb9f8f11 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Enable component script postload setting per repositoryKatja Marttila2023-10-164-6/+33
| | | | | | | | | | | | | | This is a custom requirement for Qt Online Installer. Qt Online Installer has a huge amount of scripts to be evaluated. Most of the scripts don't need an evaluation unless those are installed. Skipping the evaluation of scripts has quite significant performance impact. As the postLoad setting in component level is a big task, enabling support for Qt Online Installer to set the postLoad value to scripts per repository. Task-number: QTIFW-3173 Change-Id: If37d7ff39ad07ee56e9a9559c837966c23d76d6e Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add support for JSON formatted component alias source filesArttu Tarkiainen2023-10-062-10/+81
| | | | | | | | | | | The JSON formatted source file follows the same properties as the officially supported XML declaration file. The undocumented (private) file format support is added for installers extended via the ProductKeyCheck API, that can use the JSON format. Task-number: QTIFW-3175 Change-Id: If1463a1e3796b818feb8682d66e443e09fefcf15 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* CLI: adjust 'search' command behavior with --type optionArttu Tarkiainen2023-10-053-38/+62
| | | | | | | | | | | | | | In case the "--type=aliases|packages" option is omitted, search first for aliases, and if not found, search for components. If the option is specified, search only given type. This changes the behavior from previous one, where only aliases were considered for the search by default, if the type option was omitted. Change-Id: Ie01ea85e1b88376f8df3edbf864d1e78788c3464 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Hide the 'create offline installer' -button by defaultKatja Marttila2023-10-031-1/+1
| | | | | | Task-number: QTIFW-3172 Change-Id: I5f7879f6b7c216782925f7851278ba35e6babebf Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Evaluate component aliases only for command line installer runsArttu Tarkiainen2023-10-021-0/+4
| | | | | | | | | | Return early from building the component aliases for non-CLI runs, to save some time from the metadata evaluation phase. The aliases are currently only usable from installer's CLI. Change-Id: Id8acde1b8353f498e3dfd0bd69156b17de245105 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Replace Wizard with Setup in the exit messageAndreas Pakulat2023-10-021-1/+1
| | | | | | | | | | | | This was supposed to be part of the 798f844242f855a46a082abacf6c4c4175f10eca change, but got missed. The reference to the installer itself has been changed from 'Wizard' or 'Setup Wizard' to just 'Setup' everywhere to ensure consistent wording being used through the UI. Task-Name: SQUISH-9672 Change-Id: I866cc9616a2bcca731068721c243d3579451773e Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix qHash return valueKatja Marttila2023-09-2910-19/+26
| | | | | | | | qHash return value in Qt6 is size_t. Making relevant changes so that no warnings occur when building with Qt5 or Qt6. Change-Id: Ia4d8de49b163a59b58ec7c1eea83979b174b1bd1 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>