summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Display progress for loading component install scriptsHEADmasterArttu Tarkiainen2022-06-163-7/+36
| | | | | | | | | | Also process pending events for the main thread in the loop that calls Component::loadComponentScript() repeatedly, to not block the UI while busy loading the scripts. Task-number: QTIFW-2701 Change-Id: I4a1dd8e2441e21b5075b6fdffff8a47cd4bc7c80 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix local binary checkJoni Poikelin2022-06-151-1/+1
| | | | | | Fixes: QTIFW-2700 Change-Id: I8cbd20e31dad2127335bf363c951969199f6cab6 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Allow searching components also in the updater viewArttu Tarkiainen2022-06-151-1/+0
| | | | | | Task-number: QTIFW-2667 Change-Id: I9b3e27b04b62d6cbf90607ea064aef52aaef30b9 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* MT: Quote paths for UninstallString and ModifyPath registry valuesArttu Tarkiainen2022-06-151-2/+6
| | | | | | | | | | | | | This has reportedly caused problems on some Windows 10 versions, where trying to uninstall the program via Control Panel didn't work when the target directory contained spaces. Could not reproduce the issue with version 21H2, but the added quotes should not hurt either. Task-number: QTIFW-2479 Change-Id: I4d9712df859acf2690d8e47f19b9f2a8d0a2496f Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add note about selecting another location for temporary downloadsArttu Tarkiainen2022-06-151-2/+8
| | | | | | | | | | | | On systems where the available space on system's temporary directory is limited, the downloaded payload archives for components may not fit to the free space. In such scenarios, there might be a volume with more space available, so print directions on how to select the temporary directory using a system specific environment variable. Task-number: QTIFW-2662 Change-Id: I0e59c47e5aab07146cda8cacc333333f9fe40667 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add component list of components to be installed to installationlogKatja Marttila2022-06-131-0/+1
| | | | | | | | | | We print the component list to gui in 'ready to install' page and to console when using install/remove commands. Add the same print to installationlog.txt so that it easier to spot possible installation errors. Task-number: QTIFW-2666 Change-Id: Icea96695e3d3a4516d65c7b487ed5fced2701632 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Print developer warning message when loading translation file failsArttu Tarkiainen2022-06-131-1/+8
| | | | | | | | | | | | | | This is non-visible when running with lower than maximum verbosity or custom logging rules. But when enabled it provides at least some information for the packager about the point of failure - was it with loading of the Qt or the IFW translation for a certain language. Unfortunately didn't find a way to get details about the reason of the failure. Task-number: QTIFW-2658 Change-Id: I7ac3991810ab9dbb14cb941a1d95783141486928 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix installer crash if already installed virtual components are replacedKatja Marttila2022-06-061-1/+4
| | | | | | | | | | | | If installed component is replaced by another component, core 'categorizes' it under ComponentType::Replacement. By asking PackageManagerCore::componentByName(QString &name) excludes the replaced components. Fixed so that all 'categories' are used when searching the component by its name. Task-number: QTIFW-2672 Change-Id: I8b5528f7ddca777fe9b696c1d0151640730d1b9f Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* macOS: make creating maintenance tool alias optionalArttu Tarkiainen2022-06-032-8/+15
| | | | | | | | | | | | | | | | Currently the installer will create an alias file for maintenance tool with the name defaulting to the file name of maintenance tool, if the name is not explicitly declared in the installer's configuration file. This can cause issues with installers that use the same maintenance tool filename, as the alias would be overwritten on each install, and the default name does not tell which installation the alias is associated with. Make it so that the alias is only created if installer config specifies a name for the alias. Task-number: QTIFW-2665 Change-Id: I790ee376ec56cff16730189e513a194b8c610066 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Translations: fix duplicate source stringArttu Tarkiainen2022-06-0317-65/+1
| | | | | Change-Id: I73e07ac8d4099df0c0a3bade4bc40cb1467fbbe2 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Translations: replace apostrophe quotes with character entity referencesArttu Tarkiainen2022-06-035-20/+20
| | | | | | | | As lupdate wants to do this anyway on updating the source strings, better to make a separate commit to not clutter when doing real changes. Change-Id: I8ea644f4aef8f95adaac8dd6257e86441a266264 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Translations: exclude leading and trailing newlines from source stringsArttu Tarkiainen2022-06-0318-805/+420
| | | | | | | | | | | A follow-up for the translation update round for 4.4.0 release, fix the noted issue of some strings having strange formatting in the .ts files. This makes it less likely that the translated strings miss the newlines in cases where it matters to the text presentation. Change-Id: I0fc9c2c8014a6ffa30dc510701b7bfad72e8eb82 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Update Catalan translation fileArttu Tarkiainen2022-05-311-29/+224
| | | | | | Task-number: QTIFW-2622 Change-Id: I5dffd7567451f349a49ccc0695e66c8145d4bb55 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Update Danish translation fileArttu Tarkiainen2022-05-311-37/+232
| | | | | | Task-number: QTIFW-2622 Change-Id: I8b27055b43e8866bf739907ad3a5b2198cac0117 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix value query with settings formatKatja Marttila2022-05-302-3/+3
| | | | | | | | Script engine does not know how to evaluate QSettings Formats, use int instead and cast it to QSettings Format when used in c++ code. Change-Id: I5c66708aa09ceb5f9a747849a7a2ca72efdd7080 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* RemoteObject: require server reply for all client commandsArttu Tarkiainen2022-05-305-135/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For classes supporting the remote-client-server protocol through inheritance of the QInstaller::RemoteObject class: when calling functions of return type void, the client process did not block and wait for the server process to finish execution of the corresponding function, only checking that the packet containing the function command and arguments was written to the socket. The server-side connection thread operates in a loop that tries to read a packet from the socket in each iteration, and process the contained command, with the condition that the socket is still in connected state. If the function calls requested by the commands take long time to execute and we destruct the client-side object, disconnecting the socket, the server thread could break out of the loop before handling all pending packets. This hasn't been a problem for non-void functions because the server will send a return value reply and the client would block until the sent packet was available. Fix by refactoring the server connection code to send a default reply for commands not requiring a real return value, and blocking the client until the reply can be read. Task-number: QTIFW-999 Change-Id: Ie1d0e118e6830a1049a2ad50cc80b54c967fcde6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Update Hungarian translation fileArttu Tarkiainen2022-05-301-23/+154
| | | | | | Task-number: QTIFW-2622 Change-Id: I128910335ca926229389f245265870947c25870f Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Update Italian translation fileArttu Tarkiainen2022-05-301-37/+232
| | | | | | Task-number: QTIFW-2622 Change-Id: I4a52f8655e363de05a3e04d5b4eda6d05342c290 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Update Japanese translation fileArttu Tarkiainen2022-05-301-22/+137
| | | | | | Task-number: QTIFW-2622 Change-Id: If895876d4b8fbb3793ffe9260954a3c39d9e5a2a Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Update Croatian translation fileArttu Tarkiainen2022-05-301-29/+228
| | | | | | Task-number: QTIFW-2622 Change-Id: I0d20e5ad3dcbc22e18176469250796e3e6137d81 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Update French translation fileArttu Tarkiainen2022-05-271-23/+138
| | | | | | Task-number: QTIFW-2622 Change-Id: I10246ab16a02cb54502b72bd6e240506bf8fd594 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Update Russian translation fileArttu Tarkiainen2022-05-271-22/+137
| | | | | | Task-number: QTIFW-2622 Change-Id: I6ca680884313c2ea5e835272f9010bcae80c19d3 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Update Arabic translation fileArttu Tarkiainen2022-05-271-23/+138
| | | | | | Task-number: QTIFW-2622 Change-Id: I50e7ce3bae04494c0ff73bc214db2e0d39f0c7c1 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Update Portuguese translation fileArttu Tarkiainen2022-05-271-24/+139
| | | | | | Task-number: QTIFW-2622 Change-Id: If4025d249320a8fbf903c04b0f9a6ea88c6b2797 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Update Brazilian Portuguese translation fileArttu Tarkiainen2022-05-271-53/+183
| | | | | | Task-number: QTIFW-2622 Change-Id: I18f535351fbe12c569bb989ba9eac9958671c246 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Update Chinese translation fileLiang Qi2022-05-271-19/+130
| | | | | | Task-number: QTIFW-2622 Change-Id: If4c576bcd46a529e5a1bbf616483fecda58c5d20 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Windows: Allow asking installer value with different formatsKatja Marttila2022-05-276-9/+34
| | | | | | | | | | | | | | | | This change expands installer.value() -function allowing QSettings::Format setting when asking registry key. Windows 32bit registry keys on 64bit Windows and 64bit application can be accessed using QSettings::Registry32Format. Window 64bit registry keys on 64bit windows and 32bit application can be accessed using QSettings::Registy64Format. If no format is set, QSettings::NativeFormat is used. Task-number: QTIFW-2657 Change-Id: Ie30e31886526db5b9d72793d5883c11bd1910737 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Replace QSettingsWrapper::Format with QSettings::FormatKatja Marttila2022-05-2710-50/+43
| | | | | | | | | | This changes allows in follow-up commits to access windows registy with other than just NativeFormat. This is needed for 32-bit applications to access 64-bit registry and 64-bit application s to access 32-bit registry. Change-Id: I0b88f4eaa499e53e10162ae5343b95d06ddbfc27 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Workaround QSettings / QDateTime incompatibility with Qt 6 applicationsArttu Tarkiainen2022-05-172-10/+30
| | | | | | | | | | | | | | | | | 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-1610-17/+55
| | | | | | | | | | | | | | | | 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-136-8/+24
| | | | | | | | | | | 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>
* 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>
* 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-0910-61/+297
| | | | | | | | | 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>
* 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>
* 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-057-4/+159
| | | | | | | | | | | | 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>
* Speed up component selection in component selection pagesKatja Marttila2022-04-2813-234/+491
| | | | | | | | | | | | | | | | | 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>