From 4029dacd2053cc35bdbce158fb9b2c4c832ebb78 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 20 May 2020 22:33:48 +1000 Subject: Update .NET Core packages so they don't conflict. Make it easier to add new ones. Add AsPrereq package group for DotNetCoreRuntime packages. --- .../WixToolsetTest.Netfx/NetfxExtensionFixture.cs | 26 +++++ .../TestData/UsingDotNetCorePackages/Bundle.wxs | 20 ++++ .../WixToolsetTest.Netfx.csproj | 6 + src/wixlib/NetCore3.1.1.wxs | 90 ++++++++------- src/wixlib/NetCore3.1.2.wxs | 90 ++++++++------- src/wixlib/NetCore3.1.3.wxs | 127 ++++++++++++--------- src/wixlib/NetCore3.1.wxs | 70 +++++++----- src/wixlib/NetCore3_Platform.wxi | 79 +++++++++++++ src/wixlib/NetCoreShared.wxs | 20 ++++ src/wixlib/netfx.wixproj | 1 + 10 files changed, 367 insertions(+), 162 deletions(-) create mode 100644 src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle.wxs create mode 100644 src/wixlib/NetCore3_Platform.wxi create mode 100644 src/wixlib/NetCoreShared.wxs (limited to 'src') diff --git a/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs b/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs index 38724481..15c31088 100644 --- a/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs +++ b/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs @@ -2,6 +2,7 @@ namespace WixToolsetTest.Netfx { + using System.IO; using System.Linq; using WixBuildTools.TestSupport; using WixToolset.Core.TestPackage; @@ -10,6 +11,31 @@ namespace WixToolsetTest.Netfx public class NetfxExtensionFixture { + [Fact] + public void CanBuildUsingDotNetCorePackages() + { + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); + var bundleSourceFolder = TestData.Get(@"TestData\UsingDotNetCorePackages"); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + + var compileResult = WixRunner.Execute(new[] + { + "build", + Path.Combine(bundleSourceFolder, "Bundle.wxs"), + "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), + "-ext", TestData.Get(@"WixToolset.Netfx.wixext.dll"), + "-intermediateFolder", intermediateFolder, + "-o", bundleFile, + }); + compileResult.AssertSuccess(); + + Assert.True(File.Exists(bundleFile)); + } + } + [Fact] public void CanBuildUsingNativeImage() { diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle.wxs b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle.wxs new file mode 100644 index 00000000..7c008171 --- /dev/null +++ b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle.wxs @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj index 88303fcd..cf7afa8b 100644 --- a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj +++ b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj @@ -12,17 +12,23 @@ + + + + + + diff --git a/src/wixlib/NetCore3.1.1.wxs b/src/wixlib/NetCore3.1.1.wxs index 109d4f6b..50e4eae2 100644 --- a/src/wixlib/NetCore3.1.1.wxs +++ b/src/wixlib/NetCore3.1.1.wxs @@ -1,30 +1,41 @@ - + + + + + + + + + + - - + - - + + + + - + - + Name="!(wix.AspNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)PackageDirectory)aspnetcore-runtime-$(var.NetCoreVersion)-win-$(var.NetCorePlatform).exe" + InstallCommand="$(var.AspNetCoreRedistInstallCommand)" + RepairCommand="!(wix.AspNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)RepairCommand)" + UninstallCommand="$(var.AspNetCoreRedistUninstallCommand)" + PerMachine="yes" + DetectCondition="!(wix.AspNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)DetectCondition)" + InstallCondition="!(wix.AspNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)InstallCondition)" + Id="$(var.AspNetCoreRedistId)" + Vital="yes" + Permanent="yes" + Protocol="burn" + DownloadUrl="$(var.AspNetCoreRedistLink)" + LogPathVariable="$(var.AspNetCoreRedistLog)" + Compressed="no"> - - + - - + + + + - + - + Name="!(wix.DesktopNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)PackageDirectory)windowsdesktop-runtime-$(var.NetCoreVersion)-win-$(var.NetCorePlatform).exe" + InstallCommand="$(var.DesktopNetCoreRedistInstallCommand)" + RepairCommand="!(wix.DesktopNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)RepairCommand)" + UninstallCommand="$(var.DesktopNetCoreRedistUninstallCommand)" + PerMachine="yes" + DetectCondition="!(wix.DesktopNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)DetectCondition)" + InstallCondition="!(wix.DesktopNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)InstallCondition)" + Id="$(var.DesktopNetCoreRedistId)" + Vital="yes" + Permanent="yes" + Protocol="burn" + DownloadUrl="$(var.DesktopNetCoreRedistLink)" + LogPathVariable="$(var.DesktopNetCoreRedistLog)" + Compressed="no"> - + + + + + + + + + + - - + - - + + + + - + - + Name="!(wix.AspNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)PackageDirectory)aspnetcore-runtime-$(var.NetCoreVersion)-win-$(var.NetCorePlatform).exe" + InstallCommand="$(var.AspNetCoreRedistInstallCommand)" + RepairCommand="!(wix.AspNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)RepairCommand)" + UninstallCommand="$(var.AspNetCoreRedistUninstallCommand)" + PerMachine="yes" + DetectCondition="!(wix.AspNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)DetectCondition)" + InstallCondition="!(wix.AspNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)InstallCondition)" + Id="$(var.AspNetCoreRedistId)" + Vital="yes" + Permanent="yes" + Protocol="burn" + DownloadUrl="$(var.AspNetCoreRedistLink)" + LogPathVariable="$(var.AspNetCoreRedistLog)" + Compressed="no"> - - + - - + + + + - + - + Name="!(wix.DesktopNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)PackageDirectory)windowsdesktop-runtime-$(var.NetCoreVersion)-win-$(var.NetCorePlatform).exe" + InstallCommand="$(var.DesktopNetCoreRedistInstallCommand)" + RepairCommand="!(wix.DesktopNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)RepairCommand)" + UninstallCommand="$(var.DesktopNetCoreRedistUninstallCommand)" + PerMachine="yes" + DetectCondition="!(wix.DesktopNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)DetectCondition)" + InstallCondition="!(wix.DesktopNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)InstallCondition)" + Id="$(var.DesktopNetCoreRedistId)" + Vital="yes" + Permanent="yes" + Protocol="burn" + DownloadUrl="$(var.DesktopNetCoreRedistLink)" + LogPathVariable="$(var.DesktopNetCoreRedistLog)" + Compressed="no"> - + + + + + + + + + + + - - + - - + + + + - + + Name="!(wix.DotNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)PackageDirectory)dotnet-runtime-$(var.NetCoreVersion)-win-$(var.NetCorePlatform).exe" + InstallCommand="$(var.DotNetCoreRedistInstallCommand)" + RepairCommand="!(wix.DotNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)RepairCommand)" + UninstallCommand="$(var.DotNetCoreRedistUninstallCommand)" + PerMachine="yes" + DetectCondition="!(wix.DotNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)DetectCondition)" + InstallCondition="!(wix.DotNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)InstallCondition)" + Id="$(var.DotNetCoreRedistId)" + Vital="yes" + Permanent="yes" + Protocol="burn" + DownloadUrl="$(var.DotNetCoreRedistLink)" + LogPathVariable="$(var.DotNetCoreRedistLog)" + Compressed="no"> - - + - - + + + + - + + Name="!(wix.AspNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)PackageDirectory)aspnetcore-runtime-$(var.NetCoreVersion)-win-$(var.NetCorePlatform).exe" + InstallCommand="$(var.AspNetCoreRedistInstallCommand)" + RepairCommand="!(wix.AspNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)RepairCommand)" + UninstallCommand="$(var.AspNetCoreRedistUninstallCommand)" + PerMachine="yes" + DetectCondition="!(wix.AspNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)DetectCondition)" + InstallCondition="!(wix.AspNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)InstallCondition)" + Id="$(var.AspNetCoreRedistId)" + Vital="yes" + Permanent="yes" + Protocol="burn" + DownloadUrl="$(var.AspNetCoreRedistLink)" + LogPathVariable="$(var.AspNetCoreRedistLog)" + Compressed="no"> - - + - - + + + + - + + Name="!(wix.DesktopNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)PackageDirectory)windowsdesktop-runtime-$(var.NetCoreVersion)-win-$(var.NetCorePlatform).exe" + InstallCommand="$(var.DesktopNetCoreRedistInstallCommand)" + RepairCommand="!(wix.DesktopNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)RepairCommand)" + UninstallCommand="$(var.DesktopNetCoreRedistUninstallCommand)" + PerMachine="yes" + DetectCondition="!(wix.DesktopNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)DetectCondition)" + InstallCondition="!(wix.DesktopNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)InstallCondition)" + Id="$(var.DesktopNetCoreRedistId)" + Vital="yes" + Permanent="yes" + Protocol="burn" + DownloadUrl="$(var.DesktopNetCoreRedistLink)" + LogPathVariable="$(var.DesktopNetCoreRedistLog)" + Compressed="no"> - + + + + + + + + + + - - + - - + + + + - + - - - + - - + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetCoreShared.wxs b/src/wixlib/NetCoreShared.wxs new file mode 100644 index 00000000..18f9e5a4 --- /dev/null +++ b/src/wixlib/NetCoreShared.wxs @@ -0,0 +1,20 @@ + + + + + + + + + + + + diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index a9df9790..78ca93f7 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -31,6 +31,7 @@ + -- cgit v1.2.3-55-g6feb