Standardize build win
This commit is contained in:
parent
d93b6c1cae
commit
009e228218
1 changed files with 22 additions and 20 deletions
|
@ -1,29 +1,30 @@
|
||||||
# Build instructions (Windows)
|
# Build Instructions (Windows)
|
||||||
|
|
||||||
|
Follow the guidelines below for building Electron on Windows.
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
* Windows 7 / Server 2008 R2 or higher
|
* Windows 7 / Server 2008 R2 or higher
|
||||||
* Visual Studio 2013 - [download VS 2013 Community Edition for
|
* Visual Studio 2013 - [download VS 2013 Community Edition for
|
||||||
free](https://www.visualstudio.com/downloads/download-visual-studio-vs)
|
free](https://www.visualstudio.com/downloads/download-visual-studio-vs).
|
||||||
* [Python 2.7](http://www.python.org/download/releases/2.7/)
|
* [Python 2.7](http://www.python.org/download/releases/2.7/)
|
||||||
* [Node.js](http://nodejs.org/download/)
|
* [Node.js](http://nodejs.org/download/)
|
||||||
* [git](http://git-scm.com)
|
* [Git](http://git-scm.com)
|
||||||
|
|
||||||
If you don't have a Windows installation at the moment,
|
If you don't currently have a Windows installation, [modern.ie](https://www.modern.ie/en-us/virtualization-tools#downloads)
|
||||||
[modern.ie](https://www.modern.ie/en-us/virtualization-tools#downloads) has
|
has timebombed versions of Windows that you can use to build Electron.
|
||||||
timebombed versions of Windows that you can use to build Electron.
|
|
||||||
|
|
||||||
The building of Electron is done entirely with command-line scripts, so you
|
Building Electron is done entirely with command-line scripts and cannot be done
|
||||||
can use any editor you like to develop Electron, but it also means you can
|
with Visual Studio. You can develop Electron with any editor but support for
|
||||||
not use Visual Studio for the development. Support of building with Visual
|
building with Visual Studio will come in the future.
|
||||||
Studio will come in the future.
|
|
||||||
|
|
||||||
**Note:** Even though Visual Studio is not used for building, it's still
|
**Note:** Even though Visual Studio is not used for building, it's still
|
||||||
**required** because we need the build toolchains it provides.
|
**required** because we need the build toolchains it provides.
|
||||||
|
|
||||||
**Note:** Visual Studio 2015 will not work. Please make sure to get MSVS **2013**.
|
**Note:** Visual Studio 2015 will not work. Please make sure to get MSVS
|
||||||
|
**2013**.
|
||||||
|
|
||||||
## Getting the code
|
## Getting the Code
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
git clone https://github.com/atom/electron.git
|
git clone https://github.com/atom/electron.git
|
||||||
|
@ -32,7 +33,7 @@ git clone https://github.com/atom/electron.git
|
||||||
## Bootstrapping
|
## Bootstrapping
|
||||||
|
|
||||||
The bootstrap script will download all necessary build dependencies and create
|
The bootstrap script will download all necessary build dependencies and create
|
||||||
build project files. Notice that we're using `ninja` to build Electron so
|
the build project files. Notice that we're using `ninja` to build Electron so
|
||||||
there is no Visual Studio project generated.
|
there is no Visual Studio project generated.
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
|
@ -57,7 +58,7 @@ python script\build.py -c D
|
||||||
After building is done, you can find `electron.exe` under `out\D` (debug
|
After building is done, you can find `electron.exe` under `out\D` (debug
|
||||||
target) or under `out\R` (release target).
|
target) or under `out\R` (release target).
|
||||||
|
|
||||||
## 64bit build
|
## 64bit Build
|
||||||
|
|
||||||
To build for the 64bit target, you need to pass `--target_arch=x64` when running
|
To build for the 64bit target, you need to pass `--target_arch=x64` when running
|
||||||
the bootstrap script:
|
the bootstrap script:
|
||||||
|
@ -70,7 +71,7 @@ The other building steps are exactly the same.
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
Test your changes confirm to the project coding style using:
|
Test your changes conform to the project coding style using:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
python script\cpplint.py
|
python script\cpplint.py
|
||||||
|
@ -83,7 +84,8 @@ python script\test.py
|
||||||
```
|
```
|
||||||
|
|
||||||
Tests that include native modules (e.g. `runas`) can't be executed with the
|
Tests that include native modules (e.g. `runas`) can't be executed with the
|
||||||
debug build (see #2558 for details), but they will work with the release build.
|
debug build (see [#2558](https://github.com/atom/electron/issues/2558) for
|
||||||
|
details), but they will work with the release build.
|
||||||
|
|
||||||
To run the tests with the release build use:
|
To run the tests with the release build use:
|
||||||
|
|
||||||
|
@ -122,9 +124,9 @@ Traceback (most recent call last):
|
||||||
subprocess.CalledProcessError: Command '['npm.cmd', 'install']' returned non-zero exit status 3
|
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
|
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 (supposing
|
solution is to use the Win32 Python to execute the bootstrap script (assuming
|
||||||
you have installed python under `C:\Python27`):
|
you have installed Python under `C:\Python27`):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
/cygdrive/c/Python27/python.exe script/bootstrap.py
|
/cygdrive/c/Python27/python.exe script/bootstrap.py
|
||||||
|
@ -132,7 +134,7 @@ you have installed python under `C:\Python27`):
|
||||||
|
|
||||||
### LNK1181: cannot open input file 'kernel32.lib'
|
### LNK1181: cannot open input file 'kernel32.lib'
|
||||||
|
|
||||||
Try reinstalling 32bit node.js.
|
Try reinstalling 32bit Node.js.
|
||||||
|
|
||||||
### Error: ENOENT, stat 'C:\Users\USERNAME\AppData\Roaming\npm'
|
### Error: ENOENT, stat 'C:\Users\USERNAME\AppData\Roaming\npm'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue