diff --git a/packages/path_provider/path_provider_linux/CHANGELOG.md b/packages/path_provider/path_provider_linux/CHANGELOG.md index c9c4bb3cc906..b69ec900d614 100644 --- a/packages/path_provider/path_provider_linux/CHANGELOG.md +++ b/packages/path_provider/path_provider_linux/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.1.7 + +* Bumps ffi dependency to match path_provider_windows. + ## 2.1.6 * Fixes library_private_types_in_public_api, sort_child_properties_last and use_key_in_widget_constructors @@ -54,20 +58,24 @@ * Check in linux/ directory for example/ -## 0.1.1 - NOT PUBLISHED +## 0.1.1 - NOT PUBLISHED + * Reverts changes on 0.1.0, which broke the tree. +## 0.1.0 - NOT PUBLISHED -## 0.1.0 - NOT PUBLISHED * This release updates getApplicationSupportPath to use the application ID instead of the executable name. * No migration is provided, so any older apps that were using this path will now have a different directory. ## 0.0.1+2 + * This release updates the example to depend on the endorsed plugin rather than relative path ## 0.0.1+1 + * This updates the readme and pubspec and example to reflect the endorsement of this implementation of `path_provider` ## 0.0.1 + * The initial implementation of path\_provider for Linux * Implements getApplicationSupportPath, getApplicationDocumentsPath, getDownloadsPath, and getTemporaryPath diff --git a/packages/path_provider/path_provider_linux/pubspec.yaml b/packages/path_provider/path_provider_linux/pubspec.yaml index 46e248f81c18..c0b7954087f5 100644 --- a/packages/path_provider/path_provider_linux/pubspec.yaml +++ b/packages/path_provider/path_provider_linux/pubspec.yaml @@ -2,7 +2,7 @@ name: path_provider_linux description: Linux implementation of the path_provider plugin repository: https://github.com/flutter/plugins/tree/main/packages/path_provider/path_provider_linux issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+path_provider%22 -version: 2.1.6 +version: 2.1.7 environment: sdk: ">=2.12.0 <3.0.0" @@ -16,7 +16,7 @@ flutter: dartPluginClass: PathProviderLinux dependencies: - ffi: ^1.1.2 + ffi: ">=1.1.2 <3.0.0" flutter: sdk: flutter path: ^1.8.0 diff --git a/packages/path_provider/path_provider_windows/CHANGELOG.md b/packages/path_provider/path_provider_windows/CHANGELOG.md index f48093bdbcc1..3967c38be411 100644 --- a/packages/path_provider/path_provider_windows/CHANGELOG.md +++ b/packages/path_provider/path_provider_windows/CHANGELOG.md @@ -1,6 +1,7 @@ -## 2.0.7 +## 2.1.0 -* Added support for unicode encoded VERSIONINFO +* Upgrades `package:ffi` dependency to 2.0.0. +* Added support for unicode encoded VERSIONINFO. * Minor fixes for new analysis options. ## 2.0.6 diff --git a/packages/path_provider/path_provider_windows/example/windows/flutter/generated_plugins.cmake b/packages/path_provider/path_provider_windows/example/windows/flutter/generated_plugins.cmake index 4d10c2518654..b93c4c30c167 100644 --- a/packages/path_provider/path_provider_windows/example/windows/flutter/generated_plugins.cmake +++ b/packages/path_provider/path_provider_windows/example/windows/flutter/generated_plugins.cmake @@ -5,6 +5,9 @@ list(APPEND FLUTTER_PLUGIN_LIST ) +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + set(PLUGIN_BUNDLED_LIBRARIES) foreach(plugin ${FLUTTER_PLUGIN_LIST}) @@ -13,3 +16,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST}) list(APPEND PLUGIN_BUNDLED_LIBRARIES $) list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/packages/path_provider/path_provider_windows/lib/src/path_provider_windows_real.dart b/packages/path_provider/path_provider_windows/lib/src/path_provider_windows_real.dart index 9a8b0cf43bbc..6a9c138f5346 100644 --- a/packages/path_provider/path_provider_windows/lib/src/path_provider_windows_real.dart +++ b/packages/path_provider/path_provider_windows/lib/src/path_provider_windows_real.dart @@ -50,7 +50,7 @@ class VersionInfoQuerier { } final Pointer keyPath = TEXT('\\StringFileInfo\\$language$encoding\\$key'); - final Pointer length = calloc(); + final Pointer length = calloc(); final Pointer> valueAddress = calloc>(); try { if (VerQueryValue(versionInfo, keyPath, valueAddress, length) == 0) { @@ -192,10 +192,9 @@ class PathProviderWindows extends PathProviderPlatform { String? companyName; String? productName; - final Pointer moduleNameBuffer = - calloc(MAX_PATH + 1).cast(); - final Pointer unused = calloc(); - Pointer? infoBuffer; + final Pointer moduleNameBuffer = wsalloc(MAX_PATH + 1); + final Pointer unused = calloc(); + Pointer? infoBuffer; try { // Get the module name. final int moduleNameLength = @@ -208,7 +207,7 @@ class PathProviderWindows extends PathProviderPlatform { // From that, load the VERSIONINFO resource final int infoSize = GetFileVersionInfoSize(moduleNameBuffer, unused); if (infoSize != 0) { - infoBuffer = calloc(infoSize); + infoBuffer = calloc(infoSize); if (GetFileVersionInfo(moduleNameBuffer, 0, infoSize, infoBuffer) == 0) { calloc.free(infoBuffer); diff --git a/packages/path_provider/path_provider_windows/pubspec.yaml b/packages/path_provider/path_provider_windows/pubspec.yaml index a995b9f81791..4e99be71da2f 100644 --- a/packages/path_provider/path_provider_windows/pubspec.yaml +++ b/packages/path_provider/path_provider_windows/pubspec.yaml @@ -2,11 +2,11 @@ name: path_provider_windows description: Windows implementation of the path_provider plugin repository: https://github.com/flutter/plugins/tree/main/packages/path_provider/path_provider_windows issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+path_provider%22 -version: 2.0.7 +version: 2.1.0 environment: - sdk: ">=2.12.0 <3.0.0" - flutter: ">=2.8.0" + sdk: ">=2.17.0 <3.0.0" + flutter: ">=3.0.0" flutter: plugin: @@ -16,7 +16,7 @@ flutter: dartPluginClass: PathProviderWindows dependencies: - ffi: ^1.0.0 + ffi: ^2.0.0 flutter: sdk: flutter path: ^1.8.0