@joebigelow / wix / commits / 1979837f

Enable platform-specific CAs, including ARM64

- Update to latest dependencies.

Bob Arnson committed Jun 14, 2020 at 16:03 UTC 1979837ff79b46ce0a03e25b82e239c37348ec4d
11 files changed +155 -21
appveyor.cmd
+3
@@ -9,5 +9,8 @@ msbuild -p:Configuration=Release src\test\WixToolsetTest.NetFx\WixToolsetTest.Ne
9
10 msbuild -p:Configuration=Release -t:Pack src\wixext\WixToolset.NetFx.wixext.csproj
11
12 +msbuild -p:Configuration=Release src\test\WixToolsetTest.Netfx\WixToolsetTest.Netfx.csproj
13 +dotnet test -c Release --no-build src\test\WixToolsetTest.Netfx
14 +
15 @popd
16 @endlocal
\ No newline at end of file
src/ca/netfxca.vcxproj
+29 -5
@@ -1,8 +1,8 @@
1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
4 - <Import Project="..\..\packages\WixToolset.WcaUtil.4.0.11\build\WixToolset.WcaUtil.props" Condition="Exists('..\..\packages\WixToolset.WcaUtil.4.0.11\build\WixToolset.WcaUtil.props')" />
5 - <Import Project="..\..\packages\WixToolset.DUtil.4.0.24\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.24\build\WixToolset.DUtil.props')" />
4 + <Import Project="..\..\packages\WixToolset.DUtil.4.0.26\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.26\build\WixToolset.DUtil.props')" />
5 + <Import Project="..\..\packages\WixToolset.WcaUtil.4.0.13\build\WixToolset.WcaUtil.props" Condition="Exists('..\..\packages\WixToolset.WcaUtil.4.0.13\build\WixToolset.WcaUtil.props')" />
6 <ItemGroup Label="ProjectConfigurations">
7 <ProjectConfiguration Include="Debug|Win32">
8 <Configuration>Debug</Configuration>
@@ -12,12 +12,36 @@
12 <Configuration>Release</Configuration>
13 <Platform>Win32</Platform>
14 </ProjectConfiguration>
15 + <ProjectConfiguration Include="Debug|x64">
16 + <Configuration>Debug</Configuration>
17 + <Platform>x64</Platform>
18 + </ProjectConfiguration>
19 + <ProjectConfiguration Include="Release|x64">
20 + <Configuration>Release</Configuration>
21 + <Platform>x64</Platform>
22 + </ProjectConfiguration>
23 + <ProjectConfiguration Include="Debug|ARM">
24 + <Configuration>Debug</Configuration>
25 + <Platform>ARM</Platform>
26 + </ProjectConfiguration>
27 + <ProjectConfiguration Include="Release|ARM">
28 + <Configuration>Release</Configuration>
29 + <Platform>ARM</Platform>
30 + </ProjectConfiguration>
31 + <ProjectConfiguration Include="Debug|ARM64">
32 + <Configuration>Debug</Configuration>
33 + <Platform>ARM64</Platform>
34 + </ProjectConfiguration>
35 + <ProjectConfiguration Include="Release|ARM64">
36 + <Configuration>Release</Configuration>
37 + <Platform>ARM64</Platform>
38 + </ProjectConfiguration>
39 </ItemGroup>
40 <PropertyGroup Label="Globals">
41 <ProjectGuid>{F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}</ProjectGuid>
42 <ConfigurationType>DynamicLibrary</ConfigurationType>
43 <TargetName>netfxca</TargetName>
20 - <PlatformToolset>v141</PlatformToolset>
44 + <PlatformToolset>v142</PlatformToolset>
45 <CharacterSet>Unicode</CharacterSet>
46 <ProjectModuleDefinitionFile>netfxca.def</ProjectModuleDefinitionFile>
47 <Description>WiX Toolset .NET Framework CustomAction</Description>
@@ -46,7 +70,7 @@
70 <PropertyGroup>
71 <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
72 </PropertyGroup>
49 - <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.24\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.24\build\WixToolset.DUtil.props'))" />
50 - <Error Condition="!Exists('..\..\packages\WixToolset.WcaUtil.4.0.11\build\WixToolset.WcaUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.WcaUtil.4.0.11\build\WixToolset.WcaUtil.props'))" />
73 + <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.26\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.26\build\WixToolset.DUtil.props'))" />
74 + <Error Condition="!Exists('..\..\packages\WixToolset.WcaUtil.4.0.13\build\WixToolset.WcaUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.WcaUtil.4.0.13\build\WixToolset.WcaUtil.props'))" />
75 </Target>
76 </Project>
\ No newline at end of file
src/ca/packages.config
+2 -2
@@ -1,5 +1,5 @@
1 <?xml version="1.0" encoding="utf-8"?>
2 <packages>
3 - <package id="WixToolset.DUtil" version="4.0.24" targetFramework="native" />
4 - <package id="WixToolset.WcaUtil" version="4.0.11" targetFramework="native" />
3 + <package id="WixToolset.DUtil" version="4.0.26" targetFramework="native" />
4 + <package id="WixToolset.WcaUtil" version="4.0.13" targetFramework="native" />
5 </packages>
\ No newline at end of file
src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs
+67 -3
@@ -42,17 +42,81 @@ namespace WixToolsetTest.Netfx
42 var folder = TestData.Get(@"TestData\UsingNativeImage");
43 var build = new Builder(folder, typeof(NetfxExtensionFactory), new[] { folder });
44
45 - var results = build.BuildAndQuery(Build, "Wix4NetFxNativeImage");
45 + var results = build.BuildAndQuery(Build, "Binary", "CustomAction", "Wix4NetFxNativeImage");
46 Assert.Equal(new[]
47 {
48 + "Binary:Wix4NetFxCA_X86\t[Binary data]",
49 + "CustomAction:Wix4NetFxExecuteNativeImageCommitInstall_X86\t3649\tWix4NetFxCA_X86\tExecNetFx\t",
50 + "CustomAction:Wix4NetFxExecuteNativeImageCommitUninstall_X86\t3649\tWix4NetFxCA_X86\tExecNetFx\t",
51 + "CustomAction:Wix4NetFxExecuteNativeImageInstall_X86\t3137\tWix4NetFxCA_X86\tExecNetFx\t",
52 + "CustomAction:Wix4NetFxExecuteNativeImageUninstall_X86\t3137\tWix4NetFxCA_X86\tExecNetFx\t",
53 + "CustomAction:Wix4NetFxScheduleNativeImage_X86\t1\tWix4NetFxCA_X86\tSchedNetFx\t",
54 + "Wix4NetFxNativeImage:ExampleNgen\tfil6349_KNDJhqShNzVdHX3ihhvA6Y\t3\t8\t\t",
55 + }, results.OrderBy(s => s).ToArray());
56 + }
57 +
58 + [Fact]
59 + public void CanBuildUsingNativeImageX64()
60 + {
61 + var folder = TestData.Get(@"TestData\UsingNativeImage");
62 + var build = new Builder(folder, typeof(NetfxExtensionFactory), new[] { folder });
63 +
64 + var results = build.BuildAndQuery(BuildX64, "Binary", "CustomAction", "Wix4NetFxNativeImage");
65 + Assert.Equal(new[]
66 + {
67 + "Binary:Wix4NetFxCA_X64\t[Binary data]",
68 + "CustomAction:Wix4NetFxExecuteNativeImageCommitInstall_X64\t3649\tWix4NetFxCA_X64\tExecNetFx\t",
69 + "CustomAction:Wix4NetFxExecuteNativeImageCommitUninstall_X64\t3649\tWix4NetFxCA_X64\tExecNetFx\t",
70 + "CustomAction:Wix4NetFxExecuteNativeImageInstall_X64\t3137\tWix4NetFxCA_X64\tExecNetFx\t",
71 + "CustomAction:Wix4NetFxExecuteNativeImageUninstall_X64\t3137\tWix4NetFxCA_X64\tExecNetFx\t",
72 + "CustomAction:Wix4NetFxScheduleNativeImage_X64\t1\tWix4NetFxCA_X64\tSchedNetFx\t",
73 + "Wix4NetFxNativeImage:ExampleNgen\tfil6349_KNDJhqShNzVdHX3ihhvA6Y\t3\t8\t\t",
74 + }, results.OrderBy(s => s).ToArray());
75 + }
76 +
77 + [Fact]
78 + public void CanBuildUsingNativeImageARM64()
79 + {
80 + var folder = TestData.Get(@"TestData\UsingNativeImage");
81 + var build = new Builder(folder, typeof(NetfxExtensionFactory), new[] { folder });
82 +
83 + var results = build.BuildAndQuery(BuildARM64, "Binary", "CustomAction", "Wix4NetFxNativeImage");
84 + Assert.Equal(new[]
85 + {
86 + "Binary:Wix4NetFxCA_A64\t[Binary data]",
87 + "CustomAction:Wix4NetFxExecuteNativeImageCommitInstall_A64\t3649\tWix4NetFxCA_A64\tExecNetFx\t",
88 + "CustomAction:Wix4NetFxExecuteNativeImageCommitUninstall_A64\t3649\tWix4NetFxCA_A64\tExecNetFx\t",
89 + "CustomAction:Wix4NetFxExecuteNativeImageInstall_A64\t3137\tWix4NetFxCA_A64\tExecNetFx\t",
90 + "CustomAction:Wix4NetFxExecuteNativeImageUninstall_A64\t3137\tWix4NetFxCA_A64\tExecNetFx\t",
91 + "CustomAction:Wix4NetFxScheduleNativeImage_A64\t1\tWix4NetFxCA_A64\tSchedNetFx\t",
92 "Wix4NetFxNativeImage:ExampleNgen\tfil6349_KNDJhqShNzVdHX3ihhvA6Y\t3\t8\t\t",
93 }, results.OrderBy(s => s).ToArray());
94 }
95
96 private static void Build(string[] args)
97 {
54 - var result = WixRunner.Execute(args)
55 - .AssertSuccess();
98 + var result = WixRunner.Execute(args);
99 + result.AssertSuccess();
100 + }
101 +
102 + private static void BuildX64(string[] args)
103 + {
104 + var newArgs = args.ToList();
105 + newArgs.Add("-platform");
106 + newArgs.Add("x64");
107 +
108 + var result = WixRunner.Execute(newArgs.ToArray());
109 + result.AssertSuccess();
110 + }
111 +
112 + private static void BuildARM64(string[] args)
113 + {
114 + var newArgs = args.ToList();
115 + newArgs.Add("-platform");
116 + newArgs.Add("arm64");
117 +
118 + var result = WixRunner.Execute(newArgs.ToArray());
119 + result.AssertSuccess();
120 }
121 }
122 }
src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.wxs
+1 -1
@@ -1,7 +1,7 @@
1 <?xml version="1.0" encoding="utf-8"?>
2 <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 <Product Id="*" Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a">
4 - <Package InstallerVersion="200" Compressed="no" InstallScope="perMachine" />
4 + <Package InstallerVersion="500" Compressed="no" InstallScope="perMachine" />
5
6 <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
7 <MediaTemplate />
src/wixext/NetFxCompiler.cs
+1 -1
@@ -145,7 +145,7 @@ namespace WixToolset.Netfx
145
146 this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
147
148 - this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "NetFxScheduleNativeImage", this.Context.Platform, CustomActionPlatforms.X86);
148 + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "NetFxScheduleNativeImage", this.Context.Platform, CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64 | CustomActionPlatforms.X64 | CustomActionPlatforms.X86);
149
150 if (!this.Messaging.EncounteredError)
151 {
src/wixlib/NetFxExtension_arm.wxs new
+8
@@ -0,0 +1,8 @@
1 +<?xml version="1.0"?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +
4 +
5 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
6 + <?define platform=arm ?>
7 + <?include NetfxExtension_Platform.wxi ?>
8 +</Wix>
src/wixlib/NetFxExtension_arm64.wxs new
+8
@@ -0,0 +1,8 @@
1 +<?xml version="1.0"?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +
4 +
5 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
6 + <?define platform=arm64 ?>
7 + <?include NetfxExtension_Platform.wxi ?>
8 +</Wix>
src/wixlib/NetFxExtension_x64.wxs new
+8
@@ -0,0 +1,8 @@
1 +<?xml version="1.0"?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +
4 +
5 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
6 + <?define platform=x64 ?>
7 + <?include NetfxExtension_Platform.wxi ?>
8 +</Wix>
src/wixlib/netfx.wixproj
+25 -6
@@ -1,7 +1,7 @@
1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 <Project DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="15.0">
4 - <Import Project="..\..\packages\WixToolset.MSBuild.4.0.0-build-0102\build\WixToolset.MSBuild.props" Condition="Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0102\build\WixToolset.MSBuild.props')" />
4 + <Import Project="..\..\packages\WixToolset.MSBuild.4.0.0-build-0133\build\WixToolset.MSBuild.props" Condition="Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0133\build\WixToolset.MSBuild.props')" />
5 <Import Project="..\FindLocalWix.props" />
6 <PropertyGroup>
7 <ProjectGuid>{45e4a6ac-3190-4e17-83f0-9935ffa5dc2b}</ProjectGuid>
@@ -28,6 +28,9 @@
28 <Compile Include="NetFx471.wxs" />
29 <Compile Include="NetFx472.wxs" />
30 <Compile Include="NetFx48.wxs" />
31 + <Compile Include="NetFxExtension_arm.wxs" />
32 + <Compile Include="NetFxExtension_arm64.wxs" />
33 + <Compile Include="NetFxExtension_x64.wxs" />
34 <Compile Include="NetFxExtension_x86.wxs" />
35 <Compile Include="NetCore3.1.0_x64.wxs" />
36 <Compile Include="NetCore3.1.0_x86.wxs" />
@@ -48,6 +51,22 @@
51 <ProjectReference Include="..\ca\netfxca.vcxproj">
52 <Name>netfxca</Name>
53 <Project>{F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}</Project>
54 + <Properties>Platform=ARM</Properties>
55 + </ProjectReference>
56 + <ProjectReference Include="..\ca\netfxca.vcxproj">
57 + <Name>netfxca</Name>
58 + <Project>{F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}</Project>
59 + <Properties>Platform=ARM64</Properties>
60 + </ProjectReference>
61 + <ProjectReference Include="..\ca\netfxca.vcxproj">
62 + <Name>netfxca</Name>
63 + <Project>{F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}</Project>
64 + <Properties>Platform=x86</Properties>
65 + </ProjectReference>
66 + <ProjectReference Include="..\ca\netfxca.vcxproj">
67 + <Name>netfxca</Name>
68 + <Project>{F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}</Project>
69 + <Properties>Platform=x64</Properties>
70 </ProjectReference>
71 </ItemGroup>
72 <Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' AND Exists('$(WixTargetsPath)') " />
@@ -60,11 +79,11 @@
79 <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
80 </PropertyGroup>
81 <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets'))" />
63 - <Error Condition="!Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0102\build\WixToolset.MSBuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.MSBuild.4.0.0-build-0102\build\WixToolset.MSBuild.props'))" />
64 - <Error Condition="!Exists('..\..\packages\WixToolset.Bal.wixext.4.0.37\build\WixToolset.Bal.wixext.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.Bal.wixext.4.0.37\build\WixToolset.Bal.wixext.targets'))" />
65 - <Error Condition="!Exists('..\..\packages\WixToolset.Util.wixext.4.0.32\build\WixToolset.Util.wixext.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.Util.wixext.4.0.32\build\WixToolset.Util.wixext.targets'))" />
82 + <Error Condition="!Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0133\build\WixToolset.MSBuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.MSBuild.4.0.0-build-0133\build\WixToolset.MSBuild.props'))" />
83 + <Error Condition="!Exists('..\..\packages\WixToolset.Bal.wixext.4.0.40\build\WixToolset.Bal.wixext.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.Bal.wixext.4.0.40\build\WixToolset.Bal.wixext.targets'))" />
84 + <Error Condition="!Exists('..\..\packages\WixToolset.Util.wixext.4.0.36\build\WixToolset.Util.wixext.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.Util.wixext.4.0.36\build\WixToolset.Util.wixext.targets'))" />
85 </Target>
86 <Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" />
68 - <Import Project="..\..\packages\WixToolset.Bal.wixext.4.0.37\build\WixToolset.Bal.wixext.targets" Condition="Exists('..\..\packages\WixToolset.Bal.wixext.4.0.37\build\WixToolset.Bal.wixext.targets')" />
69 - <Import Project="..\..\packages\WixToolset.Util.wixext.4.0.32\build\WixToolset.Util.wixext.targets" Condition="Exists('..\..\packages\WixToolset.Util.wixext.4.0.32\build\WixToolset.Util.wixext.targets')" />
87 + <Import Project="..\..\packages\WixToolset.Bal.wixext.4.0.40\build\WixToolset.Bal.wixext.targets" Condition="Exists('..\..\packages\WixToolset.Bal.wixext.4.0.40\build\WixToolset.Bal.wixext.targets')" />
88 + <Import Project="..\..\packages\WixToolset.Util.wixext.4.0.36\build\WixToolset.Util.wixext.targets" Condition="Exists('..\..\packages\WixToolset.Util.wixext.4.0.36\build\WixToolset.Util.wixext.targets')" />
89 </Project>
\ No newline at end of file
src/wixlib/packages.config
+3 -3
@@ -1,7 +1,7 @@
1 <?xml version="1.0" encoding="utf-8"?>
2 <packages>
3 <package id="Nerdbank.GitVersioning" version="2.1.65" developmentDependency="true" targetFramework="net40" />
4 - <package id="WixToolset.MSBuild" version="4.0.0-build-0102" developmentDependency="true" targetFramework="net40" />
5 - <package id="WixToolset.Bal.wixext" version="4.0.37" targetFramework="net40" />
6 - <package id="WixToolset.Util.wixext" version="4.0.32" targetFramework="net40" />
4 + <package id="WixToolset.MSBuild" version="4.0.0-build-0133" developmentDependency="true" targetFramework="net40" />
5 + <package id="WixToolset.Bal.wixext" version="4.0.40" targetFramework="net40" />
6 + <package id="WixToolset.Util.wixext" version="4.0.36" targetFramework="net40" />
7 </packages>
\ No newline at end of file