summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/packagemanagercoredata.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix wrong ApplicationsDir value on macOSArttu Tarkiainen2022-04-211-1/+3
| | | | | | | | | | | | | | | | | | | This has been already fixed but the change was overwritten by a merge commit. From original commit message: QStandardPaths::standardLocations(QStandardPaths::ApplicationsLocation) first element returns $HOME/Applications, as being user writable it has a higher priority. Change the variable to return system wide /Applications as it is a more expected default. Task-number: QTIFW-1011 Change-Id: Iff4f65450db03ed412d4cb97db5f294bf52ffc72 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Windows: return the value of "TargetDir" variable with '/' as separatorArttu Tarkiainen2021-10-121-1/+1
| | | | | | | Task-number: QTIFW-2344 Change-Id: Ibedcecc82b7a7a28040d0308aa4211925e7fc251 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix values overwritten by maintenancetoolKatja Marttila2021-04-301-5/+15
| | | | | | | | | | | Maintenancetool has saved values, which are loaded after installer has initialized some values, overwriting the installer initial values. Fixed so that only values that are not already set in installer init will be set from maintenancetool ini file. Task-number: QTIFW-2218 Change-Id: Ide6a3f67daec81fe22d6dcde1e95a28f5ed2c53a Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Fix value overwrite from command lineKatja Marttila2021-02-161-42/+50
| | | | | | | | | Key-value pairs given from command line should overwrite all common variables and custom variables saved to maintenancetool.ini Task-number: QTIFW-2021 Change-Id: I1abd8b67e6ae76051a2887965099e00344bc5cc0 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Fix DesktopDir value for AllUsersKatja Marttila2021-02-161-1/+1
| | | | | | | | | Correct value is 'Common Desktop' for AllUsers instead of 'Desktop'. Change-Id: Ice375f56401600e50d126694bbb0a7cc1bb61ad9 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Try rerunning execute operationKatja Marttila2021-02-051-1/+6
| | | | | | | | | | | | | Execute operation can have hard coded paths to program which is executed. In case the program is relocated, UNDO operation will fail as it will not find the program. Implemented new XXXX_OLD value which can be used for overwriting the hardcoded value. In case the program execution fails, program is tried to launch again with the replaced value. Task-number: QTIFW-2125 Change-Id: I446a4c423e53cc4ffc6e5e25617d2400945ac3d9 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Set "FrameworkVersion" in a place consistent with other variablesArttu Tarkiainen2021-01-211-0/+2
| | | | | | | | Also document the predefined variable. Change-Id: I733bd4dfd245d300994e85c9ebb4b34a7c51de45 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add support for generating offline installer from onlineArttu Tarkiainen2021-01-151-2/+3
| | | | | | Task-number: QTIFW-1945 Change-Id: Ic8a076a28385e99ad09cfbccd07c7012d6570639 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add highdpi support for watermark, banner, background and pagelistpixmapsKatja Marttila2021-01-141-4/+4
| | | | | | Task-number: QTIFW-2084 Change-Id: I4047457aae9709819f1a19ec9c74c5a88e9b7e7c Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Allow replacing variants in 'Title'Katja Marttila2020-10-211-1/+1
| | | | | Change-Id: If3c675f0cd76744eee63170f629633b31f7a046a Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Doc: Remove internal classes and structs from generated documentationArttu Tarkiainen2020-09-211-0/+6
| | | | | | | | | | After migration to using 5.12.7 based qdoc, the generated documentation contains also empty declarations for members of undocumented internal classes. Mark them internal as needed. Task-number: QTIFW-1483 Change-Id: Iad40e4efdd098f09a825ce1c8d0aafcc76bd83bf Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Page list widget enhancementsArttu Tarkiainen2020-09-111-0/+1
| | | | | | | | | | | | - Add support for a configurable image shown on top of the page list. - Add missing object names for easier object reference, for example when using stylesheets. - Remove the vertical line separating side widget as this looks particularly ugly on custom styles. Task-number: QTIFW-1939 Change-Id: I16e17e72163068381f54491f7fbe965eb4c5295d Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix shortcut creation when installing from CLIKatja Marttila2020-04-091-2/+2
| | | | | | | | | | | 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>
* Initialize user arguments earlierKatja Marttila2020-04-081-1/+6
| | | | | | | | | | | | | | | 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>
* Update IFW version numberKatja Marttila2019-12-161-0/+5
| | | | | | | | | Also make the predefined variable IFW_VERSION_STR available from xml and qs with @IFW_VERSION_STR@. IFW_VERSION_STR contains the installer framework version and can be set from installerfw.pri. Change-Id: Ifb232d7891b725c9d0d2ba18e691f7e818923432 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Merge remote-tracking branch 'origin/3.1' into masterKatja Marttila2019-08-231-5/+3
|\ | | | | | | Change-Id: I8b203e12283374aed707e0e89c2f73d44ff296cb
| * Update usage of Apple-related terminologyArttu Tarkiainen2019-08-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Change ApplicationsDir variable on macOS to return "/Applications"Arttu Tarkiainen2019-08-161-1/+9
|/ | | | | | | | | | | | | | | QStandardPaths::standardLocations(QStandardPaths::ApplicationsLocation) first element returns $HOME/Applications, as being user writable it has a higher priority. Change the variable to return system wide /Applications as it is a more expected default. Add the user-specific applications directory as its own variable, and make associated documentation changes. Task-number: QTIFW-1011 Change-Id: Ia81a1f5dafdea8665d5f9fc1df3799e59858e5aa Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Replace 0 with nullptrKatja Marttila2019-01-091-1/+1
| | | | | | | Prevents a lot of warnings seen in QtCreator Change-Id: I63bf95aca68a04fc9fd0eecbe29c63e9b9c47efd Reviewed-by: Iikka Eklund <iikka.eklund@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
| * 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>
* | Add the Predefined Variables in Component Scripting.Takayuki ORITO2016-05-031-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add variables - ApplicationsDirX86 - ApplicationsDirX64 Change that the application directory can be selected on Windows, don't depend on the architecture(32bit or 64bit) of QtIFW. For example: When on Windows(64bit version). - QtIFW(32bit version) - ApplicationsDir -> C:\Program Files (x86) - ApplicationsDirX86 -> C:\Program Files (x86) - ApplicationsDirX64 -> C:\Program Files - QtIFW(64bit version) - ApplicationsDir -> C:\Program Files - ApplicationsDirX86 -> C:\Program Files (x86) - ApplicationsDirX64 -> C:\Program Files Change-Id: Idbc41d6f1ba9d7b0b9a9ff5590d05077662345cb Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Niels Weber <niels.weber@qt.io> Reviewed-by: Katja Marttila <katja.marttila@theqtcompany.com>
* | Allow calling installer.setValue() with an empty string as the valueFrerich Raabe2016-02-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calls like installer.setValue("RunProgram", ""); would fail if there was no previous setValue() call which set the variable to a non-empty string. In PackageManagerCoreData, the variables of the installer which are accessible via installer.setValue and installer.value are managed in two data structures: * m_variables contains all variables which were set at runtime, via installer.setValue * m_settings contains all variables as defined in the XML configuration file. When calling installer.value(), it would first consider m_variables and if the given variable name is not in that structure, it falls back to m_settings. What happened for calls like 'installer.setValue("RunProgram", "");' was that the code tries to detect whether the variable already has the specified value -- and only if it doesn't, the variable is set. To test if the variable has the specified value, it would simply check m_variables.value(key) and compare it with the given new value. However, if the key was never set, 'value()' returns an empty string -- which is equal to the new value, and hence PackageManagerCoreData::setValue() returned false. Fix this by first verifying that the given key exists in the m_variables object at all before bothering to check what m_variables.value() returns. Change-Id: I8a2bcb74e52e05f1454945628bcf372445c91a17 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>
* | Make the installation relocatable (with some limitations).Karsten Heimrich2015-07-141-35/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the install path with a constant that's updated while loading the stored configuration and operation values. Dynamic variables now need to be set after reading the .ini file, cause there we store the values we found during installation. Makes an installation relocatable, though with some limitations: * Uninstaller entry might break on Windows * Start menu sortcuts might break on Windows * Everything else written to the system using full path Task-number: QTIFW-653 Change-Id: Ie3255299460d4ad7f18c88de9044c95db10d17ac Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Add constant and make use of it.Karsten Heimrich2015-05-081-1/+1
|/ | | | | | Change-Id: I3d244f112e39a57dfa769bb6a786f62b607d9b3c Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com> Reviewed-by: Christoph Vogtländer <c.vogtlaender@sigma-surface-science.com>
* Update CopyrightKai Koehne2015-02-181-7/+7
| | | | | Change-Id: I8dde6629cfd461104364d5cdc255cb54b58283fa Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* no longer use Version as the repository format versionChristoph Vogtländer2015-01-201-1/+1
| | | | | | | | | | | | 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>
* Don't replace scRunProgram and scRunProgramArguments at the startNiels Weber2014-11-061-2/+0
| | | | | | | | | | | | | We always tried to replace them in the correct place (when clicking finished) anyway. That didn't work as the values were already replaced in the beginning. This could lead to errors when for example @TargetDir@ was used as a value and the user selected a different directory. Task-number: QTIFW-397 Change-Id: I5b5214bdee12f4d8ae6c239a16531e9d722494a0 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@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>
* Replace Q_OS_MAC with Q_OS_OSXNiels Weber2014-07-031-2/+2
| | | | | | | | Q_OS_MAC also refers to iOS. Change-Id: I91603d0add90a0f3948453a6b9628814b0d9f80c Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* Remove check for Q_OS_QWS / QtopiaKai Koehne2014-07-031-2/+0
| | | | | | Change-Id: I778a7a8cc8c504b6ba54a05ad4e476830a5b28bc Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com> Reviewed-by: Niels Weber <niels.weber@digia.com>
* Fix possible case of uninstalling whole windows.kh12014-06-241-8/+2
| | | | | | | | | | | | | | Task-number: QTIFW-511 In case we couldn't read the .dat file or the config file, target dir will return the path the application was started. Now we bail out early if one of the files is missing. Fixes also some outdated code mess when we switched from a single binary maintenance tool to the split binary version. Change-Id: I4c70ac4ca63142873ed1521df47d74331669b576 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Niels Weber <niels.weber@digia.com>
* Cleanup to support Qt5 only.kh12014-06-021-4/+0
| | | | | Change-Id: Ib8f61229ce2f07e52c22a15e10dc817aca860ead Reviewed-by: Niels Weber <niels.weber@digia.com>
* Initialize {All}UserStartMenuDir and DesktopDir earlier.kh12014-04-241-0/+21
| | | | | | | | Task-number: QTIFW-346 Change-Id: I641d6c2eb6b74f674b61ccf335885d4577dfcfe4 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Make the installer binary paths available for scripts.kh12014-04-091-0/+2
| | | | | | | Task-number: QTIFW-424 Change-Id: I36e22323cac9991982f3f85481700c75371eab3a Reviewed-by: Niels Weber <niels.weber@digia.com>
* preprocessor buildfix for MacTim Jenssen2013-11-071-1/+1
| | | | | Change-Id: Iae181f230cf20651fc5820fe54c4ae493cfb67cb Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* Introduce ApplicationsDir variable.kh12013-11-061-0/+20
| | | | | | | Task-number: QTIFW-258 Change-Id: Ie08884c01c62e40104dce0dba8ef85c5194d7207 Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
* Fix target dir for root installations and empty AdminTargetDirKai Koehne2013-10-111-1/+1
| | | | | | | Make sure e.g. '@homeDir@' is replaced also in this case. Change-Id: Ife5b2d88e19abdab8b9264c5db09c1d9b5c13916 Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* Documented two more predefined variables.Niels Weber2013-08-121-0/+2
| | | | | | | | | | Also allow uppercase variable names and document those. Also update the config.xml files in the examples to uppercase. Task-number: QTIFW-257 Change-Id: I446ed4e537cb7c15f49ba3071a9ab6591aab3329 Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* Merge remote-tracking branch 'origin/1.3'Tim Jenssen2013-04-041-1/+1
|\ | | | | | | | | | | | | | | | | Conflicts: installerfw.pri src/libs/installer/settings.cpp tests/auto/installer/settings/tst_settings.cpp Change-Id: Idb89f22fe940a730ed03a7d10f11e1b5fa655b49
| * Add strict and relaxed parsing to Settings class.kh12013-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | * StrictParseMode -> creating binaries and repositories * RelaxedParseMode -> running the installer/updater itself Introduced parse modes to be able to use old settings (existing ones on user systems) with new binaries. Add and adjust autotest. Change-Id: I3f7c7357325661a1197400d8d8dc2a5ca8bed184 Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* | Add banner pixmap to the wizard.Niels Weber2013-03-251-0/+1
| | | | | | | | | | Change-Id: Ic786efe56f0d74740cf23fc5f9b691f88df59d35 Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* | Merge remote-tracking branch 'origin/1.3'Tim Jenssen2013-03-221-3/+2
|\| | | | | | | Change-Id: I89a0518b54836afd97016061bcf000ccf7cdf62f
| * remove the unneeded second Settings objectTim Jenssen2013-03-221-3/+2
| | | | | | | | | | Change-Id: I60bc1dc23b33f11ab43613f5d02071523ce42b46 Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* | Merge remote-tracking branch 'origin/1.3'Tim Jenssen2013-03-181-1/+0
|\| | | | | | | Change-Id: I36a907cf2ee075eace35dcc42317f4202c1f5569
| * Remove LogoSmall as it never did anything anyway.Niels Weber2013-03-181-1/+0
| | | | | | | | | | Change-Id: Ib3f2e2cdc44c06fe8f3c98ce3ddc7c72811eb8da Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>