diff --git a/src/electron-forge-make.js b/src/electron-forge-make.js index 42b311fa54..7e25bc1cee 100644 --- a/src/electron-forge-make.js +++ b/src/electron-forge-make.js @@ -5,6 +5,7 @@ import program from 'commander'; import ora from 'ora'; import './util/terminate'; +import electronHostArch from './util/electron-host-arch'; import getForgeConfig from './util/forge-config'; import packager from './electron-forge-package'; import resolveDir from './util/resolve-dir'; @@ -55,7 +56,7 @@ const main = async () => { console.info('Making for the following targets:', `${targets.join(', ')}`.cyan); - const declaredArch = program.arch || process.arch; + const declaredArch = program.arch || electronHostArch(); let targetArchs = [declaredArch]; if (declaredArch === 'all') { switch (process.platform) { diff --git a/src/electron-forge-package.js b/src/electron-forge-package.js index f9fd261ff6..563e2e7db5 100644 --- a/src/electron-forge-package.js +++ b/src/electron-forge-package.js @@ -8,6 +8,7 @@ import ora from 'ora'; import rimraf from 'rimraf'; import './util/terminate'; +import electronHostArch from './util/electron-host-arch'; import getForgeConfig from './util/forge-config'; import packagerCompileHook from './util/compile-hook'; import rebuildHook from './util/rebuild'; @@ -34,7 +35,7 @@ const main = async () => { }) .parse(process.argv); - const arch = program.arch || process.arch; + const arch = program.arch || electronHostArch(); const platform = program.platform || process.platform; let prepareSpinner = ora.ora(`Preparing to Package Application for arch: ${(arch === 'all' ? 'ia32' : arch).cyan}`).start(); diff --git a/src/makers/linux/deb.js b/src/makers/linux/deb.js index 5615d57987..ef99433d41 100644 --- a/src/makers/linux/deb.js +++ b/src/makers/linux/deb.js @@ -8,11 +8,8 @@ function debianArch(nodeArch) { switch (nodeArch) { case 'ia32': return 'i386'; case 'x64': return 'amd64'; - case 'arm': - if (process.config.variables.arm_version === '7') { - return 'armhf'; - } - return 'armel'; + case 'armv7l': return 'armhf'; + case 'arm': return 'armel'; default: return nodeArch; } } diff --git a/src/makers/linux/flatpak.js b/src/makers/linux/flatpak.js index 19ae524c51..b1aac424ab 100644 --- a/src/makers/linux/flatpak.js +++ b/src/makers/linux/flatpak.js @@ -8,6 +8,7 @@ function flatpakArch(nodeArch) { switch (nodeArch) { case 'ia32': return 'i386'; case 'x64': return 'x86_64'; + case 'armv7l': return 'arm'; // arm => arm default: return nodeArch; } diff --git a/src/makers/linux/rpm.js b/src/makers/linux/rpm.js index cc2f8a2877..45eba7ec03 100644 --- a/src/makers/linux/rpm.js +++ b/src/makers/linux/rpm.js @@ -8,11 +8,8 @@ function rpmArch(nodeArch) { switch (nodeArch) { case 'ia32': return 'i386'; case 'x64': return 'x86_64'; - case 'arm': - if (process.config.variables.arm_version === '7') { - return 'armv7hl'; - } - return 'armv6hl'; + case 'armv7l': return 'armv7hl'; + case 'arm': return 'armv6hl'; default: return nodeArch; } } diff --git a/src/util/electron-host-arch.js b/src/util/electron-host-arch.js new file mode 100644 index 0000000000..1ed8652f27 --- /dev/null +++ b/src/util/electron-host-arch.js @@ -0,0 +1,7 @@ +export default () => { + if (process.arch === 'arm' && process.config.variables.arm_version === '7') { + return 'armv7l'; + } + + return process.arch; +};