Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
f08b1ae6
Unverified
Commit
f08b1ae6
authored
Dec 28, 2020
by
Jenn Magder
Committed by
GitHub
Dec 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid broken symlinks in embedded Flutter frameworks (#73052)
parent
36373f8d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
13 deletions
+36
-13
ios_content_validation_test.dart
dev/devicelab/bin/tasks/ios_content_validation_test.dart
+3
-0
macos_assemble.sh
packages/flutter_tools/bin/macos_assemble.sh
+2
-2
xcode_backend.sh
packages/flutter_tools/bin/xcode_backend.sh
+2
-2
macos_content_validation_test.dart
...test/integration.shard/macos_content_validation_test.dart
+29
-9
No files found.
dev/devicelab/bin/tasks/ios_content_validation_test.dart
View file @
f08b1ae6
...
@@ -80,6 +80,9 @@ Future<void> main() async {
...
@@ -80,6 +80,9 @@ Future<void> main() async {
'Frameworks'
,
'Frameworks'
,
'Flutter.framework'
,
'Flutter.framework'
,
));
));
checkDirectoryNotExists
(
path
.
join
(
outputFlutterFramework
.
path
,
'Headers'
));
checkDirectoryNotExists
(
path
.
join
(
outputFlutterFramework
.
path
,
'Modules'
));
final
File
outputFlutterFrameworkBinary
=
File
(
path
.
join
(
final
File
outputFlutterFrameworkBinary
=
File
(
path
.
join
(
outputFlutterFramework
.
path
,
outputFlutterFramework
.
path
,
'Flutter'
,
'Flutter'
,
...
...
packages/flutter_tools/bin/macos_assemble.sh
View file @
f08b1ae6
...
@@ -109,13 +109,13 @@ EmbedFrameworks() {
...
@@ -109,13 +109,13 @@ EmbedFrameworks() {
# if it doesn't already exist).
# if it doesn't already exist).
local
xcode_frameworks_dir
=
"
${
TARGET_BUILD_DIR
}
/
${
FRAMEWORKS_FOLDER_PATH
}
"
local
xcode_frameworks_dir
=
"
${
TARGET_BUILD_DIR
}
/
${
FRAMEWORKS_FOLDER_PATH
}
"
RunCommand
mkdir
-p
--
"
${
xcode_frameworks_dir
}
"
RunCommand
mkdir
-p
--
"
${
xcode_frameworks_dir
}
"
RunCommand rsync
-av
--delete
--filter
"- .DS_Store
/
"
"
${
BUILT_PRODUCTS_DIR
}
/App.framework"
"
${
xcode_frameworks_dir
}
"
RunCommand rsync
-av
--delete
--filter
"- .DS_Store"
"
${
BUILT_PRODUCTS_DIR
}
/App.framework"
"
${
xcode_frameworks_dir
}
"
# Embed the actual FlutterMacOS.framework that the Flutter app expects to run against,
# Embed the actual FlutterMacOS.framework that the Flutter app expects to run against,
# which could be a local build or an arch/type specific build.
# which could be a local build or an arch/type specific build.
# Copy Xcode behavior and don't copy over headers or modules.
# Copy Xcode behavior and don't copy over headers or modules.
RunCommand rsync
-av
--delete
--filter
"- .DS_Store
/"
--filter
"- Headers/"
--filter
"- Modules/
"
"
${
BUILT_PRODUCTS_DIR
}
/FlutterMacOS.framework"
"
${
xcode_frameworks_dir
}
/"
RunCommand rsync
-av
--delete
--filter
"- .DS_Store
"
--filter
"- Headers"
--filter
"- Modules
"
"
${
BUILT_PRODUCTS_DIR
}
/FlutterMacOS.framework"
"
${
xcode_frameworks_dir
}
/"
# Sign the binaries we moved.
# Sign the binaries we moved.
if
[[
-n
"
${
EXPANDED_CODE_SIGN_IDENTITY
:-}
"
]]
;
then
if
[[
-n
"
${
EXPANDED_CODE_SIGN_IDENTITY
:-}
"
]]
;
then
...
...
packages/flutter_tools/bin/xcode_backend.sh
View file @
f08b1ae6
...
@@ -279,13 +279,13 @@ EmbedFlutterFrameworks() {
...
@@ -279,13 +279,13 @@ EmbedFlutterFrameworks() {
# if it doesn't already exist).
# if it doesn't already exist).
local
xcode_frameworks_dir
=
"
${
TARGET_BUILD_DIR
}
/
${
FRAMEWORKS_FOLDER_PATH
}
"
local
xcode_frameworks_dir
=
"
${
TARGET_BUILD_DIR
}
/
${
FRAMEWORKS_FOLDER_PATH
}
"
RunCommand
mkdir
-p
--
"
${
xcode_frameworks_dir
}
"
RunCommand
mkdir
-p
--
"
${
xcode_frameworks_dir
}
"
RunCommand rsync
-av
--delete
--filter
"- .DS_Store
/
"
"
${
BUILT_PRODUCTS_DIR
}
/App.framework"
"
${
xcode_frameworks_dir
}
"
RunCommand rsync
-av
--delete
--filter
"- .DS_Store"
"
${
BUILT_PRODUCTS_DIR
}
/App.framework"
"
${
xcode_frameworks_dir
}
"
# Embed the actual Flutter.framework that the Flutter app expects to run against,
# Embed the actual Flutter.framework that the Flutter app expects to run against,
# which could be a local build or an arch/type specific build.
# which could be a local build or an arch/type specific build.
# Copy Xcode behavior and don't copy over headers or modules.
# Copy Xcode behavior and don't copy over headers or modules.
RunCommand rsync
-av
--delete
--filter
"- .DS_Store
/"
--filter
"- Headers/"
--filter
"- Modules/
"
"
${
BUILT_PRODUCTS_DIR
}
/Flutter.framework"
"
${
xcode_frameworks_dir
}
/"
RunCommand rsync
-av
--delete
--filter
"- .DS_Store
"
--filter
"- Headers"
--filter
"- Modules
"
"
${
BUILT_PRODUCTS_DIR
}
/Flutter.framework"
"
${
xcode_frameworks_dir
}
/"
if
[[
"
$ACTION
"
!=
"install"
||
"
$ENABLE_BITCODE
"
==
"NO"
]]
;
then
if
[[
"
$ACTION
"
!=
"install"
||
"
$ENABLE_BITCODE
"
==
"NO"
]]
;
then
# Strip bitcode from the destination unless archiving, or if bitcode is disabled entirely.
# Strip bitcode from the destination unless archiving, or if bitcode is disabled entirely.
RunCommand
"
${
DT_TOOLCHAIN_DIR
}
"
/usr/bin/bitcode_strip
"
${
BUILT_PRODUCTS_DIR
}
/Flutter.framework/Flutter"
-r
-o
"
${
xcode_frameworks_dir
}
/Flutter.framework/Flutter"
RunCommand
"
${
DT_TOOLCHAIN_DIR
}
"
/usr/bin/bitcode_strip
"
${
BUILT_PRODUCTS_DIR
}
/Flutter.framework/Flutter"
-r
-o
"
${
xcode_frameworks_dir
}
/Flutter.framework/Flutter"
...
...
packages/flutter_tools/test/integration.shard/macos_content_validation_test.dart
View file @
f08b1ae6
...
@@ -78,19 +78,39 @@ void main() {
...
@@ -78,19 +78,39 @@ void main() {
expect
(
vmSnapshot
.
existsSync
(),
buildMode
==
'Debug'
);
expect
(
vmSnapshot
.
existsSync
(),
buildMode
==
'Debug'
);
final
File
outputFlutterFrameworkBinary
=
final
Directory
outputFlutterFramework
=
fileSystem
.
directory
(
fileSystem
.
file
(
fileSystem
.
path
.
join
(
fileSystem
.
path
.
join
(
outputApp
.
path
,
outputApp
.
path
,
'Contents'
,
'Contents'
,
'Frameworks'
,
'Frameworks'
,
'FlutterMacOS.framework'
,
'FlutterMacOS.framework'
,
'FlutterMacOS'
,
),
));
);
expect
(
outputFlutterFrameworkBinary
,
exists
);
// Check complicated macOS framework symlink structure.
final
Link
current
=
outputFlutterFramework
.
childDirectory
(
'Versions'
).
childLink
(
'Current'
);
expect
(
current
.
targetSync
(),
'A'
);
expect
(
outputFlutterFramework
.
childLink
(
'FlutterMacOS'
).
targetSync
(),
fileSystem
.
path
.
join
(
'Versions'
,
'Current'
,
'FlutterMacOS'
));
expect
(
outputFlutterFramework
.
childLink
(
'Resources'
),
exists
);
expect
(
outputFlutterFramework
.
childLink
(
'Resources'
).
targetSync
(),
fileSystem
.
path
.
join
(
'Versions'
,
'Current'
,
'Resources'
));
expect
(
outputFlutterFramework
.
childLink
(
'Headers'
),
isNot
(
exists
));
expect
(
outputFlutterFramework
.
childDirectory
(
'Headers'
),
isNot
(
exists
));
expect
(
outputFlutterFramework
.
childLink
(
'Modules'
),
isNot
(
exists
));
expect
(
outputFlutterFramework
.
childDirectory
(
'Modules'
),
isNot
(
exists
));
// Archiving should contain a bitcode blob, but not building.
// Archiving should contain a bitcode blob, but not building.
// This mimics Xcode behavior and present a developer from having to install a
// This mimics Xcode behavior and present a developer from having to install a
// 300+MB app.
// 300+MB app.
final
File
outputFlutterFrameworkBinary
=
outputFlutterFramework
.
childDirectory
(
'Versions'
)
.
childDirectory
(
'A'
)
.
childFile
(
'FlutterMacOS'
);
expect
(
expect
(
await
containsBitcode
(
outputFlutterFrameworkBinary
.
path
),
await
containsBitcode
(
outputFlutterFrameworkBinary
.
path
),
isFalse
,
isFalse
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment