From d378e0e0e0ee18945d5673562eb4966aafd70eda Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Fri, 3 Jul 2020 01:22:21 -0400 Subject: [PATCH 01/11] Hacking on Atom Core: Update Python, VS info Information on required Visual Studio versions and Python versions were out of date, considering that we use newer `node-gyp` now. --- .../sections/hacking-on-atom-core.md | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/content/hacking-atom/sections/hacking-on-atom-core.md b/content/hacking-atom/sections/hacking-on-atom-core.md index de70e25883..06797885e9 100644 --- a/content/hacking-atom/sections/hacking-on-atom-core.md +++ b/content/hacking-atom/sections/hacking-on-atom-core.md @@ -85,7 +85,7 @@ In order to build Atom from source, you need to have a number of other requireme * 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 +* Python v2.7.x or 3.5+ * Command Line Tools for [Xcode](https://developer.apple.com/xcode/downloads/) (run `xcode-select --install` to install) {{/mac}} @@ -93,13 +93,12 @@ In order to build Atom from source, you need to have a number of other requireme {{#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 +* Python v2.7.x or 3.5+ * 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) + * [Visual C++ Build Tools 2015 or newer](https://visualstudio.microsoft.com/visual-cpp-build-tools/) + * [Visual Studio 2015 or newer](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) @@ -107,9 +106,9 @@ In order to build Atom from source, you need to have a number of other requireme * 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 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`, `2017`, etc.) e.g. ``[Environment]::SetEnvironmentVariable("GYP_MSVS_VERSION", "2015", "User")`` in PowerShell (or set it in Windows advanced system settings). {{/windows}} @@ -124,7 +123,7 @@ Ubuntu LTS 16.04 64-bit is the recommended platform. * 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) +* Python 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 +161,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 @@ -262,7 +259,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/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 +278,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. From 3932f5ae8956f0ce4b3833492bea413d43879b3b Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Fri, 3 Jul 2020 02:40:25 -0400 Subject: [PATCH 02/11] Hacking on Atom Core: Update Node, NPM versions --- content/hacking-atom/sections/hacking-on-atom-core.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/content/hacking-atom/sections/hacking-on-atom-core.md b/content/hacking-atom/sections/hacking-on-atom-core.md index 06797885e9..9b539fa8a2 100644 --- a/content/hacking-atom/sections/hacking-on-atom-core.md +++ b/content/hacking-atom/sections/hacking-on-atom-core.md @@ -83,8 +83,8 @@ 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`) +* Node.js 10.12 or later (we recommend installing it via [nvm](https://github.com/creationix/nvm)) +* npm 6 or later (run `npm install -g npm`) * Python v2.7.x or 3.5+ * Command Line Tools for [Xcode](https://developer.apple.com/xcode/downloads/) (run `xcode-select --install` to install) @@ -92,7 +92,7 @@ In order to build Atom from source, you need to have a number of other requireme {{#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) +* 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) * Python v2.7.x or 3.5+ * 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 @@ -121,8 +121,8 @@ 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`) +* Node.js 10.12 or later (we recommend installing it via [nvm](https://github.com/creationix/nvm)) +* npm 6 or later (run `npm install -g npm`) * Python 2.7.x or 3.5+ * Development headers for [libsecret](https://wiki.gnome.org/Projects/Libsecret). From d35008d6c79771d017897d4c6ded06c2020ac5aa Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Thu, 9 Jul 2020 06:07:41 -0400 Subject: [PATCH 03/11] hacking-on-atom-core.md: No Python3 on Windows Python 3 will be supported on Windows when https://github.com/atom/atom/pull/20856 or similar gets merged into the atom repository. --- content/hacking-atom/sections/hacking-on-atom-core.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/hacking-atom/sections/hacking-on-atom-core.md b/content/hacking-atom/sections/hacking-on-atom-core.md index 9b539fa8a2..aa03f5801d 100644 --- a/content/hacking-atom/sections/hacking-on-atom-core.md +++ b/content/hacking-atom/sections/hacking-on-atom-core.md @@ -93,7 +93,7 @@ In order to build Atom from source, you need to have a number of other requireme {{#windows}} * 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) -* Python v2.7.x or 3.5+ +* 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: From 1ba21050fda4467a13152a1c20b942d3e67e6f8c Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Thu, 9 Jul 2020 06:16:48 -0400 Subject: [PATCH 04/11] hacking-on-atom-core.md: `windows-build-tools` is great This should be a recommended way of getting build tools set up. It works really well, and is much easier than a manual install of Visual Studio/C++ tools/Python 2. It sets them all up for you. I personally wouldn't recommend any other way to someone I knew. Co-authored-by: Amin Yahyaabadi --- content/hacking-atom/sections/hacking-on-atom-core.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/hacking-atom/sections/hacking-on-atom-core.md b/content/hacking-atom/sections/hacking-on-atom-core.md index aa03f5801d..4a876a1fe2 100644 --- a/content/hacking-atom/sections/hacking-on-atom-core.md +++ b/content/hacking-atom/sections/hacking-on-atom-core.md @@ -99,7 +99,7 @@ In order to build Atom from source, you need to have a number of other requireme * C++ build tools, either: * [Visual C++ Build Tools 2015 or newer](https://visualstudio.microsoft.com/visual-cpp-build-tools/) * [Visual Studio 2015 or newer](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) + * [windows-build-tools](https://www.npmjs.com/package/windows-build-tools): `npm install --global --production windows-build-tools@4.0` Also ensure that: From 88cf835a332f0137d8c7fab86bef983b27ddb7da Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Thu, 9 Jul 2020 21:40:56 -0400 Subject: [PATCH 05/11] hacking-on-atom-core.md: Update windows info Visual Studio 2015, 2017 and 2019 are supported. Windows 8 SDK or Windows 10 SDK are supported. Clarified windows-build-tools install instructions. The latest windows-build-tools will be fine for the foreseeable future (Even when they default to Visual Studio 2019 some time soon.) --- .../hacking-atom/sections/hacking-on-atom-core.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/content/hacking-atom/sections/hacking-on-atom-core.md b/content/hacking-atom/sections/hacking-on-atom-core.md index 4a876a1fe2..41f6a45022 100644 --- a/content/hacking-atom/sections/hacking-on-atom-core.md +++ b/content/hacking-atom/sections/hacking-on-atom-core.md @@ -97,18 +97,18 @@ In order to build Atom from source, you need to have a number of other requireme * 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 or newer](https://visualstudio.microsoft.com/visual-cpp-build-tools/) - * [Visual Studio 2015 or newer](https://www.visualstudio.com/downloads/) (Community Edition or better) - * [windows-build-tools](https://www.npmjs.com/package/windows-build-tools): `npm install --global --production windows-build-tools@4.0` + * [Visual C++ Build Tools 2015, 2017 or 2019](https://visualstudio.microsoft.com/visual-cpp-build-tools/) + * [Visual Studio 2015, 2017 or 2019](https://www.visualstudio.com/downloads/) (Community Edition or better) + * [windows-build-tools](https://www.npmjs.com/package/windows-build-tools) (From an elevated CMD.exe or Powershell window (right click and "run as Administrator") do: `npm install --global --production windows-build-tools` to install) 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 a Windows 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 (`2015`, `2017`, etc.) 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`, `2017`, or `2019`.) e.g. ``[Environment]::SetEnvironmentVariable("GYP_MSVS_VERSION", "2015", "User")`` in PowerShell (or set it in Windows advanced system settings). {{/windows}} @@ -259,7 +259,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** or **Windows 10 SDK** component installed. Go into Add/Remove Programs, select Visual C++ Build Tools, press Modify and then check the Windows 8/10 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`. @@ -278,7 +278,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 **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). + * Try setting the `GYP_MSVS_VERSION` environment variable to **2015**, **2017** or **2019** 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. From 7dcf363337c2850ea98637c4dea9edbc0cb1a678 Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Fri, 10 Jul 2020 17:19:15 -0400 Subject: [PATCH 06/11] hacking-on-atom-core.md: Python 2.6, 2.7 and 3.5+ Update install instructions for Windows. --- .../hacking-atom/sections/hacking-on-atom-core.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/content/hacking-atom/sections/hacking-on-atom-core.md b/content/hacking-atom/sections/hacking-on-atom-core.md index 41f6a45022..b469e375bf 100644 --- a/content/hacking-atom/sections/hacking-on-atom-core.md +++ b/content/hacking-atom/sections/hacking-on-atom-core.md @@ -85,7 +85,7 @@ In order to build Atom from source, you need to have a number of other requireme * macOS 10.9 or later * Node.js 10.12 or later (we recommend installing it via [nvm](https://github.com/creationix/nvm)) * npm 6 or later (run `npm install -g npm`) -* Python v2.7.x or 3.5+ +* 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}} @@ -93,8 +93,12 @@ In order to build Atom from source, you need to have a number of other requireme {{#windows}} * 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) -* 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` +* 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.) * 7zip (7z.exe available from the command line) - for creating distribution zip files * C++ build tools, either: * [Visual C++ Build Tools 2015, 2017 or 2019](https://visualstudio.microsoft.com/visual-cpp-build-tools/) @@ -123,7 +127,7 @@ Ubuntu LTS 16.04 64-bit is the recommended platform. * Git * Node.js 10.12 or later (we recommend installing it via [nvm](https://github.com/creationix/nvm)) * npm 6 or later (run `npm install -g npm`) -* Python 2.7.x or 3.5+ +* 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. From c55744aeb99c60b3217288c6eff629ebd8f74907 Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Fri, 10 Jul 2020 18:50:48 -0400 Subject: [PATCH 07/11] hacking-on-atom-core.md: 7-Zip install not needed This is now a dependency "7zip-bin" in `scripts/package.json`. The script doesn't look for 7-Zip on the system anymore, so it wouldn't be used even if installed. --- content/hacking-atom/sections/hacking-on-atom-core.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/content/hacking-atom/sections/hacking-on-atom-core.md b/content/hacking-atom/sections/hacking-on-atom-core.md index b469e375bf..89f9a8eb27 100644 --- a/content/hacking-atom/sections/hacking-on-atom-core.md +++ b/content/hacking-atom/sections/hacking-on-atom-core.md @@ -99,7 +99,6 @@ In order to build Atom from source, you need to have a number of other requireme * 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.) -* 7zip (7z.exe available from the command line) - for creating distribution zip files * C++ build tools, either: * [Visual C++ Build Tools 2015, 2017 or 2019](https://visualstudio.microsoft.com/visual-cpp-build-tools/) * [Visual Studio 2015, 2017 or 2019](https://www.visualstudio.com/downloads/) (Community Edition or better) @@ -229,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%`. From 53ec234f82e937a7548f8a540d0a20dc40c5ff88 Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Wed, 15 Jul 2020 16:00:55 -0400 Subject: [PATCH 08/11] hacking-on-atom-core: Suggest windows-build-tools This should be the first option. It is recommended by node-gyp and Microsoft. It is either officially or unofficially developed and maintained by Microsoft themselves. --- content/hacking-atom/sections/hacking-on-atom-core.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/content/hacking-atom/sections/hacking-on-atom-core.md b/content/hacking-atom/sections/hacking-on-atom-core.md index 89f9a8eb27..2238f26bf9 100644 --- a/content/hacking-atom/sections/hacking-on-atom-core.md +++ b/content/hacking-atom/sections/hacking-on-atom-core.md @@ -99,11 +99,10 @@ In order to build Atom from source, you need to have a number of other requireme * 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.) -* C++ build tools, either: - * [Visual C++ Build Tools 2015, 2017 or 2019](https://visualstudio.microsoft.com/visual-cpp-build-tools/) - * [Visual Studio 2015, 2017 or 2019](https://www.visualstudio.com/downloads/) (Community Edition or better) - * [windows-build-tools](https://www.npmjs.com/package/windows-build-tools) (From an elevated CMD.exe or Powershell window (right click and "run as Administrator") do: `npm install --global --production windows-build-tools` to install) - +* 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 --production windows-build-tools` to install + * **Option 2:** [Visual C++ Build Tools 2015, 2017 or 2019](https://visualstudio.microsoft.com/visual-cpp-build-tools/) + * **Option 3:** [Visual Studio 2015, 2017 or 2019](https://www.visualstudio.com/downloads/) (Community Edition or better) Also ensure that: From ae35fc0692157cb07b43f03528003ab426b077d6 Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Sun, 27 Sep 2020 20:36:24 -0400 Subject: [PATCH 09/11] atom-core: Tweak windows-build-tools install - Suggest installing windows-build-tools v4, as v5 can hang and fail to install. - Don't use the `--production` flag to install windows-build-tools; Not installing devDependencies is already implied when installing a package by name. --- content/hacking-atom/sections/hacking-on-atom-core.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/hacking-atom/sections/hacking-on-atom-core.md b/content/hacking-atom/sections/hacking-on-atom-core.md index 2238f26bf9..a011ab1e21 100644 --- a/content/hacking-atom/sections/hacking-on-atom-core.md +++ b/content/hacking-atom/sections/hacking-on-atom-core.md @@ -100,7 +100,7 @@ In order to build Atom from source, you need to have a number of other requireme * 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.) * 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 --production windows-build-tools` to install + * **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, 2017 or 2019](https://visualstudio.microsoft.com/visual-cpp-build-tools/) * **Option 3:** [Visual Studio 2015, 2017 or 2019](https://www.visualstudio.com/downloads/) (Community Edition or better) From b72c20a36617157a2ab24ba9bc68ba673914df9e Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Sun, 27 Sep 2020 20:43:51 -0400 Subject: [PATCH 10/11] hacking-on-atom-core: No Visual Studio 2019 Building Atom with Visual Studio 2019 causes a few CI tests to fail, so hold off on recommending Visual Studio 2019 for now. --- content/hacking-atom/sections/hacking-on-atom-core.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/hacking-atom/sections/hacking-on-atom-core.md b/content/hacking-atom/sections/hacking-on-atom-core.md index a011ab1e21..47402b2edb 100644 --- a/content/hacking-atom/sections/hacking-on-atom-core.md +++ b/content/hacking-atom/sections/hacking-on-atom-core.md @@ -101,8 +101,8 @@ In order to build Atom from source, you need to have a number of other requireme * 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.) * 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, 2017 or 2019](https://visualstudio.microsoft.com/visual-cpp-build-tools/) - * **Option 3:** [Visual Studio 2015, 2017 or 2019](https://www.visualstudio.com/downloads/) (Community Edition or better) + * **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: @@ -110,7 +110,7 @@ In order to build Atom from source, you need to have a number of other requireme * If using Visual Studio make sure Visual C++ support 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 (`2015`, `2017`, or `2019`.) 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}} @@ -280,7 +280,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 **2015**, **2017** or **2019** 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. From 50f9a183513a0c86c34dea4d2ca061b5f984aba6 Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Sun, 27 Sep 2020 20:49:47 -0400 Subject: [PATCH 11/11] hacking-on-atom-core: Suggest npm 6.12 or later This version of npm includes newer node-gyp, which is better at automatically detecting Python (especially Python 3), and also better at automatically detecting Visual Studio. --- content/hacking-atom/sections/hacking-on-atom-core.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/content/hacking-atom/sections/hacking-on-atom-core.md b/content/hacking-atom/sections/hacking-on-atom-core.md index 47402b2edb..3425bf6cf2 100644 --- a/content/hacking-atom/sections/hacking-on-atom-core.md +++ b/content/hacking-atom/sections/hacking-on-atom-core.md @@ -84,7 +84,7 @@ In order to build Atom from source, you need to have a number of other requireme * macOS 10.9 or later * Node.js 10.12 or later (we recommend installing it via [nvm](https://github.com/creationix/nvm)) -* npm 6 or later (run `npm install -g npm`) +* 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) @@ -93,6 +93,7 @@ In order to build Atom from source, you need to have a number of other requireme {{#windows}} * 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/. @@ -124,7 +125,7 @@ Ubuntu LTS 16.04 64-bit is the recommended platform. * C++11 toolchain * Git * Node.js 10.12 or later (we recommend installing it via [nvm](https://github.com/creationix/nvm)) -* npm 6 or later (run `npm install -g npm`) +* 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).