18 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
kh
e880633818 Dump binary content for both installer and maintenance tool.
Change-Id: I749912ebba5e1765f0d60e089a0366f59e09279b
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2015-02-05 16:19:29 +00:00
kh1
c6ae7c8a44 Fix unregistering resources. Fix --operation argument parsing.
In case of dump we register some resources, though since we
return immediately after the function call, never unregister.
We need to split the arguments on our own, the parser does not.

Change-Id: Id97e0a4d8a3c15fd0027a09514a9c0a6930e7fdb
Reviewed-by: Niels Weber <niels.weber@digia.com>
2014-11-04 11:24:53 +01:00
kh1
df70f005d8 Remove superfluous include.
Change-Id: I24b7cfe2bc67eb4b0d4a63e4a75e4171e7f0d4ea
Reviewed-by: Niels Weber <niels.weber@digia.com>
2014-10-31 12:50:51 +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
bc91a2204e Fix warning and handle file scheme like files better.
Calling setFileName() prints a warning if the path is reset
without calling close() before.
Convert the source path with file:/// scheme to local file.

Change-Id: Ie21e7e8ad8f76dbe1afc1843ff5bf7fb4598123a
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-10-10 16:08:47 +02:00
kh1
6857a0e87e Fix broken update option.
We need to read the marker on our own, BinaryContent::binaryLayout()
throws cause it cannot read the full layout in case of maintenance
tool binary (part of the stuff is inside the .dat file).
To be able to read the layout from the .dat file, we need to open it.
Pass the right file to relace, in both cases the executable.

Change-Id: Ic76e78a2ee289f3d59d51cc8984d84ab5edf5b46
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-10-10 15:50:47 +02:00
kh1
1d080a743c Add missing help option.
Change-Id: Ie70cf698e1761b26a6d6ff11a782c0a871587132
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-10-10 15:35:26 +02:00
kh1
85cc7f8fc5 Rewrite binary layout read/ write implementation.
Move BinaryLayout into its own file. Calculate the segment
offsets in place instead of letting the caller do the work.
Adjust autotest to match the new behavior. Adjust uses to
the new behavior.

Change-Id: Iba7a4398bd097f1768c33f0c528efd12b7458541
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-09-04 10:42:05 +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
kh1
df2663a932 Let the binary layout function find the cookie on its own.
Saves some ugly looking call convention, as we need to find
the cookie anyway, pass the cookie instead of the position.

Change-Id: I2227576a8ad251fac5312fc477f8381287b0d36d
Reviewed-by: Niels Weber <niels.weber@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-08-29 12:40:05 +02:00
kh1
cf60ba8b28 Make BinaryFormatEngineHandler a real singleton.
It is really needed only once.

Change-Id: I0b2231432541c2781afe55105f88809db4fe19e1
Reviewed-by: Niels Weber <niels.weber@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-08-29 12:39:58 +02:00
kh1
42d2b1ba06 Adjust implementation to not use the collection manager.
Change-Id: Ie38460ff4a94b5583cabb1ecad97cd6c9a906c15
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-08-29 12:39:48 +02:00
kh1
2312e7fd59 Rename binary format classes and functions. Move to QInstaller.
Adjust some minor implementation details. Some renaming of member
variables and function names is left out but will follow in later
patches. Add some documentation.

Change-Id: I929dcbe13fa701be5224b9e5fdf8d19bfff81235
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Niels Weber <niels.weber@digia.com>
2014-08-27 10:44:00 +02:00
kh1
5a3063968c Make the marker and the find function class members.
Prepare for QTIFW-292 and QTIFW-345.

Change-Id: I065366742d28e72bc5ae55e70eabf6532b809fea
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
2014-07-15 11:37:07 +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
2a364e7135 Introduce developer tool.
Supports dump binary content, run operation and update existing
binary with new installer base. The support for starting with
binary data of a different installer got dropped completely, use
update and run instead.

Change-Id: I41073d0bfc9a4c4da18fbb9f49fd3e65bb54b501
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-07-11 15:37:54 +02:00