Clean up target arch support based on pull request #55 comments.
This commit is contained in:
parent
f1f061e1e3
commit
dd59736393
2 changed files with 7 additions and 5 deletions
|
@ -39,6 +39,11 @@ electron
|
|||
|
||||
If you need to use an HTTP proxy you can [set these environment variables](https://github.com/request/request/tree/f0c4ec061141051988d1216c24936ad2e7d5c45d#controlling-proxy-behaviour-using-environment-variables)
|
||||
|
||||
If you want to change the architecture that is downloaded (e.g., `ia32` on an `x64` machine), you can use the `--arch` flag with npm install or set the `npm_config_arch` environment variable:
|
||||
```
|
||||
npm install --arch=ia32 electron-prebuilt
|
||||
```
|
||||
|
||||
## About
|
||||
|
||||
Works on Mac, Windows and Linux OSes that Electron supports (e.g. Electron [does not support Windows XP](https://github.com/atom/electron/issues/691)).
|
||||
|
|
|
@ -23,11 +23,8 @@ var paths = {
|
|||
|
||||
if (!paths[platform]) throw new Error('Unknown platform: ' + platform)
|
||||
|
||||
if (process.env.npm_config_arch) {
|
||||
download({version: version, arch: process.env.npm_config_arch}, extractFile)
|
||||
} else {
|
||||
download({version: version}, extractFile)
|
||||
}
|
||||
// downloads if not cached
|
||||
download({version: version, arch: process.env.npm_config_arch}, extractFile)
|
||||
|
||||
// unzips and makes path.txt point at the correct executable
|
||||
function extractFile (err, zipPath) {
|
||||
|
|
Loading…
Reference in a new issue