diff --git a/HID/ia32/0.10/HID.node b/HID/ia32/0.10/HID.node new file mode 100644 index 00000000..1971558d Binary files /dev/null and b/HID/ia32/0.10/HID.node differ diff --git a/HID/ia32/0.11/HID.node b/HID/ia32/0.11/HID.node new file mode 100644 index 00000000..09a6a544 Binary files /dev/null and b/HID/ia32/0.11/HID.node differ diff --git a/HID/ia32/0.8/HID.node b/HID/ia32/0.8/HID.node new file mode 100644 index 00000000..135914e1 Binary files /dev/null and b/HID/ia32/0.8/HID.node differ diff --git a/HID/ia32/0.9/HID.node b/HID/ia32/0.9/HID.node new file mode 100644 index 00000000..fa384d46 Binary files /dev/null and b/HID/ia32/0.9/HID.node differ diff --git a/HID/index.js b/HID/index.js new file mode 100644 index 00000000..0b7267c6 --- /dev/null +++ b/HID/index.js @@ -0,0 +1,14 @@ +// Attempt to load each of the available .node files for the current processor +// architecture until one succeeds, or throw an exception if none do. +var versions = require("fs").readdirSync(__dirname + "\\" + process.arch); +if (!versions.some(function (version) { + try { + module.exports = require("./" + process.arch + "/" + version + "/HID.node"); + return true; + } catch (e) { + return false; + } +})) { + throw new Error("Your processor architecture and node version are not supported"); +}; + diff --git a/HID/x64/0.10/HID.node b/HID/x64/0.10/HID.node new file mode 100644 index 00000000..be7bd14e Binary files /dev/null and b/HID/x64/0.10/HID.node differ diff --git a/HID/x64/0.11/HID.node b/HID/x64/0.11/HID.node new file mode 100644 index 00000000..6a2adbda Binary files /dev/null and b/HID/x64/0.11/HID.node differ diff --git a/HID/x64/0.8/HID.node b/HID/x64/0.8/HID.node new file mode 100644 index 00000000..19dc83e2 Binary files /dev/null and b/HID/x64/0.8/HID.node differ diff --git a/HID/x64/0.9/HID.node b/HID/x64/0.9/HID.node new file mode 100644 index 00000000..bbc3d71e Binary files /dev/null and b/HID/x64/0.9/HID.node differ diff --git a/blinkstick.js b/blinkstick.js index b0d2def1..c63a4d1c 100644 --- a/blinkstick.js +++ b/blinkstick.js @@ -1,4 +1,4 @@ -var usb = require('./platform/windows/HID.node'); +var usb = require("./HID"); var VENDOR_ID = 0x20a0, PRODUCT_ID = 0x41e5, diff --git a/platform/windows/HID.node b/platform/windows/HID.node deleted file mode 100644 index a50ced1f..00000000 Binary files a/platform/windows/HID.node and /dev/null differ