diff options
| author | Rob Mensching <rob@firegiant.com> | 2019-05-22 00:58:13 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2019-05-23 16:02:37 -0700 |
| commit | d0462be8000f18aa7dc0791d02142f000bb19fbf (patch) | |
| tree | 072aabc2bd9b8f171e17654473f85c44a8a42a66 /src/WixToolset.Core.WindowsInstaller/Bind/UpdateFileFacadesCommand.cs | |
| parent | 1ed894bc0f39397ec7f7f6344370fc2123420c43 (diff) | |
| download | wix-d0462be8000f18aa7dc0791d02142f000bb19fbf.tar.gz wix-d0462be8000f18aa7dc0791d02142f000bb19fbf.tar.bz2 wix-d0462be8000f18aa7dc0791d02142f000bb19fbf.zip | |
Integrate latest changes to tuple definitions
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/UpdateFileFacadesCommand.cs')
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Bind/UpdateFileFacadesCommand.cs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/UpdateFileFacadesCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/UpdateFileFacadesCommand.cs index 0df5329a..c8451a1e 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/UpdateFileFacadesCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/UpdateFileFacadesCommand.cs | |||
| @@ -79,7 +79,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 79 | 79 | ||
| 80 | if (!fileInfo.Exists) | 80 | if (!fileInfo.Exists) |
| 81 | { | 81 | { |
| 82 | this.Messaging.Write(ErrorMessages.CannotFindFile(file.File.SourceLineNumbers, file.File.File, file.File.LongFileName, file.WixFile.Source.Path)); | 82 | this.Messaging.Write(ErrorMessages.CannotFindFile(file.File.SourceLineNumbers, file.File.Id.Id, file.File.LongFileName, file.WixFile.Source.Path)); |
| 83 | return; | 83 | return; |
| 84 | } | 84 | } |
| 85 | 85 | ||
| @@ -127,16 +127,16 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 127 | // | 127 | // |
| 128 | // Also, if we do not find a matching file identifier then the user provided a default version and is providing a version | 128 | // Also, if we do not find a matching file identifier then the user provided a default version and is providing a version |
| 129 | // for unversioned file. That's allowed but generally a dangerous thing to do so let's point that out to the user. | 129 | // for unversioned file. That's allowed but generally a dangerous thing to do so let's point that out to the user. |
| 130 | if (!this.FileFacades.Any(r => file.File.Version.Equals(r.File.File, StringComparison.Ordinal))) | 130 | if (!this.FileFacades.Any(r => file.File.Version.Equals(r.File.Id.Id, StringComparison.Ordinal))) |
| 131 | { | 131 | { |
| 132 | this.Messaging.Write(WarningMessages.DefaultVersionUsedForUnversionedFile(file.File.SourceLineNumbers, file.File.Version, file.File.File)); | 132 | this.Messaging.Write(WarningMessages.DefaultVersionUsedForUnversionedFile(file.File.SourceLineNumbers, file.File.Version, file.File.Id.Id)); |
| 133 | } | 133 | } |
| 134 | } | 134 | } |
| 135 | else | 135 | else |
| 136 | { | 136 | { |
| 137 | if (null != file.File.Language) | 137 | if (null != file.File.Language) |
| 138 | { | 138 | { |
| 139 | this.Messaging.Write(WarningMessages.DefaultLanguageUsedForUnversionedFile(file.File.SourceLineNumbers, file.File.Language, file.File.File)); | 139 | this.Messaging.Write(WarningMessages.DefaultLanguageUsedForUnversionedFile(file.File.SourceLineNumbers, file.File.Language, file.File.Id.Id)); |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | int[] hash; | 142 | int[] hash; |
| @@ -162,7 +162,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 162 | this.Section.Tuples.Add(file.Hash); | 162 | this.Section.Tuples.Add(file.Hash); |
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | file.Hash.File_ = file.File.File; | 165 | file.Hash.File_ = file.File.Id.Id; |
| 166 | file.Hash.Options = 0; | 166 | file.Hash.Options = 0; |
| 167 | file.Hash.HashPart1 = hash[0]; | 167 | file.Hash.HashPart1 = hash[0]; |
| 168 | file.Hash.HashPart2 = hash[1]; | 168 | file.Hash.HashPart2 = hash[1]; |
| @@ -178,7 +178,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 178 | { | 178 | { |
| 179 | file.File.Version = version; | 179 | file.File.Version = version; |
| 180 | } | 180 | } |
| 181 | else if (!this.FileFacades.Any(r => file.File.Version.Equals(r.File.File, StringComparison.Ordinal))) // this looks expensive, but see explanation below. | 181 | else if (!this.FileFacades.Any(r => file.File.Version.Equals(r.File.Id.Id, StringComparison.Ordinal))) // this looks expensive, but see explanation below. |
| 182 | { | 182 | { |
| 183 | // The user provided a default version for the file row so we looked for a companion file (a file row with Id matching | 183 | // The user provided a default version for the file row so we looked for a companion file (a file row with Id matching |
| 184 | // the version value). We didn't find it so, we will override the default version they provided with the actual | 184 | // the version value). We didn't find it so, we will override the default version they provided with the actual |
| @@ -194,7 +194,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 194 | 194 | ||
| 195 | if (!String.IsNullOrEmpty(file.File.Language) && String.IsNullOrEmpty(language)) | 195 | if (!String.IsNullOrEmpty(file.File.Language) && String.IsNullOrEmpty(language)) |
| 196 | { | 196 | { |
| 197 | this.Messaging.Write(WarningMessages.DefaultLanguageUsedForVersionedFile(file.File.SourceLineNumbers, file.File.Language, file.File.File)); | 197 | this.Messaging.Write(WarningMessages.DefaultLanguageUsedForVersionedFile(file.File.SourceLineNumbers, file.File.Language, file.File.Id.Id)); |
| 198 | } | 198 | } |
| 199 | else // override the default provided by the user (usually nothing) with the actual language from the file itself. | 199 | else // override the default provided by the user (usually nothing) with the actual language from the file itself. |
| 200 | { | 200 | { |
| @@ -206,13 +206,13 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 206 | { | 206 | { |
| 207 | if (!String.IsNullOrEmpty(file.File.Version)) | 207 | if (!String.IsNullOrEmpty(file.File.Version)) |
| 208 | { | 208 | { |
| 209 | var key = String.Format(CultureInfo.InvariantCulture, "fileversion.{0}", file.File.File); | 209 | var key = String.Format(CultureInfo.InvariantCulture, "fileversion.{0}", file.File.Id.Id); |
| 210 | this.VariableCache[key] = file.File.Version; | 210 | this.VariableCache[key] = file.File.Version; |
| 211 | } | 211 | } |
| 212 | 212 | ||
| 213 | if (!String.IsNullOrEmpty(file.File.Language)) | 213 | if (!String.IsNullOrEmpty(file.File.Language)) |
| 214 | { | 214 | { |
| 215 | var key = String.Format(CultureInfo.InvariantCulture, "filelanguage.{0}", file.File.File); | 215 | var key = String.Format(CultureInfo.InvariantCulture, "filelanguage.{0}", file.File.Id.Id); |
| 216 | this.VariableCache[key] = file.File.Language; | 216 | this.VariableCache[key] = file.File.Language; |
| 217 | } | 217 | } |
| 218 | } | 218 | } |
| @@ -256,7 +256,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 256 | // add the assembly name to the information cache | 256 | // add the assembly name to the information cache |
| 257 | if (null != this.VariableCache) | 257 | if (null != this.VariableCache) |
| 258 | { | 258 | { |
| 259 | this.VariableCache[$"assemblyfullname.{file.File.File}"] = assemblyName.GetFullName(); | 259 | this.VariableCache[$"assemblyfullname.{file.File.Id.Id}"] = assemblyName.GetFullName(); |
| 260 | } | 260 | } |
| 261 | } | 261 | } |
| 262 | catch (WixException e) | 262 | catch (WixException e) |
| @@ -269,10 +269,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 269 | // TODO: Consider passing in the this.FileFacades as an indexed collection instead of searching through | 269 | // TODO: Consider passing in the this.FileFacades as an indexed collection instead of searching through |
| 270 | // all files like this. Even though this is a rare case it looks like we might be able to index the | 270 | // all files like this. Even though this is a rare case it looks like we might be able to index the |
| 271 | // file earlier. | 271 | // file earlier. |
| 272 | var fileManifest = this.FileFacades.SingleOrDefault(r => r.File.File.Equals(file.WixFile.File_AssemblyManifest, StringComparison.Ordinal)); | 272 | var fileManifest = this.FileFacades.FirstOrDefault(r => r.File.Id.Id.Equals(file.WixFile.File_AssemblyManifest, StringComparison.Ordinal)); |
| 273 | if (null == fileManifest) | 273 | if (null == fileManifest) |
| 274 | { | 274 | { |
| 275 | this.Messaging.Write(ErrorMessages.MissingManifestForWin32Assembly(file.File.SourceLineNumbers, file.File.File, file.WixFile.File_AssemblyManifest)); | 275 | this.Messaging.Write(ErrorMessages.MissingManifestForWin32Assembly(file.File.SourceLineNumbers, file.File.Id.Id, file.WixFile.File_AssemblyManifest)); |
| 276 | } | 276 | } |
| 277 | 277 | ||
| 278 | try | 278 | try |
| @@ -358,7 +358,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 358 | 358 | ||
| 359 | if (this.VariableCache != null) | 359 | if (this.VariableCache != null) |
| 360 | { | 360 | { |
| 361 | var key = String.Format(CultureInfo.InvariantCulture, "assembly{0}.{1}", name, file.File.File).ToLowerInvariant(); | 361 | var key = String.Format(CultureInfo.InvariantCulture, "assembly{0}.{1}", name, file.File.Id.Id).ToLowerInvariant(); |
| 362 | this.VariableCache[key] = value; | 362 | this.VariableCache[key] = value; |
| 363 | } | 363 | } |
| 364 | } | 364 | } |
