| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 035b613 commit eee66c5
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,30 +19,36 @@ file a new issue. | |||
| 19 | 19 | * [OpenSSL asm support](#openssl-asm-support) | |
| 20 | 20 | * [Previous versions of this document](#previous-versions-of-this-document) | |
| 21 | 21 | * [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) | ||
| 24 | 26 | * [Building Node.js](#building-nodejs) | |
| 25 | 27 | * [Running Tests](#running-tests) | |
| 26 | 28 | * [Running Coverage](#running-coverage) | |
| 27 | 29 | * [Building the documentation](#building-the-documentation) | |
| 28 | 30 | * [Building a debug build](#building-a-debug-build) | |
| 29 | 31 | * [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) | ||
| 30 | 36 | * [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) | ||
| 43 | 49 | * [Building Node.js with FIPS-compliant OpenSSL](#building-nodejs-with-fips-compliant-openssl) | |
| 44 | 50 | * [Building Node.js with external core modules](#building-nodejs-with-external-core-modules) | |
| 45 | - * [Unix/macOS](#unixmacos-4) | ||
| 51 | + * [Unix/macOS](#unixmacos-3) | ||
| 46 | 52 | * [Windows](#windows-4) | |
| 47 | 53 | * [Note for downstream distributors of Node.js](#note-for-downstream-distributors-of-nodejs) | |
| 48 | 54 | ||
@@ -215,34 +221,58 @@ Consult previous versions of this document for older versions of Node.js: | |||
| 215 | 221 | ||
| 216 | 222 | ## Building Node.js on supported platforms | |
| 217 | 223 | ||
| 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 | ||
| 220 | 225 | ||
| 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. | ||
| 222 | 228 | ||
| 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 | ||
| 224 | 242 | ||
| 225 | 243 | * `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. | ||
| 230 | 244 | * 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` | ||
| 231 | 255 | ||
| 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 | ||
| 233 | 266 | `xcode-select --install`. Alternatively, if you already have the full Xcode | |
| 234 | 267 | installed, you can find them under the menu `Xcode -> Open Developer Tool -> | |
| 235 | 268 | More Developer Tools...`. This step will install `clang`, `clang++`, and | |
| 236 | 269 | `make`. | |
| 237 | 270 | ||
| 271 | + #### Building Node.js | ||
| 272 | + | ||
| 238 | 273 | If the path to your build directory contains a space, the build will likely | |
| 239 | 274 | fail. | |
| 240 | 275 | ||
| 241 | - On FreeBSD and OpenBSD, you may also need: | ||
| 242 | - * libexecinfo | ||
| 243 | - | ||
| 244 | - #### Building Node.js | ||
| 245 | - | ||
| 246 | 276 | To build Node.js: | |
| 247 | 277 | ||
| 248 | 278 | ```console | |
@@ -461,7 +491,9 @@ $ backtrace | |||
| 461 | 491 | ||
| 462 | 492 | ### Windows | |
| 463 | 493 | ||
| 464 | - Prerequisites: | ||
| 494 | + #### Prerequisites | ||
| 495 | + | ||
| 496 | + ##### Option 1: Manual install | ||
| 465 | 497 | ||
| 466 | 498 | * [Python 2.7](https://www.python.org/downloads/) | |
| 467 | 499 | * The "Desktop development with C++" workload from | |
@@ -476,17 +508,58 @@ Prerequisites: | |||
| 476 | 508 | If not installed in the default location, it needs to be manually added | |
| 477 | 509 | to `PATH`. A build with the `openssl-no-asm` option does not need this, nor | |
| 478 | 510 | 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 | ||
| 490 | 563 | ||
| 491 | 564 | If the path to your build directory contains a space or a non-ASCII character, | |
| 492 | 565 | the build will likely fail. | |
@@ -523,55 +596,54 @@ $ ./android-configure /path/to/your/android-ndk | |||
| 523 | 596 | $ make | |
| 524 | 597 | ``` | |
| 525 | 598 | ||
| 526 | - | ||
| 527 | - ### `Intl` (ECMA-402) support | ||
| 599 | + ## `Intl` (ECMA-402) support | ||
| 528 | 600 | ||
| 529 | 601 | [Intl](https://github.com/nodejs/node/blob/master/doc/api/intl.md) support is | |
| 530 | 602 | enabled by default, with English data only. | |
| 531 | 603 | ||
| 532 | - #### Default: `small-icu` (English only) support | ||
| 604 | + ### Default: `small-icu` (English only) support | ||
| 533 | 605 | ||
| 534 | 606 | By default, only English data is included, but | |
| 535 | 607 | the full `Intl` (ECMA-402) APIs. It does not need to download | |
| 536 | 608 | any dependencies to function. You can add full | |
| 537 | 609 | data at runtime. | |
| 538 | 610 | ||
| 539 | - #### Build with full ICU support (all locales supported by ICU) | ||
| 611 | + ### Build with full ICU support (all locales supported by ICU) | ||
| 540 | 612 | ||
| 541 | 613 | With the `--download=all`, this may download ICU if you don't have an | |
| 542 | 614 | ICU in `deps/icu`. (The embedded `small-icu` included in the default | |
| 543 | 615 | Node.js source does not include all locales.) | |
| 544 | 616 | ||
| 545 | - ##### Unix/macOS | ||
| 617 | + #### Unix/macOS | ||
| 546 | 618 | ||
| 547 | 619 | ```console | |
| 548 | 620 | $ ./configure --with-intl=full-icu --download=all | |
| 549 | 621 | ``` | |
| 550 | 622 | ||
| 551 | - ##### Windows | ||
| 623 | + #### Windows | ||
| 552 | 624 | ||
| 553 | 625 | ```console | |
| 554 | 626 | > .\vcbuild full-icu download-all | |
| 555 | 627 | ``` | |
| 556 | 628 | ||
| 557 | - #### Building without Intl support | ||
| 629 | + ### Building without Intl support | ||
| 558 | 630 | ||
| 559 | 631 | The `Intl` object will not be available, nor some other APIs such as | |
| 560 | 632 | `String.normalize`. | |
| 561 | 633 | ||
| 562 | - ##### Unix/macOS | ||
| 634 | + #### Unix/macOS | ||
| 563 | 635 | ||
| 564 | 636 | ```console | |
| 565 | 637 | $ ./configure --without-intl | |
| 566 | 638 | ``` | |
| 567 | 639 | ||
| 568 | - ##### Windows | ||
| 640 | + #### Windows | ||
| 569 | 641 | ||
| 570 | 642 | ```console | |
| 571 | 643 | > .\vcbuild without-intl | |
| 572 | 644 | ``` | |
| 573 | 645 | ||
| 574 | - #### Use existing installed ICU (Unix/macOS only) | ||
| 646 | + ### Use existing installed ICU (Unix/macOS only) | ||
| 575 | 647 | ||
| 576 | 648 | ```console | |
| 577 | 649 | $ pkg-config --modversion icu-i18n && ./configure --with-intl=system-icu | |
@@ -580,7 +652,7 @@ $ pkg-config --modversion icu-i18n && ./configure --with-intl=system-icu | |||
| 580 | 652 | If you are cross-compiling, your `pkg-config` must be able to supply a path | |
| 581 | 653 | that works for both your host and target environments. | |
| 582 | 654 | ||
| 583 | - #### Build with a specific ICU | ||
| 655 | + ### Build with a specific ICU | ||
| 584 | 656 | ||
| 585 | 657 | You can find other ICU releases at | |
| 586 | 658 | [the ICU homepage](http://icu-project.org/download). | |
@@ -591,7 +663,7 @@ To check the minimum recommended ICU, run `./configure --help` and see | |||
| 591 | 663 | the help for the `--with-icu-source` option. A warning will be printed | |
| 592 | 664 | during configuration if the ICU version is too old. | |
| 593 | 665 | ||
| 594 | - ##### Unix/macOS | ||
| 666 | + #### Unix/macOS | ||
| 595 | 667 | ||
| 596 | 668 | From an already-unpacked ICU: | |
| 597 | 669 | ```console | |
@@ -608,7 +680,7 @@ From a tarball URL: | |||
| 608 | 680 | $ ./configure --with-intl=full-icu --with-icu-source=http://url/to/icu.tgz | |
| 609 | 681 | ``` | |
| 610 | 682 | ||
| 611 | - ##### Windows | ||
| 683 | + #### Windows | ||
| 612 | 684 | ||
| 613 | 685 | First unpack latest ICU to `deps/icu` | |
| 614 | 686 | [icu4c-**##.#**-src.tgz](http://icu-project.org/download) (or `.zip`) | |
| Original file line number | Diff line number | Diff 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. | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments