summaryrefslogtreecommitdiffstats
path: root/src/sdk/sdkapp.h
Commit message (Collapse)AuthorAgeFilesLines
* Add option for specifying maximum concurrent unpack operationsArttu Tarkiainen2022-04-211-0/+10
| | | | | | | | | | 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>
* Fix deprecation warnings from building with Qt 5.15.2Arttu Tarkiainen2021-12-211-5/+5
| | | | | | | | Also update build version requirements. Task-number: QTIFW-2388 Change-Id: Iae1949548dda7a3b8d448228e27060efb5abd8eb Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Print essential component information with std::coutArttu Tarkiainen2021-10-221-6/+3
| | | | | | | | | | | | | | | | | | Do not use our own message handler for printing XML-formatted component information (from 'list', 'search', 'check-updates') that is expected to be included in output regardless of the current verbosity level or logging rules. Higher verbosity can still add more information to be included in output. Also: - Modify auto-tests to pass and check the output correctly. - Remove now orphaned 'ifw.package.info' logging category. - Rename 'LoggingHandler::printComponentInformation()' to 'printUpdateInformation()' to better match the intended purpose. Task-number: QTIFW-2349 Change-Id: Id1a868f8f824c606825cd6168974a7e3845383e6 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add ability to query used language in scriptKatja Marttila2021-10-121-5/+6
| | | | | | Task-number: QTIFW-2208 Change-Id: I8c8e9bd798320ab6d4397ac411cfea75177d27f2 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Emit translationLoaded -signal after productkeycheck initKatja Marttila2021-09-241-1/+6
| | | | | | | | Productkeycheck needs the information about loaded language, send the signal after it is initialized. Change-Id: If85d5127c80ae0d5f2caa62c731c8669e8d6df7e Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Translations: validate and update translatable user interface stringsArttu Tarkiainen2021-06-231-1/+1
| | | | | | | Task-number: QTIFW-2245 Change-Id: Id9a79c7c572dc588c05ad37c67ae3f0431fa7cdb Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Load and install translations as early as possibleKatja Marttila2021-06-171-11/+57
| | | | | | | | | | | | This will ensure that any early error messages are translated if there are any translations for them. Such as the already running instance string. As a result this means that a check if the installer is already running is done slightly later to allow the loading of the translations first before checking. Fixes: QTIFW-1888 Change-Id: I75ef22d98ca4de9a05e7dd485b5afed5652529bc Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Load control script also when using CLIKatja Marttila2021-06-161-0/+16
| | | | | | Task-number: QTIFW-2268 Change-Id: I61e5f7963a55dcdc25aff171523fe078af309785 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Fix declaration order mismatching initializer list in SDKAppArttu Tarkiainen2021-05-031-1/+1
| | | | | | | The compiler issued a -Wreorder warning for m_core & m_runCheck. Change-Id: Id55d40132e41ab3c92f192d469bce095941a3acf Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix App Error when trying to launch a running installerKatja Marttila2021-02-191-2/+4
| | | | | | | | Fixed by not deleting the uninitialized pointer. Task-number: QTIFW-2149 Change-Id: I4ed768828f6e662c63bf83550c127987205e92d5 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* CLI: Add warning when cli-only options are used without command keywordArttu Tarkiainen2021-02-151-0/+10
| | | | | | Task-number: QTIFW-2046 Change-Id: Id1c3d24e8c385bdfbe0a7837be774f885a192aa4 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Restructure logging utilitiesArttu Tarkiainen2021-02-041-2/+3
| | | | | | | | | | | | | | Create a singleton-pattern class as an encapsulation unit for holding and altering the state of debug printing attributes. Move related code from various places under a single umbrella header file for logging utilities, with some minor stylistic changes & cleanup. This acts as a preparatory change for providing non-blocking headless CLI runs when there is no TTY attached - that will be fixed in a follow-up change. Change-Id: Ib7f72cf75362c3ea6713058e92eda997d6df55c3 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Set "FrameworkVersion" in a place consistent with other variablesArttu Tarkiainen2021-01-211-5/+0
| | | | | | | | Also document the predefined variable. Change-Id: I733bd4dfd245d300994e85c9ebb4b34a7c51de45 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Print package information in xml formatKatja Marttila2020-11-251-7/+2
| | | | | | | | | Also removed logging categories for package information, the full package information can be printed by increasing the verbosity level. Task-number: QTIFW-1950 Change-Id: I4bce019a63ba1fbf48e3bb0ca45511e42d4974c9 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Merge remote-tracking branch 'origin/4.0' into masterKatja Marttila2020-11-241-0/+5
|\ | | | | | | Change-Id: If5205ff6ef2c8989520e24d41595c04d5920d207
| * Set "FrameworkVersion" installer valueArttu Tarkiainen2020-11-181-0/+5
| | | | | | | | | | | | | | | | This makes it possible to query for the Installer Framework version of the running installer binary from the scripting-API. Change-Id: I88fd12d081aa720cbe95683ee35714e5e2d4908b Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | CLI: Print extra archive information with higher verbosity levelArttu Tarkiainen2020-11-051-1/+1
|/ | | | | | | | | | Also rework verbosity level handling to use predefined and range constrained enumeration list values. Task-number: QTIFW-1998 Change-Id: Iaf15ca638411e6842d3d502c4d7ff11d28d06658 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add short version for option --accept-licensesKatja Marttila2020-10-061-1/+1
| | | | | | Task-number: QTIFW-1984 Change-Id: I9e2c9302d4a21f169266b147bac618758f004fa5 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Add short version for --confirm-commandKatja Marttila2020-10-051-1/+1
| | | | | | Task-id: QTIFW-1980 Change-Id: Id4641406d67f377597575d1e7f9d2e6d312091a3 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* CLI: Add short versions for message query optionsKatja Marttila2020-10-051-7/+9
| | | | | | Task-id: QTIFW-1982 Change-Id: I97f51c0931f4baef5e19f0e819bd6beee186301e Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* GUI: Hide detailed verbose with lowest verbose levelKatja Marttila2020-08-271-1/+2
| | | | | | Change-Id: I96628f5bdd056c6118f6d14178b6c0b7dd776ecd Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add verbose levels and cleanup log categoriesKatja Marttila2020-08-241-2/+24
| | | | | | | | | Setting several verbose switches enables more logging and performs component checking. Also cleanup some logging categories and unify the rules. Task-number: QTIFW-1914 Change-Id: I9195f4bb02affaa87e66cf9023a3512e65e0645b Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* CLI: Ask user confirmation before performing installer actionsArttu Tarkiainen2020-08-211-0/+3
| | | | | | | | Also add new option --confirm-command to skip the interactive query. Task-number: QTIFW-1834 Change-Id: I1c63fd990431c792a523da7047637f54b193bee6 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Do not print progress indicator when forwarding output to a fileArttu Tarkiainen2020-07-031-0/+1
| | | | | | Task-number: QTIFW-1770 Change-Id: I2f3a8b440b89328fa3d183b1102d6a6db213fd3b Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Reintroduce removed --checkupdates and --updater as deprecated optionsArttu Tarkiainen2020-06-101-1/+6
| | | | | | | | | | | 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>
* Disable message acceptance and file query options on GUIArttu Tarkiainen2020-05-271-28/+31
| | | | | | | | | | 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-261-0/+12
| | | | | | | | | | | | | 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-261-0/+2
| | | | | | | | | | | | 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>
* Add try-catch block for ProductKeyCheck initializationArttu Tarkiainen2020-05-111-1/+7
| | | | | Change-Id: I04811666c3d26d46e4253a8673643c026851e07f Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Rationalize auto-answer formatKatja Marttila2020-04-301-1/+2
| | | | | | | | 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-281-0/+3
| | | | | | | | | | | 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-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | 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-271-21/+19
| | | | | | | | | 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>
* Add new option --auto-answerKatja Marttila2020-04-161-0/+38
| | | | | | | | | | | 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>
* Add possibility to auto accept or reject IFW queries from CLIKatja Marttila2020-04-151-0/+5
| | | | | | | | | | | | | | | 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>
* Initialize user arguments earlierKatja Marttila2020-04-081-14/+22
| | | | | | | | | | | | | | | User can give arguments from command line, for example AllUsers=true, which can affect to other core values. Initialize user arguments in core constructor so we an utilize the user given values when defining other core values. Added also unit test for overwriting core data values. Note that some values belong to QSettings such as MaintenanceToolName which cannot be overwritten. Task-number: QTIFW-576 QTIFW-1730 Change-Id: I82a05f9f4bc8498f4e0e2af407ba29f6dabbf030 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Add short versions of CLI optionsArttu Tarkiainen2020-03-191-24/+20
| | | | | | | | | | | | | | Add single or couple letter short options and two letter short commands. Single letter short options can be passed in a single joined form, for instance '-dg'. Also change CLI options constant string literals type to QLatin1String as we would have to use this as a wrapper anyway wherever the constants would be used, causing quite long and verbose statements. Task-number: QTIFW-1634 Change-Id: I17e80c9a657d934687d2b7e87fcecddffa1b9b21 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Refactor naming and usage of CLI commandsArttu Tarkiainen2020-03-191-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | - Rename and alter the description of some command line options according to validation results from task QTIFW-1635. The suggested additions are not added in this change. - Remove options "framework-version" and "silentUpdate", these should not be needed anymore. - Combine options "installPackages" and "installDefault" into single "install" command. - Change command line syntax from "binary [options]" to "binary [options] command <arguments>". - Re-order & group known option variables and "--help" printing order based on their topic. - Move CommandLineParser class files under src/libs/installer and add private class for future options extension. Short versions of command line options should be added in a follow-up commit. Task-number: QTIFW-1671 Change-Id: Ie0d393368b5275c8ffa1ab8833885b149af3178e Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Merge remote-tracking branch 'origin/3.2' to masterKatja Marttila2020-03-161-0/+3
|\ | | | | | | Change-Id: Ia4cf718409ce431cce8d766865ecec506426afb9
* | Perform headless commands without GUI dependencyKatja Marttila2020-03-121-2/+235
|/ | | | | | Task-number: QTIFW-1633 Change-Id: I207cd152a471fddd51c152223460f8a9873f4382 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Update usage of Apple-related terminologyArttu Tarkiainen2019-08-161-5/+5
| | | | | | | | | | | 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>
* Allow maintenancetool signing in WindowsKatja Marttila2018-09-261-10/+21
| | | | | | | | | | | | Maintenancetool signing was broke as installer modified the maintenancetool binary. Fixed so that maintenancetool is not modified, instead the needed data is written to a separate installer.dat file. Installer.dat is written and needed only after install so we can continue using and deploying only one executable. Task-number: QTIFW-667 Change-Id: I30bf2ebe81d7c7146a78840d234c5c813f8e1da5 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* License header update to GPL-EXCEPTKatja Marttila2017-01-261-17/+12
| | | | | Change-Id: I6426c4e8f932cf26c6c638dec18d0c12e22972d1 Reviewed-by: Janne Anttila <janne.anttila@theqtcompany.com>
* 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>
* Update CopyrightKai Koehne2015-02-181-7/+7
| | | | | Change-Id: I8dde6629cfd461104364d5cdc255cb54b58283fa Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* Replace all occurrences of "can not" with "cannot"Niels Weber2014-10-311-5/+5
| | | | | | | | | Also fix some other issues in the touched strings, making them comply to Qt style. Change-Id: I46515e1a3bec5e21610943ded2ef7fa1f09a4a15 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Add LGPLv3 as new licenseKai Koehne2014-10-161-14/+7
| | | | | | | Change-Id: I61158f956894e209dccf83744b4753774676099d Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com> Reviewed-by: Niels Weber <niels.weber@digia.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* Overhaul the binary format API.kh12014-10-151-23/+9
| | | | | | | | | | | | | | Adjust some naming. Add documentation. Make the Resource class handle files only, this is sufficient to read and map inbuild resources. Keep the QResources inside the manager as well, no need to handle them separate. Remove read, write functions from collection class, the API was just unclear how to use. Still it is far from intuitive in the manager class either. If we open a Resource, we need to close it on our own case they are pointers. Change-Id: Ic8aa32a84a15ac774fe1194ba0dbb5733f7216d6 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Split and implement new installer base, update checker.kh12014-09-041-5/+82
| | | | | | | | | | | | | Based on the former patches, split the installer base into its own class. Use the new binary content read functions. Adjust uses to match the new classes. Adjust installer base /update checker signature and inheritance. Remove all now superfluous functions from binary content. Core engine instantiates the operations now, makes reading and writing more generic. Move product key check into QInstaller namespace. Make use of the new command line parser. Change-Id: I00aff79085b69ce627906881b43f374681ea7e91 Reviewed-by: Kai Koehne <kai.koehne@digia.com>