diff --git a/script/build.ts b/script/build.ts index d09df96e7ac..cf18eb15be6 100755 --- a/script/build.ts +++ b/script/build.ts @@ -136,7 +136,11 @@ function packageApp() { targetArch = os.arch() } - if (targetArch === 'arm64' || targetArch === 'x64') { + if ( + targetArch === 'arm64' || + targetArch === 'x64' || + targetArch === 'armv7l' + ) { return targetArch } diff --git a/script/dist-info.ts b/script/dist-info.ts index 88a0bcbd4b4..420444f7448 100644 --- a/script/dist-info.ts +++ b/script/dist-info.ts @@ -112,11 +112,12 @@ export const isPublishable = () => export const getChannel = () => process.env.RELEASE_CHANNEL ?? process.env.NODE_ENV ?? 'development' -export function getDistArchitecture(): 'arm64' | 'x64' { +export function getDistArchitecture(): 'arm64' | 'x64' | 'armv7l' { // If a specific npm_config_arch is set, we use that one instead of the OS arch (to support cross compilation) if ( process.env.npm_config_arch === 'arm64' || - process.env.npm_config_arch === 'x64' + process.env.npm_config_arch === 'x64' || + process.env.npm_config_arch === 'armv7l' ) { return process.env.npm_config_arch } @@ -124,6 +125,9 @@ export function getDistArchitecture(): 'arm64' | 'x64' { if (process.arch === 'arm64') { return 'arm64' } + if (process.arch === 'arm') { + return 'armv7l' + } // TODO: Check if it's x64 running on an arm64 Windows with IsWow64Process2 // More info: https://www.rudyhuyn.com/blog/2017/12/13/how-to-detect-that-your-x86-application-runs-on-windows-on-arm/ diff --git a/script/package-debian.ts b/script/package-debian.ts index 15314d519dd..fc6ae2cf57c 100644 --- a/script/package-debian.ts +++ b/script/package-debian.ts @@ -16,7 +16,7 @@ type DebianOptions = { // required src: string dest: string - arch: 'amd64' | 'i386' | 'arm64' + arch: 'amd64' | 'i386' | 'arm64' | 'armhf' // optional description?: string productDescription?: string