summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix incorrect ScriptLoadingFailed enumerator scope resolutionArttu Tarkiainen2020-03-021-1/+1
| | | | | | | This was causing problems while building with msvc2013. Change-Id: Idd6b3b4c55d2cedb946b22db75d95222d37fe64b Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add command line option to disable checking of free space on target3.2.2-rcArttu Tarkiainen2020-02-278-89/+120
| | | | | | | | | | Also move functionality to PackageManagerCore::checkAvailableSpace() for more convenient later usage, if we want to use this without starting the Wizard GUI. Task-number: QTIFW-1602 Change-Id: I4f2d3cc78bc542475fe9c51b9364b1b221098e4a Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix EnvironmentVariableOp undo behavior with non-persistent variablesArttu Tarkiainen2020-02-031-1/+1
| | | | | | | | | | | | | | The return value for undoOperation() was incorrect when dealing with non-persistent variable, causing an empty installer error dialog to appear if the current env does not contain exactly same variable value as on installation. The return value inside !isPersistent condition scope should always be true regardless of if the temporary variable set on installation still exists on current environment or contains the same value. Change-Id: If7deaa310d73a371194138fa1e2c382614452e26 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix building against Qt 5.14 and newerJoni Poikelin2020-02-032-0/+5
| | | | | | | Fixes: QTIFW-1526 Change-Id: I085dd8b2818f26058432d165a1250b3ac67e1dda Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix QWizardPage title colorKatja Marttila2020-01-141-5/+3
| | | | | | | | | | Title color can be given in config.xml with tag TitleColor. If tag is not set, set title color to empty string so correct default title color is used from palette. Task-number: QTIFW-1557 Change-Id: Ic0c808127203c1a70f8183627ac846229223076c Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Documentation fixesKatja Marttila2019-12-1714-34/+250
| | | | | Change-Id: Ibffb5470d374c8d612791f48c951deddd00f3121 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Do not show error dialog when filelist for uninstall not found3.2.0Katja Marttila2019-12-121-4/+5
| | | | | | | | | This error can occur for example when user has manually deleted the installerResource folder or files inside it or the same component has been installed multiple times (QTIFW-1502). Change-Id: I8007a2f99517b4f90902ed3b740027d54371d119 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Revert "Fix addDependency functionality"Katja Marttila2019-11-281-8/+0
| | | | | | | | | This reverts commit 7dd35b336fbaa78e5f3b347c5e1875743d146fb0. Reason for revert: Change was causing a recursion error. Change-Id: I273a92fbb3292f33d5e0860085102f6e5cc90e13 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Fix progressbar length in component selection pageKatja Marttila2019-11-282-62/+47
| | | | | | | | | | | Also use QStackedLayout to transform between treeview and progressbar views. This simplifies the code as we hide the treeview, categories etc. and show progressbar instead when we are fetching a new category. QStackedLayout makes it easier as we then don't have to hide/show individual widgets we want to show. Change-Id: I405030e9629052c5ca773a91bc44b66d3d26e137 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Add function for reading separate data files in ExtractArchiveOperationArttu Tarkiainen2019-11-262-25/+53
| | | | | | | | | Split reading of data files into its own public function so this can be used elsewhere if needed. Also move deleting of the data file into its own function. Change-Id: I63f758be8863c8a19069c97d726dc573bf240484 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add early prompt to run MaintenanceTool as admin when neededArttu Tarkiainen2019-11-141-1/+17
| | | | | | | | | | | | Currently IFW does not support manipulating Windows Access Control Lists for files. If a user does not have reading permissions to installer.dat it will throw error on QInstaller::openForRead() before the wizard GUI is shown. At very least, add a MessageBox to prompt the user to run the executable again as administrator in such a case. Task-number: QTIFW-1392 Change-Id: I9e20c34b215ee697118af9c15a7e344f9cfc3c3f Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix file deletion when canceling installationKatja Marttila2019-11-131-5/+5
| | | | | | | Task-number: QTIFW-1466 Change-Id: I2b9f000cddc63e9eccefb3d86f93ab05a5631581 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Enable QInstaller::setDefaultFilePermissions() also on WindowsArttu Tarkiainen2019-11-011-6/+2
| | | | | | | | | | | | | | In some cases, for example in CreateLocalRepository files may be left with legacy read-only flag on Windows. Even though the permission entries in its Access Control List are sane, this will block all writing operations to the file. Enable setDefaultFilePermissions() on Windows as this will unset the read-only flag if it is set. This still does not affect ACLs. Task-number: QTIFW-1464 Change-Id: I95399e7cb83cb136ef1c978a05f79b6a6790b7e4 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Fix extracted files list formation in ExtractArchive operationArttu Tarkiainen2019-11-013-21/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | In ExtractArchive, the ConnectionType used to connect signal 'currentFileChanged' to slot 'fileFinished' was changed to Qt::AutoConnection in c8de51cadbc5855ca1e77d038d7f09bf60d059ee, rather than using Qt::DirectConnection explicitly. Now the connection type defaults to queued as the sender and receiver live on a different thread. This seems to cause an issue where the slot function is not invoked for every emitted 'currentFileChanged' signal before returning from ExtractArchiveOperation::performOperation(). This can happen randomly on some installer runs, leaving entries out from ExtractArchive's "files" list for some components. The list formation works fine with Qt::DirectConnection, however reverting to this behavior might be a bad practice as it leaves 'fileFinished' vulnerable to accidental calls from another thread if we change the behavior in the future. Rather move the extracted files list formation to ExtractArchiveOperation::Callback like we already do for backup files. Task-number: QTIFW-1239 Change-Id: I7dbe73abefe00814e8652432d8abdbcaa83e0bac Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Initialize 'EssentialUpdate found' -variableKatja Marttila2019-10-311-0/+2
| | | | | | | | This caused interesting install experiences as EssentialUpdate was handled although no such packages were found. Change-Id: I35bb3e1b76ed14d1e8a45cee085916b3689f0dd1 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Decrease the dat file file sizeKatja Marttila2019-10-312-3/+82
| | | | | | | | | | Write the filename list to a separate file and only the name of the separate file is in .dat file. This has significant effect on the .dat file size and it also decreases the restart/start time of maintenancetool. Task-number: QTIFW-1448 Change-Id: If03ce1bb91754acfb4e7dd74434f22a6e3fa2554 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Use grid layout in component selection pageKatja Marttila2019-10-302-10/+14
| | | | | | | | | | The layout in component selection page looked bad, especially in macOS with dark mode as the widgets were not aligned properly vertically. Task-number: QTIFW-1334 Change-Id: I718b7eaded78906027ce227671e955afda50c264 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* Fix addDependency functionalityKatja Marttila2019-10-211-0/+8
| | | | | | | | | | | | addDependency was acting weird - if a subcomponent was added as dependency, the parent was not installed. It was installed the next time the installer was launched and something else was added/removed. addDependency should behave the same as when selecting the component from UI - it should install the parents too Task-number: QTIFW-1458 Change-Id: I21726ad6acda3b1fb382263405754c2d682dea76 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Fix --no-proxy option in WindowsKatja Marttila2019-10-141-5/+5
| | | | | | Task-number: QTIFW-1445 Change-Id: Iad02ecda0d5b27c3c9719f7c57e090d53a249be6 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Fix env variable remove on WindowsJohanna Äijälä2019-10-111-2/+12
| | | | | | | | | | | | | | | | | | | | Removing env variable failed on uninstallation on Windows if the env variable value had @TargetDir@ in path. File separators got changed from Windows style to unix style. Update documentation to inform users to use '\\' as separators when setting a path as environment variable. Tested with following values (component.addElevatedOperation(...) in components.qs): "@TargetDir@\\lib\\system\\qtplugins" "not_a_path_but_variable_with_slash_\\qtplugins" "not_a_path_but_variable_with_slash_/qtplugins" "%SystemRoot%\\lib\\system\\qtplugins" "12345" Task-number: QTIFW-1148 Change-Id: Iaa48d890e70afdbe56bbf389dd4994d5ae91b316 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix essential package updateKatja Marttila2019-10-111-0/+12
| | | | | | | | | | | | | | If there was essential update available and autodependency to already installed packages, the component containing autodependency was installed. If there was a Replaces at the same time, the Replaces was ignored. If there is an essential update, no other components should be installed nor updated except essentials and the components that have autodependency to essential component. Task-number: QTIFW-1215 Change-Id: Ib782335f98b6af6ec546aeecb9b032cf84254256 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Fix CreateLink operation destination string formatting on WindowsArttu Tarkiainen2019-10-101-4/+7
| | | | | | | | | | | - Fix string formatting syntax in createJunction() method. - Calculate destination directory string length in bytes rather than characters count. - Make minor alterations to operation usage documentation. Task-number: QTIFW-1443 Change-Id: Ia7f6525c865a3e8a6da5376059111c1ef87353ac Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Hide scrollarea background while fetching categoriesKatja Marttila2019-09-241-1/+1
| | | | | | | | | | | Previously we only hide the label inside the scroll area while fetching categories, which works if the scrollarea has no background. In macOS there is a background color in the scrollarea by default so hide the scrollarea instead of the label to prevent the scrollarea colored background to be visible. Change-Id: I2ddc97f7ae9a268b8972c91ab6519381fe7b689c Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* macOS: Fix widget overlapping in componentselection page in macOS 10.12Katja Marttila2019-09-241-0/+5
| | | | | | | | | | | In componentselection page, calling setVisible(false) does not work in macOS 10.12 causing the treeview to be partly visible under the progressbar. Added repaint() call to cause immediate redraw to widget to fix the issue. Task-number: QTIFW-1437 Change-Id: I854d439908b8d8cd0f81076fced07a4d2d4bb6f2 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Refactor setting and checking of file permissionsArttu Tarkiainen2019-08-3010-43/+73
| | | | | | | | | | | | | | | | | | | | | | | Create methods to explicitly set default file permissions on Unix platforms, use these on installer created files and installation target directory. Add unit test for introduced functions. Remove method introduced in 46aecc23b2983c807ff2232ae9cb9651b4d2fdc2 as the same effect is achieved more efficiently by ensuring target directory will be written with explicit permissions on initial installation. Unlike the removed method, this will also not break if an installed component contains owner non-writable directories. Further simplify PackageManagerCore::directoryWritable() introduced in 89f772f819178ee2502768c3d259d22ecb910fbe. Remove orphan unit test for removed PackageManagerCore::subdirectoriesWritable(). This does not change permissions of files and directories extracted for installed components. Task-number: QTIFW-1412 Change-Id: I59698c78aceef874b1f79482bff5a618b9a1b536 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix maintenance tool source translations to match the actual stringsAndy Shaw2019-08-237-28/+28
| | | | | Change-Id: If4f87a6d14450a74151b610e0da54ef3a82712fd Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Enable support for Qt 5.12 in installer frameworkArttu Tarkiainen2019-08-229-10/+86
| | | | | | | | | | | | | | | | | Workaround issues of IFW not being able to work on elevated mode caused by changes in qtbase, namely when initializing socket connection between remote installer client and server, and writing maintenance tool binary. Switch to using unbuffered mode for QFSFileEngine instances as buffered mode support has been dropped. Fix calls to QFile::copy() when running elevated installer process. Make minor modifications for unit tests to pass. Explicitly fail and return when performing CreateLocalRepositoryOperation on non-owned directory. Task-number: QTIFW-1312 Change-Id: I3db72547ee95c87d8c02d27e5b31c7b30e793431 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Update usage of Apple-related terminologyArttu Tarkiainen2019-08-1613-36/+36
| | | | | | | | | | | 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>
* Add IFW version information to installerbase binary on WindowsArttu Tarkiainen2019-08-151-0/+18
| | | | | | | | | | | Add Windows VERSIONINFO resource definition to installerbase.rc so we can link the installerbase executable with file version property. Created installers using this base binary will include the set version property. Task-number: QTIFW-1397 Change-Id: Ie7781bf65c6032c01bb0bac9e945c665e81973d9 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix Mkdir undo operation fail to remove directory in Settings operationArttu Tarkiainen2019-08-151-1/+1
| | | | | | | | | | | | | | | | | Related to 0a842140f5d7cc7383c5266acbbc74428dd82014. MkdirOperation object instantiated in SettingsOperation::undoOperation() doesn't have reference to PackageManagerCore instance. As such, replacing @RELOCATABLE_PATH@ with targetDir value can't be done and the created settings file path, being invalid, doesn't get removed. Pass reference of the package manager core which the Settings operation belongs to, to MkdirOperation object, so @RELOCATABLE_PATH@ will be replaced with core's targetDir value. Task-number: QTIFW-1365 Change-Id: I327d8a63320ecec0e1d51fe7ed899d236fbd21e2 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Update repository categories on server authentication requestArttu Tarkiainen2019-08-155-9/+54
| | | | | | | | | | | | | | | | If repositories in a category were located on a server that requires user authentication, IFW couldn't update information of the repositories inside a category during runtime. This prevents for example storing credentials from the authentication request dialog and blocks the usage of that category. Add a method for updating contents in repository categories and a unit test for the new method. Also some minor tweaks to relevant bits of code. Task-number: QTIFW-1358 Change-Id: Idfa2559df6d0d2a6de428b8d5fb1f7672aa1e300 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix recalculation of components to install in MaintenanceToolArttu Tarkiainen2019-08-153-0/+13
| | | | | | | | | | | | | | | | In MaintenanceTool, navigating back and forth in "Update" and "Add or remove components" doesn't cause update in components to install and uninstall information. Without changing component model's state by checking/unchecking components the recalculating is not done and performing the opposite maintainer action causes unintended results. Make IFW recalculate components to install when leaving component selection page so InstallerCalculator and UninstallerCalculator's state is correct even without changing the component selection. Task-number: QTIFW-694 Change-Id: I89abd9a1952fe30d1e3ae4012e7a7bac68793a89 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Gain admin rights for writing MaintenanceTool config files if neededArttu Tarkiainen2019-06-145-19/+51
| | | | | | | | | | | | | | | | Running MaintenanceTool from an elevated directory didn't do proper checks for file writing rights when parsing Updates.xml from a repository, for example when a default repository contains actions inside <RepositoryUpdate> tags the MaintenanceTool couldn't write changes to the .ini file immediately. Make MaintenanceTool do proper rights checking when parsing Updates.xml. Create uniform methods for checking directory writing access as it is used on several occasions. Add tests for directory checking methods. Task-number: QTIFW-1363 Change-Id: I6d634ddbd59429e5b98af1d8010e70a71de40f69 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix double condition checkKatja Marttila2019-06-131-1/+1
| | | | | | | Task-number: QTIFW-1082 Change-Id: I47e403444b2932984f0a559613826ca6fa9e41df Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Fix initially deactivated buttons when selecting components to updateArttu Tarkiainen2019-06-111-0/+5
| | | | | | | | | | | When entering component selection page for updates, force checking of component model state change so we can enable or disable relevant component selection buttons right when entering, not after first selection change. Task-number: QTIFW-1320 Change-Id: I86a94b70979f7064618186c539b0b7fc594d1481 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix MaintenanceTool file write permission check on Linux and macOSArttu Tarkiainen2019-06-032-1/+21
| | | | | | | | | | | | | Running the Qt installer on Linux and macOS with sudo will leave the installation target directory and some installation files writable by other users than their owner (root). Make MaintenanceTool check over all subdirectories in the installation directory for write permission so that admin rights can be always requested when needed. Task-number: QTIFW-1324 Change-Id: I9b314853634642b0be1fb3ea7a9164a2d4beb853 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Documentation fixesKatja Marttila2019-05-272-3/+3
| | | | | Change-Id: Ibfb4fd033f8dae23b953f21ebcda40c8325577e1 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Fix installer hang on Windows with empty command prompt window appearingArttu Tarkiainen2019-05-172-6/+10
| | | | | | | | | | | | | | Installer sometimes hangs on Windows with a command prompt window opening and blocking any progress. Hitting enter in this command prompt window causes progress to move forward. This blocks automated execution of tests since it requires manual interaction. parentConsole boolean was not initialized properly, fix logically broken closing actions for console. Task-number: QTIFW-1250 Change-Id: I062c0491c16c26e9435022d79f99240bf59e1a79 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Update Russian translationKatja Marttila2019-05-171-4/+4
| | | | | | | Change-Id: Ic8edbbd34b048d4d7b4fd034b0dddfa1e73ef8a1 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Improve strings in the Select Components pageKavindra Palaraja2019-05-132-2/+2
| | | | | | | | Task-number: QTIFW-1334 Change-Id: I4ed13fd066c98e1716f3358cffef85e160a3324a Reviewed-by: Vladimir Minenko <vladimir.minenko@pelagicore.com> Reviewed-by: Tino Pyssysalo <tino.pyssysalo@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Enable links and text selection in component description fieldsArttu Tarkiainen2019-05-071-2/+11
| | | | | | | | | | | External links can now be included in component description by specifying a proper URL address like this: {external-link}='https://www.qt.io/'. The link fields can be placed anywhere inside package <Description> tags. Task-number: QTIFW-1292 Change-Id: I1d916a58224bdfb6e885445873bf541fad3cf834 Reviewed-by: Tarja Sundqvist <tarja.sundqvist@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Pass -sort-contexts when calling lconvert to keep the order for smaller diffsAndy Shaw2019-05-031-2/+3
| | | | | Change-Id: I4634d54b9bbf0d762a7274ae482f480baed6c0d2 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add fetch to the same pane with package categoriesArttu Tarkiainen2019-05-021-1/+1
| | | | | | | Task-number: QTIFW-1284 Change-Id: Idfd81c3beb60a4dd3b6e8523c219823477eaeeb4 Reviewed-by: Janne Anttila <janne.anttila@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Maintenance Tool: Change text in Select Components view when selection of ↵Arttu Tarkiainen2019-05-024-4/+26
| | | | | | | | | components is not possible Task-number: QTIFW-1241 Change-Id: Ib3e67e26b5fd4cf856c4b95f7fe542484e4955ff Reviewed-by: Janne Anttila <janne.anttila@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix long description texts not properly shown by enabling scrollingArttu Tarkiainen2019-05-022-3/+11
| | | | | | | Task-number: QTIFW-1308 Change-Id: I9b20d4a4c4e169bb6b523bbf53da6fb5053ae578 Reviewed-by: Janne Anttila <janne.anttila@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix install button string having a font name in French translationKatja Marttila2019-05-021-2/+2
| | | | | | Task-number: QTIFW-1333 Change-Id: Ia1b055aa0360885d6ab9b3c0aa0fc7930521e040 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Fix maintenancetool sizeKatja Marttila2019-04-231-0/+4
| | | | | | Task-number: QTIFW-1322 Change-Id: Ibab81f97f2a114b5b55d24deb0f013657e17fc39 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Update Russian translationSergey Belyashov2019-04-171-42/+76
| | | | | | | Change-Id: I36d329b7c8742133fe62cfc250e53a71ac25d069 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: olesya gerasimenko <gammaray@basealt.ru> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Fix components shown in categories3.1.0-rc3.1.0Katja Marttila2019-04-011-4/+25
| | | | | | | | | | | | If same repository was included in several different categories, and the categories were fetched in the same time, the components were shown only in one of the categories. Fixed so that once the repository is downloaded, the related meta is included to all categories. This also speeds up other category download times. Task-id: QTIFW-1314 Change-Id: I0d890a52dee15a9bde11383f608f547a32b99ee7 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Rename variablesKatja Marttila2019-04-014-15/+15
| | | | | | | | We have named 'archive' to 'category' ages ago, rename the remaining variables accordingly. Change-Id: I3f723d3e7014c264e2a4db21c434708691a1038e Reviewed-by: Antti Kokko <antti.kokko@qt.io>