-
Notifications
You must be signed in to change notification settings - Fork 604
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
Build UTF-8 validator using node-gyp #41
Conversation
Wow, thank you! I'll merge this in and try it out. Do you think we should package pre-compiled binaries of the validator for Windows for those who don't have Visual Studio? |
Build UTF-8 validator using node-gyp
I think if people want to use native modules, then they should have installed compiler. Otherwise we will have to distribute versions for all versions NodeJS, Windows and processor arch. Also in this case they will have to install redistributable packages, like this: Microsoft Visual C++ 2010 Redistributable Package (x86). So I think distribution of pre-compiled binaries is not justified. In this case we can offer to use some Javascript version of validator. |
I also think it doesn't make sense to distribute binaries. Instead, you could try to load the validator, and if that fails then print a warning. |
Yes, I agree in Unix culture, but in Windows culture, binary distribution is expected and many more casual developers don't know about things like Visual Studio. I would expect that servers where Node is deployed would not have Visual Studio installed, and also that JavaScript developers who have no knowledge or interest in Visual Studio will want to use Node to the fullest extent without having to branch out into figuring out how to compile native modules. It should ideally "just work." It usually does "just work" to compile yourself on unix systems because it's far more common for the compiler toolchain to be readily available and already installed there. |
Also, wouldn't the C++ 2010 Redistributable package have already been installed by the Node binary installer? |
Once I installed NodeJS on Windows server and built some native module. I built the module locally on my computer and then moved it to the server. I needed to install Redistributable package to the server since the module wasn't loaded. Probably this problem can be solved using static linking with runtime components and NodeJS probably uses it. |
Alright. We'll go with only source distribution for now then. :) |
Ok, so I'm not a Windows guy, and I can't quite figure out how to make this work on Windows. Can you provide me some basic step by step instructions for building on Windows with this patch? I really want to validate the patch before I push a new version to NPM. Much appreciated!! |
I've finally released version 1.0.5 which includes all your updates to make the build process work correctly on Windows. Thanks so much for your help, and please accept my apologies for taking so long to get this pushed out! Let me know if there are any further issues with this. |
Recently you reported that you are going to get the native UTF-8 validator to work on Windows. I prepared a solution for this.
I used
node-gyp
for this. It's a cross-platform tool (also support Windows builds), whilenode-waf
will be removed since versionv0.8.x
.More details about cross-platform builds you can be read here and
node-gyp
module page is there