-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add windows-build-tools to Readme #970
Conversation
* Added Microsoft's [windows-build-tools](https://github.com/felixrieseberg/windows-build-tools) to the readme.
@@ -42,15 +42,17 @@ You will also need to install: | |||
* You also need to install the `Command Line Tools` via Xcode. You can find this under the menu `Xcode -> Preferences -> Downloads` | |||
* This step will install `gcc` and the related toolchain containing `make` | |||
* On Windows: | |||
* Visual C++ Build Environment: | |||
* Option 1: Install [Visual C++ Build Tools](http://landinghub.visualstudio.com/visual-cpp-build-tools) using the **Default Install** option. | |||
* Option 1: Install all the required tools and configurations using Microsoft's [windows-build-tools](https://github.com/felixrieseberg/windows-build-tools) using `npm install -g windows-build-tools` from an elevated PowerShell (run as Administrator). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if you don't use PowerShell when doing this? What happens when you don't use elevated privileges?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Not using cmd: We'll spawn a little ps1 (invisible) in the background.
- Not admin: You'll get a pretty error message (telling you to try again as admin) and an exit code 1. Installation is not attempted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you recommend Command Prompt instead? I suspect it will be simpler for many users. Or both: "Command Prompt or PowerShell".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, PowerShell is rather easier to use for most users due to various unix-like aliases, nicer output and various UX issues (like multiline copy) solved. As a developer working on Windows, I'd say this is what most developers on Windows use nowadays.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PowerShell is rather easier ... I'd say this is what most developers on Windows use nowadays
Anecdotally in my time running the relatively popular native extension, node-sass, I don't believe this to be the case. At least not among developers using node primarily for their asset pipeline.
Amazing, this'll be fantastic if it's as simple as it looks. @felixrieseberg can you point to where you're modifying npm config to make this work? I'd like to understand how you're doing this that makes it conflict-free and yet makes npm/node-gyp safely aware of it. @nodejs/platform-windows could you please take a look at this and give some opinions? |
Of course (and thanks for the 🌷!). The project is here and is really just a little wrapper around the required MSIs, running them headless with the appropriate parameters. IT Admins have been installing things on Windows headless for years, so a coin dropped when somebody asked me why the heck she/he can't install the build tools directly from npm. In detail, the C++ build tools come with no-conflict (they simply won't install if the appropriate packages have already been installed by either the tools themselves or other applications). Python's 2.7 MSI does not modify If any of the smart people in @nodejs/platform-windows have feedback/input/things to yell at me, I'd ❤️ to hear it. |
Ah nice, so the C++ tools go into a standard location, that's the bit I was imagining being hard to do a custom location, Python being in a custom location makes sense although I wonder if it'll make a difference not having |
@felixrieseberg thanks for submitting this! I tried this and it did not go too well, opened an issue in your repo: felixrieseberg/windows-build-tools#5 . But I'm sure we can make it work! |
cc @mousetraps |
Left two tickets also. Most importantly: can you state what Also I would be very happy if compatibility and user friendliness are No. 1 priority for this. Since we don't have quite the history doing so on NT, I fear the promise issue, v4 compat and introducing PowerShell aren't helping. I personally would love to see more OSS behind what BuildTools_Full.exe ships. Otherwise I love where that heads. Thx. |
@eljefedelrodeodeljefe: Super fair point - the build tools package comes straight from the Visual Studio C++ Compiler team. You can read more about it here. They are free. Included, in detail: Visual C++ Compilers (targeting x86, X64 and ARM) (I hear your point though, this should be in the readme - and will be added). |
@felixrieseberg awesome and thanks for addressing this. And thanks for the for link. I assume W10 SDK is included then in what we download, right (it's marked as optional above)? Then it's everything I hoped and everything we'd need for NT build environment. Shout outs to the compiler team. I dig into their doc a little then. |
In 99% of cases, you probably want the 8.1 Kit, so that's what's in there right now. To be clear, 8.1 binaries run well on Windows 10, you just need 10 for 10-specific features - and I'm not aware of any npm modules that do. The other way around, the 10 SDK does require 10, which is why a slightly older SDK probably hits more people. Again, thanks for helping out and being interested. |
I was doing some related work, basically guessing on include paths. There was at least one W10, but tbh, I can be wrong or it's currently obsolete. Just asking b/c I had to specifically install it on my VS2015 setup afterwards. Please also note, I write on OS X but am enthusiastic for the NT stuff. I was attempting building a toolchain without python here, but in any case lack of compiler or unknown locations of it would have been a major obstacle. I am integrating your work and probably can give more feedback afterwards. Really excited now. |
Thanks to those of you trying it out - thanks to your help, we managed to figure out that smaller machines would run into memory/cpu limits, mostly because I went a bit overboard with tailing the logfiles. The whole thing is now a lot less resource hungy and installs fine on a little Windows machine with less than 1 GB in total memory. |
@joaocgreis @orangemocha can you have a look at the latest incarnation of this and see if it's something we might be prepared to promote? |
@felixrieseberg Have you had a chance to look at felixrieseberg/windows-build-tools#8 (comment) ? @rvagg We certainly want to promote this, but it is currently downloading the wrong package and has to be fixed upstream first. |
@joaocgreis That was a fixed a few days ago, I just forgot to update folks - sorry for forgetting to comment on that one. |
Tested, LGTM. Will land tomorrow if there are no objections. |
Added Microsoft's [windows-build-tools](https://github.com/felixrieseberg/windows-build-tools) to the readme. PR-URL: #970 Reviewed-By: João Reis <reis@janeasystems.com>
Landed in f6eab1f |
Hi from Microsoft's open source team! We're trying to make things better - and one of the things we wanted to make easier is the installation of requirements to run node-gyp. Instead of installing stuff manually, Windows users can now simply run
npm i -g windows-build-tools
, which will install the C++ build tools and Python (conflict-free) and then configure npm appropriately.This PR simply adds a reference to those tools to the readme.