Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

[flutter]: update windows crate type

annie59922b95a9cf
diff --git a/Makefile.toml b/Makefile.toml
index 79f46218d9..2d6dec27a3 100644
--- a/Makefile.toml
+++ b/Makefile.toml
@@ -48,7 +48,8 @@ RUST_COMPILE_TARGET = "x86_64-pc-windows-msvc"
BUILD_FLAG = "debug"
FLUTTER_OUTPUT_DIR = "Debug"
PRODUCT_EXT = "exe"
-SDK_EXT = "lib"
+CRATE_TYPE = "cdylib"
+SDK_EXT = "dll"
[env.production-desktop-windows-x86]
BUILD_FLAG = "release"
@@ -56,7 +57,8 @@ TARGET_OS = "windows"
RUST_COMPILE_TARGET = "x86_64-pc-windows-msvc"
FLUTTER_OUTPUT_DIR = "Release"
PRODUCT_EXT = "exe"
-SDK_EXT = "lib"
+CRATE_TYPE = "cdylib"
+SDK_EXT = "dll"
[tasks.echo_env]
script = [
diff --git a/app_flowy/packages/flowy_sdk/.gitignore b/app_flowy/packages/flowy_sdk/.gitignore
index b6456759da..b823fb9c73 100644
--- a/app_flowy/packages/flowy_sdk/.gitignore
+++ b/app_flowy/packages/flowy_sdk/.gitignore
@@ -75,4 +75,5 @@ build/
**/*.dylib
**/*.a
-**/*.lib
\ No newline at end of file
+**/*.lib
+**/*.dll
\ No newline at end of file
diff --git a/app_flowy/packages/flowy_sdk/lib/ffi.dart b/app_flowy/packages/flowy_sdk/lib/ffi.dart
index 7ae0fe163a..23c25299ea 100644
--- a/app_flowy/packages/flowy_sdk/lib/ffi.dart
+++ b/app_flowy/packages/flowy_sdk/lib/ffi.dart
@@ -15,7 +15,7 @@ DynamicLibrary _open() {
if (Platform.isAndroid) return DynamicLibrary.open('libdart_ffi.so');
if (Platform.isMacOS) return DynamicLibrary.executable();
if (Platform.isIOS) return DynamicLibrary.executable();
- if (Platform.isWindows) return DynamicLibrary.executable();
+ if (Platform.isWindows) return DynamicLibrary.open('dart_ffi.dll');
throw UnsupportedError('This platform is not supported.');
}
diff --git a/app_flowy/packages/flowy_sdk/windows/dart_ffi/README.md b/app_flowy/packages/flowy_sdk/windows/dart_ffi/README.md
new file mode 100644
index 0000000000..d3afcbe3ca
--- /dev/null
+++ b/app_flowy/packages/flowy_sdk/windows/dart_ffi/README.md
@@ -0,0 +1,5 @@
+# Debug Mode
+
+
+# Release Mode
+These DLLS need to be copied into the /Release folder each time we export a build.