deps-opengl-raub
Advanced tools
Comparing version 4.1.2 to 5.0.0
'use strict'; | ||
module.exports = require('addon-tools-raub').paths(__dirname); | ||
module.exports = require('addon-tools-raub').getPaths(__dirname); |
'use strict'; | ||
const install = require('addon-tools-raub/install'); | ||
const { install } = require('addon-tools-raub'); | ||
@@ -5,0 +5,0 @@ |
{ | ||
"author": "Luis Blanco <luisblanco1337@gmail.com>", | ||
"name": "deps-opengl-raub", | ||
"version": "4.1.2", | ||
"version": "5.0.0", | ||
"description": "Binaries and headers for OpenGL-dependent addons", | ||
@@ -41,25 +41,9 @@ "license": "MIT", | ||
"eslint": "eslint .", | ||
"test": "jest --coverage=false --watch", | ||
"test-ci": "jest --coverage=false --verbose", | ||
"test-coverage": "rm -rf doc/jest && jest --coverage --silent" | ||
"test": "jest --coverage=false --watch --config=conf/jest.json", | ||
"test-ci": "jest --coverage=false --verbose --config=conf/jest.json", | ||
"test-coverage": "rm -rf doc/jest && jest --coverage --silent --config=conf/jest.json" | ||
}, | ||
"jest": { | ||
"moduleFileExtensions": [ | ||
"js" | ||
], | ||
"testMatch": [ | ||
"**/*.test.js" | ||
], | ||
"coverageDirectory": "doc/jest", | ||
"coverageReporters": [ | ||
"lcov" | ||
], | ||
"collectCoverageFrom": [ | ||
"**/*.js", | ||
"!**/*.test.js" | ||
] | ||
}, | ||
"engines": { | ||
"node": ">=16.17.0", | ||
"npm": ">=8.15.0" | ||
"node": ">=18.12.1", | ||
"npm": ">=8.19.2" | ||
}, | ||
@@ -71,13 +55,12 @@ "repository": { | ||
"dependencies": { | ||
"adm-zip": "^0.5.9", | ||
"addon-tools-raub": "^6.0.2" | ||
"addon-tools-raub": "^7.0.0" | ||
}, | ||
"devDependencies": { | ||
"eslint-plugin-jest": "^27.1.6", | ||
"eslint-plugin-jest": "^27.2.0", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint": "^8.28.0", | ||
"eslint": "^8.31.0", | ||
"jest": "^29.3.1", | ||
"node-addon-api": "^5.0.0", | ||
"typescript": "^4.9.3" | ||
"typescript": "^4.9.4" | ||
} | ||
} |
135
README.md
@@ -5,3 +5,3 @@ # OpenGL binaries | ||
[](https://www.npmjs.com/package/deps-opengl-raub) | ||
[](https://badge.fury.io/js/deps-opengl-raub) | ||
[](https://www.codefactor.io/repository/github/node-3d/deps-opengl-raub) | ||
@@ -16,121 +16,28 @@ | ||
* Platforms (x64): Windows, Linux, OSX. | ||
* Platforms (x64): Windows x64, Linux x64, OSX x64, Linux Aarch64. | ||
* Libraries: GLEW 2.1, GLFW 3.3, OpenGL. | ||
* Linking: static dll-type. | ||
## Usage | ||
### Example binding.gyp | ||
### JS Interface | ||
As in [glfw-raub](https://github.com/node-3d/glfw-raub/tree/master/src) Node.js addon. | ||
See in [glfw-raub](https://github.com/node-3d/glfw-raub/blob/master/core.js) Node.js addon. | ||
```javascript | ||
{ | ||
'variables': { | ||
'bin' : '<!(node -p "require(\'addon-tools-raub\').bin")', | ||
'gl_include' : '<!(node -p "require(\'deps-opengl-raub\').include")', | ||
'gl_bin' : '<!(node -p "require(\'deps-opengl-raub\').bin")', | ||
}, | ||
'targets': [ | ||
{ | ||
'target_name': 'glfw', | ||
'sources': [ | ||
'cpp/bindings.cpp', | ||
'cpp/events.cpp', | ||
'cpp/glfw.cpp', | ||
], | ||
'include_dirs': [ | ||
'<(gl_include)', | ||
'<!@(node -p "require(\'addon-tools-raub\').include")', | ||
], | ||
'cflags!': ['-fno-exceptions'], | ||
'cflags_cc!': ['-fno-exceptions'], | ||
'library_dirs': ['<(gl_bin)'], | ||
'conditions': [ | ||
[ | ||
'OS=="linux"', | ||
{ | ||
'libraries': [ | ||
"-Wl,-rpath,'$$ORIGIN'", | ||
"-Wl,-rpath,'$$ORIGIN/../node_modules/deps-opengl-raub/<(bin)'", | ||
"-Wl,-rpath,'$$ORIGIN/../../deps-opengl-raub/<(bin)'", | ||
'<(gl_bin)/libglfw.so.3', | ||
'<(gl_bin)/libGL.so', | ||
'<(gl_bin)/libXrandr.so', | ||
], | ||
'defines': ['__linux__'], | ||
} | ||
], | ||
[ | ||
'OS=="mac"', | ||
{ | ||
'libraries': [ | ||
'-Wl,-rpath,@loader_path', | ||
'-Wl,-rpath,@loader_path/../node_modules/deps-opengl-raub/<(bin)', | ||
'-Wl,-rpath,@loader_path/../../deps-opengl-raub/<(bin)', | ||
'<(gl_bin)/glfw.dylib', | ||
], | ||
'defines': ['__APPLE__'], | ||
} | ||
], | ||
[ | ||
'OS=="win"', | ||
{ | ||
'libraries': [ 'glfw3dll.lib', 'opengl32.lib' ], | ||
'defines' : [ | ||
'WIN32_LEAN_AND_MEAN', | ||
'VC_EXTRALEAN', | ||
'_WIN32', | ||
], | ||
'msvs_settings' : { | ||
'VCCLCompilerTool' : { | ||
'AdditionalOptions' : [ | ||
'/O2','/Oy','/GL','/GF','/Gm-', | ||
'/EHsc','/MT','/GS','/Gy','/GR-','/Gd', | ||
] | ||
}, | ||
'VCLinkerTool' : { | ||
'AdditionalOptions' : ['/OPT:REF','/OPT:ICF','/LTCG'] | ||
}, | ||
}, | ||
}, | ||
], | ||
], | ||
}, | ||
], | ||
} | ||
``` | ||
See in [webgl-raub](https://github.com/node-3d/webgl-raub/blob/master/core.js) Node.js addon. | ||
### addon.cpp | ||
### binding.gyp | ||
```cpp | ||
#include <GL/glew.h> | ||
See in [glfw-raub](https://github.com/node-3d/glfw-raub/tree/master/src/binding.gyp) Node.js addon. | ||
#define GLFW_NO_GLU | ||
#define GLFW_DLL | ||
#include <GLFW/glfw3.h> | ||
See in [webgl-raub](https://github.com/node-3d/webgl-raub/tree/master/src/binding.gyp) Node.js addon. | ||
// Platform specific windows and contexts if needed | ||
### addon.cpp | ||
#ifdef _WIN32 | ||
#define GLFW_EXPOSE_NATIVE_WIN32 | ||
#define GLFW_EXPOSE_NATIVE_WGL | ||
#elif __APPLE__ | ||
#define GLFW_EXPOSE_NATIVE_COCOA | ||
#define GLFW_EXPOSE_NATIVE_NSGL | ||
#elif __linux__ | ||
#define GLFW_EXPOSE_NATIVE_X11 | ||
#define GLFW_EXPOSE_NATIVE_GLX | ||
#endif | ||
#include <GLFW/glfw3native.h> | ||
See in [glfw-raub](https://github.com/node-3d/glfw-raub/blob/master/src/cpp/glfw-common.hpp) Node.js addon. | ||
See in [webgl-raub](https://github.com/node-3d/webgl-raub/blob/master/src/cpp/webgl.hpp) Node.js addon. | ||
// Fix bad defines for unix compilation | ||
#undef True | ||
#undef False | ||
``` | ||
Refer to [GLFW](https://www.glfw.org/documentation.html) and | ||
@@ -140,10 +47,8 @@ [GLEW](http://glew.sourceforge.net/basic.html) official docs. | ||
--- | ||
## Legal notice | ||
### GLFW | ||
This software uses the [GLFW open source library](http://www.glfw.org/index.html). | ||
GLFW is legally used under the ZLIB license. | ||
[GLFW](http://www.glfw.org/index.html) is used under ZLIB license. | ||
It is explicitly stated that GLFW can be used commercially in closed-source projects. | ||
@@ -153,4 +58,4 @@ GLFW licensing information (a COPY) is given in a [separate file](/GLFW_ZLIB), | ||
[GLFW's official repository](https://github.com/glfw/glfw/blob/master/LICENSE.md). | ||
Windows, Linux, and OSX binaries are built with | ||
[GitHub Actions](https://github.com/node-3d/deps-opengl-raub/actions). | ||
The binaries are built with this | ||
[GitHub Action](https://raw.githubusercontent.com/nigels-com/glew/master/.github/workflows/build.yml). | ||
@@ -160,4 +65,3 @@ | ||
Also this software uses the [GLEW open source library](http://glew.sourceforge.net/). | ||
GLEW is legally used under it's own custom license. | ||
[GLEW](http://glew.sourceforge.net/) is used under it's own custom license. | ||
It is explicitly stated that GLEW can be used commercially in closed-source projects. | ||
@@ -167,4 +71,4 @@ GLEW licensing information (a COPY) is given in a [separate file](/GLEW_LICENSE), | ||
[GLEW's official repository](https://raw.githubusercontent.com/nigels-com/glew/master/LICENSE.txt). | ||
Windows, Linux, and OSX binaries are built with | ||
[GitHub Actions](https://github.com/node-3d/deps-opengl-raub/actions). | ||
The binaries are built with this | ||
[GitHub Action](https://raw.githubusercontent.com/nigels-com/glew/master/.github/workflows/build.yml). | ||
@@ -177,5 +81,4 @@ | ||
--- | ||
The rest of this package is MIT licensed. |
1
3337565
78
+ Addedaddon-tools-raub@7.4.0(transitive)
- Removedadm-zip@^0.5.9
- Removedaddon-tools-raub@6.3.0(transitive)
- Removedadm-zip@0.5.16(transitive)
Updatedaddon-tools-raub@^7.0.0