From ceaf0747589023675c0263e8115a2623fcebfb56 Mon Sep 17 00:00:00 2001 From: Taiizor Date: Tue, 7 Oct 2025 12:58:44 +0300 Subject: [PATCH] Add ARM64 platform support to build and projects (#1941) * Add ARM64 platform support to build and projects Added ARM64 as a supported platform in project files and solution configuration. Updated GitHub Actions workflows to build and publish ARM64 libraries. This enables building and distributing ARM64 binaries alongside x64 and x86. * Add ARM64 support to NuGet packaging Updated main.nuget.target to include ARM64 DLL and XML files in the NuGet package, enabling multi-platform support for win-arm64 in addition to x64 and x86. * Fix ARM64 configuration mappings in solution file Corrects the Debug and Release configuration mappings for ARM64 targets in LibreHardwareMonitor.sln, ensuring ARM64 builds use the proper platform instead of x64. --- .github/workflows/master.yml | 10 ++++++++++ .github/workflows/pull requests.yml | 10 ++++++++++ Aga.Controls/Aga.Controls.csproj | 2 +- LibreHardwareMonitor.sln | 14 ++++++++++++++ LibreHardwareMonitor/LibreHardwareMonitor.csproj | 2 +- .../LibreHardwareMonitorLib.csproj | 4 ++-- LibreHardwareMonitorLib/main.nuget.target | 8 +++++++- 7 files changed, 45 insertions(+), 5 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index dddac6b..c2cfc09 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -66,6 +66,16 @@ jobs: path: | bin/Release/x86 + - name: Build ARM64 libraries + run: dotnet build LibreHardwareMonitorLib\LibreHardwareMonitorLib.csproj -c Release --no-restore -p:Platform=ARM64 + + - name: Publish ARM64 libraries + uses: actions/upload-artifact@v4 + with: + name: LibreHardwareMonitorLib (ARM64) + path: | + bin/Release/ARM64 + - name: Build reference libraries run: dotnet build LibreHardwareMonitorLib\LibreHardwareMonitorLib.csproj -c Release --no-restore -p:BuildOnlyRefs=true diff --git a/.github/workflows/pull requests.yml b/.github/workflows/pull requests.yml index a87635c..3a77208 100644 --- a/.github/workflows/pull requests.yml +++ b/.github/workflows/pull requests.yml @@ -66,6 +66,16 @@ jobs: path: | bin/Release/x86 + - name: Build ARM64 libraries + run: dotnet build LibreHardwareMonitorLib\LibreHardwareMonitorLib.csproj -c Release --no-restore -p:Platform=ARM64 + + - name: Publish ARM64 libraries + uses: actions/upload-artifact@v4 + with: + name: LibreHardwareMonitorLib (ARM64) + path: | + bin/Release/ARM64 + - name: Build reference libraries run: dotnet build LibreHardwareMonitorLib\LibreHardwareMonitorLib.csproj -c Release --no-restore -p:BuildOnlyRefs=true diff --git a/Aga.Controls/Aga.Controls.csproj b/Aga.Controls/Aga.Controls.csproj index afe29e0..72082a0 100644 --- a/Aga.Controls/Aga.Controls.csproj +++ b/Aga.Controls/Aga.Controls.csproj @@ -1,7 +1,7 @@ true - x64;x86 + x64;x86;ARM64 9.0.30729 diff --git a/LibreHardwareMonitor.sln b/LibreHardwareMonitor.sln index f13aa02..bc0df0b 100644 --- a/LibreHardwareMonitor.sln +++ b/LibreHardwareMonitor.sln @@ -22,32 +22,46 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM64 = Debug|ARM64 Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 + Release|ARM64 = Release|ARM64 Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0397530-545A-471D-BB74-027AE456DF1A}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {B0397530-545A-471D-BB74-027AE456DF1A}.Debug|ARM64.Build.0 = Debug|ARM64 {B0397530-545A-471D-BB74-027AE456DF1A}.Debug|x64.ActiveCfg = Debug|x64 {B0397530-545A-471D-BB74-027AE456DF1A}.Debug|x64.Build.0 = Debug|x64 {B0397530-545A-471D-BB74-027AE456DF1A}.Debug|x86.ActiveCfg = Debug|x86 {B0397530-545A-471D-BB74-027AE456DF1A}.Debug|x86.Build.0 = Debug|x86 + {B0397530-545A-471D-BB74-027AE456DF1A}.Release|ARM64.ActiveCfg = Release|ARM64 + {B0397530-545A-471D-BB74-027AE456DF1A}.Release|ARM64.Build.0 = Release|ARM64 {B0397530-545A-471D-BB74-027AE456DF1A}.Release|x64.ActiveCfg = Release|x64 {B0397530-545A-471D-BB74-027AE456DF1A}.Release|x64.Build.0 = Release|x64 {B0397530-545A-471D-BB74-027AE456DF1A}.Release|x86.ActiveCfg = Release|x86 {B0397530-545A-471D-BB74-027AE456DF1A}.Release|x86.Build.0 = Release|x86 + {F5E0C1F7-9E9B-46F2-AC88-8C9C1C923880}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {F5E0C1F7-9E9B-46F2-AC88-8C9C1C923880}.Debug|ARM64.Build.0 = Debug|ARM64 {F5E0C1F7-9E9B-46F2-AC88-8C9C1C923880}.Debug|x64.ActiveCfg = Debug|x64 {F5E0C1F7-9E9B-46F2-AC88-8C9C1C923880}.Debug|x64.Build.0 = Debug|x64 {F5E0C1F7-9E9B-46F2-AC88-8C9C1C923880}.Debug|x86.ActiveCfg = Debug|x86 {F5E0C1F7-9E9B-46F2-AC88-8C9C1C923880}.Debug|x86.Build.0 = Debug|x86 + {F5E0C1F7-9E9B-46F2-AC88-8C9C1C923880}.Release|ARM64.ActiveCfg = Release|ARM64 + {F5E0C1F7-9E9B-46F2-AC88-8C9C1C923880}.Release|ARM64.Build.0 = Release|ARM64 {F5E0C1F7-9E9B-46F2-AC88-8C9C1C923880}.Release|x64.ActiveCfg = Release|x64 {F5E0C1F7-9E9B-46F2-AC88-8C9C1C923880}.Release|x64.Build.0 = Release|x64 {F5E0C1F7-9E9B-46F2-AC88-8C9C1C923880}.Release|x86.ActiveCfg = Release|x86 {F5E0C1F7-9E9B-46F2-AC88-8C9C1C923880}.Release|x86.Build.0 = Release|x86 + {E73BB233-D88B-44A7-A98F-D71EE158381D}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {E73BB233-D88B-44A7-A98F-D71EE158381D}.Debug|ARM64.Build.0 = Debug|ARM64 {E73BB233-D88B-44A7-A98F-D71EE158381D}.Debug|x64.ActiveCfg = Debug|x64 {E73BB233-D88B-44A7-A98F-D71EE158381D}.Debug|x64.Build.0 = Debug|x64 {E73BB233-D88B-44A7-A98F-D71EE158381D}.Debug|x86.ActiveCfg = Debug|x86 {E73BB233-D88B-44A7-A98F-D71EE158381D}.Debug|x86.Build.0 = Debug|x86 + {E73BB233-D88B-44A7-A98F-D71EE158381D}.Release|ARM64.ActiveCfg = Release|ARM64 + {E73BB233-D88B-44A7-A98F-D71EE158381D}.Release|ARM64.Build.0 = Release|ARM64 {E73BB233-D88B-44A7-A98F-D71EE158381D}.Release|x64.ActiveCfg = Release|x64 {E73BB233-D88B-44A7-A98F-D71EE158381D}.Release|x64.Build.0 = Release|x64 {E73BB233-D88B-44A7-A98F-D71EE158381D}.Release|x86.ActiveCfg = Release|x86 diff --git a/LibreHardwareMonitor/LibreHardwareMonitor.csproj b/LibreHardwareMonitor/LibreHardwareMonitor.csproj index 72012db..d013a90 100644 --- a/LibreHardwareMonitor/LibreHardwareMonitor.csproj +++ b/LibreHardwareMonitor/LibreHardwareMonitor.csproj @@ -1,7 +1,7 @@ true - x64;x86 + x64;x86;ARM64 WinExe diff --git a/LibreHardwareMonitorLib/LibreHardwareMonitorLib.csproj b/LibreHardwareMonitorLib/LibreHardwareMonitorLib.csproj index cc9428f..48c5529 100644 --- a/LibreHardwareMonitorLib/LibreHardwareMonitorLib.csproj +++ b/LibreHardwareMonitorLib/LibreHardwareMonitorLib.csproj @@ -18,8 +18,8 @@ latest packageicon.png true - x64;x86 - win-x64;win-x86 + x64;x86;ARM64 + win-x64;win-x86;win-arm64 $(NoWarn);CA1416 diff --git a/LibreHardwareMonitorLib/main.nuget.target b/LibreHardwareMonitorLib/main.nuget.target index a6619ed..e60f1f0 100644 --- a/LibreHardwareMonitorLib/main.nuget.target +++ b/LibreHardwareMonitorLib/main.nuget.target @@ -1,4 +1,4 @@ - + false @@ -17,6 +17,12 @@ runtimes\win-x86\lib\ + + runtimes\win-arm64\lib\ + + + runtimes\win-arm64\lib\ + ref\