summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/binaryformat.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Fix documentation warningsTopi Reinio2020-09-161-4/+4
| | | | | | | | | These changes fix many of the documentation warnings when building with a recent version of (Clang-integrated) QDoc. Change-Id: I5714635a25707cd7ab7bec209fa043a95f0b9832 Reviewed-by: Katja Marttila <katja.marttila@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Enable support for Qt 5.12 in installer frameworkArttu Tarkiainen2019-08-221-1/+1
| | | | | | | | | | | | | | | | | 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 0 with nullptrKatja Marttila2019-01-091-1/+1
| | | | | | | Prevents a lot of warnings seen in QtCreator Change-Id: I63bf95aca68a04fc9fd0eecbe29c63e9b9c47efd Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Merge remote-tracking branch 'origin/2.0'Katja Marttila2017-01-301-17/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Changelog dist/config/config.xml dist/packages/org.qtproject.ifw.binaries/meta/package.xml dist/packages/org.qtproject.ifw/meta/package.xml installerfw.pri src/libs/installer/lib7z_create.h src/libs/kdtools/kdgenericfactory.cpp src/libs/kdtools/kdgenericfactory.h src/libs/kdtools/kdupdaterapplication.cpp src/libs/kdtools/kdupdaterapplication.h src/libs/kdtools/kdupdaterupdatesourcesinfo.cpp src/libs/kdtools/kdupdaterupdatesourcesinfo.h src/libs/kdtools/localpackagehub.cpp src/libs/kdtools/localpackagehub.h src/libs/kdtools/updatefinder.cpp src/libs/kdtools/updatefinder.h tools/binarycreator/resources/mkdmg.sh Change-Id: Iab2513f549832d2e750e77131c673457ab265af4
| * License header update to GPL-EXCEPTKatja Marttila2017-01-261-17/+12
| | | | | | | | | | Change-Id: I6426c4e8f932cf26c6c638dec18d0c12e22972d1 Reviewed-by: Janne Anttila <janne.anttila@theqtcompany.com>
* | Merge remote-tracking branch 'origin/2.0'Iikka Eklund2016-01-201-4/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: installerfw.pri src/libs/kdtools/kdgenericfactory.cpp src/libs/kdtools/kdgenericfactory.h src/libs/kdtools/kdupdaterapplication.cpp src/libs/kdtools/kdupdaterapplication.h src/libs/kdtools/kdupdaterupdatesourcesinfo.cpp src/libs/kdtools/kdupdaterupdatesourcesinfo.h sync.profile Change-Id: Ifdc8b065f89b7e241bd3788ed79768e21888161f
| * Update license headersIikka Eklund2015-12-291-4/+3
| | | | | | | | | | | | | | | | | | Update existing license headers. LGPL -> LGPLv21. Update copyright year as well. Change-Id: Ie1d71f8c68186b8f625f409ddf94691f178093c9 Reviewed-by: Katja Marttila <katja.marttila@theqtcompany.com> Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* | Unify translated error messagesKai Koehne2015-06-241-2/+2
|/ | | | | | | | | | | | * Enclose file paths in "" * Localize file paths with QDir::toNativeSeparators. * Make sure sentences end with a '.' * Append error details always by ':', e.g. tr("Failed to copy file '%1': %2").(...) * Use 'directory' instead of 'folder' everywhere Change-Id: Ie045f429f72ad5045c96537465c5fb9d2e99d250 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Update CopyrightKai Koehne2015-02-181-7/+7
| | | | | Change-Id: I8dde6629cfd461104364d5cdc255cb54b58283fa Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* Doc: edited binaryformat docsLeena Miettinen2015-01-291-4/+4
| | | | | | | Fixed grammar, writing style, and QDoc command issues. Change-Id: I93e79ad7294651071a2d3ab03cad657da1d23ba7 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* Fix online installation into directory with elevated permissions.kh2014-12-011-1/+6
| | | | | | | | | | | | | | | | | Inside the Resource class we can't use QFile, as that will access the elevated running server to read from a only client side mapped file. Adjust Resource::readData to behave properly with the file engine's nativeRead(...) implementation, e.g. on Unix it returns -1 if called to read with a size of 0 bytes. Do not write to the socket if we are running in a different thread than the one the socket was created in. Fix logically broken connect function. Task-number: QTIFW-572 Change-Id: I993b5d3a5c217b0aedbbc27837dce2619e51d224 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Takayuki ORITO <iori.ayane@gmail.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Documentation updates and fixes.kh2014-12-011-1/+1
| | | | | | Change-Id: Ie9fc9e1c2a0b84082cb48732e270913bc90d9a79 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* Compile fix for Visual Studio 11.kh12014-10-161-1/+1
| | | | | | Change-Id: Ief110f24055ca6204ace5986707e154b23aad312 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* Add LGPLv3 as new licenseKai Koehne2014-10-161-14/+7
| | | | | | | 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>
* Overhaul the binary format API.kh12014-10-151-189/+204
| | | | | | | | | | | | | | 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>
* Remove unused operators.kh12014-09-051-12/+0
| | | | | Change-Id: Icd4c43e27478c017280ffda64c9c51045fdc32da Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Rename binary format classes and functions. Move to QInstaller.kh12014-08-271-138/+219
| | | | | | | | | | 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>
* Adjust the segment in place instead in different locations.kh12014-07-211-2/+2
| | | | | | Change-Id: I4bfc2227161decb5ba5e96ec39d4dbd9d2699d34 Reviewed-by: Niels Weber <niels.weber@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Move class BinaryContent into its own file.kh12014-07-151-461/+1
| | | | | | | Prepare for QTIFW-292 and QTIFW-345. Change-Id: I938b5aa728e8f81eb9521df5753ad80ac630d96e Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* Move updater class into sdk binary and rename to UpdateChecker.kh12014-07-151-29/+1
| | | | | | | | | | | | | 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>
* Workaround for QFileInfo::isBundle().kh12014-07-041-2/+4
| | | | | | | | | | | | | | | For some reason the former code did not work anyore as expected, the issue seems to be in QFileInfo::isBundle or how we used it. To not depend on a possible fix in Qt, we now always resolve the path before we ask QFileInfo if it is a bundle. Fixes also the behavior change introduced in cead4555. On OSX, we get the .dat file passed that's inside the bundle, still we need to read the data from a .dat file that's located beside the app bundle... Change-Id: Idaa7adc6fbad6bd8e9ce90c383b34ea51fe40e8f Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Replace Q_OS_MAC with Q_OS_OSXNiels Weber2014-07-031-1/+1
| | | | | | | | 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>
* Revert change from QIODevice to QFileDevice.kh12014-07-021-129/+58
| | | | | | | | | | | Follow up on 924ebcdbc9b9e590a5f0905941e2d05ac34d4be2 (Part 2). Remove some unused methods. Cleanup some unused code. Add some documentation what the Archive class does and is used for. Add copy method and switch back the class to inherit from QIODevice as also the Archive class does not work as QFileDevice descent. Change-Id: Ia20f02c5aa53ba977fdc1d14785031b0cfbce386 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Fix possible case of uninstalling whole windows.kh12014-06-241-37/+25
| | | | | | | | | | | | | | Task-number: QTIFW-511 In case we couldn't read the .dat file or the config file, target dir will return the path the application was started. Now we bail out early if one of the files is missing. Fixes also some outdated code mess when we switched from a single binary maintenance tool to the split binary version. Change-Id: I4c70ac4ca63142873ed1521df47d74331669b576 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Niels Weber <niels.weber@digia.com>
* Don't use QObject::tr().kh12014-06-241-21/+35
| | | | | Change-Id: Icefbff9851a4e096a4b800adea7d17db756abe99 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Split out the file IO stuff and adjust other files respectively.kh12014-06-241-187/+39
| | | | | | | | | Also adjust the API to use QFileDevice instead of QIODevice to make clear we just operate on files here and not on any possible device like sockets, processes etc... Change-Id: I4ecbb6e244fe4bb666ed12e62f9f5586bc1347f0 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Add important note.kh12014-06-161-0/+3
| | | | | Change-Id: Ifa7364d561b8fbb3370f8e3930e62c040280fe17 Reviewed-by: Niels Weber <niels.weber@digia.com>
* Cleanup. Remove some unused and broken code.kh12014-05-141-92/+0
| | | | | Change-Id: I6b1c9b4cd406da91c6642a9cad0e225d8473df20 Reviewed-by: Niels Weber <niels.weber@digia.com>
* Read file content in case mmap fails (fallback).kh12013-11-121-6/+20
| | | | | | | | Task-number: QTIFW-400 Change-Id: Ic1bc25b7bc1ada6b12b7967c4c41e65f64e81267 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Niels Weber <niels.weber@digia.com>
* Compile fix.kh12013-10-161-1/+3
| | | | | Change-Id: I917cb0da36b6d68df85cbc037602c4abf754ded8 Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
* Implement a way to replace the default resource.kh12013-10-161-1/+22
| | | | | | Change-Id: I2e362d255bf2526f216cbb872bbb64d37383d229 Reviewed-by: Tim Jenssen <tim.jenssen@digia.com> Reviewed-by: Michal Klocek <michal.klocek@digia.com>
* We can't expect a multiple of 8 during marker search.kh12013-09-241-1/+1
| | | | | | | | | Once the marker was on a position not matching a multiple of 8 from the end, the search would fail. Now decrement by 1 byte. Change-Id: Ia703c9074b3bef6b1a300865abfe24dcb2c8d5fd Reviewed-by: Tim Jenssen <tim.jenssen@digia.com> Reviewed-by: Niels Weber <niels.weber@digia.com>
* Rewrite function to use QFile::map().kh12013-09-101-26/+20
| | | | | | | | | Once the data is mapped into memory, searching backwards is way faster. Change-Id: I31667095712cfba95a8255e04d217ed9242fd2a8 Reviewed-by: Niels Weber <niels.weber@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
* Merge remote-tracking branch 'origin/1.3' into 1.4Tim Jenssen2013-09-091-1/+1
|\ | | | | | | Change-Id: I9fd96d5906048e6d258490f82d93c7f2ef942b09
| * Fix installer.dat not found issueMichal Klocek2013-08-281-1/+1
| | | | | | | | | | | | | | * use applicationDirPath() instead of applicationFilePath() Change-Id: I2f25dd88d3c024b20d0ef1937e7a8e50a8183594 Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
* | Merge remote-tracking branch 'origin/1.3' into 1.4Tim Jenssen2013-08-261-0/+8
|\| | | | | | | Change-Id: Ie74dcebe9412da0caceec9f541eb51ad46bfea9f
| * Fixes QTIFW-322, missing magic cookie in installer binaryMichal Klocek2013-08-231-0/+8
| | | | | | | | | | | | | | * on mac magic cookie is kept in install.dat and not in installer binary itself Change-Id: I568bbdf7a0bcf3b6efeda0bdfe2141e15c6c73aa Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
* | reformat initialize list of classesTim Jenssen2013-04-241-12/+12
|/ | | | | Change-Id: I4107c571497a98b962716bd7915c29fb50d70108 Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* we need to continue if the operations is unknownTim Jenssen2013-04-111-2/+4
| | | | | | | Change-Id: Ife281fabca69af58edae77fc4c413f336535f63c Reviewed-by: Iikka Eklund <iikka.eklund@digia.com> Reviewed-by: Niels Weber <niels.weber@digia.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* Add 2013 to the copyright.Niels Weber2013-02-051-1/+1
| | | | | Change-Id: If64730ba7203d1a910a426c0d9c9a738ecfeff4b Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* Make IFW compile with mingw.kh12013-01-291-1/+1
| | | | | Change-Id: I0336e02ef701a2bc392bd385d1822bc51cee0c5c Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Fix some warnings in our code after Idcfec77.kh12013-01-231-0/+6
| | | | | | Change-Id: Ied8ffad416ae058a45fa2d46f8ff304ff5b4a392 Reviewed-by: Niels Weber <niels.weber@digia.com> Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
* Change copyright headers from Nokia to DigiaSergio Ahumada2012-12-211-18/+27
| | | | | Change-Id: Id55a71a6ee24b234739b6066e11e9c1f2e389f73 Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* Fix dangling resource data.kh12012-11-211-6/+6
| | | | | | | | | | Task-number: QTIFW-168 Use QByteArray as a data container for resources to keep a reference to that data till the data is needed / the QByteArray exists. Change-Id: I2436ae2204bd1bdb834e6c8e434b2673b12c4fad Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
* Some changes to start compile with Qt5.kh12012-11-201-2/+4
| | | | | Change-Id: Ie6a3ba7b3c0b24fc292d0d7444ae920dfa866a54 Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
* Add empty ctor, copy ctor and remove superfluous dtor...kh12012-11-141-12/+22
| | | | | | | | | Remove superfluous static resource vector. Check for possible null access. Change-Id: I92f1f65a9309d8f99c479b66a03b2e3000ac121c Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
* remove unused valueNiels Weber2012-10-151-1/+1
| | | | | Change-Id: I7494eb48117d458c8ac3ffedd22bcf578671553e Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
* introduce general humanReadableSize methodTim Jenssen2012-03-271-3/+3
| | | | | Change-Id: I4731be424cf2207e8cc2320ab9e442d02c29aeda Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>
* Reorganize the tree, have better ifw.pri. Shadow build support.kh12012-03-191-0/+1115
Change-Id: I01fb12537f863ed0744979973c7e4153889cc5cb Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>