summaryrefslogtreecommitdiff
path: root/src/mongo/installer/msi/wxs/LicensingFragment.wxs
blob: ab3ca60414d19e96385f51e325cc11492e8887e1 (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
<?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.txt" Source="$(var.EnterpriseBase)\distsrc\LICENSE.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.EnterpriseBase)\distsrc\THIRD-PARTY-NOTICES.windows"
              DiskId ="1" KeyPath="yes" />
      </Component>
      <?else?>
      <Component Id="c_License" Guid="54C0700D-A294-4F40-A396-04CC606A7299">
        <File Id="f_GnuLicense" Name="GNU-AGPL-3.0" Source="$(var.LicenseSource)\GNU-AGPL-3.0"
              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" />
      </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"/>
      <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.rtf" />
    <?else ?>
    <WixVariable Id="WixUILicenseRtf" Value="$(var.ProjectDir)GNU-AGPL-3.0.rtf" />
    <?endif ?>

  </Fragment>
</Wix>