diff options
-rw-r--r-- | .gitignore | 3 | ||||
-rwxr-xr-x | buildscripts/packaging/msi/MongoDB.wixproj | 9 | ||||
-rwxr-xr-x | buildscripts/packaging/msi/MongoDBMsi.sln | 2 | ||||
-rwxr-xr-x | buildscripts/packaging/msi/MongoDB_64.wixproj | 11 | ||||
-rwxr-xr-x | buildscripts/packaging/msi/build32bitmsi.bat | 74 | ||||
-rw-r--r-- | buildscripts/packaging/msi/build64bit2008R2msi.bat | 8 | ||||
-rwxr-xr-x | buildscripts/packaging/msi/build64bitmsi.bat | 8 | ||||
-rw-r--r-- | buildscripts/packaging/msi/buildenterprisemsi.bat | 7 | ||||
-rwxr-xr-x | buildscripts/packaging/msi/wxs/BinaryFragment.wxs | 5 | ||||
-rwxr-xr-x | buildscripts/packaging/msi/wxs/FeatureFragment.wxs | 1 |
10 files changed, 115 insertions, 13 deletions
diff --git a/.gitignore b/.gitignore index 7ff5faaf5e1..698b43caf76 100644 --- a/.gitignore +++ b/.gitignore @@ -164,4 +164,5 @@ buildinfo.cpp *.msi *.wixobj -*.wixpdb
\ No newline at end of file +*.wixpdb +DriverInclude.wxs diff --git a/buildscripts/packaging/msi/MongoDB.wixproj b/buildscripts/packaging/msi/MongoDB.wixproj index bfa7d133ce7..f559ba09392 100755 --- a/buildscripts/packaging/msi/MongoDB.wixproj +++ b/buildscripts/packaging/msi/MongoDB.wixproj @@ -22,17 +22,19 @@ <VerboseOutput>True</VerboseOutput>
</PropertyGroup>
<PropertyGroup>
- <ClientSource Condition=" '$(Source)' == '' ">..\..\..\build\win32\normal\clientlib</ClientSource>
+ <ClientSource Condition=" '$(ClientSource)' == '' ">..\..\..\build\win32\normal\clientlib</ClientSource>
<License Condition=" '$(License)' == '' ">..\..\..\distsrc</License>
<Source Condition=" '$(Source)' == '' ">..\..\..\build\win32\normal\mongo</Source>
<Version Condition=" '$(Version)' == '' ">2.4.0</Version>
- <DefineConstants>MongoDBVersion=$(Version);LicenseSource=$(License);BinarySource=$(Source);Edition=Standard;ProductId=$(ProductId);UpgradeCode=$(UpgradeCode);ClientSource=$(ClientSource)</DefineConstants>
+ <ClientHeaderSource Condition=" '$(ClientHeaderSource)' == '' ">..\..\..\build\win32\normal\clientlib\include</ClientHeaderSource>
+ <DefineConstants>MongoDBVersion=$(Version);LicenseSource=$(License);BinarySource=$(Source);Edition=Standard;ProductId=$(ProductId);UpgradeCode=$(UpgradeCode);ClientSource=$(ClientSource);ClientHeaderSource=$(ClientHeaderSource)</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Compile Include="wxs\BinaryFragment.wxs" />
<Compile Include="wxs\FeatureFragment.wxs" />
<Compile Include="wxs\LicensingFragment.wxs" />
<Compile Include="wxs\Installer.wxs" />
+ <Compile Include="$(OutputPath)DriverInclude.wxs" />
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixUIExtension">
@@ -44,6 +46,9 @@ <Folder Include="wxs\" />
</ItemGroup>
<Import Project="$(WixTargetsPath)" />
+ <PropertyGroup>
+ <PreBuildEvent>"%WIX%\bin\heat.exe" dir $(ClientHeaderSource) -gg -g1 -frag -cg cg_DriverHeaders -nologo -directoryid -out DriverInclude.wxs -dr Header -srd -var var.ClientHeaderSource</PreBuildEvent>
+ </PropertyGroup>
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Wix.targets.
diff --git a/buildscripts/packaging/msi/MongoDBMsi.sln b/buildscripts/packaging/msi/MongoDBMsi.sln index a4bf850400c..a029e91ce5b 100755 --- a/buildscripts/packaging/msi/MongoDBMsi.sln +++ b/buildscripts/packaging/msi/MongoDBMsi.sln @@ -8,7 +8,9 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2E84BEF1-F2D9-4A6B-B102-EC941AF313AF}"
ProjectSection(SolutionItems) = preProject
build32bitmsi.bat = build32bitmsi.bat
+ build64bit2008R2msi.bat = build64bit2008R2msi.bat
build64bitmsi.bat = build64bitmsi.bat
+ buildenterprisemsi.bat = buildenterprisemsi.bat
README.md = README.md
EndProjectSection
EndProject
diff --git a/buildscripts/packaging/msi/MongoDB_64.wixproj b/buildscripts/packaging/msi/MongoDB_64.wixproj index 07ea77c40f9..dc8010f6d98 100755 --- a/buildscripts/packaging/msi/MongoDB_64.wixproj +++ b/buildscripts/packaging/msi/MongoDB_64.wixproj @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -19,7 +19,7 @@ <UpgradeCode Condition=" '$(UpgradeCode)' == '' ">FCF901F6-E963-40B1-9A17-978242068587</UpgradeCode>
</PropertyGroup>
<PropertyGroup>
- <ClientSource Condition=" '$(Source)' == '' ">..\..\..\build\win32\64\client_build</ClientSource>
+ <ClientSource Condition=" '$(ClientSource)' == '' ">..\..\..\build\win32\64\client_build</ClientSource>
<Edition Condition=" '$(Edition)' == '' ">Standard</Edition>
<Flavor Condition=" '$(Flavor)' == '' ">2008R2Plus</Flavor>
<License Condition=" '$(License)' == '' ">..\..\..\distsrc</License>
@@ -29,7 +29,8 @@ <Source Condition=" '$(Source)' == '' ">..\..\..\build\win32\64\mongo</Source>
<SslSource Condition=" '$(SslSource)' == '' ">..\..\..\build\win32\64\mongo</SslSource>
<Version Condition=" '$(Version)' == '' ">2.4.0</Version>
- <DefineConstants>MongoDBVersion=$(Version);LicenseSource=$(License);BinarySource=$(Source);Edition=$(Edition);SaslSource=$(SaslSource);SslSource=$(SslSource);SnmpSource=$(SnmpSource);ProductId=$(ProductId);UpgradeCode=$(UpgradeCode);Flavor=$(Flavor);ClientSource=$(ClientSource);EnterpriseLicenseSource=$(EnterpriseLicense)</DefineConstants>
+ <ClientHeaderSource Condition=" '$(ClientHeaderSource)' == '' ">..\..\..\build\win32\normal\clientlib\include</ClientHeaderSource>
+ <DefineConstants>MongoDBVersion=$(Version);LicenseSource=$(License);BinarySource=$(Source);Edition=$(Edition);SaslSource=$(SaslSource);SslSource=$(SslSource);SnmpSource=$(SnmpSource);ProductId=$(ProductId);UpgradeCode=$(UpgradeCode);Flavor=$(Flavor);ClientSource=$(ClientSource);EnterpriseLicenseSource=$(EnterpriseLicense);ClientHeaderSource=$(ClientHeaderSource)</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<VerboseOutput>True</VerboseOutput>
@@ -39,6 +40,7 @@ <Compile Include="wxs\FeatureFragment.wxs" />
<Compile Include="wxs\Installer_64.wxs" />
<Compile Include="wxs\LicensingFragment.wxs" />
+ <Compile Include="$(OutputPath)DriverInclude.wxs" />
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixUIExtension">
@@ -50,6 +52,9 @@ <Folder Include="wxs\" />
</ItemGroup>
<Import Project="$(WixTargetsPath)" />
+ <PropertyGroup>
+ <PreBuildEvent>"%WIX%\bin\heat.exe" dir $(ClientHeaderSource) -gg -g1 -frag -cg cg_DriverHeaders -nologo -directoryid -out DriverInclude.wxs -dr Header -srd -var var.ClientHeaderSource</PreBuildEvent>
+ </PropertyGroup>
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Wix.targets.
diff --git a/buildscripts/packaging/msi/build32bitmsi.bat b/buildscripts/packaging/msi/build32bitmsi.bat index ca5ac86a5c2..7fdf970eb7e 100755 --- a/buildscripts/packaging/msi/build32bitmsi.bat +++ b/buildscripts/packaging/msi/build32bitmsi.bat @@ -1,8 +1,20 @@ @ECHO OFF
+
SET VERSION=2.4.0
SET BINDIR=..\..\..\build\win32\normal\mongo
SET CLIENTLIBDIR=..\..\..\build\win32\normal\client_build
SET LICENSEDIR=..\..\..\distsrc
+SET CLIENTHEADERDIR=..\..\..\build\win32\normal\client_build\include
+SET WIXBINDIR=C:\Program Files (x86)\WiX Toolset v3.7\bin
+
+SET PLATFORM=x86
+SET GENERATEDWXSDIR=.\wxs
+SET EDITION=Standard
+SET CONFIGURATION=Release
+SET OUTPUTOBJDIR=obj\%CONFIGURATION%\%PLATFORM%\
+SET OUTPUTBINDIR=bin\%CONFIGURATION%\%PLATFORM%\
+SET PROJECTDIR=C:\git\sridharn\mongo\buildscripts\packaging\msi\
+SET TARGETNAME=MongoDB_%VERSION%_%PLATFORM%_%EDITION%
:loop
IF NOT "%1"=="" (
@@ -22,9 +34,67 @@ IF NOT "%1"=="" ( SET CLIENTLIBDIR=%2
SHIFT
)
+ IF "%1"=="-clientheaderdir" (
+ SET CLIENTHEADERDIR=%2
+ SHIFT
+ )
+ IF "%1"=="-wixbindir" (
+ SET WIXBINDIR=%2
+ SHIFT
+ )
+ IF "%1"=="-generatedwxsdir" (
+ SET GENERATEDWXSDIR=%2
+ SHIFT
+ )
SHIFT
GOTO :loop
)
-ECHO Building msi for version %VERSION% with binaries from %BINDIR% and license files from %LICENSEDIR%
-%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\msbuild /p:Configuration=Release;Version=%VERSION%;License=%LICENSEDIR%;Source=%BINDIR%;ClientSource=%CLIENTLIBDIR% MongoDB.wixproj
\ No newline at end of file +REM ECHO Building msi for version %VERSION% with binaries from %BINDIR% and license files from %LICENSEDIR%
+REM %WINDIR%\Microsoft.NET\Framework64\v4.0.30319\msbuild /p:Configuration=Release;Version=%VERSION%;License=%LICENSEDIR%;
+REM Source=%BINDIR%;ClientSource=%CLIENTLIBDIR%;ClientHeaderSource=%CLIENTHEADERDIR% MongoDB.wixproj
+
+ECHO Generating %GENERATEDWXSDIR%\DriverInclude.wxs from sources at %CLIENTHEADERDIR%
+"%WIXBINDIR%\heat.exe" dir %CLIENTHEADERDIR% -gg -g1 -frag -cg cg_DriverHeaders -nologo -directoryid -out %GENERATEDWXSDIR%\DriverInclude.wxs -dr Header -srd -var var.ClientHeaderSource
+
+ECHO Compiling wxs files to obj
+"%WIXBINDIR%\candle.exe" -wx^
+ -dMongoDBVersion=%VERSION%^
+ -dLicenseSource=%LICENSEDIR%^
+ -dBinarySource=%BINDIR%^
+ -dEdition=%EDITION%^
+ -d"ProductId=*"^
+ -dUpgradeCode=867C1D1D-2040-4E90-B04E-1158F9CBDE96^
+ -dClientSource=%CLIENTLIBDIR%^
+ -dClientHeaderSource=%CLIENTHEADERDIR%^
+ -dConfiguration=%CONFIGURATION%^
+ -dOutDir=%OUTPUTBINDIR%^
+ -dPlatform=%PLATFORM%^
+ -dProjectDir=%PROJECTDIR%^
+ -dProjectExt=.wixproj^
+ -dProjectFileName=MongoDB.wixproj^
+ -dProjectName=MongoDB^
+ -dProjectPath=%PROJECTDIR%\MongoDB.wixproj^
+ -dTargetDir=%OUTPUTBINDIR%^
+ -dTargetExt=.msi^
+ -dTargetFileName=%TARGETNAME%.msi^
+ -dTargetName=%TARGETNAME%^
+ -dTargetPath=%OUTPUTBINDIR%\%TARGETNAME%.msi^
+ -out %OUTPUTOBJDIR%^
+ -arch %PLATFORM%^
+ -ext "%WIXBINDIR%\WixUIExtension.dll"^
+ wxs\BinaryFragment.wxs wxs\FeatureFragment.wxs wxs\LicensingFragment.wxs wxs\Installer.wxs %GENERATEDWXSDIR%\DriverInclude.wxs
+
+ECHO Linking to msi
+"%WIXBINDIR%\Light.exe"^
+ -out %OUTPUTBINDIR%\%TARGETNAME%.msi^
+ -pdbout %OUTPUTBINDIR%\%TARGETNAME%.wixpdb^
+ -wx -cultures:null^
+ -ext "%WIXBINDIR%\WixUIExtension.dll"^
+ -contentsfile %OUTPUTOBJDIR%\MongoDB.wixproj.BindContentsFileListnull.txt^
+ -outputsfile %OUTPUTOBJDIR%\MongoDB.wixproj.BindOutputsFileListnull.txt^
+ -builtoutputsfile %OUTPUTOBJDIR%\MongoDB.wixproj.BindBuiltOutputsFileListnull.txt^
+ -wixprojectfile %PROJECTDIR%\MongoDB.wixproj^
+ %OUTPUTOBJDIR%\BinaryFragment.wixobj %OUTPUTOBJDIR%\FeatureFragment.wixobj^
+ %OUTPUTOBJDIR%\\LicensingFragment.wixobj %OUTPUTOBJDIR%\Installer.wixobj^
+ %OUTPUTOBJDIR%\DriverInclude.wixobj
diff --git a/buildscripts/packaging/msi/build64bit2008R2msi.bat b/buildscripts/packaging/msi/build64bit2008R2msi.bat index 3f4bd9df9e3..1dc0938ea94 100644 --- a/buildscripts/packaging/msi/build64bit2008R2msi.bat +++ b/buildscripts/packaging/msi/build64bit2008R2msi.bat @@ -5,6 +5,8 @@ SET CLIENTLIBDIR=..\..\..\build\win32\64\client_build SET LICENSEDIR=..\..\..\distsrc
SET EDITION=Standard
SET FLAVOR=2008R2Plus
+SET CLIENTHEADERDIR=..\..\..\build\win32\normal\client_build\include
+
:loop
IF NOT "%1"=="" (
IF "%1"=="-version" (
@@ -23,9 +25,13 @@ IF NOT "%1"=="" ( SET CLIENTLIBDIR=%2
SHIFT
)
+ IF "%1"=="-clientheaderdir" (
+ SET CLIENTHEADERDIR=%2
+ SHIFT
+ )
SHIFT
GOTO :loop
)
ECHO Building msi for version %VERSION% with binaries from %BINDIR% and license files from %LICENSEDIR%
-%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\msbuild /p:Configuration=Release;Version=%VERSION%;License=%LICENSEDIR%;Source=%BINDIR%;Edition=%EDITION%;Flavor=%FLAVOR%;ClientSource=%CLIENTLIBDIR% MongoDB_64.wixproj
\ No newline at end of file +%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\msbuild /p:Configuration=Release;Version=%VERSION%;License=%LICENSEDIR%;Source=%BINDIR%;Edition=%EDITION%;Flavor=%FLAVOR%;ClientSource=%CLIENTLIBDIR%;ClientHeaderSource=%CLIENTHEADERDIR% MongoDB_64.wixproj
\ No newline at end of file diff --git a/buildscripts/packaging/msi/build64bitmsi.bat b/buildscripts/packaging/msi/build64bitmsi.bat index bc46d355c1e..ccc6f83f9fa 100755 --- a/buildscripts/packaging/msi/build64bitmsi.bat +++ b/buildscripts/packaging/msi/build64bitmsi.bat @@ -5,6 +5,8 @@ SET CLIENTLIBDIR=..\..\..\build\win32\64\client_build SET LICENSEDIR=..\..\..\distsrc
SET EDITION=Standard
SET FLAVOR=2008
+SET CLIENTHEADERDIR=..\..\..\build\win32\normal\client_build\include
+
:loop
IF NOT "%1"=="" (
IF "%1"=="-version" (
@@ -23,9 +25,13 @@ IF NOT "%1"=="" ( SET CLIENTLIBDIR=%2
SHIFT
)
+ IF "%1"=="-clientheaderdir" (
+ SET CLIENTHEADERDIR=%2
+ SHIFT
+ )
SHIFT
GOTO :loop
)
ECHO Building msi for version %VERSION% with binaries from %BINDIR% and license files from %LICENSEDIR%
-%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\msbuild /p:Configuration=Release;Version=%VERSION%;License=%LICENSEDIR%;Source=%BINDIR%;Edition=%EDITION%;Flavor=%FLAVOR%;ClientSource=%CLIENTLIBDIR% MongoDB_64.wixproj
\ No newline at end of file +%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\msbuild /p:Configuration=Release;Version=%VERSION%;License=%LICENSEDIR%;Source=%BINDIR%;Edition=%EDITION%;Flavor=%FLAVOR%;ClientSource=%CLIENTLIBDIR%;ClientHeaderSource=%CLIENTHEADERDIR% MongoDB_64.wixproj
\ No newline at end of file diff --git a/buildscripts/packaging/msi/buildenterprisemsi.bat b/buildscripts/packaging/msi/buildenterprisemsi.bat index bf47d33019b..a9e999902cd 100644 --- a/buildscripts/packaging/msi/buildenterprisemsi.bat +++ b/buildscripts/packaging/msi/buildenterprisemsi.bat @@ -9,6 +9,7 @@ SET FLAVOR=2008R2Plus SET SASLDIR=..\..\..\..\..\..\Utils\sasl\bin
SET OPENSSLDIR=..\..\..\..\..\..\Utils\ssl\bin
SET SNMPDIR=..\..\..\..\..\..\Utils\snmp\bin
+SET CLIENTHEADERDIR=..\..\..\build\win32\normal\client_build\include
:loop
IF NOT "%1"=="" (
@@ -44,10 +45,14 @@ IF NOT "%1"=="" ( SET ENTERPRISELICENSEDIR=%2
SHIFT
)
+ IF "%1"=="-clientheaderdir" (
+ SET CLIENTHEADERDIR=%2
+ SHIFT
+ )
SHIFT
GOTO :loop
)
ECHO Building enterprise msi for version %VERSION% with binaries from %BINDIR%, sasl from %SASLDIR%, ssl from %OPENSSLDIR%, snmp from %SNMPDIR% and license files from %LICENSEDIR%
-%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\msbuild /p:Configuration=Release;Version=%VERSION%;License=%LICENSEDIR%;Source=%BINDIR%;SaslSource=%SASLDIR%;SnmpSource=%SNMPDIR%;SslSource=%OPENSSLDIR%;Edition=%EDITION%;Flavor=%FLAVOR%;ClientSource=%CLIENTLIBDIR%;EnterpriseLicense=%ENTERPRISELICENSEDIR% MongoDB_64.wixproj
\ No newline at end of file +%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\msbuild /p:Configuration=Release;Version=%VERSION%;License=%LICENSEDIR%;Source=%BINDIR%;SaslSource=%SASLDIR%;SnmpSource=%SNMPDIR%;SslSource=%OPENSSLDIR%;Edition=%EDITION%;Flavor=%FLAVOR%;ClientSource=%CLIENTLIBDIR%;EnterpriseLicense=%ENTERPRISELICENSEDIR%;ClientHeaderSource=%CLIENTHEADERDIR% MongoDB_64.wixproj
\ No newline at end of file diff --git a/buildscripts/packaging/msi/wxs/BinaryFragment.wxs b/buildscripts/packaging/msi/wxs/BinaryFragment.wxs index a4ab27b2d43..1e7fce2e3b4 100755 --- a/buildscripts/packaging/msi/wxs/BinaryFragment.wxs +++ b/buildscripts/packaging/msi/wxs/BinaryFragment.wxs @@ -104,7 +104,7 @@ <Component Id="c_mongoclientexp" Guid="E95F4011-1E88-4A53-807F-F43175864EAF">
<File Id="f_mongoclientexp" Name="mongoclient.exp" Source="$(var.ClientSource)\mongoclient.exp"
DiskId="1" KeyPath="yes" />
- </Component>
+ </Component> <?if $(var.Edition) = Enterprise ?>
<Component Id="c_driversasl" Guid="E51F24ED-3464-4B01-B825-C9F1219181A0">
<File Id="f_driversasl" Name="libsasl.dll" Source="$(var.SaslSource)\libsasl.dll"
@@ -130,7 +130,8 @@ <File Id="f_driversnmpPdb" Name="netsnmp.pdb" Source="$(var.SnmpSource)\netsnmp.pdb"
DiskId="1" KeyPath="yes" />
</Component>
- <?endif ?>
+ <?endif ?> + <Directory Id="Header" Name="Header" /> </Directory>
</DirectoryRef>
diff --git a/buildscripts/packaging/msi/wxs/FeatureFragment.wxs b/buildscripts/packaging/msi/wxs/FeatureFragment.wxs index a4725ea27f2..225cc18e229 100755 --- a/buildscripts/packaging/msi/wxs/FeatureFragment.wxs +++ b/buildscripts/packaging/msi/wxs/FeatureFragment.wxs @@ -82,6 +82,7 @@ <?if $(var.Edition) = Enterprise ?>
<ComponentGroupRef Id="cg_DriverEnterprise" />
<?endif ?>
+ <ComponentGroupRef Id="cg_DriverHeaders"/>
</Feature>
</Feature>
</FeatureGroup>
|