diff --git a/packages/vector_graphics_compiler/CHANGELOG.md b/packages/vector_graphics_compiler/CHANGELOG.md index 2d2316afdcac..568e3a96d9d7 100644 --- a/packages/vector_graphics_compiler/CHANGELOG.md +++ b/packages/vector_graphics_compiler/CHANGELOG.md @@ -1,6 +1,10 @@ -## NEXT +## 1.2.4 * Updates minimum supported SDK version to Flutter 3.38/Dart 3.10. +* Fixes `linux-arm64` host support by selecting the Flutter engine + artifact directory from `Abi.current()` instead of a hardcoded + `linux-x64`. The same fix applies to the tessellator loader. + Resolves flutter/flutter#158865. ## 1.2.3 diff --git a/packages/vector_graphics_compiler/lib/src/_initialize_path_ops_io.dart b/packages/vector_graphics_compiler/lib/src/_initialize_path_ops_io.dart index ba0301b5308a..290b7ced9db1 100644 --- a/packages/vector_graphics_compiler/lib/src/_initialize_path_ops_io.dart +++ b/packages/vector_graphics_compiler/lib/src/_initialize_path_ops_io.dart @@ -4,7 +4,9 @@ // ignore_for_file: avoid_print +import 'dart:ffi' show Abi; import 'dart:io'; + import 'svg/path_ops.dart'; /// Look up the location of the pathops from flutter's artifact cache. @@ -28,7 +30,7 @@ bool initializePathOpsFromFlutterCache() { platform = 'darwin-x64'; executable = 'libpath_ops.dylib'; } else if (Platform.isLinux) { - platform = 'linux-x64'; + platform = Abi.current() == Abi.linuxArm64 ? 'linux-arm64' : 'linux-x64'; executable = 'libpath_ops.so'; } else { print('path_ops not supported on ${Platform.localeName}'); diff --git a/packages/vector_graphics_compiler/lib/src/_initialize_tessellator_io.dart b/packages/vector_graphics_compiler/lib/src/_initialize_tessellator_io.dart index 735f633687da..34dae8db4a32 100644 --- a/packages/vector_graphics_compiler/lib/src/_initialize_tessellator_io.dart +++ b/packages/vector_graphics_compiler/lib/src/_initialize_tessellator_io.dart @@ -4,7 +4,9 @@ // ignore_for_file: avoid_print +import 'dart:ffi' show Abi; import 'dart:io'; + import 'svg/tessellator.dart'; /// Look up the location of the tessellator from flutter's artifact cache. @@ -28,7 +30,7 @@ bool initializeTessellatorFromFlutterCache() { platform = 'darwin-x64'; executable = 'libtessellator.dylib'; } else if (Platform.isLinux) { - platform = 'linux-x64'; + platform = Abi.current() == Abi.linuxArm64 ? 'linux-arm64' : 'linux-x64'; executable = 'libtessellator.so'; } else { print('Tesselation not supported on ${Platform.localeName}'); diff --git a/packages/vector_graphics_compiler/pubspec.yaml b/packages/vector_graphics_compiler/pubspec.yaml index 7c89a4111110..040e7d5af6f8 100644 --- a/packages/vector_graphics_compiler/pubspec.yaml +++ b/packages/vector_graphics_compiler/pubspec.yaml @@ -2,7 +2,7 @@ name: vector_graphics_compiler description: A compiler to convert SVGs to the binary format used by `package:vector_graphics`. repository: https://github.com/flutter/packages/tree/main/packages/vector_graphics_compiler issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+vector_graphics%22 -version: 1.2.3 +version: 1.2.4 executables: vector_graphics_compiler: