rainyl / opencv_dart

OpenCV bindings for Dart language and Flutter. Support Asynchronous Now!
https://pub.dev/packages/opencv_dart
Apache License 2.0
136 stars 18 forks source link

How to compile production app with opencv_dart.dll #152

Closed PanteoPro closed 4 months ago

PanteoPro commented 4 months ago

Question

When I compile a windows production application, a file is created in the destination folder opencv_dart.dll . But when any method from the opencv_dart library is called in the release application, the application crashes. But when on the client where I installed my application, I registered OPENCV_DART_LIB_PATH in the PATH and specified the address of the result of the conan build command conan build . -b missing -s compiler.cppstd=20 where the generated opencv_dart.dll files, then the application is working fine. How to make sure that the user does not need to register the library in the PATH himself opencv_dart.dll ?

rainyl commented 4 months ago

NEVER use OPENCV_DART_LIB_PATH except you are testing this package!

if you build via flutter build windows --release, opencv_dart.dll should be downloaded and copied to the output directory.

image

If you are building this project entirely by yourself, please fix it by yourself.

rainyl commented 4 months ago

@PanteoPro I am sorry that it's a bug, would you please setup it manually according to #160 until a hot fix version v1.1.1 be released?

rainyl commented 4 months ago

This should be fixed in https://github.com/rainyl/opencv_dart/tree/1.1.0%2B1, and a cherry pick to main in https://github.com/rainyl/opencv_dart/commit/be648bc5e755339ee7307310f2f2704a10387ccc