This repository was archived by the owner on Oct 18, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ const { opencvLibDir } = require ( "./dirs" ) ;
2
+ const { readdirSync } = require ( "fs" ) ;
3
+ const { resolvePath } = require ( './commons' ) ;
4
+ const { join } = require ( "path" ) ;
5
+
6
+ for ( const file of readdirSync ( opencvLibDir ) ) {
7
+ console . log ( resolvePath ( join ( opencvLibDir , file ) ) ) ;
8
+ }
Original file line number Diff line number Diff line change
1
+ const { join } = require ( "path" ) ;
2
+
3
+ const isWin = ( ) => process . platform == 'win32'
4
+
5
+ const isOSX = ( ) => process . platform == 'darwin'
6
+
7
+ const isUnix = ( ) => ! isWin ( ) && ! isOSX ( ) ;
8
+
9
+ const rootDir = `node_modules/@nut-tree/opencv-build-${ process . platform } `
10
+ const opencvRoot = join ( rootDir , 'opencv' ) ;
11
+ const opencvBuild = join ( opencvRoot , 'build' ) ;
12
+ const opencvInclude = join ( opencvBuild , 'include' ) ;
13
+ const opencvLibDir = isWin ( ) ? join ( opencvBuild , 'lib/Release' ) : join ( opencvBuild , 'lib' ) ;
14
+ const opencvBinDir = isWin ( ) ? join ( opencvBuild , 'bin/Release' ) : join ( opencvBuild , 'bin' ) ;
15
+
16
+ module . exports = {
17
+ rootDir,
18
+ opencvRoot,
19
+ opencvBuild,
20
+ opencvInclude,
21
+ opencvLibDir,
22
+ opencvBinDir
23
+ }
You can’t perform that action at this time.
0 commit comments