0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 17:10:48 +01:00

SERVER-11106 Detect non-enterprise MSI configurations

This commit is contained in:
Ernie Hershey 2013-12-08 09:54:28 -05:00
parent eb770cae18
commit ea4ba610f0
4 changed files with 49 additions and 14 deletions

View File

@ -1074,6 +1074,7 @@ def doConfigure(myenv):
win_version_min = default_32_bit_min
conf.Finish();
env['WIN_VERSION_MIN'] = win_version_min
win_version_min = win_version_min_choices[win_version_min]
env.Append( CPPDEFINES=[("_WIN32_WINNT", "0x" + win_version_min[0])] )
env.Append( CPPDEFINES=[("NTDDI_VERSION", "0x" + win_version_min[0] + win_version_min[1])] )

View File

@ -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')

View File

@ -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" />

View File

@ -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>
</Wix>