Skip to content

Commit f62e30d

Browse files
committed
fixing up build scripts
1 parent 429beb2 commit f62e30d

File tree

4 files changed

+20
-83
lines changed

4 files changed

+20
-83
lines changed

Installer/Frameworks.wxs

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
33
<Fragment>
44
<DirectoryRef Id="INSTALLDIR">
5-
<Directory Id="net35Folder" Name="net35" />
6-
<Directory Id="net40Folder" Name="net40" />
7-
</DirectoryRef>
8-
9-
<DirectoryRef Id="net35Folder">
105
<Component Id="c_net35BsonDll" Guid="13DA8DD9-1AD1-46BF-971A-78FA499F281D">
116
<File Id="f_net35BsonDll" Name="MongoDB.Bson.dll" Source="$(var.SourceBase)\artifacts\net35\build\MongoDB.Bson.dll"
127
DiskId ="1" KeyPath="yes" />
@@ -42,42 +37,6 @@
4237
<ComponentRef Id="c_net35DriverXml"/>
4338
</ComponentGroup>
4439

45-
<DirectoryRef Id="net40Folder">
46-
<Component Id="c_net40BsonDll" Guid="ec7c163e-dfd7-4063-ba49-e91dcde34126">
47-
<File Id="f_net40BsonDll" Name="MongoDB.Bson.dll" Source="$(var.SourceBase)\artifacts\net40\build\MongoDB.Bson.dll"
48-
DiskId ="1" KeyPath="yes" />
49-
</Component>
50-
<Component Id="c_net40BsonPdb" Guid="26d1d6d9-13d7-435b-912b-efa23c562b8f">
51-
<File Id="f_net40BsonPdb" Name="MongoDB.Bson.pdb" Source="$(var.SourceBase)\artifacts\net40\build\MongoDB.Bson.pdb"
52-
DiskId ="1" KeyPath="yes" />
53-
</Component>
54-
<Component Id="c_net40BsonXml" Guid="8a703382-523e-4c5d-b84e-829ce17e74a8">
55-
<File Id="f_net40BsonXml" Name="MongoDB.Bson.xml" Source="$(var.SourceBase)\artifacts\net40\build\MongoDB.Bson.XML"
56-
DiskId ="1" KeyPath="yes" />
57-
</Component>
58-
<Component Id="c_net40DriverDll" Guid="05ed77f8-c1b9-49eb-a893-0144c2128593">
59-
<File Id="f_net40DriverDll" Name="MongoDB.Driver.dll" Source="$(var.SourceBase)\artifacts\net40\build\MongoDB.Driver.dll"
60-
DiskId ="1" KeyPath="yes" />
61-
</Component>
62-
<Component Id="c_net40DriverPdb" Guid="3f6d49e7-9f1f-4a2c-9512-a7fc8abfaf8c">
63-
<File Id="f_net40DriverPdb" Name="MongoDB.Driver.pdb" Source="$(var.SourceBase)\artifacts\net40\build\MongoDB.Driver.pdb"
64-
DiskId ="1" KeyPath="yes" />
65-
</Component>
66-
<Component Id="c_net40DriverXml" Guid="36054a9a-35cc-4f42-b52d-e46eec2965c4">
67-
<File Id="f_net40DriverXml" Name="MongoDB.Driver.XML" Source="$(var.SourceBase)\artifacts\net40\build\MongoDB.Driver.XML"
68-
DiskId ="1" KeyPath="yes" />
69-
</Component>
70-
</DirectoryRef>
71-
72-
<ComponentGroup Id="cg_net40">
73-
<ComponentRef Id="c_net40BsonDll"/>
74-
<ComponentRef Id="c_net40BsonPdb"/>
75-
<ComponentRef Id="c_net40BsonXml"/>
76-
<ComponentRef Id="c_net40DriverDll"/>
77-
<ComponentRef Id="c_net40DriverPdb"/>
78-
<ComponentRef Id="c_net40DriverXml"/>
79-
</ComponentGroup>
80-
8140
<Feature Id="FrameworksFeature"
8241
Title ="Frameworks"
8342
Description="The supported frameworks."
@@ -90,13 +49,6 @@
9049
AllowAdvertise="no">
9150
<ComponentGroupRef Id="cg_net35" />
9251
</Feature>
93-
<Feature Id="net40Feature"
94-
Title =".NET 4.0"
95-
Description="Install support for .NET 4.0."
96-
Level ="1"
97-
AllowAdvertise="no">
98-
<ComponentGroupRef Id="cg_net40" />
99-
</Feature>
10052
</Feature>
10153
</Fragment>
10254
</Wix>

