summaryrefslogtreecommitdiff
path: root/src/mongo/installer/msi
diff options
context:
space:
mode:
authorErnie Hershey <ernie.hershey@10gen.com>2013-12-08 09:54:28 -0500
committerErnie Hershey <ernie.hershey@10gen.com>2014-02-12 18:25:33 -0500
commitea4ba610f072cbcdecd3fda4e5fb8b5c1833476c (patch)
tree395966e31f586ffc2bcc2be35cf20a225fca6487 /src/mongo/installer/msi
parenteb770cae186051282309ca4582b4a255d4b8cfeb (diff)
downloadmongo-ea4ba610f072cbcdecd3fda4e5fb8b5c1833476c.tar.gz
SERVER-11106 Detect non-enterprise MSI configurations
Diffstat (limited to 'src/mongo/installer/msi')
-rw-r--r--src/mongo/installer/msi/SConscript50
-rw-r--r--src/mongo/installer/msi/wxs/Installer.wxs8
-rw-r--r--src/mongo/installer/msi/wxs/LicensingFragment.wxs4
3 files changed, 48 insertions, 14 deletions
diff --git a/src/mongo/installer/msi/SConscript b/src/mongo/installer/msi/SConscript
index 3eac6faa899..e0b1d70770b 100644
--- a/src/mongo/installer/msi/SConscript
+++ b/src/mongo/installer/msi/SConscript
@@ -19,18 +19,52 @@ env['MERGEMODULESBASEPATH'] = os.environ.get('MERGEMODULESBASEPATH')
sources = [ "wxs/BinaryFragment.wxs",
"wxs/FeatureFragment.wxs",
- "wxs/LicensingFragment.wxs",
- "wxs/Installer_64.wxs"
+ "wxs/LicensingFragment.wxs"
]
objects = [ "$BUILD_DIR/msi/BinaryFragment.wixobj",
"$BUILD_DIR/msi/FeatureFragment.wixobj",
"$BUILD_DIR/msi/LicensingFragment.wixobj",
- "$BUILD_DIR/msi/Installer_64.wixobj"
]
# Need to do this in order to get scons to translate path separators into native format
buildDir = Dir(env["BUILD_DIR"]).path
+enterprisebase = 'src\mongo\db\modules\enterprise'
+
+# Set up parameters to pass to wix -
+#
+# msi_edition - "Enterprise" or "Standard"
+# msi_platform - "x64" or "x86"
+# msi_flavor - "2008R2Plus" or ""
+#
+
+
+
+# Enterprise
+if 'enterprise' in env['MONGO_MODULES']:
+ msi_edition = 'Enterprise'
+ msi_flavor = '2008R2Plus'
+ msi_platform = 'x64'
+# Community
+else:
+ msi_edition = 'Standard'
+ if env['PROCESSOR_ARCHITECTURE'] == 'i386':
+ msi_platform = 'x86'
+ msi_flavor = ''
+ else:
+ msi_platform = 'x64'
+ if env.get('WIN_VERSION_MIN') == 'ws08r2':
+ msi_flavor = '2008R2Plus'
+ else:
+ msi_flavor = 'Legacy'
+
+if msi_platform == 'x64':
+ sources.append("wxs/Installer_64.wxs")
+ objects.append("$BUILD_DIR/msi/Installer_64.wixobj")
+else:
+ sources.append("wxs/Installer.wxs")
+ objects.append("$BUILD_DIR/msi/Installer.wixobj")
+
# candle: compile .wxs files into .wixobjs
env.Command(objects,
sources,
@@ -39,18 +73,18 @@ env.Command(objects,
# we should choose a fourth version number that reflects pre-ness.
' -dMongoDBVersion=' + mongoCodeVersion.partition('-')[0] +
' -dLicenseSource=distsrc'
- r' -dEnterpriseBase=src\mongo\db\modules\enterprise\\'
+ r' -dEnterpriseBase=' + enterprisebase + '\\'
' -dBinarySource=' + buildDir + r'\mongo'
' -dMergeModulesBasePath="$MERGEMODULESBASEPATH"'
- ' -dEdition=Enterprise'
+ ' -dEdition=' + msi_edition +
' -d"ProductId=*\"'
' -dUpgradeCode=FCF901F6-E963-40B1-9A17-978242068587'
' -dClientSource=' + buildDir + r'\client_build'
r' -dClientHeaderSource=${INSTALL_DIR}\include\mongo'
' -dConfiguration=Release'
' -dOutDir=' + buildDir + r'\msi'
- ' -dPlatform=x64'
- ' -dFlavor=2008R2Plus'
+ ' -dPlatform=' + msi_platform +
+ ' -dFlavor=' + msi_flavor +
r' -dProjectDir=buildscripts\packaging\msi\\'
' -dProjectName=MongoDB'
' -dTargetDir=' + buildDir + r'\msi'
@@ -60,7 +94,7 @@ env.Command(objects,
r' -dSnmpSource=c:\snmp\bin'
r' -dSslSource=c:\openssl\bin'
' -out ' + buildDir + r'\msi\\'
- ' -arch x64'
+ ' -arch ' + msi_platform +
' -ext "$WIXUIEXT"'
' $SOURCES')
diff --git a/src/mongo/installer/msi/wxs/Installer.wxs b/src/mongo/installer/msi/wxs/Installer.wxs
index d550e8875e5..969f0df4364 100644
--- a/src/mongo/installer/msi/wxs/Installer.wxs
+++ b/src/mongo/installer/msi/wxs/Installer.wxs
@@ -20,10 +20,10 @@
</Directory>
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
- <WixVariable Id="WixUIDialogBmp" Value="Dialog.bmp" />
- <WixVariable Id="WixUIBannerBmp" Value="Banner.bmp" />
- <WixVariable Id="WixUIInfoIco" Value="Installer_Icon_32x32.ico" />
- <WixVariable Id="WixUIExclamationIco" Value="Installer_Icon_32x32.ico" />
+ <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" />
diff --git a/src/mongo/installer/msi/wxs/LicensingFragment.wxs b/src/mongo/installer/msi/wxs/LicensingFragment.wxs
index 53ab077c839..c45c544c11f 100644
--- a/src/mongo/installer/msi/wxs/LicensingFragment.wxs
+++ b/src/mongo/installer/msi/wxs/LicensingFragment.wxs
@@ -37,8 +37,8 @@
<?if $(var.Edition) = Enterprise ?>
<WixVariable Id="WixUILicenseRtf" Value="$(var.EnterpriseBase)\distsrc\LICENSE.rtf" />
<?else ?>
- <WixVariable Id="WixUILicenseRtf" Value=".\GNU-AGPL-3.0.rtf" />
+ <WixVariable Id="WixUILicenseRtf" Value="$(var.ProjectDir)GNU-AGPL-3.0.rtf" />
<?endif ?>
</Fragment>
-</Wix> \ No newline at end of file
+</Wix>