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 49303df1..453e410d 100644
--- a/src/wix/test/WixToolsetTest.CoreIntegration/PatchFixture.cs
+++ b/src/wix/test/WixToolsetTest.CoreIntegration/PatchFixture.cs
@@ -310,6 +310,27 @@ namespace WixToolsetTest.CoreIntegration
310 } 310 }
311 311
312 [Fact] 312 [Fact]
313 public void CanBuildPatchFromProductWithAddedRemoveFileRows()
314 {
315 var sourceFolder = TestData.Get(@"TestData", "PatchWithRemovedRemoveFileRows");
316
317 using (var fs = new DisposableFileSystem())
318 {
319 var baseFolder = fs.GetFolder();
320 var tempFolderBaseline = Path.Combine(baseFolder, "baseline");
321 var tempFolderUpdate = Path.Combine(baseFolder, "update");
322 var tempFolderPatch = Path.Combine(baseFolder, "patch");
323
324 var baselinePath = BuildMsi("Baseline.msi", sourceFolder, tempFolderBaseline, "1.0.0", "1.0.0", "1.0.0");
325 var updatePath = BuildMsi("Update.msi", sourceFolder, tempFolderUpdate, "1.0.1", "1.0.1", "1.0.1");
326 var patchPath = BuildMsp("Patch1.msp", sourceFolder, tempFolderPatch, "1.0.1", bindpaths: new[] { Path.GetDirectoryName(baselinePath), Path.GetDirectoryName(updatePath) }, hasNoFiles: true);
327
328 var doc = GetExtractPatchXml(patchPath);
329 WixAssert.StringEqual("{6CB58995-A174-4A21-823E-3A114A81AB66}", doc.Root.Element(TargetProductCodeName).Value);
330 }
331 }
332
333 [Fact]
313 public void CanBuildBundleWithNonSpecificPatches() 334 public void CanBuildBundleWithNonSpecificPatches()
314 { 335 {
315 var folder = TestData.Get(@"TestData", "PatchNonSpecific"); 336 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>