Skip to content

Commit fc236e1

Browse files
committed
Update engines
1 parent 0dba4b6 commit fc236e1

File tree

6 files changed

+153
-90
lines changed

6 files changed

+153
-90
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
.DS_Store
55
.project
66
.DS_Store
7+
.vscode
78
.eslintrc
89
node_modules/
910
bin-*/

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ matrix:
22
include:
33
- name: "Linux Test"
44
language: node_js
5-
node_js: "10.16.1"
5+
node_js: "12.13.0"
66
os: linux
77
if: NOT commit_message =~ /^:hammer:/
88
dist: xenial
@@ -14,7 +14,7 @@ matrix:
1414
os: osx
1515
if: NOT commit_message =~ /^:hammer:/
1616
language: node_js
17-
node_js: "10.16.1"
17+
node_js: "12.13.0"
1818
install:
1919
- cd test
2020
- npm ci

README.md

Lines changed: 67 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This is a part of [Node3D](https://github.com/node-3d) project.
77
[![Build Status](https://api.travis-ci.com/node-3d/deps-freeimage-raub.svg?branch=master)](https://travis-ci.com/node-3d/deps-freeimage-raub)
88
[![CodeFactor](https://www.codefactor.io/repository/github/node-3d/deps-freeimage-raub/badge)](https://www.codefactor.io/repository/github/node-3d/deps-freeimage-raub)
99

10-
> npm i -s deps-freeimage-raub
10+
> npm i deps-freeimage-raub
1111
1212

1313
## Synopsis
@@ -22,49 +22,83 @@ binaries through **NPM** for **Node.js** addons.
2222

2323
## Usage
2424

25-
### binding.gyp
25+
### Example binding.gyp
26+
27+
As in [image-raub](https://github.com/node-3d/image-raub/tree/master/src) Node.js addon.
2628

2729
```javascript
30+
{
2831
'variables': {
29-
'freeimage_include' : '<!(node -p "require(\'deps-freeimage-raub\').include")',
30-
'freeimage_bin' : '<!(node -p "require(\'deps-freeimage-raub\').bin")',
32+
'bin' : '<!(node -p "require(\'addon-tools-raub\').bin")',
33+
'fi_include' : '<!(node -p "require(\'deps-freeimage-raub\').include")',
34+
'fi_bin' : '<!(node -p "require(\'deps-freeimage-raub\').bin")',
3135
},
32-
...
3336
'targets': [
3437
{
35-
'target_name': '...',
36-
38+
'target_name': 'image',
39+
'sources': [
40+
'cpp/bindings.cpp',
41+
'cpp/image.cpp',
42+
],
3743
'include_dirs': [
38-
'<(freeimage_include)',
39-
...
44+
'<(fi_include)',
45+
'<!@(node -p "require(\'addon-tools-raub\').include")',
4046
],
41-
42-
'library_dirs': [ '<(freeimage_bin)' ],
43-
47+
'cflags!': ['-fno-exceptions'],
48+
'cflags_cc!': ['-fno-exceptions'],
49+
'library_dirs': ['<(fi_bin)'],
4450
'conditions': [
45-
46-
['OS=="linux"', {
47-
'libraries': [
48-
'-Wl,-rpath,<(freeimage_bin)',
49-
'<(freeimage_bin)/freeimage.so',
50-
...
51-
],
52-
}],
53-
54-
['OS=="mac"', {
55-
'libraries': [
56-
'-Wl,-rpath,<(freeimage_bin)',
57-
'<(freeimage_bin)/freeimage.dylib',
58-
...
59-
],
60-
}],
61-
62-
['OS=="win"', {
63-
'libraries': [ 'FreeImage.lib', ... ],
64-
}],
65-
51+
[
52+
'OS=="linux"',
53+
{
54+
'libraries': [
55+
"-Wl,-rpath,'$$ORIGIN'",
56+
"-Wl,-rpath,'$$ORIGIN/../node_modules/deps-freeimage-raub/<(bin)'",
57+
"-Wl,-rpath,'$$ORIGIN/../../deps-freeimage-raub/<(bin)'",
58+
'<(fi_bin)/libfreeimage.so.3',
59+
],
60+
}
61+
],
62+
[
63+
'OS=="mac"',
64+
{
65+
'libraries': [
66+
'-Wl,-rpath,@loader_path',
67+
'-Wl,-rpath,@loader_path/../node_modules/deps-freeimage-raub/<(bin)',
68+
'-Wl,-rpath,@loader_path/../../deps-freeimage-raub/<(bin)',
69+
'<(fi_bin)/freeimage.dylib',
70+
],
71+
'xcode_settings': {
72+
'DYLIB_INSTALL_NAME_BASE': '@rpath',
73+
},
74+
}
75+
],
76+
[
77+
'OS=="win"',
78+
{
79+
'libraries': ['FreeImage.lib'],
80+
'defines' : [
81+
'WIN32_LEAN_AND_MEAN',
82+
'VC_EXTRALEAN'
83+
],
84+
'msvs_version' : '2013',
85+
'msvs_settings' : {
86+
'VCCLCompilerTool' : {
87+
'AdditionalOptions' : [
88+
'/O2','/Oy','/GL','/GF','/Gm-','/EHsc',
89+
'/MT','/GS','/Gy','/GR-','/Gd',
90+
]
91+
},
92+
'VCLinkerTool' : {
93+
'AdditionalOptions' : ['/OPT:REF','/OPT:ICF','/LTCG']
94+
},
95+
},
96+
}
97+
],
6698
],
6799
},
100+
]
101+
}
68102
```
69103

70104

package-lock.json

Lines changed: 18 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
"postinstall": "node install"
4141
},
4242
"engines": {
43-
"node": ">=10.16.1",
44-
"npm": ">=6.9.0"
43+
"node": ">=12.13.0",
44+
"npm": ">=6.12.0"
4545
},
4646
"repository": {
4747
"type": "git",

0 commit comments

Comments
 (0)