From f0ebed40e2f1aac40b63d2006fbd011b050e4ac5 Mon Sep 17 00:00:00 2001 From: Tim Sneath Date: Fri, 27 May 2022 15:47:00 -0700 Subject: [PATCH 1/7] Use Win32 type aliases --- .../lib/src/path_provider_windows_real.dart | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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); From 46ec7260db9fa847116321dc4e21eda40e3adaa8 Mon Sep 17 00:00:00 2001 From: Tim Sneath Date: Fri, 27 May 2022 15:47:19 -0700 Subject: [PATCH 2/7] Generated file update --- .../example/windows/flutter/generated_plugins.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) 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) From 93d1f746044c0a44f3f0a6572ccc2d7fa9c6e7f2 Mon Sep 17 00:00:00 2001 From: Tim Sneath Date: Fri, 27 May 2022 15:47:25 -0700 Subject: [PATCH 3/7] Bump version --- packages/path_provider/path_provider_windows/CHANGELOG.md | 3 ++- packages/path_provider/path_provider_windows/pubspec.yaml | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/path_provider/path_provider_windows/CHANGELOG.md b/packages/path_provider/path_provider_windows/CHANGELOG.md index f48093bdbcc1..a50821254227 100644 --- a/packages/path_provider/path_provider_windows/CHANGELOG.md +++ b/packages/path_provider/path_provider_windows/CHANGELOG.md @@ -1,5 +1,6 @@ -## 2.0.7 +## 2.1.0 +* Upgrade `package:ffi` dependency to 2.0.0 * Added support for unicode encoded VERSIONINFO * Minor fixes for new analysis options. 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 From 84b34141521d4d97f9bc81ea1fee3b407a68c488 Mon Sep 17 00:00:00 2001 From: Tim Sneath Date: Fri, 27 May 2022 15:55:48 -0700 Subject: [PATCH 4/7] Bump pub dependency in path_provider_linux --- .../path_provider/path_provider_linux/CHANGELOG.md | 12 ++++++++++-- .../path_provider/path_provider_linux/pubspec.yaml | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/path_provider/path_provider_linux/CHANGELOG.md b/packages/path_provider/path_provider_linux/CHANGELOG.md index c9c4bb3cc906..941740ff3dd8 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 + +* Bump 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..9f2202836ddf 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: ^2.0.0 flutter: sdk: flutter path: ^1.8.0 From 40e77789de8fb98fd07f4f054ed3fa1521dc29be Mon Sep 17 00:00:00 2001 From: Tim Sneath Date: Fri, 27 May 2022 15:57:20 -0700 Subject: [PATCH 5/7] Add integration_test dev dependency --- packages/path_provider/path_provider_linux/pubspec.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/path_provider/path_provider_linux/pubspec.yaml b/packages/path_provider/path_provider_linux/pubspec.yaml index 9f2202836ddf..996682fc4617 100644 --- a/packages/path_provider/path_provider_linux/pubspec.yaml +++ b/packages/path_provider/path_provider_linux/pubspec.yaml @@ -26,3 +26,5 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter + integration_test: + sdk: flutter From 543190177a407e5da1c64131d23e2823154e69eb Mon Sep 17 00:00:00 2001 From: Tim Sneath Date: Fri, 27 May 2022 16:00:28 -0700 Subject: [PATCH 6/7] Revert "Add integration_test dev dependency" This reverts commit 40e77789de8fb98fd07f4f054ed3fa1521dc29be. --- packages/path_provider/path_provider_linux/pubspec.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/path_provider/path_provider_linux/pubspec.yaml b/packages/path_provider/path_provider_linux/pubspec.yaml index 996682fc4617..9f2202836ddf 100644 --- a/packages/path_provider/path_provider_linux/pubspec.yaml +++ b/packages/path_provider/path_provider_linux/pubspec.yaml @@ -26,5 +26,3 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - integration_test: - sdk: flutter From 4c5585af3992c90695b58ea6e62fadab32498819 Mon Sep 17 00:00:00 2001 From: Tim Sneath Date: Sat, 28 May 2022 09:32:30 -0700 Subject: [PATCH 7/7] Address review comments --- packages/path_provider/path_provider_linux/CHANGELOG.md | 2 +- packages/path_provider/path_provider_linux/pubspec.yaml | 2 +- packages/path_provider/path_provider_windows/CHANGELOG.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/path_provider/path_provider_linux/CHANGELOG.md b/packages/path_provider/path_provider_linux/CHANGELOG.md index 941740ff3dd8..b69ec900d614 100644 --- a/packages/path_provider/path_provider_linux/CHANGELOG.md +++ b/packages/path_provider/path_provider_linux/CHANGELOG.md @@ -1,6 +1,6 @@ ## 2.1.7 -* Bump ffi dependency to match path_provider_windows. +* Bumps ffi dependency to match path_provider_windows. ## 2.1.6 diff --git a/packages/path_provider/path_provider_linux/pubspec.yaml b/packages/path_provider/path_provider_linux/pubspec.yaml index 9f2202836ddf..c0b7954087f5 100644 --- a/packages/path_provider/path_provider_linux/pubspec.yaml +++ b/packages/path_provider/path_provider_linux/pubspec.yaml @@ -16,7 +16,7 @@ flutter: dartPluginClass: PathProviderLinux dependencies: - ffi: ^2.0.0 + 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 a50821254227..3967c38be411 100644 --- a/packages/path_provider/path_provider_windows/CHANGELOG.md +++ b/packages/path_provider/path_provider_windows/CHANGELOG.md @@ -1,7 +1,7 @@ ## 2.1.0 -* Upgrade `package:ffi` dependency to 2.0.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