summaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* 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>
| * Write plists in the correct format, using v1.0 and with tabsJake Petroules2017-07-191-19/+19
| | | | | | | | | | Change-Id: I496446d95b5523087e3d15ab3ad7cba697dea361 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * Fix install type if --online-only passed to binarycreatorKatja Marttila2017-06-221-2/+5
| | | | | | | | | | | | | | | | | | Binarycreator assumed that install type is offline if no repositories was set although --online-only was set. However, repositories might be set later, for example in producetkeycheck::init(). Change-Id: Idd6d0e3304974773baefe3773be7e2948704575c Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Fix adding SHA1 nodeKonstantin Podsvirov2017-06-071-4/+20
| | | | | | | | | | | | | | | | | | | | Searching existing sha1sum node and keep/replace/add it if needed. These changes correct the adding of two SHA1 nodes when the packages are repackaged (option --repository via repogen and binarycreator) Change-Id: Ide99946644fd73fadc63f23d34d7aec16b0399a2 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Merge remote-tracking branch 'origin/3.0'Katja Marttila2017-03-303-0/+3
|\| | | | | | | Change-Id: Ic3c8005de03b2cc71436aaa18486085a845dca78
| * Merge remote-tracking branch 'origin/2.0' into 3.0Katja Marttila2017-03-303-0/+3
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/libs/installer/downloadfiletask.cpp Change-Id: Ie4b07c402a63c7a12ecf24e52e197507bbb2c5df
| | * QRegExp include cleanupSamuel Gaist2017-03-133-0/+3
| | | | | | | | | | | | | | | | | | | | | This patch adds the missing include statements for QRegExp. Change-Id: I05fed3e83514af895b95a3df746b0ae1e6b31828 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | Teach 'binarycreator' and 'repogen' to repack packages from repositoryKonstantin Podsvirov2017-03-134-258/+456
|/ / | | | | | | | | | | | | | | | | | | | | | | | | To both tools added options: --repository The directory containing the available repository. --ignore-invalid-repositories Ignore all invalid repositories instead of aborting. Documentation added to ifw-tools.html page. Task-number: QTIFW-925 Change-Id: I36519385df6166d0e450c0ef9d7df44c8611d6a6 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Merge remote-tracking branch 'origin/2.0'Katja Marttila2017-01-3023-391/+276
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2624-408/+288
| | | | | | | | | | Change-Id: I6426c4e8f932cf26c6c638dec18d0c12e22972d1 Reviewed-by: Janne Anttila <janne.anttila@theqtcompany.com>
* | Revert "Allow signing maintenancetool in Windows"Katja Marttila2016-09-152-17/+3
| | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/2.0'Katja Marttila2016-06-214-2/+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/7zip/7zip.pro src/libs/7zip/win/CPP/7zip/UI/Common/Update.cpp src/libs/installer/component.cpp src/libs/installer/lib7z_facade.cpp src/libs/installer/packagemanagercore.cpp src/libs/installer/proxycredentialsdialog.h src/sdk/translations/ja.ts tests/auto/installer/messageboxhandler/tst_messageboxhandler.cpp tests/auto/installer/scriptengine/tst_scriptengine.cpp tests/auto/installer/settings/tst_settings.cpp Change-Id: I3bb98b8490b3c3eb7f664c1abb7417155b5430b2
| * add make install functionality with INSTALL_ROOTKatja Marttila2016-05-194-0/+12
| | | | | | | | | | | | Change-Id: I8bad1c9bbe7b705ff0842f15fb0c9bc6c127e9bc Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
| * Update minimum Qt version for 2.0.3 releaseKatja Marttila2016-03-221-2/+0
| | | | | | | | | | | | | | Minimum required version is now Qt5.5 Change-Id: If000a507f0067650605987d38374bf6694eb16aa Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
| * Fix compile with namespace'ed Qt.Karsten Heimrich2016-01-211-1/+2
| | | | | | | | | | Change-Id: I9c0d399943d2f6eb9a0ab136abf24a5c8b108abb Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
* | Allow signing maintenancetool in WindowsKatja Marttila2016-06-212-3/+17
| | | | | | | | | | | | | | | | | | 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>
* | Fixed (and greatly simplified) creating .dmg filesFrerich Raabe2016-04-083-79/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Add new '--sign' switch to binarycreator for signing OS X app bundlesFrerich Raabe2016-02-181-2/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces -s/--sign switches for binarycreator which are only available on OS X. Using these switches, a 'Code Signing Identity' can be configured which should be used for signing the generated .app bundle. Signing the application bundles avoids that Apple's Gatekeeper complains about the application coming from an unidentified publisher. Change-Id: I507c6cac0b99faf19faf48c21e47a2df054b0b11 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>