Skip to content

Commit

Permalink
Update build flags for macos
Browse files Browse the repository at this point in the history
  • Loading branch information
yushulx committed Jan 10, 2025
1 parent 3ad1569 commit c100ae5
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
10 changes: 6 additions & 4 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,12 @@
"defines": ["MAC_DBR"],
"cflags": ["-std=c++11", "-DNAPI_CPP_EXCEPTIONS"],
"cflags_cc": ["-std=c++11", "-DNAPI_CPP_EXCEPTIONS"],
"ldflags": ["-Wl,-rpath,@loader_path"],
"libraries": [
"-lDynamsoftCore", "-lDynamsoftLicense", "-lDynamsoftCaptureVisionRouter", "-lDynamsoftUtility", "-L../platforms/macos"
],
"link_settings": {
"libraries": [
"-Wl,-rpath,@loader_path",
"-lDynamsoftCore", "-lDynamsoftLicense", "-lDynamsoftCaptureVisionRouter", "-lDynamsoftUtility", "-L../platforms/macos"
],
},
"copies": [
{
"destination": "build/Release/",
Expand Down
21 changes: 21 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const dbr = require('./index.js');

dbr.initLicense("DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAxLTE2NDk4Mjk3OTI2MzUiLCJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSIsInNlc3Npb25QYXNzd29yZCI6IndTcGR6Vm05WDJrcEQ5YUoifQ==");
dbr.decodeFileAsync("images/test.tif", dbr.formats.ALL, function (err, msg) {
console.log(msg);
for (index in msg) {
result = msg[index];
console.log('Format: ' + result['format']);
console.log('Value : ' + result['value']);
console.log('x1: ' + result['x1']);
console.log('y1 : ' + result['y1']);
console.log('x2: ' + result['x2']);
console.log('y2 : ' + result['y2']);
console.log('x3: ' + result['x3']);
console.log('y3: ' + result['y3']);
console.log('x4: ' + result['x4']);
console.log('y4: ' + result['y4']);
console.log('page: ' + result['page']);
console.log('decoding time: ' + result['time']);
}
}, "");

0 comments on commit c100ae5

Please sign in to comment.