summaryrefslogtreecommitdiff
path: root/src/mongo/installer/msi/wxs/LicensingFragment.wxs
blob: 2ff91b3fe57765376df5477011ffd01c65f6e31b (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
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Fragment>

    <DirectoryRef Id="INSTALLLOCATION">
      <?if $(var.Edition) = Enterprise ?>
        <Component Id="c_License" Guid="C0EF85E2-95F8-468B-BA95-2F739C63D2D7">
          <File Id="f_License" Name="LICENSE-Enterprise.txt" Source="$(var.EnterpriseBase)\distsrc\LICENSE-Enterprise.txt"
                DiskId ="1" KeyPath="yes" />
        </Component>
        <Component Id="c_Thirdparty" Guid="C45662A7-5C18-4A53-8D14-7C92DB38F13E">
          <File Id="f_Thirdparty" Name="THIRD-PARTY-NOTICES" Source="$(var.LicenseSource)\THIRD-PARTY-NOTICES"
                DiskId ="1" KeyPath="yes" />
        </Component>
        <Component Id="c_ThirdpartyEnterprise" Guid="4D53FF2F-DB47-41F3-8C5C-4C397736724E">
          <File Id="f_ThirdpartyEnterprise" Name="THIRD-PARTY-NOTICES.windows" Source="$(var.EnterpriseBase)\distsrc\THIRD-PARTY-NOTICES.windows"
                DiskId ="1" KeyPath="yes" />
        </Component>

      <?else?>
        <Component Id="c_License" Guid="D512B995-0FDB-4734-B8F4-6C67D6DE1069">
          <File Id="f_LicenseCommunity" Name="LICENSE-Community.txt" Source="$(var.LicenseSource)\LICENSE-Community.txt"
                DiskId ="1" KeyPath="yes" />
        </Component>
        <Component Id="c_Thirdparty" Guid="D6098364-6DE8-48EA-A955-7D1060752132">
          <File Id="f_Thirdparty" Name="THIRD-PARTY-NOTICES" Source="$(var.LicenseSource)\THIRD-PARTY-NOTICES"
                DiskId ="1" KeyPath="yes" />
        </Component>
      <?endif?>

      <Component Id="c_Readme" Guid="12C17EA1-075C-4A1D-9554-F3B5A2A94874">
        <File Id="f_Readme" Name="README" Source="$(var.LicenseSource)\README"
              DiskId ="1" />
      </Component>
      <Component Id="c_MPL2" Guid="326EAE1B-6AF2-45D2-90FC-8660C50C7271">
        <File Id="f_MPL2" Name="MPL-2" Source="$(var.LicenseSource)\MPL-2"
              DiskId ="1" />
      </Component>
      <Component Id="c_InstallKey" Guid="31635E6D-CCE1-43AD-8AB3-4F5607D75755">
        <RegistryKey Root="HKLM"
                     Key="Software\MongoDB\Server\$(var.MongoDBMajorVersion)">
          <RegistryValue Type="string" Name="Edition" Value="!(wix.ProductMajorName)" KeyPath="yes"/>
        </RegistryKey>
      </Component>
    </DirectoryRef>

    <ComponentGroup Id="cg_License">
      <ComponentRef Id="c_Readme"/>
      <ComponentRef Id="c_Thirdparty"/>
      <?if $(var.Edition) = Enterprise ?>
      <ComponentRef Id="c_ThirdpartyEnterprise"/>
      <?endif?>
      <ComponentRef Id="c_License"/>
      <ComponentRef Id="c_InstallKey"/>
      <ComponentRef Id="c_MPL2"/>
    </ComponentGroup>

    <?if $(var.Edition) = Enterprise ?>
    <WixVariable Id="WixUILicenseRtf" Value="$(var.EnterpriseBase)\distsrc\LICENSE-Enterprise.rtf" />
    <?else ?>
    <WixVariable Id="WixUILicenseRtf" Value="$(var.ProjectDir)LICENSE-Community.rtf" />
    <?endif ?>

  </Fragment>
</Wix>