blob: 4699d42c78d44dacc0871f37d4fa01eecd928d39 (
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="$(var.ProductId)"
Name="!(wix.ProductName)"
Language="1033"
Version="$(var.MongoDBVersion)"
Manufacturer="MongoDB"
UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="405" Compressed="yes" Platform="x64"/>
<WixVariable Id="InstallFolder" Value="$(var.MongoDBMajorVersion)"/>
<?if $(var.Edition) = Enterprise ?>
<WixVariable Id="ProductName" Value="MongoDB $(var.MongoDBVersion) $(var.Flavor) Enterprise (64 bit)" />
<WixVariable Id="ProductMajorName" Value="MongoDB $(var.MongoDBMajorVersion) $(var.Flavor) Enterprise (64 bit)" />
<?elseif $(var.Edition) = SSL ?>
<WixVariable Id="ProductName" Value="MongoDB $(var.MongoDBVersion) $(var.Flavor) SSL (64 bit)" />
<WixVariable Id="ProductMajorName" Value="MongoDB $(var.MongoDBMajorVersion) $(var.Flavor) SSL (64 bit)" />
<?else?>
<WixVariable Id="ProductName" Value="MongoDB $(var.MongoDBVersion) $(var.Flavor) (64 bit)" />
<WixVariable Id="ProductMajorName" Value="MongoDB $(var.MongoDBMajorVersion) $(var.Flavor) (64 bit)" />
<?endif?>
<MajorUpgrade
DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit."/>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFiles64Folder">
<Directory Id="MongoDB" Name="MongoDB">
<Directory Id="Server" Name="Server">
<Directory Id="INSTALLLOCATION" Name="!(wix.InstallFolder)">
<Directory Id="BIN" Name="bin" />
<Directory Id="SNMP" Name="snmp" />
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<WixVariable Id="WixUIDialogBmp" Value="$(var.ProjectDir)Dialog.bmp" />
<WixVariable Id="WixUIBannerBmp" Value="$(var.ProjectDir)Banner.bmp" />
<WixVariable Id="WixUIInfoIco" Value="$(var.ProjectDir)Installer_Icon_32x32.ico" />
<WixVariable Id="WixUIExclamationIco" Value="$(var.ProjectDir)Installer_Icon_32x32.ico" />
<!--
<WixVariable Id="WixUINewIco" Value="Installer_Icon_16x16.ico" />
<WixVariable Id="WixUIUpIco" Value="Installer_Icon_16x16.ico" />
More information can be found at http://wix.tramontana.co.hu/tutorial/user-interface/ui-wizardry
-->
<Property Id="ARPPRODUCTICON" Value="MongoDBIcon" />
<Property Id="ARPHELPLINK" Value="http://www.mongodb.org/" />
<Property Id="ARPURLINFOABOUT" Value="http://www.mongodb.org/" />
<Icon Id="MongoDBIcon" SourceFile="$(var.ProjectDir)Installer_Icon_32x32.ico" />
<FeatureGroupRef Id="fg_MongoDBAll" />
<UIRef Id="MongoWixUI" />
<UIRef Id="WixUI_ErrorProgressText" />
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />
<Property Id="MONGO_MULTIPLE_SKU" >
<RegistrySearch Id="Mongo_Multiple_Sku"
Root="HKLM"
Key="Software\MongoDB\Server\$(var.MongoDBMajorVersion)"
Name="Edition"
Type="raw" />
</Property>
<Condition Message="You cannot install multiple editions for the same version of MongoDB. Already installed product '[MONGO_MULTIPLE_SKU]' conflicts with this product.">
Installed OR (NOT MONGO_MULTIPLE_SKU OR MONGO_MULTIPLE_SKU = "!(wix.ProductMajorName)")
</Condition>
<Property Id="SHOULD_INSTALL_COMPASS" Secure="yes" Value="1" />
<Property Id="POWERSHELLEXE">
<RegistrySearch
Id="POWERSHELLEXE"
Type="raw"
Root="HKLM"
Key="SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell"
Name="Path" />
</Property>
<SetProperty
Id="InstallCompassScript"
Before="InstallCompassScript"
Sequence="execute"
Value =""[POWERSHELLEXE]" -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command "& '[#InstallCompassScript]' ; exit $$($Error.Count)"" />
<CustomAction
Id="InstallCompassScript"
BinaryKey="WixCA"
DllEntry="WixQuietExec64"
Execute="deferred"
Return="check"
Impersonate="yes" />
<DirectoryRef Id="BIN">
<Component Id="InstallCompass" Guid="*">
<File Id="InstallCompassScript" Name="InstallCompass.ps1" Source="$(var.BinarySource)\InstallCompass.ps1" />
</Component>
</DirectoryRef>
<Feature Id="InstallCompassFeature">
<ComponentRef Id="InstallCompass" />
</Feature>
<InstallExecuteSequence>
<Custom Action='InstallCompassScript' After='InstallFiles'>
(NOT Installed) AND (SHOULD_INSTALL_COMPASS = 1)
</Custom>
</InstallExecuteSequence>
</Product>
</Wix>
|