From 4ba8d9bf46fa58a3e19637c692139f0dd7d71939 Mon Sep 17 00:00:00 2001 From: Brendan McShane Date: Sat, 20 Nov 2021 18:25:46 -0500 Subject: [PATCH] Add fix for Apple Silicon to build command --- ElectronNET.CLI/Commands/BuildCommand.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ElectronNET.CLI/Commands/BuildCommand.cs b/ElectronNET.CLI/Commands/BuildCommand.cs index d9c0746..56d002b 100644 --- a/ElectronNET.CLI/Commands/BuildCommand.cs +++ b/ElectronNET.CLI/Commands/BuildCommand.cs @@ -170,7 +170,13 @@ namespace ElectronNET.CLI.Commands Console.WriteLine("Executing electron magic in this directory: " + buildPath); + string electronArch = "x64"; + //Somewhat janky fix for Apple Silicon: + if (platformInfo.NetCorePublishRid == "osx-arm64") + { + electronArch = "arm64"; + } if (parser.Arguments.ContainsKey(_paramElectronArch)) { electronArch = parser.Arguments[_paramElectronArch][0];