couchbase/couchnode — pull request #3 by rvagg (2012-11-07 06:51:17+00:00)
Title: added GYP bindings & basic windows support

Firstly, I know that I haven't followed your contributor guidelines and have bypassed Gerrit, I'm not actually expecting you to pull in all of these changes so perhaps this is just a discussion to start with?

I wanted to evaluate Couchbase for a new Node.js project that must run on Windows, so I needed this to compile on Windows. I've started with a *bindings.gyp* because you're going to need that anyway when node-waf is completely gone (soon). I've also had to make some code tweaks to make it compile on Windows and I've probably made a bit of a mess of it. It now compiles on Linux & Windows (haven't tested OS X). Unfortunately the tests all FAIL on Windows, they hook into libcouchbase properly but get stuck somewhere in there during connection and I'm not sure whether the problem is with couchnode or libcouchbase and I certainly don't have the time to work it all out and get any further for now.

Unfortunately it's a bit difficult to hook in the link to libcouchbase on Windows so I've taken the kludge approach that a few other Node projects with external native dependencies have taken which is to specify exactly where libcouchbase is installed. Ideally libcouchbase would be bundled with couchnode with its own GYP file which would be defined as a dependency in the main bindings.gyp. Alternatively, binaries could be distributed with the package.

I've also pulled in *bindings* as a dependency as a more reliable way to load the native lib.

Let me know if there's anything I need to explain.

Cheers.