Skip to content

Commit eb2c35e

Browse files
get rid of node-pre-gyp for now + fix travis
1 parent 08e5442 commit eb2c35e

File tree

5 files changed

+10
-824
lines changed

5 files changed

+10
-824
lines changed

.npmignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ node_modules
77
crash.log
88
data
99
test
10-
examples
10+
examples
11+
.travis.yml

.travis.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ before_install:
88
- sudo apt-get update
99

1010
install:
11-
- ls
1211
- sudo apt-get install -y build-essential
1312
- sudo apt-get install -y cmake git
1413

@@ -21,15 +20,13 @@ install:
2120
- cd opencv-3.2.0
2221
- mkdir build
2322
- cd build
24-
- cmake -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.2.0/modules CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local
23+
- cmake -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.2.0/modules -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
2524
- make -j5
2625
- sudo make install
2726
- sudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
2827
- sudo ldconfig
2928
- cd ../../
3029

31-
# setup opencv4nodejs
32-
- curl -sL https://github.com/justadudewhohacks/opencv4nodejs > opencv4nodejs.zip
33-
- unzip opencv4nodejs.zip
34-
35-
script: cd ./opencv4nodejs/test && npm install && npm test
30+
script:
31+
- npm install
32+
- cd ./test && npm install && npm test

lib/opencv4nodejs.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
const binary = require('node-pre-gyp');
21
const path = require('path');
3-
const bindingPath = binary.find(path.resolve(path.join(__dirname, '../package.json')), { debug: !!process.env.DEBUG });
4-
const binding = require(bindingPath);
2+
const binding = require('../build/Release/opencv4nodejs');
53
const { resolvePath } = require('./utils');
64

75
// resolve haarcascade files

0 commit comments

Comments
 (0)