diff options
| author | Rob Mensching <rob@firegiant.com> | 2020-05-30 14:53:05 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2020-05-30 15:07:21 -0700 |
| commit | d529525a1e331f3ef9ec2707791c99bd78fdd82f (patch) | |
| tree | 1d9fe1f0c0ee9850371c916802eb03ec9dc37a87 /src/WixToolset.Core | |
| parent | 9c54d2fce80983bbee5f0f113b5aa30f22bc8a23 (diff) | |
| download | wix-d529525a1e331f3ef9ec2707791c99bd78fdd82f.tar.gz wix-d529525a1e331f3ef9ec2707791c99bd78fdd82f.tar.bz2 wix-d529525a1e331f3ef9ec2707791c99bd78fdd82f.zip | |
Basic patching support
Diffstat (limited to 'src/WixToolset.Core')
| -rw-r--r-- | src/WixToolset.Core/Bind/FileFacade.cs | 24 | ||||
| -rw-r--r-- | src/WixToolset.Core/CommandLine/BuildCommand.cs | 1 |
2 files changed, 20 insertions, 5 deletions
diff --git a/src/WixToolset.Core/Bind/FileFacade.cs b/src/WixToolset.Core/Bind/FileFacade.cs index 7bfdb9bb..f0ce14ca 100644 --- a/src/WixToolset.Core/Bind/FileFacade.cs +++ b/src/WixToolset.Core/Bind/FileFacade.cs | |||
| @@ -15,18 +15,27 @@ namespace WixToolset.Core.Bind | |||
| 15 | { | 15 | { |
| 16 | this.FileTuple = file; | 16 | this.FileTuple = file; |
| 17 | this.AssemblyTuple = assembly; | 17 | this.AssemblyTuple = assembly; |
| 18 | |||
| 19 | this.Identifier = file.Id; | ||
| 20 | this.ComponentRef = file.ComponentRef; | ||
| 18 | } | 21 | } |
| 19 | 22 | ||
| 20 | public FileFacade(bool fromModule, FileTuple file) | 23 | public FileFacade(bool fromModule, FileTuple file) |
| 21 | { | 24 | { |
| 22 | this.FromModule = fromModule; | 25 | this.FromModule = fromModule; |
| 23 | this.FileTuple = file; | 26 | this.FileTuple = file; |
| 27 | |||
| 28 | this.Identifier = file.Id; | ||
| 29 | this.ComponentRef = file.ComponentRef; | ||
| 24 | } | 30 | } |
| 25 | 31 | ||
| 26 | internal FileFacade(FileRow row) | 32 | public FileFacade(FileRow row) |
| 27 | { | 33 | { |
| 28 | this.FromTransform = true; | 34 | this.FromTransform = true; |
| 29 | this.FileRow = row; | 35 | this.FileRow = row; |
| 36 | |||
| 37 | this.Identifier = new Identifier(AccessModifier.Private, row.File); | ||
| 38 | this.ComponentRef = row.Component; | ||
| 30 | } | 39 | } |
| 31 | 40 | ||
| 32 | public bool FromModule { get; } | 41 | public bool FromModule { get; } |
| @@ -39,11 +48,11 @@ namespace WixToolset.Core.Bind | |||
| 39 | 48 | ||
| 40 | private AssemblyTuple AssemblyTuple { get; } | 49 | private AssemblyTuple AssemblyTuple { get; } |
| 41 | 50 | ||
| 42 | public string Id => this.FileRow == null ? this.FileTuple.Id.Id : this.FileRow.File; | 51 | public string Id => this.Identifier.Id; |
| 43 | 52 | ||
| 44 | public Identifier Identifier => this.FileRow == null ? this.FileTuple.Id : throw new NotImplementedException(); | 53 | public Identifier Identifier { get; } |
| 45 | 54 | ||
| 46 | public string ComponentRef => this.FileRow == null ? this.FileTuple.ComponentRef : this.FileRow.Component; | 55 | public string ComponentRef { get; } |
| 47 | 56 | ||
| 48 | public int DiskId | 57 | public int DiskId |
| 49 | { | 58 | { |
| @@ -137,7 +146,7 @@ namespace WixToolset.Core.Bind | |||
| 137 | } | 146 | } |
| 138 | } | 147 | } |
| 139 | 148 | ||
| 140 | public AssemblyType? AssemblyType => this.FileRow == null ? this.AssemblyTuple?.Type : throw new NotImplementedException(); | 149 | public AssemblyType? AssemblyType => this.FileRow == null ? this.AssemblyTuple?.Type : null; |
| 141 | 150 | ||
| 142 | public string AssemblyApplicationFileRef => this.FileRow == null ? this.AssemblyTuple?.ApplicationFileRef : throw new NotImplementedException(); | 151 | public string AssemblyApplicationFileRef => this.FileRow == null ? this.AssemblyTuple?.ApplicationFileRef : throw new NotImplementedException(); |
| 143 | 152 | ||
| @@ -153,5 +162,10 @@ namespace WixToolset.Core.Bind | |||
| 153 | /// Gets or sets the MsiFileHash row for this file. | 162 | /// Gets or sets the MsiFileHash row for this file. |
| 154 | /// </summary> | 163 | /// </summary> |
| 155 | public MsiFileHashTuple Hash { get; set; } | 164 | public MsiFileHashTuple Hash { get; set; } |
| 165 | |||
| 166 | /// <summary> | ||
| 167 | /// Allows direct access to the underlying FileRow as requried for patching. | ||
| 168 | /// </summary> | ||
| 169 | public FileRow GetFileRow() => this.FileRow ?? throw new NotImplementedException(); | ||
| 156 | } | 170 | } |
| 157 | } | 171 | } |
diff --git a/src/WixToolset.Core/CommandLine/BuildCommand.cs b/src/WixToolset.Core/CommandLine/BuildCommand.cs index 80003392..8392131f 100644 --- a/src/WixToolset.Core/CommandLine/BuildCommand.cs +++ b/src/WixToolset.Core/CommandLine/BuildCommand.cs | |||
| @@ -334,6 +334,7 @@ namespace WixToolset.Core.CommandLine | |||
| 334 | context.DelayedFields = resolveResult.DelayedFields; | 334 | context.DelayedFields = resolveResult.DelayedFields; |
| 335 | context.ExpectedEmbeddedFiles = resolveResult.ExpectedEmbeddedFiles; | 335 | context.ExpectedEmbeddedFiles = resolveResult.ExpectedEmbeddedFiles; |
| 336 | context.Extensions = this.ExtensionManager.GetServices<IBinderExtension>(); | 336 | context.Extensions = this.ExtensionManager.GetServices<IBinderExtension>(); |
| 337 | context.FileSystemExtensions = this.ExtensionManager.GetServices<IFileSystemExtension>(); | ||
| 337 | context.Ices = Array.Empty<string>(); // TODO: set this correctly | 338 | context.Ices = Array.Empty<string>(); // TODO: set this correctly |
| 338 | context.IntermediateFolder = intermediateFolder; | 339 | context.IntermediateFolder = intermediateFolder; |
| 339 | context.IntermediateRepresentation = resolveResult.IntermediateRepresentation; | 340 | context.IntermediateRepresentation = resolveResult.IntermediateRepresentation; |
