justadudewhohacks/opencv-electron

Question: how to package electron app with opencv?

Closed this issue · 4 comments

fakob commented

Hi
How would I go about to be able to package opencv-electron to include opencv?
I have been experimenting with getting this to work using node-opencv, but even though I got close it did not work out. Now I am wondering if it could be easier achieved using opencv4nodejs. Any ideas?
Thanks
Jakob

This is an example for using electron with opencv4nodejs. Node-opencv wont work.

Just clone this repo, type npm install and you should be ready to go

fakob commented

Sorry for not properly explaining what I am after. What I am trying to do is to create a desktop installer, in my case a .dmg for osx with opencv packaged into it.
The user should not have to separately install opencv. I tried electron-builder and had read about node-gyp, but I am not an expert and could not make it work.

Thanks for your effort btw. opencv4nodejs and your repo work great!

Ah now I see what you are trying.

I am sorry, but I have never packaged an electron app into an executable. One would have to figure out how to bundle the electron app with the node file generated from building opencv4nodejs + you would also have to ship the dynamic libs, e.g. the .dylibs, which are loaded at runtime.

But again I don't have any clue how this is done.

Hi I'm also experiencing as well. Executable Opencv Electron App doesn't work without opencv library.
In the same folder of exe file, I try to add opencv dll files (opencv_world341.dll, opencv_world341d.dll) from opencv3.4.1\build\x64\vc14\bin and then it's working perfectly.
Thank you for your work on opencv!