summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Jenssen <tim.jenssen@qt.io>2023-03-09 17:53:19 +0100
committerTim Jenssen <tim.jenssen@qt.io>2023-03-09 16:55:08 +0000
commit52553f2e0a15cf61b7e241dd051ce94dab2caa6a (patch)
tree622b904760a56f53e75bf66870cb9927ca1cb709
parent73d0087251f0d5b748207072aa7c0f3334972539 (diff)
downloadqt-creator-52553f2e0a15cf61b7e241dd051ce94dab2caa6a.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> (cherry picked from commit e0059feef55c17e08c8c3612e4f15c96d64c00b2)
-rwxr-xr-xscripts/makedmg.py7
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)