-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
electron-builder with opencv4nodejs doesn't set him the right install directory #141
Comments
right now I found |
Still have issue. I dont know how to package it correctly |
maybe the same issue - Tried to install opencv and cmake via choco - didn't helped Being hopeless, tried install via pnpm - pnpm install @u4/opencv4nodejs and it finally worked! |
@studentutu I don't know, it seems like you have something different. here is an issue in which I was able to figure out how to install this, but my problem lies precisely in the package in the installation file |
Same here except pnpm giv the same |
problem description: I'm running the electron application and found that it works correctly with @u4/opencv4nodejs (no errors on startup). after which I create a program installer using electron-builder, transfer this installer to another PC, install the program - it installs correctly. When I start the program I get the error: opencv binary does not exist. after which, it shows me the path along which he is trying to get opencv binary, equal to the path where he launched it from the developer’s PC (C:\some_directories\project\node_modules@u4\opencv-build\dist\latest\build\bin\Release )
What am I doing?
I have an electron+react application. I'm using @u4/opencv-build to auto build opencv.
Before packing I do the following:
I already have a ready to go build opencv directory generated with:
npx build-opencv --electron --nocontrib rebuild
This works correctly for
"autoBuildOpencvVersion": "4.8.0" + "electron": "^28.0.0"
"electron-builder": "^24.9.1"
"electron-rebuild": "^3.2.9"
After which, I prepare the react and electron directories:
"build-react": "react-scripts build",
"build-electron": "mkdir build/electron & mkdir build/opencv & robocopy electron build/electron /S",
npm run build-react
npm run build-electron
After which all I have to do is create a packer using the electron-builder utility
"package": "electron-builder build --win --publish never",
npm run package
I get a dist folder in which I have the following structure:
But I see how electron-builder tried to package it inside the project. but he's still doing it wrong.
Unfortunately, I’ve given up and can’t do it in any way. After all, my application in any case looks for the library in the wrong path, and I haven’t found a way to configure this manually.
Here is my package.json
The text was updated successfully, but these errors were encountered: