build: remove gyp build files (#14097)

* build: remove gyp build files

* docs: update build instructions

* build: temporary restore electron.gyp

* build: do not update Electron version in the electron.gyp

* chore: remove unused submodules

* ci: remove obsolete CI scripts and configs

* chore: remove obsolete scripts

* chore: remove obsolete functions from lib/util.py

* ci: send Slack notification for nightly build results
This commit is contained in:
Jeremy Apthorp 2018-09-08 18:15:32 -07:00 committed by Cheng Zhao
parent 98eee52fac
commit 72526927d9
56 changed files with 919 additions and 6043 deletions

View file

@ -25,52 +25,9 @@ building with Visual Studio will come in the future.
**Note:** Even though Visual Studio is not used for building, it's still
**required** because we need the build toolchains it provides.
## Getting the Code
```powershell
$ git clone https://github.com/electron/electron.git
```
## Bootstrapping
The bootstrap script will download all necessary build dependencies and create
the build project files. Notice that we're using `ninja` to build Electron so
there is no Visual Studio project generated.
To bootstrap for a static, non-developer build, run:
```powershell
$ cd electron
$ npm run bootstrap
```
Or to bootstrap for a development session that builds faster by not statically linking:
```powershell
$ cd electron
$ npm run bootstrap:dev
```
## Building
Build both `Release` and `Debug` targets:
```powershell
$ npm run build
```
You can also build either the `Debug` or `Release` target on its own:
```powershell
$ npm run build:dev
```
```powershell
$ npm run build:release
```
After building is done, you can find `electron.exe` under `out\D` (debug
target) or under `out\R` (release target).
See [Build Instructions: GN](build-instructions-gn.md)
## 32bit Build
@ -85,32 +42,13 @@ The other building steps are exactly the same.
## Visual Studio project
To generate a Visual Studio project, you can pass the `--msvs` parameter:
To generate a Visual Studio project, you can pass the `--ide=vs2017` parameter
to `gn gen`:
```powershell
$ python script\bootstrap.py --msvs
$ gn gen out/Debug --ide=vs2017
```
## Cleaning
To clean the build files:
```powershell
$ npm run clean
```
To clean only `out` and `dist` directories:
```sh
$ npm run clean-build
```
**Note:** Both clean commands require running `bootstrap` again before building.
## Tests
See [Build System Overview: Tests](build-system-overview.md#tests)
## Troubleshooting
### Command xxxx not found
@ -122,34 +60,6 @@ the `VS2015 Command Prompt` console to execute the build scripts.
Make sure you have the latest Visual Studio update installed.
### Assertion failed: ((handle))->activecnt >= 0
If building under Cygwin, you may see `bootstrap.py` failed with following
error:
```sh
Assertion failed: ((handle))->activecnt >= 0, file src\win\pipe.c, line 1430
Traceback (most recent call last):
File "script/bootstrap.py", line 87, in <module>
sys.exit(main())
File "script/bootstrap.py", line 22, in main
update_node_modules('.')
File "script/bootstrap.py", line 56, in update_node_modules
execute([NPM, 'install'])
File "/home/zcbenz/codes/raven/script/lib/util.py", line 118, in execute
raise e
subprocess.CalledProcessError: Command '['npm.cmd', 'install']' returned non-zero exit status 3
```
This is caused by a bug when using Cygwin Python and Win32 Node together. The
solution is to use the Win32 Python to execute the bootstrap script (assuming
you have installed Python under `C:\Python27`):
```powershell
$ /cygdrive/c/Python27/python.exe script/bootstrap.py
```
### LNK1181: cannot open input file 'kernel32.lib'
Try reinstalling 32bit Node.js.