summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/packagemanagercore.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix the maintenancetool that failing to elevate to adminTakayuki ORITO2018-03-141-3/+4
| | | | | | | | | | | It fails to output logs in ~PackageManagerCore() when using '--checkupdates'. It is installed in 'C:\Program Files (x86)'(needs admin rights). Disable the admin query. Because it does not need the query for checking the updates. Change-Id: I8cbd5823287a23d52c2f1a7f1fae95979314e441 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add documentation for the setValidatorForCustomPage() functionAndy Shaw2017-11-301-0/+6
| | | | | | Change-Id: Id2c52f8a7fa2abbd1ac9de49d597269cb9bed220 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix maintenance tool update with silentUpdateKatja Marttila2017-06-011-5/+23
| | | | | | | | | | | | Maintenance tool is an essential update. Essential updates should be installed before non-essential updates. This change forces essential updates to be installed first. The behavior is same as when updating with visible UI. Task-number: QTIFW-976 Change-Id: I360145821c4e2d1f3384efca641208acb9338d5e Reviewed-by: Antti Kokko <antti.kokko@qt.io> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Fix install corrupt with silentInstallKatja Marttila2017-05-101-0/+15
| | | | | | | | | | | | | If there are updates available for a component that is executable and the executable is running, installer is unable to update the component and results to a corrupted install. Check that there are no processes running from the install tree and cancel update if there are any. The update is canceled if there are processes running even if the process does not get update. Task-number: QTIFW-969 Change-Id: I5614cdd21d8538ccf8b0d114d3616804fe367667 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Fix unnecessary component calculate in silentUpdateKatja Marttila2017-05-021-11/+15
| | | | | | | | If there are no updates available, no need to calculate components to install Change-Id: I95068ef0e062f1745cbe10138407e658befb2c5b Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* Merge remote-tracking branch 'origin/2.0' into 3.0Katja Marttila2017-03-301-0/+1
|\ | | | | | | | | | | | | Conflicts: src/libs/installer/downloadfiletask.cpp Change-Id: Ie4b07c402a63c7a12ecf24e52e197507bbb2c5df
| * Fix installer crash when it contains replaced and replacement componentKarsten Heimrich2017-03-241-11/+12
| | | | | | | | | | | | | | | | | | | | | | Do not execute the component script of a to be replaced component. This make no sense at all, cause in case of installer it is hidden and we can't install it anyway. Task-number: QTIFW-915 Change-Id: Ia0378047b162dafb854dff24e77a113b27885f9d (cherry picked from commit b1ed687f91d9b75e290ebabcb624684f7d177cb1) Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
| * QRegExp include cleanupSamuel Gaist2017-03-131-0/+1
| | | | | | | | | | | | | | This patch adds the missing include statements for QRegExp. Change-Id: I05fed3e83514af895b95a3df746b0ae1e6b31828 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@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>
* | Fix installer crash when it contains replaced and replacement componentKarsten Heimrich2017-01-201-11/+12
| | | | | | | | | | | | | | | | | | | | Do not execute the component script of a to be replaced component. This make no sense at all, cause in case of installer it is hidden and we can't install it anyway. Task-number: QTIFW-915 Change-Id: Ia0378047b162dafb854dff24e77a113b27885f9d Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Fix warning that should not appear on stdoutKarsten Heimrich2017-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If the warning is written to stdout, parsing the output of --checkupdates might fail with invalid XML output. The change log shows that the warning was introduced in 70cc8ce0e1bd2beb15007045b99b26f6c6956206 and shown only in verbose mode, while change 70cc8ce0e1bd2beb15007045b99b26f6c6956206 made it always 'visible'. The later change went in probably without testing the check updates case... Change-Id: I9183089be89e823b4b082a7343885e360d9ad7f4 Reviewed-by: Riho Pihlak <rpihlak@gmail.com> Reviewed-by: Katja Marttila <katja.marttila@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | Introduces new --silentUpdate command line optionKatja Marttila2016-11-151-0/+68
| | | | | | | | | | | | | | | | | | 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-4/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/2.0'Katja Marttila2016-06-211-27/+21
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Doc: Fix PackageManagerCore::ComponentType briefLeena Miettinen2016-05-131-1/+1
| | | | | | | | | | | | | | | | The \enum command \brief commands do not seem to get automatically completed during builds anymore. Change-Id: Id81aa8f3044f6151d6b4d8a441e386deb0ca4844 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
| * Doc: PackageManagerCore::ComponentType is now an enumLeena Miettinen2016-05-131-27/+21
| | | | | | | | | | | | | | Change the documentation accordingly. Change-Id: I2f15bf724558794b66e99eab1120dc2d224600de Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Fix crash when updating admin installation with user/temp repositoryKatja Marttila2016-02-151-1/+10
| | | | | | | | | | | | | | | | Grant permission rights for writing maintenance config file Change-Id: I9364358455b8ad5e98b03c20d949c2562ba2535a Task-number: QTIFW-740 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* | Make usage of authorization fallback optionalSlobodan Vrkacevic2016-05-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Make communication via installer.execute() Unicode safeKarsten Heimrich2016-03-301-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was impossible to pass Unicode data safely to a process started via installer.execute(), or to read Unicode data printed by that process safely back in. The reason for this is that the code hardcoded the latin1 codec for converting between strings used in the script interpreter and bytes used by the QProcessWrapper API. Fix this by adding two new optional arguments to installer.execute() which can be used to define the codec to be used for writing to stdin resp. reading from stdout. This defaults to latin1 for backwards compatibility. Change-Id: I290d8d9617b286ef90b2f0a05c6e7a47f6df317f Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com> Reviewed-by: Frerich Raabe <raabe@froglogic.com>
* | Fixed writing log on Windows if target dir requires admin rightsFrerich Raabe2016-02-151-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Writing the installation log would fail on Windows in case writing to the target directory requires admin privileges. Instead of relying on the VerboseWriter destructor, let the PackageManagerCore destructor explicitly write the installation log. In case using the PlainVerboseWriterOutput does not work, try to use a newly introduced VerboseWriterAdminOutput which first tries to acquire admin privileges before writing a file via RemoteFileEngine. Change-Id: I13f203afa67175012409bc1eed95f05e51cdcb81 Reviewed-by: Katja Marttila <katja.marttila@theqtcompany.com>
* | Merge remote-tracking branch 'origin/2.0'Iikka Eklund2016-01-201-6/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Doc: Remove dubious sentence from installer.calculateComponentsToUninstall()Kai Koehne2016-01-151-2/+2
| | | | | | | | | | | | | | | | The auto-dependencies seems already to be handled correctly in UninstallerCalculator. Change-Id: I30074036aa030399cd49a6bfe2e380ffa1e92c58 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@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>
* | Implemented installer.readFile()Frerich Raabe2015-12-081-0/+28
| | | | | | | | | | | | | | | | | | | | | | For reading an external file using a specific encoding. This is convenient for having installers show the current configuration (e.g. effective license key) in case the configuration is stored in plain files as opposed to using e.g. the Windows registry. Change-Id: I87f8583b4cb192c4bd8b62a03f292a5cbefd52d8 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Fixed occasional crash on Windows when terminating installerFrerich Raabe2015-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The static RemoteClient object (defined in RemoteClient::instance()) which gets destroyed at the very end of the process lifetime would -- as part of its constructor -- execute the RemoteClientPrivate destructor. The RemoteClientPrivate destructor did non-trivial work though, trying to shut down the connection which involves accessing the LocalServer instance. Executing this code at the very end of the process lifetime would sometimes cause a crash on Windows with a back trace into the QMutex guts. Let's fix this by getting more control over the destruction order; the RemoteClient instance is no longer a static object but allocated dynamically. Callers can explicitly call 'destroy' to dispose of the instance as part of their shutdown routine. Change-Id: Ie6773ccc0276ad6285919e57e9ed190bab02be3f Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Fix crash when updating admin installation with user/temp repositoryKatja Marttila2015-10-301-1/+11
| | | | | | | | | | | | | | | | Grant permission rights for writing maintenance config file Change-Id: Ib95fc05b80b95ce952b4bcf2395fbb5ed0ef9153 Task-number: QTIFW-740 Reviewed-by: Karsten Heimrich <karsten.heimrich@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-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Init all components with proper install actionJarek Kobus2015-06-291-1/+1
| | | | | | | | | | | | Task-number: QTIFW-727 Change-Id: Iae9d232310370fefc0c9dca771e6b2cca6b5b433 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Rename files. Remove {kd} prefix. Remove {kdupdater} prefix.Karsten Heimrich2015-07-141-2/+2
| | | | | | | | | | 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>
* | Unify translated error messagesKai Koehne2015-06-241-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | * Enclose file paths in "" * Localize file paths with QDir::toNativeSeparators. * Make sure sentences end with a '.' * Append error details always by ':', e.g. tr("Failed to copy file '%1': %2").(...) * Use 'directory' instead of 'folder' everywhere Change-Id: Ie045f429f72ad5045c96537465c5fb9d2e99d250 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Convert to Qt 5 connect syntaxKai Koehne2015-06-151-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | Convert to new signal/slot syntax where it does not make things more complicated: connections where the signal or slot is an overloaded method, or where the receiver method is not in a QObject, are left alone. The new syntax allows compile-time checking of the connection. Change-Id: I2cc3c93b9812797bd67f64a8728569491eeec668 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Add method to lookup if a product is registered in the factory.Karsten Heimrich2015-06-101-8/+1
| | | | | | | | | | | | | | | | Make use of the new method to search for registered operations. Note: commit 81ad56fdd0afe3baf84ad1fb removed a similar method. Change-Id: Ie698020dae51c9fca962b99333e405a5db342045 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Merge remote-tracking branch 'origin/2.0'Kai Koehne2015-06-041-316/+498
|\| | | | | | | | | | | | | Conflicts: src/libs/installer/packagemanagercore.cpp Change-Id: Ie3d94fe3a633e189c260bf20682c00a2bb901bc8
| * Doc: add docs for PackageManagerCoreLeena Miettinen2015-05-261-316/+498
| | | | | | | | | | | | | | | | | | | | | | Move the scripting API documentation to a separate qdoc file. Where possible (no QDoc errors are generated), only link from the C++ API documentation to the scripting API documentation. Change-Id: I969e9afc5cd45c495e6c517b825abb9a9aabdd82 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Remove scRemoteVersion, it's the same as scVersionJarek Kobus2015-05-071-3/+3
| | | | | | | | | | Change-Id: I552b2f62865ff88fb6827819240b283485d0e4c7 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Remove pseudo static core instance, fixes autotests.Karsten Heimrich2015-05-061-11/+2
| | | | | | | | | | | | | | | | | | | | | | We need the core engine in operations anyway, so pass the pointer to the create function instead of setting it on our own after the operation was created. The only reason to introduce the static was the ~UpdateOperation() destructor, which now can get the value from its internal data instead of using the static instance call. Change-Id: Ide27542837355ec8c642a6687ca02977983f84fa Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Rename classes to reflect their use. Remove typedef.Karsten Heimrich2015-05-061-5/+5
| | | | | | | | | | Change-Id: I5abb64d356a0951671487b60529a0ca26b0909be Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Take over the last used methods from {KD}Application.Karsten Heimrich2015-05-051-0/+19
| | | | | | | | | | Change-Id: I9aaac261bef7aaa48cf0beaee83e15cc5bccd437 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Move the PackagesInfo handling out of {KDUpdater}Application.Karsten Heimrich2015-05-051-6/+5
| | | | | | | | | | | | | | | | | | Do not hide the class behind {KDUpdater}Application, we can use it directly. Also remove unused code from the PackagesInfo class itself. Change-Id: I6876a5887c498aa20fb54e016159223e336d9362 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Merge remote-tracking branch 'origin/2.0'Kai Koehne2015-03-171-1/+6
|\| | | | | | | Change-Id: I3b38821be20c02d41d9db1c5eee78be1502cba6b
| * Doc: add links to topics that describe the namespacesLeena Miettinen2015-03-111-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | In addition to linking to the classes from the top level topic. The namespace topics are generated automatically and list all classes in a namespace with brief descriptions. Add subtitles for listing the classes in each namespace. Change-Id: I0304a86717e018fa3af9f213871f159fdb4ce05c Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
| * Restore original behavior for component.installationRequestedKai Koehne2015-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | component.installationRequested() should return true also for components that are selected through dependencies (after they have been resolved). This restores the original behavior on 1.6. To keep the change minimal the 'new' behavior has been saved in a method isSelectedForInstallation . This should be further refactored in the master branch. Task-number: QTBUG-633 Change-Id: I2cb936a399927252a4ad4dd81f73683fa3c28a01 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Merge remote-tracking branch 'origin/2.0'Kai Koehne2015-02-261-36/+50
|\| | | | | | | Change-Id: I962f4f19909c06e1da03c14072b15f97de02a07d
| * Use local sockets for client-server communicationKai Koehne2015-02-201-2/+2
| | | | | | | | | | | | 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>
| * Doc: fix language and QDoc command issuesLeena Miettinen2015-02-121-17/+22
| | | | | | | | | | | | | | | | To follow the Qt documentation guidelines. Change-Id: I8f533737b39d7d58645a05b033fc966f70918369 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
| * Show size in "Programs and Features"Christoph Vogtländer2015-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | Add size as quint32 to always create a REG_DWORD. Calculate size based on installed packages and meta data instead of using the installer binary file size. Change-Id: Id379aafe885d2785251eecf831cb7d07cc44f3d4 Task-number: QTIFW-616 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>