diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2020-04-12 12:17:37 +1000 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2020-04-12 12:46:21 +1000 |
commit | 5a19a39a72d87ed96a6254f65da67b4258fef478 (patch) | |
tree | 3dbaa49c92ca7d3d44e18e5c179acd53b3c2a0b2 /src | |
parent | 148ad02da05070245c8345d6650e2a70bd4706be (diff) | |
download | wix-5a19a39a72d87ed96a6254f65da67b4258fef478.tar.gz wix-5a19a39a72d87ed96a6254f65da67b4258fef478.tar.bz2 wix-5a19a39a72d87ed96a6254f65da67b4258fef478.zip |
Add warning when CreateOutputFromIRCommand doesn't know how to handle a tuple.
Diffstat (limited to 'src')
-rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs index c3bedfc7..0cbb81d8 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs | |||
@@ -56,6 +56,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
56 | { | 56 | { |
57 | foreach (var tuple in this.Section.Tuples) | 57 | foreach (var tuple in this.Section.Tuples) |
58 | { | 58 | { |
59 | var unknownTuple = false; | ||
59 | switch (tuple.Definition.Type) | 60 | switch (tuple.Definition.Type) |
60 | { | 61 | { |
61 | case TupleDefinitionType.AppSearch: | 62 | case TupleDefinitionType.AppSearch: |
@@ -192,10 +193,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
192 | this.AddWixMediaTemplateTuple((WixMediaTemplateTuple)tuple); | 193 | this.AddWixMediaTemplateTuple((WixMediaTemplateTuple)tuple); |
193 | break; | 194 | break; |
194 | 195 | ||
195 | case TupleDefinitionType.MustBeFromAnExtension: | ||
196 | this.AddTupleFromExtension(tuple); | ||
197 | break; | ||
198 | |||
199 | case TupleDefinitionType.WixCustomRow: | 196 | case TupleDefinitionType.WixCustomRow: |
200 | this.AddWixCustomRowTuple((WixCustomRowTuple)tuple); | 197 | this.AddWixCustomRowTuple((WixCustomRowTuple)tuple); |
201 | break; | 198 | break; |
@@ -215,10 +212,19 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
215 | case TupleDefinitionType.WixCustomTable: | 212 | case TupleDefinitionType.WixCustomTable: |
216 | break; | 213 | break; |
217 | 214 | ||
215 | case TupleDefinitionType.MustBeFromAnExtension: | ||
216 | unknownTuple = !this.AddTupleFromExtension(tuple); | ||
217 | break; | ||
218 | |||
218 | default: | 219 | default: |
219 | this.AddTupleDefaultly(tuple); | 220 | unknownTuple = !this.AddTupleDefaultly(tuple); |
220 | break; | 221 | break; |
221 | } | 222 | } |
223 | |||
224 | if (unknownTuple) | ||
225 | { | ||
226 | this.Messaging.Write(WarningMessages.TupleNotTranslatedToOutput(tuple)); | ||
227 | } | ||
222 | } | 228 | } |
223 | } | 229 | } |
224 | 230 | ||
@@ -1029,18 +1035,20 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
1029 | row.MaximumCabinetSizeForLargeFileSplitting = tuple.MaximumCabinetSizeForLargeFileSplitting ?? MaxValueOfMaxCabSizeForLargeFileSplitting; | 1035 | row.MaximumCabinetSizeForLargeFileSplitting = tuple.MaximumCabinetSizeForLargeFileSplitting ?? MaxValueOfMaxCabSizeForLargeFileSplitting; |
1030 | } | 1036 | } |
1031 | 1037 | ||
1032 | private void AddTupleFromExtension(IntermediateTuple tuple) | 1038 | private bool AddTupleFromExtension(IntermediateTuple tuple) |
1033 | { | 1039 | { |
1034 | foreach (var extension in this.BackendExtensions) | 1040 | foreach (var extension in this.BackendExtensions) |
1035 | { | 1041 | { |
1036 | if (extension.TryAddTupleToOutput(this.Section, tuple, this.Output, this.TableDefinitions)) | 1042 | if (extension.TryAddTupleToOutput(this.Section, tuple, this.Output, this.TableDefinitions)) |
1037 | { | 1043 | { |
1038 | break; | 1044 | return true; |
1039 | } | 1045 | } |
1040 | } | 1046 | } |
1047 | |||
1048 | return false; | ||
1041 | } | 1049 | } |
1042 | 1050 | ||
1043 | private void AddTupleDefaultly(IntermediateTuple tuple) => | 1051 | private bool AddTupleDefaultly(IntermediateTuple tuple) => |
1044 | this.BackendHelper.TryAddTupleToOutputMatchingTableDefinitions(this.Section, tuple, this.Output, this.TableDefinitions); | 1052 | this.BackendHelper.TryAddTupleToOutputMatchingTableDefinitions(this.Section, tuple, this.Output, this.TableDefinitions); |
1045 | 1053 | ||
1046 | private static OutputType SectionTypeToOutputType(SectionType type) | 1054 | private static OutputType SectionTypeToOutputType(SectionType type) |