mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
(Reland) "[gn + codesign] codesign metadata for FlutterMacOS.framework.zip" (flutter/engine#40508)
(Reland) "[gn + codesign] codesign metadata for FlutterMacOS.framework.zip"
This commit is contained in:
parent
c5e5940006
commit
3d923229b4
@ -127,6 +127,11 @@ def regenerate_symlinks(fat_framework):
|
||||
)
|
||||
|
||||
|
||||
def embed_codesign_configuration(config_path, content):
|
||||
with open(config_path, 'w') as file:
|
||||
file.write(content)
|
||||
|
||||
|
||||
def process_framework(dst, args, fat_framework, fat_framework_binary):
|
||||
if args.dsym:
|
||||
dsym_out = os.path.splitext(fat_framework)[0] + '.dSYM'
|
||||
@ -146,9 +151,25 @@ def process_framework(dst, args, fat_framework, fat_framework_binary):
|
||||
|
||||
# Zip FlutterMacOS.framework.
|
||||
if args.zip:
|
||||
filepath_with_entitlements = ''
|
||||
filepath_without_entitlements = 'FlutterMacOS.framework/Versions/A/FlutterMacOS'
|
||||
|
||||
embed_codesign_configuration(
|
||||
os.path.join(dst, 'entitlements.txt'), filepath_with_entitlements
|
||||
)
|
||||
|
||||
embed_codesign_configuration(
|
||||
os.path.join(dst, 'without_entitlements.txt'),
|
||||
filepath_without_entitlements
|
||||
)
|
||||
subprocess.check_call([
|
||||
'zip', '-r', '-y', 'FlutterMacOS.framework.zip',
|
||||
'FlutterMacOS.framework'
|
||||
'zip',
|
||||
'-r',
|
||||
'-y',
|
||||
'FlutterMacOS.framework.zip',
|
||||
'FlutterMacOS.framework',
|
||||
'entitlements.txt',
|
||||
'without_entitlements.txt',
|
||||
],
|
||||
cwd=dst)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user