This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
macOS: Make framework creation consistent with iOS #54685
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f9e6f3d
Make process_framework args order consistent with iOS
cbracken 59ef990
Extract framework_binary lookup outside process_framework
cbracken e4e50cd
Move zip logic to zip_framework for consistency with iOS
cbracken e5b6da9
Extract process_framework for consistency with iOS
cbracken d4ea26f
Err... keep dSYMs conditional
cbracken File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,15 +118,23 @@ def copy_tree(source_path, destination_path, symlinks=False): | |
shutil.copytree(source_path, destination_path, symlinks=symlinks) | ||
|
||
|
||
def create_fat_macos_framework(fat_framework, arm64_framework, x64_framework): | ||
def create_fat_macos_framework(args, dst, fat_framework, arm64_framework, x64_framework): | ||
"""Creates a fat framework from two arm64 and x64 frameworks.""" | ||
# Clone the arm64 framework bundle as a starting point. | ||
copy_tree(arm64_framework, fat_framework, symlinks=True) | ||
_regenerate_symlinks(fat_framework) | ||
framework_dylib = get_mac_framework_dylib_path(fat_framework) | ||
lipo([get_mac_framework_dylib_path(arm64_framework), | ||
get_mac_framework_dylib_path(x64_framework)], get_mac_framework_dylib_path(fat_framework)) | ||
get_mac_framework_dylib_path(x64_framework)], framework_dylib) | ||
_set_framework_permissions(fat_framework) | ||
|
||
# Compute dsym output path, if enabled. | ||
framework_dsym = None | ||
if args.dsym: | ||
framework_dsym = os.path.join(dst, get_framework_name(fat_framework) + '.dSYM') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alright -- it's over here. |
||
|
||
_process_macos_framework(args, dst, framework_dylib, framework_dsym) | ||
|
||
|
||
def _regenerate_symlinks(framework_dir): | ||
"""Regenerates the framework symlink structure. | ||
|
@@ -182,6 +190,15 @@ def _set_framework_permissions(framework_dir): | |
xargs_subprocess.wait() | ||
|
||
|
||
def _process_macos_framework(args, dst, framework_dylib, dsym): | ||
if dsym: | ||
extract_dsym(framework_dylib, dsym) | ||
|
||
if args.strip: | ||
unstripped_out = os.path.join(dst, 'FlutterMacOS.unstripped') | ||
strip_binary(framework_dylib, unstripped_out) | ||
|
||
|
||
def create_zip(cwd, zip_filename, paths): | ||
"""Creates a zip archive in cwd, containing a set of cwd-relative files. | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.