forked from qt-creator/qt-creator
Revert "scripts: add ignore-codesign-paths feature"
This reverts commit cc4914ff83
.
Reason for revert: did not work
Change-Id: Ib6e860f93a23bb599a4c6da98e23117498ff294a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -228,22 +228,16 @@ def conditional_sign_recursive(path, filter):
|
|||||||
if is_mac_platform():
|
if is_mac_platform():
|
||||||
os_walk(path, filter, lambda fp: codesign_executable(fp))
|
os_walk(path, filter, lambda fp: codesign_executable(fp))
|
||||||
|
|
||||||
def is_filtered(path, ignore_paths):
|
def codesign(app_path):
|
||||||
for ignore_path in ignore_paths:
|
|
||||||
if path.startswith(ignore_path):
|
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
def codesign(app_path, filter_paths):
|
|
||||||
codesign = codesign_call()
|
codesign = codesign_call()
|
||||||
if not codesign or not is_mac_platform():
|
if not codesign or not is_mac_platform():
|
||||||
return
|
return
|
||||||
# sign all executables in Resources
|
# sign all executables in Resources
|
||||||
conditional_sign_recursive(os.path.join(app_path, 'Contents', 'Resources'),
|
conditional_sign_recursive(os.path.join(app_path, 'Contents', 'Resources'),
|
||||||
lambda ff: os.access(ff, os.X_OK) and not is_filtered(ff, filter_paths))
|
lambda ff: os.access(ff, os.X_OK))
|
||||||
# sign all libraries in Imports
|
# sign all libraries in Imports
|
||||||
conditional_sign_recursive(os.path.join(app_path, 'Contents', 'Imports'),
|
conditional_sign_recursive(os.path.join(app_path, 'Contents', 'Imports'),
|
||||||
lambda ff: ff.endswith('.dylib') and not is_filtered(ff, filter_paths))
|
lambda ff: ff.endswith('.dylib'))
|
||||||
|
|
||||||
# sign the whole bundle
|
# sign the whole bundle
|
||||||
entitlements_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'dist',
|
entitlements_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'dist',
|
||||||
|
@@ -19,8 +19,6 @@ def parse_arguments():
|
|||||||
parser.add_argument('source_directory', help='directory with the Qt Creator sources')
|
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('binary_directory', help='directory that contains the Qt Creator.app')
|
||||||
parser.add_argument('--dmg-size', default='1500m', required=False)
|
parser.add_argument('--dmg-size', default='1500m', required=False)
|
||||||
parser.add_argument('--ignore-codesign-paths', default=None, required=False, help='A list of paths separated by "," relative from the binary_directory. ' +
|
|
||||||
'example ignore-codesign-paths for content that is already signed: "installed/Qt DesignStudio.app/Resources/qt6_design_studio_reduced_version"')
|
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
@@ -31,10 +29,7 @@ def main():
|
|||||||
common.copytree(arguments.binary_directory, tempdir, symlinks=True, ignore=common.is_debug)
|
common.copytree(arguments.binary_directory, tempdir, symlinks=True, ignore=common.is_debug)
|
||||||
if common.is_mac_platform():
|
if common.is_mac_platform():
|
||||||
app_path = [app for app in os.listdir(tempdir) if app.endswith('.app')][0]
|
app_path = [app for app in os.listdir(tempdir) if app.endswith('.app')][0]
|
||||||
if arguments.ignore_codesign_paths:
|
common.codesign(os.path.join(tempdir, app_path))
|
||||||
ignore_codesign_paths = arguments.ignore_codesign_paths.split(',')
|
|
||||||
ignore_codesign_paths = [os.path.join(tempdir_base, path) for path in ignore_codesign_paths]
|
|
||||||
common.codesign(os.path.join(tempdir, app_path), ignore_codesign_paths)
|
|
||||||
os.symlink('/Applications', os.path.join(tempdir, 'Applications'))
|
os.symlink('/Applications', os.path.join(tempdir, 'Applications'))
|
||||||
shutil.copy(os.path.join(arguments.source_directory, 'LICENSE.GPL3-EXCEPT'), tempdir)
|
shutil.copy(os.path.join(arguments.source_directory, 'LICENSE.GPL3-EXCEPT'), tempdir)
|
||||||
dmg_cmd = ['hdiutil', 'create', '-srcfolder', tempdir, '-volname', arguments.dmg_volumename,
|
dmg_cmd = ['hdiutil', 'create', '-srcfolder', tempdir, '-volname', arguments.dmg_volumename,
|
||||||
|
Reference in New Issue
Block a user