diff options
| author | Rob Mensching <rob@firegiant.com> | 2017-12-21 13:42:52 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2017-12-21 13:42:52 -0800 |
| commit | dc9f4c329e6f55ce7595970463e0caf148096f4b (patch) | |
| tree | 86155ac36c76acda0a4b1673c77f54a9780c6885 /src/WixToolset.Core/Bind/ResolveFieldsCommand.cs | |
| parent | 155a6e96346e0cb3d9ab6f5372fa29b46ebaee89 (diff) | |
| download | wix-dc9f4c329e6f55ce7595970463e0caf148096f4b.tar.gz wix-dc9f4c329e6f55ce7595970463e0caf148096f4b.tar.bz2 wix-dc9f4c329e6f55ce7595970463e0caf148096f4b.zip | |
Support wixout and extract Resolve and Layout from Binder
Diffstat (limited to 'src/WixToolset.Core/Bind/ResolveFieldsCommand.cs')
| -rw-r--r-- | src/WixToolset.Core/Bind/ResolveFieldsCommand.cs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/WixToolset.Core/Bind/ResolveFieldsCommand.cs b/src/WixToolset.Core/Bind/ResolveFieldsCommand.cs index e8c90956..824eb9a5 100644 --- a/src/WixToolset.Core/Bind/ResolveFieldsCommand.cs +++ b/src/WixToolset.Core/Bind/ResolveFieldsCommand.cs | |||
| @@ -22,7 +22,7 @@ namespace WixToolset.Core.Bind | |||
| 22 | 22 | ||
| 23 | public IEnumerable<BindPath> BindPaths { private get; set; } | 23 | public IEnumerable<BindPath> BindPaths { private get; set; } |
| 24 | 24 | ||
| 25 | public IEnumerable<IBinderExtension> Extensions { private get; set; } | 25 | public IEnumerable<IResolverExtension> Extensions { private get; set; } |
| 26 | 26 | ||
| 27 | public ExtractEmbeddedFiles FilesWithEmbeddedFiles { private get; set; } | 27 | public ExtractEmbeddedFiles FilesWithEmbeddedFiles { private get; set; } |
| 28 | 28 | ||
| @@ -52,7 +52,6 @@ namespace WixToolset.Core.Bind | |||
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | var isDefault = true; | 54 | var isDefault = true; |
| 55 | var delayedResolve = false; | ||
| 56 | 55 | ||
| 57 | // Check to make sure we're in a scenario where we can handle variable resolution. | 56 | // Check to make sure we're in a scenario where we can handle variable resolution. |
| 58 | if (null != delayedFields) | 57 | if (null != delayedFields) |
| @@ -63,16 +62,18 @@ namespace WixToolset.Core.Bind | |||
| 63 | var original = field.AsString(); | 62 | var original = field.AsString(); |
| 64 | if (!String.IsNullOrEmpty(original)) | 63 | if (!String.IsNullOrEmpty(original)) |
| 65 | { | 64 | { |
| 66 | var value = this.BindVariableResolver.ResolveVariables(row.SourceLineNumbers, original, false, out isDefault, out delayedResolve); | 65 | var resolution = this.BindVariableResolver.ResolveVariables(row.SourceLineNumbers, original, false); |
| 67 | if (original != value) | 66 | if (resolution.UpdatedValue) |
| 68 | { | 67 | { |
| 69 | field.Set(value); | 68 | field.Set(resolution.Value); |
| 70 | } | 69 | } |
| 71 | 70 | ||
| 72 | if (delayedResolve) | 71 | if (resolution.DelayedResolve) |
| 73 | { | 72 | { |
| 74 | delayedFields.Add(new DelayedField(row, field)); | 73 | delayedFields.Add(new DelayedField(row, field)); |
| 75 | } | 74 | } |
| 75 | |||
| 76 | isDefault = resolution.IsDefault; | ||
| 76 | } | 77 | } |
| 77 | } | 78 | } |
| 78 | } | 79 | } |
| @@ -119,13 +120,13 @@ namespace WixToolset.Core.Bind | |||
| 119 | #endif | 120 | #endif |
| 120 | 121 | ||
| 121 | // resolve the path to the file | 122 | // resolve the path to the file |
| 122 | var value = fileResolver.ResolveFile(objectField.Path, row.Definition.Name, row.SourceLineNumbers, BindStage.Normal); | 123 | var value = fileResolver.ResolveFile(objectField.Path, row.Definition, row.SourceLineNumbers, BindStage.Normal); |
| 123 | field.Set(value); | 124 | field.Set(value); |
| 124 | } | 125 | } |
| 125 | else if (!fileResolver.RebaseTarget && !fileResolver.RebaseUpdated) // Normal binding for Patch Scenario (normal patch, no re-basing logic) | 126 | else if (!fileResolver.RebaseTarget && !fileResolver.RebaseUpdated) // Normal binding for Patch Scenario (normal patch, no re-basing logic) |
| 126 | { | 127 | { |
| 127 | // resolve the path to the file | 128 | // resolve the path to the file |
| 128 | var value = fileResolver.ResolveFile(objectField.Path, row.Definition.Name, row.SourceLineNumbers, BindStage.Normal); | 129 | var value = fileResolver.ResolveFile(objectField.Path, row.Definition, row.SourceLineNumbers, BindStage.Normal); |
| 129 | field.Set(value); | 130 | field.Set(value); |
| 130 | } | 131 | } |
| 131 | #if REVISIT_FOR_PATCHING | 132 | #if REVISIT_FOR_PATCHING |
