aboutsummaryrefslogtreecommitdiffstats
path: root/packaging-tools/create_installer.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix online repository build uploadAntti Kokko2019-04-081-1/+1
| | | | | | | | | | This fix aims to adapt to "scp: error: unexpected filename ." error seen in online repository builds. This was caused by change in OpenSSH server code due to a security vulnerability CVE-2018-20685. Change-Id: Ie05065d3c24b59ac17cc814d8324e66eef49eb29 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* enable static data files againTim Jenssen2019-02-121-37/+12
| | | | | | | | | | | Copy the data directory if that exists to the content. This is a shortcut for not compressed files in a package. Binarycreator does the compressing job then. Remove static_component it is not used and makes not so much sense if every component can have static data. Change-Id: Ie0894a99f3a998be20c324dd728aefc312d16ff3 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Add support for component sha1 substitutionSamuli Piippo2019-02-071-0/+26
| | | | | | | | | | | New component configs 'component_sha1_uri' and 'component_sha1_file' can define a URI to a downloadable file and file path inside a downloadable archive, respectively. The file is used to read a sha1 for the component, which can then be used with substitution '%COMPONENT_SHA1%'. Task-number: AUTOSUITE-760 Change-Id: If0d2a30c6e07f61df89609194ce96077e81fa9a8 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Apply all subtitutions to the package namesSamuli Piippo2019-01-081-14/+3
| | | | | | | | | Rename the package components and template files using all substitutions, instead of just the predefined QT_PKG_VERSION. Change-Id: Iaedef6ac3bd7e4a316e445c6a05297d0ce4aa845 Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* Add maximum CPU count for create_installer.py as optional parameterAkseli Salovaara2018-12-101-3/+11
| | | | | | | | | | | | | | | | | | | Current implementation of create_installer.py uses eight CPU cores as maximum. Add maximum CPU count for create_installer.py as optional parameter in order to limit build to e.g. single core on local builds where output log readability is more important than performance. Default value is kept on eight CPU cores. Setting higher value is possible but futile as create_installer.py already limits use of CPU cores to hardware real maximum with multiprocessing cpu_count method. Note that maximum CPU count option is not intended for production builds and therefore no release description file substitution support is added. Suppress also one unrelated pylint warning. Change-Id: I53444193e8320a63c023fe0a246fb4bd3ca0288d Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* Fix macOS debug information files removal on create_installer.pyAkseli Salovaara2018-11-091-3/+8
| | | | | | | | | | Previous implementation checked dSYM folders only for first package tree element. We need to check recursively for whole package tree in order to find dSYM folders also from plugins subfolders. Change-Id: Ib9d0d12bf17aaf818414e008f0825312afb1016f Reviewed-by: Antti Kokko <antti.kokko@qt.io> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Add package template name version variable handlingAkseli Salovaara2018-08-031-8/+30
| | | | | | | | | Generic Qt package templates have version substitutions on package names. Add package name version substitution handling for QT_PKG_VERSION and QT_PKG_VERSION_MINOR variables. Change-Id: I2ccdd72da7a09b9b0215c0fbba03a8e80d7f38dd Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* Fix unified package handling logicAntti Kokko2018-05-251-1/+6
| | | | | | | | | | Enables handling all offline packaging jobs where the offline template file is used. Remove unnecessary parameter when creating build job from batch_process_installer_bld.py. Change-Id: Ie001615fec6db7fae69d9e559a736a7305fe5ac8 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Revert "Revert "Add support for unified packaging configuration""Antti Kokko2018-05-251-26/+24
| | | | | | | | | Fixing issues with another patch set on top of this change. This reverts commit ed017afe477b55bd01bd16185ac83d3558ac1c5b. Change-Id: Ia0a3ce99b23c53082d4fcb2a37d4b36db1495ca9 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Revert "Add support for unified packaging configuration"Antti Kokko2018-05-231-24/+26
| | | | | | | | | Causes multitude of problems, reverting and fixing. This reverts commit 3055eab4c65a45d292c76335a965777a019942bf. Change-Id: I5639fbf6f02d90312cf068720b9b9d29126b4b87 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Add support for unified packaging configurationAntti Kokko2018-05-231-26/+24
| | | | | | | | | | | | | Add support to 'include_filter' parameter used in packaging configuration to separate between commercial and lgpl build. For example for license repository commercial and lgpl licenses are marked 'include_filter: opensource' or 'include_filter: enterprise', components without the include filter are always included. Change-Id: I4ce81a79e7fdf2320eb4ae0f89dd950e84bd1f93 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Extend remove debug information files to accept file type as parameterAkseli Salovaara2018-05-181-7/+23
| | | | | | | | | | | | | | | | | Current implementation of removing debug information files assume that host and target are same operating system. Extend implementation to accept also debug information file type as configuration parameter instead of just 'True' and 'False' values. Extended implementation doesn't validate file type and skip host check completely. This allows e.g. removal of MSVC pdb files on Linux host repository builds. With 'True' and 'False' values feature continues to work as before because we don't want to break existing configurations. Change-Id: I22cb0603ea2832696825c2582b2d2c775cf47249 Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
* Don't remove debug symbols from debug info archives on create_installerAkseli Salovaara2018-05-181-1/+3
| | | | | | | | | | | | | | Current implementation of REMOVE_DEBUG_INFORMATION_FILES is to check and remove debug information files from all archives during installer and repository creation. Change implementation so that we skip always debug information specific archives. If surch archives are present in package configurations it definitely means that debug information is intended to be part of installer and reposity regardless of removal flag usage. Change-Id: I3c69f90d4f0a0637f88b004b1d94457078209f46 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Fix unintentional debug library removal bug from create_installer.pyv5.11.0-beta4-packagingAkseli Salovaara2018-04-181-2/+2
| | | | | | | | | | Due to insufficient if statement condition check all debug libraries are unintentionally removed from online repository and offline installer builds. Add missing condition check to both debug library and debug information files removals. Change-Id: Ib42f8dad774e4b6777f24525a0e70f3abdfd0700 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Extend debug libraries removal to macOS and Linux platformsAkseli Salovaara2018-04-131-65/+109
| | | | | | | | | | | | Extend debug libraries and debug information files removal to macOS and Linux host packaging. Patch introduces two new substitution parameters for controlling debug file removal. Current packaging configurations and releases already use previous Windows specific parameter names so those are kept as alternative values for backward compatibility reasons. Change-Id: I70389dcffb39a3c143024657df29f8b7809cda8d Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Remove Windows debug libraries during installer buildAkseli Salovaara2018-03-281-0/+46
| | | | | | | | | | | During packaging we don't necessarily have reliable source for library names. We trust Windows debug library filenames to follow *d.dll | *d.lib industry standard naming convention. We must consider that library filenames can end with letter 'd' in release build and exclude those from removable items. Change-Id: I1727042c36c0038a354e9df7a81d045e5591f7ac Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* create_offline_repository() -> create_online_repository()Iikka Eklund2018-02-021-4/+4
| | | | | | | Fix function name. Change-Id: Ia147b795459c64192b59dbf71dd73916450b507b Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* create_installer.py should not build the ifw toolsIikka Eklund2018-02-021-132/+49
| | | | | | | | | We've never used the "devmode" actually so remove it. The ifw tools are built separately using the bld_ifw_tools.py. The create_installer takes the ifw tools archive as an argument for the script. Change-Id: Ieb18032e6e7c83ab4fffe3ba3e589133ddf735d2 Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
* Remove unused arguments for create_installer.pyIikka Eklund2018-02-021-45/+0
| | | | | | | | | The removed options were used for installer name only long time ago. Nowadays we explicitly define the final installer name with another option switch. Change-Id: Ic937f727ef5ff8fe4b934e4fbc30024c83e647e0 Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
* Remove deprecated option from create_installer.pyIikka Eklund2018-02-021-23/+3
| | | | | | | | We do not use nor support legacy ifw tools anymore. Change-Id: I865b52d2b118ded9557632396407b861dc726162 Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io> Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* Remove Win OS requirement for removing pdb filesMikko Gronoff2017-12-131-24/+23
| | | | | | | | | | Device Creation emulator packaging is not done on Windows platform. Removing the Win OS requirement allows Device Creation Windows Emulator packaging with pdb files removed. Task-number: QTBUG-64838 Change-Id: I03eb85a850bfc1d67e9479f40280150970a61cae Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Remove offline part of IF condition for removing .pdb filesMikko Gronoff2017-12-121-3/+4
| | | | | | | | | | | | Windows emulator component for Device Creation needs this as well and as the removal is explicitly defined with the REMOVE_PDB_FILES variable, removing the offline clause from the pdb removal part enables the use also for emulator (online installer). Task-number: QTBUG-64838 Change-Id: I5700ff263d4cef2edc5216c7238a4fbe2c4a6096 Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
* Use online-only flag when creating maintenancetoolKatja Marttila2017-11-211-1/+1
| | | | | Change-Id: I14173f0e038b36982205bbda7334229483d38464 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* create_installer: Use bldinstallercommon.remove_one_tree_levelv5.10.0-beta4-packagingEike Ziller2017-11-091-25/+1
| | | | | Change-Id: Idefd935584878e4567dde1e9dd6383544618d504 Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* Fix remove pdb files in windowsSimo Fält2017-05-261-4/+5
| | | | | | Change-Id: I878a9669b6e4a3642ea76cbcafbefedb46351efd Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io> Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* Add option to remove pdb files from offline installerAkseli Salovaara2017-05-151-0/+35
| | | | | | | | | | | | | | | | | | | | In order to provide single offline installer for Windows pdb files has to be removed from installer and packaged separately. Otherwise installer size is more than 4GB and becomes invalid win32 application. This patch introduces --remove-pdb-files command line option for excluding pdb files from offline installer during installer build. By default --remove-pdb-files option is false. Implementation is limited to Windows and offline installer only. Using option on other platforms or with online installer build doesn't stop build but prints out only informative message about option usage limitations. Change-Id: I222ba55089791dab0d8bb3f2b635a50c001aabec Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Fix --archive-skip option in create_installer.pyIikka Eklund2017-05-021-16/+17
| | | | | | Change-Id: I8844ab39924208b438a77376e6d09bf46aca8672 Reviewed-by: Antti Kokko <antti.kokko@qt.io> Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
* Support multiple package namespaces in configuration filesIikka Eklund2016-11-221-3/+4
| | | | | | | | | | | | | Add possibility to add multiple package namespaces using comma separated list. Example: [PackageNamespace] name: qt, mycompany, foobar Change-Id: I80ca5a524f3307842152ff5f948790e77eece6d9 Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* Add temporary verbose for offline buildsAntti Kokko2016-10-281-0/+2
| | | | | | | This will be reverted when the problem is solved. Change-Id: Id1514adc9f129945f6fa323f127f11e14a32dfdc Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
* Check '7z' tool from env betterIikka Eklund2016-10-281-10/+2
| | | | | | | | Do not assume that '7z' exists as such in the directory names specified by the $PATH. Instead try to find the executable. Change-Id: Ic8c3a4aa21012b6968d74a5a05fdb8795be86bc4 Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
* Increased dmg image sizeJani Heikkinen2016-09-201-1/+1
| | | | | | | | | Creating combined android-ios package failed with devicehdiutil: create failed - No space left on device --> Increased size from 3 to 4g Change-Id: I473c30595c609e382c09e1d0efcbf19b0fb36d07 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Revert "Use only one thread when creating installers or online repositories"Iikka Eklund2016-08-231-1/+2
| | | | | | | | | | We are now raising exception instead of using sys.exit() so we can switch back to use multiple threads safely. This reverts commit 809ded7f79ab3d93640e3ec8f65b6b7d2c5ee4d7. Change-Id: Ia98a208bea09e260b47f0274f77513fe3f08e2c8 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Raise exception instead of using sys.exitIikka Eklund2016-08-231-28/+19
| | | | | | | | | The sys.exit terminates just the current thread. This is an issue if using the threadedwork.py with multiple threads as any failure should terminate the whole script. Change-Id: I9926c4cf9c6754a5182d331dae5a2e66c5ff95b6 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* create_installer: substitute global keys also in package componentsEike Ziller2016-08-101-1/+4
| | | | | | | | | The release configurations contain arg_substitution_list entries which are used for the various configuration files. Also use them for the package meta data. Change-Id: I0e5be8ea082a5eee7172214a9a3c84637aa97a46 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Change arg_substitution_list variable scheme to %FOO_BAR%Eike Ziller2016-08-101-1/+1
| | | | | | | | | The @ that currently is used, is also used by 'regular' installer variables. Use % to make origin clear and avoid potential conflicts when we also substitute in package.xml and installscript.qs files. Change-Id: Ifb71a21561c23011f8779dc1999210e75b062e47 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Properly label macOS components as "macOS" instead of "OS X".Jake Petroules2016-06-281-2/+2
| | | | | | | This follows the rebranding of Apple's desktop operating system. Change-Id: Ied1e167f65772c2a79f39ca79d3c929925c374a7 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Use only one thread when creating installers or online repositoriesIikka Eklund2016-05-251-2/+1
| | | | | | | | | | | | | Error handling is not implemented properly if using multiple threads. When using multiple threads any error gets silently ignored and the script happily continues execution. This will lead into silent errors in the produced installers. Force single threaded usage for now. Change-Id: I1c0b356af20e27cc13c1b5ace05590eebf640b65 Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io> Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* Update ifw buildsIikka Eklund2016-04-131-1/+2
| | | | | | | | | | | | | | | | Openssl usage on Windows only for static builds. Exclude dbus from dynamic Qt builds as it is not needed when creating documentation packages. No need to bundle qt_menu.nib anymore in Mac packages. Prepend OS and architecture in the generated ifw installer packages. Change-Id: Iccd90e29f71f06c6fc9724f086cdc4946ea7905c Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com> Reviewed-by: Katja Marttila <katja.marttila@theqtcompany.com>
* Fix bld_ifw_tools.py usage in create_installer.pyIikka Eklund2016-04-121-3/+3
| | | | | | | Function signatures changed in bld_ifw_tools.py. Change-Id: I23c54299b75b52d9411d8ce47113fb2eaa4db524 Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
* Use short path names on WindowsIikka Eklund2015-11-021-0/+6
| | | | | | | | | Temporary paths exceed 255 characters on Windows which cause errors when handling the paths. Use win32api to generate Windows short style paths. Change-Id: I7863258024f922c39b475bde9f003d799e429102 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Revert "Use unique filenames for downloaded archives"Iikka Eklund2015-10-051-8/+2
| | | | | | | | | | Random string ends up in offline/online repository archive names but not in metadata so it will not work. This reverts commit eb7e0ccf0df760d3f8d13a146b896297180cd6e5. Change-Id: I665624516c700dfa328ee46650b892162e50909b Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
* Use unique filenames for downloaded archivesIikka Eklund2015-09-281-2/+8
| | | | | | | | | | | | | | | Prepend the downloaded archives with random string so that they are unique. The packages are downloaded into same directory thus the filenames must not collide. Packages from qt-ci may have same filenames hence this change is needed. Change-Id: I2671e6a16795902ee45a68504507aa06fad7a657 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com> Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Add sanity checks in packaging scriptsIikka Eklund2015-09-011-2/+4
| | | | | | | | Verify the output when executing subprocesses or attempting to delete directories. Abort script if failure occurs. Change-Id: I0ca27513b9a133ea50e1f08cc1a7240de9fed804 Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
* Revert logic to remove previously created IFW tools folderAntti Kokko2015-08-281-2/+1
| | | | | | | - Caused regression in offline build Change-Id: I691931e950b4a75d844ea3f6a3a817e44274d627 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* improve do_execute_sub_process useTim Jenssen2015-08-211-6/+6
| | | | | | | | - use better defaults - remove hidden boolean arguments Change-Id: I4272f3bb2063f0a70afabda42f0f335eb0f6ef48 Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
* Add logic to remove previously created IFW tools folderAntti Kokko2015-08-201-1/+2
| | | | | | | Always ensure that new IFW tools are used. Change-Id: I99f679e78162b62b5bd6fd96802e8cfeb91f1037 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Add possibility to define license resource in the installer binaryIikka Eklund2015-06-241-4/+8
| | | | | | | | | | | | | | | | | | | If license.qrc exists in the config template directory then compile the given resource as a part of the installer binary. The license.qrc can be e.g. <!DOCTYPE RCC><RCC version="1.0"> <qresource> <file>license.txt</file> </qresource> </RCC> It is up to the license checker plugin to parse the contents. Change-Id: I778a53e6fccb41210fc91db3dc4a290ec7a62801 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
* Increased image sizeJani Heikkinen2015-04-301-1/+1
| | | | | | | | | Creating combined android-ios package failed with devicehdiutil: create failed - No space left on device --> Increased size from 2 to 3g Change-Id: Ic3c61805dd56f8ba45f7d7d9cd459b87e0135d2f Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
* create_installer: Fix continued indentationSergio Ahumada2015-03-111-60/+60
| | | | | Change-Id: I3a2a4e9451a6815891aee5f3f94bc36301708125 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Clean up unused variables and importsSergio Ahumada2015-03-101-5/+4
| | | | | | | | | | | | | | | | | | | | | | | * remove unused imports * remove unused variables * replace unused variables with 'dummy', this is the suggested and most common way to deal with variables that need to be defined but are never used and it also makes pylint not to complain, eg: for root, dir, files in os.walk(directory): for basename in files: if fnmatch.fnmatch(basename, '*.pro'): filename = os.path.join(root, basename) since 'dirs' is never used, we replace it with 'dummy' for root, dummy, files in os.walk(directory): for basename in files: if fnmatch.fnmatch(basename, '*.pro'): filename = os.path.join(root, basename) Change-Id: I850c2c2a8ae60035d0cc5bf6c3429ff8640f9f11 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>