Permalink
Browse files

Merge branch 'develop'

* develop:
  no message
  updated
  initial commit -- not all compilation bugs resolved yet
  defined variables to specify where anttweakbar is installed
  fixing issue #13
  merge
  updated to NAN 1.2.0
  New instructions for Windows
  Simplified installation on Windows with bundled pre-compiled dependencies

# Conflicts:
#	binding.gyp
#	package.json
  • Loading branch information...
mikeseven committed Sep 13, 2015
2 parents c19b1d1 + 5ed5d6e commit acbaa7e0910cef5b6bd654c5c15ae91000839a60
Showing with 443 additions and 411 deletions.
  1. +3 −0 .gitmodules
  2. +4 −3 README.md
  3. +43 −16 binding.gyp
  4. +1 −0 deps
  5. +2 −3 index.js
  6. +3 −3 package.json
  7. +115 −117 src/atb.cc
  8. +9 −9 src/atb.h
  9. +18 −16 src/common.h
  10. +245 −244 src/glfw.cc
View
@@ -0,0 +1,3 @@
[submodule "deps"]
path = deps
url = https://github.com/mikeseven/node-native-graphics-deps.git
View
@@ -30,9 +30,10 @@ Install GLEW and make sure its tests programs are working such as visualinfo. Yo
Now you can install node-glfw, the usual way: npm install node-glfw.
Installation (Windows)
-------------------------
Copy all deps/*.lib into your <Visual Studio>/VC/lib for 32-bit libraries, and <Visual Studio>/VC/lib/amd64 for 64-bit libraries.
Copy all deps/*.dll into <Windows>/System32.
----------------------
Have Visual Studio (Express version works fine) installed.
Windows dependencies are bundled with this package, so `npm install node-glfw` should work out-of-box.
Notes
-----
View
@@ -4,42 +4,69 @@
},
'conditions': [
# Replace gyp platform with node platform, blech
['platform == "mac"', {'variables': {'platform': 'darwin'}}],
['platform == "mac"', {'variables': {
'platform': 'darwin',
'ANTTWEAKBAR_ROOT': '/usr/local/Cellar/anttweakbar/1.16',
}}],
['platform == "win"', {'variables': {'platform': 'win32'}}],
],
'targets': [
{
'target_name': 'glfw',
'defines': [
'VERSION=0.3.1',
'VERSION=0.4.0',
],
'sources': [
'src/atb.cc', 'src/glfw.cc'
'sources': [
'src/atb.cc',
'src/glfw.cc'
],
'include_dirs': [
"<!(node -e \"require('nan')\")",
'./deps/include',
],
'conditions': [
['OS=="linux"', {
'libraries': ['-lAntTweakBar', '-lglfw', '-lGLEW']
['OS=="linux"', {'libraries': ['-lAntTweakBar', '<!@(pkg-config --libs glfw3 glew)']}],
}],
['OS=="mac"', {
'libraries': ['-lAntTweakBar', '-lglfw3', '-lGLEW', '-framework OpenGL'],
'include_dirs': ['/usr/local/include'],
'include_dirs': [ '<!@(pkg-config glfw3 glew --cflags-only-I | sed s/-I//g)','-I<(ANTTWEAKBAR_ROOT)/include'],
'libraries': [ '<!@(pkg-config --libs glfw3 glew)', '-L<(ANTTWEAKBAR_ROOT)/lib', '-lAntTweakBar', '-framework OpenGL']
'library_dirs': ['/usr/local/lib'],
}],
['OS=="win"', {
'libraries': [
'AntTweakBar64.lib',
'glew64s.lib',
'glfw3dll.lib',
'opengl32.lib'
'include_dirs': [
'./deps/glew/include',
'./deps/glfw/include',
'./deps/AntTweakBar/include'
],
'library_dirs': [
'./deps/glew/windows/lib/<(target_arch)',
'./deps/glfw/windows/lib-msvc120/<(target_arch)',
'./deps/AntTweakBar/windows/lib/'
],
'libraries': [
'glew32.lib',
'glfw3dll.lib',
'opengl32.lib'
],
'defines' : [
'WIN32_LEAN_AND_MEAN',
'VC_EXTRALEAN'
],
'defines' : [
'WIN32_LEAN_AND_MEAN',
'VC_EXTRALEAN'
]
'cflags' : [
'/O2','/Oy','/GL','/GF','/Gm-','/EHsc','/MT','/GS','/Gy','/GR-','/Gd'
],
'ldflags' : [
'/OPT:REF','/OPT:ICF','/LTCG'
],
'conditions': [
['target_arch=="ia32"', {
'libraries': ['AntTweakBar.lib']
}],
['target_arch=="x64"', {
'libraries': ['AntTweakBar64.lib']
}]
]
},
],
],
1 deps
Submodule deps added at 0b1c34
View
@@ -7,7 +7,7 @@ Object.defineProperty(GLFW, 'events', {
get: function () {
if (events) return events;
events = new (require('events').EventEmitter);
var _emit=events.emit;
events.emit=function() {
var args = Array.prototype.slice.call(arguments);
@@ -19,12 +19,11 @@ Object.defineProperty(GLFW, 'events', {
}
//_emit.apply(this,args);
events.listeners(args[0]).forEach(function(listener) {
listener(args[1]);
listener(args[1]);
});
};
return events;
},
enumerable: true,
configurable: true
});
View
@@ -1,6 +1,6 @@
{
"name": "node-glfw",
"version": "0.3.1",
"version": "0.4.0",
"description": "A NodeJS wrapper around GLFW 3.x library",
"main": "index.js",
"author": "Mikael Bourges-Sevenier <mikeseven@gmail.com>",
@@ -33,13 +33,13 @@
"test": "test"
},
"engines": {
"node": "0.6.5-0.11.10"
"node": ">=0.6.5 <4.0.0"
},
"scripts": {
"install": "node-gyp rebuild"
},
"dependencies": {
"bindings": "^1.2.1",
"nan": "^0.8.0"
"nan": "^2.0.9"
}
}
Oops, something went wrong.

0 comments on commit acbaa7e

Please sign in to comment.