Unverified Commit 761b109b authored by Zachary Anderson's avatar Zachary Anderson Committed by GitHub

Adjust lipo thinning input/output for macOS (#97111)

parent 0978b96e
......@@ -36,7 +36,7 @@ abstract class UnpackMacOS extends Target {
@override
List<Source> get outputs => const <Source>[
Source.pattern('{OUTPUT_DIR}/FlutterMacOS.framework/FlutterMacOS'),
Source.pattern('{OUTPUT_DIR}/FlutterMacOS.framework/Versions/A/FlutterMacOS'),
];
@override
......@@ -67,7 +67,11 @@ abstract class UnpackMacOS extends Target {
);
}
final File frameworkBinary = environment.outputDir.childDirectory('FlutterMacOS.framework').childFile('FlutterMacOS');
final File frameworkBinary = environment.outputDir
.childDirectory('FlutterMacOS.framework')
.childDirectory('Versions')
.childDirectory('A')
.childFile('FlutterMacOS');
final String frameworkBinaryPath = frameworkBinary.path;
if (!frameworkBinary.existsSync()) {
throw Exception('Binary $frameworkBinaryPath does not exist, cannot thin');
......
......@@ -51,8 +51,10 @@ void main() {
);
binary = environment.outputDir
.childDirectory('FlutterMacOS.framework')
.childFile('FlutterMacOS');
.childDirectory('FlutterMacOS.framework')
.childDirectory('Versions')
.childDirectory('A')
.childFile('FlutterMacOS');
copyFrameworkCommand = FakeCommand(
command: <String>[
......@@ -109,7 +111,7 @@ void main() {
throwsA(isException.having(
(Exception exception) => exception.toString(),
'description',
contains('FlutterMacOS.framework/FlutterMacOS does not exist, cannot thin'),
contains('FlutterMacOS.framework/Versions/A/FlutterMacOS does not exist, cannot thin'),
)),
);
}, overrides: <Type, Generator>{
......@@ -155,7 +157,7 @@ void main() {
await const DebugUnpackMacOS().build(environment);
expect(logger.traceText, contains('Skipping lipo for non-fat file /FlutterMacOS.framework/FlutterMacOS'));
expect(logger.traceText, contains('Skipping lipo for non-fat file /FlutterMacOS.framework/Versions/A/FlutterMacOS'));
});
testUsingContext('thins fat framework', () async {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment