From 354f6d5b79404544cb7c0e11a0d9212b4780ce09 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 23 May 2019 15:37:56 -0700 Subject: Integrate latest Data changes for FileTuple and AssemblyTuple --- .../Bind/MergeModulesCommand.cs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/MergeModulesCommand.cs') diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/MergeModulesCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/MergeModulesCommand.cs index db887f09..3c8b4999 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/MergeModulesCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/MergeModulesCommand.cs @@ -11,6 +11,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind using WixToolset.Core.Bind; using WixToolset.Core.WindowsInstaller.Msi; using WixToolset.Data; + using WixToolset.Data.Tuples; using WixToolset.Data.WindowsInstaller; using WixToolset.Data.WindowsInstaller.Rows; using WixToolset.Extensibility.Services; @@ -297,8 +298,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind throw new InvalidOperationException("Failed to fetch a File row from the database that was merged in from a module."); } - //recordUpdate.SetInteger(1, file.File.Sequence); - throw new NotImplementedException(); + recordUpdate.SetInteger(1, file.File.Sequence); // Update the file attributes to match the compression specified // on the Merge element or on the Package element. @@ -310,22 +310,21 @@ namespace WixToolset.Core.WindowsInstaller.Bind attributes = recordUpdate.GetInteger(2); } - if (!file.File.Compressed.HasValue) - { - // Clear all compression bits. - attributes &= ~WindowsInstallerConstants.MsidbFileAttributesCompressed; - attributes &= ~WindowsInstallerConstants.MsidbFileAttributesNoncompressed; - } - else if (file.File.Compressed.Value) + if ((file.File.Attributes & FileTupleAttributes.Compressed) == FileTupleAttributes.Compressed) { attributes |= WindowsInstallerConstants.MsidbFileAttributesCompressed; attributes &= ~WindowsInstallerConstants.MsidbFileAttributesNoncompressed; } - else if (!file.File.Compressed.Value) + else if ((file.File.Attributes & FileTupleAttributes.Uncompressed) == FileTupleAttributes.Uncompressed) { attributes |= WindowsInstallerConstants.MsidbFileAttributesNoncompressed; attributes &= ~WindowsInstallerConstants.MsidbFileAttributesCompressed; } + else // clear all compression bits. + { + attributes &= ~WindowsInstallerConstants.MsidbFileAttributesCompressed; + attributes &= ~WindowsInstallerConstants.MsidbFileAttributesNoncompressed; + } recordUpdate.SetInteger(2, attributes); -- cgit v1.2.3-55-g6feb