The correct approach is to set up your module to compile using node-gyp, such that it can be compiled on windows or on Unix.
Relying on a preinstall script to fetch stuff from a different site is weird. In many ways, that's even worse than relying on install-time compilation, because it's yet another service to trust and depend on. What's worse, I'm guessing that the bin/downloader thing assumes bash or sh or something. Bundling multiple pre-compiled binaries is also awful. Use a binding.gyp file. Use node-gyp. This is what we're going to be optimizing for in the future. On Sat, May 5, 2012 at 10:33 PM, Morteza Milani <[email protected]> wrote: >> The trouble is it's not just multiple platforms, but multiple node >> versions that you may want to support. I'm assuming your binary is a node >> extension. Is that true? > > No its not node extension. > >> You could distribute your module without the binary and tell people to >> grab the binary themselves in whatever way they feel is best. > > Do you feel ok if there was no npm to install modules and you had to install > them manually yourself? Of Course not! its just to ease the process. So my > downloader is! This is what node-gyp does even. > > I don't think its another point of failure. Its even a positive point: > > 1) Users don't need to download a huge node module that contains unnecessary > files (those for other platforms). > 2) They don't need to choose among packages in a download page and put it in > the proper place in directory structure! > > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
