aspnetcore/src/Installers/Windows/Wix.targets

54 lines
2.7 KiB
XML

<Project>
<PropertyGroup Condition="'$(OutputType)' == 'package'">
<InstallDir>$(ProductName)</InstallDir>
<DepProviderKey>Microsoft.$(ProductNameShort)_$(Platform)_$(Lang),v$(PackageVersion)</DepProviderKey>
<DefineConstants>$(DefineConstants);DepProviderKey=$(DepProviderKey)</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<GuidInputs>$(Version);$(Platform)</GuidInputs>
<GuidInputs Condition="'$(IsFinalBuild)' != 'true'">$(GuidInputs);$(BuildNumberSuffix)</GuidInputs>
</PropertyGroup>
<Target Name="GenerateGUIDs" BeforeTargets="BeforeBuild" DependsOnTargets="_GeneratePackageGuids;_GenerateBundleGuids" Condition=" '$(DisableGuidGeneration)' != 'true' " />
<Target Name="_GeneratePackageGuids" Condition="'$(OutputType)' == 'package'">
<GenerateGuid NamespaceGuid="$(NamespaceGuid)" Values="$(ProductNameShort);$(GuidInputs)">
<Output TaskParameter="Guid" PropertyName="ProductCode" />
</GenerateGuid>
<GenerateGuid NamespaceGuid="$(NamespaceGuid)" Values="$(ProductNameShort);$(GuidInputs);$(OutputType)">
<Output TaskParameter="Guid" PropertyName="UpgradeCode" />
</GenerateGuid>
<PropertyGroup>
<DefineConstants>$(DefineConstants);ProductCode=$(ProductCode);UpgradeCode=$(UpgradeCode)</DefineConstants>
</PropertyGroup>
</Target>
<Target Name="_GenerateBundleGuids" Condition="'$(OutputType)' == 'bundle'">
<!-- Don't need to use the name of the bundle since we have separate namespace GUIDs. The name will also changes based on the milestone and destabalize
the upgrade code. Bundle upgrades pivot on Major.Minor.Patch changes. For example, 3.0.1-preview 1 can upgrade to 3.0.1-preview 8, but 3.0.1
cannot upgrade to 3.0.2 or 3.1. -->
<PropertyGroup>
<BundleGuidInputs>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion);$(Platform)</BundleGuidInputs>
</PropertyGroup>
<GenerateGuid NamespaceGuid="$(NamespaceGuid)" Values="$(BundleGuidInputs)">
<Output TaskParameter="Guid" PropertyName="BundleProviderKey" />
</GenerateGuid>
<GenerateGuid NamespaceGuid="$(NamespaceGuid)" Values="$(BundleGuidInputs)">
<Output TaskParameter="Guid" PropertyName="BundleUpgradeCode" />
</GenerateGuid>
<PropertyGroup>
<DefineConstants>$(DefineConstants);BundleVersion=$(BundleVersion);BundleProviderKey=$(BundleProviderKey);BundleUpgradeCode=$(BundleUpgradeCode)</DefineConstants>
</PropertyGroup>
</Target>
<Target Name="CopyToArtifactsDirectory"
Condition=" '$(IsProductInstaller)' == 'true' "
AfterTargets="Build">
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(InstallersOutputPath)" />
</Target>
</Project>