This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Hacking on Atom Core: Update build requirements to be accurate #630
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
d378e0e
Hacking on Atom Core: Update Python, VS info
DeeDeeG 3932f5a
Hacking on Atom Core: Update Node, NPM versions
DeeDeeG d35008d
hacking-on-atom-core.md: No Python3 on Windows
DeeDeeG 1ba2105
hacking-on-atom-core.md: `windows-build-tools` is great
DeeDeeG 88cf835
hacking-on-atom-core.md: Update windows info
DeeDeeG 7dcf363
hacking-on-atom-core.md: Python 2.6, 2.7 and 3.5+
DeeDeeG c55744a
hacking-on-atom-core.md: 7-Zip install not needed
DeeDeeG 53ec234
hacking-on-atom-core: Suggest windows-build-tools
DeeDeeG ae35fc0
atom-core: Tweak windows-build-tools install
DeeDeeG b72c20a
hacking-on-atom-core: No Visual Studio 2019
DeeDeeG 50f9a18
hacking-on-atom-core: Suggest npm 6.12 or later
DeeDeeG File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,33 +83,35 @@ In order to build Atom from source, you need to have a number of other requireme | |
##### Requirements | ||
|
||
* macOS 10.9 or later | ||
* Node.js 6.x or later (we recommend installing it via [nvm](https://github.com/creationix/nvm)) | ||
* npm 3.10.x or later (run `npm install -g npm`) | ||
* Python v2.7.x | ||
* Node.js 10.12 or later (we recommend installing it via [nvm](https://github.com/creationix/nvm)) | ||
* npm 6.12 or later (run `npm install -g npm`) | ||
* Python v2.6.x, v2.7.x or v3.5+ | ||
* Command Line Tools for [Xcode](https://developer.apple.com/xcode/downloads/) (run `xcode-select --install` to install) | ||
|
||
{{/mac}} | ||
|
||
{{#windows}} | ||
|
||
* Node.js 6.9.4 or later (the architecture of node available to the build system will determine whether you build 32-bit or 64-bit Atom) | ||
* Python v2.7.x | ||
* The `python.exe` must be available at `%SystemDrive%\Python27\python.exe`. If it is installed elsewhere create a symbolic link to the directory containing the `python.exe` using: `mklink /d %SystemDrive%\Python27 D:\elsewhere\Python27` | ||
* 7zip (7z.exe available from the command line) - for creating distribution zip files | ||
* C++ build tools, either: | ||
* [Visual C++ Build Tools 2015](https://visualstudio.microsoft.com/vs/older-downloads/) | ||
* [Visual Studio 2013 Update 5](https://www.visualstudio.com/downloads/) (Express Edition or better) | ||
* [Visual Studio 2015](https://www.visualstudio.com/downloads/) (Community Edition or better) | ||
* **Unsupported** but more convenient for some who know Node: [windows-build-tools](https://www.npmjs.com/package/windows-build-tools) | ||
|
||
* Node.js 10.12 or later (the architecture of node available to the build system will determine whether you build 32-bit or 64-bit Atom) | ||
* npm 6.12 or later (run `npm install -g npm`) | ||
* Python v2.6.x, v2.7.x, or v3.5+ | ||
* [Get Python from the Microsoft Store](https://www.microsoft.com/en-us/search/shop/apps?q=python+software+foundation&devicetype=pc&category=Developer+tools%5cDevelopment+kits&Price=0&MaturityRating=ESRB%3aE), or | ||
* Download Python from https://www.python.org/downloads/. | ||
* For Python 2, be sure to install in the default location, or check "Add Python 2.x to PATH" before installing. | ||
* For Python 3, check "Add Python 3.x to PATH", or change the install path to `[Your_Drive_Letter]:\Python37` e.g. `C:\Python37`, (even if your version of Python 3 isn't 3.7, that's one place where the scripts will look.) | ||
* If python isn't found by the bootstrap script, create a symbolic link to the directory containing `python.exe` using e.g.: `mklink /d %SystemDrive%\Python27 D:\elsewhere\Python27`(Links should be set at either `%SystemDrive%\Python27` or `%SystemDrive%\Python37`, regardless of what version of Python you actually have.) | ||
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. I'm not sure if this is too much detail. It should be accurate, though. 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 ok with me. 👍 |
||
* C++ build tools: | ||
* **Option 1:** [windows-build-tools](https://www.npmjs.com/package/windows-build-tools) - From an elevated Powershell window (right click and "run as Administrator") do: `npm install --global windows-build-tools@4` to install | ||
* **Option 2:** [Visual C++ Build Tools 2015 or 2017](https://visualstudio.microsoft.com/visual-cpp-build-tools/) | ||
* **Option 3:** [Visual Studio 2015 or 2017](https://www.visualstudio.com/downloads/) (Community Edition or better) | ||
|
||
Also ensure that: | ||
|
||
* The default installation folder is chosen so the build tools can find it | ||
* If using Visual Studio make sure Visual C++ support is selected/installed | ||
* If using Visual C++ Build Tools make sure Windows 8 SDK is selected/installed | ||
* If using Visual C++ Build Tools make sure a Windows SDK (Windows 8 SDK or Windows 10 SDK) is selected/installed | ||
* A `git` command is in your path | ||
* Set the `GYP_MSVS_VERSION` environment variable to the Visual Studio/Build Tools version (`2013` or `2015`) e.g. ``[Environment]::SetEnvironmentVariable("GYP_MSVS_VERSION", "2015", "User")`` in PowerShell (or set it in Windows advanced system settings). | ||
* Set the `GYP_MSVS_VERSION` environment variable to the Visual Studio/Build Tools version (`2015` or `2017`.) e.g. ``[Environment]::SetEnvironmentVariable("GYP_MSVS_VERSION", "2015", "User")`` in PowerShell (or set it in Windows advanced system settings). | ||
|
||
{{/windows}} | ||
|
||
|
@@ -122,9 +124,9 @@ Ubuntu LTS 16.04 64-bit is the recommended platform. | |
* OS with 64-bit or 32-bit architecture | ||
* C++11 toolchain | ||
* Git | ||
* Node.js 6.x or later (we recommend installing it via [nvm](https://github.com/creationix/nvm)) | ||
* npm 3.10.x or later (run `npm install -g npm`) | ||
* Ensure node-gyp uses python2 (run `npm config set python /usr/bin/python2 -g`, use `sudo` if you didn't install node via nvm) | ||
* Node.js 10.12 or later (we recommend installing it via [nvm](https://github.com/creationix/nvm)) | ||
* npm 6.12 or later (run `npm install -g npm`) | ||
* Python 2.6.x, 2.7.x or 3.5+ | ||
* Development headers for [libsecret](https://wiki.gnome.org/Projects/Libsecret). | ||
|
||
For more details, scroll down to find how to setup a specific Linux distro. | ||
|
@@ -162,11 +164,9 @@ $ sudo yum install -y make gcc gcc-c++ glibc-devel git-core libsecret-devel rpmd | |
###### Arch | ||
|
||
``` command-line | ||
sudo pacman -S --needed gconf base-devel git nodejs npm libsecret python2 libx11 libxkbfile | ||
sudo pacman -S --needed gconf base-devel git nodejs npm libsecret python libx11 libxkbfile | ||
``` | ||
|
||
Be certain to use `export PYTHON=/usr/bin/python2` before building Atom. | ||
|
||
###### Slackware | ||
|
||
``` command-line | ||
|
@@ -228,7 +228,7 @@ To also install the newly built application, use the `--create-debian-package` o | |
##### `script\build` Options | ||
|
||
* `--code-sign`: signs the application with the GitHub certificate specified in `$WIN_P12KEY_URL`. | ||
* `--compress-artifacts`: zips the generated application as `out\atom-windows.zip` (requires [7-Zip](http://www.7-zip.org)). | ||
* `--compress-artifacts`: zips the generated application as `out\atom-windows.zip`. | ||
* `--create-windows-installer`: creates an `.exe` and two `.nupkg` packages in the `out` directory. | ||
* `--install[=dir]`: installs the application in `${dir}\Atom\app-dev`; `${dir}` defaults to `%LOCALAPPDATA%`. | ||
|
||
|
@@ -262,7 +262,7 @@ Use [this search](https://github.com/atom/atom/search?q=label%3Abuild-error+labe | |
|
||
* `msbuild.exe failed with exit code: 1` | ||
* If using **Visual Studio**, ensure you have the **Visual C++** component installed. Go into Add/Remove Programs, select Visual Studio, press Modify, and then check the Visual C++ box. | ||
* If using **Visual C++ Build Tools**, ensure you have the **Windows 8 SDK** component installed. Go into Add/Remove Programs, select Visual C++ Build Tools, press Modify and then check the Windows 8 SDK box. | ||
* If using **Visual C++ Build Tools**, ensure you have the **Windows 8 SDK** or **Windows 10 SDK** component installed. Go into Add/Remove Programs, select Visual C++ Build Tools, press Modify and then check the "Windows 8 SDK" or "Windows 10 SDK" box. | ||
|
||
* `script\build` stops with no error or warning shortly after displaying the versions of node, npm and Python | ||
* Make sure that the path where you have checked out Atom does not include a space. For example, use `C:\atom` instead of `C:\my stuff\atom`. | ||
|
@@ -281,7 +281,7 @@ Use [this search](https://github.com/atom/atom/search?q=label%3Abuild-error+labe | |
* See the next item. | ||
|
||
* `error MSB8020: The build tools for Visual Studio 201? (Platform Toolset = 'v1?0') cannot be found.` | ||
* Try setting the `GYP_MSVS_VERSION` environment variable to **2013** or **2015** depending on what version of Visual Studio/Build Tools is installed and then `script\clean` followed by `script\build` (re-open the Command Prompt if you set the variable using the GUI). | ||
* Try setting the `GYP_MSVS_VERSION` environment variable to **2015** or **2017** depending on what version of Visual Studio/Build Tools is installed and then `script\clean` followed by `script\build` (re-open the Command Prompt if you set the variable using the GUI). | ||
|
||
* `'node-gyp' is not recognized as an internal or external command, operable program or batch file.` | ||
* Try running `npm install -g node-gyp`, and run `script\build` again. | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We use Node 12 in our CI builds. Shouldn't that be the supported version?
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.
10 is still an officially supported Long Term Support version for now: https://nodejs.org/about/releases/
(Until the end of April in 2021)