-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
tools: add Boxstarter script #17046
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
tools: add Boxstarter script #17046
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Adds a Boxstarter script for easy Node.js building prerequisites installation
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # Boxstarter setup for Node.js | ||
|
|
||
| A [Boxstarter][] script can be used for an easy setup of Windows systems with all | ||
| the required prerequisites for Node.js development. This script will install | ||
| the following [Chocolatey] packages: | ||
| * [Git for Windows][] with the `git` and Unix tools added to the `PATH` | ||
| * [Python 2.x][] | ||
| * [Visual Studio 2017 Build Tools][] with [Visual C++ workload][] | ||
| * Optionally: [Visual Studio Code][] e.g. when setting up Code and Learn boxes | ||
|
|
||
| ## WebLauncher Installation | ||
|
|
||
| To install Node.js prerequisites using [Boxstarter WebLauncher][], just open | ||
| **one** of the following links with Internet Explorer or Edge browser on the | ||
|
||
| target machine: | ||
| * [Node.js prerequisites][] | ||
| * [Node.js prerequisites with VS Code][] | ||
|
|
||
| ## PowerShell Installation | ||
|
|
||
| To install the Node.js prerequisites using PowerShell, first install Boxstarter: | ||
|
|
||
| * From PowerShell v2 (Windows 7, Windows Server 2008): | ||
| ```console | ||
| iex ((New-Object System.Net.WebClient).DownloadString('http://boxstarter.org/bootstrapper.ps1')); get-boxstarter -Force | ||
| ``` | ||
|
|
||
| * From PowerShell v3 (newer Windows systems): | ||
| ```console | ||
| . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | ||
| ``` | ||
|
|
||
| After Boxstarter has been successfully installed, run: | ||
|
|
||
| * For Node.js prerequisites: | ||
| ```console | ||
| Install-BoxstarterPackage https://raw.githubusercontent.com/nodejs/node/master/tools/boxstarter/node_boxstarter -DisableReboots | ||
| ``` | ||
|
|
||
| * For Node.js prerequisites with VS Code: | ||
|
||
| ```console | ||
| Install-BoxstarterPackage https://raw.githubusercontent.com/nodejs/node/master/tools/boxstarter/node_boxstarter_vscode -DisableReboots | ||
| ``` | ||
|
|
||
| [Boxstarter]: http://boxstarter.org/ | ||
| [Boxstarter WebLauncher]: http://boxstarter.org/WebLauncher | ||
| [Chocolatey]: https://chocolatey.org/ | ||
| [Git for Windows]: https://chocolatey.org/packages/git | ||
| [Python 2.x]: https://chocolatey.org/packages/python2 | ||
| [Visual Studio 2017 Build Tools]: https://chocolatey.org/packages/visualstudio2017buildtools | ||
| [Visual C++ workload]: https://chocolatey.org/packages/visualstudio2017-workload-vctools | ||
| [Visual Studio Code]: https://chocolatey.org/packages/visualstudiocode | ||
| [Node.js prerequisites]: http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/nodejs/node/master/tools/boxstarter/node_boxstarter | ||
| [Node.js prerequisites with VS Code]: http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/nodejs/node/master/tools/boxstarter/node_boxstarter_vscode | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Boxstarter (http://boxstarter.org/) script for Node.js prerequisites | ||
| # | ||
| # To install either open this link in IE or Edge: | ||
| # http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/nodejs/node/master/tools/boxstarter/node_boxstarter | ||
| # | ||
| # Or run those commands in a Powershell terminal: | ||
| # iex ((New-Object System.Net.WebClient).DownloadString('http://boxstarter.org/bootstrapper.ps1')) | ||
| # get-boxstarter -Force | ||
| # Install-BoxstarterPackage https://raw.githubusercontent.com/nodejs/node/master/tools/boxstarter/node_boxstarter -DisableReboots | ||
| # | ||
| # For more detail see | ||
| # https://github.com/nodejs/node/blob/master/tools/boxstarter/README.md | ||
| # | ||
|
|
||
| # Git and Unix tools will be added to the PATH | ||
| choco install git -params /GitAndUnixToolsOnPath -y | ||
| choco install python2 -y | ||
|
|
||
| # Installs VS 2017 Build Tools | ||
| choco install visualstudio2017buildtools -y | ||
| choco install visualstudio2017-workload-vctools -y | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the benefit of using Boxstarter here rather than just using chocolatey directly? Is it the web url? Looking at their page, I'm not seeing anything obviously beneficial, and it's another thing for new starters to understand. :: Copied from chocolatey website
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
choco install git -params /GitAndUnixToolsOnPath -y
choco install python2 visualstudio2017buildtools visualstudio2017-workload-vctools -y
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe use a more generic directory name like
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is an improvement either way, but I'd go with boxstarter rather than just chocolatey. For users that want to understand this or already know about chocolatey, the script is very easy to understand and use as a guide for their own custom installation (plus, dependencies are already documented in Looking at the Boxstarter page, it adds a lot of resilience to the process (reboots, disabling updates, etc), moving it much closer to the ideal one-click-no-issues setup. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # Boxstarter (http://boxstarter.org/) script for Node.js prerequisites, | ||
| # including Visual Studio Code | ||
| # | ||
| # To install either open this link in IE or Edge: | ||
| # http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/nodejs/node/master/tools/boxstarter/node_boxstarter_vscode | ||
| # | ||
| # Or run those commands in a Powershell terminal: | ||
| # iex ((New-Object System.Net.WebClient).DownloadString('http://boxstarter.org/bootstrapper.ps1')) | ||
| # get-boxstarter -Force | ||
| # Install-BoxstarterPackage https://raw.githubusercontent.com/nodejs/node/master/tools/boxstarter/node_boxstarter_vscode -DisableReboots | ||
| # | ||
| # For more detail see | ||
| # https://github.com/nodejs/node/blob/master/tools/boxstarter/README.md | ||
| # | ||
|
|
||
| # Git and Unix tools will be added to the PATH | ||
| choco install git -params /GitAndUnixToolsOnPath -y | ||
|
||
| choco install python2 -y | ||
|
|
||
| # Installs VS 2017 Build Tools | ||
| choco install visualstudio2017buildtools -y | ||
| choco install visualstudio2017-workload-vctools -y | ||
|
|
||
| # Installs Visual Studio Code | ||
| choco install visualstudiocode -y | ||
|
||
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.
maybe remove
an.