summaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* Fix openssl warning in macos and with devtoolKatja Marttila2023-10-052-2/+6
| | | | | | | | Macos has different ssl plugin backend. Also devtool is using ssl so adding the plugin import to devtool as well Change-Id: I8aa24b2ab2f1f74717d5bde5c6bc0d76dc60de1f Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Fix openssl warning when running repogenKatja Marttila2023-09-141-0/+2
| | | | | | | | | All plugins has been disabled for tools, including repogen. This caused an openssl error when running repogen as it uses FileDownloaderFactory which requires openssl. Change-Id: I4913a3e826881fdc86b804baec3e13e1e5a964f7 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Use QFileInfo::exists() as that is documented to be fasterKatja Marttila2022-11-041-1/+1
| | | | | Change-Id: I413669860334d96de684c1c32962a33166ac6c7c Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Allow generation and signing of MT in macosKatja Marttila2022-10-201-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | Previously maintenance tool could be updated from online repository placing installerbase to repository and setting setInstallerBaseBinary() in install script. The maintenancetool app bundle was written in the code and installerbase placed under .app/Contents/MacOS/. This prevented the maintenancetool app bundle to be signed and notarized. Fixed so that the whole app bundle can be placed to repository. This does not break the signing nor notarization as the whole bundle is copied as it is. The setInstallerBaseBinary() is still needed in the install script so that the installer knows which bundle is the maintenance tool. Old way of updating maintenancetool still exists, if the installerbaseBinary does not contain the ending 'app' installer assumes that the maintenance tool is the executable itself instead of whole app bundle. This change also adds a new binarycreator switch --create-maintenancetool, which can be used in macos to create the app bundle for maintenance tool. Task-number: QTIFW-2750 Change-Id: I3483ddb815d035644e826559947f6f9de4af9361 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Allow plugin import in binarycreatorKatja Marttila2022-05-271-2/+0
| | | | | | | | Binarycreator needs imageformats for creating application icons. Task-number: QTIFW-2668 Change-Id: I0ca7238f8af311ad3a29c607014c54c2802e1523 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add support for parallel extraction of component archivesArttu Tarkiainen2022-04-214-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce ConcurrentOperationRunner class used for running installer operations concurrently in the global thread pool. Add execution groups for operations; Unpack operations are run concurrently for all components requesting installation, operations belonging to Install group are run sequentially for sorted components one at a time as before. From the default registered operations the Extract op is moved to Unpack group. Move the previously on-the-fly backup steps of Extract operation to the ExtractArchiveOperation::backup(), so that backups are done before any archives are extracted, and that we know if any of the archives requires administrator privileges to unpack. Reparent QInstaller::Error to QException to support throwing and catching exceptions across thread boundaries. Use RAII for the server-side objects of the classes supporting the remote client-server protocol of installer framework. The concurrent extraction revealed that it was still possible that the local socket was disconnected and thus the RemoteServer- Connection thread finished before receiving and processing the final "Destroy" command packet, leaking the dynamically allocated objects. Task-number: QTIFW-2566 Change-Id: Ib8c2928b9405b7b3465c731018df73acb51e949f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* 3rdparty: deprecate usage of LZMA SDKArttu Tarkiainen2022-04-132-4/+9
| | | | | | | | | | | | | | | | The 3rd-party sources haven't been updated in a long time, and is missing some features compared to libarchive (which the official IFW binaries use), like symbolic link support on Windows. Add deprecation warning when compiling with LZMA SDK, and make building the library and related client code conditional behind a separate config feature. Update docs to emphasize that libarchive is the recommended build option for archive handler. Change-Id: I70ed5f9b5d13e2243778f7c44b4ea833c8092ae0 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Repogen: allow usage of --update-new-components with unified metadataArttu Tarkiainen2022-03-311-13/+1
| | | | | | | | | | I couldn't find a reason why this combination wouldn't work. If there are no known issues the option should be allowed. Task-number: QTIFW-2558 Change-Id: I9bceddc70e3ea4edeb1af2fe873f96bf815900d3 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Build commandline tools without pluginsSamuli Piippo2022-03-034-0/+8
| | | | | | | | | Commandline tools do not require plugins to be included in static binaries, skip all of them. This avoids unnecessary system dependencies for the tools. Change-Id: I3c50f8ec436ef9d73c4cb551ed48047bf181ccbb Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* binarycreator: support selecting compression level and archive formatArttu Tarkiainen2021-09-141-0/+26
| | | | | | Task-number: QTIFW-1587 Change-Id: I8855b1ce4bb8abf072ff235846428fc63729f0fb Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* repogen: add support for setting compression level for data archivesArttu Tarkiainen2021-09-141-1/+21
| | | | | | Task-number: QTIFW-1587 Change-Id: I86c4b08eb43e3cafbab83e04961c51d6bdbc98ba Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add support for handling archive files with libarchiveArttu Tarkiainen2021-09-143-128/+62
| | | | | | | | | | | | | | | | | | | | | | libarchive is a multi-format archive and compression library written in C and licensed under the new BSD license. Usage of libarchive brings in support for additional archive formats (in addition to 7z) with the installer framework, like zip and tar, with several available compression methods like gzip, bzip2 and xz. libarchive will coexist as a supported archive format handler with the LZMA SDK currently used in the framework, which will continue to be used for handling the 7-Zip file format. This change introduces classes for handling archive operations using both libraries, removes most calls to the old Lib7z facade and migrates the code base to use the new handling methods. Task-number: QTIFW-2255 Change-Id: I8d77110ded503060495a3d6fdfdbc26281df9453 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Cppcheck: Fix local variable shadowing outer variableKatja Marttila2021-03-092-16/+16
| | | | | Change-Id: Idff9a40c5089b4de7b8afd1c280603601317beda Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Cppcheck: Misc fixesKatja Marttila2021-03-091-0/+1
| | | | | Change-Id: I77acdecaf5660f2d7aa723c56d53a97e5687a8b8 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add alternative way to update components from repositoryKatja Marttila2021-03-031-3/+7
| | | | | | | | | | | | | | Components can be updated from online repository using version number. Sometimes there is a need to update to an older version which is now possible by using content sha. Content sha can be added to repository with repogen --sha-update <component_id>. If there is a new content sha available in the repository, component is updated although it version number might be smaller. After the content sha is removed from online repository, the normal update with version number is performed. Task-number: QTIFW-1798 Change-Id: Id9e32b0345af5101cccaf6e30c81bd39691d9590 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Refactor repogen for easier testingKatja Marttila2021-03-021-66/+18
| | | | | | | | Functionality is only moved from repogen.cpp to repositorygen.cpp. This makes the repository testing much easier. Change-Id: I2078e2880955c71b9ffa0ac46501eafbd499c3ba Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Restructure logging utilitiesArttu Tarkiainen2021-02-043-6/+9
| | | | | | | | | | | | | | Create a singleton-pattern class as an encapsulation unit for holding and altering the state of debug printing attributes. Move related code from various places under a single umbrella header file for logging utilities, with some minor stylistic changes & cleanup. This acts as a preparatory change for providing non-blocking headless CLI runs when there is no TTY attached - that will be fixed in a follow-up change. Change-Id: Ib7f72cf75362c3ea6713058e92eda997d6df55c3 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Tools: refactor to move general purpose functionality to installer libArttu Tarkiainen2020-12-0216-3785/+217
| | | | | | | | | This makes it possible to utilize parts of our existing tooling in the offline installer from online installer generation process. Task-number: QTIFW-2048 Change-Id: I7ee605be75541cc83a3b6909089bda45f0835bcf Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Merge remote-tracking branch 'origin/4.0' into masterKatja Marttila2020-11-243-11/+59
|\ | | | | | | Change-Id: If5205ff6ef2c8989520e24d41595c04d5920d207
| * Repogen: Fix unite metadata when --repository switch usedKatja Marttila2020-11-103-11/+59
| | | | | | | | | | | | | | | | | | | | United metadata 7z was missing the component which had no update available. Task-number: QTIFW-2018 Change-Id: I069fd852499f157075bf28e3ccfef3e42e5f30a9 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Remove unused code blocks and functionsKatja Marttila2020-11-043-21/+12
|/ | | | | | | | Results analyzed using cppcheck tools. Also add Q_DECL_OVERRIDE to overwrited functions. Change-Id: Iab5eb43206af0050c1dd84efb7ed860ab9594496 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Repogen: Fix options to work with unite metadataKatja Marttila2020-10-156-80/+137
| | | | | | | | | | | | | | Fixed regogen 'update' and 'repository' options to work with unite metadata. --update-new-components with unify metadata is prevented. Moved --update-new-components functionality from repogen.cpp to QInstallerTools so it can be accessed from tests. Created tests for repogen. Task-number: QTIFW-1943 Change-Id: I12389f4747154a0f6f51b4f34f630103c2cfef04 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Repogen: Fix repository generation for empty package dirKatja Marttila2020-09-161-2/+6
| | | | | | Change-Id: I5be59799b399fe8bd6655fcf6d7f6efdf5aa5f53 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Add support for vendor set image decorationArttu Tarkiainen2020-08-251-0/+15
| | | | | | | | | | | | Add possibility to show an arbitrary number of product related, or other images on PerformInstallationPage. These can be specified in the installer configuration file, using <ProductImages> element with one <Image> child element for each file name. Task-number: QTIFW-1900 Change-Id: I2be727d9189963ef1a79046150111dd8c91153c6 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Generate unique metadata name for unified metadataKatja Marttila2020-06-111-3/+13
| | | | | | | | | | | If the metadata name is the same although the package is updated, it might cause problems when pushing the data to distribution systems that requires a filename change in order to replicate content. If the filename stays the same it may not be refreshed to the cache. Task-number: QTIFW-1838 Change-Id: I2fc8c1cdf559dab89b57a74ebbe758cdc71da29c Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Fix united-metadata creationKatja Marttila2020-06-103-72/+75
| | | | | | | | | | | | Creating repositories caused sha mismatch detect if installed with IFW version 3.2 or lower. Also changed the behavior that without any switches both united and component metadata will be created. --unite-metadata will create only one combined metadata and --component-metadata the old style where each component has their own meta 7z file. Change-Id: I60d3b56217917739fb8115771af8c3bcf9e59f43 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Refactor and add unit tests for metadatajobKatja Marttila2020-03-241-1/+1
| | | | | | | | Split long functions into smaller understandable functions, added unit tests for metadatajob. Change-Id: Ib423eab3c9ae7771fb032b99f767f96e52266ea7 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Add possibility to compress metadata per repositoryKatja Marttila2020-03-244-15/+76
| | | | | | | | | | | | Added two new configure options for repogen. --unite-metadata will create both 'old' style meta 7z, which is one per component, and new style which is one per repository. --unite-metadata-only will create only new syntax meta 7z. One meta 7z per repository will significantly decrease the download time if there are several packages in one repository. Change-Id: I651b24e93fdef3efb6253ee9b119ebad3bae4d59 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Show information about updated components in repogenArttu Tarkiainen2020-02-031-3/+6
| | | | | | | | | | | Add some basic output information about updated components when running repogen with --update-new-components option in silent mode. --update option is left silent in this regard as it is not component version filtered, updating everything when -e or -i parameters are not passed. Task-number: QTIFW-1543 Change-Id: I453a4107a3ec3702945becf4e15a87aad3423c2f Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Documentation fixesKatja Marttila2019-12-172-4/+4
| | | | | Change-Id: Ibffb5470d374c8d612791f48c951deddd00f3121 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Fix installer executable creation in Linux3.1.2-rc3Katja Marttila2019-11-191-2/+2
| | | | | | | | | | | If Linux has several partitions and tmp is pointing to a different partition than where we are trying to create installer executable with binarycreator, binarycreator fails with 'Invalid cross-device link'. Fixed so that tmp is not used when creating an installer executable. Change-Id: Ieee52ee1929f980345a7940dd381cc94dbf3d40e Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Update usage of Apple-related terminologyArttu Tarkiainen2019-08-164-12/+12
| | | | | | | | | | | 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>
* Fix IFW version information not apparent on macOSArttu Tarkiainen2019-08-151-1/+4
| | | | | | | | | | | | 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>
* Replace 0 with nullptrKatja Marttila2019-01-094-11/+11
| | | | | | | Prevents a lot of warnings seen in QtCreator Change-Id: I63bf95aca68a04fc9fd0eecbe29c63e9b9c47efd Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Fix devtoolKatja Marttila2019-01-041-3/+13
| | | | | | | | | | | After we implemented maintenancetool signing, we wrote the binary magic marker to separate installer.dat file in maintenancetool (like we have always done in macOS in both installer and maintenancetool). Devtool needs to know about this change too to fetch the magic marker from correct place. Task-number: QTIFW-1222 Change-Id: I08e74596033cb33ccb9c49d9db1ee7b4beef59ca Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Merge remote-tracking branch 'origin/3.0' into masterKatja Marttila2018-12-101-0/+7
|\ | | | | | | Change-Id: I73cb43e090c6ff34f1ceb774490d01818465e2e0
| * Increase number of files allowed for macOSBrett Stottlemyer2018-11-071-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This addressed the following error: [29065] Critical: Error occurred while assembling the installer: Cannot open resource <some file>: Too many open files libc++abi.dylib: terminating with uncaught exception of type QInstaller::Error: std::exception Abort trap: 6 Kai from TQtC suggested the fix used in commit: 8f8800de7ab89e6cbc7b5eb08f2b3f16407e6cdf Applying it to binarycreator fixed the issue. Change-Id: I8e616ded94310d33824242ab52e1101b7f2ddafd Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Merge remote-tracking branch 'origin/3.0' into masterKatja Marttila2018-09-171-2/+2
|\| | | | | | | Change-Id: I77d539e079f3c7d61c4a965b222f4e02c35b1108
| * Fix minor translation stringsKatja Marttila2018-09-131-2/+2
| | | | | | | | | | Change-Id: I059903b407a44f07b16af29fb5f0973395ee1f50 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | Merge remote-tracking branch 'origin/3.0' into masterKatja Marttila2018-03-201-6/+6
|\| | | | | | | Change-Id: I601b783a9d2eed009737b2779803457949cbb014
| * Fix devtool's segmentation fault when using operationTakayuki ORITO2018-03-131-6/+6
| | | | | | | | | | | | | | change the name of the variable to parse the arguments of operation command. Change-Id: I251b17e6e48b0a5c12636199de57bbb761b3ac23 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Merge remote-tracking branch 'origin/3.0' into masterKatja Marttila2018-02-081-3/+4
|\| | | | | | | Change-Id: I8d0c8b9faa9537b50e989ec264ed7bfe8d2e358b
| * Add line number information when throwing an Error regarding the scriptAndy Shaw2018-01-241-2/+3
| | | | | | | | | | Change-Id: I5bc3ca4779ed12d927c3a6a041a81d8e39d5bd1f Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Add support dash (-) symbol in component nameKonstantin Podsvirov2017-12-051-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add colon (:) symbol as alternative separator beetwen component name and version to use dash (-) symbol in component name. For names with dash (-) symbol use colon (:) symbol as separator in dependencies between name and version, even if you do not specify a version. Requirement example: package-with-dash:>=1.2.3, stable:1.x, demo:v1.0-rc1, backward-compatibility:. Also add test 'tst_ComponentIdentifier' for check new feature. Task-number: QTIFW-948 Change-Id: I6340c8001dec369ed8d33fcc4a92c7bce660aec1 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Allow comparing non-numeric versionsKonstantin Podsvirov2017-11-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | Changes: - Improve KDUpdater::compareVersion method; - Add tst_CompareVersion test. Task-number: QTIFW-948 Change-Id: If64f807cfb04e56d2bdd5fa250f456631df3f239 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Merge remote-tracking branch 'origin/3.0'Katja Marttila2017-09-252-3/+173
|\| | | | | | | Change-Id: Id2e682dc2698e08f91bee83e2a94de57403545a0
| * Explicitly declare implicit dependency on QtQml in devtoolJake Petroules2017-09-131-3/+2
| | | | | | | | | | | | Change-Id: I4ef19a4733d5c469676f3b419c6f4adf1e6ff0de Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * binarycreator: Write a proper LSMinimumSystemVersion valueJake Petroules2017-08-301-0/+171
| | | | | | | | | | | | | | | | | | | | This allows macOS to display a proper error message to the user if their OS version is too old, as opposed to (probably) crashing and displaying an error dialog with a stack trace. Change-Id: I37570062d7358cc6304182182f095c9e51e16d06 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Merge remote-tracking branch 'origin/3.0' into masterKatja Marttila2017-08-211-21/+24
|\| | | | | | | | | | | | | | | | | | | Conflicts: dist/config/config.xml dist/packages/org.qtproject.ifw.binaries/meta/package.xml dist/packages/org.qtproject.ifw/meta/package.xml installerfw.pri Change-Id: Ib2ab53321b599eb2e8b1e6e23be2ba507a948c5c
| * Fix syntax errorsJake Petroules2017-07-241-3/+3
| | | | | | | | | | | | | | | | Somehow a newline snuck into the wrong place, and ???? is recognized as a trigraph, which produces a warning. Change-Id: If948c544cba7ca880db4077bc3192332ce87ea52 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>