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 { ...@@ -36,7 +36,7 @@ abstract class UnpackMacOS extends Target {
@override @override
List<Source> get outputs => const <Source>[ List<Source> get outputs => const <Source>[
Source.pattern('{OUTPUT_DIR}/FlutterMacOS.framework/FlutterMacOS'), Source.pattern('{OUTPUT_DIR}/FlutterMacOS.framework/Versions/A/FlutterMacOS'),
]; ];
@override @override
...@@ -67,7 +67,11 @@ abstract class UnpackMacOS extends Target { ...@@ -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; final String frameworkBinaryPath = frameworkBinary.path;
if (!frameworkBinary.existsSync()) { if (!frameworkBinary.existsSync()) {
throw Exception('Binary $frameworkBinaryPath does not exist, cannot thin'); throw Exception('Binary $frameworkBinaryPath does not exist, cannot thin');
......
...@@ -51,8 +51,10 @@ void main() { ...@@ -51,8 +51,10 @@ void main() {
); );
binary = environment.outputDir binary = environment.outputDir
.childDirectory('FlutterMacOS.framework') .childDirectory('FlutterMacOS.framework')
.childFile('FlutterMacOS'); .childDirectory('Versions')
.childDirectory('A')
.childFile('FlutterMacOS');
copyFrameworkCommand = FakeCommand( copyFrameworkCommand = FakeCommand(
command: <String>[ command: <String>[
...@@ -109,7 +111,7 @@ void main() { ...@@ -109,7 +111,7 @@ void main() {
throwsA(isException.having( throwsA(isException.having(
(Exception exception) => exception.toString(), (Exception exception) => exception.toString(),
'description', 'description',
contains('FlutterMacOS.framework/FlutterMacOS does not exist, cannot thin'), contains('FlutterMacOS.framework/Versions/A/FlutterMacOS does not exist, cannot thin'),
)), )),
); );
}, overrides: <Type, Generator>{ }, overrides: <Type, Generator>{
...@@ -155,7 +157,7 @@ void main() { ...@@ -155,7 +157,7 @@ void main() {
await const DebugUnpackMacOS().build(environment); 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 { 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