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

Build UTF-8 validator using node-gyp #41

Merged
merged 2 commits into from
Mar 24, 2012
Merged

Build UTF-8 validator using node-gyp #41

merged 2 commits into from
Mar 24, 2012

Conversation

zerodivisi0n
Copy link
Contributor

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), while node-waf will be removed since version v0.8.x.

More details about cross-platform builds you can be read here and node-gyp module page is there

@theturtle32
Copy link
Owner

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?

theturtle32 added a commit that referenced this pull request Mar 24, 2012
Build UTF-8 validator using node-gyp
@theturtle32 theturtle32 merged commit 8cfb26c into theturtle32:master Mar 24, 2012
@zerodivisi0n
Copy link
Contributor Author

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.

@wereHamster
Copy link
Contributor

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.

@theturtle32
Copy link
Owner

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.

@theturtle32
Copy link
Owner

Also, wouldn't the C++ 2010 Redistributable package have already been installed by the Node binary installer?

@zerodivisi0n
Copy link
Contributor Author

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.

@theturtle32
Copy link
Owner

Alright. We'll go with only source distribution for now then. :)

@theturtle32
Copy link
Owner

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!!

@theturtle32
Copy link
Owner

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.

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

Successfully merging this pull request may close these issues.

None yet

3 participants