diff options
| author | Rob Mensching <rob@firegiant.com> | 2019-10-25 02:47:47 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2019-10-26 13:32:21 -0700 |
| commit | f01d284101e95d490497062c2dc9065423d0cf37 (patch) | |
| tree | 39e5516a836ccd3436c117f790e7c5374e59a6b2 /src | |
| parent | 98bdcfac8bd4f699bc6865abd283f710943e77bc (diff) | |
| download | wix-f01d284101e95d490497062c2dc9065423d0cf37.tar.gz wix-f01d284101e95d490497062c2dc9065423d0cf37.tar.bz2 wix-f01d284101e95d490497062c2dc9065423d0cf37.zip | |
Fix MsiAssembly table processing
Diffstat (limited to 'src')
4 files changed, 21 insertions, 4 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/AssemblyName.cs b/src/WixToolset.Core.WindowsInstaller/Bind/AssemblyName.cs index 0df1a7e9..759ba303 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/AssemblyName.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/AssemblyName.cs | |||
| @@ -16,7 +16,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 16 | this.Architecture = architecture; | 16 | this.Architecture = architecture; |
| 17 | 17 | ||
| 18 | this.StrongNamedSigned = !String.IsNullOrEmpty(publicKeyToken); | 18 | this.StrongNamedSigned = !String.IsNullOrEmpty(publicKeyToken); |
| 19 | this.PublicKeyToken = publicKeyToken ?? "null"; | 19 | this.PublicKeyToken = publicKeyToken; |
| 20 | this.Type = type; | 20 | this.Type = type; |
| 21 | } | 21 | } |
| 22 | 22 | ||
| @@ -46,7 +46,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 46 | assemblyName.Append(", Culture="); | 46 | assemblyName.Append(", Culture="); |
| 47 | assemblyName.Append(this.Culture); | 47 | assemblyName.Append(this.Culture); |
| 48 | assemblyName.Append(", PublicKeyToken="); | 48 | assemblyName.Append(", PublicKeyToken="); |
| 49 | assemblyName.Append(this.PublicKeyToken); | 49 | assemblyName.Append(this.PublicKeyToken ?? "null"); |
| 50 | 50 | ||
| 51 | if (!String.IsNullOrEmpty(this.Architecture)) | 51 | if (!String.IsNullOrEmpty(this.Architecture)) |
| 52 | { | 52 | { |
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs index 17cac83a..081644cb 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs | |||
| @@ -60,6 +60,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 60 | output.EnsureTable(this.TableDefinitions["Signature"]); | 60 | output.EnsureTable(this.TableDefinitions["Signature"]); |
| 61 | break; | 61 | break; |
| 62 | 62 | ||
| 63 | case TupleDefinitionType.Assembly: | ||
| 64 | this.AddAssemblyTuple((AssemblyTuple)tuple, output); | ||
| 65 | break; | ||
| 66 | |||
| 63 | case TupleDefinitionType.Binary: | 67 | case TupleDefinitionType.Binary: |
| 64 | this.AddTupleDefaultly(tuple, output, idIsPrimaryKey: true); | 68 | this.AddTupleDefaultly(tuple, output, idIsPrimaryKey: true); |
| 65 | break; | 69 | break; |
| @@ -239,6 +243,19 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 239 | } | 243 | } |
| 240 | } | 244 | } |
| 241 | 245 | ||
| 246 | private void AddAssemblyTuple(AssemblyTuple tuple, Output output) | ||
| 247 | { | ||
| 248 | var attributes = tuple.Type == AssemblyType.Win32Assembly ? 1 : (int?)null; | ||
| 249 | |||
| 250 | var table = output.EnsureTable(this.TableDefinitions["MsiAssembly"]); | ||
| 251 | var row = table.CreateRow(tuple.SourceLineNumbers); | ||
| 252 | row[0] = tuple.ComponentRef; | ||
| 253 | row[1] = tuple.FeatureRef; | ||
| 254 | row[2] = tuple.ManifestFileRef; | ||
| 255 | row[3] = tuple.ApplicationFileRef; | ||
| 256 | row[4] = attributes; | ||
| 257 | } | ||
| 258 | |||
| 242 | private void AddBBControlTuple(BBControlTuple tuple, Output output) | 259 | private void AddBBControlTuple(BBControlTuple tuple, Output output) |
| 243 | { | 260 | { |
| 244 | var attributes = tuple.Attributes; | 261 | var attributes = tuple.Attributes; |
diff --git a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs index 6ebdb993..1b302065 100644 --- a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs | |||
| @@ -480,7 +480,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 480 | } | 480 | } |
| 481 | } | 481 | } |
| 482 | 482 | ||
| 483 | [Fact(Skip = "Test demonstrates failure")] | 483 | [Fact] |
| 484 | public void PopulatesMsiAssemblyTables() | 484 | public void PopulatesMsiAssemblyTables() |
| 485 | { | 485 | { |
| 486 | var folder = TestData.Get(@"TestData"); | 486 | var folder = TestData.Get(@"TestData"); |
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/Assembly/Win32Assembly.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/Assembly/Win32Assembly.wxs index 980c5ca4..45cc7114 100644 --- a/src/test/WixToolsetTest.CoreIntegration/TestData/Assembly/Win32Assembly.wxs +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/Assembly/Win32Assembly.wxs | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | <Fragment> | 3 | <Fragment> |
| 4 | <ComponentGroup Id="ProductComponents"> | 4 | <ComponentGroup Id="ProductComponents"> |
| 5 | <Component Directory="INSTALLFOLDER"> | 5 | <Component Directory="INSTALLFOLDER"> |
| 6 | <File Source="test.txt" Assembly="win32" AssemblyManifest="test.dll.manifest" /> | 6 | <File Id="test.txt" Source="test.txt" Assembly="win32" AssemblyManifest="test.dll.manifest" /> |
| 7 | </Component> | 7 | </Component> |
| 8 | <Component Id="test.dll.manifest" Directory="INSTALLFOLDER"> | 8 | <Component Id="test.dll.manifest" Directory="INSTALLFOLDER"> |
| 9 | <File Id="test.dll.manifest" Source="test.manifest" Name="test.dll.manifest"></File> | 9 | <File Id="test.dll.manifest" Source="test.manifest" Name="test.dll.manifest"></File> |
