Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows port #48

Closed
springmeyer opened this issue Nov 6, 2011 · 12 comments
Closed

windows port #48

springmeyer opened this issue Nov 6, 2011 · 12 comments

Comments

@springmeyer
Copy link
Contributor

Ticket to track potential future support for Windows.

Tasks:

  1. Compatibility with libuv/node v6.x (new event emitters) - support node 0.6.x #47

  2. Remove the phtread mutex usage (or provide option on windows to use boost threads for windows compatibility)

  3. Build system fixes, mostly waiting on upstream as per http://blog.nodejs.org/2011/11/05/node-v0-6-0/: "For example, we are not yet providing users with a blessed path for building addon modules in MS Visual Studio. Work will continue in later releases."

springmeyer pushed a commit that referenced this issue Nov 6, 2011
…- all tests are passing on OS X 10.7 with boost 1.47 - todo: test on linux - refs #48
@kkaefer
Copy link
Contributor

kkaefer commented Nov 7, 2011

Hmm, node-sqlite3 doesn't really use pthreads; the only part it uses are the mutexes. I haven't looked to closely at uv_async, but we can potentially remove those as well. I'd rather not have boost as a build dependency since this will likely incur lots of tickets about build failures from npm due to missing boost.

@springmeyer
Copy link
Contributor Author

My branch using boost is simply a test to see if it was easy to replace them with something cross-platform - it appears trivially easy to do if needed, but great if it is not needed and pthreads calls can be removed completely.

@springmeyer
Copy link
Contributor Author

short of using boost mutexes this commit gives a sense of how this could be done with #ifdefs: nodejs/node-v0.x-archive@97cada0

@kkaefer
Copy link
Contributor

kkaefer commented Nov 8, 2011

Current status: Compiles fine (using Windows API mutexes), but linking fails in one spot: node doesn't expose the Buffer interface on windows to C++ modules yet. See nodejs/node-v0.x-archive#2036

@Mithgol
Copy link
Contributor

Mithgol commented Dec 5, 2011

I am happy to notice that nodejs/node-v0.x-archive#2036 is a closed issue.

@kkaefer
Copy link
Contributor

kkaefer commented Dec 7, 2011

The windows branch of this repository has a version of node-sqlite3 that works. Build instructions for Windows are in the wiki. This will get released into npm eventually, once it's properly tested.

@Mithgol
Copy link
Contributor

Mithgol commented Dec 9, 2011

I wonder whether someone would ever start providing pre-compiled win32 port of node-sqlite3 (something like a .zip pack with .node and some .js around).

I know the current trend is distributed npm-building of everything from the source, but… anyone on Windows is prepared to play with small and elegant node.exe (which is ≈5 megabytes of just a single file), yet some people (I mean some of JS people who were never really into C++ previously) would probably think twice before getting somewhat huge Visual C++ 2010 Express installed, even though it's free.

@kkaefer
Copy link
Contributor

kkaefer commented Dec 9, 2011

There will be a precompiled binary at some point, but there's no clear blessed path to do so yet via npm.

@Mithgol
Copy link
Contributor

Mithgol commented Dec 26, 2011

I have just read package.json and seen that node-sqlite3 does not actually depend on any other npm-registered package (except step in devDependencies, but that probably doesn't count).

That means, @kkaefer, that you could cease any waiting for a clear blessed path to install node-sqlite3 with npm, but rather start providing some pre-compiled Windows binary in a simple archive (that won't need any npm install sqlite3 at all).

You may have already seen how some other module devs already do that for some time and they seem successful. For example, since at least November 2011 node-firebird-libfbclient provides a pre-compiled (and zip-packed) Windows build:

Users unpack it, and the module just works.

@Mithgol
Copy link
Contributor

Mithgol commented Feb 7, 2012

@kkaefer

I have to update the above information. The current most blessed path of distributing pre-compiled modules with npm is applying node-bindings. The npm-delivered package contains pre-compiled binaries for all of the available platforms; node-bindings module picks the necessary binary at runtime.

(See node-ffi for example.)

@Mithgol
Copy link
Contributor

Mithgol commented Apr 12, 2012

Anyone looking for Windows port (to be built by themselves) should probably grab the code from #61.

(I write «probably» here because I haven't tried it yet.)

@kkaefer
Copy link
Contributor

kkaefer commented Apr 25, 2012

#61 has been merged into master now.

@kkaefer kkaefer closed this as completed Apr 25, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants