Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Wix.targets « Windows « Installers « src - github.com/dotnet/aspnetcore.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f7323ee110647ff9e57068b02e2d300e61e13f9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<Project>
  <!-- Set versioning properties after Arcade SDK targets have been imported. -->
  <PropertyGroup>
    <!-- Used for generating stable upgrade codes for bundles -->
    <Version>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion).0</Version>
    <!-- Actual upgrade code used in bundles to ensure upgrades withing a version band, e.g. 3.0.0.xxx -->
    <_FileRevisionVersion>$(VersionSuffixDateStamp)</_FileRevisionVersion>
    <_FileRevisionVersion Condition=" '$(_FileRevisionVersion)' == '' ">42424</_FileRevisionVersion>
    <BundleVersion>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion).$(_FileRevisionVersion)</BundleVersion>

    <DefineConstants>$(DefineConstants);MajorVersion=$(AspNetCoreMajorVersion)</DefineConstants>
    <DefineConstants>$(DefineConstants);MinorVersion=$(AspNetCoreMinorVersion)</DefineConstants>
    <DefineConstants>$(DefineConstants);Version=$(Version)</DefineConstants>
    <DefineConstants>$(DefineConstants);PackageVersion=$(PackageVersion)</DefineConstants>
  </PropertyGroup>

  <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);$(VersionSuffix)</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="_CheckPackageFileNameIsSet" BeforeTargets="PrepareForBuild">
    <Error Text="Missing required property: PackageFileName" Condition="'$(PackageFileName)' == ''" />
  </Target>

  <Target Name="CopyToArtifactsDirectory"
          Condition=" '$(IsShipping)' == 'true' "
          AfterTargets="Build">
    <Copy SourceFiles="$(TargetPath)" DestinationFiles="$(InstallersOutputPath)$(PackageFileName)" />
    <ItemGroup>
      <_cabs Include="$(TargetDir)**/*.cab" />
    </ItemGroup>
    <Copy SourceFiles="@(_cabs)" DestinationFolder="$(InstallersOutputPath)" />
  </Target>

</Project>