diff options
author | Mathew Robinson <chasinglogic@gmail.com> | 2017-09-01 18:01:34 -0400 |
---|---|---|
committer | Mathew Robinson <mathew.robinson@10gen.com> | 2017-10-16 11:17:26 -0400 |
commit | 0c6ca7be96b42d66bf905682313ef2b77d4d75b5 (patch) | |
tree | 70d2ee5b52a7c25488558d766d63f372121254aa | |
parent | 5a2feb2b9b8f457787c1c2cc10da207b2c2aa10d (diff) | |
download | mongo-0c6ca7be96b42d66bf905682313ef2b77d4d75b5.tar.gz |
SERVER-30995 Add Compass Installer to MongoDB packaging
23 files changed, 961 insertions, 648 deletions
diff --git a/buildscripts/msitrim.py b/buildscripts/msitrim.py index 7e267375229..45ca8d482ac 100644 --- a/buildscripts/msitrim.py +++ b/buildscripts/msitrim.py @@ -1,43 +1,43 @@ -"""Script to fix up our MSI files """ - -import argparse; -import msilib -import shutil; - -parser = argparse.ArgumentParser(description='Trim MSI.') -parser.add_argument('file', type=argparse.FileType('r'), help='file to trim') -parser.add_argument('out', type=argparse.FileType('w'), help='file to output to') - -args = parser.parse_args() - -def exec_delete(query): - view = db.OpenView(query) - view.Execute(None) - - cur_record = view.Fetch() - view.Modify(msilib.MSIMODIFY_DELETE, cur_record) - view.Close() - - -def exec_update(query, column, value): - view = db.OpenView(query) - view.Execute(None) - - cur_record = view.Fetch() - cur_record.SetString(column, value) - view.Modify(msilib.MSIMODIFY_REPLACE, cur_record) - view.Close() - - -print "Trimming MSI" - -db = msilib.OpenDatabase(args.file.name, msilib.MSIDBOPEN_DIRECT) - -exec_delete("select * from ControlEvent WHERE Dialog_ = 'LicenseAgreementDlg' AND Control_ = 'Next' AND Event = 'NewDialog' AND Argument = 'CustomizeDlg'") -exec_delete("select * from ControlEvent WHERE Dialog_ = 'CustomizeDlg' AND Control_ = 'Back' AND Event = 'NewDialog' AND Argument = 'LicenseAgreementDlg'") - -exec_update("select * from ControlEvent WHERE Dialog_ = 'VerifyReadyDlg' AND Control_ = 'Back' AND Event = 'NewDialog' AND Argument = 'CustomizeDlg'", 5, "WixUI_InstallMode = \"InstallCustom\"") - -db.Commit() - -shutil.copyfile(args.file.name, args.out.name); +"""Script to fix up our MSI files """
+
+import argparse;
+import msilib
+import shutil;
+
+parser = argparse.ArgumentParser(description='Trim MSI.')
+parser.add_argument('file', type=argparse.FileType('r'), help='file to trim')
+parser.add_argument('out', type=argparse.FileType('w'), help='file to output to')
+
+args = parser.parse_args()
+
+def exec_delete(query):
+ view = db.OpenView(query)
+ view.Execute(None)
+
+ cur_record = view.Fetch()
+ view.Modify(msilib.MSIMODIFY_DELETE, cur_record)
+ view.Close()
+
+
+def exec_update(query, column, value):
+ view = db.OpenView(query)
+ view.Execute(None)
+
+ cur_record = view.Fetch()
+ cur_record.SetString(column, value)
+ view.Modify(msilib.MSIMODIFY_REPLACE, cur_record)
+ view.Close()
+
+
+print "Trimming MSI"
+
+db = msilib.OpenDatabase(args.file.name, msilib.MSIDBOPEN_DIRECT)
+
+exec_delete("select * from ControlEvent WHERE Dialog_ = 'LicenseAgreementDlg' AND Control_ = 'Next' AND Event = 'NewDialog' AND Argument = 'CustomizeDlg'")
+exec_delete("select * from ControlEvent WHERE Dialog_ = 'CustomizeDlg' AND Control_ = 'Back' AND Event = 'NewDialog' AND Argument = 'LicenseAgreementDlg'")
+exec_delete("select * from ControlEvent WHERE Dialog_ = 'CustomizeDlg' AND Control_ = 'Next' AND Event = 'NewDialog' AND Argument = 'VerifyReadyDlg'")
+exec_delete("select * from ControlEvent WHERE Dialog_ = 'VerifyReadyDlg' AND Control_ = 'Back' AND Event = 'NewDialog' AND Argument = 'CustomizeDlg'")
+
+db.Commit()
+
+shutil.copyfile(args.file.name, args.out.name);
diff --git a/debian/mongodb-enterprise-unstable.rules b/debian/mongodb-enterprise-unstable.rules index 70419c6673d..dcfd78abef4 100644 --- a/debian/mongodb-enterprise-unstable.rules +++ b/debian/mongodb-enterprise-unstable.rules @@ -61,6 +61,7 @@ clean: rm -f mongorestore rm -f mongodump rm -f mongofiles + rm -f install_compass rm -f .sconsign.dblite rm -f libmongoclient.a rm -rf client/*.o @@ -87,6 +88,7 @@ install: build cp -v $(CURDIR)/bin/mongo $(CURDIR)/debian/mongodb-enterprise-unstable-shell/usr/bin cp -v $(CURDIR)/bin/mongod $(CURDIR)/debian/mongodb-enterprise-unstable-server/usr/bin cp -v $(CURDIR)/bin/mongos $(CURDIR)/debian/mongodb-enterprise-unstable-mongos/usr/bin + cp -v $(CURDIR)/bin/install_compass $(CURDIR)/debian/mongodb-enterprise-unstable-tools/usr/bin for binary in ${TOOLS} ; \ do \ diff --git a/debian/mongodb-enterprise.rules b/debian/mongodb-enterprise.rules index 81983eee840..70aed7e0687 100644 --- a/debian/mongodb-enterprise.rules +++ b/debian/mongodb-enterprise.rules @@ -60,6 +60,7 @@ clean: rm -f mongorestore rm -f mongodump rm -f mongofiles + rm -f install_compass rm -f .sconsign.dblite rm -f libmongoclient.a rm -rf client/*.o @@ -86,6 +87,7 @@ install: build cp -v $(CURDIR)/bin/mongo $(CURDIR)/debian/mongodb-enterprise-shell/usr/bin cp -v $(CURDIR)/bin/mongod $(CURDIR)/debian/mongodb-enterprise-server/usr/bin cp -v $(CURDIR)/bin/mongos $(CURDIR)/debian/mongodb-enterprise-mongos/usr/bin + cp -v $(CURDIR)/bin/install_compass $(CURDIR)/debian/mongodb-enterprise-tools/usr/bin for binary in ${TOOLS} ; \ do \ diff --git a/debian/mongodb-org-unstable.rules b/debian/mongodb-org-unstable.rules index 25c0d0ed795..5af48203cb0 100644 --- a/debian/mongodb-org-unstable.rules +++ b/debian/mongodb-org-unstable.rules @@ -58,6 +58,7 @@ clean: rm -f mongorestore rm -f mongodump rm -f mongofiles + rm -f install_compass rm -f .sconsign.dblite rm -f libmongoclient.a rm -rf client/*.o @@ -84,6 +85,7 @@ install: build cp -v $(CURDIR)/bin/mongo $(CURDIR)/debian/mongodb-org-unstable-shell/usr/bin cp -v $(CURDIR)/bin/mongod $(CURDIR)/debian/mongodb-org-unstable-server/usr/bin cp -v $(CURDIR)/bin/mongos $(CURDIR)/debian/mongodb-org-unstable-mongos/usr/bin + cp -v $(CURDIR)/bin/install_compass $(CURDIR)/debian/mongodb-org-unstable-tools/usr/bin for binary in ${TOOLS} ; \ do \ diff --git a/debian/mongodb-org.rules b/debian/mongodb-org.rules index f7e32fb0af3..b0e24542a0c 100644 --- a/debian/mongodb-org.rules +++ b/debian/mongodb-org.rules @@ -57,6 +57,7 @@ clean: rm -f mongorestore rm -f mongodump rm -f mongofiles + rm -f install_compass rm -f .sconsign.dblite rm -f libmongoclient.a rm -rf client/*.o @@ -83,6 +84,7 @@ install: build cp -v $(CURDIR)/bin/mongo $(CURDIR)/debian/mongodb-org-shell/usr/bin cp -v $(CURDIR)/bin/mongod $(CURDIR)/debian/mongodb-org-server/usr/bin cp -v $(CURDIR)/bin/mongos $(CURDIR)/debian/mongodb-org-mongos/usr/bin + cp -v $(CURDIR)/bin/install_compass $(CURDIR)/debian/mongodb-org-tools/usr/bin for binary in ${TOOLS} ; \ do \ diff --git a/rpm/mongo.mdv.spec b/rpm/mongo.mdv.spec index eb35f8ad330..c3de80cc751 100644 --- a/rpm/mongo.mdv.spec +++ b/rpm/mongo.mdv.spec @@ -132,6 +132,7 @@ fi %defattr(-,root,root,-) %doc README GNU-AGPL-3.0.txt +%{_bindir}/install_compass %{_bindir}/mongo %{_bindir}/mongodump %{_bindir}/mongoexport diff --git a/rpm/mongodb-enterprise-init.spec b/rpm/mongodb-enterprise-init.spec index f56109d2847..ab2c0b62cfe 100644 --- a/rpm/mongodb-enterprise-init.spec +++ b/rpm/mongodb-enterprise-init.spec @@ -258,6 +258,7 @@ fi #%doc README GNU-AGPL-3.0.txt %{_bindir}/bsondump +%{_bindir}/install_compass %{_bindir}/mongodecrypt %{_bindir}/mongoldap %{_bindir}/mongodump diff --git a/rpm/mongodb-enterprise-unstable-init.spec b/rpm/mongodb-enterprise-unstable-init.spec index 0a08722bc6f..ef1eac81c9c 100644 --- a/rpm/mongodb-enterprise-unstable-init.spec +++ b/rpm/mongodb-enterprise-unstable-init.spec @@ -247,6 +247,7 @@ fi #%doc README GNU-AGPL-3.0.txt %{_bindir}/bsondump +%{_bindir}/install_compass %{_bindir}/mongodecrypt %{_bindir}/mongoldap %{_bindir}/mongodump diff --git a/rpm/mongodb-enterprise-unstable.spec b/rpm/mongodb-enterprise-unstable.spec index f4401f97d33..414fec384d7 100644 --- a/rpm/mongodb-enterprise-unstable.spec +++ b/rpm/mongodb-enterprise-unstable.spec @@ -244,6 +244,7 @@ fi #%doc README GNU-AGPL-3.0.txt %{_bindir}/bsondump +%{_bindir}/install_compass %{_bindir}/mongodecrypt %{_bindir}/mongoldap %{_bindir}/mongodump diff --git a/rpm/mongodb-enterprise.spec b/rpm/mongodb-enterprise.spec index 27bb828c682..90ebb318481 100644 --- a/rpm/mongodb-enterprise.spec +++ b/rpm/mongodb-enterprise.spec @@ -254,6 +254,7 @@ fi #%doc README GNU-AGPL-3.0.txt %{_bindir}/bsondump +%{_bindir}/install_compass %{_bindir}/mongodecrypt %{_bindir}/mongoldap %{_bindir}/mongodump diff --git a/rpm/mongodb-org-init.spec b/rpm/mongodb-org-init.spec index c48c17bb96e..f51e4e394e7 100644 --- a/rpm/mongodb-org-init.spec +++ b/rpm/mongodb-org-init.spec @@ -253,6 +253,7 @@ fi #%doc README GNU-AGPL-3.0.txt %{_bindir}/bsondump +%{_bindir}/install_compass %{_bindir}/mongodump %{_bindir}/mongoexport %{_bindir}/mongofiles diff --git a/rpm/mongodb-org-unstable-init.spec b/rpm/mongodb-org-unstable-init.spec index fa506413d6a..719d3992629 100644 --- a/rpm/mongodb-org-unstable-init.spec +++ b/rpm/mongodb-org-unstable-init.spec @@ -241,6 +241,7 @@ fi #%doc README GNU-AGPL-3.0.txt %{_bindir}/bsondump +%{_bindir}/install_compass %{_bindir}/mongodump %{_bindir}/mongoexport %{_bindir}/mongofiles diff --git a/rpm/mongodb-org-unstable.spec b/rpm/mongodb-org-unstable.spec index 91a9802be0d..1ea1739351a 100644 --- a/rpm/mongodb-org-unstable.spec +++ b/rpm/mongodb-org-unstable.spec @@ -237,6 +237,7 @@ fi #%doc README GNU-AGPL-3.0.txt %{_bindir}/bsondump +%{_bindir}/install_compass %{_bindir}/mongodump %{_bindir}/mongoexport %{_bindir}/mongofiles diff --git a/rpm/mongodb-org.spec b/rpm/mongodb-org.spec index e9b77006046..845215fd7aa 100644 --- a/rpm/mongodb-org.spec +++ b/rpm/mongodb-org.spec @@ -249,6 +249,7 @@ fi #%doc README GNU-AGPL-3.0.txt %{_bindir}/bsondump +%{_bindir}/install_compass %{_bindir}/mongodump %{_bindir}/mongoexport %{_bindir}/mongofiles diff --git a/src/mongo/SConscript b/src/mongo/SConscript index 5c90b40f10e..60d3512f7aa 100644 --- a/src/mongo/SConscript +++ b/src/mongo/SConscript @@ -587,6 +587,26 @@ for full_dir, archive_dir in env["ARCHIVE_ADDITION_DIR_MAP"].items(): for target in env["DIST_BINARIES"]: installBinary(env, "db/modules/" + target) +# Set the download url to the right place +compass_type = 'compass-community' +if 'enterprise' in env['MONGO_MODULES']: + compass_type = 'compass' + +compass_script = "install_compass" +if env.TargetOSIs('windows'): + # On windows the .in needs to be explicitly added to the file. + compass_script = "Install-Compass.ps1.in" + +compass_installer = env.Substfile('#/src/mongo/installer/compass/' + compass_script, + SUBST_DICT=[ + ('@compass_type@', compass_type) + ]) +distBinaries.append(compass_installer) +compass_script_installer = env.Install("$INSTALL_DIR/bin", compass_installer) + +if env.TargetOSIs('posix'): + env.AddPostAction( compass_script_installer, 'chmod 755 $TARGET' ) + # "dist" target is valid only when --use-new-tools is specified # Attempts to build release artifacts without tools must fail if has_option("use-new-tools"): @@ -604,6 +624,7 @@ if has_option("use-new-tools"): '--transform $BUILD_DIR/mongo=$SERVER_DIST_BASENAME/bin', '--transform $BUILD_DIR/mongo/stripped/src/mongo-tools=$SERVER_DIST_BASENAME/bin', '--transform src/mongo-tools=$SERVER_DIST_BASENAME/bin', + '--transform src/mongo/installer/compass=$SERVER_DIST_BASENAME/bin', '${TEMPFILE(SOURCES[1:])}' ], ), @@ -630,6 +651,7 @@ debug_symbols_dist = env.Command( ), BUILD_DIR=env.Dir('$BUILD_DIR').path ) + env.Alias('dist-debugsymbols', debug_symbols_dist) #final alias diff --git a/src/mongo/installer/compass/Install-Compass.ps1.in b/src/mongo/installer/compass/Install-Compass.ps1.in new file mode 100755 index 00000000000..001ae9de085 --- /dev/null +++ b/src/mongo/installer/compass/Install-Compass.ps1.in @@ -0,0 +1,43 @@ +#Requires -Version 3.0
+<#
+.SYNOPSIS
+ Download and install latest version of MongoDB Compass.
+
+.DESCRIPTION
+ A longer description.
+
+.INPUTS
+ Description of objects that can be piped to the script
+
+.OUTPUTS
+ Description of objects that are output by the script
+
+.EXAMPLE
+ Example of how to run the script
+
+.LINK
+ Links to further documentation
+
+.NOTES
+ Detail on what the script does, if this is needed
+#>
+param()
+$ErrorActionPreference = 'Stop'
+
+$CompassUrl = 'https://compass.mongodb.com/api/v2/download/latest/@compass_type@/stable/windows'
+
+$TemporaryDir = [System.IO.Path]::GetTempPath()
+$CompassExe = "$TemporaryDir" + "compass-install.exe"
+
+Remove-Item $CompassExe -ErrorAction:Ignore
+
+Write-Output "Downloading Compass from $CompassUrl"
+Invoke-WebRequest -Uri $CompassUrl -OutFile $CompassExe
+
+Write-Output "Installing Compass"
+& $CompassExe
+
+# Remove the binary we downloaded
+Remove-Item $CompassExe -ErrorAction:Ignore
+
+Write-Output "Successfully installed Compass"
diff --git a/src/mongo/installer/compass/install_compass.in b/src/mongo/installer/compass/install_compass.in new file mode 100755 index 00000000000..70ddc081228 --- /dev/null +++ b/src/mongo/installer/compass/install_compass.in @@ -0,0 +1,154 @@ +#!/usr/bin/env python2 + +# This script downloads the latest version of Compass and installs it on +# non-windows platforms. + +import json +import os +import os.path as path +import shutil +import subprocess +import sys +import tempfile +import platform +import time +import urllib + + +def get_pkg_format(): + """Determine the package manager for this Linux distro.""" + with open(os.devnull, 'w') as fnull: + try: + subprocess.call(['apt-get', '--help'], stdout=fnull, stderr=fnull) + return 'apt' + except: + pass + + try: + subprocess.call(['dnf', '--help'], stdout=fnull, stderr=fnull) + return 'dnf' + except: + pass + + try: + subprocess.call(['yum', '--help'], stdout=fnull, stderr=fnull) + return 'yum' + except: + pass + + return '' + + +def download_progress(count, block_size, total_size): + """Log the download progress.""" + percent = int(count * block_size * 100 / total_size) + sys.stdout.write("\rDownloading Compass... %d%%" % percent) + sys.stdout.flush() + + +def download_pkg(link): + """Download the package from link, logging progress. Returns the filename.""" + res = urllib.urlretrieve(link, reporthook=download_progress) + # Download progress doesn't end with a newline so add it here. + print '' + return res[0] + + +def install_mac(dmg): + """Use CLI tools to mount the dmg and extract all .apps into Applications.""" + tmp = tempfile.mkdtemp() + subprocess.check_call(['hdiutil', 'attach', '-mountpoint', tmp, dmg]) + try: + apps = [f for f in os.listdir(tmp) if f.endswith('.app')] + for app in apps: + if path.isdir('/Applications/' + app): + print 'Old version appound removing...' + shutil.rmtree('/Applications/' + app) + print 'Copying %s to /Applications' % app + shutil.copytree(path.join(tmp, app), '/Applications/' + app) + # We don't really care about what errors come up here. Just log the failure + # and use the finally to make sure we always unmount the dmg. + except Exception as exception: + print exception + finally: + subprocess.check_call(['hdiutil', 'detach', tmp]) + + +def install_linux(pkg_format, pkg_file): + """Use the package manager indicated by pkg_format to install pkg_file.""" + if pkg_format == 'yum': + install = ['yum', 'install', '--assumeyes', pkg_file] + elif pkg_format == 'apt': + install = ['apt-get', 'install', '--yes', pkg_file] + elif pkg_format == 'dnf': + install = ['dnf', 'install', '--assumeyes', pkg_file] + else: + print 'No available installation methods.' + sys.exit(1) + + subprocess.check_call(install) + + +def is_supported_distro(): + distro_name, version_number, extra = platform.linux_distribution() + + if (distro_name == 'Ubuntu' and + (version_number == '14.04' or + version_number == '16.04')): + return True + + if (distro_name == 'Red Hat Enterprise Linux Server' and + (int(version_numer) >= 7)): + return True + + return False + + +def download_and_install_compass(): + """Download and install compass for this platform.""" + platform = sys.platform + pkg_format = get_pkg_format() + + # Sometimes sys.platform gives us 'linux2' and we only want 'linux' + if platform.startswith('linux'): + platform = 'linux' + if pkg_format == 'apt': + platform += '_deb' + elif pkg_format == 'yum' or pkg_format == 'dnf': + platform += '_rpm' + elif platform == 'darwin': + platform = 'osx' + + if platform.startswith('linux') and os.getuid() != 0: + print 'You must run this script as root.' + sys.exit(1) + + if platform.startswith('linux') and not is_supported_distro(): + print 'You are using an unsupported Linux distribution.' + ' Please visit: <some link here> to view available' + ' community supported packages.' + sys.exit(1) + + if platform.machine() != 'x86_64': + print 'Sorry, MongoDB Compass is only supported on 64 bit platforms.' + ' If you believe you\'re seeing this message in error please open a' + ' ticket on the SERVER project at https://jira.mongodb.org/' + + link = 'https://compass.mongodb.com/api/v2/download/latest/@compass_type@/stable/' + platform + pkg = download_pkg(link) + + print 'Installing the package...' + if platform == 'osx': + install_mac(pkg) + elif platform.startswith('linux'): + install_linux(pkg_format, pkg) + else: + print 'Unrecognized platform: %s' % platform + + print 'Cleaning up...' + os.remove(pkg) + print 'Done!' + + +if __name__ == '__main__': + download_and_install_compass() diff --git a/src/mongo/installer/msi/SConscript b/src/mongo/installer/msi/SConscript index 59a871e978a..1c7ebdfa835 100644 --- a/src/mongo/installer/msi/SConscript +++ b/src/mongo/installer/msi/SConscript @@ -1,164 +1,165 @@ -# -*- mode: python; -*- - -import os - -Import("env") -Import("has_option") - -env = env.Clone() - -env['WIX'] = os.environ.get('WIX') -env['WIXPATH'] = r'$WIX\bin' -env['WIXHEAT'] = r'$WIXPATH\heat.exe' -env['WIXCANDLE'] = r'$WIXPATH\candle.exe' -env['WIXLIGHT'] = r'$WIXPATH\light.exe' -env['WIXUIEXT'] = r'$WIXPATH\WixUIExtension.dll' -env['MERGEMODULESBASEPATH'] = os.environ.get('MERGEMODULESBASEPATH') -if env['MERGEMODULESBASEPATH'] == None and os.environ.get('ProgramFiles(x86)') != None: - env['MERGEMODULESBASEPATH'] = (os.environ.get('ProgramFiles(x86)') + - r"\Common Files\Merge Modules") - -sourcesList = [ "BinaryFragment.wxs", - "FeatureFragment.wxs", - "LicensingFragment.wxs", - "UIFragment.wxs", - ] - -# Need to do this in order to get scons to translate path separators into native format -buildDir = env.Dir("$BUILD_DIR").path -if has_option("use-new-tools"): - toolBuildDir = "src\mongo-tools" -else: - toolBuildDir = buildDir + r'\mongo' - -enterprisebase = 'src\mongo\db\modules\enterprise' -enterpriseToolBuildDir = buildDir + r'\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 "" -# - -msi_flavor = '2008R2Plus' -msi_platform = 'x64' - -# Enterprise -if 'enterprise' in env['MONGO_MODULES']: - msi_edition = 'Enterprise' - upgrade_code = '822C75A4-40BA-456B-91D3-C339155F0F90' -# Community -else: - if has_option('ssl'): - msi_edition = 'SSL' - upgrade_code = 'FDAA2775-060E-4C54-9C19-A84197F3070D' - else: - msi_edition = 'Standard' - upgrade_code = '7BCCBD4E-AC8A-48BC-9922-E9EBB158A060' - -sourcesList.append("Installer_64.wxs") - -sources = ["wxs/" + file for file in sourcesList] -objects = ["$BUILD_DIR/msi/" + file.replace(".wxs", ".wixobj") for file in sourcesList] - -full_version = env['MONGO_VERSION'].partition('-')[0] - -# major version is the x.y, not the x.y.z -major_version = full_version -mv = major_version.split('.') -major_version = "%s.%s" % (mv[0], mv[1]) - -# We must regenerate the upgrade codes for each major release. -# i.e., 3.0, 3.2, 3.4 need new codes but not 3.2.1, 3.2.2, etc -# The build will now fail when the major version is bumped to prevent mistakes. -# When the upgrade codes are bumped, remember to raise the version number to the next major version. -# On each update to the upgrade codes: -# 1. Generate new GUIDs -# 2. Ensure each MSI gets a different GUID. This is used to identify products. -# It allows upgrade from 3.2.0 to 3.2.1 in place instead of side-by-side. -# 3. Update the check for the next major release below so we bump the GUIDs in the future. -# -if float(major_version) > 3.6: - # If you are troubleshooting this error, see the comment above - env.FatalError("The upgrade codes are out of date for this release. Please \n" + - "replace the existing GUIDs listed in this file with new GUIDs so " + - "side-by-side installation of major versions (i.e. 3.2, and 3.4) is " + - "supported.") - -# Currently, we are planning to key the same upgrade code for each -# (msi_edition, msi_platform, msi_flavor) combination -# and change MSI ProductId on minor updates, 2.6.0 -> 2.6.1, we let Wix do automatic -# GUID generation for us rather then build a database of GUIDs in our build system -# For major updates, we are going to create a new directory/productid/upgrade_code ie, 2.6 -> 3.0 - - -# candle: compile .wxs files into .wixobjs -env.Command(objects, - sources, - '"$WIXCANDLE" -wx' - # cannot have anything other than x.x.x.x in version string. - # we should choose a fourth version number that reflects pre-ness. - ' -dMongoDBMajorVersion=' + major_version + - ' -dMongoDBVersion=' + full_version + - ' -dLicenseSource=distsrc' - r' -dEnterpriseBase=' + enterprisebase + '\\' - ' -dBinarySource=' + buildDir + r'\mongo' - ' -dToolBinarySource=' + toolBuildDir + - ' -dEnterpriseToolBinarySource=' + enterpriseToolBuildDir + - ' -dMergeModulesBasePath="$MERGEMODULESBASEPATH"' - ' -dEdition=' + msi_edition + - ' -d"ProductId=*\"' - ' -dUpgradeCode=' + upgrade_code + - ' -dClientSource=' + buildDir + r'\client_build' - r' -dClientHeaderSource=${INSTALL_DIR}\include\mongo' - ' -dConfiguration=Release' - ' -dOutDir=' + buildDir + r'\msi' - ' -dPlatform=' + msi_platform + - ' -dFlavor=' + msi_flavor + - r' -dProjectDir=buildscripts\packaging\msi\\' - ' -dProjectName=MongoDB' - ' -dTargetDir=' + buildDir + r'\msi' - ' -dTargetExt=.msi' - ' -dTargetFileName=${SERVER_ARCHIVE}' - r' -dSaslSource=c:\sasl\bin' - r' -dSnmpSource=c:\snmp\bin' - r' -dSslSource=' + env['WINDOWS_OPENSSL_BIN'] + - ' -out ' + buildDir + r'\msi\\' - ' -arch ' + msi_platform + - ' -ext "$WIXUIEXT"' - ' $SOURCES') - -#light: link .objs into an msi -pre_msi = "$BUILD_DIR/msi/${SERVER_DIST_BASENAME}.pre.msi" - -# Suppress VC140_CRT_CRT.MSM Internal Consistency Errors -# ICE03 - Supress "String overflow" -# -- https://msdn.microsoft.com/en-us/library/windows/desktop/aa369037(v=vs.85).aspx -# ICE82 - Suppress "duplicate sequence number" -# -- https://msdn.microsoft.com/en-us/library/windows/desktop/aa368798(v=vs.85).aspx -# - -pre_msi_cmd = env.Command(pre_msi, - objects, - '"$WIXLIGHT" -out ${TARGET} -wx -cultures:null -sice:ICE82 -sice:ICE03' - ' -ext "$WIXUIEXT"' - ' ${SOURCES}') - -env.Depends(pre_msi_cmd, '$BUILD_DIR/mongo/mongo.exe') -env.Depends(pre_msi_cmd, '$BUILD_DIR/mongo/mongod.exe') -env.Depends(pre_msi_cmd, '$BUILD_DIR/mongo/mongos.exe') -env.Depends(pre_msi_cmd, '$BUILD_DIR/mongo/mongoperf.exe') - -if 'enterprise' in env['MONGO_MODULES']: - env.Depends(pre_msi_cmd, "#" + enterpriseToolBuildDir + "/mongodecrypt.exe") - env.Depends(pre_msi_cmd, "#" + enterpriseToolBuildDir + "/mongoldap.exe") - -msi = "$BUILD_DIR/msi/${SERVER_DIST_BASENAME}.msi" -env.Command(msi, - pre_msi, - r'$PYTHON buildscripts\msitrim.py ${SOURCES} ${TARGET}') -env.AlwaysBuild(msi) - -env.Alias( "msi" , msi ) - +# -*- mode: python; -*-
+
+import os
+
+Import("env")
+Import("has_option")
+
+env = env.Clone()
+
+env['WIX'] = os.environ.get('WIX')
+env['WIXPATH'] = r'$WIX\bin'
+env['WIXHEAT'] = r'$WIXPATH\heat.exe'
+env['WIXCANDLE'] = r'$WIXPATH\candle.exe'
+env['WIXLIGHT'] = r'$WIXPATH\light.exe'
+env['WIXUIEXT'] = r'$WIXPATH\WixUIExtension.dll'
+env['WIXUTILEXT'] = r'$WIXPATH\WixUtilExtension.dll'
+env['MERGEMODULESBASEPATH'] = os.environ.get('MERGEMODULESBASEPATH')
+if env['MERGEMODULESBASEPATH'] == None and os.environ.get('ProgramFiles(x86)') != None:
+ env['MERGEMODULESBASEPATH'] = (os.environ.get('ProgramFiles(x86)') +
+ r"\Common Files\Merge Modules")
+
+sourcesList = [ "BinaryFragment.wxs",
+ "FeatureFragment.wxs",
+ "LicensingFragment.wxs",
+ "UIFragment.wxs",
+ ]
+
+# Need to do this in order to get scons to translate path separators into native format
+buildDir = env.Dir("$BUILD_DIR").path
+if has_option("use-new-tools"):
+ toolBuildDir = "src\mongo-tools"
+else:
+ toolBuildDir = buildDir + r'\mongo'
+
+enterprisebase = 'src\mongo\db\modules\enterprise'
+enterpriseToolBuildDir = buildDir + r'\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 ""
+#
+
+msi_flavor = '2008R2Plus'
+msi_platform = 'x64'
+
+# Enterprise
+if 'enterprise' in env['MONGO_MODULES']:
+ msi_edition = 'Enterprise'
+ upgrade_code = '822C75A4-40BA-456B-91D3-C339155F0F90'
+# Community
+else:
+ if has_option('ssl'):
+ msi_edition = 'SSL'
+ upgrade_code = 'FDAA2775-060E-4C54-9C19-A84197F3070D'
+ else:
+ msi_edition = 'Standard'
+ upgrade_code = '7BCCBD4E-AC8A-48BC-9922-E9EBB158A060'
+
+sourcesList.append("Installer_64.wxs")
+
+sources = ["wxs/" + file for file in sourcesList]
+objects = ["$BUILD_DIR/msi/" + file.replace(".wxs", ".wixobj") for file in sourcesList]
+
+full_version = env['MONGO_VERSION'].partition('-')[0]
+
+# major version is the x.y, not the x.y.z
+major_version = full_version
+mv = major_version.split('.')
+major_version = "%s.%s" % (mv[0], mv[1])
+
+# We must regenerate the upgrade codes for each major release.
+# i.e., 3.0, 3.2, 3.4 need new codes but not 3.2.1, 3.2.2, etc
+# The build will now fail when the major version is bumped to prevent mistakes.
+# When the upgrade codes are bumped, remember to raise the version number to the next major version.
+# On each update to the upgrade codes:
+# 1. Generate new GUIDs
+# 2. Ensure each MSI gets a different GUID. This is used to identify products.
+# It allows upgrade from 3.2.0 to 3.2.1 in place instead of side-by-side.
+# 3. Update the check for the next major release below so we bump the GUIDs in the future.
+#
+if float(major_version) > 3.6:
+ # If you are troubleshooting this error, see the comment above
+ env.FatalError("The upgrade codes are out of date for this release. Please \n" +
+ "replace the existing GUIDs listed in this file with new GUIDs so " +
+ "side-by-side installation of major versions (i.e. 3.2, and 3.4) is " +
+ "supported.")
+
+# Currently, we are planning to key the same upgrade code for each
+# (msi_edition, msi_platform, msi_flavor) combination
+# and change MSI ProductId on minor updates, 2.6.0 -> 2.6.1, we let Wix do automatic
+# GUID generation for us rather then build a database of GUIDs in our build system
+# For major updates, we are going to create a new directory/productid/upgrade_code ie, 2.6 -> 3.0
+
+
+# candle: compile .wxs files into .wixobjs
+env.Command(objects,
+ sources,
+ '"$WIXCANDLE" -wx'
+ # cannot have anything other than x.x.x.x in version string.
+ # we should choose a fourth version number that reflects pre-ness.
+ ' -dMongoDBMajorVersion=' + major_version +
+ ' -dMongoDBVersion=' + full_version +
+ ' -dLicenseSource=distsrc'
+ r' -dEnterpriseBase=' + enterprisebase + '\\'
+ ' -dBinarySource=' + buildDir + r'\mongo'
+ ' -dToolBinarySource=' + toolBuildDir +
+ ' -dEnterpriseToolBinarySource=' + enterpriseToolBuildDir +
+ ' -dMergeModulesBasePath="$MERGEMODULESBASEPATH"'
+ ' -dEdition=' + msi_edition +
+ ' -d"ProductId=*\"'
+ ' -dUpgradeCode=' + upgrade_code +
+ ' -dClientSource=' + buildDir + r'\client_build'
+ r' -dClientHeaderSource=${INSTALL_DIR}\include\mongo'
+ ' -dConfiguration=Release'
+ ' -dOutDir=' + buildDir + r'\msi'
+ ' -dPlatform=' + msi_platform +
+ ' -dFlavor=' + msi_flavor +
+ r' -dProjectDir=buildscripts\packaging\msi\\'
+ ' -dProjectName=MongoDB'
+ ' -dCompassDir=src\mongo\installer\compass'
+ ' -dTargetDir=' + buildDir + r'\msi'
+ ' -dTargetExt=.msi'
+ ' -dTargetFileName=${SERVER_ARCHIVE}'
+ r' -dSaslSource=c:\sasl\bin'
+ r' -dSnmpSource=c:\snmp\bin'
+ r' -dSslSource=' + env['WINDOWS_OPENSSL_BIN'] +
+ ' -out ' + buildDir + r'\msi\\'
+ ' -arch ' + msi_platform +
+ ' -ext "$WIXUIEXT"'
+ ' $SOURCES')
+
+#light: link .objs into an msi
+pre_msi = "$BUILD_DIR/msi/${SERVER_DIST_BASENAME}.pre.msi"
+
+# Suppress VC140_CRT_CRT.MSM Internal Consistency Errors
+# ICE03 - Supress "String overflow"
+# -- https://msdn.microsoft.com/en-us/library/windows/desktop/aa369037(v=vs.85).aspx
+# ICE82 - Suppress "duplicate sequence number"
+# -- https://msdn.microsoft.com/en-us/library/windows/desktop/aa368798(v=vs.85).aspx
+#
+
+pre_msi_cmd = env.Command(pre_msi,
+ objects,
+ '"$WIXLIGHT" -out ${TARGET} -wx -cultures:null -sice:ICE82 -sice:ICE03'
+ ' -ext "$WIXUIEXT" -ext "$WIXUTILEXT"'
+ ' ${SOURCES}')
+
+env.Depends(pre_msi_cmd, '$BUILD_DIR/mongo/mongo.exe')
+env.Depends(pre_msi_cmd, '$BUILD_DIR/mongo/mongod.exe')
+env.Depends(pre_msi_cmd, '$BUILD_DIR/mongo/mongos.exe')
+env.Depends(pre_msi_cmd, '$BUILD_DIR/mongo/mongoperf.exe')
+
+if 'enterprise' in env['MONGO_MODULES']:
+ env.Depends(pre_msi_cmd, "#" + enterpriseToolBuildDir + "/mongodecrypt.exe")
+ env.Depends(pre_msi_cmd, "#" + enterpriseToolBuildDir + "/mongoldap.exe")
+
+msi = "$BUILD_DIR/msi/${SERVER_DIST_BASENAME}.msi"
+env.Command(msi,
+ pre_msi,
+ r'$PYTHON buildscripts\msitrim.py ${SOURCES} ${TARGET}')
+env.AlwaysBuild(msi)
+
+env.Alias( "msi" , msi )
diff --git a/src/mongo/installer/msi/wxs/BinaryFragment.wxs b/src/mongo/installer/msi/wxs/BinaryFragment.wxs index 01c7d639612..db3ffdf82f6 100644 --- a/src/mongo/installer/msi/wxs/BinaryFragment.wxs +++ b/src/mongo/installer/msi/wxs/BinaryFragment.wxs @@ -1,160 +1,163 @@ -<?xml version="1.0" encoding="UTF-8"?> -<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> - <Fragment> - <DirectoryRef Id="BIN"> - <Component Id="c_bsondump" Guid="DEEA45CA-5175-453B-9D0B-6168B4C0C891"> - <File Id="f_bsondump" Name="bsondump.exe" Source="$(var.ToolBinarySource)\bsondump.exe" - DiskId ="1" KeyPath="yes"/> - </Component> - <Component Id="c_mongo" Guid="395C3DA5-A905-409C-AD96-29BFFF5E12D6"> - <File Id="f_mongo" Name="mongo.exe" Source="$(var.BinarySource)\mongo.exe" - DiskId ="1" KeyPath="yes"/> - </Component> - <Component Id="c_mongod" Guid="7EDFB4A2-5A45-4C41-8F6D-976558B3A9D6"> - <File Id="f_mongod" Name="mongod.exe" Source="$(var.BinarySource)\mongod.exe" - DiskId ="1" KeyPath="yes"/> - </Component> - <Component Id="c_mongodPdb" Guid="8B41A2E2-911C-4399-8E9F-D3C1AD3B9EDD"> - <File Id="f_mongodPdb" Name="mongod.pdb" Source="$(var.BinarySource)\mongod.pdb" - DiskId ="1" KeyPath="yes"/> - </Component> - <Component Id="c_mongodump" Guid="FFE32884-ACAD-4EC6-AF84-6BC94F55819E"> - <File Id="f_mongodump" Name="mongodump.exe" Source="$(var.ToolBinarySource)\mongodump.exe" - DiskId ="1" KeyPath="yes"/> - </Component> - <Component Id="c_mongoexport" Guid="FD5FFDE2-53A1-45F3-9CCA-3AC311DF647C"> - <File Id="f_mongoexport" Name="mongoexport.exe" Source="$(var.ToolBinarySource)\mongoexport.exe" - DiskId ="1" KeyPath="yes"/> - </Component> - <Component Id="c_mongofiles" Guid="CF8696D3-92B4-4CB9-B4D0-16155D726FE6"> - <File Id="f_mongofiles" Name="mongofiles.exe" Source="$(var.ToolBinarySource)\mongofiles.exe" - DiskId ="1" KeyPath="yes"/> - </Component> - <Component Id="c_mongoimport" Guid="A4C06F69-2BB3-4068-A7E7-25347CCF01DE"> - <File Id="f_mongoimport" Name="mongoimport.exe" Source="$(var.ToolBinarySource)\mongoimport.exe" - DiskId ="1" KeyPath="yes"/> - </Component> - <Component Id="c_mongooplog" Guid="FAD84CBB-4666-4C22-A0DF-E1D2AEEC1601"> - <File Id="f_mongooplog" Name="mongooplog.exe" Source="$(var.ToolBinarySource)\mongooplog.exe" - DiskId ="1" KeyPath="yes"/> - </Component> - <Component Id="c_mongoperf" Guid="B046CCD2-39DC-4CB4-8A58-A7790148C41E"> - <File Id="f_mongoperf" Name="mongoperf.exe" Source="$(var.BinarySource)\mongoperf.exe" - DiskId ="1" KeyPath="yes"/> - </Component> - <Component Id="c_mongorestore" Guid="72A16D11-242E-4368-93C9-5F6162C548FC"> - <File Id="f_mongorestore" Name="mongorestore.exe" Source="$(var.ToolBinarySource)\mongorestore.exe" - DiskId ="1" KeyPath="yes"/> - </Component> - <Component Id="c_mongos" Guid="3CA63864-9FA0-4DAE-A664-2BE9A157FB60"> - <File Id="f_mongos" Name="mongos.exe" Source="$(var.BinarySource)\mongos.exe" - DiskId ="1" KeyPath="yes"/> - </Component> - <Component Id="c_mongosPdb" Guid="F1694AB8-4B0D-4096-AD67-948063FF2A6C"> - <File Id="f_mongosPdb" Name="mongos.pdb" Source="$(var.BinarySource)\mongos.pdb" - DiskId ="1" KeyPath="yes"/> - </Component> - <Component Id="c_mongostat" Guid="0A881C85-AB39-4247-BADD-C8191F2FFF0C"> - <File Id="f_mongostat" Name="mongostat.exe" Source="$(var.ToolBinarySource)\mongostat.exe" - DiskId ="1" KeyPath="yes"/> - </Component> - <Component Id="c_mongotop" Guid="616C562D-0504-4F2D-A6E7-CC21A58F9F81"> - <File Id="f_mongotop" Name="mongotop.exe" Source="$(var.ToolBinarySource)\mongotop.exe" - DiskId ="1" KeyPath="yes"/> - </Component> - <?if $(var.Edition) = Enterprise ?> - <Component Id="c_mongodecrypt" Guid="B81B0CED-8CAD-4A92-BABC-7C473BBFF44E"> - <File Id="f_mongodecrypt" Name="mongodecrypt.exe" Source="$(var.EnterpriseToolBinarySource)\mongodecrypt.exe" - DiskId="1" KeyPath="yes"/> - </Component> - <Component Id="c_mongoldap" Guid="553E4E3D-ED32-4ABA-8F27-3A7525C3145C"> - <File Id="f_mongoldap" Name="mongoldap.exe" Source="$(var.EnterpriseToolBinarySource)\mongoldap.exe" - DiskId="1" KeyPath="yes"/> - </Component> - <Component Id="c_sasl" Guid="6632B1B8-9F0C-452C-9101-BE6044471CAC"> - <File Id="f_sasl" Name="libsasl.dll" Source="$(var.SaslSource)\libsasl.dll" - DiskId="1" KeyPath="yes" /> - </Component> - <Component Id="c_saslPdb" Guid="84DE7D8C-A6D6-4A23-935F-F0FFE3BBC52B"> - <File Id="f_saslPdb" Name="libsasl.pdb" Source="$(var.SaslSource)\libsasl.pdb" - DiskId="1" KeyPath="yes" /> - </Component> - <Component Id="c_snmp" Guid="F5E5A889-FC9F-4B9A-BEFD-C8ABC9A92D8D"> - <File Id="f_ssnmp" Name="netsnmp.dll" Source="$(var.SnmpSource)\netsnmp.dll" - DiskId="1" KeyPath="yes" /> - </Component> - <Component Id="c_snmpPdb" Guid="6AAB0ACE-C354-4D3A-B490-2AA235647AB3"> - <File Id="f_snmpPdb" Name="netsnmp.pdb" Source="$(var.SnmpSource)\netsnmp.pdb" - DiskId="1" KeyPath="yes" /> - </Component> - <?endif ?> - <?if $(var.Edition) = Enterprise Or $(var.Edition) = SSL ?> - <Component Id="c_ssleay" Guid="8879033A-F4F7-4879-A7F8-4D81355A47E3"> - <File Id="f_ssleay" Name="ssleay32.dll" Source="$(var.SslSource)\ssleay32.dll" - DiskId="1" KeyPath="yes" /> - </Component> - <Component Id="c_libeay" Guid="E6CC6AA5-AC71-45EC-803C-71F816E33135"> - <File Id="f_libeay" Name="libeay32.dll" Source="$(var.SslSource)\libeay32.dll" - DiskId="1" KeyPath="yes" /> - </Component> - <?endif ?> - </DirectoryRef> - <?if $(var.Edition) = Enterprise ?> - <DirectoryRef Id="SNMP"> - <Component Id="c_snmpReadme" Guid="B968FBAC-1813-4039-9FED-A607A0E4CBB3"> - <File Id="f_snmpReadme" Name="README-snmp.txt" Source="$(var.EnterpriseBase)\docs\README-snmp.txt" - DiskId="1" KeyPath="yes" /> - </Component> - <Component Id="c_snmpConfMaster" Guid="0C8CAA6C-1473-4B14-9EE5-AF5A35B1DD8D"> - <File Id="f_snmpConfMaster" Name="mongod.conf.master" Source="$(var.EnterpriseBase)\docs\mongod.conf.master" - DiskId="1" KeyPath="yes" /> - </Component> - <Component Id="c_snmpConfSubagent" Guid="6FB66102-41A7-41BD-BB1F-1987E150FA78"> - <File Id="f_snmpConfSubagent" Name="mongod.conf.subagent" Source="$(var.EnterpriseBase)\docs\mongod.conf.subagent" - DiskId="1" KeyPath="yes" /> - </Component> - <Component Id="c_snmpMongodMib" Guid="F3E98C6B-FE42-44E7-8A1F-E47BDDD0A3D7"> - <File Id="f_snmpMongodMib" Name="MONGOD-MIB.txt" Source="$(var.EnterpriseBase)\docs\MONGOD-MIB.txt" - DiskId="1" KeyPath="yes" /> - </Component> - <Component Id="c_snmpMongodbincMib" Guid="58c6bd8e-a785-48a0-af48-42f6bf9f68b4"> - <File Id="f_snmpMongodbincMib" Name="MONGODBINC-MIB.txt" Source="$(var.EnterpriseBase)\docs\MONGODBINC-MIB.txt" - DiskId="1" KeyPath="yes" /> - </Component> - </DirectoryRef> - <?endif ?> - - - <?if $(var.Edition) = Enterprise or $(var.Edition) = SSL ?> - <DirectoryRef Id="TARGETDIR"> - <Merge Id="m_vcredist" SourceFile="$(var.MergeModulesBasePath)\Microsoft_VC140_CRT_x64.msm" DiskId="1" Language="0"/> - </DirectoryRef> - <?endif ?> - - <?if $(var.Edition) = Enterprise ?> - <ComponentGroup Id="cg_EnterpriseBase"> - <ComponentRef Id="c_sasl" /> - <ComponentRef Id="c_saslPdb" /> - <ComponentRef Id="c_ssleay" /> - <ComponentRef Id="c_libeay" /> - </ComponentGroup> - <ComponentGroup Id="cg_EnterpriseServer"> - <ComponentGroupRef Id="cg_EnterpriseBase" /> - <ComponentRef Id="c_snmp" /> - <ComponentRef Id="c_snmpPdb" /> - <ComponentRef Id="c_snmpReadme" /> - <ComponentRef Id="c_snmpConfMaster" /> - <ComponentRef Id="c_snmpConfSubagent" /> - <ComponentRef Id="c_snmpMongodMib" /> - <ComponentRef Id="c_snmpMongodbincMib" /> - </ComponentGroup> - <?endif ?> - - <?if $(var.Edition) = SSL ?> - <ComponentGroup Id="cg_SSLBase"> - <ComponentRef Id="c_ssleay" /> - <ComponentRef Id="c_libeay" /> - </ComponentGroup> - <?endif ?> - </Fragment> -</Wix> +<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <DirectoryRef Id="BIN">
+ <Component Id="c_bsondump" Guid="DEEA45CA-5175-453B-9D0B-6168B4C0C891">
+ <File Id="f_bsondump" Name="bsondump.exe" Source="$(var.ToolBinarySource)\bsondump.exe"
+ DiskId ="1" KeyPath="yes"/>
+ </Component>
+ <Component Id="InstallCompass" Guid="FDB7B7C4-B78F-4A85-8F98-E8E49F6027B2">
+ <File Id="InstallCompassScript" Name="InstallCompass.ps1" Source="$(var.CompassDir)\Install-Compass.ps1" />
+ </Component>
+ <Component Id="c_mongo" Guid="395C3DA5-A905-409C-AD96-29BFFF5E12D6">
+ <File Id="f_mongo" Name="mongo.exe" Source="$(var.BinarySource)\mongo.exe"
+ DiskId ="1" KeyPath="yes"/>
+ </Component>
+ <Component Id="c_mongod" Guid="7EDFB4A2-5A45-4C41-8F6D-976558B3A9D6">
+ <File Id="f_mongod" Name="mongod.exe" Source="$(var.BinarySource)\mongod.exe"
+ DiskId ="1" KeyPath="yes"/>
+ </Component>
+ <Component Id="c_mongodPdb" Guid="8B41A2E2-911C-4399-8E9F-D3C1AD3B9EDD">
+ <File Id="f_mongodPdb" Name="mongod.pdb" Source="$(var.BinarySource)\mongod.pdb"
+ DiskId ="1" KeyPath="yes"/>
+ </Component>
+ <Component Id="c_mongodump" Guid="FFE32884-ACAD-4EC6-AF84-6BC94F55819E">
+ <File Id="f_mongodump" Name="mongodump.exe" Source="$(var.ToolBinarySource)\mongodump.exe"
+ DiskId ="1" KeyPath="yes"/>
+ </Component>
+ <Component Id="c_mongoexport" Guid="FD5FFDE2-53A1-45F3-9CCA-3AC311DF647C">
+ <File Id="f_mongoexport" Name="mongoexport.exe" Source="$(var.ToolBinarySource)\mongoexport.exe"
+ DiskId ="1" KeyPath="yes"/>
+ </Component>
+ <Component Id="c_mongofiles" Guid="CF8696D3-92B4-4CB9-B4D0-16155D726FE6">
+ <File Id="f_mongofiles" Name="mongofiles.exe" Source="$(var.ToolBinarySource)\mongofiles.exe"
+ DiskId ="1" KeyPath="yes"/>
+ </Component>
+ <Component Id="c_mongoimport" Guid="A4C06F69-2BB3-4068-A7E7-25347CCF01DE">
+ <File Id="f_mongoimport" Name="mongoimport.exe" Source="$(var.ToolBinarySource)\mongoimport.exe"
+ DiskId ="1" KeyPath="yes"/>
+ </Component>
+ <Component Id="c_mongooplog" Guid="FAD84CBB-4666-4C22-A0DF-E1D2AEEC1601">
+ <File Id="f_mongooplog" Name="mongooplog.exe" Source="$(var.ToolBinarySource)\mongooplog.exe"
+ DiskId ="1" KeyPath="yes"/>
+ </Component>
+ <Component Id="c_mongoperf" Guid="B046CCD2-39DC-4CB4-8A58-A7790148C41E">
+ <File Id="f_mongoperf" Name="mongoperf.exe" Source="$(var.BinarySource)\mongoperf.exe"
+ DiskId ="1" KeyPath="yes"/>
+ </Component>
+ <Component Id="c_mongorestore" Guid="72A16D11-242E-4368-93C9-5F6162C548FC">
+ <File Id="f_mongorestore" Name="mongorestore.exe" Source="$(var.ToolBinarySource)\mongorestore.exe"
+ DiskId ="1" KeyPath="yes"/>
+ </Component>
+ <Component Id="c_mongos" Guid="3CA63864-9FA0-4DAE-A664-2BE9A157FB60">
+ <File Id="f_mongos" Name="mongos.exe" Source="$(var.BinarySource)\mongos.exe"
+ DiskId ="1" KeyPath="yes"/>
+ </Component>
+ <Component Id="c_mongosPdb" Guid="F1694AB8-4B0D-4096-AD67-948063FF2A6C">
+ <File Id="f_mongosPdb" Name="mongos.pdb" Source="$(var.BinarySource)\mongos.pdb"
+ DiskId ="1" KeyPath="yes"/>
+ </Component>
+ <Component Id="c_mongostat" Guid="0A881C85-AB39-4247-BADD-C8191F2FFF0C">
+ <File Id="f_mongostat" Name="mongostat.exe" Source="$(var.ToolBinarySource)\mongostat.exe"
+ DiskId ="1" KeyPath="yes"/>
+ </Component>
+ <Component Id="c_mongotop" Guid="616C562D-0504-4F2D-A6E7-CC21A58F9F81">
+ <File Id="f_mongotop" Name="mongotop.exe" Source="$(var.ToolBinarySource)\mongotop.exe"
+ DiskId ="1" KeyPath="yes"/>
+ </Component>
+ <?if $(var.Edition) = Enterprise ?>
+ <Component Id="c_mongodecrypt" Guid="B81B0CED-8CAD-4A92-BABC-7C473BBFF44E">
+ <File Id="f_mongodecrypt" Name="mongodecrypt.exe" Source="$(var.EnterpriseToolBinarySource)\mongodecrypt.exe"
+ DiskId="1" KeyPath="yes"/>
+ </Component>
+ <Component Id="c_mongoldap" Guid="553E4E3D-ED32-4ABA-8F27-3A7525C3145C">
+ <File Id="f_mongoldap" Name="mongoldap.exe" Source="$(var.EnterpriseToolBinarySource)\mongoldap.exe"
+ DiskId="1" KeyPath="yes"/>
+ </Component>
+ <Component Id="c_sasl" Guid="6632B1B8-9F0C-452C-9101-BE6044471CAC">
+ <File Id="f_sasl" Name="libsasl.dll" Source="$(var.SaslSource)\libsasl.dll"
+ DiskId="1" KeyPath="yes" />
+ </Component>
+ <Component Id="c_saslPdb" Guid="84DE7D8C-A6D6-4A23-935F-F0FFE3BBC52B">
+ <File Id="f_saslPdb" Name="libsasl.pdb" Source="$(var.SaslSource)\libsasl.pdb"
+ DiskId="1" KeyPath="yes" />
+ </Component>
+ <Component Id="c_snmp" Guid="F5E5A889-FC9F-4B9A-BEFD-C8ABC9A92D8D">
+ <File Id="f_ssnmp" Name="netsnmp.dll" Source="$(var.SnmpSource)\netsnmp.dll"
+ DiskId="1" KeyPath="yes" />
+ </Component>
+ <Component Id="c_snmpPdb" Guid="6AAB0ACE-C354-4D3A-B490-2AA235647AB3">
+ <File Id="f_snmpPdb" Name="netsnmp.pdb" Source="$(var.SnmpSource)\netsnmp.pdb"
+ DiskId="1" KeyPath="yes" />
+ </Component>
+ <?endif ?>
+ <?if $(var.Edition) = Enterprise Or $(var.Edition) = SSL ?>
+ <Component Id="c_ssleay" Guid="8879033A-F4F7-4879-A7F8-4D81355A47E3">
+ <File Id="f_ssleay" Name="ssleay32.dll" Source="$(var.SslSource)\ssleay32.dll"
+ DiskId="1" KeyPath="yes" />
+ </Component>
+ <Component Id="c_libeay" Guid="E6CC6AA5-AC71-45EC-803C-71F816E33135">
+ <File Id="f_libeay" Name="libeay32.dll" Source="$(var.SslSource)\libeay32.dll"
+ DiskId="1" KeyPath="yes" />
+ </Component>
+ <?endif ?>
+ </DirectoryRef>
+ <?if $(var.Edition) = Enterprise ?>
+ <DirectoryRef Id="SNMP">
+ <Component Id="c_snmpReadme" Guid="B968FBAC-1813-4039-9FED-A607A0E4CBB3">
+ <File Id="f_snmpReadme" Name="README-snmp.txt" Source="$(var.EnterpriseBase)\docs\README-snmp.txt"
+ DiskId="1" KeyPath="yes" />
+ </Component>
+ <Component Id="c_snmpConfMaster" Guid="0C8CAA6C-1473-4B14-9EE5-AF5A35B1DD8D">
+ <File Id="f_snmpConfMaster" Name="mongod.conf.master" Source="$(var.EnterpriseBase)\docs\mongod.conf.master"
+ DiskId="1" KeyPath="yes" />
+ </Component>
+ <Component Id="c_snmpConfSubagent" Guid="6FB66102-41A7-41BD-BB1F-1987E150FA78">
+ <File Id="f_snmpConfSubagent" Name="mongod.conf.subagent" Source="$(var.EnterpriseBase)\docs\mongod.conf.subagent"
+ DiskId="1" KeyPath="yes" />
+ </Component>
+ <Component Id="c_snmpMongodMib" Guid="F3E98C6B-FE42-44E7-8A1F-E47BDDD0A3D7">
+ <File Id="f_snmpMongodMib" Name="MONGOD-MIB.txt" Source="$(var.EnterpriseBase)\docs\MONGOD-MIB.txt"
+ DiskId="1" KeyPath="yes" />
+ </Component>
+ <Component Id="c_snmpMongodbincMib" Guid="58c6bd8e-a785-48a0-af48-42f6bf9f68b4">
+ <File Id="f_snmpMongodbincMib" Name="MONGODBINC-MIB.txt" Source="$(var.EnterpriseBase)\docs\MONGODBINC-MIB.txt"
+ DiskId="1" KeyPath="yes" />
+ </Component>
+ </DirectoryRef>
+ <?endif ?>
+
+
+ <?if $(var.Edition) = Enterprise or $(var.Edition) = SSL ?>
+ <DirectoryRef Id="TARGETDIR">
+ <Merge Id="m_vcredist" SourceFile="$(var.MergeModulesBasePath)\Microsoft_VC140_CRT_x64.msm" DiskId="1" Language="0"/>
+ </DirectoryRef>
+ <?endif ?>
+
+ <?if $(var.Edition) = Enterprise ?>
+ <ComponentGroup Id="cg_EnterpriseBase">
+ <ComponentRef Id="c_sasl" />
+ <ComponentRef Id="c_saslPdb" />
+ <ComponentRef Id="c_ssleay" />
+ <ComponentRef Id="c_libeay" />
+ </ComponentGroup>
+ <ComponentGroup Id="cg_EnterpriseServer">
+ <ComponentGroupRef Id="cg_EnterpriseBase" />
+ <ComponentRef Id="c_snmp" />
+ <ComponentRef Id="c_snmpPdb" />
+ <ComponentRef Id="c_snmpReadme" />
+ <ComponentRef Id="c_snmpConfMaster" />
+ <ComponentRef Id="c_snmpConfSubagent" />
+ <ComponentRef Id="c_snmpMongodMib" />
+ <ComponentRef Id="c_snmpMongodbincMib" />
+ </ComponentGroup>
+ <?endif ?>
+
+ <?if $(var.Edition) = SSL ?>
+ <ComponentGroup Id="cg_SSLBase">
+ <ComponentRef Id="c_ssleay" />
+ <ComponentRef Id="c_libeay" />
+ </ComponentGroup>
+ <?endif ?>
+ </Fragment>
+</Wix>
diff --git a/src/mongo/installer/msi/wxs/FeatureFragment.wxs b/src/mongo/installer/msi/wxs/FeatureFragment.wxs index 1f8dff61d73..a8c65b61543 100644 --- a/src/mongo/installer/msi/wxs/FeatureFragment.wxs +++ b/src/mongo/installer/msi/wxs/FeatureFragment.wxs @@ -1,106 +1,113 @@ -<?xml version="1.0" encoding="utf-8"?> -<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> - <Fragment> - <?if $(var.Edition) = Enterprise ?> - <WixVariable Id="MiscToolsDesc" Value="Miscellaneous MongoDB tools (bsondump, mongodecrypt, mongofiles, mongoldap, mongooplog, mongoperf)" /> - <?else?> - <WixVariable Id="MiscToolsDesc" Value="Miscellaneous MongoDB tools (bsondump, mongofiles, mongooplog, mongoperf)" /> - <?endif?> - <FeatureGroup Id="fg_MongoDBAll"> - <Feature Id="ProductFeature" - Title="!(wix.ProductName)" - Description="!(wix.ProductName)" - Level="1" - ConfigurableDirectory="INSTALLLOCATION"> - <?if $(var.Edition) = Enterprise or $(var.Edition) = SSL ?> - <MergeRef Id="m_vcredist"/> - <?endif?> - <ComponentGroupRef Id="cg_License" /> - <Feature Id="Server" - Title ="Server" - Description="The MongoDB server (mongod)" - Level ="1"> - <ComponentRef Id="c_mongod"/> - <ComponentRef Id="c_mongodPdb"/> - <?if $(var.Edition) = Enterprise ?> - <ComponentGroupRef Id="cg_EnterpriseServer" /> - <?endif ?> - <?if $(var.Edition) = SSL ?> - <ComponentGroupRef Id="cg_SSLBase" /> - <?endif ?> - </Feature> - <Feature Id="Client" - Title ="Client" - Description="The MongoDB client/shell (mongo)" - Level ="1"> - <ComponentRef Id="c_mongo"/> - <?if $(var.Edition) = Enterprise ?> - <ComponentGroupRef Id="cg_EnterpriseBase" /> - <?endif ?> - <?if $(var.Edition) = SSL ?> - <ComponentGroupRef Id="cg_SSLBase" /> - <?endif ?> - </Feature> - <Feature Id="MonitoringTools" - Title ="Monitoring Tools" - Description="MongoDB monitoring tools (mongostat, mongotop)" - Level ="1"> - <ComponentRef Id="c_mongostat"/> - <ComponentRef Id="c_mongotop"/> - <?if $(var.Edition) = Enterprise ?> - <ComponentGroupRef Id="cg_EnterpriseBase" /> - <?endif ?> - <?if $(var.Edition) = SSL ?> - <ComponentGroupRef Id="cg_SSLBase" /> - <?endif ?> - </Feature> - <Feature Id="ImportExportTools" - Title ="Import/Export Tools" - Description="MongoDB import/export tools (mongodump/mongorestore and mongoexport/mongoimport)" - Level ="1"> - <ComponentRef Id="c_mongodump"/> - <ComponentRef Id="c_mongorestore"/> - <ComponentRef Id="c_mongoexport"/> - <ComponentRef Id="c_mongoimport"/> - <?if $(var.Edition) = Enterprise ?> - <ComponentGroupRef Id="cg_EnterpriseBase" /> - <?endif ?> - <?if $(var.Edition) = SSL ?> - <ComponentGroupRef Id="cg_SSLBase" /> - <?endif ?> - </Feature> - <Feature Id="Router" - Title ="Router" - Description="The MongoDB Router (mongos)" - Level ="1"> - <ComponentRef Id="c_mongos"/> - <ComponentRef Id="c_mongosPdb"/> - <?if $(var.Edition) = Enterprise ?> - <ComponentGroupRef Id="cg_EnterpriseBase" /> - <?endif ?> - <?if $(var.Edition) = SSL ?> - <ComponentGroupRef Id="cg_SSLBase" /> - <?endif ?> - </Feature> - <Feature Id="MiscellaneousTools" - Title ="Miscellaneous Tools" - Description="!(wix.MiscToolsDesc)" - Level ="1"> - <ComponentRef Id="c_bsondump"/> - <ComponentRef Id="c_mongofiles"/> - <ComponentRef Id="c_mongooplog"/> - <ComponentRef Id="c_mongoperf"/> - <?if $(var.Edition) = Enterprise ?> - <ComponentGroupRef Id="cg_EnterpriseBase" /> - <ComponentRef Id="c_mongodecrypt"/> - <ComponentRef Id="c_mongoldap"/> - <?endif ?> - <?if $(var.Edition) = SSL ?> - <ComponentGroupRef Id="cg_SSLBase" /> - <?endif ?> - </Feature> - </Feature> - </FeatureGroup> - </Fragment> -</Wix> - +<?xml version="1.0" encoding="utf-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <?if $(var.Edition) = Enterprise ?>
+ <WixVariable Id="MiscToolsDesc" Value="Miscellaneous MongoDB tools (bsondump, mongodecrypt, mongofiles, mongoldap, mongooplog, mongoperf)" />
+ <?else?>
+ <WixVariable Id="MiscToolsDesc" Value="Miscellaneous MongoDB tools (bsondump, mongofiles, mongooplog, mongoperf)" />
+ <?endif?>
+ <FeatureGroup Id="fg_MongoDBAll">
+ <Feature Id="ProductFeature"
+ Title="!(wix.ProductName)"
+ Description="!(wix.ProductName)"
+ Level="1"
+ ConfigurableDirectory="INSTALLLOCATION">
+ <?if $(var.Edition) = Enterprise or $(var.Edition) = SSL ?>
+ <MergeRef Id="m_vcredist"/>
+ <?endif?>
+ <ComponentGroupRef Id="cg_License" />
+ <Feature Id="Server"
+ Title ="Server"
+ Description="The MongoDB server (mongod)"
+ Level ="1">
+ <ComponentRef Id="c_mongod"/>
+ <ComponentRef Id="c_mongodPdb"/>
+ <?if $(var.Edition) = Enterprise ?>
+ <ComponentGroupRef Id="cg_EnterpriseServer" />
+ <?endif ?>
+ <?if $(var.Edition) = SSL ?>
+ <ComponentGroupRef Id="cg_SSLBase" />
+ <?endif ?>
+ </Feature>
+ <Feature Id="Client"
+ Title ="Client"
+ Description="The MongoDB client/shell (mongo)"
+ Level ="1">
+ <ComponentRef Id="c_mongo"/>
+ <?if $(var.Edition) = Enterprise ?>
+ <ComponentGroupRef Id="cg_EnterpriseBase" />
+ <?endif ?>
+ <?if $(var.Edition) = SSL ?>
+ <ComponentGroupRef Id="cg_SSLBase" />
+ <?endif ?>
+ </Feature>
+ <Feature Id="MonitoringTools"
+ Title ="Monitoring Tools"
+ Description="MongoDB monitoring tools (mongostat, mongotop)"
+ Level ="1">
+ <ComponentRef Id="c_mongostat"/>
+ <ComponentRef Id="c_mongotop"/>
+ <?if $(var.Edition) = Enterprise ?>
+ <ComponentGroupRef Id="cg_EnterpriseBase" />
+ <?endif ?>
+ <?if $(var.Edition) = SSL ?>
+ <ComponentGroupRef Id="cg_SSLBase" />
+ <?endif ?>
+ </Feature>
+ <Feature Id="ImportExportTools"
+ Title ="Import/Export Tools"
+ Description="MongoDB import/export tools (mongodump/mongorestore and mongoexport/mongoimport)"
+ Level ="1">
+ <ComponentRef Id="c_mongodump"/>
+ <ComponentRef Id="c_mongorestore"/>
+ <ComponentRef Id="c_mongoexport"/>
+ <ComponentRef Id="c_mongoimport"/>
+ <?if $(var.Edition) = Enterprise ?>
+ <ComponentGroupRef Id="cg_EnterpriseBase" />
+ <?endif ?>
+ <?if $(var.Edition) = SSL ?>
+ <ComponentGroupRef Id="cg_SSLBase" />
+ <?endif ?>
+ </Feature>
+ <Feature Id="Router"
+ Title ="Router"
+ Description="The MongoDB Router (mongos)"
+ Level ="1">
+ <ComponentRef Id="c_mongos"/>
+ <ComponentRef Id="c_mongosPdb"/>
+ <?if $(var.Edition) = Enterprise ?>
+ <ComponentGroupRef Id="cg_EnterpriseBase" />
+ <?endif ?>
+ <?if $(var.Edition) = SSL ?>
+ <ComponentGroupRef Id="cg_SSLBase" />
+ <?endif ?>
+ </Feature>
+ <Feature Id="MiscellaneousTools"
+ Title ="Miscellaneous Tools"
+ Description="!(wix.MiscToolsDesc)"
+ Level ="1">
+ <ComponentRef Id="c_bsondump"/>
+ <ComponentRef Id="c_mongofiles"/>
+ <ComponentRef Id="c_mongooplog"/>
+ <ComponentRef Id="c_mongoperf"/>
+ <?if $(var.Edition) = Enterprise ?>
+ <ComponentGroupRef Id="cg_EnterpriseBase" />
+ <ComponentRef Id="c_mongodecrypt"/>
+ <ComponentRef Id="c_mongoldap"/>
+ <?endif ?>
+ <?if $(var.Edition) = SSL ?>
+ <ComponentGroupRef Id="cg_SSLBase" />
+ <?endif ?>
+ </Feature>
+ </Feature>
+ </FeatureGroup>
+
+ <!-- This feature only includes the powershell script in installation. WIX
+ requires all components to have a feature and the component is required
+ to bundle the script in the MSI. Display is set to hidden because this
+ feature does not enable or disable anything. -->
+ <Feature Id="InstallCompassFeature" Display="hidden">
+ <ComponentRef Id="InstallCompass" />
+ </Feature>
+ </Fragment>
+</Wix>
diff --git a/src/mongo/installer/msi/wxs/Installer_64.wxs b/src/mongo/installer/msi/wxs/Installer_64.wxs index 83426028ad6..f79c9c3aaf1 100644 --- a/src/mongo/installer/msi/wxs/Installer_64.wxs +++ b/src/mongo/installer/msi/wxs/Installer_64.wxs @@ -1,77 +1,119 @@ -<?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="POWERSHELLVERSION">
+ <RegistrySearch
+ Id="POWERSHELLVERSION"
+ Type="raw"
+ Root="HKLM"
+ Key="SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine\PowerShellVersion"
+ Name="Path" />
+ </Property>
+ <Condition Message="You must have PowerShell 3.0 or higher.">
+ <![CDATA[Installed OR POWERSHELLVERSION >= 3.0]]>
+ </Condition>
+
+ <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]" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command "& '[#InstallCompassScript]' ; exit $$($Error.Count)"" />
+
+ <CustomAction
+ Id="InstallCompassScript"
+ BinaryKey="WixCA"
+ DllEntry="WixQuietExec64"
+ Execute="deferred"
+ Return="check"
+ Impersonate="yes" />
+
+ <InstallExecuteSequence>
+ <Custom Action='InstallCompassScript' After='InstallFiles'>
+ (NOT Installed) AND (SHOULD_INSTALL_COMPASS = 1)
+ </Custom>
+ </InstallExecuteSequence>
+ </Product>
+</Wix>
diff --git a/src/mongo/installer/msi/wxs/LicensingFragment.wxs b/src/mongo/installer/msi/wxs/LicensingFragment.wxs index 7e2ff5ba8cf..ab3ca60414d 100644 --- a/src/mongo/installer/msi/wxs/LicensingFragment.wxs +++ b/src/mongo/installer/msi/wxs/LicensingFragment.wxs @@ -1,56 +1,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> +<?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>
diff --git a/src/mongo/installer/msi/wxs/UIFragment.wxs b/src/mongo/installer/msi/wxs/UIFragment.wxs index 9978fcbc509..779109f9a72 100644 --- a/src/mongo/installer/msi/wxs/UIFragment.wxs +++ b/src/mongo/installer/msi/wxs/UIFragment.wxs @@ -1,42 +1,66 @@ -<?xml version="1.0" encoding="utf-8"?> -<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> - <Fragment> - <UI Id="MongoWixUI"> - <!-- Base our MSI on the FeatureTree based Wix set, and add our custom dialog boxes --> - <UIRef Id="WixUI_FeatureTree" /> - - <Publish Event="NewDialog" Value="MongoSetupTypeDlg" Dialog="LicenseAgreementDlg" Control="Next">LicenseAccepted = "1"</Publish> - <Publish Event="NewDialog" Value="MongoSetupTypeDlg" Dialog="VerifyReadyDlg" Control="Back">WixUI_InstallMode = "InstallTypical" OR WixUI_InstallMode = "InstallComplete"</Publish> - <Publish Event="NewDialog" Value="MongoSetupTypeDlg" Dialog="CustomizeDlg" Control="Back">WixUI_InstallMode = "InstallCustom"</Publish> - - <!-- A custom setup type dialog box with only Complete and Custom buttons --> - <Dialog Id="MongoSetupTypeDlg" X="50" Y="50" Width="370" Height="270" Title="[ProductName] Setup"> - <Control Id="CompleteButton" Type="PushButton" X="40" Y="65" Width="80" Height="17" Text="C&omplete" ToolTip="Complete Installation" TabSkip="no" Default="yes"> - <Publish Property="WixUI_InstallMode" Value="InstallComplete">1</Publish> - <Publish Event="NewDialog" Value="VerifyReadyDlg">1</Publish> - <Publish Event="SetInstallLevel" Value="1000">1</Publish> - </Control> - <Control Id="CustomButton" Type="PushButton" X="40" Y="118" Width="80" Height="17" Text="C&ustom" ToolTip="Custom Installation" TabSkip="no"> - <Publish Property="WixUI_InstallMode" Value="InstallCustom">1</Publish> - <Publish Event="NewDialog" Value="CustomizeDlg">1</Publish> - </Control> - <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="&Back" TabSkip="no"> - <Publish Event="NewDialog" Value="LicenseAgreementDlg">1</Publish> - </Control> - <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Text="&Next" TabSkip="no" Disabled="yes" /> - <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Text="Cancel" TabSkip="no" Cancel="yes"> - <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish> - </Control> - <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" Text="WixUI_Bmp_Banner" TabSkip="no" Disabled="yes" /> - <Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Text="Choose the setup type that best suits your needs" TabSkip="yes" Transparent="yes" NoPrefix="yes" /> - <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Text="{\WixUI_Font_Title}Choose Setup Type" TabSkip="yes" Transparent="yes" NoPrefix="yes" /> - <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" TabSkip="yes" Disabled="yes" /> - <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" TabSkip="yes" Disabled="yes" /> - <Control Id="TypicalText" Type="Text" X="60" Y="85" Width="280" Height="20" Text="All program features will be installed. Requires the most disk space. Recommended for most users." TabSkip="yes" /> - <Control Id="CustomText" Type="Text" X="60" Y="138" Width="280" Height="30" Text="Allows users to choose which program features will be installed and where they will be installed. Recommended for advanced users." TabSkip="yes" /> - </Dialog> - - </UI> - </Fragment> -</Wix> - +<?xml version="1.0" encoding="utf-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
+ <Fragment>
+ <UI Id="MongoWixUI">
+ <!-- Base our MSI on the FeatureTree based Wix set, and add our custom dialog boxes -->
+ <UIRef Id="WixUI_FeatureTree" />
+
+ <Publish Event="NewDialog" Value="MongoSetupTypeDlg" Dialog="LicenseAgreementDlg" Control="Next">LicenseAccepted = "1"</Publish>
+ <Publish Event="NewDialog" Value="MongoSetupTypeDlg" Dialog="CustomizeDlg" Control="Back">WixUI_InstallMode = "InstallCustom"</Publish>
+ <Publish Event="NewDialog" Value="CompassDlg" Dialog="CustomizeDlg" Control="Next"></Publish>
+ <Publish Event="NewDialog" Value="CompassDlg" Dialog="VerifyReadyDlg" Control="Back"></Publish>
+
+ <!-- A custom setup type dialog box with only Complete and Custom buttons -->
+ <Dialog Id="MongoSetupTypeDlg" X="50" Y="50" Width="370" Height="270" Title="[ProductName] Setup">
+ <Control Id="CompleteButton" Type="PushButton" X="40" Y="65" Width="80" Height="17" Text="C&omplete" ToolTip="Complete Installation" TabSkip="no" Default="yes">
+ <Publish Property="WixUI_InstallMode" Value="InstallComplete">1</Publish>
+ <Publish Event="NewDialog" Value="CompassDlg">1</Publish>
+ <Publish Event="SetInstallLevel" Value="1000">1</Publish>
+ </Control>
+ <Control Id="CustomButton" Type="PushButton" X="40" Y="118" Width="80" Height="17" Text="C&ustom" ToolTip="Custom Installation" TabSkip="no">
+ <Publish Property="WixUI_InstallMode" Value="InstallCustom">1</Publish>
+ <Publish Event="NewDialog" Value="CustomizeDlg">1</Publish>
+ </Control>
+ <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="&Back" TabSkip="no">
+ <Publish Event="NewDialog" Value="LicenseAgreementDlg">1</Publish>
+ </Control>
+ <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Text="&Next" TabSkip="no" Disabled="yes" />
+ <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Text="Cancel" TabSkip="no" Cancel="yes">
+ <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
+ </Control>
+ <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" Text="WixUI_Bmp_Banner" TabSkip="no" Disabled="yes" />
+ <Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Text="Choose the setup type that best suits your needs" TabSkip="yes" Transparent="yes" NoPrefix="yes" />
+ <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Text="{\WixUI_Font_Title}Choose Setup Type" TabSkip="yes" Transparent="yes" NoPrefix="yes" />
+ <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" TabSkip="yes" Disabled="yes" />
+ <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" TabSkip="yes" Disabled="yes" />
+ <Control Id="TypicalText" Type="Text" X="60" Y="85" Width="280" Height="20" Text="All program features will be installed. Requires the most disk space. Recommended for most users." TabSkip="yes" />
+ <Control Id="CustomText" Type="Text" X="60" Y="138" Width="280" Height="30" Text="Allows users to choose which program features will be installed and where they will be installed. Recommended for advanced users." TabSkip="yes" />
+ </Dialog>
+
+ <Dialog Id="CompassDlg" X="50" Y="50" Width="370" Height="270" Title="MongoDB Compass">
+ <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" Text="WixUI_Bmp_Banner" TabSkip="no" Disabled="yes" />
+ <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" TabSkip="yes" Disabled="yes" />
+ <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" TabSkip="yes" Disabled="yes" />
+ <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Text="{\WixUI_Font_Title}Install MongoDB Compass" TabSkip="yes" Transparent="yes" NoPrefix="yes" />
+ <Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Text="MongoDB Compass is the official graphical user interface for MongoDB." TabSkip="yes" Transparent="yes" NoPrefix="yes" />
+ <Control Id="LongDescription" Type="Text" X="25" Y="50"
+ Width="280" Height="30" Text="By checking below this installer will automatically download and install the latest version of MongoDB Compass on this machine. You can learn more about MongDB Compass here: https://www.mongodb.com/products/compass" TabSkip="yes" NoPrefix="yes" />
+
+ <Control Id="InstallCompass" CheckBoxValue="1" Property="SHOULD_INSTALL_COMPASS" X="15" Y="243" Width="150" Height="17" Text="Install MongoDB Compass" Type="CheckBox" />
+
+ <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="&Back" TabSkip="no">
+ <Publish Event="NewDialog" Value="MongoSetupTypeDlg">WixUI_InstallMode = "InstallComplete" OR WixUI_InstallMode = "InstallTypical"</Publish>
+ <Publish Event="NewDialog" Value="CustomizeDlg">WixUI_InstallMode = "InstallCustom"</Publish>
+ </Control>
+ <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Text="&Next" TabSkip="no" Disabled="no" >
+ <Publish Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
+ </Control>
+ <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Text="Cancel" TabSkip="no" Cancel="yes">
+ <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
+ </Control>
+ </Dialog>
+
+ <ProgressText Action="InstallCompassScript">Installing MongoDB Compass... (this may take a few minutes)</ProgressText>
+ </UI>
+ </Fragment>
+</Wix>
|