55 Commits

Author SHA1 Message Date
Kai Koehne
99996591e0 Update Copyright
Change-Id: I8dde6629cfd461104364d5cdc255cb54b58283fa
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-02-18 10:33:48 +00:00
Kai Koehne
0838e9eac2 Fix use --startclient arguments
So far the arguments to --startclient have been ignored.

Change-Id: Ib76b061381a9320e6e4e9e2e970132c2f614aca7
GPush-Base: 92da4093e32040cb7cd7ed5587de78262d825e65
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
2015-02-02 13:33:21 +00:00
Jarek Kobus
929fef475b Fix loading of translations
In case we hit the English translation just try to load it
and break in any case. In case we hit another language
we only install the translation if the qt translation was
loaded properly, and break.

Change-Id: I2755501c1af8cb51b38cf21e0205bcf05541fb91
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-01-26 15:47:13 +01:00
Christoph Vogtländer
86a40b0fca rename CreateOfflineRepository to CreateLocalRepository
Change-Id: I36d7a504b27dfff8b9d10c9d90b6ff77108b9982
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-01-08 15:18:59 +01:00
Kai Koehne
b11f689b79 Remove country from most translations
If we provide an en_us translation only this won't be picked up
by users having configured 'en', or 'en_uk'. This also mirrors the
naming of the qt translations.

The exception is zh_CN though, because the difference between
simplified and traditional characters is big. I'm not sure whether
taiwanese people would rather prefer traditional characters or english.
For Qt we have both zh_CN and zh_TW, maybe we will get a zh_TW in the
future too...

Change-Id: I73490337aef8f54da14b6feca3a035e1e405d65b
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-01-06 12:17:46 +01:00
Christoph Vogtländer
b14a7d2cbc Add CreateOfflineRepository configuration option
Setting CreateOfflineRepository to "true" in config.xml will
create a local offline repository, same functionality as
"--create-offline-repository" command line option

Change-Id: I51b947157ebc27800b1e9ad0b55d139ac6e164b2
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-12-11 16:12:29 +01:00
kh
4853be33e2 Add possibility to specify a control script.
Right now we support control scripts just as command line argument,
but now we can also bundle it in the binary as well. This helps e.g.
with running scripts during uninstallation, enables the possibility
to modify the introduction page or enables headless installer builds.

Task-number: QTIFW-495
Task-number: QTIFW-166
Change-Id: I6fee6a55db78ed28b1eeb8257a4febaa2703c04e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-12-10 08:54:18 +01:00
kh
64d49f097f Implement a way to start the server in debug mode and API cleanup.
1; Passing debug as first argument to the starting server does not
start the server side so the server keeps running in an endless loop.
This makes it far easier to attach a debugger.
2; API cleanup and unify init function to take port, key, and mode.
The address was never able to be changed anyway, so stop passing them
around.

Change-Id: I2a847f009ed1557a5e136e2b0006de5c62426da2
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-26 14:49:23 +01:00
Kai Koehne
6df883de4a Expose real type of PackageManagerProxyFactory
This allows us to store proxy settings in the factory later on.

Change-Id: Ib389ccffb3163be4f5cd511be4c4b8bbe15e8a93
Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
2014-11-18 16:17:12 +01:00
kh1
b67c842ba8 Make sure we do not fail if we can't create the lock file.
If we can't lock the file (possible missing privileges to create
and lock it), we now check the running processes before we fail.

Task-number: QTIFW-566
Change-Id: I821ccf8c37d6a235df49e060c59a0283bb91261c
Reviewed-by: Takayuki ORITO
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Niels Weber <niels.weber@digia.com>
2014-11-12 21:22:51 +01:00
kh1
b1b9a3df47 Rewrite the isRunning implementation and remove private class.
Use a more descriptive enum name. On Windows keep the lower case
version of the process name instead of calling toLower() several
times. Print a warning if we cannot obtain or release the lock.

