This reverts commit 76fd6e8f2953347ea0bf7a57b643968784bc9acc.
The change caused that two installation files were needed -
one executable and one dat file. Many users did not find it acceptable.
We need to figure out something else.
Change-Id: Ief12cd47f9897cee8a234d8611a5c18296d42b1c
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
This patch introduces support for a new setting 'SupportsModify' in the
config.xml file. This is only relevant for Windows installers.
By default (i.e. when omitting) this setting, it
defaults to 'true' which means that the product supports modifying
(i.e. reconfiguring) an existing installations. As such, the 'Modify'
button show in Windows' list of installed programs will be enabled.
Setting this to 'false' will cause the button to be disabled.
Change-Id: I4105f3f0bce67830aa2ee8ae0e6f6abb25c35b30
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
This change allows you to use relative URLs to update repositories.
Absolute addresses are resolved relative to the current Updates.xml file is parsed.
Documentation added to ifw-updates.html page.
Change-Id: I5935355dfeee2236e9752cc2545c2d42da216f9e
Reviewed-by: Konstantin Podsvirov <konstantin@podsvirov.pro>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Signing was not possible for maintenancetool since metadata was
added to binary. Separated metadata to installer.dat like in OS X.
Task-number: QTIFW-667
Change-Id: I74ef307c51a2f43059475dd943d6f0910925fa86
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
QFile either returns 'Unknown error' or 'No such file or directory'
when trying to use non-existing file. Make settings test
work with both values.
Change-Id: I5245b5ad0cf5b91a7eec61c17315982ce14eecfb
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
When pressing cancel button when testing repositories, the dialog
pops up again and again. Cancel the TestRepository job if cancel
button is pressed.
Change-Id: I48da41a8b791bf04571acd8af4a421b11e0fccc7
Task-number: QTIFW-832
Reviewed-by: Niels Weber <niels.weber@qt.io>
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
This utility function can be used to populate a Qt control which is
backed by some QAbstractItemModel with a list of strings. E.g. this can
be used to populate a QComboBox or any QAbstractItemView with some
items.
This is very useful since in many cases, the methods for adding elements
to such controls are neither slots, nor marked with Q_INVOKABLE and such
unreachable from the script code.
Change-Id: I2195f41e53765ef3a798477ed08d8f09ab5c4379
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
The directory in which the application is stored may not be writable for
the current user, e.g. if the installer is stored on a read-only network
drive, or (common case on OS X) if the installer bundle is started from
a read-only .dmg image.
This fixes warnings in the verbose output (especially noticeable during
unattended installations) like:
[0] Warning: Cannot create lock file "/Volumes/froglogic Squish/Install Squish.app/Contents/MacOS/Squish1234865.lock": Read-only file system
The patch is defensive in that it just uses QDir::tempPath() instead of
going for QTemporaryFile to avoid having to worry about auto-delete
semantics.
Change-Id: Iee2409dd6f884c4fe234057b2926eee82127f985
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Since Qt5.5, QProcess start() needs a program to start.
When using native arguments the program is empty and QProcess will
fail to start. Removed the use of native arguments until
QProcess supports setting program through native arguments.
Task-number: QTIFW-862
Change-Id: Ia56344e1bf82fbd76e4e8f2ae8b6817e4bb2fce1
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
License agreement was hard to read and the title sometimes
needed scrolling. Make the layout vertical so there is more
room for license title and license agreement text.
Change-Id: I46a9d4880b0219a2a92af19a8f17a39ba53faf6a
Task-number: QTIFW-815
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
This is needed for QV4::Object usage. Missing include was causing
compile errors in Qt5.7.
Change-Id: Idf9cc6dafedb54be4cb02f12176b31c794b592fa
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This reverts commit 95ae661cba931a982d12cd68d8b4da392d74bdd0.
As we now require at least Qt5.5.0 we don't need this workaround
Change-Id: I6ab930886bc9af0716a61a8e21b12db83018b0c2
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Asking users to use the authorization fallback in case of authorization errors
might be a bit problematic in some cases. If the users are not familiar with the
concept, running: "<installer_exe> --startserver PRODUCTION,{GUID},{GUID}" from
command line might be confusing or difficult. Also it might not help at all.
So let's make this optional. If the config variable DisableAuthorizationFallback
is set to true the installer will not ask users to run the authorization
fallback but instead it will abort the installation immediately.
In RemoteClient this is implemented by adding a new function called
setAuthorizationFallbackDisabled. The init function could be also extend for
this but the config settings are not loaded at the time when the function is
called.
Change-Id: I4baf1dea34c5cc0016e98df47a9492ee1418c5ee
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
The \enum command \brief commands do not seem to get
automatically completed during builds anymore.
Change-Id: Id81aa8f3044f6151d6b4d8a441e386deb0ca4844
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
The module name is needed, because there is a Supported
Platforms section in this Manual, too.
Change-Id: I3d77c89a2afc006d6e423d21ee46e7fbfee2058b
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
The installer would always consider the exit status of the sudo process,
but if executing sudo itself fails (e.g. because the file does not
exist, or because of insufficient permissions), a success exit status
(zero) was returned.
Fix this by rather returning the (negative) errno value in case anything
goes wrong with execve.
Change-Id: Iac5051e998982c6a31fa49cb6f4290cf66050c44
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
The mkdmg.sh script which is used to create .dmg files made some effort
to calculate the size of the file system contained in the .dmg file.
However, it neglected to consider that a .dmg file is not always
(never?) totally empty. A sample session on OS X 10.10.5 shows:
$ hdiutil create /tmp/foo.dmg -megabytes 33 -ov -volname foo -type UDIF -fs HFS+
... <a lot more dots here>
created: /tmp/foo.dmg
$ hdid /tmp/foo.dmg
/dev/disk3 GUID_partition_scheme
/dev/disk3s1 Apple_HFS /Volumes/foo
$ df /Volumes/foo
Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk3s1 67504 1584 65920 3% 196 8240 2% /Volumes/foo
About 792kB are apparently used for bookkeeping (in ".Trashes" and
".fseventsd") directories.
Since mkdmg.sh failed to account for these 792kB, the .dmg file it
creates was occasionally too small, causing an error message to be
printed by the 'cp' command in the mkdmg.sh script (but that error
message was never printed anywhere, at least I never noticed when
executing binarycreator - always only when running mkdmg.sh directly).
Instead of fixing the allocated size, let's just make use of the
'-srcfolder' argument to 'hdiutil create' which does all of this
automatically. It requires no copying around or calculating sizes, which
not only makes the script much simpler, it also avoids the
above-mentioned issue but also makes the script run faster: about 30%
faster in my experiments.
With this, the mkdmg.sh script is so small (just one hdiutil and one rm
call) that we may just as well drop it completely and perform those
operations straight from the C++ code.
A final nice side-effect is that '-srcfolder' can be specified multiple
times: this makes it very easy to copy multiple directory trees in the
resulting .dmg file. This in turn is useful to create nicely styled .dmg
files with custom background image and icon arrangements.
Change-Id: I54d63a00e56d1ee9fa61c2690ca42d512fda37b1
Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Destroying QProcess or QAbstractFileEngine objects never worked, since
the code for deciding what type of object is to be destroyed confused
the 'type' with the 'command'.
Change-Id: I8d6c6bf2f11ff82cfbd744c43fcc91d234967b69
Reviewed-by: Katja Marttila <katja.marttila@theqtcompany.com>
Sometimes installing fails due to a problem in server.
Since downloading can happen from mirror, it is hard to
detect where the problem is. Print the IP address where
the download actually happens to ease the problem solving.
Change-Id: I31e15c2b1926745c251093cd1663d1ca1c65bff6
Task-number: QTIFW-813
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
It was impossible to pass Unicode data safely to a process started via
installer.execute(), or to read Unicode data printed by that process
safely back in. The reason for this is that the code hardcoded the
latin1 codec for converting between strings used in the script
interpreter and bytes used by the QProcessWrapper API.
Fix this by adding two new optional arguments to installer.execute()
which can be used to define the codec to be used for writing to stdin
resp. reading from stdout. This defaults to latin1 for backwards
compatibility.
Change-Id: I290d8d9617b286ef90b2f0a05c6e7a47f6df317f
Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Reviewed-by: Frerich Raabe <raabe@froglogic.com>
The write handle of the stderr pipe was closed in the parent process
further up already. What's left to close is the read handle.
Change-Id: I988c5334edb2df002cb29b1f2d47fb34eb284185
Reviewed-by: Katja Marttila <katja.marttila@theqtcompany.com>
The WizardDefaultWidth and WizardDefaultHeight configuration settings
always expected pixel values. This made the installer look somewhat
awkward on high DPI displays, in which case the ratio between the font
size and the installer window size was such that the fonts looked very
big.
Let's fix this by allowing to specify the width/height of the installer
using units which are defined in terms of the font size, namely 'em'
("The width of the letter M") and 'ex' ("The width of the letter x").
'px' is supported as well and means the same thing as not specifying any
unit at all: the given size is defined in pixels.
We choose to *not* use the font width for 'em' and 'ex' to be consistent
with what the Qt CSS parser does (see src/gui/text/qcssparser.cpp),
which adheres to what the W3C document at
https://www.w3.org/WAI/GL/css2em.htm describes.
Change-Id: Iaeb5a29c79d437ef4b956cb318158181f6289ec9
Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Uninstalling packages on OS X didn't seem to work very reliably, it
often (always?) seemed to not remove a couple of files. When clicking
the 'Show Progress' button while uninstalling, it became apparent that
the paths to all the files to remove were computed wrongly: instead of
deleting e.g. the file
/tmp/installdir/foo.txt
The uninstaller attempted to remove
/tmp/installdir/Uninstall.app/foo.txt
What happens is when uninstalling, the ExtractArchiveOperation class
(which performs deletion of installed files in its 'undoOperation'
reimplementation) reads the files which were installed from the XML
markup embedded in the maintenance tool binary (this happens in
UpdateOperation::fromXml()). The paths to the files which were installed
make use of a special '@RELOCATABLE_PATH@' placeholder which denotes the
effective installation directory. This placeholder is meant to be
replaced with the actual installation directory, which is assumed to be
the directory where the maintenance tool resides, i.e. what
QCoreApplication::applicationDirPath();.
On OS X however, the maintenance tool is an app bundle, i.e. the actual
binary is not in
/tmp/installdir/Uninstall
but rather
/tmp/installdir/Uninstall.app/Contents/MacOS/Uninstall
The code already called the QInstaller:isInBundle() utility function to
handle this case, but did so wrongly: isInBundle() returns the directory
to the app bundle, i.e.
/tmp/installdir/Uninstall.app
What we want though is just '/tmp/installdir'. Hence, let's go one
directory up.
Change-Id: I927a453d7fbdd1048ff3d2172bd3cfec3a563b4a
Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
If WizardDefaultSize was not set, banner size was zero. In this commit
default banner size to page size if WizardDefaultSize is not set.
Also resize banner only when it is found
to avoid warning messages in console.
Change-Id: If47f947b134714ae935d80bc3074226763ca8ea7
Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
When using RegisterFileType, argumens include progId.
Removed it from arguments and saved as member variable.
This way progId won't interfere argument check count and
it can be used also in undo operation.
Change-Id: Ic80a54a28b5e171a5d4e3023b58eb1636a16fa49
Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>