aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/createDistPackage.py
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2018-05-04 12:42:48 +0200
committerEike Ziller <eike.ziller@qt.io>2018-05-14 08:48:30 +0000
commit1fce7ff4f5244dfb98a5b0a333c52ecaba7e59c4 (patch)
treeef429ba64c79b7ddc644b890b7ae55935495f9b2 /scripts/createDistPackage.py
parent3cfc715d7d33b724ad896c540af4a914d922e9bc (diff)
Fix code signature on macOS
We build packages with extra debug info, but sign the application before removing the debug info for the release package. We have to codesign (potentially again) between copying and packaging. Task-number: QTCREATORBUG-20370 Change-Id: I5549ca5045eb995e5a61794473c2d0180b778711 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'scripts/createDistPackage.py')
-rwxr-xr-xscripts/createDistPackage.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/createDistPackage.py b/scripts/createDistPackage.py
index 2b0c38ea5f..a2bdf1bd19 100755
--- a/scripts/createDistPackage.py
+++ b/scripts/createDistPackage.py
@@ -33,7 +33,8 @@ import tempfile
import common
def parse_arguments():
- parser = argparse.ArgumentParser(description="Create Qt Creator package, filtering out debug information files.")
+ parser = argparse.ArgumentParser(description="Create Qt Creator package, filtering out debug information files.",
+ epilog="To sign the contents before packaging on macOS, set the SIGNING_IDENTITY and optionally the SIGNING_FLAGS environment variables.")
parser.add_argument('--7z', help='path to 7z binary',
default='7z.exe' if common.is_windows_platform() else '7z',
metavar='<7z_binary>', dest='sevenzip')
@@ -52,6 +53,10 @@ def main():
try:
common.copytree(arguments.source_directory, tempdir, symlinks=True,
ignore=(common.is_not_debug if arguments.debug else common.is_debug))
+ # on macOS we might have to codesign (again) to account for removed debug info
+ if not arguments.debug:
+ common.codesign(tempdir)
+ # package
zip_source = os.path.join(tempdir, '*') if arguments.exclude_toplevel else tempdir
subprocess.check_call([arguments.sevenzip, 'a', '-mx9',
arguments.target_archive, zip_source])