Change-Id: Iaaefae0359cd214290f62ce78677cb343da8823c
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Niels Weber <niels.weber@digia.com>
2014-11-12 21:22:35 +01:00
kh1
624adb3699 Implement package filtering for online and offline installer.
Change-Id: If17725c0d97111aff67bcc0bc060fb74bb1109cd
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Niels Weber <niels.weber@digia.com>
2014-10-30 13:40:57 +01:00
Kai Koehne
4ebfecf411 Add LGPLv3 as new license
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>
2014-10-16 15:17:56 +02:00
kh1
84875396b7 Overhaul the binary format API.
Adjust some naming. Add documentation. Make the Resource class
handle files only, this is sufficient to read and map inbuild
resources. Keep the QResources inside the manager as well, no
need to handle them separate. Remove read, write functions from
collection class, the API was just unclear how to use. Still it
is far from intuitive in the manager class either. If we open a
Resource, we need to close it on our own case they are pointers.

Change-Id: Ic8aa32a84a15ac774fe1194ba0dbb5733f7216d6
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-10-15 17:10:18 +02:00
kh1
b73ef0fa7e Fix some std::cout usage.
Fixes missing timestamps and some propably wrong conversion.

Change-Id: I6106e1ea61d0840d132dd3b44cd746f023e795af
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-09-05 10:53:15 +02:00
kh1
77b1e16820 Split and implement new installer base, update checker.
Based on the former patches, split the installer base into its
own class. Use the new binary content read functions. Adjust uses
to match the new classes. Adjust installer base /update checker
signature and inheritance. Remove all now superfluous functions
from binary content. Core engine instantiates the operations now,
makes reading and writing more generic. Move product key check
into QInstaller namespace. Make use of the new command line parser.

Change-Id: I00aff79085b69ce627906881b43f374681ea7e91
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-09-04 10:41:53 +02:00
Kai Koehne
2dfa49ac79 Fix listing of resources
In commit 6466dbd11190 the list iterator advances two times in one go.

Change-Id: I24aae53b764732b04159261921365c99518ee3e9
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
2014-08-27 12:09:49 +02:00
Kai Koehne
6466dbd111 Make listing of resources less verbose
Print the resources only once, and hide Qt internal resource paths.

Change-Id: I4fce72424b4ab94d44d63e16b6ae89cff7ccac72
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
2014-08-27 11:22:00 +02:00
Niels Weber
2c6f351491 Fix Typo resulting in wrong error message
Change-Id: I62e91bcb3bfe73ea0d23f6cdf6938af10fffd8cc
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
2014-07-17 15:50:11 +02:00
kh1
62ef1132ae Move class BinaryContent into its own file.
Prepare for QTIFW-292 and QTIFW-345.

Change-Id: I938b5aa728e8f81eb9521df5753ad80ac630d96e
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
2014-07-15 11:36:15 +02:00
kh1
7e22555eaa Move updater class into sdk binary and rename to UpdateChecker.
Remove some now superfluous methods from binary format.
Adjust initializing some objects as we need them not earlier.
Unify implementation of accessing the right binary to read the
content from.
UpdateChecker does now have its own run checker, makes it possible
to run the binary even if a e.g. maintenace tool is already running.

Change-Id: I94f32f7f38b62b5aee433753abc2fe72e879ddc9
Reviewed-by: Niels Weber <niels.weber@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-07-15 11:30:48 +02:00
kh1
7186834d50 Adjust parsing the arguments, we now only need them for the parser.
Change-Id: Ibf4ee8358f7eb75854c8b6ca9be25b1288eb045d
Reviewed-by: Niels Weber <niels.weber@digia.com>
2014-07-14 12:25:06 +02:00
Niels Weber
519cf01c4e Remove ubuntu hack that should be no longer necessary.
Change-Id: I698b83cbbd9fd1b8f2ed3bb52cdb2849ef1e7e1c
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
2014-07-10 13:03:32 +02:00
kh1
b1d6b3ba7b Use QCommandlineParser, remove some developer related options.
Remove: --runoperation, --undooperation, --update-installerbase
 --dump-binary-data, Script, Updater, ManagePackages
Some of these options will go into a separate dev related tool.

