justadudewhohacks / opencv4nodejs

Nodejs bindings to OpenCV 3 and OpenCV 4
MIT License
4.97k stars 827 forks source link

Failed install due to opencv-build lib searching pattern is wrong #848

Open rockswang opened 2 years ago

rockswang commented 2 years ago

see code in getLibsFactory.js:

    function getLibNameRegex(opencvModuleName) {
        return new RegExp("^" + getLibPrefix() + opencvModuleName + "[0-9]{0,3}." + getLibSuffix() + "$");
    }

this regex pattern does not match with filename like 'opencv_world3416.lib', please update the code.

UrielCh commented 2 years ago

1- this issue is not in the right project. 2- already fixed in the @u4 flavor code extract:

  getLibNameRegex(opencvModuleName: string): RegExp {
    const regexp = `^${this.getLibPrefix}${opencvModuleName}[0-9.]*\.${this.getLibSuffix}$`;
    return new RegExp(regexp)
  }

please try the @u4 version and give your feedback so it will be merged into the main git.

thx.