forked from qt-creator/qt-creator
scripts: add ignore-codesign-paths feature
QtDesignStudio packages Qt into the dmg which is already codesigned. Change-Id: I8d0f0d6df1e8792e44ef93ab6f871e6eecad7183 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -228,16 +228,22 @@ def conditional_sign_recursive(path, filter):
|
||||
if is_mac_platform():
|
||||
os_walk(path, filter, lambda fp: codesign_executable(fp))
|
||||
|
||||
def codesign(app_path):
|
||||
def is_filtered(path, ignore_paths):
|
||||
for ignore_path in ignore_paths:
|
||||
if path.startswith(ignore_path):
|
||||
return True
|
||||
return False
|
||||
|
||||
def codesign(app_path, filter_paths):
|
||||
codesign = codesign_call()
|
||||
if not codesign or not is_mac_platform():
|
||||
return
|
||||
# sign all executables in Resources
|
||||
conditional_sign_recursive(os.path.join(app_path, 'Contents', 'Resources'),
|
||||
lambda ff: os.access(ff, os.X_OK))
|
||||
lambda ff: os.access(ff, os.X_OK) and not is_filtered(ff, filter_paths))
|
||||
# sign all libraries in Imports
|
||||
conditional_sign_recursive(os.path.join(app_path, 'Contents', 'Imports'),
|
||||
lambda ff: ff.endswith('.dylib'))
|
||||
lambda ff: ff.endswith('.dylib') and not is_filtered(ff, filter_paths))
|
||||
|
||||
# sign the whole bundle
|
||||
entitlements_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'dist',
|
||||
|
Reference in New Issue
Block a user