Merge pull request #60 from airtimemedia/master

Add target arch support
This commit is contained in:
=^._.^= 2015-10-02 10:58:37 -07:00
commit 5613fd6088
2 changed files with 6 additions and 1 deletions

View file

@ -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)).

View file

@ -24,7 +24,7 @@ var paths = {
if (!paths[platform]) throw new Error('Unknown platform: ' + platform)
// downloads if not cached
download({version: version}, extractFile)
download({version: version, arch: process.env.npm_config_arch}, extractFile)
// unzips and makes path.txt point at the correct executable
function extractFile (err, zipPath) {