It's probably going to be easier to just create a linux VM for
compiling/testing purposes.
No. You need to run the node-gyp configure/build cycle once for each
platform that you target. Here is how you approximately would script
that on a UNIX system:
I recommend setting up and using a local Linux virtual machine if you
do not have access to a Linux system elsewhere.
You might be able to get away with using a cross-compiler under
cygwin, but just mentioning that makes me cringe.
You might be able to get away with using a cross-compiler under
cygwin, but just mentioning that makes me cringe.Your advice is sound mscdex...I couldn't find much info on the net for cross compiling on windows possibly install linux on a vm is a good way to start!
Note that having a module that will hapilly 'npm install' on all three OSes does NOT require pre-building them. The Gyp scripting you saw does exactly that: it detects which OS it's building on and follows different instructions for each. Testing all three, on the other hand...I second mscdex' vote for using a virtual machine to test in a native environment. :)
Good luck!--Jon
Note that having a module that will hapilly 'npm install' on all three OSes does NOT require pre-building them. The Gyp scripting you saw does exactly that: it detects which OS it's building on and follows different instructions for each. Testing all three, on the other hand...I second mscdex' vote for using a virtual machine to test in a native environment. :)If you're looking at an embedded system, you *might* want to cross-compile the module down to a binary on a different machine, at which point you have stepped into a different arena from simply building something that will compile and run successfully across platforms. (I'd stick it out for native compilation; YMMV.)Good luck!--Jon