Installer/Product.wxs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,18 @@
4040
<Shortcut Id="f_ReleaseNotesShortCut"
4141
Name="Release Notes"
4242
Description="Release notes for MongoDB CSharp Driver"
43-
Target="[INSTALLDIR]ReleaseNotes.txt"
43+
Target="[INSTALLDIR]Release Notes.txt"
4444
WorkingDirectory="INSTALLDIR"
4545
Directory="CSharpDriverProgramsFolder"/>
46-
<RemoveFolder Id="r_CSharpDriverProgramsFolder" Directory="CSharpDriverProgramsFolder" On="uninstall" />
47-
<RemoveFolder Id="r_MongoDBProgramsFolder" Directory="MongoDBProgramsFolder" On="uninstall" />
46+
<RemoveFolder Id="CSharpDriverProgramsFolder" Directory="CSharpDriverProgramsFolder" On="uninstall" />
47+
<RemoveFolder Id="MongoDBProgramsFolder" Directory="MongoDBProgramsFolder" On="uninstall" />
4848
<RegistryValue Root="HKCU" Key="Software\MongoDB" Name="releasenotesinstalled" Type="integer" Value="1" KeyPath="yes"/>
4949
</Component>
5050
<Component Id="c_HelpShortCut" Guid="B256E367-EA97-48C5-A546-49F4A0803682">
5151
<Shortcut Id="f_HelpShortCut"
52-
Name="Help"
52+
Name="CSharpDriverDocs"
5353
Description="Help for !(WixProductName)"
54-
Target="[INSTALLDIR]Documentation.chm"
54+
Target="[INSTALLDIR]CSharpDriverDocs.chm"
5555
WorkingDirectory="INSTALLDIR"/>
5656
<RegistryValue Root="HKCU" Key="Software\MongoDB" Name="helpinstalled" Type="integer" Value="1" KeyPath="yes"/>
5757
</Component>
@@ -63,11 +63,11 @@
6363
DiskId ="1" KeyPath="yes" />
6464
</Component>
6565
<Component Id="c_ReleaseNotes" Guid="115F1B08-8A38-435A-BBB0-0C0DED5ACB31">
66-
<File Id="f_ReleaseNotes" Name="ReleaseNotes.txt" Source="$(var.SourceBase)\$(var.ReleaseNotes)"
66+
<File Id="f_ReleaseNotes" Name="Release Notes.txt" Source="$(var.SourceBase)\$(var.ReleaseNotes)"
6767
DiskId ="1" KeyPath="yes" />
6868
</Component>
6969
<Component Id="c_Help" Guid="CC3F9A2F-1C43-48CA-B998-D03C15181DD3">
70-
<File Id="f_Help" Name="Help.chm" Source="$(var.SourceBase)\$(var.Documentation)"
70+
<File Id="f_Help" Name="CSharpDriverDocs.chm" Source="$(var.SourceBase)\$(var.Documentation)"
7171
DiskId ="1" KeyPath="yes" />
7272
</Component>
7373
</DirectoryRef>

