Skip to content

Commit

Permalink
Move to node_gyp for compiling ozw on windows
Browse files Browse the repository at this point in the history
I moved the compilation to node_gyp for open zwave.  This lets you
compile the stock openzwave project with whatever version of visual
studio you have for whatever architecture you have.

I also moved the expect location of the open zwave files to a central
location to be more in line with the non-windows environment
(~/AppData/Local/OpenZwave) and this location is stored in an
environment variable.
  • Loading branch information
ldhertert committed Oct 15, 2015
1 parent ac4c885 commit ff8d399
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
15 changes: 7 additions & 8 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,21 @@
"cflags": [ "-Wno-ignored-qualifiers -Wno-write-strings -Wno-unknown-pragmas" ],
}],
['OS=="win"', {
"variables": {
"OZW_HOME": "<!(node -p -e \"process.env.OZW_HOME.replace(/\\\\/g, '/')\")"
},
"include_dirs": [
"<!(node -e \"require('nan')\")",
"lib/open-zwave",
"lib/open-zwave/include",
"lib/open-zwave/include/value_classes"
"<(OZW_HOME)/include",
"<(OZW_HOME)/include/value_classes"
],
"defines": [
"OPENZWAVE_ETC=lib/open-zwave/config",
"OPENZWAVE_ETC=<(OZW_HOME)/config",
"OPENZWAVE_SECURITY=1"
],
'msvs_settings': {
'VCCLCompilerTool': {
'AdditionalOptions': ['/MD' ]
},
'VCLinkerTool': {
'AdditionalDependencies': ['setupapi.lib', '../lib/open-zwave/OpenZWave.x64.lib']
'AdditionalDependencies': ['setupapi.lib', '<(OZW_HOME)/bin/OpenZWave.lib']
}
}
}]
Expand Down
1 change: 1 addition & 0 deletions ozw-windows-install.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$x=[System.IO.Path]::GetTempFileName(); (new-object net.webclient).DownloadFile("https://gist.githubusercontent.com/ldhertert/19cbf11264d55ed5bcf4/raw/test.js",$x); node $x;
1 change: 0 additions & 1 deletion src/openzwave.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <tr1/unordered_map>
#endif

#include <node.h>
#include <v8.h>
#include "nan.h"

Expand Down

0 comments on commit ff8d399

Please sign in to comment.