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>
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>
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>
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>
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>
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>
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>
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>
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>
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 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>
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>
On macOS remove the use of obsolete CFBundleGetInfoString, replace with
CFBundleVersion and CFBundleShortVersionString respectively so that the
bundle's properties in Info.plist are up to date and version shows
correctly.
Task-number: QTIFW-1396
Change-Id: Iac03478e266d9d2994ecdf3b229e63976d683ac0
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
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>
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>
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>
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>
Repository categories introduced in IFW 3.1 can cause behavior changes
in older automation scripts that use component selection methods.
Update documentation to include new items on Component Selection Page
and provide an example code for fetching components from a category.
Task-number: QTIFW-1354
Change-Id: Icf93d1325563d3bdf6a38799ab260b13f4078a81
Reviewed-by: Tarja Sundqvist <tarja.sundqvist@qt.io>
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
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>
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>
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>
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>
We have named 'archive' to 'category' ages ago, rename the remaining
variables accordingly.
Change-Id: I3f723d3e7014c264e2a4db21c434708691a1038e
Reviewed-by: Antti Kokko <antti.kokko@qt.io>
Update fails if version number is longer than 32bit int. Fixed so that the
value is converted to 64bit int instead so the int overflow will not happen.
Change-Id: If7ab57e89b155793e9fab3ba5dad9c734adc2234
Fixes: QTIFW-1310
Reviewed-by: Konstantin Podsvirov <konstantin@podsvirov.pro>
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>