build.ps1

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ Properties {
66

77
$version = "$base_version.$build_number"
88
$sem_version = $base_version
9+
$short_version = Get-ShortenedVersion $sem_version
910
if(-not [string]::IsNullOrEmpty($version_status)) {
10-
$sem_version = "$base_version-$($version_status)-$build_number"
11+
$sem_version = "$sem_version-$($version_status)-$build_number"
12+
$short_version = "$short_version-$($version_status)-$build_number"
1113
}
1214
$release_notes_version = Get-ShortenedVersion $base_version
1315
$config = 'Release'
14-
$installer_product_id = [System.Guid]::Parse($git_commit.Hash.SubString(0,32))
15-
$installer_upgrade_code = [System.Guid]::Parse($git_commit.Hash.SubString(1,32))
16+
$installer_product_id = New-Object System.Guid($git_commit.Hash.SubString(0,32))
17+
$installer_upgrade_code = New-Object System.Guid($git_commit.Hash.SubString(1,32))
1618

1719
Write-Host "$config Version $sem_version($version)" -ForegroundColor Yellow
18-
20+
1921
$base_dir = Split-Path $psake.build_script_file
2022
$src_dir = "$base_dir"
2123
$tools_dir = "$base_dir\tools"
@@ -31,7 +33,7 @@ Properties {
3133
$docs_file = "$base_dir\Docs\Api\CSharpDriverDocs.shfbproj"
3234
$installer_file = "$base_dir\Installer\CSharpDriverInstaller.wixproj"
3335
$nuspec_file = "$base_dir\mongocsharpdriver.nuspec"
34-
$chm_file = "$artifacts_dir\CSharpDriverDocs-$sem_version.chm"
36+
$chm_file = "$artifacts_dir\CSharpDriverDocs-$short_version.chm"
3537
$release_notes_file = "$base_dir\Release Notes\Release Notes v$release_notes_version.md"
3638
$license_file = "$base_dir\License.txt"
3739

@@ -107,8 +109,7 @@ Task Docs -precondition { BuildHasBeenRun } {
107109

108110
mv "$docs_dir\CSharpDriverDocs.chm" $chm_file
109111
mv "$docs_dir\Index.html" "$docs_dir\index.html"
110-
Exec { &$zip_tool a "$artifacts_dir\CSharpDriverDocs-$sem_version-html.zip" "$docs_dir\*" }
111-
112+
Exec { &$zip_tool a "$artifacts_dir\CSharpDriverDocs-$short_version-html.zip" "$docs_dir\*" }
112113
RemoveDirectory $docs_dir
113114
}
114115

@@ -119,29 +120,19 @@ task Zip -precondition { (BuildHasBeenRun) -and (DocsHasBeenRun) }{
119120

120121
mkdir -p $zip_dir | out-null
121122

122-
mkdir -p $zip_dir\net35 | out-null
123123
$35_items = @("$35_build_dir\MongoDB.Bson.dll", `
124124
"$35_build_dir\MongoDB.Bson.pdb", `
125125
"$35_build_dir\MongoDB.Bson.xml", `
126126
"$35_build_dir\MongoDB.Driver.dll", `
127127
"$35_build_dir\MongoDB.Driver.pdb", `
128128
"$35_build_dir\MongoDB.Driver.xml")
129-
cp $35_items "$zip_dir\net35"
130-
131-
mkdir -p $zip_dir\net40 | out-null
132-
$40_items = @("$40_build_dir\MongoDB.Bson.dll", `
133-
"$40_build_dir\MongoDB.Bson.pdb", `
134-
"$40_build_dir\MongoDB.Bson.xml", `
135-
"$40_build_dir\MongoDB.Driver.dll", `
136-
"$40_build_dir\MongoDB.Driver.pdb", `
137-
"$40_build_dir\MongoDB.Driver.xml")
138-
cp $40_items "$zip_dir\net40"
129+
cp $35_items "$zip_dir"
139130

140131
cp $license_file $zip_dir
141-
cp "Release Notes\Release Notes v$release_notes_version.md" "$zip_dir\Release Notes v$release_notes_version.txt"
142-
cp $chm_file $zip_dir
132+
cp "Release Notes\Release Notes v$release_notes_version.md" "$zip_dir\Release Notes.txt"
133+
cp $chm_file "$zip_dir\CSharpDriverDocs.chm"
143134

144-
Exec { &$zip_tool a "$artifacts_dir\CSharpDriver-$sem_version.zip" "$zip_dir\*" }
135+
Exec { &$zip_tool a "$artifacts_dir\CSharpDriver-$short_version.zip" "$zip_dir\*" }
145136

146137
rd $zip_dir -rec -force | out-null
147138
}
@@ -150,7 +141,7 @@ Task Installer -precondition { (BuildHasBeenRun) -and (DocsHasBeenRun) } {
150141
$release_notes_relative_path = Get-Item $release_notes_file | Resolve-Path -Relative
151142
$doc_relative_path = Get-Item $chm_file | Resolve-Path -Relative
152143

153-
Exec { msbuild "$installer_file" /t:Rebuild /p:Configuration=$config /p:Version=$version /p:SemVersion=$sem_version /p:ProductId=$installer_product_id /p:UpgradeCode=$installer_upgrade_code /p:ReleaseNotes=$release_notes_relative_path /p:License="License.rtf" /p:Documentation=$doc_relative_path /p:OutputPath=$artifacts_dir }
144+
Exec { msbuild "$installer_file" /t:Rebuild /p:Configuration=$config /p:Version=$version /p:SemVersion=$short_version /p:ProductId=$installer_product_id /p:UpgradeCode=$installer_upgrade_code /p:ReleaseNotes=$release_notes_relative_path /p:License="License.rtf" /p:Documentation=$doc_relative_path /p:OutputPath=$artifacts_dir }
154145

155146
rm -force $artifacts_dir\*.wixpdb
156147
}

mongocsharpdriver.nuspec

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@
2121
<file src="artifacts\net35\build\MongoDB.Driver.dll" target="lib\net35" />
2222
<file src="artifacts\net35\build\MongoDB.Driver.pdb" target="lib\net35" />
2323
<file src="artifacts\net35\build\MongoDB.Driver.XML" target="lib\net35" />
24-
<file src="artifacts\net40\build\MongoDB.Bson.dll" target="lib\net40" />
25-
<file src="artifacts\net40\build\MongoDB.Bson.pdb" target="lib\net40" />
26-
<file src="artifacts\net40\build\MongoDB.Bson.xml" target="lib\net40" />
27-
<file src="artifacts\net40\build\MongoDB.Driver.dll" target="lib\net40" />
28-
<file src="artifacts\net40\build\MongoDB.Driver.pdb" target="lib\net40" />
29-
<file src="artifacts\net40\build\MongoDB.Driver.XML" target="lib\net40" />
3024
<file src="License.rtf" target ="" />
3125
<file src="MongoDB.Bson\**\*.cs" target="src\MongoDB.Bson" />
3226
<file src="MongoDB.Driver\**\*.cs" target="src\MongoDB.Driver" />

0 commit comments

Comments
 (0)