summaryrefslogtreecommitdiffstats
path: root/src/libs/installer
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Merge remote-tracking branch 'origin/3.0' into master"Katja Marttila2018-12-187-20/+42
|\
| * Merge remote-tracking branch 'origin/3.0' into masterKatja Marttila2018-12-107-20/+42
| |\ | | | | | | | | | Change-Id: I73cb43e090c6ff34f1ceb774490d01818465e2e0
| | * Fix 'Bad allocation' error in Windows3.0.63.0Katja Marttila2018-12-052-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to bug in QTextDocument (QTBUG-65865), installer will crash if it will write a lot of logs to 'Details View' in 'PerformInstallationPage'. Fixed so that instead of writing all extracted filenames to log, write only the name of package which is extracted. This will reduce the huge amount of log written and thus prevents the 'Bad allocation' crash. Task-number: QTIFW-1242 Change-Id: I98ff0df25bcc10d0f7bb79d6c4010665b5e2ac51 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
| | * Remove 'Your install seems to be corrupted' messageboxKatja Marttila2018-11-061-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Messagebox is replaced with log. The critical messagebox is a bit harsh as you can continue using the installer despite of the 'corrupted install' message. 'Your install seems to be corrupted' can happen for number of reasons: the installer for some reason was not able to write the needed information to components.xml or maintenancetool.dat. Reason could be that the installer was forcely interrupted or crashed during write, or the files cannot be opened for write. 'Your install seems to be corrupted' occurs if components.xml contains an element which has no operations in maintenancetool.dat or vice versa. If you get an error "Critical: Operations missing from installed packages ("missing.package.name"), remove the package from components.xml to get rid of the log. Error: "Critical: Orphaned operations("package.name")" you can ignore Or you can install the package again if it is still found from repositories. Task-number: QTIFW-1003 Change-Id: I02c0a945ca3ce30ef4b0a80190d91638ab54c6bf Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
| | * Register virtual component for uninstallKatja Marttila2018-11-062-0/+16
| | | | | | | | | | | | | | | | | | Task-number: QTIFW-1102 Change-Id: I5033f095eece1f1e588c00f518cf7d9d046c2003 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
| | * Optimize ExctractArchiveOperation::fileFinished()Morten Johan Sørvig2018-11-052-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code was spending a lot of time detaching and copying the file list, due to exporting it via the setValue() call on each file finished iteration. This was causing the install process to slow down, and also made the UI freeze, giving the impression that the install process had stopped. Add the file paths to a local list instead, and then call setValue when file extraction is complete. Profiling shows that the installer now spends 95% of its time extracting files on the ExctractArchiveOperation, thread and 5% on the main thread. Fixes: QTBUG-51337 Change-Id: Ieb4c44c03cb28eb46928730ca023f7419d72e45b Reviewed-by: Katja Marttila <katja.marttila@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
| | * Do not reset core data values in restartKatja Marttila2018-10-162-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Remove unused variableKatja Marttila2018-12-182-5/+0
|/ / | | | | | | | | Change-Id: Ie9fc97244b10e821965ac42ce3c9ab3720aa3d00 Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* | Fix wizard's maximum sizeKatja Marttila2018-11-132-0/+10
| | | | | | | | | | | | | | | | | | | | User can set height and width for wizard in config.xml. If the given dimentions does not fit to the screen, wizard was clipped and buttons were of the screen. Fixed so that the screen size cannot be exceeded. Task-number: QTIFW-1016 Change-Id: Iab6970d4203fc1271b93475aec71c946d0508653 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Do not compare empty target to QDir::root() or QDir::home()Katja Marttila2018-10-291-1/+1
| | | | | | | | | | | | | | | | Comparing empty target will cause 'Empty filename passed to function' warning in unix. Change-Id: I2ee1490ef342031703638c201b5e2d6d745a1c98 Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* | Refactor component selection pageKatja Marttila2018-10-235-452/+573
| | | | | | | | | | | | | | | | | | | | | | | | Component selection page has a lot of widgets compared to other pages so moved the implementation to own file. Also fixed the following issues in component selection page: 1. Fixed crash when there were no categories and QBsp button was pressed 2. QBsp button opened multiple dialogs if next/back buttons were pressed 3. Made progressbar use the entire vertical space Change-Id: I30cf1599ecb06a633719622427855a57696d5987 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | Merge remote-tracking branch 'origin/3.0' into masterKatja Marttila2018-10-105-47/+68
|\| | | | | | | Change-Id: Ifaa114464151f5ed84ce47a3368c1521eb17a0be
| * Fix maintenancetool writing in WindowsKatja Marttila2018-10-041-31/+41
| | | | | | | | | | | | | | | | | | | | | | In Windows, maintenancetool is written using vb script. Installer assumed that extension .vbs is always executed with script engine which is not always true. In such cases create own extension (.qtInstaller) which can be run with script engine Task-number: QTIFW-1096 Change-Id: Ic52427e778fc7f3a540256e16b9e67b728c70d41 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
| * Fix performOperation() documentationKatja Marttila2018-09-261-1/+4
| | | | | | | | | | | | | | | | Task-number: QTIFW-1034 Change-Id: I56164e3d5c355bd6a02f9a706b3f375d19d63afb Reviewed-by: Niels Weber <niels.weber@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
| * Fix environment variables for XDG paths not being recognizedRainer Keller2018-09-242-7/+6
| | | | | | | | | | | | | | | | | | | | A QProcessEnvironment was used, which is empty by default. Instead of using QProcessEnvironement::systemEnvironment I switched to qgetenv(...) . Task-number: QTIFW-1043 Change-Id: I0bc31641c8ac175254664c61cdb24bf9051d8345 Reviewed-by: Niels Weber <niels.weber@qt.io>
| * Delete directory if there are readonly filesKatja Marttila2018-09-241-8/+17
| | | | | | | | | | | | | | Task-number:QTIFW-637 Change-Id: I38b947b10517de68aee5619915886c719cd5e2bf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Add objectnames and rename variablesKatja Marttila2018-10-091-34/+37
| | | | | | | | | | | | | | | | | | | | We have decided to rename the archive as category. We already renamed some of the classes etc. but some variable names were still with the old name. Rename those to avoid confusion. Also add some object names so the elements are available using control script. Change-Id: I9ea50805a04acbd982eb742c906100afed86567a Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* | Add signal to inform about unstable componentsKatja Marttila2018-09-275-9/+21
| | | | | | | | | | | | Task-number: QTIFW-1197 Change-Id: If9d7941f4c7bfc478daa83dcd73dfa71c9163561 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Allow maintenancetool signing in WindowsKatja Marttila2018-09-261-23/+11
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Enable usage of categorized repositoriesKatja Marttila2018-09-2614-75/+606
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change allows to categorize repositories in component selection page. Using categorized repositories will by default show only uncagetorized repository items in tree. Selecting one or several categories using checkbox will update the treeview to show all selected categorized repository content. Repository's metadata is fetched only after the category is selected. Categorized repositories can be defined in config.xml: <RepositoryCategories> <RemoteRepositories> <Displayname>category 1</Displayname> <Repository> <Url>(url)</Url></Repository> </RemoteReposiories> ... <RepositoryCategories Change-Id: I6eae9daee70b1afa322144d52c11f25d0b655ebf Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Merge remote-tracking branch 'origin/3.0' into masterKatja Marttila2018-09-174-5/+17
|\| | | | | | | Change-Id: I77d539e079f3c7d61c4a965b222f4e02c35b1108
| * Fix minor translation stringsKatja Marttila2018-09-131-1/+1
| | | | | | | | | | Change-Id: I059903b407a44f07b16af29fb5f0973395ee1f50 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
| * Prepend file:// on Windows when calling QJSEngine::evaluate()Andy Shaw2018-09-101-1/+10
| | | | | | | | | | | | | | | | | | | | Due to a bug reported at QTBUG-70425, it is necessary to ensure that QJSEngine will see the filename passed in as a valid URL. So we prepend file:// for those cases to ensure qsTr() will find the right context when looking for translations. Change-Id: Ib38b1f8467de78ec82c2c6c6909487f3a06c09bb Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Fix admin query retryKatja Marttila2018-09-051-2/+1
| | | | | | | | | | | | Task-number: QTIFW-988 QTIFW-1173 Change-Id: Ie424f4dcb97236015d4287f1b73baee5ec8477b3 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
| * Fix install fail if there is no metadataKatja Marttila2018-06-121-1/+3
| | | | | | | | | | | | | | | | | | | | Installer was never able to continue from metadata download phase in case there was no metadata in any of the packages. If metadata not found, emit finished signal to continue installation. Task-number: QTIFW-1150 Change-Id: I0d3f8fb147899fff4b1a1cc0c6de7a587aae9053 Reviewed-by: Antti Kokko <antti.kokko@qt.io>
| * Reset meta information download resultKatja Marttila2018-06-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | As metadata can be downloaded in chunks, there are extra step counter in UI in case there are more than 1 chunk to be fetched. Reset the counter and result in case e.g. repositories are changed from settings and meta information is retrieved again. Task-number: QTIFW-1137 Change-Id: I1bfe06dc0ba375508efb0b6ebe5edce884310ea8 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* | Fix recursive error when there are unstable componentsKatja Marttila2018-09-141-3/+2
| | | | | | | | | | Change-Id: Iecaf849368904a72bae1a1ca6e51b45cfafb54ef Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Add property to disable default repository savingKatja Marttila2018-09-104-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | By default, all default repositories defined in <RemoteRepositories> are saved to maintenancetool.ini -file. When you start maintenancetool, the repositories are read from maintenancetool.ini and those are used. There are cases when we don't want to use the default repositories when running maintenancetol. Change-Id: I4507e16636f2d709aa099eaa865264800591ce0d Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | Merge remote-tracking branch 'origin/3.0' into masterKatja Marttila2018-06-063-23/+36
|\| | | | | | | Change-Id: Ia00c88061f15fc9c9517b536609ac3260c0df2ef
| * Decrease metadata dowload amountKatja Marttila2018-06-011-12/+26
| | | | | | | | | | | | | | | | | | | | If there are no Script, Translations, Licenses nor UserInterfaces -tags in Updates.xml, there is no metadata. In such case, do not download the empty metadata to decrease the time used in downloading metadata. Task-number: QTIFW-975 Change-Id: I1b81a07b5ad43677e190fb058ece8b06382d215b Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
| * Print component warnings only in verbose modeKatja Marttila2018-05-291-4/+7
| | | | | | | | | | | | | | | | | | | | If there are lot of components, it takes a lot of time to check every component for their errors. Print those only when --verbose given in command line. Task-number: QTIFW-975 Change-Id: If9467416d5d8f3417cd30262f95e91308a79e7a6 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
| * Fix ForcedInstallation components uninstall in deselectAllKatja Marttila2018-05-171-6/+2
| | | | | | | | | | | | | | | | | | We don't need to check the installed() state here as we do it already when preselecting components in the tree Task-number: QTIFW-1142 Change-Id: I3540a02f39ea7b379db6597c75d7fee76cc4caab Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Allow install other components if sha mismatches in metadataKatja Marttila2018-06-046-7/+33
| | | | | | | | | | | | | | | | | | Expanding commit "Add attribute to mark parts of install tree unstable." This change will allow installing other components if some component has sha mismatch. Change-Id: I61202da95dc07ca3f1fe931cfe1fbbb053596f42 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Fix select state for unstable componentsKatja Marttila2018-06-012-4/+14
| | | | | | | | | | | | | | | | | | | | In updater mode, unstable components needs to be unselected so that those won't be updated. In packagemanager mode, installed unstable components needs to be in checked state so that those won't be uninstalled. Change-Id: Ib3d16ae8c0eec4e07731a0082c02fd710ffdb9d6 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Merge remote-tracking branch 'origin/3.0' into masterKatja Marttila2018-05-156-27/+76
|\| | | | | | | Change-Id: I09cacedb966eebc3f42a3402b0b3dc4f6dcd9be8
| * Fix crash in updater if component does not exist anymoreKatja Marttila2018-05-141-4/+3
| | | | | | | | | | | | Task-number: QTIFW-1140 Change-Id: I2038bb04526d6fbc3b35be67777a1096f80568cf Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
| * Fix nested autodependency uninstallKatja Marttila2018-05-033-5/+11
| | | | | | | | | | | | | | | | Previous commit worked only when --show-virtual-components was uses. Task-number: QTIFW-1114 QTBUG-67106 Change-Id: I6d0649a37095b10ec9fd3a079e020f6a70345c94 Reviewed-by: Antti Kokko <antti.kokko@qt.io>
| * Fix nested autodependency uninstallKatja Marttila2018-04-182-5/+17
| | | | | | | | | | | | Task-number: QTIFW-1114 QTBUG-67106 Change-Id: I29cdddaa81657e5fd2b9cbf343e16cc107ce6c18 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
| * Fix build error in MacOSKatja Marttila2018-04-051-1/+2
| | | | | | | | | | | | | | MacOS does not understand ceil, use qCeil instead Change-Id: I075aab60ae7e00336bdd4faf864c3922482401ac Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
| * Fix install fail if there is huge amount of downloadable packagesKatja Marttila2018-04-032-20/+51
| | | | | | | | | | | | | | | | | | | | | | In some machines, installer does not manage to download meta files if there are huge amount of downloadable packages. It seems that QtConcurrent is not always able to handle so many download tasks. Divided the downloadable tasks into size of 1000 to keep the QtConcurrent running. Change-Id: I3ba110e2cc565251e540349a6b073245280a6fbe Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* | Make unstable component text color darkerKatja Marttila2018-04-091-1/+1
| | | | | | | | | | Change-Id: Id4734ea34b910e5abba6743a5e7d73e220e98aea Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* | Add attribute to mark parts of install tree unstableKatja Marttila2018-04-058-12/+101
| | | | | | | | | | | | | | | | | | | | | | | | This commit adds new AllowUnstableComponents configuration. Setting AllowUnstablecomponents to true in config.xml will * allow installing other components when there are errors in scripts * allow installing other components when there are missing dependencies * will mark the 'broken' components uninstallable in treeview Task-number: QTIFW-930 Change-Id: I8d28cf9c4b0401e0bb76795e87d581f39b64f128 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Add findFiles methodKatja Marttila2018-03-262-2/+32
| | | | | | | | | | | | | | Task-number: QTIFW-1094 Change-Id: Ibc37e9b568f7f54e37f6ed6a5b040940cab5aebd Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Merge remote-tracking branch 'origin/3.0' into masterKatja Marttila2018-03-201-3/+4
|\| | | | | | | Change-Id: I601b783a9d2eed009737b2779803457949cbb014
| * 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>
* | Merge remote-tracking branch 'origin/3.0' into masterKatja Marttila2018-02-261-10/+0
|\| | | | | | | Change-Id: Ic74ee1485204e09e2baa384468b581ba0d9c79cd
| * Remove unnecessary warningKatja Marttila2018-02-261-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | Removed unnecessary warning about component specifying both autodependency and dependency to same component. Both of them might be necessary if we need to ensure the install order. Adding the same component as dependency will ensure that the dependency component will be installed first and its scripts run first. Task-number: QTIFW-1022 Change-Id: Id400f1ecf00a4b863ee473218d61a549c6ceb9ca Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* | Merge remote-tracking branch 'origin/3.0' into masterKatja Marttila2018-02-087-38/+95
|\| | | | | | | Change-Id: I8d0c8b9faa9537b50e989ec264ed7bfe8d2e358b
| * Remove http_proxy environment usageKatja Marttila2018-01-251-7/+0
| | | | | | | | | | | | | | | | From Qt 4.8 onwards Qt automatically uses http_proxy environment variable. Change-Id: Ib7b3df96beeed14da86c1b17aa2402a9809f3983 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * Add line number information when throwing an Error regarding the scriptAndy Shaw2018-01-241-2/+3
| | | | | | | | | | Change-Id: I5bc3ca4779ed12d927c3a6a041a81d8e39d5bd1f Reviewed-by: Katja Marttila <katja.marttila@qt.io>