summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/settings.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Allow disabling usage of configured repositories for offline installersArttu Tarkiainen2023-12-291-2/+7
| | | | | | | | | | | | | | 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>
* Add support for component aliasesArttu Tarkiainen2023-09-141-1/+6
| | | | | | | | | | | | | | | | | | Introduce concept of component aliases, which act as an alternative way for referring a set of related components. Component aliases are declared in an alias definition file, which is included to the created installer's binary layout as a resource. The file lists the available aliases, including metadata - such as name, version, and description - and the list of components and other aliases the alias requires. Aliases can be referred only from the CLI for the time being, with the supported commands 'install' and 'search'. Task-number: QTIFW-2978 Change-Id: I281f171cc7d932ce496051d7090ae169a4709eec Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix deprecated QApplication::fontMetrics() function callKatja Marttila2023-06-151-3/+3
| | | | | | Task-number: QTIFW-3077 Change-Id: I9229166c0717e42a99f4a48da94728ebba3d06f7 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Change layout of Information/CategoriesKatja Marttila2023-03-081-1/+1
| | | | | | | | | | | Layout of Information/Categories in component selection page is wanted to be horizontal instead of vertical. This requires the QToolBox to be replaced with QTabWidget. Also shortening the naming of the titles so that they better fits the view. Task-number: QTIFW-2991 Change-Id: I367aeb116acfa39d0b3caa22d39766ac00dc58e4 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Adapt to changes in QHash and QSetChristian Stenger2023-01-171-3/+3
| | | | | | Task-number: QTIFW-1829 Change-Id: I5f062ae4c6389aba57b1de6f0e1884b4cd301334 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add persistent metadata file cacheArttu Tarkiainen2022-10-141-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | Introduce GenericDataCache and Metadata classes for storing the fetched metadata files (Updates.xml and uncompressed files from the meta.7z archives) on local filesystem. The cache uses a checksum based dictionary to keep track of the cached metadata items, with the SHA1 sums of downloaded Updates.xml files being the keys to refer single metadata item. We still need to download all the Updates.xml files on each fetch to check if the cached metadata items are applicable for the current repositories. Update the Updates.xml files in auto-test data to have unique contents, otherwise there could be conflicts with identical test repositories, as the tests will also utilize the cache now. Also omit registering Repository type to the meta-object system in the class contructors, this is expensive as we construct objects from the class frequently, in the worst case hundreds of thousands times. PackageManagerCore already does the registering. Task-number: QTIFW-2621 Change-Id: Iee10ead68befd722ffe7f18ca48483d5a3666658 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* macOS: make creating maintenance tool alias optionalArttu Tarkiainen2022-06-031-2/+0
| | | | | | | | | | | | | | | | 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>
* macOS: Create alias of maintenance tool to Applications directoryArttu Tarkiainen2022-05-051-1/+11
| | | | | | | | | | | | 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>
* Add click option for product imageKatja Marttila2022-03-211-14/+27
| | | | | | | | | | 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>
* Replace obsoleted functionsKatja Marttila2022-01-051-30/+30
| | | | | | | | qSort is obsoleted and std::sort should be used instead. Also QHash insertMulti is obsoleted and QMultiHash should be used instead. Change-Id: Ie4a44355d25d44943a4eeefc2842b4af3e126101 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Fix deprecation warnings from building with Qt 5.15.2Arttu Tarkiainen2021-12-211-6/+10
| | | | | | | | Also update build version requirements. Task-number: QTIFW-2388 Change-Id: Iae1949548dda7a3b8d448228e27060efb5abd8eb Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix loading translations with upper lettersKatja Marttila2021-06-081-1/+1
| | | | | | | | | Translations are read from resource. The file name must match case sensitively so that resource loading will succeed. Task-number: QTIFW-2265 Change-Id: Iabc899b99bbbed346ff8e7395af82545e9079eb2 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add support for setting minimum wizard dimensions in config.xmlArttu Tarkiainen2021-02-041-1/+12
| | | | | | | Task-number: QTIFW-1903 Change-Id: I4d8eaf71a1a63dfbfa75ea61af728fa1f5e3e9f3 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add support for generating offline installer from onlineArttu Tarkiainen2021-01-151-2/+0
| | | | | | Task-number: QTIFW-1945 Change-Id: Ic8a076a28385e99ad09cfbccd07c7012d6570639 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add highdpi support for watermark, banner, background and pagelistpixmapsKatja Marttila2021-01-141-5/+0
| | | | | | Task-number: QTIFW-2084 Change-Id: I4047457aae9709819f1a19ec9c74c5a88e9b7e7c Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add high dpi image support for Logo and ProductImagesKatja Marttila2020-12-211-4/+7
| | | | | | | Task-number: QTIFW-2061 Task-number: QTIFW-2060 Change-Id: Idaabb6a08f5e52aa7808de4b3ad541ae47dc4dd8 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Shorten display name of 'Select package categories'Katja Marttila2020-12-011-1/+1
| | | | | | Task-number: QTIFW-2056 Change-Id: I119d2e7f8f943c3df19f4c0df58123f7bb0d0b6c Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Doc: Remove internal classes and structs from generated documentationArttu Tarkiainen2020-09-211-0/+6
| | | | | | | | | | After migration to using 5.12.7 based qdoc, the generated documentation contains also empty declarations for members of undocumented internal classes. Mark them internal as needed. Task-number: QTIFW-1483 Change-Id: Iad40e4efdd098f09a825ce1c8d0aafcc76bd83bf Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Doc: Reduce the amount of documentation warningsArttu Tarkiainen2020-09-211-0/+7
| | | | | | | | | | | | Miscellaneous fixes to missing function documentation, undocumented parameters, namespace scope etc. As 5.12.7 based qdoc gives a lot more warnings about code missing documentation, mark undocumented implementation details with \internal command. Also some spelling fixes to related parts of documentation. Task-number: QTIFW-1483 Change-Id: Ibf5d1e5098713acbd152c5b61ea4f46cc11feb4b Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Page list widget enhancementsArttu Tarkiainen2020-09-111-1/+7
| | | | | | | | | | | | - Add support for a configurable image shown on top of the page list. - Add missing object names for easier object reference, for example when using stylesheets. - Remove the vertical line separating side widget as this looks particularly ugly on custom styles. Task-number: QTIFW-1939 Change-Id: I16e17e72163068381f54491f7fbe965eb4c5295d Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Revert "Modify repository category functionality"Arttu Tarkiainen2020-08-251-10/+0
| | | | | | | | | This reverts commit 99cbbd439ea1f572b4242d77035b0da3a27c79ec. Reason for revert: The speed benefit gained by converting existing online repositories to use unified metadata does not offset the penalty of fetching all categorized repositories. This is especially bad on Windows where install script evaluation takes long time. Change-Id: I03f4ab41f21e139b40c82baf741b2459966d6d43 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add support for vendor set image decorationArttu Tarkiainen2020-08-251-1/+22
| | | | | | | | | | | | Add possibility to show an arbitrary number of product related, or other images on PerformInstallationPage. These can be specified in the installer configuration file, using <ProductImages> element with one <Image> child element for each file name. Task-number: QTIFW-1900 Change-Id: I2be727d9189963ef1a79046150111dd8c91153c6 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Call value() to get a QStringList and not values()Andy Shaw2020-08-201-2/+2
| | | | | | | | | values() returns a QVariantList which has a single QVariant in it which represents the QStringList. So to get the actual QStringList we should call value() on the data so it can be convertable. Change-Id: Ie60889d25b1e03415624fcb2c57117fa7c326efa Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Modify repository category functionalityArttu Tarkiainen2020-07-031-0/+10
| | | | | | | | | | | | Remove conditions for checking whether a category containing a certain repository needs to be enabled when fetching & parsing metadata for that repository. All categorized repositories will now be fetched regardless of their enabled state, that will be only used to hide/show individual components in the view. Task-number: QTIFW-1821 Change-Id: Id0dbaed9c5b460bf0faeebd6e45349f0c07d10c2 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add a page list widget to installer wizardArttu Tarkiainen2020-06-111-3/+11
| | | | | | | | | | | | | | | | | | | | If an installer is configured with <WizardShowPageList> set to true (default), a QListWidget set as a side widget for the wizard will be shown. The list should indicate completed and incomplete pages and the current wizard page. User navigation is not enabled in this change. The page list should honor the visibility of individual pages and update itself dynamically. In addition the visibility of a page in page list widget can be set internally with setShowOnPageList() which overrides other factors when hiding a page. The page item title shown on the list can be set internally with setPageListTitle() for the PackageManagerPage object, or the item can alternatively use the normal page title and the object name. Task-number: QTIFW-1755 Change-Id: I8a792d957a10e2176de5f42f29b1282e8e7667db Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add support for disabling CLI features from configuration fileArttu Tarkiainen2020-05-151-0/+6
| | | | | | Task-number: QTIFW-1760 Change-Id: Ibd0668756700eeab68bce12ddce1866893cc08f9 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* CLI: decrease the amount of default debug printsKatja Marttila2020-02-201-2/+2
| | | | | | | | | | 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-131-2/+4
| | | | | | | | 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>
* 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>
* Update repository categories on server authentication requestArttu Tarkiainen2019-08-151-0/+34
| | | | | | | | | | | | | | | | If repositories in a category were located on a server that requires user authentication, IFW couldn't update information of the repositories inside a category during runtime. This prevents for example storing credentials from the authentication request dialog and blocks the usage of that category. Add a method for updating contents in repository categories and a unit test for the new method. Also some minor tweaks to relevant bits of code. Task-number: QTIFW-1358 Change-Id: Idfa2559df6d0d2a6de428b8d5fb1f7672aa1e300 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Doc: Improve strings in the Select Components pageKavindra Palaraja2019-05-131-1/+1
| | | | | | | | Task-number: QTIFW-1334 Change-Id: I4ed13fd066c98e1716f3358cffef85e160a3324a Reviewed-by: Vladimir Minenko <vladimir.minenko@pelagicore.com> Reviewed-by: Tino Pyssysalo <tino.pyssysalo@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Rename variablesKatja Marttila2019-04-011-1/+1
| | | | | | | | We have named 'archive' to 'category' ages ago, rename the remaining variables accordingly. Change-Id: I3f723d3e7014c264e2a4db21c434708691a1038e Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* Add tooltip for categoriesKatja Marttila2019-02-041-2/+8
| | | | | Change-Id: I852a236bc2cff0d532a825581e3da4dcdcbbab90 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Minor changes to category namingKatja Marttila2019-02-041-1/+1
| | | | | Change-Id: I7459535dd49047f9bf2d56a6598e9e631723444f Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Fix build error in macOSKatja Marttila2019-01-181-1/+1
| | | | | Change-Id: Ib1e3cb1cead8a856d74ef23808072a085e4d268d Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Add possibility to preselect categories in config.xmlKatja Marttila2019-01-171-3/+7
| | | | | Change-Id: I280247cb5155622ade604074c5a71a276b0fb629 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Organize categories alphabetically to ComponentSelectionPageKatja Marttila2019-01-161-0/+10
| | | | | | Task-number: QTIFW-1264 Change-Id: I14a54082c30107d9242632a69d73a637803c6f2d Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Replace 0 with nullptrKatja Marttila2019-01-091-1/+1
| | | | | | | Prevents a lot of warnings seen in QtCreator Change-Id: I63bf95aca68a04fc9fd0eecbe29c63e9b9c47efd Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Enable usage of categorized repositoriesKatja Marttila2018-09-261-4/+56
| | | | | | | | | | | | | | | | | | | | This change allows to categorize repositories in component selection page. Using categorized repositories will by default show only uncagetorized repository items in tree. Selecting one or several categories using checkbox will update the treeview to show all selected categorized repository content. Repository's metadata is fetched only after the category is selected. Categorized repositories can be defined in config.xml: <RepositoryCategories> <RemoteRepositories> <Displayname>category 1</Displayname> <Repository> <Url>(url)</Url></Repository> </RemoteReposiories> ... <RepositoryCategories Change-Id: I6eae9daee70b1afa322144d52c11f25d0b655ebf Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Add property to disable default repository savingKatja Marttila2018-09-101-1/+14
| | | | | | | | | | | | By default, all default repositories defined in <RemoteRepositories> are saved to maintenancetool.ini -file. When you start maintenancetool, the repositories are read from maintenancetool.ini and those are used. There are cases when we don't want to use the default repositories when running maintenancetol. Change-Id: I4507e16636f2d709aa099eaa865264800591ce0d Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Add attribute to mark parts of install tree unstableKatja Marttila2018-04-051-2/+13
| | | | | | | | | | | | This commit adds new AllowUnstableComponents configuration. Setting AllowUnstablecomponents to true in config.xml will * allow installing other components when there are errors in scripts * allow installing other components when there are missing dependencies * will mark the 'broken' components uninstallable in treeview Task-number: QTIFW-930 Change-Id: I8d28cf9c4b0401e0bb76795e87d581f39b64f128 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Merge remote-tracking branch 'origin/2.0'Katja Marttila2017-01-301-17/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-261-17/+12
| | | | | | | | | | Change-Id: I6426c4e8f932cf26c6c638dec18d0c12e22972d1 Reviewed-by: Janne Anttila <janne.anttila@theqtcompany.com>
* | Make support for modifying installations configurableFrerich Raabe2016-09-141-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces support for a new setting 'SupportsModify' in the config.xml file. This is only relevant for Windows installers. By default (i.e. when omitting) this setting, it defaults to 'true' which means that the product supports modifying (i.e. reconfiguring) an existing installations. As such, the 'Modify' button show in Windows' list of installed programs will be enabled. Setting this to 'false' will cause the button to be disabled. Change-Id: I4105f3f0bce67830aa2ee8ae0e6f6abb25c35b30 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* | Make usage of authorization fallback optionalSlobodan Vrkacevic2016-05-181-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Asking users to use the authorization fallback in case of authorization errors might be a bit problematic in some cases. If the users are not familiar with the concept, running: "<installer_exe> --startserver PRODUCTION,{GUID},{GUID}" from command line might be confusing or difficult. Also it might not help at all. So let's make this optional. If the config variable DisableAuthorizationFallback is set to true the installer will not ask users to run the authorization fallback but instead it will abort the installation immediately. In RemoteClient this is implemented by adding a new function called setAuthorizationFallbackDisabled. The init function could be also extend for this but the config settings are not loaded at the time when the function is called. Change-Id: I4baf1dea34c5cc0016e98df47a9492ee1418c5ee Reviewed-by: Katja Marttila <katja.marttila@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | Allow specifying the installer size in 'em' or 'ex' unitsSlobodan Vrkacevic2016-02-291-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The WizardDefaultWidth and WizardDefaultHeight configuration settings always expected pixel values. This made the installer look somewhat awkward on high DPI displays, in which case the ratio between the font size and the installer window size was such that the fonts looked very big. Let's fix this by allowing to specify the width/height of the installer using units which are defined in terms of the font size, namely 'em' ("The width of the letter M") and 'ex' ("The width of the letter x"). 'px' is supported as well and means the same thing as not specifying any unit at all: the given size is defined in pixels. We choose to *not* use the font width for 'em' and 'ex' to be consistent with what the Qt CSS parser does (see src/gui/text/qcssparser.cpp), which adheres to what the W3C document at https://www.w3.org/WAI/GL/css2em.htm describes. Change-Id: Iaeb5a29c79d437ef4b956cb318158181f6289ec9 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/2.0'Iikka Eklund2016-01-201-4/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-291-4/+3
| | | | | | | | | | | | | | | | | | 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>
* | Read UrlQueryString from settings.Jarek Kobus2015-10-141-1/+1
| | | | | | | | | | | | | | Task-number: QTIFW-744 Change-Id: Ie67bbb5f753a86041c60f2e32fe6b36213e4613e Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* | Allow to use the stylesheet to customize UIDenis Shienkov2015-09-281-1/+6
| | | | | | | | | | | | | | | | | | | | Now it is possible to set a stylesheet file to customize the wizard's UI. The stylesheet adds to the config.xml file using the new "StyleSheet" element. Change-Id: I66271f755a0f742e96cf433fe557423a2261e432 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>