Change-Id: I31084f60d3ed9a33abeb3df90fadf939d3b4c0a7
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-07-10 13:02:52 +02:00
jkobus
27390528bd Rename settings in config.xml file
Rename UninstallerName to MaintenanceToolName
(change its default value to "maintenancetool").
Rename UninstallerIniFile to MaintenanceToolIniFile.

Change-Id: Ic8ceae80b43c6793ae9b0baacea2ea374a0f90d1
Reviewed-by: Niels Weber <niels.weber@digia.com>
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-07-07 14:38:01 +02:00
Niels Weber
adb91d5dd8 Replace Q_OS_MAC with Q_OS_OSX
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>
2014-07-03 11:14:19 +02:00
kh1
aca0e939b3 Initialize both client and server with default values.
Change-Id: I51934b0de77b1062153f5f60be44d4bcf4be5ee5
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-06-23 15:08:05 +02:00
kh1
108daee55f Fix replace maintenance tool binary.
Missing QInstaller::init() did lead to crashes cause of
uninitialized lib7z (in case we used a zipped file as input).
In verbose mode console did not show up. Get rid of KDSaveFile
as it complicated to code unnecessary.

Change-Id: I5911c895d7763e4ce919b1d4761568e47b244b1b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-06-04 09:56:42 +02:00
kh1
05afd837fc Replace client-server classes and update implementations.
Remove superfluous file engine tests. Introduce auto test
for newly added client server classes. Fix some wrong
implementations serverside for settings array handling and
broken arguments in process wrapper. Replace all other parts
that with new implementations. Remove now unused classes.
Change-Id: I6f9e836993096a2c2c06b06f2b06d7aa4b287e56
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
2014-06-03 13:04:53 +02:00
Kai Koehne
8f8800de7a Avoid 'Too many open files' on Mac
Increase the number of file descriptors that the process can open
to the maximum allowed. By default, Mac OS X only allows 256 file
descriptors, which can easily be reached.

Change-Id: Ie4e5ab1051d8e3bf1cb39747f629360915a22d97
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
2014-05-14 14:09:05 +02:00
kh1
d27ea0c558 Fix --checkupdates shows error dialog if network is down.
Task-number: QTIFW-431

We need to add a separate console window in case we run on windows,
though we can't use a gui application as the lib might popup message
boxes. (MessageBoxHandler checks against a running core application)

Change-Id: Idad8dff44c6c0bfb0bb45e8a0fb408b3db832c3c
Reviewed-by: Niels Weber <niels.weber@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-08 08:29:30 +01:00
kh1
31a0f80573 Adjust ProductKeyCheck API. (in preparation for multiple pages)
Change-Id: I69d0fc9842df7fb564db57067da5f40e002b61de
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
2013-11-25 16:53:33 +01:00
kh1
8eabcaca2c Open a console window (Windows) to show the verbose output.
Task-number: QTIFW-403

Change-Id: I5ab5221e8035e7d47c8d368c552f930db65931d9
Reviewed-by: Niels Weber <niels.weber@digia.com>
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
2013-11-25 16:30:10 +01:00
kh1
0f4ceb1950 Implement a way to replace the default resource.
Change-Id: I2e362d255bf2526f216cbb872bbb64d37383d229
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
Reviewed-by: Michal Klocek <michal.klocek@digia.com>
2013-10-16 15:51:30 +02:00
kh1
27a63dd497 Be more verbose on the resource tree.
Change-Id: I1e079f94767d95d997ebb6d758c40e605fd36c75
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
2013-10-16 15:07:40 +02:00
kh1
0b8592fab9 Make sure we parse and pass arguments as early as possible.
Change-Id: I384f036a24e3eb648bde0fa8e40ab8dcb0779e7b
Reviewed-by: Michal Klocek <michal.klocek@digia.com>
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
2013-10-16 15:07:32 +02:00
Niels Weber
089562c2e7 Fix selected translation in special circumstances.
In cases where there where multiple uilanguages, sometimes the
wrong language was chosen for the Qt localisation.
Also, use the standard matching for locales for the ifw
translation as well.

Task-number: QTIFW-324

