mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-04-24 23:20:52 +00:00
Add osx-arm64 support to electronize command
Updates the GetTargetPlatformInformationResult() function to add 'osx-arm64' target. Updates the 'default' case to automatically detect M1 mac.
This commit is contained in:
@@ -27,6 +27,10 @@ namespace ElectronNET.CLI.Commands.Actions
|
||||
netCorePublishRid = "osx-x64";
|
||||
electronPackerPlatform = "mac";
|
||||
break;
|
||||
case "osx-arm64":
|
||||
netCorePublishRid = "osx-arm64";
|
||||
electronPackerPlatform = "darwin-arm64";
|
||||
break;
|
||||
case "linux":
|
||||
netCorePublishRid = "linux-x64";
|
||||
electronPackerPlatform = "linux";
|
||||
@@ -48,8 +52,17 @@ namespace ElectronNET.CLI.Commands.Actions
|
||||
}
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
||||
{
|
||||
netCorePublishRid = "osx-x64";
|
||||
electronPackerPlatform = "mac";
|
||||
if (RuntimeInformation.OSArchitecture.Equals(Architecture.Arm64))
|
||||
{
|
||||
//Apple Silicon Mac:
|
||||
netCorePublishRid = "osx-arm64";
|
||||
electronPackerPlatform = "darwin-arm64";
|
||||
}
|
||||
else{
|
||||
//Intel Mac:
|
||||
netCorePublishRid = "osx-x64";
|
||||
electronPackerPlatform = "mac";
|
||||
}
|
||||
}
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user