It seems I do not have to create a new pull request, but my previous one is automatically updated to include the changes I suggested.
I’ve updated the code to attempt to load all available versions of the “.node” file for the user’s processor architecture. The first one to successfully load will be used. This has the added benefit of allowing me to remove the 0.12 version of the code as the 0.11 version works just fine in 0.12. It also means that unless there are new changes to the addon format, you do not need to build any new “.node” files for future version of node.js.
You can test if the 0.10 version works in 0.8 and 0.9, if it does not, you can simply add 0.8 to the list in build-targets.txt and run install.cmd to create additional “.node” files. Then test if they work in 0.9 and if not, add that to the list too, etc.
EDIT: I’ve tested it and the 0.10 version will not work in 0.8 or 0.9, so I added 0.8.9 and 0.9.9 to the build-targets.txt file. I was unable to build the 0.9.9 version because of an error:
HID.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class v8::Handle<class v8::Value> __cdecl node::MakeCallback(class v8::Handle<class v8::Object>,class v8::Handle<class v8::Function>,int,class v8::Handle<class v8::Value> * const)" (__imp_?MakeCallback@node@@YA?AV?$Handle@VValue@v8@@@v8@@V?$Handle@VObject@v8@@@3@V?$Handle@VFunction@v8@@@3@HQAV23@@Z) [H:\dev\node\node-hid\build\HID.vcxproj]
H:\dev\node\node-hid\build\Release\HID.node : fatal error LNK1120: 1 unresolved externals [H:\dev\node\node-hid\build\HID.vcxproj]
Update: I was able to build for 0.9.7, but it appears that module will not load in 0.9.8 or 0.9.9.
It starting to look like supporting all versions of node with pre-compiled binaries may be a stretch goal, but using multiple versions should definitely be an improvement from the original.