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.
This commit is contained in:
Taiizor
2025-10-07 11:58:44 +02:00
committed by GitHub
parent 14578c57e6
commit ceaf074758
7 changed files with 45 additions and 5 deletions
+10
View File
@@ -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
+10
View File
@@ -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
+1 -1
View File
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
<Platforms>x64;x86</Platforms>
<Platforms>x64;x86;ARM64</Platforms>
</PropertyGroup>
<PropertyGroup>
<ProductVersion>9.0.30729</ProductVersion>
+14
View File
@@ -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
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
<Platforms>x64;x86</Platforms>
<Platforms>x64;x86;ARM64</Platforms>
</PropertyGroup>
<PropertyGroup>
<OutputType>WinExe</OutputType>
@@ -18,8 +18,8 @@
<LangVersion>latest</LangVersion>
<PackageIcon>packageicon.png</PackageIcon>
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
<Platforms>x64;x86</Platforms>
<RuntimeIdentifiers>win-x64;win-x86</RuntimeIdentifiers>
<Platforms>x64;x86;ARM64</Platforms>
<RuntimeIdentifiers>win-x64;win-x86;win-arm64</RuntimeIdentifiers>
<NoWarn>$(NoWarn);CA1416</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(BuildOnlyRefs)'=='true'">
+7 -1
View File
@@ -1,4 +1,4 @@
<!-- For packing the multi-platform nuget after building x64, x86 and reference libs -->
<!-- For packing the multi-platform nuget after building x64, x86, ARM64 and reference libs -->
<Project>
<PropertyGroup>
<IncludeBuildOutput>false</IncludeBuildOutput>
@@ -17,6 +17,12 @@
<None Include="..\bin\$(Configuration)\x86\**\LibreHardwareMonitorLib.xml" Pack="true">
<PackagePath>runtimes\win-x86\lib\</PackagePath>
</None>
<None Include="..\bin\$(Configuration)\ARM64\**\LibreHardwareMonitorLib.dll" Pack="true">
<PackagePath>runtimes\win-arm64\lib\</PackagePath>
</None>
<None Include="..\bin\$(Configuration)\ARM64\**\LibreHardwareMonitorLib.xml" Pack="true">
<PackagePath>runtimes\win-arm64\lib\</PackagePath>
</None>
<None Include="..\bin\$(Configuration)\AnyCPU\**\LibreHardwareMonitorLib.dll" Pack="true">
<PackagePath>ref\</PackagePath>
</None>