aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.WindowsInstaller/Bind/UpdateFileFacadesCommand.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/UpdateFileFacadesCommand.cs')
-rw-r--r--src/WixToolset.Core.WindowsInstaller/Bind/UpdateFileFacadesCommand.cs41
1 files changed, 23 insertions, 18 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/UpdateFileFacadesCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/UpdateFileFacadesCommand.cs
index cd9444ee..20058597 100644
--- a/src/WixToolset.Core.WindowsInstaller/Bind/UpdateFileFacadesCommand.cs
+++ b/src/WixToolset.Core.WindowsInstaller/Bind/UpdateFileFacadesCommand.cs
@@ -15,6 +15,7 @@ namespace WixToolset.Core.WindowsInstaller.Databases
15 using WixToolset.Core.Bind; 15 using WixToolset.Core.Bind;
16 using WixToolset.Data; 16 using WixToolset.Data;
17 using WixToolset.Data.Rows; 17 using WixToolset.Data.Rows;
18 using WixToolset.Data.Tuples;
18 using WixToolset.Msi; 19 using WixToolset.Msi;
19 20
20 /// <summary> 21 /// <summary>
@@ -69,7 +70,7 @@ namespace WixToolset.Core.WindowsInstaller.Databases
69 70
70 if (!fileInfo.Exists) 71 if (!fileInfo.Exists)
71 { 72 {
72 Messaging.Instance.OnMessage(WixErrors.CannotFindFile(file.File.SourceLineNumbers, file.File.File, file.File.FileName, file.WixFile.Source)); 73 Messaging.Instance.OnMessage(WixErrors.CannotFindFile(file.File.SourceLineNumbers, file.File.File, file.File.LongFileName, file.WixFile.Source));
73 return; 74 return;
74 } 75 }
75 76
@@ -148,16 +149,17 @@ namespace WixToolset.Core.WindowsInstaller.Databases
148 149
149 if (null == file.Hash) 150 if (null == file.Hash)
150 { 151 {
151 Table msiFileHashTable = this.Output.EnsureTable(this.TableDefinitions["MsiFileHash"]); 152 //Table msiFileHashTable = this.Output.EnsureTable(this.TableDefinitions["MsiFileHash"]);
152 file.Hash = msiFileHashTable.CreateRow(file.File.SourceLineNumbers); 153 //file.Hash = msiFileHashTable.CreateRow(file.File.SourceLineNumbers);
154 throw new NotImplementedException();
153 } 155 }
154 156
155 file.Hash[0] = file.File.File; 157 file.Hash.File_ = file.File.File;
156 file.Hash[1] = 0; 158 file.Hash.Options = 0;
157 file.Hash[2] = hash[0]; 159 file.Hash.HashPart1 = hash[0];
158 file.Hash[3] = hash[1]; 160 file.Hash.HashPart2 = hash[1];
159 file.Hash[4] = hash[2]; 161 file.Hash.HashPart3 = hash[2];
160 file.Hash[5] = hash[3]; 162 file.Hash.HashPart4 = hash[3];
161 } 163 }
162 } 164 }
163 else // update the file row with the version and language information. 165 else // update the file row with the version and language information.
@@ -250,9 +252,9 @@ namespace WixToolset.Core.WindowsInstaller.Databases
250 assemblyNameValues.Add("publicKeyToken", publicKeyIsNeutral ? "null" : publicKeyToken.ToUpperInvariant()); 252 assemblyNameValues.Add("publicKeyToken", publicKeyIsNeutral ? "null" : publicKeyToken.ToUpperInvariant());
251 assemblyNameValues.Add("publicKeyTokenPreservedCase", publicKeyIsNeutral ? "null" : publicKeyToken); 253 assemblyNameValues.Add("publicKeyTokenPreservedCase", publicKeyIsNeutral ? "null" : publicKeyToken);
252 } 254 }
253 else if (file.WixFile.AssemblyApplication == null) 255 else if (file.WixFile.File_AssemblyApplication == null)
254 { 256 {
255 throw new WixException(WixErrors.GacAssemblyNoStrongName(file.File.SourceLineNumbers, fileInfo.FullName, file.File.Component)); 257 throw new WixException(WixErrors.GacAssemblyNoStrongName(file.File.SourceLineNumbers, fileInfo.FullName, file.File.Component_));
256 } 258 }
257 259
258 string assemblyVersion = referenceIdentity.GetAttribute(null, "Version"); 260 string assemblyVersion = referenceIdentity.GetAttribute(null, "Version");
@@ -350,10 +352,10 @@ namespace WixToolset.Core.WindowsInstaller.Databases
350 // TODO: Consider passing in the this.FileFacades as an indexed collection instead of searching through 352 // TODO: Consider passing in the this.FileFacades as an indexed collection instead of searching through
351 // all files like this. Even though this is a rare case it looks like we might be able to index the 353 // all files like this. Even though this is a rare case it looks like we might be able to index the
352 // file earlier. 354 // file earlier.
353 FileFacade fileManifest = this.FileFacades.SingleOrDefault(r => r.File.File.Equals(file.WixFile.AssemblyManifest, StringComparison.Ordinal)); 355 FileFacade fileManifest = this.FileFacades.SingleOrDefault(r => r.File.File.Equals(file.WixFile.File_AssemblyManifest, StringComparison.Ordinal));
354 if (null == fileManifest) 356 if (null == fileManifest)
355 { 357 {
356 Messaging.Instance.OnMessage(WixErrors.MissingManifestForWin32Assembly(file.File.SourceLineNumbers, file.File.File, file.WixFile.AssemblyManifest)); 358 Messaging.Instance.OnMessage(WixErrors.MissingManifestForWin32Assembly(file.File.SourceLineNumbers, file.File.File, file.WixFile.File_AssemblyManifest));
357 } 359 }
358 360
359 string win32Type = null; 361 string win32Type = null;
@@ -476,7 +478,7 @@ namespace WixToolset.Core.WindowsInstaller.Databases
476 // check for null value (this can occur when grabbing the file version from an assembly without one) 478 // check for null value (this can occur when grabbing the file version from an assembly without one)
477 if (String.IsNullOrEmpty(value)) 479 if (String.IsNullOrEmpty(value))
478 { 480 {
479 Messaging.Instance.OnMessage(WixWarnings.NullMsiAssemblyNameValue(file.File.SourceLineNumbers, file.File.Component, name)); 481 Messaging.Instance.OnMessage(WixWarnings.NullMsiAssemblyNameValue(file.File.SourceLineNumbers, file.File.Component_, name));
480 } 482 }
481 else 483 else
482 { 484 {
@@ -485,7 +487,7 @@ namespace WixToolset.Core.WindowsInstaller.Databases
485 // override directly authored value 487 // override directly authored value
486 foreach (Row row in assemblyNameTable.Rows) 488 foreach (Row row in assemblyNameTable.Rows)
487 { 489 {
488 if ((string)row[0] == file.File.Component && (string)row[1] == name) 490 if ((string)row[0] == file.File.Component_ && (string)row[1] == name)
489 { 491 {
490 assemblyNameRow = row; 492 assemblyNameRow = row;
491 break; 493 break;
@@ -494,7 +496,7 @@ namespace WixToolset.Core.WindowsInstaller.Databases
494 496
495 // if the assembly will be GAC'd and the name in the file table doesn't match the name in the MsiAssemblyName table, error because the install will fail. 497 // if the assembly will be GAC'd and the name in the file table doesn't match the name in the MsiAssemblyName table, error because the install will fail.
496 if ("name" == name && FileAssemblyType.DotNetAssembly == file.WixFile.AssemblyType && 498 if ("name" == name && FileAssemblyType.DotNetAssembly == file.WixFile.AssemblyType &&
497 String.IsNullOrEmpty(file.WixFile.AssemblyApplication) && 499 String.IsNullOrEmpty(file.WixFile.File_AssemblyApplication) &&
498 !String.Equals(Path.GetFileNameWithoutExtension(file.File.LongFileName), value, StringComparison.OrdinalIgnoreCase)) 500 !String.Equals(Path.GetFileNameWithoutExtension(file.File.LongFileName), value, StringComparison.OrdinalIgnoreCase))
499 { 501 {
500 Messaging.Instance.OnMessage(WixErrors.GACAssemblyIdentityWarning(file.File.SourceLineNumbers, Path.GetFileNameWithoutExtension(file.File.LongFileName), value)); 502 Messaging.Instance.OnMessage(WixErrors.GACAssemblyIdentityWarning(file.File.SourceLineNumbers, Path.GetFileNameWithoutExtension(file.File.LongFileName), value));
@@ -502,8 +504,10 @@ namespace WixToolset.Core.WindowsInstaller.Databases
502 504
503 if (null == assemblyNameRow) 505 if (null == assemblyNameRow)
504 { 506 {
507 throw new NotImplementedException();
508#if TODO
505 assemblyNameRow = assemblyNameTable.CreateRow(file.File.SourceLineNumbers); 509 assemblyNameRow = assemblyNameTable.CreateRow(file.File.SourceLineNumbers);
506 assemblyNameRow[0] = file.File.Component; 510 assemblyNameRow[0] = file.File.Component_;
507 assemblyNameRow[1] = name; 511 assemblyNameRow[1] = name;
508 assemblyNameRow[2] = value; 512 assemblyNameRow[2] = value;
509 513
@@ -512,10 +516,11 @@ namespace WixToolset.Core.WindowsInstaller.Databases
512 516
513 if (null == file.AssemblyNames) 517 if (null == file.AssemblyNames)
514 { 518 {
515 file.AssemblyNames = new List<Row>(); 519 file.AssemblyNames = new List<MsiAssemblyNameTuple>();
516 } 520 }
517 521
518 file.AssemblyNames.Add(assemblyNameRow); 522 file.AssemblyNames.Add(assemblyNameRow);
523#endif
519 } 524 }
520 else 525 else
521 { 526 {