aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/BindTransformCommand.cs2
-rw-r--r--src/wix/test/WixToolsetTest.CoreIntegration/PatchFixture.cs21
-rw-r--r--src/wix/test/WixToolsetTest.CoreIntegration/TestData/PatchWithRemovedRemoveFileRows/Package.wxs18
-rw-r--r--src/wix/test/WixToolsetTest.CoreIntegration/TestData/PatchWithRemovedRemoveFileRows/Patch.wxs15
4 files changed, 55 insertions, 1 deletions
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/BindTransformCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/BindTransformCommand.cs
index 95cc18cd..b37c7b95 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/BindTransformCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/BindTransformCommand.cs
@@ -268,7 +268,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
268 { 268 {
269 if (ColumnType.Number == field.Column.Type && !field.Column.IsLocalizable) 269 if (ColumnType.Number == field.Column.Type && !field.Column.IsLocalizable)
270 { 270 {
271 field.Data = field.Column.MinValue; 271 field.Data = field.Column.MinValue ?? 0;
272 } 272 }
273 else if (ColumnType.Object == field.Column.Type) 273 else if (ColumnType.Object == field.Column.Type)
274 { 274 {
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/PatchFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/PatchFixture.cs
index 0ce4674d..e7557149 100644
--- a/src/wix/test/WixToolsetTest.CoreIntegration/PatchFixture.cs
+++ b/src/wix/test/WixToolsetTest.CoreIntegration/PatchFixture.cs
@@ -337,6 +337,27 @@ namespace WixToolsetTest.CoreIntegration
337 } 337 }
338 338
339 [Fact] 339 [Fact]
340 public void CanBuildPatchFromProductWithAddedRemoveFileRows()
341 {
342 var sourceFolder = TestData.Get(@"TestData", "PatchWithRemovedRemoveFileRows");
343
344 using (var fs = new DisposableFileSystem())
345 {
346 var baseFolder = fs.GetFolder();
347 var tempFolderBaseline = Path.Combine(baseFolder, "baseline");
348 var tempFolderUpdate = Path.Combine(baseFolder, "update");
349 var tempFolderPatch = Path.Combine(baseFolder, "patch");
350
351 var baselinePath = BuildMsi("Baseline.msi", sourceFolder, tempFolderBaseline, "1.0.0", "1.0.0", "1.0.0");
352 var updatePath = BuildMsi("Update.msi", sourceFolder, tempFolderUpdate, "1.0.1", "1.0.1", "1.0.1");
353 var patchPath = BuildMsp("Patch1.msp", sourceFolder, tempFolderPatch, "1.0.1", bindpaths: new[] { Path.GetDirectoryName(baselinePath), Path.GetDirectoryName(updatePath) }, hasNoFiles: true);
354
355 var doc = GetExtractPatchXml(patchPath);
356 WixAssert.StringEqual("{6CB58995-A174-4A21-823E-3A114A81AB66}", doc.Root.Element(TargetProductCodeName).Value);
357 }
358 }
359
360 [Fact]
340 public void CanBuildBundleWithNonSpecificPatches() 361 public void CanBuildBundleWithNonSpecificPatches()
341 { 362 {
342 var folder = TestData.Get(@"TestData", "PatchNonSpecific"); 363 var folder = TestData.Get(@"TestData", "PatchNonSpecific");
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/PatchWithRemovedRemoveFileRows/Package.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/PatchWithRemovedRemoveFileRows/Package.wxs
new file mode 100644
index 00000000..e802e323
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/PatchWithRemovedRemoveFileRows/Package.wxs
@@ -0,0 +1,18 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2 <Package Name="~Test Package" Version="$(V)" Manufacturer="Example Corporation" Language="1033" UpgradeCode="{81CB1126-5796-4012-AB4D-97360EB817F1}" Scope="perMachine" ProductCode="{6CB58995-A174-4A21-823E-3A114A81AB66}">
3
4 <Component Directory="INSTALLFOLDER">
5 <RegistryValue Root="HKLM" Key="SOFTWARE\WiX Toolset\PatchTests" Name="GonnaRemoveRemoveFileRow" Value="1" KeyPath="yes" />
6
7 <?if $(V) = "1.0.0" ?>
8 <RemoveFile Name="bar.dat" On="uninstall" />
9 <?endif?>
10 </Component>
11
12 <Component Directory="INSTALLFOLDER">
13 <RegistryValue Root="HKLM" Key="SOFTWARE\WiX Toolset\PatchTests" Name="ButNotInThisComponent" Value="1" KeyPath="yes" />
14
15 <RemoveFile Name="foo.dat" On="uninstall" />
16 </Component>
17 </Package>
18</Wix>
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/PatchWithRemovedRemoveFileRows/Patch.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/PatchWithRemovedRemoveFileRows/Patch.wxs
new file mode 100644
index 00000000..27861539
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/PatchWithRemovedRemoveFileRows/Patch.wxs
@@ -0,0 +1,15 @@
1<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>
2 <Patch
3 DisplayName="~Test Patch v$(V)"
4 Description="~Test Small Update Patch v$(V)"
5 MoreInfoURL="http://www.example.com/"
6 Manufacturer="Example Corporation"
7 Classification="Update">
8
9 <Media Id="1" Cabinet="foo.cab">
10 <PatchBaseline Id="RTM" BaselineFile="Baseline.wixpdb" UpdateFile="Update.wixpdb" />
11 </Media>
12
13 <PatchFamily Id='SequenceFamily' Version='$(V)' />
14 </Patch>
15</Wix>