forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -177,3 +177,13 @@ def is_debug(path, filenames):
|
||||
def is_not_debug(path, filenames):
|
||||
files = [fn for fn in filenames if os.path.isfile(os.path.join(path, fn))]
|
||||
return [fn for fn in files if not is_debug_file(os.path.join(path, fn))]
|
||||
|
||||
def codesign(app_path):
|
||||
signing_identity = os.environ.get('SIGNING_IDENTITY')
|
||||
if is_mac_platform() and signing_identity:
|
||||
codesign_call = ['codesign', '--force', '--deep', '-s', signing_identity, '-v']
|
||||
signing_flags = os.environ.get('SIGNING_FLAGS')
|
||||
if signing_flags:
|
||||
codesign_call.extend(signing_flags.split())
|
||||
codesign_call.append(app_path)
|
||||
subprocess.check_call(codesign_call)
|
||||
|
Reference in New Issue
Block a user