doc: add instructions for building on Windows
PR-URL: https://github.com/libuv/libuv/pull/1284 Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This commit is contained in:
parent
19c896dd08
commit
0953bf0dad
62
README.md
62
README.md
@ -152,18 +152,56 @@ To build with autotools:
|
|||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
First, [Python][] 2.6 or 2.7 must be installed as it is required by [GYP][].
|
Prerequisites:
|
||||||
If python is not in your path, set the environment variable `PYTHON` to its
|
|
||||||
location. For example: `set PYTHON=C:\Python27\python.exe`
|
|
||||||
|
|
||||||
To build with Visual Studio, launch a git shell (e.g. Cmd or PowerShell)
|
* [Python 2.6 or 2.7][] as it is required
|
||||||
and run vcbuild.bat which will checkout the GYP code into build/gyp and
|
by [GYP][].
|
||||||
generate uv.sln as well as related project files.
|
If python is not in your path, set the environment variable `PYTHON` to its
|
||||||
|
location. For example: `set PYTHON=C:\Python27\python.exe`
|
||||||
|
* One of:
|
||||||
|
* [Visual C++ Build Tools][]
|
||||||
|
* [Visual Studio 2015 Update 3][], all editions
|
||||||
|
including the Community edition (remember to select
|
||||||
|
"Common Tools for Visual C++ 2015" feature during installation).
|
||||||
|
* [Visual Studio 2017][], any edition (including the Build Tools SKU).
|
||||||
|
**Required Components:** "MSbuild", "VC++ 2017 v141 toolset" and one of the
|
||||||
|
Windows SDKs (10 or 8.1).
|
||||||
|
* Basic Unix tools required for some tests,
|
||||||
|
[Git for Windows][] includes Git Bash
|
||||||
|
and tools which can be included in the global `PATH`.
|
||||||
|
|
||||||
To have GYP generate build script for another system, checkout GYP into the
|
To build, launch a git shell (e.g. Cmd or PowerShell), run `vcbuild.bat`
|
||||||
project tree manually:
|
(to build with VS2017 you need to explicitly add a `vs2017` argument),
|
||||||
|
which will checkout the GYP code into `build/gyp`, generate `uv.sln`
|
||||||
|
as well as the necesery related project files, and start building.
|
||||||
|
|
||||||
|
```console
|
||||||
|
> vcbuild
|
||||||
|
```
|
||||||
|
|
||||||
|
Or:
|
||||||
|
|
||||||
|
```console
|
||||||
|
> vcbuild vs2017
|
||||||
|
```
|
||||||
|
|
||||||
|
To run the tests:
|
||||||
|
|
||||||
|
```console
|
||||||
|
> vcbuild test
|
||||||
|
```
|
||||||
|
|
||||||
|
To see all the options that could passed to `vcbuild`:
|
||||||
|
|
||||||
|
```console
|
||||||
|
> vcbuild help
|
||||||
|
vcbuild.bat [debug/release] [test/bench] [clean] [noprojgen] [nobuild] [vs2017] [x86/x64] [static/shared]
|
||||||
|
Examples:
|
||||||
|
vcbuild.bat : builds debug build
|
||||||
|
vcbuild.bat test : builds debug build and runs tests
|
||||||
|
vcbuild.bat release bench: builds release build and runs benchmarks
|
||||||
|
```
|
||||||
|
|
||||||
$ git clone https://chromium.googlesource.com/external/gyp.git build/gyp
|
|
||||||
|
|
||||||
### Unix
|
### Unix
|
||||||
|
|
||||||
@ -244,7 +282,11 @@ See the [guidelines for contributing][].
|
|||||||
|
|
||||||
[node.js]: http://nodejs.org/
|
[node.js]: http://nodejs.org/
|
||||||
[GYP]: http://code.google.com/p/gyp/
|
[GYP]: http://code.google.com/p/gyp/
|
||||||
[Python]: https://www.python.org/downloads/
|
|
||||||
[guidelines for contributing]: https://github.com/libuv/libuv/blob/master/CONTRIBUTING.md
|
[guidelines for contributing]: https://github.com/libuv/libuv/blob/master/CONTRIBUTING.md
|
||||||
[libuv_banner]: https://raw.githubusercontent.com/libuv/libuv/master/img/banner.png
|
[libuv_banner]: https://raw.githubusercontent.com/libuv/libuv/master/img/banner.png
|
||||||
[x32]: https://en.wikipedia.org/wiki/X32_ABI
|
[x32]: https://en.wikipedia.org/wiki/X32_ABI
|
||||||
|
[Python 2.6 or 2.7]: https://www.python.org/downloads/
|
||||||
|
[Visual C++ Build Tools]: http://landinghub.visualstudio.com/visual-cpp-build-tools
|
||||||
|
[Visual Studio 2015 Update 3]: https://www.visualstudio.com/vs/older-downloads/
|
||||||
|
[Visual Studio 2017]: https://www.visualstudio.com/downloads/
|
||||||
|
[Git for Windows]: http://git-scm.com/download/win
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user