summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/packagemanagercore_p.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Fix errors when running updates in a directory requiring elevationKai Koehne2015-08-201-2/+1
| | | | | | | | | | | | | | isWritable() is not a reliable way to check for permissions on Windows. Instead, just try to create a file. The alternative would be to set the magic qt_ntfs_permission_lookup variable to 1. Anyhow, this might slow down things and cause other regressions ... Task-number: QTIFW-746 Change-Id: I1b5637670bfcfe29966f0545ce2c6b1f663a9738 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Fix maintenance tool upgrade on OSX.Karsten Heimrich2015-06-031-0/+9
| | | | | | | | | Before rename we need to delete a possible existing file, otherwise it will fail and the installation is messed up. Change-Id: I6ade434f828f11b38c00b52eabeb1c574557ec5a Reviewed-by: Jonathan Courtois <jonathan.courtois@gmail.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Enable logging categories as an installer option.Jarek Kobus2015-04-241-1/+2
| | | | | | | | | | | 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-1/+1
| | | | | | | | 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>
* Move the component checker after installer calculator.Jarek Kobus2015-04-151-4/+5
| | | | | | | In this way we first check for errors, then check for warnings. Change-Id: I3993498c9c517e7900d789fc0f04c59f9c150e14 Reviewed-by: Kai Koehne <kai.koehne@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>
* Update CopyrightKai Koehne2015-02-181-7/+7
| | | | | Change-Id: I8dde6629cfd461104364d5cdc255cb54b58283fa Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* Fix could not write installer configuration file.kh2015-02-041-4/+5
| | | | | | | | Task-number: QTIFW-621 Change-Id: Iad160efc3c9123476d0fd0d676a0ce751025778a Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Christoph Vogtländer <c.vogtlaender@sigma-surface-science.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* CreateLocalRepository doesn't work on OS X.kh2015-02-041-2/+12
| | | | | | Task-number: QTIFW-622 Change-Id: I0a370801f605a43739ed660afcfe6a4c03f082dc Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Show size in "Programs and Features"Christoph Vogtländer2015-02-031-1/+17
| | | | | | | | | | | 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>
* Use a UUID as uninstall registry subkeyChristoph Vogtländer2015-01-231-5/+9
| | | | | | | Change-Id: I365e3bdf529bed7bff526b772d9dec5260d71ba4 Task-Id: QTIFW-615 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* no longer use Version as the repository format versionChristoph Vogtländer2015-01-201-6/+7
| | | | | | | | | | | | Use the Version value defined in config.xml as the product version exclusively instead of sometimes using it as the repository format version in components.xml (which must be 1.0.0) and sometimes as the product version. Change-Id: I63864947bf131ac6e246a2aaf6febdda0555c13d Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Delete components only after they have been removed from the listsKai Koehne2015-01-201-4/+6
| | | | | | | | | | | | | | This fixes a crash when a component destructor e.g. tries to unregister a widget: This might lead to the creation of a new scripting engine, which then tries to register all components into the engine, including components that have already been deleted ... Avoid this by first cleaning the lists, and then doing the actual deletion. Task-number: QTIFW-612 Change-Id: I708a1ade3b3cc15006eefe394c2d81bf47ebe754 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* Introduce InstallAction property for componentjkobus2015-01-191-1/+3
| | | | | | | | | | Fixes calculation of component size inside maintenance tool. Don't manipulate check state of components while calculating dependencies. Prepare feature: live preview of dependencies. Change-Id: I0485df8383bc9149a996456e09878fc5676bb27b Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Add ComponentChecker class for verifying the internal state.jkobus2014-12-011-0/+5
| | | | | Change-Id: I3361ad6c51d5a0f3beee049237e6b370d57a8f0d Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* Implement a way to start the server in debug mode and API cleanup.kh2014-11-261-12/+0
| | | | | | | | | | | | 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>
* Fix crash experienced while closing the application.kh2014-11-241-2/+0
| | | | | | | | | | | | Signal the keep alive object that we are going to shutdown. This needs to be done because the parent object is a global static and the order of destruction is unknown. The revised code of KeepAliveObject::start() method fixes one of several warnings ("QSocketNotifier: socket notifiers cannot be {enabled/disabled} from another thread"). Change-Id: I68e2d507e697a5d94bdc73f016601affc9913846 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Use written localhost address, adapt code.kh2014-11-241-1/+2
| | | | | | | | | Use the default address throughout the whole code. Instead of relying on the QHostAddress::SpecialAddress enum, use the full qualified and more descriptive address of localhost. Change-Id: I64b3459245682532f84306703e29ac276d4e468d Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Small cosmetical changes, no functional.karsten.heimrich@theqtcompany.com2014-11-211-1/+0
| | | | | Change-Id: Ic984503444187dfcfcfa83f82768bebb329381d0 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* Fix maintenance tool permissionsNiels Weber2014-11-191-4/+8
| | | | | | | | | | When starting the installer as a user and installing into a directory requiring admin rights, the maintenance tool was missing the x flags after installation. Task-number: QTIFW-577 Change-Id: I1dea55704454ddf8e62590a3cb51cf92ca07706e Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Fix uninstall after installing into a target with elevated permissions.kh12014-11-171-2/+3
| | | | | | | | | | | | | | | | We wrongly did check the binary for write permissions, which we actually had. Still we would bring the elevation dialog up and request permissions, though only because the mkdir operation had to perform its undo elevated as it created the installation directory. On Windows the maintenance tool is locked until it is shutdown, so the operation did not perform a full undo and the permissions got dropped again. Then the VB script (which -does- the actual delete) was setup and launched but without elevation and thus failed also to remove the maintenance tool. Task-number: QTIFW-479 Task-number: QTIFW-447 Change-Id: I08e9757b34713f73472acde5d1b0f6e140c601e2 Reviewed-by: Niels Weber <niels.weber@digia.com>
* Cleanup.kh12014-11-141-36/+30
| | | | | | Change-Id: I8ff39425001644a4a539097b76dba121da26407b Reviewed-by: Niels Weber <niels.weber@digia.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Do not read the internal ini file through the wrapper class.kh12014-11-111-1/+1
| | | | | | | | | | | | If the remote server is running and we are connected, it tries to read the value on the remote side, though since no resources are mapped the return value is undefined. Fixes for example installations into %PROGRAMFILES% on windows. Change-Id: I6e3c20c9a8bc00270cbdda36142b74570dad14ec Reviewed-by: Christoph Vogtländer <c.vogtlaender@sigma-surface-science.com> Reviewed-by: Niels Weber <niels.weber@digia.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Check if all dependencies are met just after downloading packagesjkobus2014-11-071-0/+15
| | | | | | | Change-Id: I4435f7f21987cb9783825f5e6affc72edf33fae2 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com> Reviewed-by: Niels Weber <niels.weber@digia.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Fix annoying warning printed during installation.kh12014-10-301-2/+6
| | | | | | | | | | | | Make the Error class to not inherit from runtime error, there's no reason to do so. Add empty ctor to avoid dumping the error message at least once. Check if a .dat file exists and only then print warning. Change-Id: I97833947022e05ee3b14992c8ec662874fb5d343 Reviewed-by: Christoph Vogtländer <c.vogtlaender@sigma-surface-science.com> 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-0/+1
| | | | | | 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-1/+1
| | | | | | | | | | | | | | 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>
* Move the uninstallation calculations into UninstallerCalculatorjkobus2014-10-101-99/+28
| | | | | Change-Id: I1b398815414430c2fab9a5c611b44e3a92c2fb39 Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
* Move InstallerCalculator into its own headerkh12014-10-061-167/+1
| | | | | | | Make it public, so that it can be used outside (e.g. in tests) Change-Id: I2a307dcd6f2eb017f9ac26de06d77deb0d668fbe Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
* Make InstallerCalculator independent on PackageManagerCorePrivatekh12014-10-061-13/+14
| | | | | | | | | | | | Inside PackageManagerCorePrivate: - rename resetComponentsToUserCheckedState() into restoreCheckState() - replace setCheckedState() with storeCheckState(), complementary to restoreCheckState() - call storeCheckState() before calculation of components to install / uninstall Change-Id: I8dde3be75a60ebac2fae5fcde1da1b609dd23256 Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* Cleanupjkobus2014-10-061-34/+43
| | | | | Change-Id: If4799bb75a7a13446238634d9a1f3f017d1dee30 Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
* Remove PackageManagerCore from InstallerCalculatorkh12014-10-061-10/+10
| | | | | Change-Id: Id6e784c77d6f119d4a2aa028d5c14264bf9c457b Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
* Rewrite the component getter mess, remove superfluous methods.kh12014-10-061-9/+7
| | | | | | | | Now we can combine some enum values to achieve the same as before with the several getter functions, removes the clutter from the API. Change-Id: I6368b0ff77821ac95d1defaec4af27dd7d383396 Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
* Simplify missing dependency codeJarek Kobus2014-09-251-6/+4
| | | | | Change-Id: I4ec3037cd7bbaa6c7401985be86dc5ce8d899f46 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Add one common message for recursion errorJarek Kobus2014-09-251-4/+8
| | | | | Change-Id: I82a75bab25e6d0a691f1e3415cccfe43e8145d89 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Differentiate install reason typesJarek Kobus2014-09-251-10/+30
| | | | | Change-Id: I7964721fd0a124f54f9a4315e8b4ba98491fa253 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Move calculation of components into InstallerCalculatorjkobus2014-09-251-130/+153
| | | | | | | | | Move all methods and data involved in process of calculation of components to be installed into the separate class InstallerCalculator. Change-Id: I47ffc94e562b1eec826c9955b62545409a1c7969 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Add rootAndChildComponents() method.jkobus2014-09-251-9/+4
| | | | | Change-Id: I4f7dd4777aafffabcf3e8a6b081478f32b33da97 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Optimization of installReason()jkobus2014-09-111-1/+1
| | | | | Change-Id: I97cc350bbab676b73be86e0ff9f14753a22ea718 Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* Fix auto dependencies for root nodes.jkobus2014-09-101-0/+1
| | | | | | | If root node has auto dependecies set, they will work now too. Change-Id: Idaa06e71b755dab43d7b456bfb90f8faadceeaab Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* Rewrite binary layout read/ write implementation.kh12014-09-041-4/+7
| | | | | | | | | | Move BinaryLayout into its own file. Calculate the segment offsets in place instead of letting the caller do the work. Adjust autotest to match the new behavior. Adjust uses to the new behavior. Change-Id: Iba7a4398bd097f1768c33f0c528efd12b7458541 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Split and implement new installer base, update checker.kh12014-09-041-2/+17
| | | | | | | | | | | | | 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>
* Let the binary layout function find the cookie on its own.kh12014-08-291-8/+4
| | | | | | | | | Saves some ugly looking call convention, as we need to find the cookie anyway, pass the cookie instead of the position. Change-Id: I2227576a8ad251fac5312fc477f8381287b0d36d Reviewed-by: Niels Weber <niels.weber@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Make BinaryFormatEngineHandler a real singleton.kh12014-08-291-2/+2
| | | | | | | | It is really needed only once. Change-Id: I0b2231432541c2781afe55105f88809db4fe19e1 Reviewed-by: Niels Weber <niels.weber@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Remove unneeded status checkjkobus2014-08-291-14/+6
| | | | | | | | Looks like none of the functions invoked in meantime can potentially change the status. Change-Id: I04da950138610c6ab7ad5dc0f0efce589a3815cf Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* Optimize the code in case loadScript == falsejkobus2014-08-281-6/+7
| | | | | Change-Id: I643b57529910d0202389c40d1cb6f7e55bfca5f4 Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* Rename binary format classes and functions. Move to QInstaller.kh12014-08-271-2/+2
| | | | | | | | | | Adjust some minor implementation details. Some renaming of member variables and function names is left out but will follow in later patches. Add some documentation. Change-Id: I929dcbe13fa701be5224b9e5fdf8d19bfff81235 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Niels Weber <niels.weber@digia.com>
* Don't assert in case of missing dependencyjkobus2014-08-271-1/+0
| | | | | | | | | This case is handled anyway, by showing to the user the message in red. Change-Id: I64f75901e4fb4fadba255198f5f391d7c2bc1457 Reviewed-by: Niels Weber <niels.weber@digia.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>