From 2e5551dcb99c9667936ef60179f5f3d2bae98267 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Mon, 22 Feb 2021 18:10:22 +0100 Subject: [PATCH] Use 32-bit (ia32) app-builder.exe on Windows ARM64 --- app-builder-bin/index.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app-builder-bin/index.js b/app-builder-bin/index.js index 7a6ffa5..951e33e 100644 --- a/app-builder-bin/index.js +++ b/app-builder-bin/index.js @@ -11,6 +11,15 @@ function getPath() { if (platform === "darwin") { return path.join(__dirname, "mac", "app-builder") } + else if (platform === "win32" && process.arch == "arm64") { + /** + * Golang isn't available for Windows ARM64 yet, so an ARM64 binary + * can't be built yet. However, Windows ARM64 does support ia32 + * emulation, so we can leverage the existing executable for ia32. + * https://github.com/golang/go/issues/36439 + */ + return path.join(__dirname, "win", "ia32", "app-builder.exe") + } else if (platform === "win32") { return path.join(__dirname, "win", process.arch, "app-builder.exe") } @@ -19,4 +28,4 @@ function getPath() { } } -exports.appBuilderPath = getPath() \ No newline at end of file +exports.appBuilderPath = getPath()