summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Documentation fixesKatja Marttila2020-07-037-61/+93
| | | | | | | | Added missing documentation and fixed warnings. KDUpdate documentation not added in this commit. Change-Id: Idc0b167bed95b7ae4a46a350290fdb241aa94448 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Do not print progress indicator when forwarding output to a fileArttu Tarkiainen2020-07-035-3/+29
| | | | | | Task-number: QTIFW-1770 Change-Id: I2f3a8b440b89328fa3d183b1102d6a6db213fd3b Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Modify repository category functionalityArttu Tarkiainen2020-07-037-46/+85
| | | | | | | | | | | | 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 possibility to add custom widget from script to certain positionKatja Marttila2020-06-254-13/+39
| | | | | | | | | | | If several custom widgets are added to same page, the order of the widgets is arbitrary. Added a new member to addWizardPageItem which can define the position of the widget in the page, relative to another custom widgets. Non-custom widgets are always placed on top as before. Task-number: QTIFW-1847 Change-Id: Iadafef3a08e60a8b05b959cb06caea2a2042b419 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add function to get information if default install is performedKatja Marttila2020-06-254-0/+14
| | | | | | Task-number: QTIFW-1847 Change-Id: I737b9b527c25e089386f74038b57a83f3d7e2062 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add possibility to select/deselect component from script using coreKatja Marttila2020-06-255-6/+33
| | | | | | | | | We might not have componentselection page visible, so we need a possibility to select/deselect components also using core. Task-number: QTIFW-1847 Change-Id: I85ccf0602144f843c15ef7c0818ba435d36bdac5 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Require both SHA1 and MetadataName elements for united metadataKatja Marttila2020-06-161-17/+11
| | | | | | | | | Installer can fetch either meta per component or meta per repository. Fetch meta per repository only when both MetadataName and SHA1 elements are found, otherwise fetch meta per component. Change-Id: Ic6d687525c74d5870cec991dea9dedf765b2df03 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Generate unique metadata name for unified metadataKatja Marttila2020-06-111-2/+11
| | | | | | | | | | | If the metadata name is the same although the package is updated, it might cause problems when pushing the data to distribution systems that requires a filename change in order to replicate content. If the filename stays the same it may not be refreshed to the cache. Task-number: QTIFW-1838 Change-Id: I2fc8c1cdf559dab89b57a74ebbe758cdc71da29c Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Add a page list widget to installer wizardArttu Tarkiainen2020-06-117-8/+206
| | | | | | | | | | | | | | | | | | | | 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>
* Reintroduce removed --checkupdates and --updater as deprecated optionsArttu Tarkiainen2020-06-105-5/+37
| | | | | | | | | | | These should be only provided for backward compatibility and be hidden from help text. Task-number: QTIFW-1791 Change-Id: Iff92bdf0be425edf724d3bcd3984458eca5f8ff2 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Refactor maintenance tool writing conditionsArttu Tarkiainen2020-06-106-51/+81
| | | | | | | | | This change fixes a bug caused by a blocking runInstaller() call in PerformInstallationPage::entering() and also contains refactoring to related parts of code. Change-Id: Ic3309707c1f975a646937aa96fc407a3e5931359 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix InstallAction type when updating componentsKatja Marttila2020-06-081-4/+9
| | | | | | | | | | | | Components should be selected for update using model, not components own check state so model values stay in sync. Wrong InstallAction type will cause component to think it will be installed when that is not the case. This caused problems in install scripts when trying to figure out if component is going to be installed or not. Task-number: QTIFW-1830 Change-Id: I367f476de96f27b27d74e06a6fb630f0876924d2 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Merge remote-tracking branch 'origin/3.2' into masterKatja Marttila2020-06-081-0/+2510
|\ | | | | | | Change-Id: If0a57022c82cf303fc7be387e0ecf8f581478181
| * Catalan translation for IFW 3.23.2Josep Ma. Ferrer2020-06-021-0/+2510
| | | | | | | | | | | | | | Update Catalan translations for IFW 3.2 Change-Id: Id3ab2f454db41f3da93c700798b7e99d7158ddd7 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
* | Add function to enable button click with objectnameKatja Marttila2020-06-044-0/+26
| | | | | | | | | | | | Task-number: QTIFW-1707 Change-Id: I8574ef96df6a00e577549342d4a4336207dcd9ec Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Obey --show-virtual-components in cli searchKatja Marttila2020-06-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | Virtual components cannot be installed unless --show-virtual-components is used. For the same reason, don't show the virtual components in search unless --show-virtual-components is used as otherwise user might miss that he is trying to install virtual component. Task-number: QTIFW-1828 Change-Id: I5a0492f6894596ed2cfb7ce438bbf55e89799c31 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Fix const correctness for CLI license acceptance functionsArttu Tarkiainen2020-06-032-4/+4
| | | | | | | | | | Change-Id: If3fdafc982c8f2180fc15529bba1bd408d9fbfee Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Remove orphan PackageManagerCorePrivate::runUpdater() functionArttu Tarkiainen2020-06-031-1/+0
| | | | | | | | | | Change-Id: I045bdd030277eb192d08749bd0208ac5d6d7a52c Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | CLI: Do not run updater if there are no updates for selected componentsArttu Tarkiainen2020-06-011-2/+8
| | | | | | | | | | | | Task-number: QTIFW-1818 Change-Id: I13dceeeaf294c689a90fbe5fe74586d7a117ea50 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Fix CreateShortcut path when running updateKatja Marttila2020-05-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | CreateShortcut operation is written to dat file. When updating the component, the operation is already containing the correct start menu value, so adding the start menu path is needed only when running installer. Task-number: QTIFW-1816 Change-Id: I7f60b07b21217c59ff2f419c3e92478c82d42445 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Remove unnecessary autoRejectMessageBoxes() callsArttu Tarkiainen2020-05-281-4/+0
| | | | | | | | | | | | | | | | | | These were apparently added as a stop-gap measure to prevent message boxes from blocking CLI operations before the proper message acceptance features were implemented. Should not be needed anymore. Change-Id: I5591487840fd278eea4b3e46bce0ede66d055d15 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Inform if trying to uninstall virtual componentKatja Marttila2020-05-271-0/+6
| | | | | | | | | | | | Task-number: QTIFW-1811 Change-Id: I333d6d0bd93f8538919f172113b7039b63491492 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Disable message acceptance and file query options on GUIArttu Tarkiainen2020-05-272-36/+42
| | | | | | | | | | | | | | | | | | | | Also add "command-line-only" remarks for the rest of the options that are only supported on CLI to their help description. Task-number: QTIFW-1789 Change-Id: I08cc27dee4eb4aad7a2e5c2721c56ae524766955 Reviewed-by: Tarja Sundqvist <tarja.sundqvist@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | CLI: Add new option --file-query to auto answer QFileDialogKatja Marttila2020-05-267-10/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | QFileDialog.getExistingDirectory and QFileDialog.getOpenFileName can be called from scipt. If command line interface is used, user must type the correct directory or file name from command line during install. With --file-query option user can give the values when running the installer or maintenancetool with syntax --file-query filedialogId=C:/temp,filedialogId2=C:/temp/file.txt. Task-number: QTIFW-1631 Change-Id: I5e58be6b509cf00de832646ef31ec4eda90773be Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Add new no-default-installations optionKatja Marttila2020-05-267-3/+38
| | | | | | | | | | | | | | | | | | | | | | | | This option can be used both from CLI and from GUI. Option will overwrite Default true in component.xml, which means that in GUI the components are not selected by default, and in CLI the components are not installed unless those are given as argument to install -command. Task-number:QTIFW-1630 Change-Id: I5dc16b14fc136f421980a55bb5fc6a74213309dc Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Merge remote-tracking branch 'origin/3.2' into masterKatja Marttila2020-05-257-9/+2493
|\| | | | | | | Change-Id: Icd1dbcfa7f6eef138aad5287a6dcdf7d061a7d70
| * Translation fixesKatja Marttila2020-05-205-9/+9
| | | | | | | | | | | | Task-number: QTIFW-1435 Change-Id: Ic3850754541775f76e86ed09e2dd36f036f5d67c Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
| * Add possibility to reduce the metadata simultaneous downloadKatja Marttila2020-04-081-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | For some reason installer freezes on some machines when metadata download amount exceeds certain limit. Currently it is limited to 1000 simultaneous requests and this has solved the issue previously but now the issue has recurred. Added a environment variable IFW_METADATA_SIZE so user can decrease the download amount to prevent freezing. Task-number: QTAINFRA-3634 Change-Id: I09c2f8e589a6b89f351623666994cc12ebd7054a Reviewed-by: Johanna Äijälä <johanna.aijala@qt.io> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
| * add croatian translationOswald Buddenhagen2020-04-021-0/+2468
| | | | | | | | | | | | | | | | contributed by Milo Ivir. Fixes: QTBUG-75911 Change-Id: Ieb7b0cdd16f6f4a4343e02814cd52ff86c368898 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
| * Provide a means to use fixed translations for Qt and IFWAndy Shaw2020-03-261-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since building Qt statically and then IFW can be seen as a lot to do just to be able to provide a fixed translation for a Qt or IFW string then it is better to provide a means to override these translations. So if a translation is found inside :/translations_new then it will use this one instead of the one found at :/translations for Qt or IFW strings. This can be provided via the -r option when using binarycreator then. Change-Id: I007c45ff96ccf5d73b54a5df8a80a2a05c2f35c6 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Doc: Add scripting api documentation for setAutoAcceptLicenses()Arttu Tarkiainen2020-05-151-1/+3
| | | | | | | | | | | | Change-Id: I5478b6bf6d62f6d6db78e3d3ae3dfaeee573c220 Reviewed-by: Tarja Sundqvist <tarja.sundqvist@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Add support for disabling CLI features from configuration fileArttu Tarkiainen2020-05-155-1/+14
| | | | | | | | | | | | Task-number: QTIFW-1760 Change-Id: Ibd0668756700eeab68bce12ddce1866893cc08f9 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Fix interrupt() call from scriptKatja Marttila2020-05-152-5/+10
| | | | | | | | | | | | | | | | | | Installer can be interrupted with interrupt() call from script. The interrupt was not correctly handled causing the installer to continue install successfully. Change-Id: I6c211ef985cc1a06445249bde27cdff5678a8ed0 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Remove unnecessary component calculationKatja Marttila2020-05-151-1/+0
| | | | | | | | | | | | | | | | At this point of the install, components are already calculated. Removed the call to avoid unnecessary signals to be sent. Change-Id: I90b8e99ce63b30e8829dce4837164a6c3a919516 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | CLI: Add option to read arbitrary user inputKatja Marttila2020-05-152-0/+24
| | | | | | | | | | | | | | | | | | | | | | Added new readConsoleLine() function which can be used to read user input from console. Function can be only called when command line instance is used without gui. Task-number: QTIFW-1631 Change-Id: Ic856f4bafc4a8d469d3fe497b4e0321e104df499 Reviewed-by: Tarja Sundqvist <tarja.sundqvist@qt.io> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Add try-catch block for ProductKeyCheck initializationArttu Tarkiainen2020-05-111-1/+7
| | | | | | | | | | Change-Id: I04811666c3d26d46e4253a8673643c026851e07f Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Use default button if auto-answer value not foundKatja Marttila2020-05-071-2/+14
| | | | | | | | | | | | | | | | | | | | | | Invalid button values are already handled when parsing auto-answer values. But if valid button is given but it does not match to given messagebox answer, warning is printed and default value is used instead. Also print answer to console when using --auto-answer Change-Id: Ie7bb3bf671018ec84be9a8258692e6e0024d9a80 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Fix addElevatedOperation prevents installing from CLIArttu Tarkiainen2020-05-061-4/+3
| | | | | | | | | | | | | | | | | | | | Reorder the checking of if we are already running the binary with sufficient rights to happen before intentionally failing gaining on-demand admin rights with command line instance. Task-number: QTIFW-1700 Change-Id: I7cbce535baa1a818ee0fa263fa0dfc7af75c59d4 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Rationalize auto-answer formatKatja Marttila2020-04-302-2/+3
| | | | | | | | | | | | | | | | Makes no sense to force users to type the 'QMessageBox::' in front of value, we an always prepend that in code. Change-Id: I3f9152c53875f06c70eb1601ecbe286d3849febd Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Initialize productkeycheck at later stateKatja Marttila2020-04-291-7/+5
| | | | | | | | | | | | | | | | | | Productkeycheck can set temporary repositoes etc., initialize it after other command line options have been handled so it won't overwrite values and can utilize the core values set from command line. Change-Id: Iacab5be4efa0d4133a089004a04ecb937f093b2d Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Add possibility to accept licenses from CLIArttu Tarkiainen2020-04-287-1/+78
| | | | | | | | | | | | | | | | | | | | | | License agreements can be accepted automatically by using command line option --accept-licenses or interactively by answering queries with either "Accept", "Reject" or "Show" selections. Task-number: QTIFW-1742 Task-number: QTIFW-1745 Change-Id: Iff46b44f91faddb7f163b299994167ab16df68b3 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Answer queries from command lineKatja Marttila2020-04-2813-247/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Standard input is possible in Windows only in console application. This change makes installers to be console applications by default. If started as gui from command line, console is released and application is restarted so cmd.exe won't be waiting for application to finish. If started from explorer, console is launched but released immediately. This may be seen on screen with short console flash. Using command line interface messagebox strings and possible answer values for it are printed to console. Answers must be given in case sensitive format as StandardButton QMetaEnum is utilized when reading button values. This ensures that if StandardButtons are added/removed/changed the code continues to work. Also added a new option 'default-answer' which will answer the questions with default button values without user interaction. Task-number: QTIFW-1739 Change-Id: I710f921f5c927dbd13090af32f93656dded84e72 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Fix installationlog.txt writingKatja Marttila2020-04-273-21/+27
| | | | | | | | | | | | | | | | | | Fixes also remoterepo deletion from tmp folder Task-number: QTIFW-1664 Task-number: QTIFW-1683 Change-Id: I8485eb63c4ec5a30c04f4177922bb60f2176ce37 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Fix creation of local repository with elevated permissionsArttu Tarkiainen2020-04-211-10/+38
| | | | | | | | | | | | | | | | | | | | | | As starting with Qt 5.10 we cannot copy compiled-in resources using QInstaller::RemoteFileEngine, add a pre-step for the internal metadata copy operation. First dump the resources to a writable directory as a normal user, then do the real copy work with elevated rights. Task-number: QTIFW-1500 Change-Id: I20316bc55514365d051f0fa6fb435c5532ce9e3b Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Add new option --auto-answerKatja Marttila2020-04-164-3/+47
| | | | | | | | | | | | | | | | | | | | | | With this change user can individually answer to message queries if message id is known. The syntax is --auto-answer message.id=QMessageBox::Ok,message.id2=QMessageBox::Cancel Task-number: QTIFW-1740 Change-Id: I86d08df77cf5f3d665901b599586d8c52b7dcdf6 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | CLI: Print message if search does not find anythingArttu Tarkiainen2020-04-161-0/+5
| | | | | | | | | | | | Task-number: QTIFW-1703 Change-Id: I56c841eaac18234b3d3971eeeb497f8205a7b348 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Give meaningful default value to messagebox queriesKatja Marttila2020-04-163-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If error occurs in install phase, change the default button to be cancel/ignore etc. to avoid inifinite loop when installing with CLI. When using GUI, default button is highlighted but user can choose otherwise. When using CLI the default button is always chosen if user don't give option to overwrite the default button values from command line. Task-number: QTIFW-1737 Change-Id: I721636d5a23e22ad5eee73b84e250e90eb1a6004 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Add possibility to auto accept or reject IFW queries from CLIKatja Marttila2020-04-156-5/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added new command line switches accept-messages and reject-messages to automatically accept or reject installer message queries. Also removed Retry option in CLI when archive or hash download failed. With GUI it is possible to try Retry in case either is missing but without GUI Retry will cause infinite loop. Added unit tests for accept-messages and reject-messages using CLI. Task-number: QTIFW-1736 Change-Id: Ie87d2d8157be772b790415c96e5b94fc882d4be7 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Fix shortcut creation when installing from CLIKatja Marttila2020-04-095-7/+23
| | | | | | | | | | | | | | | | | | | | | | Change default button from Retry to Cancel if operation fails to avoid infinite loop when running from command line interface. Added also unit tests for shortcut operation. Task-number: QTIFW-1666 QTIFW-1710 Change-Id: I171b6aecd9886acce0051b7082842f8f76b22046 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Fix bugs in InstallIconsOperation and add unit testsArttu Tarkiainen2020-04-082-16/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix conflicting naming and reference of operation value in InstallIconsOperation::targetDirectory(). - Fix bug related to appending of "icons" suffix to paths in XDG_DATA_HOME, the logic was glued to old default values which have been since changed. - Remove unused variable in class destructor and remove unneeded default implementation. Also add unit and CLI tests for InstallIconsOperation and move addToFileMap() to common functions so it can be used in multiple tests. Task-number: QTIFW-1715 Task-number: QTIFW-1465 Change-Id: I5281ca7a5dec1453f49fbe2cb2852d6467bf0c97 Reviewed-by: Katja Marttila <katja.marttila@qt.io>