summaryrefslogtreecommitdiffstats
path: root/src/sdk/installerbase.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Do not reset core data values in restartKatja Marttila2018-10-161-10/+2
| | | | | | | | | | | | | Do not reset core data values as that removes all data set using setValue() which are needed. Restart is called when pressing 'Restart' after maintenancetool finish page or when changing settings from Settings Dialog. Task-number QTIFW-504 Change-Id: I0713b0371811957b93623433d26f0b10e4c8fb12 Reviewed-by: Janne Anttila <janne.anttila@qt.io> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Enable building IFW with Squish supportKatja Marttila2018-02-121-0/+18
| | | | | | | | | | | | Change enables building IFW with Squish support by passing SQUISH_PATH to qmake when building IFW. Also enables runtime change of Squish port with command line option --squish-port <port number>. If no port is set, default port 11233 is used to attach to Squish. Change-Id: I4821b360031df66968d3592886c2e45598e1b097 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Antti Kokko <antti.kokko@qt.io> Reviewed-by: Johanna Äijälä <johanna.aijala@qt.io>
* Fix usesSystemConfiguration usageKatja Marttila2018-01-301-3/+5
| | | | | | | | As usesSystemConfiguration() is introduced in Qt 5.8, use it only when compiling with Qt 5.8 or higher. IFW still supports version 5.6.2. Change-Id: Ib39f38a452624a84627ad53c9941154bc0fd7929 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Set correct proxy typeKatja Marttila2018-01-251-2/+7
| | | | | | | | | From Qt 5.8 onwards system proxy might be used by default. Checked if that is the case and updated settings accordingly. Task-number: QTBUG-65143 Change-Id: Ibe8f3173636c57f73addcc576afdd37a68ec1d03 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* make .ts file naming follow the usual patternOswald Buddenhagen2018-01-031-1/+1
| | | | | | | | this makes it easier to integrate ifw into the surrounding infrastructure. Change-Id: I7918830b7a6c29d8556911eec83a3b6530478d84 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Check license when doing silentUpdateKatja Marttila2017-05-151-0/+3
| | | | | | Task-number: QTAUTO-428 Change-Id: Ib3d56b59a12d4c7091a6abdbc5231ed5dbe2c3b1 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Give warning and exit install if invalid URL given for 7z repositoryKatja Marttila2017-05-101-0/+6
| | | | | | Task-number: QTIFW-966 Change-Id: I13cf001771d30e0737348d33183e329e4c1d2070 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>
* | Introduces new --silentUpdate command line optionKatja Marttila2016-11-151-31/+41
| | | | | | | | | | | | | | | | | | With this feature one can update all installed components silently with maintenancetool by passing --silentUpdate parameter Change-Id: If31d37ce24e794775c2fe47b603259da133c9ee7 Task-number: QTIFW-906 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | allow installing compressed packagesKatja Marttila2016-11-091-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces new feature to add 7z packages to be installed. Packages must be installer repositories (created with repogen), compressed to 7z file and named as qtbsp or 7z. Selecting compressed package is done either with button in component selection page or with --installCompressedRepository parameter given to installer or to maintenancetool. Button will not be created by default. If you want to show the button either build IFW with DEFINES+=INSTALLCOMPRESSED or enable the button in control script with allowCompressedRepositoryInstall() in ComponentSelectionPageCallback Task-number: QTIFW-886 Change-Id: Ia060092c348991d5195393b7dc154205f8bf92a5 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Automatically load all fonts in 'fonts/' resourcesFrerich Raabe2016-11-081-0/+11
| | | | | | | | | | | | | | ...such that they can be used in style sheets. Change-Id: I677be428972dbfe9385cf438b0ccf2f0f3fcd822 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* | Merge remote-tracking branch 'origin/2.0'Katja Marttila2016-06-211-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/7zip/7zip.pro src/libs/7zip/win/CPP/7zip/UI/Common/Update.cpp src/libs/installer/component.cpp src/libs/installer/lib7z_facade.cpp src/libs/installer/packagemanagercore.cpp src/libs/installer/proxycredentialsdialog.h src/sdk/translations/ja.ts tests/auto/installer/messageboxhandler/tst_messageboxhandler.cpp tests/auto/installer/scriptengine/tst_scriptengine.cpp tests/auto/installer/settings/tst_settings.cpp Change-Id: I3bb98b8490b3c3eb7f664c1abb7417155b5430b2
| * add missing tr for "AlreadyRunning" messageboxKatja Marttila2016-05-191-2/+2
| | | | | | | | | | | | Change-Id: Icffe886597a1f18d9eaacf1e3a14f31e252919c6 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com> Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* | Store lock files in temporary directoryFrerich Raabe2016-06-151-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The directory in which the application is stored may not be writable for the current user, e.g. if the installer is stored on a read-only network drive, or (common case on OS X) if the installer bundle is started from a read-only .dmg image. This fixes warnings in the verbose output (especially noticeable during unattended installations) like: [0] Warning: Cannot create lock file "/Volumes/froglogic Squish/Install Squish.app/Contents/MacOS/Squish1234865.lock": Read-only file system The patch is defensive in that it just uses QDir::tempPath() instead of going for QTemporaryFile to avoid having to worry about auto-delete semantics. Change-Id: Iee2409dd6f884c4fe234057b2926eee82127f985 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Fix setValue saving in restartKatja Marttila2016-02-151-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | When running maintenancetool and installing a component that sets a value in installscript with setValue, the value is cleared when pressing 'Restart'. Task-number:QTIFW-504 Change-Id: Ie588b6f1011d7b50b771ea8ee0dea99350f65878 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* | Don't use 'lockmyApp' prefix for lock filesFrerich Raabe2016-02-151-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'lockmyApp' part of the lock file names looked like some generic default value which just was not customized to fit the installer. Let's use the Qt application name instead as returned by QApplication::applicationName(). We maintain the strong random filename generation algorithm by sticking to the proven constants which presumably are perfectly random since they were generated by a fair die roll. Change-Id: Ief18942ca4e967f7016e7c471a7b44e3b8ab8c95 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Katja Marttila <katja.marttila@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>
* | Missed to rename classes and to update docs and tests.Karsten Heimrich2015-09-071-3/+3
| | | | | | | | | | Change-Id: I2d79ab4094cb9706287d44160543c19b35a66c95 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* | Merge remote-tracking branch 'origin/2.0'Kai Koehne2015-08-191-0/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | 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/component.cpp src/libs/kdtools/updatesinfo.cpp Change-Id: I0a1b4a464f7d9008b589b54dd7aed0cac71bd666
| * Fix: .dat file gets deleted after multiple component changes.Karsten Heimrich2015-06-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can close the .dat file in maintenance mode. There is no need to keep it open since no packages are in there and resources are mapped into memory anyway. Fixes commit 7f2c98c8 that updates the .dat file on soft restart. On Windows updating did not work cause the .dat is opened and locked by the OS. To overcome locked files we run a VB script that does a deferred rename once the lock is gone, but in case of a soft restart we now did start several of them depending on the amount of restarts. That had the undesired effect of several replace/rename operations, of which only 2 "succeeded": - First script: Remove .dat | Rename .dat.new -> .dat - Second script: Remove .dat | no .dat anymore... Task-number: QTIFW-689 Change-Id: Ic3ee1b418890eabe5b854dc7879cd7bc118f9240 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Rename files. Remove {kd} prefix. Remove {kdupdater} prefix.Karsten Heimrich2015-07-141-3/+3
| | | | | | | | | | Change-Id: I88c93cab718f4659296d5f7f562beefd747a366f Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Sanitize QDebug outputKai Koehne2015-07-091-2/+2
|/ | | | | | | | | | | | Prefer using the stream operator logic instead of using QString::fromLatin1. Add a noquote() where a QString should be printed without any quotes/escapes. This also fixes the tests with Qt 5.5, where QString's are further escaped. Change-Id: Ie3afd14b9355101d3c0b52f30f66ec759c76526c Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Add more logging categories.Jarek Kobus2015-04-241-8/+9
| | | | | Change-Id: I1c7dabfd16a69ef5a3e5aaa490036de061f1fd13 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Enable logging categories as an installer option.Jarek Kobus2015-04-241-5/+12
| | | | | | | | | | | Now by default all categories are disabled. They get enabled only in verbose mode. Verbose mode enables all categories by default. Categories can be filtered using logging-rules option. Change-Id: I9324826a6e2d7a746e3d7369747fcd31a42b84b6 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Make componentChecker warnings optional.Jarek Kobus2015-04-221-0/+3
| | | | | | | | To enable them export the following environment variable: QT_LOGGING_RULES=ifw.componentChecker=true Change-Id: Ied6744c745ca3fd0840c622c71a8ba30ad22e3d9 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Use local sockets for client-server communicationKai Koehne2015-02-201-3/+4
| | | | | | Change-Id: I12bfef671ab31ae9fb8c4bb02776517e7f434d27 Task-number: QTIFW-228 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Update CopyrightKai Koehne2015-02-181-7/+7
| | | | | Change-Id: I8dde6629cfd461104364d5cdc255cb54b58283fa Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* Fix use --startclient argumentsKai Koehne2015-02-021-1/+1
| | | | | | | | | So far the arguments to --startclient have been ignored. Change-Id: Ib76b061381a9320e6e4e9e2e970132c2f614aca7 GPush-Base: 92da4093e32040cb7cd7ed5587de78262d825e65 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Fix loading of translationsJarek Kobus2015-01-261-22/+15
| | | | | | | | | | In case we hit the English translation just try to load it and break in any case. In case we hit another language we only install the translation if the qt translation was loaded properly, and break. Change-Id: I2755501c1af8cb51b38cf21e0205bcf05541fb91 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* rename CreateOfflineRepository to CreateLocalRepositoryChristoph Vogtländer2015-01-081-2/+2
| | | | | Change-Id: I36d7a504b27dfff8b9d10c9d90b6ff77108b9982 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* Remove country from most translationsKai Koehne2015-01-061-1/+1
| | | | | | | | | | | | | | | If we provide an en_us translation only this won't be picked up by users having configured 'en', or 'en_uk'. This also mirrors the naming of the qt translations. The exception is zh_CN though, because the difference between simplified and traditional characters is big. I'm not sure whether taiwanese people would rather prefer traditional characters or english. For Qt we have both zh_CN and zh_TW, maybe we will get a zh_TW in the future too... Change-Id: I73490337aef8f54da14b6feca3a035e1e405d65b Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* Add CreateOfflineRepository configuration optionChristoph Vogtländer2014-12-111-1/+2
| | | | | | | | | | Setting CreateOfflineRepository to "true" in config.xml will create a local offline repository, same functionality as "--create-offline-repository" command line option Change-Id: I51b947157ebc27800b1e9ad0b55d139ac6e164b2 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Add possibility to specify a control script.kh2014-12-101-0/+3
| | | | | | | | | | | | | Right now we support control scripts just as command line argument, but now we can also bundle it in the binary as well. This helps e.g. with running scripts during uninstallation, enables the possibility to modify the introduction page or enables headless installer builds. Task-number: QTIFW-495 Task-number: QTIFW-166 Change-Id: I6fee6a55db78ed28b1eeb8257a4febaa2703c04e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Implement a way to start the server in debug mode and API cleanup.kh2014-11-261-4/+17
| | | | | | | | | | | | 1; Passing debug as first argument to the starting server does not start the server side so the server keeps running in an endless loop. This makes it far easier to attach a debugger. 2; API cleanup and unify init function to take port, key, and mode. The address was never able to be changed anyway, so stop passing them around. Change-Id: I2a847f009ed1557a5e136e2b0006de5c62426da2 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Expose real type of PackageManagerProxyFactoryKai Koehne2014-11-181-0/+1
| | | | | | | This allows us to store proxy settings in the factory later on. Change-Id: Ib389ccffb3163be4f5cd511be4c4b8bbe15e8a93 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Make sure we do not fail if we can't create the lock file.kh12014-11-121-8/+13
| | | | | | | | | | | If we can't lock the file (possible missing privileges to create and lock it), we now check the running processes before we fail. Task-number: QTIFW-566 Change-Id: I821ccf8c37d6a235df49e060c59a0283bb91261c Reviewed-by: Takayuki ORITO Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Niels Weber <niels.weber@digia.com>
* Rewrite the isRunning implementation and remove private class.kh12014-11-121-2/+2
| | | | | | | | | | Use a more descriptive enum name. On Windows keep the lower case version of the process name instead of calling toLower() several times. Print a warning if we cannot obtain or release the lock. Change-Id: Iaaefae0359cd214290f62ce78677cb343da8823c Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Niels Weber <niels.weber@digia.com>
* Implement package filtering for online and offline installer.kh12014-10-301-6/+7
| | | | | | Change-Id: If17725c0d97111aff67bcc0bc060fb74bb1109cd Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Niels Weber <niels.weber@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-11/+5
| | | | | | | | | | | | | | 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>
* Fix some std::cout usage.kh12014-09-051-9/+6
| | | | | | | Fixes missing timestamps and some propably wrong conversion. Change-Id: I6106e1ea61d0840d132dd3b44cd746f023e795af Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Split and implement new installer base, update checker.kh12014-09-041-350/+196
| | | | | | | | | | | | | 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>
* Fix listing of resourcesKai Koehne2014-08-271-1/+1
| | | | | | | In commit 6466dbd11190 the list iterator advances two times in one go. Change-Id: I24aae53b764732b04159261921365c99518ee3e9 Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* Make listing of resources less verboseKai Koehne2014-08-271-10/+9
| | | | | | | Print the resources only once, and hide Qt internal resource paths. Change-Id: I4fce72424b4ab94d44d63e16b6ae89cff7ccac72 Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* Fix Typo resulting in wrong error messageNiels Weber2014-07-171-1/+1
| | | | | Change-Id: I62e91bcb3bfe73ea0d23f6cdf6938af10fffd8cc Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* Move class BinaryContent into its own file.kh12014-07-151-1/+1
| | | | | | | Prepare for QTIFW-292 and QTIFW-345. Change-Id: I938b5aa728e8f81eb9521df5753ad80ac630d96e Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* Move updater class into sdk binary and rename to UpdateChecker.kh12014-07-151-23/+8
| | | | | | | | | | | | | Remove some now superfluous methods from binary format. Adjust initializing some objects as we need them not earlier. Unify implementation of accessing the right binary to read the content from. UpdateChecker does now have its own run checker, makes it possible to run the binary even if a e.g. maintenace tool is already running. Change-Id: I94f32f7f38b62b5aee433753abc2fe72e879ddc9 Reviewed-by: Niels Weber <niels.weber@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Adjust parsing the arguments, we now only need them for the parser.kh12014-07-141-7/+5
| | | | | Change-Id: Ibf4ee8358f7eb75854c8b6ca9be25b1288eb045d Reviewed-by: Niels Weber <niels.weber@digia.com>