Skip to content

[WIP] WiX v5 for Microsoft.DotNet.Build.Tasks.Installers #15933

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project>

<Import Project="$(MSBuildThisFileDirectory)wix/wix.targets" />
<Import Project="$(MSBuildThisFileDirectory)wix/wix.targets" Condition="'$(UseWix5)' == ''" />
<Import Project="$(MSBuildThisFileDirectory)wix5/wix.targets" Condition="'$(UseWix5)' != ''" />

<PropertyGroup>
<_CreateRpmTargets Condition="'$(UseArcadeRpmTooling)' != 'true'">FindFPM;CreateRpmUsingFpm</_CreateRpmTargets>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
xmlns:swid="http://schemas.microsoft.com/wix/TagExtension"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">

<?include "..\variables.wxi" ?>

<Bundle
Name="$(var.ProductName)"
Manufacturer="$(var.Manufacturer)"
Version="$(var.DisplayVersion)"
UpgradeCode="$(var.UpgradeCode)"
AboutUrl="https://dot.net/core"
Compressed="yes">

<bal:Condition Message="#(loc.FailureNotSupportedCurrentOperatingSystem)">
((VersionNT &gt; v6.1) OR (VersionNT = v6.1 AND ServicePackLevel &gt;= 1))
</bal:Condition>

<?if $(var.Platform)=x64 or $(var.Platform)=arm64?>
<bal:Condition Message="#(loc.FailureNotSupportedX86OperatingSystem)">
VersionNT64
</bal:Condition>
<?endif?>

<!-- Search references for upgrade policy keys -->
<util:RegistrySearchRef Id="RemovePreviousVersionRegistryKeySearch"/>
<util:RegistrySearchRef Id="RemoveSpecificPreviousVersionRegistryKeyExistsSearch"/>
<util:RegistrySearchRef Id="RemoveSpecificPreviousVersionRegistryKeySearch"/>

<!--
List of bundles that this bundle is an upgrade for. Used to support upgrade from bundles
that were produced before UpdateCode was standardized per major-minor channel.
-->
<?ifdef RelatedDotNetBundleIds?>
<?foreach relatedId in $(var.RelatedDotNetBundleIds)?>
<RelatedBundle Action="Upgrade" Id="$(var.relatedId)"/>
<?endforeach?>
<?endif?>

<?if $(var.BootstrapperApplicationFlavor) = "Foundation" ?>
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.Foundation">
<bal:WixStandardBootstrapperApplication
LicenseFile="$(var.DotNetDummyEulaFile)"
SuppressDowngradeFailure="yes"
ShowFilesInUse="yes"
ShowVersion="yes" />

<PayloadGroupRef Id="DotnetCoreBAPayloads" />
</BootstrapperApplicationRef>
<?elseif $(var.BootstrapperApplicationFlavor) = "HyperlinkLicense" ?>
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
<bal:WixStandardBootstrapperApplication LicenseUrl="https://go.microsoft.com/fwlink/?LinkId=329770"
LogoFile="$(var.DotNetLogoBmpFile)"
SuppressDowngradeFailure="yes"
SuppressOptionsUI="yes" />
<PayloadGroupRef Id="DotnetCoreBAPayloads"/>
</BootstrapperApplicationRef>
<?endif?>

<swid:Tag Regid="microsoft.com" InstallPath="[$(var.Program_Files)]dotnet" />

<!-- Variables used solely for localization. -->
<Variable Name="BUNDLEMONIKER" Type="string" Value="$(var.ProductMoniker) ($(var.TargetArchitectureDescription))" bal:Overridable="no" />
<Variable Name="PRODUCT_NAME" Type="string" Value="$(var.ProductName)" bal:Overridable="no" />
<Variable Name="LINK_PREREQ_PAGE" Type="string" Value="https://go.microsoft.com/fwlink/?linkid=846817" bal:Overridable="no" />

<?ifdef WixThemeFile ?>
<?include $(var.WixThemeFile) ?>
<?endif?>

<Chain DisableSystemRestore="yes" ParallelCache="yes">
<?foreach chainedFile in $(var.ChainedDotNetPackageFiles)?>
<MsiPackage SourceFile="$(var.chainedFile)" />
<?endforeach?>
</Chain>
</Bundle>

<Fragment>
<PayloadGroup Id="DotnetCoreBAPayloads">
<!-- Default/Neutral localized content is US English -->
<Payload Name="thm.xml" Compressed="yes" SourceFile="$(var.BundleThmDir)\bundle.thm" />
<Payload Name="thm.wxl" Compressed="yes" SourceFile="$(var.BundleThmDir)\theme\1033\bundle.wxl" />

<Payload Name="bg.png" Compressed="yes" SourceFile="$(var.DotNetBackgroundPngFile)" />

<?foreach LCID in $(var.LcidList)?>
<Payload Id="thm-$(var.LCID)" Compressed="yes" Name="$(var.LCID)\thm.wxl" SourceFile="$(var.BundleThmDir)\theme\$(var.LCID)\bundle.wxl" />
<?endforeach?>

<?if $(var.BootstrapperApplicationFlavor) = "Foundation" ?>
<Payload Name='eula.rtf' Compressed='yes' SourceFile='!(wix.WixStdbaLicenseRtf)' />
<?endif?>
</PayloadGroup>

<CustomTable Id='WixStdbaInformation'>
<Row>
<Data Column='LicenseFile'>eula.rtf</Data>
</Row>
</CustomTable>
</Fragment>

</Wix>
Loading
Loading