opencv4nodejs icon indicating copy to clipboard operation
opencv4nodejs copied to clipboard

build-opencv wording is not clear

Open piercus opened this issue 2 years ago • 3 comments
trafficstars

Hello @UrielCh,

I'm sharing with you my feedback regarding build-opencv tool.

I feel there are 2 level of build here :

  • openCV build
  • opencv4nodejs build

I'm not clear about the meaning of the verbs in the command :

  • 'build/rebuild' :
    • what is the difference between build and rebuild ?
    • Is it building only opencv4nodejs ?
    • Is it building also openCV ? in what condition ?
    • When opencv4nodejs is already built is it rebuilding it ?
    • When openCV is already built is it rebuilding it ?
  • 'clean/remove' : what is the difference ? Is it working on opencv4nodejs level ? or openCV level ?
  • 'auto' : Same question

I would be happy to discuss this on slack, i feel there is a romm for improvement here in the documentation and/or architecture

piercus avatar Feb 22 '23 08:02 piercus

1st point:

  • Build only build module will not works if called without a previous configure
  • Rebuild equivalent to clean + configure + build

...

All the command are the same as in node-gyp

Command Description
help Shows the help dialog
build Invokes make/msbuild.exe and builds the native addon
clean Removes the build directory if it exists
configure Generates project build files for the current platform
rebuild Runs clean, configure and build all in a row
install Installs Node.js header files for the given version
list Lists the currently installed Node.js header versions
remove Removes the Node.js header files for the given version

The only change is the addition of the auto command. auto will try to build a working binding without any options. I use it during the installation phase.

You can open a doc branch on UrielCh/opencv4nodejs I already grant you write access to this git.

UrielCh avatar Feb 25 '23 11:02 UrielCh

Ok, will try to add some doc, thanks for the explanations

piercus avatar Feb 25 '23 21:02 piercus

In the new version, I moved all macros inside the cc/native-node-utils directory, I started to add some comments on macro, and I would appreciate some assistance on this part.

Ideally, converting macro to N-API instead of NaN will upgrade the project and remove the need for recompilation.

UrielCh avatar Mar 11 '23 08:03 UrielCh