@joebigelow / wix / commits / d993372a

Enable ARM64 build for wix build

Fixes 6960

Rob Mensching committed Sep 2, 2022 at 14:41 UTC d993372ad5468cae88990bc31a2c825e742cd717
4 files changed +7 -10
src/wix/Directory.Build.targets
+3
@@ -8,6 +8,9 @@
8 <None Include="$(MSBuildThisFileDirectory)wixnative\x64\mergemod.dll" CopyToOutputDirectory="PreserveNewest" Condition=" '$(RuntimeIdentifier)'=='win-x64' or '$(RuntimeIdentifier)'=='' " />
9 <None Include="$(BaseOutputPath)$(Configuration)\x64\wixnative.exe" CopyToOutputDirectory="PreserveNewest" Condition=" '$(RuntimeIdentifier)'=='win-x64' or '$(RuntimeIdentifier)'=='' " />
10
11 + <None Include="$(MSBuildThisFileDirectory)wixnative\arm64\mergemod.dll" CopyToOutputDirectory="PreserveNewest" Condition=" '$(RuntimeIdentifier)'=='win-arm64' " />
12 + <None Include="$(BaseOutputPath)$(Configuration)\arm64\wixnative.exe" CopyToOutputDirectory="PreserveNewest" Condition=" '$(RuntimeIdentifier)'=='win-arm64' " />
13 +
14 <None Include="$(MSBuildThisFileDirectory)wixnative\Win32\mergemod.dll" CopyToOutputDirectory="PreserveNewest" Condition=" '$(RuntimeIdentifier)'=='win-x86' " />
15 <None Include="$(BaseOutputPath)$(Configuration)\x86\wixnative.exe" CopyToOutputDirectory="PreserveNewest" Condition=" '$(RuntimeIdentifier)'=='win-x86' " />
16 </ItemGroup>
src/wix/publish_t.proj
+2
@@ -8,6 +8,7 @@
8 <PublishHere>$(PublishRoot)WixToolset.Sdk\tools\net472\</PublishHere>
9 <PublishX86>$(PublishRoot)WixToolset.Sdk\tools\net472\x86\</PublishX86>
10 <PublishX64>$(PublishRoot)WixToolset.Sdk\tools\net472\x64\</PublishX64>
11 + <PublishARM64>$(PublishRoot)WixToolset.Sdk\tools\net472\arm64\</PublishARM64>
12 <PublishDnc>$(PublishRoot)WixToolset.Sdk\tools\net6.0\</PublishDnc>
13 </PropertyGroup>
14
@@ -20,6 +21,7 @@
21 <!-- wix.exe doesn't need to filter any files so publish it straight into its final location -->
22 <ProjectReference Include="wix\wix.csproj" Properties="TargetFramework=net472;RuntimeIdentifier=win-x86;PublishDir=$(PublishX86)" Targets="Publish" />
23 <ProjectReference Include="wix\wix.csproj" Properties="TargetFramework=net472;RuntimeIdentifier=win-x64;PublishDir=$(PublishX64)" Targets="Publish" />
24 + <ProjectReference Include="wix\wix.csproj" Properties="TargetFramework=net472;RuntimeIdentifier=win-arm64;PublishDir=$(PublishARM64)" Targets="Publish" />
25 <ProjectReference Include="wix\wix.csproj" Properties="TargetFramework=net6.0;UseAppHost=false;PublishDir=$(PublishDnc)" Targets="Publish" />
26 </ItemGroup>
27
src/wix/test/WixToolsetTest.BuildTasks/WixBuildTaskFixture.cs
+1 -9
@@ -26,14 +26,6 @@ namespace WixToolsetTest.BuildTasks
26 {
27 var folder = TestData.Get("TestData", "SimpleMsiPackage", "MsiPackage");
28
29 - var wixExeFolder = PublishedWixExeFolder;
30 -
31 - // TODO: See https://github.com/wixtoolset/issues/issues/6960 - fallback to x86 until we have a wix.exe that supports all platforms.
32 - if (!Directory.Exists(wixExeFolder))
33 - {
34 - wixExeFolder = Path.Combine(Path.GetDirectoryName(wixExeFolder), "x86");
35 - }
36 -
29 using (var fs = new DisposableFileSystem())
30 {
31 var baseFolder = fs.GetFolder();
@@ -62,7 +54,7 @@ namespace WixToolsetTest.BuildTasks
54 PdbType = "Full",
55 PdbFile = new TaskItem(pdbPath),
56 DefaultCompressionLevel = "nOnE",
65 - ToolPath = wixExeFolder
57 + ToolPath = PublishedWixExeFolder
58 };
59
60 var result = task.Execute();
src/wix/wix/wix.csproj
+1 -1
@@ -9,7 +9,7 @@
9 <DebugType>embedded</DebugType>
10 <PublishRepositoryUrl>true</PublishRepositoryUrl>
11 <PackAsTool>true</PackAsTool>
12 - <RuntimeIdentifiers Condition=" '$(RuntimeIdentifier)'=='' and '$(TargetFramework)'!='net6.0' ">win-x86;win-x64</RuntimeIdentifiers>
12 + <RuntimeIdentifiers Condition=" '$(RuntimeIdentifier)'=='' and '$(TargetFramework)'!='net6.0' ">win-x86;win-x64;win-arm64</RuntimeIdentifiers>
13 <AppConfig>app.config</AppConfig>
14 <ApplicationManifest>wix.exe.manifest</ApplicationManifest>
15 <RollForward>Major</RollForward>