[flutter]: update windows crate type

This commit is contained in:
annie 2021-11-17 17:52:49 +08:00
parent 89ba4195e5
commit 59922b95a9
4 changed files with 12 additions and 4 deletions

View File

@ -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 = [

View File

@ -75,4 +75,5 @@ build/
**/*.dylib
**/*.a
**/*.lib
**/*.lib
**/*.dll

View File

@ -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.');
}

View File

@ -0,0 +1,5 @@
# Debug Mode
# Release Mode
These DLLS need to be copied into the /Release folder each time we export a build.