diff options
author | Tim Jenssen <tim.jenssen@qt.io> | 2023-03-09 17:53:19 +0100 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@qt.io> | 2023-03-09 16:54:44 +0000 |
commit | e0059feef55c17e08c8c3612e4f15c96d64c00b2 (patch) | |
tree | f6cdb022c93c7f05826d9441573c62d5f7e74136 /scripts | |
parent | 339ebeab8e74d394f7f9e2b0f87999314265d43d (diff) | |
download | qt-creator-e0059feef55c17e08c8c3612e4f15c96d64c00b2.tar.gz |
scripts: add license-replacement feature
We also have enterprise dmg for example at the QtDesignStudio
case so we need to replace the default LGPL with enterprise.
Change-Id: I059e056cd4fda02f8befa72a2b694ade471b7f47
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/makedmg.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/makedmg.py b/scripts/makedmg.py index 749a8585ba..9159889bde 100755 --- a/scripts/makedmg.py +++ b/scripts/makedmg.py @@ -19,6 +19,8 @@ def parse_arguments(): parser.add_argument('source_directory', help='directory with the Qt Creator sources') parser.add_argument('binary_directory', help='directory that contains the Qt Creator.app') parser.add_argument('--dmg-size', default='1500m', required=False) + parser.add_argument('--license-replacement', default=None, + help='Absolute path to a license file which replaces the default LICENSE.GPL3-EXCEPT from Qt Creator source directory.') return parser.parse_args() def main(): @@ -31,7 +33,10 @@ def main(): app_path = [app for app in os.listdir(tempdir) if app.endswith('.app')][0] common.codesign(os.path.join(tempdir, app_path)) os.symlink('/Applications', os.path.join(tempdir, 'Applications')) - shutil.copy(os.path.join(arguments.source_directory, 'LICENSE.GPL3-EXCEPT'), tempdir) + license_file = os.path.join(arguments.source_directory, 'LICENSE.GPL3-EXCEPT') + if (arguments.license_replacement): + license_file = arguments.license_replacement + shutil.copy(license_file, tempdir) dmg_cmd = ['hdiutil', 'create', '-srcfolder', tempdir, '-volname', arguments.dmg_volumename, '-format', 'UDBZ', arguments.target_diskimage, '-ov', '-scrub', '-size', arguments.dmg_size, '-verbose'] subprocess.check_call(dmg_cmd) |