diff options
author | Mathew Robinson <chasinglogic@gmail.com> | 2017-09-01 18:01:34 -0400 |
---|---|---|
committer | Mathew Robinson <mathew.robinson@10gen.com> | 2017-09-13 14:07:46 -0400 |
commit | 5e0d37c421c9c044365c264b602227a6de4ee64d (patch) | |
tree | 0c5253810fd01800d8420e9a7e6d2b34b0adede1 /src/mongo/installer/msi/wxs/Installer_64.wxs | |
parent | fa2f40a44ea649b801bfa3ba2bbeb0d36020629c (diff) | |
download | mongo-5e0d37c421c9c044365c264b602227a6de4ee64d.tar.gz |
SERVER-30995 Add Compass Installer to MongoDB packagingcompass-installer
Diffstat (limited to 'src/mongo/installer/msi/wxs/Installer_64.wxs')
-rw-r--r-- | src/mongo/installer/msi/wxs/Installer_64.wxs | 194 |
1 files changed, 117 insertions, 77 deletions
diff --git a/src/mongo/installer/msi/wxs/Installer_64.wxs b/src/mongo/installer/msi/wxs/Installer_64.wxs index 83426028ad6..4699d42c78d 100644 --- a/src/mongo/installer/msi/wxs/Installer_64.wxs +++ b/src/mongo/installer/msi/wxs/Installer_64.wxs @@ -1,77 +1,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> - - </Product> -</Wix> +<?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>
|