Change-Id: I2c4cd079baa3d1ce4c5c69bf6692ba313616f722
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
2013-08-09 14:44:39 +02:00
kh1
5e5c0a10ff Implement dedicated translation settings support.
Change-Id: I41dd23f01e9b511c217fee7f736d9187b8a8623a
Reviewed-by: Niels Weber <niels.weber@digia.com>
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-06-26 11:55:19 +02:00
Niels Weber
3ffc4eadee Check os-release instead of lsb-release
Should be more standard.

Change-Id: I531c19a2139bf1e1a2d307997e1ed01c33b50249
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
2013-04-11 14:54:21 +02:00
Kai Koehne
bf2300a1cd Don't hard-code version in sources
Change-Id: I1a1f3a22d7360f9a9e8036c76b721aa740e612e9
Reviewed-by: Niels Weber <niels.weber@digia.com>
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
2013-02-14 13:11:55 +01:00
kh1
afaf3fcbd9 Add --binarydatafile argument to installerbase.
Task-number: QTIFW-214

Simplifies testing an already existing installer or maintenancetool
using a newer installerbase or IFW build.

Change-Id: I11df629614eb1c2c15ecc28af37d8e40b5173a79
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
2013-02-07 10:51:39 +01:00
Niels Weber
aa37d582dc Add 2013 to the copyright.
Change-Id: If64730ba7203d1a910a426c0d9c9a738ecfeff4b
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
2013-02-05 11:24:14 +01:00
Sergio Ahumada
8f4053db30 Change copyright headers from Nokia to Digia
Change-Id: Id55a71a6ee24b234739b6066e11e9c1f2e389f73
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
2012-12-21 22:25:29 +01:00
kh1
3cae873f95 Fix 207cfebb778b.
Obviously there was a problem with the indexOf call. Also once we
omit the -i, the input could be -o or even worse the output path.

Change-Id: I60a970c7e2857195e214cf2441d87468d297a7c2
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
2012-11-20 16:16:18 +01:00
kh1
311045065e Some changes to start compile with Qt5.
Change-Id: Ie6a3ba7b3c0b24fc292d0d7444ae920dfa866a54
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
2012-11-20 10:40:47 +01:00
kh1
207cfebb77 Implement cmd option to dump binary content into given dir.
Reuse already existing functionality, just fix the hard coded
"repository" path name. Also check if we are running offline only,
as otherwise there will be no data section.

Change-Id: Iac45d89822fceee9e527afe0dc9eb589e39e16e7
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
2012-11-14 12:06:25 +01:00
kh1
cd40c7dc73 Move help switch further up, so it's allways available.
Change-Id: I3a8b2ae4b7445ba5ca6ab93f10e57e9fc1928a7b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2012-11-14 12:02:06 +01:00
Pasi Matilainen
830522f3a2 Store installer data in a separate file on Mac to support code signing
Code signing fails on Mac OS X if there's any extra data after the
link edit segment in a binary, so store the installer data in a separate
file inside the bundle.

Task-number: QTIFW-153
Change-Id: Ie1edf21212b4a3bc5b6f32eea3f5d61e8800a0d5
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Niels Weber <niels.weber@digia.com>
2012-09-26 14:42:45 +02:00
kh1
92948d7ff3 Add new commandline argument.
In case we run an offline installer, --create-offline-repository
will dump the whole installer content into the install directory
and add an extra url to the repositories pointing to the mentioned
local repository. This allows an offline user to add packages
without the need of a new installation.

Change-Id: I3e7eb0c56f632b74f5ea41b96bf3d9be83173f41
Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>
Reviewed-by: Niels Weber <niels.2.weber@nokia.com>
2012-08-17 12:54:59 +02:00
Niels Weber
0188b08e8d Make all Ubuntu versions use cleanlooks style.
Doesn't make any sense to limit this to specific versions as
the old ones go away anyway and all new ones exhibit this
issue.

Change-Id: I20fb4d13f2d1933c92fa09727f3d467d5210d24f
Reviewed-by: Rainer Keller <rainer.keller@nokia.com>
Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>
2012-08-03 09:59:35 +02:00