From 10eaa53b262616de62b531cd921ff093271955d9 Mon Sep 17 00:00:00 2001 From: Matt Harris Date: Sat, 6 May 2017 20:11:51 +0100 Subject: [PATCH] Add ARM build support (#360) --- docs/api.md | 2 +- src/cli.js | 2 +- src/infer/inferOs.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/api.md b/docs/api.md index 0f44dd0..678033f 100644 --- a/docs/api.md +++ b/docs/api.md @@ -97,7 +97,7 @@ The alternative values `win32` (for Windows) or `darwin`, `mac` (for OSX) can al -a, --arch ``` -Processor architecture, automatically determined based on the current OS. Can be overwritten by specifying either `ia32` or `x64`. +Processor architecture, automatically determined based on the current OS. Can be overwritten by specifying either `ia32`, `x64` or `armv7l`. #### [electron-version] diff --git a/src/cli.js b/src/cli.js index 3441bd0..a45b074 100755 --- a/src/cli.js +++ b/src/cli.js @@ -21,7 +21,7 @@ if (require.main === module) { }) .option('-n, --name ', 'app name') .option('-p, --platform ', '\'osx\', \'linux\' or \'windows\'') - .option('-a, --arch ', '\'ia32\' or \'x64\'') + .option('-a, --arch ', '\'ia32\' or \'x64\' or \'armv7l\'') .option('-e, --electron-version ', 'electron version to package, without the \'v\', see https://github.com/atom/electron/releases') .option('--no-overwrite', 'do not override output directory if it already exists, defaults to false') .option('-c, --conceal', 'packages the source code within your app into an archive, defaults to false, see http://electron.atom.io/docs/v0.36.0/tutorial/application-packaging/') diff --git a/src/infer/inferOs.js b/src/infer/inferOs.js index f0c1a31..30b4540 100644 --- a/src/infer/inferOs.js +++ b/src/infer/inferOs.js @@ -11,7 +11,7 @@ function inferPlatform() { function inferArch() { const arch = os.arch(); - if (arch !== 'ia32' && arch !== 'x64') { + if (arch !== 'ia32' && arch !== 'x64' && arch !== 'arm') { throw new Error(`Incompatible architecture ${arch} detected`); } return arch;