Skip to content

Commit

Permalink
Clean up target arch support based on pull request electron-userland#55
Browse files Browse the repository at this point in the history
… comments.
  • Loading branch information
thughes committed Sep 22, 2015
1 parent b09aa28 commit 97ed707
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)).
Expand Down
7 changes: 2 additions & 5 deletions install.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 97ed707

Please sign in to comment.