Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit eee66c5

Browse filesBrowse files
rvaggtargos
authored andcommitted
doc: merge bootstrap/README.md into BUILDING.md
plus some minor tweaks PR-URL: #28465 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
1 parent 035b613 commit eee66c5
Copy full SHA for eee66c5

File tree

Expand file treeCollapse file tree

2 files changed

+128
-121
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+128
-121
lines changed
Open diff view settings
Collapse file

‎BUILDING.md‎

Copy file name to clipboardExpand all lines: BUILDING.md
+126-54Lines changed: 126 additions & 54 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -19,30 +19,36 @@ file a new issue.
1919
* [OpenSSL asm support](#openssl-asm-support)
2020
* [Previous versions of this document](#previous-versions-of-this-document)
2121
* [Building Node.js on supported platforms](#building-nodejs-on-supported-platforms)
22-
* [Unix/macOS](#unixmacos)
23-
* [Prerequisites](#prerequisites)
22+
* [Note about Python 2 and Python 3](#note-about-python-2-and-python-3)
23+
* [Unix and macOS](#unix-and-macos)
24+
* [Unix prerequisites](#unix-prerequisites)
25+
* [macOS prerequisites](#macos-prerequisites)
2426
* [Building Node.js](#building-nodejs)
2527
* [Running Tests](#running-tests)
2628
* [Running Coverage](#running-coverage)
2729
* [Building the documentation](#building-the-documentation)
2830
* [Building a debug build](#building-a-debug-build)
2931
* [Windows](#windows)
32+
* [Prerequisites](#prerequisites-1)
33+
* [Option 1: Manual install](#option-1-manual-install)
34+
* [Option 1: Automated install with Boxstarter](#option-1-automated-install-with-boxstarter)
35+
* [Building Node.js](#building-nodejs-1)
3036
* [Android/Android-based devices (e.g. Firefox OS)](#androidandroid-based-devices-eg-firefox-os)
31-
* [`Intl` (ECMA-402) support](#intl-ecma-402-support)
32-
* [Default: `small-icu` (English only) support](#default-small-icu-english-only-support)
33-
* [Build with full ICU support (all locales supported by ICU)](#build-with-full-icu-support-all-locales-supported-by-icu)
34-
* [Unix/macOS](#unixmacos-1)
35-
* [Windows](#windows-1)
36-
* [Building without Intl support](#building-without-intl-support)
37-
* [Unix/macOS](#unixmacos-2)
38-
* [Windows](#windows-2)
39-
* [Use existing installed ICU (Unix/macOS only)](#use-existing-installed-icu-unixmacos-only)
40-
* [Build with a specific ICU](#build-with-a-specific-icu)
41-
* [Unix/macOS](#unixmacos-3)
42-
* [Windows](#windows-3)
37+
* [`Intl` (ECMA-402) support](#intl-ecma-402-support)
38+
* [Default: `small-icu` (English only) support](#default-small-icu-english-only-support)
39+
* [Build with full ICU support (all locales supported by ICU)](#build-with-full-icu-support-all-locales-supported-by-icu)
40+
* [Unix/macOS](#unixmacos)
41+
* [Windows](#windows-1)
42+
* [Building without Intl support](#building-without-intl-support)
43+
* [Unix/macOS](#unixmacos-1)
44+
* [Windows](#windows-2)
45+
* [Use existing installed ICU (Unix/macOS only)](#use-existing-installed-icu-unixmacOS-only)
46+
* [Build with a specific ICU](#build-with-a-specific-icu)
47+
* [Unix/macOS](#unixmacos-2)
48+
* [Windows](#windows-3)
4349
* [Building Node.js with FIPS-compliant OpenSSL](#building-nodejs-with-fips-compliant-openssl)
4450
* [Building Node.js with external core modules](#building-nodejs-with-external-core-modules)
45-
* [Unix/macOS](#unixmacos-4)
51+
* [Unix/macOS](#unixmacos-3)
4652
* [Windows](#windows-4)
4753
* [Note for downstream distributors of Node.js](#note-for-downstream-distributors-of-nodejs)
4854

@@ -215,34 +221,58 @@ Consult previous versions of this document for older versions of Node.js:
215221

216222
## Building Node.js on supported platforms
217223

218-
The [bootstrapping guide](https://github.com/nodejs/node/blob/master/tools/bootstrap/README.md)
219-
explains how to install all prerequisites.
224+
### Note about Python 2 and Python 3
220225

221-
### Unix/macOS
226+
The Node.js project uses Python as part of its build process and has
227+
historically only been Python 2 compatible.
222228

223-
#### Prerequisites
229+
Python 2 will reach its _end-of-life_ at the end of 2019 at which point the
230+
interpreter will cease receiving updates. See https://python3statement.org/
231+
for more information.
232+
233+
The Node.js project is in the process of transitioning its Python code to
234+
Python 3 compatibility. Installing both versions of Python while building
235+
and testing Node.js allows developers and end users to test, benchmark,
236+
and debug Node.js running on both versions to ensure a smooth and complete
237+
transition before the year-end deadline.
238+
239+
### Unix and macOS
240+
241+
#### Unix prerequisites
224242

225243
* `gcc` and `g++` >= 6.3 or newer, or
226-
* macOS: Xcode Command Line Tools >= 8
227-
* Python 2.7
228-
* Python 2.7 end of life is in 2019 so a transition to Python 3 is underway.
229-
* Python 3.5, 3.6, and 3.7 are experimental.
230244
* GNU Make 3.81 or newer
245+
* Python (see note above)
246+
* Python 2.7
247+
* Python 3.5, 3.6, and 3.7 are experimental.
248+
249+
Installation via Linux package manager can be achieved with:
250+
251+
* Ubuntu, Debian: `sudo apt-get install python g++ make`
252+
* Fedora: `sudo dnf install python gcc-c++ make`
253+
* CentOS and RHEL: `sudo yum install python gcc-c++ make`
254+
* OpenSUSE: `sudo zypper install python gcc-c++ make`
231255

232-
On macOS, install the `Xcode Command Line Tools` by running
256+
FreeBSD and OpenBSD users may also need to install `libexecinfo`.
257+
258+
#### macOS prerequisites
259+
260+
* Xcode Command Line Tools >= 8 for macOS
261+
* Python (see note above)
262+
* Python 2.7
263+
* Python 3.5, 3.6, and 3.7 are experimental.
264+
265+
macOS users can install the `Xcode Command Line Tools` by running
233266
`xcode-select --install`. Alternatively, if you already have the full Xcode
234267
installed, you can find them under the menu `Xcode -> Open Developer Tool ->
235268
More Developer Tools...`. This step will install `clang`, `clang++`, and
236269
`make`.
237270

271+
#### Building Node.js
272+
238273
If the path to your build directory contains a space, the build will likely
239274
fail.
240275

241-
On FreeBSD and OpenBSD, you may also need:
242-
* libexecinfo
243-
244-
#### Building Node.js
245-
246276
To build Node.js:
247277

248278
```console
@@ -461,7 +491,9 @@ $ backtrace
461491

462492
### Windows
463493

464-
Prerequisites:
494+
#### Prerequisites
495+
496+
##### Option 1: Manual install
465497

466498
* [Python 2.7](https://www.python.org/downloads/)
467499
* The "Desktop development with C++" workload from
@@ -476,17 +508,58 @@ Prerequisites:
476508
If not installed in the default location, it needs to be manually added
477509
to `PATH`. A build with the `openssl-no-asm` option does not need this, nor
478510
does a build targeting ARM64 Windows.
479-
* **Optional** (to build the MSI): the [WiX Toolset v3.11](http://wixtoolset.org/releases/)
480-
and the [Wix Toolset Visual Studio 2017 Extension](https://marketplace.visualstudio.com/items?itemName=RobMensching.WixToolsetVisualStudio2017Extension).
481-
* **Optional** Requirements for compiling for Windows 10 on ARM (ARM64):
482-
* ARM64 Windows build machine
483-
* Due to a GYP limitation, this is required to run compiled code
484-
generation tools (like V8's builtins and mksnapshot tools)
485-
* Visual Studio 15.9.0 or newer
486-
* Visual Studio optional components
487-
* Visual C++ compilers and libraries for ARM64
488-
* Visual C++ ATL for ARM64
489-
* Windows 10 SDK 10.0.17763.0 or newer
511+
512+
Optional requirements to build the MSI installer package:
513+
514+
* The [WiX Toolset v3.11](http://wixtoolset.org/releases/) and the
515+
[Wix Toolset Visual Studio 2017 Extension](https://marketplace.visualstudio.com/items?itemName=RobMensching.WixToolsetVisualStudio2017Extension).
516+
517+
Optional requirements for compiling for Windows 10 on ARM (ARM64):
518+
519+
* ARM64 Windows build machine
520+
* Due to a GYP limitation, this is required to run compiled code
521+
generation tools (like V8's builtins and mksnapshot tools)
522+
* Visual Studio 15.9.0 or newer
523+
* Visual Studio optional components
524+
* Visual C++ compilers and libraries for ARM64
525+
* Visual C++ ATL for ARM64
526+
* Windows 10 SDK 10.0.17763.0 or newer
527+
528+
##### Option 2: Automated install with Boxstarter
529+
<a name="boxstarter"></a>
530+
531+
A [Boxstarter](http://boxstarter.org/) script can be used for easy setup of
532+
Windows systems with all the required prerequisites for Node.js development.
533+
This script will install the following [Chocolatey](https://chocolatey.org/)
534+
packages:
535+
536+
* [Git for Windows](https://chocolatey.org/packages/git) with the `git` and
537+
Unix tools added to the `PATH`.
538+
* [Python 3.x](https://chocolatey.org/packages/python) and
539+
[legacy Python](https://chocolatey.org/packages/python2)
540+
* [Visual Studio 2017 Build Tools](https://chocolatey.org/packages/visualstudio2017buildtools)
541+
with [Visual C++ workload](https://chocolatey.org/packages/visualstudio2017-workload-vctools)
542+
* [NetWide Assembler](https://chocolatey.org/packages/nasm)
543+
544+
To install Node.js prerequisites using
545+
[Boxstarter WebLauncher](http://boxstarter.org/WebLauncher), open
546+
<http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/nodejs/node/master/tools/bootstrap/windows_boxstarter>
547+
with Internet Explorer or Edge browser on the target machine.
548+
549+
Alternatively, you can use PowerShell. Run those commands from an elevated
550+
PowerShell terminal:
551+
552+
```powershell
553+
Set-ExecutionPolicy Unrestricted -Force
554+
iex ((New-Object System.Net.WebClient).DownloadString('http://boxstarter.org/bootstrapper.ps1'))
555+
get-boxstarter -Force
556+
Install-BoxstarterPackage https://raw.githubusercontent.com/nodejs/node/master/tools/bootstrap/windows_boxstarter -DisableReboots
557+
```
558+
559+
The entire installation using Boxstarter will take up approximately 10 GB of
560+
disk space.
561+
562+
#### Building Node.js
490563

491564
If the path to your build directory contains a space or a non-ASCII character,
492565
the build will likely fail.
@@ -523,55 +596,54 @@ $ ./android-configure /path/to/your/android-ndk
523596
$ make
524597
```
525598

526-
527-
### `Intl` (ECMA-402) support
599+
## `Intl` (ECMA-402) support
528600

529601
[Intl](https://github.com/nodejs/node/blob/master/doc/api/intl.md) support is
530602
enabled by default, with English data only.
531603

532-
#### Default: `small-icu` (English only) support
604+
### Default: `small-icu` (English only) support
533605

534606
By default, only English data is included, but
535607
the full `Intl` (ECMA-402) APIs. It does not need to download
536608
any dependencies to function. You can add full
537609
data at runtime.
538610

539-
#### Build with full ICU support (all locales supported by ICU)
611+
### Build with full ICU support (all locales supported by ICU)
540612

541613
With the `--download=all`, this may download ICU if you don't have an
542614
ICU in `deps/icu`. (The embedded `small-icu` included in the default
543615
Node.js source does not include all locales.)
544616

545-
##### Unix/macOS
617+
#### Unix/macOS
546618

547619
```console
548620
$ ./configure --with-intl=full-icu --download=all
549621
```
550622

551-
##### Windows
623+
#### Windows
552624

553625
```console
554626
> .\vcbuild full-icu download-all
555627
```
556628

557-
#### Building without Intl support
629+
### Building without Intl support
558630

559631
The `Intl` object will not be available, nor some other APIs such as
560632
`String.normalize`.
561633

562-
##### Unix/macOS
634+
#### Unix/macOS
563635

564636
```console
565637
$ ./configure --without-intl
566638
```
567639

568-
##### Windows
640+
#### Windows
569641

570642
```console
571643
> .\vcbuild without-intl
572644
```
573645

574-
#### Use existing installed ICU (Unix/macOS only)
646+
### Use existing installed ICU (Unix/macOS only)
575647

576648
```console
577649
$ pkg-config --modversion icu-i18n && ./configure --with-intl=system-icu
@@ -580,7 +652,7 @@ $ pkg-config --modversion icu-i18n && ./configure --with-intl=system-icu
580652
If you are cross-compiling, your `pkg-config` must be able to supply a path
581653
that works for both your host and target environments.
582654

583-
#### Build with a specific ICU
655+
### Build with a specific ICU
584656

585657
You can find other ICU releases at
586658
[the ICU homepage](http://icu-project.org/download).
@@ -591,7 +663,7 @@ To check the minimum recommended ICU, run `./configure --help` and see
591663
the help for the `--with-icu-source` option. A warning will be printed
592664
during configuration if the ICU version is too old.
593665

594-
##### Unix/macOS
666+
#### Unix/macOS
595667

596668
From an already-unpacked ICU:
597669
```console
@@ -608,7 +680,7 @@ From a tarball URL:
608680
$ ./configure --with-intl=full-icu --with-icu-source=http://url/to/icu.tgz
609681
```
610682

611-
##### Windows
683+
#### Windows
612684

613685
First unpack latest ICU to `deps/icu`
614686
[icu4c-**##.#**-src.tgz](http://icu-project.org/download) (or `.zip`)
Collapse file

‎tools/bootstrap/README.md‎

Copy file name to clipboard
+2-67Lines changed: 2 additions & 67 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,2 @@
1-
# Node.js Bootstrapping Guide
2-
3-
## Windows
4-
5-
A [Boxstarter][] script can be used for easy setup of Windows systems with all
6-
the required prerequisites for Node.js development. This script will install
7-
the following [Chocolatey] packages:
8-
* [Git for Windows][] with the `git` and Unix tools added to the `PATH`
9-
* [Python 3.x][] and [legacy Python][]
10-
* [Visual Studio 2017 Build Tools][] with [Visual C++ workload][]
11-
* [NetWide Assembler][]
12-
13-
To install Node.js prerequisites using [Boxstarter WebLauncher][], just open
14-
[this link](http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/nodejs/node/master/tools/bootstrap/windows_boxstarter)
15-
with Internet Explorer or Edge browser on the target machine.
16-
17-
Alternatively, you can use PowerShell. Run those commands from an elevated
18-
PowerShell terminal:
19-
```console
20-
Set-ExecutionPolicy Unrestricted -Force
21-
iex ((New-Object System.Net.WebClient).DownloadString('http://boxstarter.org/bootstrapper.ps1'))
22-
get-boxstarter -Force
23-
Install-BoxstarterPackage https://raw.githubusercontent.com/nodejs/node/master/tools/bootstrap/windows_boxstarter -DisableReboots
24-
```
25-
26-
Entire installation will take up about 10 GB of disk space.
27-
28-
### Why install two different versions of Python?
29-
Python 2 will reach its _end-of-life_ at the end of 2019. Afterwards, the
30-
interpreter will not get updates — no bugfixes, no security fixes, nothing. In
31-
the interim, the Python ecosystem is abandoning 2.7 support.
32-
https://python3statement.org/ In order to remain safe and current the Node.js
33-
community is transitioning its Python code to Python 3. Having both versions of
34-
Python in this bootstrap will allow developers and end users to test, benchmark,
35-
and debug Node.js running on both versions to ensure a smooth and complete
36-
transition before the yearend deadline.
37-
38-
## Linux
39-
40-
For building Node.js on Linux, following packages are required (note, that this
41-
can vary from distribution to distribution):
42-
* `git`
43-
* `python`
44-
* `gcc-c++` or `g++`
45-
* `make`
46-
47-
To bootstrap Node.js on Linux, run in terminal:
48-
* OpenSUSE: `sudo zypper install git python gcc-c++ make`
49-
* Fedora: `sudo dnf install git python gcc-c++ make`
50-
* Ubuntu, Debian: `sudo apt-get install git python g++ make`
51-
52-
## macOS
53-
54-
To install required tools on macOS, run in terminal:
55-
```console
56-
xcode-select --install
57-
```
58-
59-
[Boxstarter]: http://boxstarter.org/
60-
[Boxstarter WebLauncher]: http://boxstarter.org/WebLauncher
61-
[Chocolatey]: https://chocolatey.org/
62-
[Git for Windows]: https://chocolatey.org/packages/git
63-
[Python 3.x]: https://chocolatey.org/packages/python
64-
[legacy Python]: https://chocolatey.org/packages/python2
65-
[Visual Studio 2017 Build Tools]: https://chocolatey.org/packages/visualstudio2017buildtools
66-
[Visual C++ workload]: https://chocolatey.org/packages/visualstudio2017-workload-vctools
67-
[NetWide Assembler]: https://chocolatey.org/packages/nasm
1+
See the main project [README.md](../../README.md#boxstarter) for details on how
2+
to use this script.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.