diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/WixToolset.Converters.Symbolizer/ConvertTuples.cs (renamed from src/WixToolset.Converters.Tupleizer/ConvertTuples.cs) | 218 | ||||
| -rw-r--r-- | src/WixToolset.Converters.Symbolizer/WixToolset.Converters.Symbolizer.csproj (renamed from src/WixToolset.Converters.Tupleizer/WixToolset.Converters.Tupleizer.csproj) | 2 | ||||
| -rw-r--r-- | src/test/WixToolsetTest.Converters.Symbolizer/ConvertTuplesFixture.cs (renamed from src/test/WixToolsetTest.Converters.Tupleizer/ConvertTuplesFixture.cs) | 370 | ||||
| -rw-r--r-- | src/test/WixToolsetTest.Converters.Symbolizer/TestData/Integration/test.wixout (renamed from src/test/WixToolsetTest.Converters.Tupleizer/TestData/Integration/test.wixout) | bin | 148559 -> 148559 bytes | |||
| -rw-r--r-- | src/test/WixToolsetTest.Converters.Symbolizer/TestData/Integration/test.wixproj (renamed from src/test/WixToolsetTest.Converters.Tupleizer/TestData/Integration/test.wixproj) | 2 | ||||
| -rw-r--r-- | src/test/WixToolsetTest.Converters.Symbolizer/TestData/Integration/test.wxs (renamed from src/test/WixToolsetTest.Converters.Tupleizer/TestData/Integration/test.wxs) | 6 | ||||
| -rw-r--r-- | src/test/WixToolsetTest.Converters.Symbolizer/WixToolsetTest.Converters.Symbolizer.csproj (renamed from src/test/WixToolsetTest.Converters.Tupleizer/WixToolsetTest.Converters.Tupleizer.csproj) | 2 | ||||
| -rw-r--r-- | src/test/WixToolsetTest.Converters.Symbolizer/WixToolsetTest.Converters.Symbolizer.v3.ncrunchproject | 9 | ||||
| -rw-r--r-- | src/test/WixToolsetTest.Converters.Tupleizer/WixToolsetTest.Converters.Tupleizer.v3.ncrunchproject | 9 |
9 files changed, 309 insertions, 309 deletions
diff --git a/src/WixToolset.Converters.Tupleizer/ConvertTuples.cs b/src/WixToolset.Converters.Symbolizer/ConvertTuples.cs index a53c3a74..76a0440f 100644 --- a/src/WixToolset.Converters.Tupleizer/ConvertTuples.cs +++ b/src/WixToolset.Converters.Symbolizer/ConvertTuples.cs | |||
| @@ -1,16 +1,16 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. |
| 2 | 2 | ||
| 3 | namespace WixToolset.Converters.Tupleizer | 3 | namespace WixToolset.Converters.Symbolizer |
| 4 | { | 4 | { |
| 5 | using System; | 5 | using System; |
| 6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
| 7 | using System.Linq; | 7 | using System.Linq; |
| 8 | using WixToolset.Data; | 8 | using WixToolset.Data; |
| 9 | using WixToolset.Data.Tuples; | 9 | using WixToolset.Data.Symbols; |
| 10 | using WixToolset.Data.WindowsInstaller; | 10 | using WixToolset.Data.WindowsInstaller; |
| 11 | using Wix3 = Microsoft.Tools.WindowsInstallerXml; | 11 | using Wix3 = Microsoft.Tools.WindowsInstallerXml; |
| 12 | 12 | ||
| 13 | public static class ConvertTuples | 13 | public static class ConvertSymbols |
| 14 | { | 14 | { |
| 15 | public static Intermediate ConvertFile(string path) | 15 | public static Intermediate ConvertFile(string path) |
| 16 | { | 16 | { |
| @@ -34,10 +34,10 @@ namespace WixToolset.Converters.Tupleizer | |||
| 34 | { | 34 | { |
| 35 | foreach (Wix3.Row row in table.Rows) | 35 | foreach (Wix3.Row row in table.Rows) |
| 36 | { | 36 | { |
| 37 | var tuple = GenerateTupleFromRow(row, wixMediaByDiskId, componentsById, fontsById, bindPathsById, selfRegById, wixFileById, wixDirectoryById); | 37 | var symbol = GenerateSymbolFromRow(row, wixMediaByDiskId, componentsById, fontsById, bindPathsById, selfRegById, wixFileById, wixDirectoryById); |
| 38 | if (tuple != null) | 38 | if (symbol != null) |
| 39 | { | 39 | { |
| 40 | section.Tuples.Add(tuple); | 40 | section.Symbols.Add(symbol); |
| 41 | } | 41 | } |
| 42 | } | 42 | } |
| 43 | } | 43 | } |
| @@ -77,31 +77,31 @@ namespace WixToolset.Converters.Tupleizer | |||
| 77 | return byId; | 77 | return byId; |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | private static IntermediateTuple GenerateTupleFromRow(Wix3.Row row, Dictionary<int, Wix3.WixMediaRow> wixMediaByDiskId, Dictionary<string, Wix3.Row> componentsById, Dictionary<string, Wix3.Row> fontsById, Dictionary<string, Wix3.Row> bindPathsById, Dictionary<string, Wix3.Row> selfRegById, Dictionary<string, Wix3.Row> wixFileById, Dictionary<string, Wix3.Row> wixDirectoryById) | 80 | private static IntermediateSymbol GenerateSymbolFromRow(Wix3.Row row, Dictionary<int, Wix3.WixMediaRow> wixMediaByDiskId, Dictionary<string, Wix3.Row> componentsById, Dictionary<string, Wix3.Row> fontsById, Dictionary<string, Wix3.Row> bindPathsById, Dictionary<string, Wix3.Row> selfRegById, Dictionary<string, Wix3.Row> wixFileById, Dictionary<string, Wix3.Row> wixDirectoryById) |
| 81 | { | 81 | { |
| 82 | var name = row.Table.Name; | 82 | var name = row.Table.Name; |
| 83 | switch (name) | 83 | switch (name) |
| 84 | { | 84 | { |
| 85 | case "_SummaryInformation": | 85 | case "_SummaryInformation": |
| 86 | return DefaultTupleFromRow(typeof(SummaryInformationTuple), row, columnZeroIsId: false); | 86 | return DefaultSymbolFromRow(typeof(SummaryInformationSymbol), row, columnZeroIsId: false); |
| 87 | case "ActionText": | 87 | case "ActionText": |
| 88 | return DefaultTupleFromRow(typeof(ActionTextTuple), row, columnZeroIsId: false); | 88 | return DefaultSymbolFromRow(typeof(ActionTextSymbol), row, columnZeroIsId: false); |
| 89 | case "AppId": | 89 | case "AppId": |
| 90 | return DefaultTupleFromRow(typeof(AppIdTuple), row, columnZeroIsId: false); | 90 | return DefaultSymbolFromRow(typeof(AppIdSymbol), row, columnZeroIsId: false); |
| 91 | case "AppSearch": | 91 | case "AppSearch": |
| 92 | return DefaultTupleFromRow(typeof(AppSearchTuple), row, columnZeroIsId: false); | 92 | return DefaultSymbolFromRow(typeof(AppSearchSymbol), row, columnZeroIsId: false); |
| 93 | case "Billboard": | 93 | case "Billboard": |
| 94 | return DefaultTupleFromRow(typeof(BillboardTuple), row, columnZeroIsId: true); | 94 | return DefaultSymbolFromRow(typeof(BillboardSymbol), row, columnZeroIsId: true); |
| 95 | case "Binary": | 95 | case "Binary": |
| 96 | return DefaultTupleFromRow(typeof(BinaryTuple), row, columnZeroIsId: true); | 96 | return DefaultSymbolFromRow(typeof(BinarySymbol), row, columnZeroIsId: true); |
| 97 | case "BindPath": | 97 | case "BindPath": |
| 98 | return null; | 98 | return null; |
| 99 | case "CCPSearch": | 99 | case "CCPSearch": |
| 100 | return DefaultTupleFromRow(typeof(CCPSearchTuple), row, columnZeroIsId: true); | 100 | return DefaultSymbolFromRow(typeof(CCPSearchSymbol), row, columnZeroIsId: true); |
| 101 | case "Class": | 101 | case "Class": |
| 102 | return DefaultTupleFromRow(typeof(ClassTuple), row, columnZeroIsId: false); | 102 | return DefaultSymbolFromRow(typeof(ClassSymbol), row, columnZeroIsId: false); |
| 103 | case "CompLocator": | 103 | case "CompLocator": |
| 104 | return DefaultTupleFromRow(typeof(CompLocatorTuple), row, columnZeroIsId: false); | 104 | return DefaultSymbolFromRow(typeof(CompLocatorSymbol), row, columnZeroIsId: false); |
| 105 | case "Component": | 105 | case "Component": |
| 106 | { | 106 | { |
| 107 | var attributes = FieldAsNullableInt(row, 3); | 107 | var attributes = FieldAsNullableInt(row, 3); |
| @@ -127,7 +127,7 @@ namespace WixToolset.Converters.Tupleizer | |||
| 127 | keyPathType = ComponentKeyPathType.OdbcDataSource; | 127 | keyPathType = ComponentKeyPathType.OdbcDataSource; |
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | return new ComponentTuple(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, FieldAsString(row, 0))) | 130 | return new ComponentSymbol(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, FieldAsString(row, 0))) |
| 131 | { | 131 | { |
| 132 | ComponentId = FieldAsString(row, 1), | 132 | ComponentId = FieldAsString(row, 1), |
| 133 | DirectoryRef = FieldAsString(row, 2), | 133 | DirectoryRef = FieldAsString(row, 2), |
| @@ -147,9 +147,9 @@ namespace WixToolset.Converters.Tupleizer | |||
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | case "Condition": | 149 | case "Condition": |
| 150 | return DefaultTupleFromRow(typeof(ConditionTuple), row, columnZeroIsId: false); | 150 | return DefaultSymbolFromRow(typeof(ConditionSymbol), row, columnZeroIsId: false); |
| 151 | case "CreateFolder": | 151 | case "CreateFolder": |
| 152 | return DefaultTupleFromRow(typeof(CreateFolderTuple), row, columnZeroIsId: false); | 152 | return DefaultSymbolFromRow(typeof(CreateFolderSymbol), row, columnZeroIsId: false); |
| 153 | case "CustomAction": | 153 | case "CustomAction": |
| 154 | { | 154 | { |
| 155 | var caType = FieldAsInt(row, 1); | 155 | var caType = FieldAsInt(row, 1); |
| @@ -157,7 +157,7 @@ namespace WixToolset.Converters.Tupleizer | |||
| 157 | var sourceType = DetermineCustomActionSourceType(caType); | 157 | var sourceType = DetermineCustomActionSourceType(caType); |
| 158 | var targetType = DetermineCustomActionTargetType(caType); | 158 | var targetType = DetermineCustomActionTargetType(caType); |
| 159 | 159 | ||
| 160 | return new CustomActionTuple(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, FieldAsString(row, 0))) | 160 | return new CustomActionSymbol(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, FieldAsString(row, 0))) |
| 161 | { | 161 | { |
| 162 | ExecutionType = executionType, | 162 | ExecutionType = executionType, |
| 163 | SourceType = sourceType, | 163 | SourceType = sourceType, |
| @@ -178,7 +178,7 @@ namespace WixToolset.Converters.Tupleizer | |||
| 178 | var id = FieldAsString(row, 0); | 178 | var id = FieldAsString(row, 0); |
| 179 | var splits = SplitDefaultDir(FieldAsString(row, 2)); | 179 | var splits = SplitDefaultDir(FieldAsString(row, 2)); |
| 180 | 180 | ||
| 181 | var tuple = new DirectoryTuple(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, id)) | 181 | var symbol = new DirectorySymbol(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, id)) |
| 182 | { | 182 | { |
| 183 | ParentDirectoryRef = FieldAsString(row, 1), | 183 | ParentDirectoryRef = FieldAsString(row, 1), |
| 184 | Name = splits[0], | 184 | Name = splits[0], |
| @@ -189,19 +189,19 @@ namespace WixToolset.Converters.Tupleizer | |||
| 189 | 189 | ||
| 190 | if (wixDirectoryById.TryGetValue(id, out var wixDirectoryRow)) | 190 | if (wixDirectoryById.TryGetValue(id, out var wixDirectoryRow)) |
| 191 | { | 191 | { |
| 192 | tuple.ComponentGuidGenerationSeed = FieldAsString(wixDirectoryRow, 1); | 192 | symbol.ComponentGuidGenerationSeed = FieldAsString(wixDirectoryRow, 1); |
| 193 | } | 193 | } |
| 194 | 194 | ||
| 195 | return tuple; | 195 | return symbol; |
| 196 | } | 196 | } |
| 197 | case "DrLocator": | 197 | case "DrLocator": |
| 198 | return DefaultTupleFromRow(typeof(DrLocatorTuple), row, columnZeroIsId: false); | 198 | return DefaultSymbolFromRow(typeof(DrLocatorSymbol), row, columnZeroIsId: false); |
| 199 | case "DuplicateFile": | 199 | case "DuplicateFile": |
| 200 | return DefaultTupleFromRow(typeof(DuplicateFileTuple), row, columnZeroIsId: true); | 200 | return DefaultSymbolFromRow(typeof(DuplicateFileSymbol), row, columnZeroIsId: true); |
| 201 | case "Error": | 201 | case "Error": |
| 202 | return DefaultTupleFromRow(typeof(ErrorTuple), row, columnZeroIsId: false); | 202 | return DefaultSymbolFromRow(typeof(ErrorSymbol), row, columnZeroIsId: false); |
| 203 | case "Extension": | 203 | case "Extension": |
| 204 | return DefaultTupleFromRow(typeof(ExtensionTuple), row, columnZeroIsId: false); | 204 | return DefaultSymbolFromRow(typeof(ExtensionSymbol), row, columnZeroIsId: false); |
| 205 | case "Feature": | 205 | case "Feature": |
| 206 | { | 206 | { |
| 207 | var attributes = FieldAsInt(row, 7); | 207 | var attributes = FieldAsInt(row, 7); |
| @@ -215,7 +215,7 @@ namespace WixToolset.Converters.Tupleizer | |||
| 215 | installDefault = FeatureInstallDefault.Source; | 215 | installDefault = FeatureInstallDefault.Source; |
| 216 | } | 216 | } |
| 217 | 217 | ||
| 218 | return new FeatureTuple(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, FieldAsString(row, 0))) | 218 | return new FeatureSymbol(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, FieldAsString(row, 0))) |
| 219 | { | 219 | { |
| 220 | ParentFeatureRef = FieldAsString(row, 1), | 220 | ParentFeatureRef = FieldAsString(row, 1), |
| 221 | Title = FieldAsString(row, 2), | 221 | Title = FieldAsString(row, 2), |
| @@ -231,71 +231,71 @@ namespace WixToolset.Converters.Tupleizer | |||
| 231 | } | 231 | } |
| 232 | 232 | ||
| 233 | case "FeatureComponents": | 233 | case "FeatureComponents": |
| 234 | return DefaultTupleFromRow(typeof(FeatureComponentsTuple), row, columnZeroIsId: false); | 234 | return DefaultSymbolFromRow(typeof(FeatureComponentsSymbol), row, columnZeroIsId: false); |
| 235 | case "File": | 235 | case "File": |
| 236 | { | 236 | { |
| 237 | var attributes = FieldAsNullableInt(row, 6); | 237 | var attributes = FieldAsNullableInt(row, 6); |
| 238 | 238 | ||
| 239 | FileTupleAttributes tupleAttributes = 0; | 239 | FileSymbolAttributes symbolAttributes = 0; |
| 240 | tupleAttributes |= (attributes & WindowsInstallerConstants.MsidbFileAttributesReadOnly) == WindowsInstallerConstants.MsidbFileAttributesReadOnly ? FileTupleAttributes.ReadOnly : 0; | 240 | symbolAttributes |= (attributes & WindowsInstallerConstants.MsidbFileAttributesReadOnly) == WindowsInstallerConstants.MsidbFileAttributesReadOnly ? FileSymbolAttributes.ReadOnly : 0; |
| 241 | tupleAttributes |= (attributes & WindowsInstallerConstants.MsidbFileAttributesHidden) == WindowsInstallerConstants.MsidbFileAttributesHidden ? FileTupleAttributes.Hidden : 0; | 241 | symbolAttributes |= (attributes & WindowsInstallerConstants.MsidbFileAttributesHidden) == WindowsInstallerConstants.MsidbFileAttributesHidden ? FileSymbolAttributes.Hidden : 0; |
| 242 | tupleAttributes |= (attributes & WindowsInstallerConstants.MsidbFileAttributesSystem) == WindowsInstallerConstants.MsidbFileAttributesSystem ? FileTupleAttributes.System : 0; | 242 | symbolAttributes |= (attributes & WindowsInstallerConstants.MsidbFileAttributesSystem) == WindowsInstallerConstants.MsidbFileAttributesSystem ? FileSymbolAttributes.System : 0; |
| 243 | tupleAttributes |= (attributes & WindowsInstallerConstants.MsidbFileAttributesVital) == WindowsInstallerConstants.MsidbFileAttributesVital ? FileTupleAttributes.Vital : 0; | 243 | symbolAttributes |= (attributes & WindowsInstallerConstants.MsidbFileAttributesVital) == WindowsInstallerConstants.MsidbFileAttributesVital ? FileSymbolAttributes.Vital : 0; |
| 244 | tupleAttributes |= (attributes & WindowsInstallerConstants.MsidbFileAttributesChecksum) == WindowsInstallerConstants.MsidbFileAttributesChecksum ? FileTupleAttributes.Checksum : 0; | 244 | symbolAttributes |= (attributes & WindowsInstallerConstants.MsidbFileAttributesChecksum) == WindowsInstallerConstants.MsidbFileAttributesChecksum ? FileSymbolAttributes.Checksum : 0; |
| 245 | tupleAttributes |= (attributes & WindowsInstallerConstants.MsidbFileAttributesNoncompressed) == WindowsInstallerConstants.MsidbFileAttributesNoncompressed ? FileTupleAttributes.Uncompressed : 0; | 245 | symbolAttributes |= (attributes & WindowsInstallerConstants.MsidbFileAttributesNoncompressed) == WindowsInstallerConstants.MsidbFileAttributesNoncompressed ? FileSymbolAttributes.Uncompressed : 0; |
| 246 | tupleAttributes |= (attributes & WindowsInstallerConstants.MsidbFileAttributesCompressed) == WindowsInstallerConstants.MsidbFileAttributesCompressed ? FileTupleAttributes.Compressed : 0; | 246 | symbolAttributes |= (attributes & WindowsInstallerConstants.MsidbFileAttributesCompressed) == WindowsInstallerConstants.MsidbFileAttributesCompressed ? FileSymbolAttributes.Compressed : 0; |
| 247 | 247 | ||
| 248 | var id = FieldAsString(row, 0); | 248 | var id = FieldAsString(row, 0); |
| 249 | 249 | ||
| 250 | var tuple = new FileTuple(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, id)) | 250 | var symbol = new FileSymbol(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, id)) |
| 251 | { | 251 | { |
| 252 | ComponentRef = FieldAsString(row, 1), | 252 | ComponentRef = FieldAsString(row, 1), |
| 253 | Name = FieldAsString(row, 2), | 253 | Name = FieldAsString(row, 2), |
| 254 | FileSize = FieldAsInt(row, 3), | 254 | FileSize = FieldAsInt(row, 3), |
| 255 | Version = FieldAsString(row, 4), | 255 | Version = FieldAsString(row, 4), |
| 256 | Language = FieldAsString(row, 5), | 256 | Language = FieldAsString(row, 5), |
| 257 | Attributes = tupleAttributes | 257 | Attributes = symbolAttributes |
| 258 | }; | 258 | }; |
| 259 | 259 | ||
| 260 | if (bindPathsById.TryGetValue(id, out var bindPathRow)) | 260 | if (bindPathsById.TryGetValue(id, out var bindPathRow)) |
| 261 | { | 261 | { |
| 262 | tuple.BindPath = FieldAsString(bindPathRow, 1) ?? String.Empty; | 262 | symbol.BindPath = FieldAsString(bindPathRow, 1) ?? String.Empty; |
| 263 | } | 263 | } |
| 264 | 264 | ||
| 265 | if (fontsById.TryGetValue(id, out var fontRow)) | 265 | if (fontsById.TryGetValue(id, out var fontRow)) |
| 266 | { | 266 | { |
| 267 | tuple.FontTitle = FieldAsString(fontRow, 1) ?? String.Empty; | 267 | symbol.FontTitle = FieldAsString(fontRow, 1) ?? String.Empty; |
| 268 | } | 268 | } |
| 269 | 269 | ||
| 270 | if (selfRegById.TryGetValue(id, out var selfRegRow)) | 270 | if (selfRegById.TryGetValue(id, out var selfRegRow)) |
| 271 | { | 271 | { |
| 272 | tuple.SelfRegCost = FieldAsNullableInt(selfRegRow, 1) ?? 0; | 272 | symbol.SelfRegCost = FieldAsNullableInt(selfRegRow, 1) ?? 0; |
| 273 | } | 273 | } |
| 274 | 274 | ||
| 275 | if (wixFileById.TryGetValue(id, out var wixFileRow)) | 275 | if (wixFileById.TryGetValue(id, out var wixFileRow)) |
| 276 | { | 276 | { |
| 277 | tuple.DirectoryRef = FieldAsString(wixFileRow, 4); | 277 | symbol.DirectoryRef = FieldAsString(wixFileRow, 4); |
| 278 | tuple.DiskId = FieldAsNullableInt(wixFileRow, 5) ?? 0; | 278 | symbol.DiskId = FieldAsNullableInt(wixFileRow, 5) ?? 0; |
| 279 | tuple.Source = new IntermediateFieldPathValue { Path = FieldAsString(wixFileRow, 6) }; | 279 | symbol.Source = new IntermediateFieldPathValue { Path = FieldAsString(wixFileRow, 6) }; |
| 280 | tuple.PatchGroup = FieldAsInt(wixFileRow, 8); | 280 | symbol.PatchGroup = FieldAsInt(wixFileRow, 8); |
| 281 | tuple.Attributes |= FieldAsInt(wixFileRow, 9) != 0 ? FileTupleAttributes.GeneratedShortFileName : 0; | 281 | symbol.Attributes |= FieldAsInt(wixFileRow, 9) != 0 ? FileSymbolAttributes.GeneratedShortFileName : 0; |
| 282 | tuple.PatchAttributes = (PatchAttributeType)FieldAsInt(wixFileRow, 10); | 282 | symbol.PatchAttributes = (PatchAttributeType)FieldAsInt(wixFileRow, 10); |
| 283 | } | 283 | } |
| 284 | 284 | ||
| 285 | return tuple; | 285 | return symbol; |
| 286 | } | 286 | } |
| 287 | case "Font": | 287 | case "Font": |
| 288 | return null; | 288 | return null; |
| 289 | case "Icon": | 289 | case "Icon": |
| 290 | return DefaultTupleFromRow(typeof(IconTuple), row, columnZeroIsId: true); | 290 | return DefaultSymbolFromRow(typeof(IconSymbol), row, columnZeroIsId: true); |
| 291 | case "IniLocator": | 291 | case "IniLocator": |
| 292 | return DefaultTupleFromRow(typeof(IniLocatorTuple), row, columnZeroIsId: false); | 292 | return DefaultSymbolFromRow(typeof(IniLocatorSymbol), row, columnZeroIsId: false); |
| 293 | case "LockPermissions": | 293 | case "LockPermissions": |
| 294 | return DefaultTupleFromRow(typeof(LockPermissionsTuple), row, columnZeroIsId: false); | 294 | return DefaultSymbolFromRow(typeof(LockPermissionsSymbol), row, columnZeroIsId: false); |
| 295 | case "Media": | 295 | case "Media": |
| 296 | { | 296 | { |
| 297 | var diskId = FieldAsInt(row, 0); | 297 | var diskId = FieldAsInt(row, 0); |
| 298 | var tuple = new MediaTuple(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, diskId)) | 298 | var symbol = new MediaSymbol(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, diskId)) |
| 299 | { | 299 | { |
| 300 | DiskId = diskId, | 300 | DiskId = diskId, |
| 301 | LastSequence = FieldAsNullableInt(row, 1), | 301 | LastSequence = FieldAsNullableInt(row, 1), |
| @@ -309,24 +309,24 @@ namespace WixToolset.Converters.Tupleizer | |||
| 309 | { | 309 | { |
| 310 | var compressionLevel = FieldAsString(wixMediaRow, 1); | 310 | var compressionLevel = FieldAsString(wixMediaRow, 1); |
| 311 | 311 | ||
| 312 | tuple.CompressionLevel = String.IsNullOrEmpty(compressionLevel) ? null : (CompressionLevel?)Enum.Parse(typeof(CompressionLevel), compressionLevel, true); | 312 | symbol.CompressionLevel = String.IsNullOrEmpty(compressionLevel) ? null : (CompressionLevel?)Enum.Parse(typeof(CompressionLevel), compressionLevel, true); |
| 313 | tuple.Layout = wixMediaRow.Layout; | 313 | symbol.Layout = wixMediaRow.Layout; |
| 314 | } | 314 | } |
| 315 | 315 | ||
| 316 | return tuple; | 316 | return symbol; |
| 317 | } | 317 | } |
| 318 | case "MIME": | 318 | case "MIME": |
| 319 | return DefaultTupleFromRow(typeof(MIMETuple), row, columnZeroIsId: false); | 319 | return DefaultSymbolFromRow(typeof(MIMESymbol), row, columnZeroIsId: false); |
| 320 | case "ModuleIgnoreTable": | 320 | case "ModuleIgnoreTable": |
| 321 | return DefaultTupleFromRow(typeof(ModuleIgnoreTableTuple), row, columnZeroIsId: true); | 321 | return DefaultSymbolFromRow(typeof(ModuleIgnoreTableSymbol), row, columnZeroIsId: true); |
| 322 | case "MoveFile": | 322 | case "MoveFile": |
| 323 | return DefaultTupleFromRow(typeof(MoveFileTuple), row, columnZeroIsId: true); | 323 | return DefaultSymbolFromRow(typeof(MoveFileSymbol), row, columnZeroIsId: true); |
| 324 | case "MsiAssembly": | 324 | case "MsiAssembly": |
| 325 | { | 325 | { |
| 326 | var componentId = FieldAsString(row, 0); | 326 | var componentId = FieldAsString(row, 0); |
| 327 | if (componentsById.TryGetValue(componentId, out var componentRow)) | 327 | if (componentsById.TryGetValue(componentId, out var componentRow)) |
| 328 | { | 328 | { |
| 329 | return new AssemblyTuple(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, FieldAsString(componentRow, 5))) | 329 | return new AssemblySymbol(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, FieldAsString(componentRow, 5))) |
| 330 | { | 330 | { |
| 331 | ComponentRef = componentId, | 331 | ComponentRef = componentId, |
| 332 | FeatureRef = FieldAsString(row, 1), | 332 | FeatureRef = FieldAsString(row, 1), |
| @@ -339,21 +339,21 @@ namespace WixToolset.Converters.Tupleizer | |||
| 339 | return null; | 339 | return null; |
| 340 | } | 340 | } |
| 341 | case "MsiLockPermissionsEx": | 341 | case "MsiLockPermissionsEx": |
| 342 | return DefaultTupleFromRow(typeof(MsiLockPermissionsExTuple), row, columnZeroIsId: true); | 342 | return DefaultSymbolFromRow(typeof(MsiLockPermissionsExSymbol), row, columnZeroIsId: true); |
| 343 | case "MsiShortcutProperty": | 343 | case "MsiShortcutProperty": |
| 344 | return DefaultTupleFromRow(typeof(MsiShortcutPropertyTuple), row, columnZeroIsId: true); | 344 | return DefaultSymbolFromRow(typeof(MsiShortcutPropertySymbol), row, columnZeroIsId: true); |
| 345 | case "ODBCDataSource": | 345 | case "ODBCDataSource": |
| 346 | return DefaultTupleFromRow(typeof(ODBCDataSourceTuple), row, columnZeroIsId: true); | 346 | return DefaultSymbolFromRow(typeof(ODBCDataSourceSymbol), row, columnZeroIsId: true); |
| 347 | case "ODBCDriver": | 347 | case "ODBCDriver": |
| 348 | return DefaultTupleFromRow(typeof(ODBCDriverTuple), row, columnZeroIsId: true); | 348 | return DefaultSymbolFromRow(typeof(ODBCDriverSymbol), row, columnZeroIsId: true); |
| 349 | case "ODBCTranslator": | 349 | case "ODBCTranslator": |
| 350 | return DefaultTupleFromRow(typeof(ODBCTranslatorTuple), row, columnZeroIsId: true); | 350 | return DefaultSymbolFromRow(typeof(ODBCTranslatorSymbol), row, columnZeroIsId: true); |
| 351 | case "ProgId": | 351 | case "ProgId": |
| 352 | return DefaultTupleFromRow(typeof(ProgIdTuple), row, columnZeroIsId: false); | 352 | return DefaultSymbolFromRow(typeof(ProgIdSymbol), row, columnZeroIsId: false); |
| 353 | case "Property": | 353 | case "Property": |
| 354 | return DefaultTupleFromRow(typeof(PropertyTuple), row, columnZeroIsId: true); | 354 | return DefaultSymbolFromRow(typeof(PropertySymbol), row, columnZeroIsId: true); |
| 355 | case "PublishComponent": | 355 | case "PublishComponent": |
| 356 | return DefaultTupleFromRow(typeof(PublishComponentTuple), row, columnZeroIsId: false); | 356 | return DefaultSymbolFromRow(typeof(PublishComponentSymbol), row, columnZeroIsId: false); |
| 357 | case "Registry": | 357 | case "Registry": |
| 358 | { | 358 | { |
| 359 | var value = FieldAsString(row, 4); | 359 | var value = FieldAsString(row, 4); |
| @@ -397,7 +397,7 @@ namespace WixToolset.Converters.Tupleizer | |||
| 397 | } | 397 | } |
| 398 | } | 398 | } |
| 399 | 399 | ||
| 400 | return new RegistryTuple(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, FieldAsString(row, 0))) | 400 | return new RegistrySymbol(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, FieldAsString(row, 0))) |
| 401 | { | 401 | { |
| 402 | Root = (RegistryRootType)FieldAsInt(row, 1), | 402 | Root = (RegistryRootType)FieldAsInt(row, 1), |
| 403 | Key = FieldAsString(row, 2), | 403 | Key = FieldAsString(row, 2), |
| @@ -412,7 +412,7 @@ namespace WixToolset.Converters.Tupleizer | |||
| 412 | { | 412 | { |
| 413 | var type = FieldAsInt(row, 4); | 413 | var type = FieldAsInt(row, 4); |
| 414 | 414 | ||
| 415 | return new RegLocatorTuple(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, FieldAsString(row, 0))) | 415 | return new RegLocatorSymbol(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, FieldAsString(row, 0))) |
| 416 | { | 416 | { |
| 417 | Root = (RegistryRootType)FieldAsInt(row, 1), | 417 | Root = (RegistryRootType)FieldAsInt(row, 1), |
| 418 | Key = FieldAsString(row, 2), | 418 | Key = FieldAsString(row, 2), |
| @@ -424,7 +424,7 @@ namespace WixToolset.Converters.Tupleizer | |||
| 424 | case "RemoveFile": | 424 | case "RemoveFile": |
| 425 | { | 425 | { |
| 426 | var installMode = FieldAsInt(row, 4); | 426 | var installMode = FieldAsInt(row, 4); |
| 427 | return new RemoveFileTuple(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, FieldAsString(row, 0))) | 427 | return new RemoveFileSymbol(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, FieldAsString(row, 0))) |
| 428 | { | 428 | { |
| 429 | ComponentRef = FieldAsString(row, 1), | 429 | ComponentRef = FieldAsString(row, 1), |
| 430 | FileName = FieldAsString(row, 2), | 430 | FileName = FieldAsString(row, 2), |
| @@ -435,7 +435,7 @@ namespace WixToolset.Converters.Tupleizer | |||
| 435 | } | 435 | } |
| 436 | case "RemoveRegistry": | 436 | case "RemoveRegistry": |
| 437 | { | 437 | { |
| 438 | return new RemoveRegistryTuple(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, FieldAsString(row, 0))) | 438 | return new RemoveRegistrySymbol(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, FieldAsString(row, 0))) |
| 439 | { | 439 | { |
| 440 | Action = RemoveRegistryActionType.RemoveOnInstall, | 440 | Action = RemoveRegistryActionType.RemoveOnInstall, |
| 441 | Root = (RegistryRootType)FieldAsInt(row, 1), | 441 | Root = (RegistryRootType)FieldAsInt(row, 1), |
| @@ -446,14 +446,14 @@ namespace WixToolset.Converters.Tupleizer | |||
| 446 | } | 446 | } |
| 447 | 447 | ||
| 448 | case "ReserveCost": | 448 | case "ReserveCost": |
| 449 | return DefaultTupleFromRow(typeof(ReserveCostTuple), row, columnZeroIsId: true); | 449 | return DefaultSymbolFromRow(typeof(ReserveCostSymbol), row, columnZeroIsId: true); |
| 450 | case "SelfReg": | 450 | case "SelfReg": |
| 451 | return null; | 451 | return null; |
| 452 | case "ServiceControl": | 452 | case "ServiceControl": |
| 453 | { | 453 | { |
| 454 | var events = FieldAsInt(row, 2); | 454 | var events = FieldAsInt(row, 2); |
| 455 | var wait = FieldAsNullableInt(row, 4); | 455 | var wait = FieldAsNullableInt(row, 4); |
| 456 | return new ServiceControlTuple(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, FieldAsString(row, 0))) | 456 | return new ServiceControlSymbol(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, FieldAsString(row, 0))) |
| 457 | { | 457 | { |
| 458 | Name = FieldAsString(row, 1), | 458 | Name = FieldAsString(row, 1), |
| 459 | Arguments = FieldAsString(row, 3), | 459 | Arguments = FieldAsString(row, 3), |
| @@ -469,12 +469,12 @@ namespace WixToolset.Converters.Tupleizer | |||
| 469 | } | 469 | } |
| 470 | 470 | ||
| 471 | case "ServiceInstall": | 471 | case "ServiceInstall": |
| 472 | return DefaultTupleFromRow(typeof(ServiceInstallTuple), row, columnZeroIsId: true); | 472 | return DefaultSymbolFromRow(typeof(ServiceInstallSymbol), row, columnZeroIsId: true); |
| 473 | case "Shortcut": | 473 | case "Shortcut": |
| 474 | { | 474 | { |
| 475 | var splitName = FieldAsString(row, 2).Split('|'); | 475 | var splitName = FieldAsString(row, 2).Split('|'); |
| 476 | 476 | ||
| 477 | return new ShortcutTuple(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, FieldAsString(row, 0))) | 477 | return new ShortcutSymbol(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, FieldAsString(row, 0))) |
| 478 | { | 478 | { |
| 479 | DirectoryRef = FieldAsString(row, 1), | 479 | DirectoryRef = FieldAsString(row, 1), |
| 480 | Name = splitName.Length > 1 ? splitName[1] : splitName[0], | 480 | Name = splitName.Length > 1 ? splitName[1] : splitName[0], |
| @@ -495,13 +495,13 @@ namespace WixToolset.Converters.Tupleizer | |||
| 495 | }; | 495 | }; |
| 496 | } | 496 | } |
| 497 | case "Signature": | 497 | case "Signature": |
| 498 | return DefaultTupleFromRow(typeof(SignatureTuple), row, columnZeroIsId: true); | 498 | return DefaultSymbolFromRow(typeof(SignatureSymbol), row, columnZeroIsId: true); |
| 499 | case "UIText": | 499 | case "UIText": |
| 500 | return DefaultTupleFromRow(typeof(UITextTuple), row, columnZeroIsId: true); | 500 | return DefaultSymbolFromRow(typeof(UITextSymbol), row, columnZeroIsId: true); |
| 501 | case "Upgrade": | 501 | case "Upgrade": |
| 502 | { | 502 | { |
| 503 | var attributes = FieldAsInt(row, 4); | 503 | var attributes = FieldAsInt(row, 4); |
| 504 | return new UpgradeTuple(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, FieldAsString(row, 0))) | 504 | return new UpgradeSymbol(SourceLineNumber4(row.SourceLineNumbers), new Identifier(AccessModifier.Public, FieldAsString(row, 0))) |
| 505 | { | 505 | { |
| 506 | UpgradeCode = FieldAsString(row, 0), | 506 | UpgradeCode = FieldAsString(row, 0), |
| 507 | VersionMin = FieldAsString(row, 1), | 507 | VersionMin = FieldAsString(row, 1), |
| @@ -518,11 +518,11 @@ namespace WixToolset.Converters.Tupleizer | |||
| 518 | }; | 518 | }; |
| 519 | } | 519 | } |
| 520 | case "Verb": | 520 | case "Verb": |
| 521 | return DefaultTupleFromRow(typeof(VerbTuple), row, columnZeroIsId: false); | 521 | return DefaultSymbolFromRow(typeof(VerbSymbol), row, columnZeroIsId: false); |
| 522 | case "WixAction": | 522 | case "WixAction": |
| 523 | { | 523 | { |
| 524 | var sequenceTable = FieldAsString(row, 0); | 524 | var sequenceTable = FieldAsString(row, 0); |
| 525 | return new WixActionTuple(SourceLineNumber4(row.SourceLineNumbers)) | 525 | return new WixActionSymbol(SourceLineNumber4(row.SourceLineNumbers)) |
| 526 | { | 526 | { |
| 527 | SequenceTable = (SequenceTable)Enum.Parse(typeof(SequenceTable), sequenceTable == "AdvtExecuteSequence" ? nameof(SequenceTable.AdvertiseExecuteSequence) : sequenceTable), | 527 | SequenceTable = (SequenceTable)Enum.Parse(typeof(SequenceTable), sequenceTable == "AdvtExecuteSequence" ? nameof(SequenceTable.AdvertiseExecuteSequence) : sequenceTable), |
| 528 | Action = FieldAsString(row, 1), | 528 | Action = FieldAsString(row, 1), |
| @@ -534,31 +534,31 @@ namespace WixToolset.Converters.Tupleizer | |||
| 534 | }; | 534 | }; |
| 535 | } | 535 | } |
| 536 | case "WixBootstrapperApplication": | 536 | case "WixBootstrapperApplication": |
| 537 | return DefaultTupleFromRow(typeof(WixBootstrapperApplicationTuple), row, columnZeroIsId: true); | 537 | return DefaultSymbolFromRow(typeof(WixBootstrapperApplicationSymbol), row, columnZeroIsId: true); |
| 538 | case "WixBundleContainer": | 538 | case "WixBundleContainer": |
| 539 | return DefaultTupleFromRow(typeof(WixBundleContainerTuple), row, columnZeroIsId: true); | 539 | return DefaultSymbolFromRow(typeof(WixBundleContainerSymbol), row, columnZeroIsId: true); |
| 540 | case "WixBundleVariable": | 540 | case "WixBundleVariable": |
| 541 | return DefaultTupleFromRow(typeof(WixBundleVariableTuple), row, columnZeroIsId: true); | 541 | return DefaultSymbolFromRow(typeof(WixBundleVariableSymbol), row, columnZeroIsId: true); |
| 542 | case "WixChainItem": | 542 | case "WixChainItem": |
| 543 | return DefaultTupleFromRow(typeof(WixChainItemTuple), row, columnZeroIsId: true); | 543 | return DefaultSymbolFromRow(typeof(WixChainItemSymbol), row, columnZeroIsId: true); |
| 544 | case "WixCustomTable": | 544 | case "WixCustomTable": |
| 545 | return DefaultTupleFromRow(typeof(WixCustomTableTuple), row, columnZeroIsId: true); | 545 | return DefaultSymbolFromRow(typeof(WixCustomTableSymbol), row, columnZeroIsId: true); |
| 546 | case "WixDirectory": | 546 | case "WixDirectory": |
| 547 | return null; | 547 | return null; |
| 548 | case "WixFile": | 548 | case "WixFile": |
| 549 | return null; | 549 | return null; |
| 550 | case "WixInstanceTransforms": | 550 | case "WixInstanceTransforms": |
| 551 | return DefaultTupleFromRow(typeof(WixInstanceTransformsTuple), row, columnZeroIsId: true); | 551 | return DefaultSymbolFromRow(typeof(WixInstanceTransformsSymbol), row, columnZeroIsId: true); |
| 552 | case "WixMedia": | 552 | case "WixMedia": |
| 553 | return null; | 553 | return null; |
| 554 | case "WixMerge": | 554 | case "WixMerge": |
| 555 | return DefaultTupleFromRow(typeof(WixMergeTuple), row, columnZeroIsId: true); | 555 | return DefaultSymbolFromRow(typeof(WixMergeSymbol), row, columnZeroIsId: true); |
| 556 | case "WixPatchBaseline": | 556 | case "WixPatchBaseline": |
| 557 | return DefaultTupleFromRow(typeof(WixPatchBaselineTuple), row, columnZeroIsId: true); | 557 | return DefaultSymbolFromRow(typeof(WixPatchBaselineSymbol), row, columnZeroIsId: true); |
| 558 | case "WixProperty": | 558 | case "WixProperty": |
| 559 | { | 559 | { |
| 560 | var attributes = FieldAsInt(row, 1); | 560 | var attributes = FieldAsInt(row, 1); |
| 561 | return new WixPropertyTuple(SourceLineNumber4(row.SourceLineNumbers)) | 561 | return new WixPropertySymbol(SourceLineNumber4(row.SourceLineNumbers)) |
| 562 | { | 562 | { |
| 563 | PropertyRef = FieldAsString(row, 0), | 563 | PropertyRef = FieldAsString(row, 0), |
| 564 | Admin = (attributes & 0x1) == 0x1, | 564 | Admin = (attributes & 0x1) == 0x1, |
| @@ -567,13 +567,13 @@ namespace WixToolset.Converters.Tupleizer | |||
| 567 | }; | 567 | }; |
| 568 | } | 568 | } |
| 569 | case "WixSuppressModularization": | 569 | case "WixSuppressModularization": |
| 570 | return DefaultTupleFromRow(typeof(WixSuppressModularizationTuple), row, columnZeroIsId: true); | 570 | return DefaultSymbolFromRow(typeof(WixSuppressModularizationSymbol), row, columnZeroIsId: true); |
| 571 | case "WixUI": | 571 | case "WixUI": |
| 572 | return DefaultTupleFromRow(typeof(WixUITuple), row, columnZeroIsId: true); | 572 | return DefaultSymbolFromRow(typeof(WixUISymbol), row, columnZeroIsId: true); |
| 573 | case "WixVariable": | 573 | case "WixVariable": |
| 574 | return DefaultTupleFromRow(typeof(WixVariableTuple), row, columnZeroIsId: true); | 574 | return DefaultSymbolFromRow(typeof(WixVariableSymbol), row, columnZeroIsId: true); |
| 575 | default: | 575 | default: |
| 576 | return GenericTupleFromCustomRow(row, columnZeroIsId: false); | 576 | return GenericSymbolFromCustomRow(row, columnZeroIsId: false); |
| 577 | } | 577 | } |
| 578 | } | 578 | } |
| 579 | 579 | ||
| @@ -674,35 +674,35 @@ namespace WixToolset.Converters.Tupleizer | |||
| 674 | } | 674 | } |
| 675 | } | 675 | } |
| 676 | 676 | ||
| 677 | private static IntermediateTuple DefaultTupleFromRow(Type tupleType, Wix3.Row row, bool columnZeroIsId) | 677 | private static IntermediateSymbol DefaultSymbolFromRow(Type symbolType, Wix3.Row row, bool columnZeroIsId) |
| 678 | { | 678 | { |
| 679 | var tuple = Activator.CreateInstance(tupleType) as IntermediateTuple; | 679 | var symbol = Activator.CreateInstance(symbolType) as IntermediateSymbol; |
| 680 | 680 | ||
| 681 | SetTupleFieldsFromRow(row, tuple, columnZeroIsId); | 681 | SetSymbolFieldsFromRow(row, symbol, columnZeroIsId); |
| 682 | 682 | ||
| 683 | tuple.SourceLineNumbers = SourceLineNumber4(row.SourceLineNumbers); | 683 | symbol.SourceLineNumbers = SourceLineNumber4(row.SourceLineNumbers); |
| 684 | return tuple; | 684 | return symbol; |
| 685 | } | 685 | } |
| 686 | 686 | ||
| 687 | private static IntermediateTuple GenericTupleFromCustomRow(Wix3.Row row, bool columnZeroIsId) | 687 | private static IntermediateSymbol GenericSymbolFromCustomRow(Wix3.Row row, bool columnZeroIsId) |
| 688 | { | 688 | { |
| 689 | var columnDefinitions = row.Table.Definition.Columns.Cast<Wix3.ColumnDefinition>(); | 689 | var columnDefinitions = row.Table.Definition.Columns.Cast<Wix3.ColumnDefinition>(); |
| 690 | var fieldDefinitions = columnDefinitions.Select(columnDefinition => | 690 | var fieldDefinitions = columnDefinitions.Select(columnDefinition => |
| 691 | new IntermediateFieldDefinition(columnDefinition.Name, ColumnType3ToIntermediateFieldType4(columnDefinition.Type))).ToArray(); | 691 | new IntermediateFieldDefinition(columnDefinition.Name, ColumnType3ToIntermediateFieldType4(columnDefinition.Type))).ToArray(); |
| 692 | var tupleDefinition = new IntermediateTupleDefinition(row.Table.Name, fieldDefinitions, null); | 692 | var symbolDefinition = new IntermediateSymbolDefinition(row.Table.Name, fieldDefinitions, null); |
| 693 | var tuple = new IntermediateTuple(tupleDefinition, SourceLineNumber4(row.SourceLineNumbers)); | 693 | var symbol = new IntermediateSymbol(symbolDefinition, SourceLineNumber4(row.SourceLineNumbers)); |
| 694 | 694 | ||
| 695 | SetTupleFieldsFromRow(row, tuple, columnZeroIsId); | 695 | SetSymbolFieldsFromRow(row, symbol, columnZeroIsId); |
| 696 | 696 | ||
| 697 | return tuple; | 697 | return symbol; |
| 698 | } | 698 | } |
| 699 | 699 | ||
| 700 | private static void SetTupleFieldsFromRow(Wix3.Row row, IntermediateTuple tuple, bool columnZeroIsId) | 700 | private static void SetSymbolFieldsFromRow(Wix3.Row row, IntermediateSymbol symbol, bool columnZeroIsId) |
| 701 | { | 701 | { |
| 702 | int offset = 0; | 702 | int offset = 0; |
| 703 | if (columnZeroIsId) | 703 | if (columnZeroIsId) |
| 704 | { | 704 | { |
| 705 | tuple.Id = GetIdentifierForRow(row); | 705 | symbol.Id = GetIdentifierForRow(row); |
| 706 | offset = 1; | 706 | offset = 1; |
| 707 | } | 707 | } |
| 708 | 708 | ||
| @@ -715,15 +715,15 @@ namespace WixToolset.Converters.Tupleizer | |||
| 715 | case Wix3.ColumnType.Localized: | 715 | case Wix3.ColumnType.Localized: |
| 716 | case Wix3.ColumnType.Object: | 716 | case Wix3.ColumnType.Object: |
| 717 | case Wix3.ColumnType.Preserved: | 717 | case Wix3.ColumnType.Preserved: |
| 718 | tuple.Set(i - offset, FieldAsString(row, i)); | 718 | symbol.Set(i - offset, FieldAsString(row, i)); |
| 719 | break; | 719 | break; |
| 720 | case Wix3.ColumnType.Number: | 720 | case Wix3.ColumnType.Number: |
| 721 | int? nullableValue = FieldAsNullableInt(row, i); | 721 | int? nullableValue = FieldAsNullableInt(row, i); |
| 722 | // TODO: Consider whether null values should be coerced to their default value when | 722 | // TODO: Consider whether null values should be coerced to their default value when |
| 723 | // a column is not nullable. For now, just pass through the null. | 723 | // a column is not nullable. For now, just pass through the null. |
| 724 | //int value = FieldAsInt(row, i); | 724 | //int value = FieldAsInt(row, i); |
| 725 | //tuple.Set(i - offset, column.IsNullable ? nullableValue : value); | 725 | //symbol.Set(i - offset, column.IsNullable ? nullableValue : value); |
| 726 | tuple.Set(i - offset, nullableValue); | 726 | symbol.Set(i - offset, nullableValue); |
| 727 | break; | 727 | break; |
| 728 | case Wix3.ColumnType.Unknown: | 728 | case Wix3.ColumnType.Unknown: |
| 729 | break; | 729 | break; |
diff --git a/src/WixToolset.Converters.Tupleizer/WixToolset.Converters.Tupleizer.csproj b/src/WixToolset.Converters.Symbolizer/WixToolset.Converters.Symbolizer.csproj index cafb5feb..4aad6d07 100644 --- a/src/WixToolset.Converters.Tupleizer/WixToolset.Converters.Tupleizer.csproj +++ b/src/WixToolset.Converters.Symbolizer/WixToolset.Converters.Symbolizer.csproj | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | 5 | ||
| 6 | <PropertyGroup> | 6 | <PropertyGroup> |
| 7 | <TargetFrameworks>netstandard2.0;net461;net472</TargetFrameworks> | 7 | <TargetFrameworks>netstandard2.0;net461;net472</TargetFrameworks> |
| 8 | <Description>Tupleizer</Description> | 8 | <Description>Symbolizer</Description> |
| 9 | <Title>WiX Toolset Converters Tuplizer</Title> | 9 | <Title>WiX Toolset Converters Tuplizer</Title> |
| 10 | <DebugType>embedded</DebugType> | 10 | <DebugType>embedded</DebugType> |
| 11 | <PublishRepositoryUrl>true</PublishRepositoryUrl> | 11 | <PublishRepositoryUrl>true</PublishRepositoryUrl> |
diff --git a/src/test/WixToolsetTest.Converters.Tupleizer/ConvertTuplesFixture.cs b/src/test/WixToolsetTest.Converters.Symbolizer/ConvertTuplesFixture.cs index 5df577f6..ae054079 100644 --- a/src/test/WixToolsetTest.Converters.Tupleizer/ConvertTuplesFixture.cs +++ b/src/test/WixToolsetTest.Converters.Symbolizer/ConvertTuplesFixture.cs | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. |
| 2 | 2 | ||
| 3 | namespace WixToolsetTest.Converters.Tupleizer | 3 | namespace WixToolsetTest.Converters.Symbolizer |
| 4 | { | 4 | { |
| 5 | using System; | 5 | using System; |
| 6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
| @@ -8,13 +8,13 @@ namespace WixToolsetTest.Converters.Tupleizer | |||
| 8 | using System.Linq; | 8 | using System.Linq; |
| 9 | using WixBuildTools.TestSupport; | 9 | using WixBuildTools.TestSupport; |
| 10 | using Wix3 = Microsoft.Tools.WindowsInstallerXml; | 10 | using Wix3 = Microsoft.Tools.WindowsInstallerXml; |
| 11 | using WixToolset.Converters.Tupleizer; | 11 | using WixToolset.Converters.Symbolizer; |
| 12 | using WixToolset.Data; | 12 | using WixToolset.Data; |
| 13 | using WixToolset.Data.WindowsInstaller; | 13 | using WixToolset.Data.WindowsInstaller; |
| 14 | using WixToolset.Data.Tuples; | 14 | using WixToolset.Data.Symbols; |
| 15 | using Xunit; | 15 | using Xunit; |
| 16 | 16 | ||
| 17 | public class ConvertTuplesFixture | 17 | public class ConvertSymbolsFixture |
| 18 | { | 18 | { |
| 19 | [Fact] | 19 | [Fact] |
| 20 | public void CanLoadWixoutAndConvertToIntermediate() | 20 | public void CanLoadWixoutAndConvertToIntermediate() |
| @@ -28,7 +28,7 @@ namespace WixToolsetTest.Converters.Tupleizer | |||
| 28 | 28 | ||
| 29 | var path = Path.Combine(dataFolder, "test.wixout"); | 29 | var path = Path.Combine(dataFolder, "test.wixout"); |
| 30 | 30 | ||
| 31 | var intermediate = ConvertTuples.ConvertFile(path); | 31 | var intermediate = ConvertSymbols.ConvertFile(path); |
| 32 | 32 | ||
| 33 | Assert.NotNull(intermediate); | 33 | Assert.NotNull(intermediate); |
| 34 | Assert.Single(intermediate.Sections); | 34 | Assert.Single(intermediate.Sections); |
| @@ -54,12 +54,12 @@ namespace WixToolsetTest.Converters.Tupleizer | |||
| 54 | .OrderBy(s => s) | 54 | .OrderBy(s => s) |
| 55 | .ToArray(); | 55 | .ToArray(); |
| 56 | 56 | ||
| 57 | var tuples = intermediate.Sections.SelectMany(s => s.Tuples); | 57 | var symbols = intermediate.Sections.SelectMany(s => s.Symbols); |
| 58 | 58 | ||
| 59 | var assemblyTuplesByFileId = tuples.OfType<AssemblyTuple>().ToDictionary(a => a.Id.Id); | 59 | var assemblySymbolsByFileId = symbols.OfType<AssemblySymbol>().ToDictionary(a => a.Id.Id); |
| 60 | 60 | ||
| 61 | var wix4Dump = tuples | 61 | var wix4Dump = symbols |
| 62 | .SelectMany(tuple => TupleToStrings(tuple, assemblyTuplesByFileId)) | 62 | .SelectMany(symbol => SymbolToStrings(symbol, assemblySymbolsByFileId)) |
| 63 | .OrderBy(s => s) | 63 | .OrderBy(s => s) |
| 64 | .ToArray(); | 64 | .ToArray(); |
| 65 | 65 | ||
| @@ -100,7 +100,7 @@ namespace WixToolsetTest.Converters.Tupleizer | |||
| 100 | { | 100 | { |
| 101 | string fields = null; | 101 | string fields = null; |
| 102 | 102 | ||
| 103 | // Massage output to match WiX v3 rows and v4 tuples. | 103 | // Massage output to match WiX v3 rows and v4 symbols. |
| 104 | // | 104 | // |
| 105 | switch (row.Table.Name) | 105 | switch (row.Table.Name) |
| 106 | { | 106 | { |
| @@ -177,199 +177,199 @@ namespace WixToolsetTest.Converters.Tupleizer | |||
| 177 | } | 177 | } |
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | private static IEnumerable<string> TupleToStrings(IntermediateTuple tuple, Dictionary<string, AssemblyTuple> assemblyTuplesByFileId) | 180 | private static IEnumerable<string> SymbolToStrings(IntermediateSymbol symbol, Dictionary<string, AssemblySymbol> assemblySymbolsByFileId) |
| 181 | { | 181 | { |
| 182 | var name = tuple.Definition.Type == TupleDefinitionType.SummaryInformation ? "_SummaryInformation" : tuple.Definition.Name; | 182 | var name = symbol.Definition.Type == SymbolDefinitionType.SummaryInformation ? "_SummaryInformation" : symbol.Definition.Name; |
| 183 | var id = tuple.Id?.Id ?? String.Empty; | 183 | var id = symbol.Id?.Id ?? String.Empty; |
| 184 | 184 | ||
| 185 | string fields; | 185 | string fields; |
| 186 | switch (tuple.Definition.Name) | 186 | switch (symbol.Definition.Name) |
| 187 | { | 187 | { |
| 188 | // Massage output to match WiX v3 rows and v4 tuples. | 188 | // Massage output to match WiX v3 rows and v4 symbols. |
| 189 | // | 189 | // |
| 190 | case "Component": | 190 | case "Component": |
| 191 | { | 191 | { |
| 192 | var componentTuple = (ComponentTuple)tuple; | 192 | var componentSymbol = (ComponentSymbol)symbol; |
| 193 | var attributes = ComponentLocation.Either == componentTuple.Location ? WindowsInstallerConstants.MsidbComponentAttributesOptional : 0; | 193 | var attributes = ComponentLocation.Either == componentSymbol.Location ? WindowsInstallerConstants.MsidbComponentAttributesOptional : 0; |
| 194 | attributes |= ComponentLocation.SourceOnly == componentTuple.Location ? WindowsInstallerConstants.MsidbComponentAttributesSourceOnly : 0; | 194 | attributes |= ComponentLocation.SourceOnly == componentSymbol.Location ? WindowsInstallerConstants.MsidbComponentAttributesSourceOnly : 0; |
| 195 | attributes |= ComponentKeyPathType.Registry == componentTuple.KeyPathType ? WindowsInstallerConstants.MsidbComponentAttributesRegistryKeyPath : 0; | 195 | attributes |= ComponentKeyPathType.Registry == componentSymbol.KeyPathType ? WindowsInstallerConstants.MsidbComponentAttributesRegistryKeyPath : 0; |
| 196 | attributes |= ComponentKeyPathType.OdbcDataSource == componentTuple.KeyPathType ? WindowsInstallerConstants.MsidbComponentAttributesODBCDataSource : 0; | 196 | attributes |= ComponentKeyPathType.OdbcDataSource == componentSymbol.KeyPathType ? WindowsInstallerConstants.MsidbComponentAttributesODBCDataSource : 0; |
| 197 | attributes |= componentTuple.DisableRegistryReflection ? WindowsInstallerConstants.MsidbComponentAttributesDisableRegistryReflection : 0; | 197 | attributes |= componentSymbol.DisableRegistryReflection ? WindowsInstallerConstants.MsidbComponentAttributesDisableRegistryReflection : 0; |
| 198 | attributes |= componentTuple.NeverOverwrite ? WindowsInstallerConstants.MsidbComponentAttributesNeverOverwrite : 0; | 198 | attributes |= componentSymbol.NeverOverwrite ? WindowsInstallerConstants.MsidbComponentAttributesNeverOverwrite : 0; |
| 199 | attributes |= componentTuple.Permanent ? WindowsInstallerConstants.MsidbComponentAttributesPermanent : 0; | 199 | attributes |= componentSymbol.Permanent ? WindowsInstallerConstants.MsidbComponentAttributesPermanent : 0; |
| 200 | attributes |= componentTuple.SharedDllRefCount ? WindowsInstallerConstants.MsidbComponentAttributesSharedDllRefCount : 0; | 200 | attributes |= componentSymbol.SharedDllRefCount ? WindowsInstallerConstants.MsidbComponentAttributesSharedDllRefCount : 0; |
| 201 | attributes |= componentTuple.Shared ? WindowsInstallerConstants.MsidbComponentAttributesShared : 0; | 201 | attributes |= componentSymbol.Shared ? WindowsInstallerConstants.MsidbComponentAttributesShared : 0; |
| 202 | attributes |= componentTuple.Transitive ? WindowsInstallerConstants.MsidbComponentAttributesTransitive : 0; | 202 | attributes |= componentSymbol.Transitive ? WindowsInstallerConstants.MsidbComponentAttributesTransitive : 0; |
| 203 | attributes |= componentTuple.UninstallWhenSuperseded ? WindowsInstallerConstants.MsidbComponentAttributes64bit : 0; | 203 | attributes |= componentSymbol.UninstallWhenSuperseded ? WindowsInstallerConstants.MsidbComponentAttributes64bit : 0; |
| 204 | attributes |= componentTuple.Win64 ? WindowsInstallerConstants.MsidbComponentAttributes64bit : 0; | 204 | attributes |= componentSymbol.Win64 ? WindowsInstallerConstants.MsidbComponentAttributes64bit : 0; |
| 205 | 205 | ||
| 206 | fields = String.Join(",", | 206 | fields = String.Join(",", |
| 207 | componentTuple.ComponentId, | 207 | componentSymbol.ComponentId, |
| 208 | componentTuple.DirectoryRef, | 208 | componentSymbol.DirectoryRef, |
| 209 | attributes.ToString(), | 209 | attributes.ToString(), |
| 210 | componentTuple.Condition, | 210 | componentSymbol.Condition, |
| 211 | componentTuple.KeyPath | 211 | componentSymbol.KeyPath |
| 212 | ); | 212 | ); |
| 213 | break; | 213 | break; |
| 214 | } | 214 | } |
| 215 | case "CustomAction": | 215 | case "CustomAction": |
| 216 | { | 216 | { |
| 217 | var customActionTuple = (CustomActionTuple)tuple; | 217 | var customActionSymbol = (CustomActionSymbol)symbol; |
| 218 | var type = customActionTuple.Win64 ? WindowsInstallerConstants.MsidbCustomActionType64BitScript : 0; | 218 | var type = customActionSymbol.Win64 ? WindowsInstallerConstants.MsidbCustomActionType64BitScript : 0; |
| 219 | type |= customActionTuple.TSAware ? WindowsInstallerConstants.MsidbCustomActionTypeTSAware : 0; | 219 | type |= customActionSymbol.TSAware ? WindowsInstallerConstants.MsidbCustomActionTypeTSAware : 0; |
| 220 | type |= customActionTuple.Impersonate ? 0 : WindowsInstallerConstants.MsidbCustomActionTypeNoImpersonate; | 220 | type |= customActionSymbol.Impersonate ? 0 : WindowsInstallerConstants.MsidbCustomActionTypeNoImpersonate; |
| 221 | type |= customActionTuple.IgnoreResult ? WindowsInstallerConstants.MsidbCustomActionTypeContinue : 0; | 221 | type |= customActionSymbol.IgnoreResult ? WindowsInstallerConstants.MsidbCustomActionTypeContinue : 0; |
| 222 | type |= customActionTuple.Hidden ? WindowsInstallerConstants.MsidbCustomActionTypeHideTarget : 0; | 222 | type |= customActionSymbol.Hidden ? WindowsInstallerConstants.MsidbCustomActionTypeHideTarget : 0; |
| 223 | type |= customActionTuple.Async ? WindowsInstallerConstants.MsidbCustomActionTypeAsync : 0; | 223 | type |= customActionSymbol.Async ? WindowsInstallerConstants.MsidbCustomActionTypeAsync : 0; |
| 224 | type |= CustomActionExecutionType.FirstSequence == customActionTuple.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeFirstSequence : 0; | 224 | type |= CustomActionExecutionType.FirstSequence == customActionSymbol.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeFirstSequence : 0; |
| 225 | type |= CustomActionExecutionType.OncePerProcess == customActionTuple.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeOncePerProcess : 0; | 225 | type |= CustomActionExecutionType.OncePerProcess == customActionSymbol.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeOncePerProcess : 0; |
| 226 | type |= CustomActionExecutionType.ClientRepeat == customActionTuple.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeClientRepeat : 0; | 226 | type |= CustomActionExecutionType.ClientRepeat == customActionSymbol.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeClientRepeat : 0; |
| 227 | type |= CustomActionExecutionType.Deferred == customActionTuple.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeInScript : 0; | 227 | type |= CustomActionExecutionType.Deferred == customActionSymbol.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeInScript : 0; |
| 228 | type |= CustomActionExecutionType.Rollback == customActionTuple.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeInScript | WindowsInstallerConstants.MsidbCustomActionTypeRollback : 0; | 228 | type |= CustomActionExecutionType.Rollback == customActionSymbol.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeInScript | WindowsInstallerConstants.MsidbCustomActionTypeRollback : 0; |
| 229 | type |= CustomActionExecutionType.Commit == customActionTuple.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeInScript | WindowsInstallerConstants.MsidbCustomActionTypeCommit : 0; | 229 | type |= CustomActionExecutionType.Commit == customActionSymbol.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeInScript | WindowsInstallerConstants.MsidbCustomActionTypeCommit : 0; |
| 230 | type |= CustomActionSourceType.File == customActionTuple.SourceType ? WindowsInstallerConstants.MsidbCustomActionTypeSourceFile : 0; | 230 | type |= CustomActionSourceType.File == customActionSymbol.SourceType ? WindowsInstallerConstants.MsidbCustomActionTypeSourceFile : 0; |
| 231 | type |= CustomActionSourceType.Directory == customActionTuple.SourceType ? WindowsInstallerConstants.MsidbCustomActionTypeDirectory : 0; | 231 | type |= CustomActionSourceType.Directory == customActionSymbol.SourceType ? WindowsInstallerConstants.MsidbCustomActionTypeDirectory : 0; |
| 232 | type |= CustomActionSourceType.Property == customActionTuple.SourceType ? WindowsInstallerConstants.MsidbCustomActionTypeProperty : 0; | 232 | type |= CustomActionSourceType.Property == customActionSymbol.SourceType ? WindowsInstallerConstants.MsidbCustomActionTypeProperty : 0; |
| 233 | type |= CustomActionTargetType.Dll == customActionTuple.TargetType ? WindowsInstallerConstants.MsidbCustomActionTypeDll : 0; | 233 | type |= CustomActionTargetType.Dll == customActionSymbol.TargetType ? WindowsInstallerConstants.MsidbCustomActionTypeDll : 0; |
| 234 | type |= CustomActionTargetType.Exe == customActionTuple.TargetType ? WindowsInstallerConstants.MsidbCustomActionTypeExe : 0; | 234 | type |= CustomActionTargetType.Exe == customActionSymbol.TargetType ? WindowsInstallerConstants.MsidbCustomActionTypeExe : 0; |
| 235 | type |= CustomActionTargetType.TextData == customActionTuple.TargetType ? WindowsInstallerConstants.MsidbCustomActionTypeTextData : 0; | 235 | type |= CustomActionTargetType.TextData == customActionSymbol.TargetType ? WindowsInstallerConstants.MsidbCustomActionTypeTextData : 0; |
| 236 | type |= CustomActionTargetType.JScript == customActionTuple.TargetType ? WindowsInstallerConstants.MsidbCustomActionTypeJScript : 0; | 236 | type |= CustomActionTargetType.JScript == customActionSymbol.TargetType ? WindowsInstallerConstants.MsidbCustomActionTypeJScript : 0; |
| 237 | type |= CustomActionTargetType.VBScript == customActionTuple.TargetType ? WindowsInstallerConstants.MsidbCustomActionTypeVBScript : 0; | 237 | type |= CustomActionTargetType.VBScript == customActionSymbol.TargetType ? WindowsInstallerConstants.MsidbCustomActionTypeVBScript : 0; |
| 238 | 238 | ||
| 239 | fields = String.Join(",", | 239 | fields = String.Join(",", |
| 240 | type.ToString(), | 240 | type.ToString(), |
| 241 | customActionTuple.Source, | 241 | customActionSymbol.Source, |
| 242 | customActionTuple.Target, | 242 | customActionSymbol.Target, |
| 243 | customActionTuple.PatchUninstall ? WindowsInstallerConstants.MsidbCustomActionTypePatchUninstall.ToString() : null | 243 | customActionSymbol.PatchUninstall ? WindowsInstallerConstants.MsidbCustomActionTypePatchUninstall.ToString() : null |
| 244 | ); | 244 | ); |
| 245 | break; | 245 | break; |
| 246 | } | 246 | } |
| 247 | case "Directory": | 247 | case "Directory": |
| 248 | { | 248 | { |
| 249 | var directoryTuple = (DirectoryTuple)tuple; | 249 | var directorySymbol = (DirectorySymbol)symbol; |
| 250 | 250 | ||
| 251 | if (!String.IsNullOrEmpty(directoryTuple.ComponentGuidGenerationSeed)) | 251 | if (!String.IsNullOrEmpty(directorySymbol.ComponentGuidGenerationSeed)) |
| 252 | { | 252 | { |
| 253 | yield return $"WixDirectory:{directoryTuple.Id.Id},{directoryTuple.ComponentGuidGenerationSeed}"; | 253 | yield return $"WixDirectory:{directorySymbol.Id.Id},{directorySymbol.ComponentGuidGenerationSeed}"; |
| 254 | } | 254 | } |
| 255 | 255 | ||
| 256 | fields = String.Join(",", directoryTuple.ParentDirectoryRef, directoryTuple.Name, directoryTuple.ShortName, directoryTuple.SourceName, directoryTuple.SourceShortName); | 256 | fields = String.Join(",", directorySymbol.ParentDirectoryRef, directorySymbol.Name, directorySymbol.ShortName, directorySymbol.SourceName, directorySymbol.SourceShortName); |
| 257 | break; | 257 | break; |
| 258 | } | 258 | } |
| 259 | case "Feature": | 259 | case "Feature": |
| 260 | { | 260 | { |
| 261 | var featureTuple = (FeatureTuple)tuple; | 261 | var featureSymbol = (FeatureSymbol)symbol; |
| 262 | var attributes = featureTuple.DisallowAbsent ? WindowsInstallerConstants.MsidbFeatureAttributesUIDisallowAbsent : 0; | 262 | var attributes = featureSymbol.DisallowAbsent ? WindowsInstallerConstants.MsidbFeatureAttributesUIDisallowAbsent : 0; |
| 263 | attributes |= featureTuple.DisallowAdvertise ? WindowsInstallerConstants.MsidbFeatureAttributesDisallowAdvertise : 0; | 263 | attributes |= featureSymbol.DisallowAdvertise ? WindowsInstallerConstants.MsidbFeatureAttributesDisallowAdvertise : 0; |
| 264 | attributes |= FeatureInstallDefault.FollowParent == featureTuple.InstallDefault ? WindowsInstallerConstants.MsidbFeatureAttributesFollowParent : 0; | 264 | attributes |= FeatureInstallDefault.FollowParent == featureSymbol.InstallDefault ? WindowsInstallerConstants.MsidbFeatureAttributesFollowParent : 0; |
| 265 | attributes |= FeatureInstallDefault.Source == featureTuple.InstallDefault ? WindowsInstallerConstants.MsidbFeatureAttributesFavorSource : 0; | 265 | attributes |= FeatureInstallDefault.Source == featureSymbol.InstallDefault ? WindowsInstallerConstants.MsidbFeatureAttributesFavorSource : 0; |
| 266 | attributes |= FeatureTypicalDefault.Advertise == featureTuple.TypicalDefault ? WindowsInstallerConstants.MsidbFeatureAttributesFavorAdvertise : 0; | 266 | attributes |= FeatureTypicalDefault.Advertise == featureSymbol.TypicalDefault ? WindowsInstallerConstants.MsidbFeatureAttributesFavorAdvertise : 0; |
| 267 | 267 | ||
| 268 | fields = String.Join(",", | 268 | fields = String.Join(",", |
| 269 | featureTuple.ParentFeatureRef, | 269 | featureSymbol.ParentFeatureRef, |
| 270 | featureTuple.Title, | 270 | featureSymbol.Title, |
| 271 | featureTuple.Description, | 271 | featureSymbol.Description, |
| 272 | featureTuple.Display.ToString(), | 272 | featureSymbol.Display.ToString(), |
| 273 | featureTuple.Level.ToString(), | 273 | featureSymbol.Level.ToString(), |
| 274 | featureTuple.DirectoryRef, | 274 | featureSymbol.DirectoryRef, |
| 275 | attributes.ToString()); | 275 | attributes.ToString()); |
| 276 | break; | 276 | break; |
| 277 | } | 277 | } |
| 278 | case "File": | 278 | case "File": |
| 279 | { | 279 | { |
| 280 | var fileTuple = (FileTuple)tuple; | 280 | var fileSymbol = (FileSymbol)symbol; |
| 281 | 281 | ||
| 282 | if (fileTuple.BindPath != null) | 282 | if (fileSymbol.BindPath != null) |
| 283 | { | 283 | { |
| 284 | yield return $"BindImage:{fileTuple.Id.Id},{fileTuple.BindPath}"; | 284 | yield return $"BindImage:{fileSymbol.Id.Id},{fileSymbol.BindPath}"; |
| 285 | } | 285 | } |
| 286 | 286 | ||
| 287 | if (fileTuple.FontTitle != null) | 287 | if (fileSymbol.FontTitle != null) |
| 288 | { | 288 | { |
| 289 | yield return $"Font:{fileTuple.Id.Id},{fileTuple.FontTitle}"; | 289 | yield return $"Font:{fileSymbol.Id.Id},{fileSymbol.FontTitle}"; |
| 290 | } | 290 | } |
| 291 | 291 | ||
| 292 | if (fileTuple.SelfRegCost.HasValue) | 292 | if (fileSymbol.SelfRegCost.HasValue) |
| 293 | { | 293 | { |
| 294 | yield return $"SelfReg:{fileTuple.Id.Id},{fileTuple.SelfRegCost}"; | 294 | yield return $"SelfReg:{fileSymbol.Id.Id},{fileSymbol.SelfRegCost}"; |
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | int? assemblyAttributes = null; | 297 | int? assemblyAttributes = null; |
| 298 | if (assemblyTuplesByFileId.TryGetValue(fileTuple.Id.Id, out var assemblyTuple)) | 298 | if (assemblySymbolsByFileId.TryGetValue(fileSymbol.Id.Id, out var assemblySymbol)) |
| 299 | { | 299 | { |
| 300 | if (assemblyTuple.Type == AssemblyType.DotNetAssembly) | 300 | if (assemblySymbol.Type == AssemblyType.DotNetAssembly) |
| 301 | { | 301 | { |
| 302 | assemblyAttributes = 0; | 302 | assemblyAttributes = 0; |
| 303 | } | 303 | } |
| 304 | else if (assemblyTuple.Type == AssemblyType.Win32Assembly) | 304 | else if (assemblySymbol.Type == AssemblyType.Win32Assembly) |
| 305 | { | 305 | { |
| 306 | assemblyAttributes = 1; | 306 | assemblyAttributes = 1; |
| 307 | } | 307 | } |
| 308 | } | 308 | } |
| 309 | 309 | ||
| 310 | yield return "WixFile:" + String.Join(",", | 310 | yield return "WixFile:" + String.Join(",", |
| 311 | fileTuple.Id.Id, | 311 | fileSymbol.Id.Id, |
| 312 | assemblyAttributes, | 312 | assemblyAttributes, |
| 313 | assemblyTuple?.ManifestFileRef, | 313 | assemblySymbol?.ManifestFileRef, |
| 314 | assemblyTuple?.ApplicationFileRef, | 314 | assemblySymbol?.ApplicationFileRef, |
| 315 | fileTuple.DirectoryRef, | 315 | fileSymbol.DirectoryRef, |
| 316 | fileTuple.DiskId, | 316 | fileSymbol.DiskId, |
| 317 | fileTuple.Source.Path, | 317 | fileSymbol.Source.Path, |
| 318 | null, // assembly processor arch | 318 | null, // assembly processor arch |
| 319 | fileTuple.PatchGroup, | 319 | fileSymbol.PatchGroup, |
| 320 | (fileTuple.Attributes & FileTupleAttributes.GeneratedShortFileName) != 0 ? 1 : 0, | 320 | (fileSymbol.Attributes & FileSymbolAttributes.GeneratedShortFileName) != 0 ? 1 : 0, |
| 321 | (int)fileTuple.PatchAttributes, | 321 | (int)fileSymbol.PatchAttributes, |
| 322 | fileTuple.RetainLengths, | 322 | fileSymbol.RetainLengths, |
| 323 | fileTuple.IgnoreOffsets, | 323 | fileSymbol.IgnoreOffsets, |
| 324 | fileTuple.IgnoreLengths, | 324 | fileSymbol.IgnoreLengths, |
| 325 | fileTuple.RetainOffsets | 325 | fileSymbol.RetainOffsets |
| 326 | ); | 326 | ); |
| 327 | 327 | ||
| 328 | var fileAttributes = 0; | 328 | var fileAttributes = 0; |
| 329 | fileAttributes |= (fileTuple.Attributes & FileTupleAttributes.ReadOnly) != 0 ? WindowsInstallerConstants.MsidbFileAttributesReadOnly : 0; | 329 | fileAttributes |= (fileSymbol.Attributes & FileSymbolAttributes.ReadOnly) != 0 ? WindowsInstallerConstants.MsidbFileAttributesReadOnly : 0; |
| 330 | fileAttributes |= (fileTuple.Attributes & FileTupleAttributes.Hidden) != 0 ? WindowsInstallerConstants.MsidbFileAttributesHidden : 0; | 330 | fileAttributes |= (fileSymbol.Attributes & FileSymbolAttributes.Hidden) != 0 ? WindowsInstallerConstants.MsidbFileAttributesHidden : 0; |
| 331 | fileAttributes |= (fileTuple.Attributes & FileTupleAttributes.System) != 0 ? WindowsInstallerConstants.MsidbFileAttributesSystem : 0; | 331 | fileAttributes |= (fileSymbol.Attributes & FileSymbolAttributes.System) != 0 ? WindowsInstallerConstants.MsidbFileAttributesSystem : 0; |
| 332 | fileAttributes |= (fileTuple.Attributes & FileTupleAttributes.Vital) != 0 ? WindowsInstallerConstants.MsidbFileAttributesVital : 0; | 332 | fileAttributes |= (fileSymbol.Attributes & FileSymbolAttributes.Vital) != 0 ? WindowsInstallerConstants.MsidbFileAttributesVital : 0; |
| 333 | fileAttributes |= (fileTuple.Attributes & FileTupleAttributes.Checksum) != 0 ? WindowsInstallerConstants.MsidbFileAttributesChecksum : 0; | 333 | fileAttributes |= (fileSymbol.Attributes & FileSymbolAttributes.Checksum) != 0 ? WindowsInstallerConstants.MsidbFileAttributesChecksum : 0; |
| 334 | fileAttributes |= (fileTuple.Attributes & FileTupleAttributes.Compressed) != 0 ? WindowsInstallerConstants.MsidbFileAttributesCompressed : 0; | 334 | fileAttributes |= (fileSymbol.Attributes & FileSymbolAttributes.Compressed) != 0 ? WindowsInstallerConstants.MsidbFileAttributesCompressed : 0; |
| 335 | fileAttributes |= (fileTuple.Attributes & FileTupleAttributes.Uncompressed) != 0 ? WindowsInstallerConstants.MsidbFileAttributesNoncompressed : 0; | 335 | fileAttributes |= (fileSymbol.Attributes & FileSymbolAttributes.Uncompressed) != 0 ? WindowsInstallerConstants.MsidbFileAttributesNoncompressed : 0; |
| 336 | 336 | ||
| 337 | fields = String.Join(",", | 337 | fields = String.Join(",", |
| 338 | fileTuple.ComponentRef, | 338 | fileSymbol.ComponentRef, |
| 339 | fileTuple.Name, | 339 | fileSymbol.Name, |
| 340 | fileTuple.FileSize.ToString(), | 340 | fileSymbol.FileSize.ToString(), |
| 341 | fileTuple.Version, | 341 | fileSymbol.Version, |
| 342 | fileTuple.Language, | 342 | fileSymbol.Language, |
| 343 | fileAttributes); | 343 | fileAttributes); |
| 344 | break; | 344 | break; |
| 345 | } | 345 | } |
| 346 | 346 | ||
| 347 | case "Media": | 347 | case "Media": |
| 348 | fields = String.Join(",", tuple.Fields.Skip(1).Select(SafeConvertField)); | 348 | fields = String.Join(",", symbol.Fields.Skip(1).Select(SafeConvertField)); |
| 349 | break; | 349 | break; |
| 350 | 350 | ||
| 351 | case "Assembly": | 351 | case "Assembly": |
| 352 | { | 352 | { |
| 353 | var assemblyTuple = (AssemblyTuple)tuple; | 353 | var assemblySymbol = (AssemblySymbol)symbol; |
| 354 | 354 | ||
| 355 | id = null; | 355 | id = null; |
| 356 | name = "MsiAssembly"; | 356 | name = "MsiAssembly"; |
| 357 | fields = String.Join(",", assemblyTuple.ComponentRef, assemblyTuple.FeatureRef, assemblyTuple.ManifestFileRef, assemblyTuple.ApplicationFileRef, assemblyTuple.Type == AssemblyType.Win32Assembly ? 1 : 0); | 357 | fields = String.Join(",", assemblySymbol.ComponentRef, assemblySymbol.FeatureRef, assemblySymbol.ManifestFileRef, assemblySymbol.ApplicationFileRef, assemblySymbol.Type == AssemblyType.Win32Assembly ? 1 : 0); |
| 358 | break; | 358 | break; |
| 359 | } | 359 | } |
| 360 | case "RegLocator": | 360 | case "RegLocator": |
| 361 | { | 361 | { |
| 362 | var locatorTuple = (RegLocatorTuple)tuple; | 362 | var locatorSymbol = (RegLocatorSymbol)symbol; |
| 363 | 363 | ||
| 364 | fields = String.Join(",", (int)locatorTuple.Root, locatorTuple.Key, locatorTuple.Name, (int)locatorTuple.Type, locatorTuple.Win64); | 364 | fields = String.Join(",", (int)locatorSymbol.Root, locatorSymbol.Key, locatorSymbol.Name, (int)locatorSymbol.Type, locatorSymbol.Win64); |
| 365 | break; | 365 | break; |
| 366 | } | 366 | } |
| 367 | case "Registry": | 367 | case "Registry": |
| 368 | { | 368 | { |
| 369 | var registryTuple = (RegistryTuple)tuple; | 369 | var registrySymbol = (RegistrySymbol)symbol; |
| 370 | var value = registryTuple.Value; | 370 | var value = registrySymbol.Value; |
| 371 | 371 | ||
| 372 | switch (registryTuple.ValueType) | 372 | switch (registrySymbol.ValueType) |
| 373 | { | 373 | { |
| 374 | case RegistryValueType.Binary: | 374 | case RegistryValueType.Binary: |
| 375 | value = String.Concat("#x", value); | 375 | value = String.Concat("#x", value); |
| @@ -381,7 +381,7 @@ namespace WixToolsetTest.Converters.Tupleizer | |||
| 381 | value = String.Concat("#", value); | 381 | value = String.Concat("#", value); |
| 382 | break; | 382 | break; |
| 383 | case RegistryValueType.MultiString: | 383 | case RegistryValueType.MultiString: |
| 384 | switch (registryTuple.ValueAction) | 384 | switch (registrySymbol.ValueAction) |
| 385 | { | 385 | { |
| 386 | case RegistryValueActionType.Append: | 386 | case RegistryValueActionType.Append: |
| 387 | value = String.Concat("[~]", value); | 387 | value = String.Concat("[~]", value); |
| @@ -408,145 +408,145 @@ namespace WixToolsetTest.Converters.Tupleizer | |||
| 408 | } | 408 | } |
| 409 | 409 | ||
| 410 | fields = String.Join(",", | 410 | fields = String.Join(",", |
| 411 | ((int)registryTuple.Root).ToString(), | 411 | ((int)registrySymbol.Root).ToString(), |
| 412 | registryTuple.Key, | 412 | registrySymbol.Key, |
| 413 | registryTuple.Name, | 413 | registrySymbol.Name, |
| 414 | value, | 414 | value, |
| 415 | registryTuple.ComponentRef | 415 | registrySymbol.ComponentRef |
| 416 | ); | 416 | ); |
| 417 | break; | 417 | break; |
| 418 | } | 418 | } |
| 419 | 419 | ||
| 420 | case "RemoveRegistry": | 420 | case "RemoveRegistry": |
| 421 | { | 421 | { |
| 422 | var removeRegistryTuple = (RemoveRegistryTuple)tuple; | 422 | var removeRegistrySymbol = (RemoveRegistrySymbol)symbol; |
| 423 | fields = String.Join(",", | 423 | fields = String.Join(",", |
| 424 | ((int)removeRegistryTuple.Root).ToString(), | 424 | ((int)removeRegistrySymbol.Root).ToString(), |
| 425 | removeRegistryTuple.Key, | 425 | removeRegistrySymbol.Key, |
| 426 | removeRegistryTuple.Name, | 426 | removeRegistrySymbol.Name, |
| 427 | removeRegistryTuple.ComponentRef | 427 | removeRegistrySymbol.ComponentRef |
| 428 | ); | 428 | ); |
| 429 | break; | 429 | break; |
| 430 | } | 430 | } |
| 431 | 431 | ||
| 432 | case "ServiceControl": | 432 | case "ServiceControl": |
| 433 | { | 433 | { |
| 434 | var serviceControlTuple = (ServiceControlTuple)tuple; | 434 | var serviceControlSymbol = (ServiceControlSymbol)symbol; |
| 435 | 435 | ||
| 436 | var events = serviceControlTuple.InstallRemove ? WindowsInstallerConstants.MsidbServiceControlEventDelete : 0; | 436 | var events = serviceControlSymbol.InstallRemove ? WindowsInstallerConstants.MsidbServiceControlEventDelete : 0; |
| 437 | events |= serviceControlTuple.UninstallRemove ? WindowsInstallerConstants.MsidbServiceControlEventUninstallDelete : 0; | 437 | events |= serviceControlSymbol.UninstallRemove ? WindowsInstallerConstants.MsidbServiceControlEventUninstallDelete : 0; |
| 438 | events |= serviceControlTuple.InstallStart ? WindowsInstallerConstants.MsidbServiceControlEventStart : 0; | 438 | events |= serviceControlSymbol.InstallStart ? WindowsInstallerConstants.MsidbServiceControlEventStart : 0; |
| 439 | events |= serviceControlTuple.UninstallStart ? WindowsInstallerConstants.MsidbServiceControlEventUninstallStart : 0; | 439 | events |= serviceControlSymbol.UninstallStart ? WindowsInstallerConstants.MsidbServiceControlEventUninstallStart : 0; |
| 440 | events |= serviceControlTuple.InstallStop ? WindowsInstallerConstants.MsidbServiceControlEventStop : 0; | 440 | events |= serviceControlSymbol.InstallStop ? WindowsInstallerConstants.MsidbServiceControlEventStop : 0; |
| 441 | events |= serviceControlTuple.UninstallStop ? WindowsInstallerConstants.MsidbServiceControlEventUninstallStop : 0; | 441 | events |= serviceControlSymbol.UninstallStop ? WindowsInstallerConstants.MsidbServiceControlEventUninstallStop : 0; |
| 442 | 442 | ||
| 443 | fields = String.Join(",", | 443 | fields = String.Join(",", |
| 444 | serviceControlTuple.Name, | 444 | serviceControlSymbol.Name, |
| 445 | events.ToString(), | 445 | events.ToString(), |
| 446 | serviceControlTuple.Arguments, | 446 | serviceControlSymbol.Arguments, |
| 447 | serviceControlTuple.Wait == true ? "1" : "0", | 447 | serviceControlSymbol.Wait == true ? "1" : "0", |
| 448 | serviceControlTuple.ComponentRef | 448 | serviceControlSymbol.ComponentRef |
| 449 | ); | 449 | ); |
| 450 | break; | 450 | break; |
| 451 | } | 451 | } |
| 452 | 452 | ||
| 453 | case "ServiceInstall": | 453 | case "ServiceInstall": |
| 454 | { | 454 | { |
| 455 | var serviceInstallTuple = (ServiceInstallTuple)tuple; | 455 | var serviceInstallSymbol = (ServiceInstallSymbol)symbol; |
| 456 | 456 | ||
| 457 | var errorControl = (int)serviceInstallTuple.ErrorControl; | 457 | var errorControl = (int)serviceInstallSymbol.ErrorControl; |
| 458 | errorControl |= serviceInstallTuple.Vital ? WindowsInstallerConstants.MsidbServiceInstallErrorControlVital : 0; | 458 | errorControl |= serviceInstallSymbol.Vital ? WindowsInstallerConstants.MsidbServiceInstallErrorControlVital : 0; |
| 459 | 459 | ||
| 460 | var serviceType = (int)serviceInstallTuple.ServiceType; | 460 | var serviceType = (int)serviceInstallSymbol.ServiceType; |
| 461 | serviceType |= serviceInstallTuple.Interactive ? WindowsInstallerConstants.MsidbServiceInstallInteractive : 0; | 461 | serviceType |= serviceInstallSymbol.Interactive ? WindowsInstallerConstants.MsidbServiceInstallInteractive : 0; |
| 462 | 462 | ||
| 463 | fields = String.Join(",", | 463 | fields = String.Join(",", |
| 464 | serviceInstallTuple.Name, | 464 | serviceInstallSymbol.Name, |
| 465 | serviceInstallTuple.DisplayName, | 465 | serviceInstallSymbol.DisplayName, |
| 466 | serviceType.ToString(), | 466 | serviceType.ToString(), |
| 467 | ((int)serviceInstallTuple.StartType).ToString(), | 467 | ((int)serviceInstallSymbol.StartType).ToString(), |
| 468 | errorControl.ToString(), | 468 | errorControl.ToString(), |
| 469 | serviceInstallTuple.LoadOrderGroup, | 469 | serviceInstallSymbol.LoadOrderGroup, |
| 470 | serviceInstallTuple.Dependencies, | 470 | serviceInstallSymbol.Dependencies, |
| 471 | serviceInstallTuple.StartName, | 471 | serviceInstallSymbol.StartName, |
| 472 | serviceInstallTuple.Password, | 472 | serviceInstallSymbol.Password, |
| 473 | serviceInstallTuple.Arguments, | 473 | serviceInstallSymbol.Arguments, |
| 474 | serviceInstallTuple.ComponentRef, | 474 | serviceInstallSymbol.ComponentRef, |
| 475 | serviceInstallTuple.Description | 475 | serviceInstallSymbol.Description |
| 476 | ); | 476 | ); |
| 477 | break; | 477 | break; |
| 478 | } | 478 | } |
| 479 | 479 | ||
| 480 | case "Upgrade": | 480 | case "Upgrade": |
| 481 | { | 481 | { |
| 482 | var upgradeTuple = (UpgradeTuple)tuple; | 482 | var upgradeSymbol = (UpgradeSymbol)symbol; |
| 483 | 483 | ||
| 484 | var attributes = upgradeTuple.MigrateFeatures ? WindowsInstallerConstants.MsidbUpgradeAttributesMigrateFeatures : 0; | 484 | var attributes = upgradeSymbol.MigrateFeatures ? WindowsInstallerConstants.MsidbUpgradeAttributesMigrateFeatures : 0; |
| 485 | attributes |= upgradeTuple.OnlyDetect ? WindowsInstallerConstants.MsidbUpgradeAttributesOnlyDetect : 0; | 485 | attributes |= upgradeSymbol.OnlyDetect ? WindowsInstallerConstants.MsidbUpgradeAttributesOnlyDetect : 0; |
| 486 | attributes |= upgradeTuple.IgnoreRemoveFailures ? WindowsInstallerConstants.MsidbUpgradeAttributesIgnoreRemoveFailure : 0; | 486 | attributes |= upgradeSymbol.IgnoreRemoveFailures ? WindowsInstallerConstants.MsidbUpgradeAttributesIgnoreRemoveFailure : 0; |
| 487 | attributes |= upgradeTuple.VersionMinInclusive ? WindowsInstallerConstants.MsidbUpgradeAttributesVersionMinInclusive : 0; | 487 | attributes |= upgradeSymbol.VersionMinInclusive ? WindowsInstallerConstants.MsidbUpgradeAttributesVersionMinInclusive : 0; |
| 488 | attributes |= upgradeTuple.VersionMaxInclusive ? WindowsInstallerConstants.MsidbUpgradeAttributesVersionMaxInclusive : 0; | 488 | attributes |= upgradeSymbol.VersionMaxInclusive ? WindowsInstallerConstants.MsidbUpgradeAttributesVersionMaxInclusive : 0; |
| 489 | attributes |= upgradeTuple.ExcludeLanguages ? WindowsInstallerConstants.MsidbUpgradeAttributesLanguagesExclusive : 0; | 489 | attributes |= upgradeSymbol.ExcludeLanguages ? WindowsInstallerConstants.MsidbUpgradeAttributesLanguagesExclusive : 0; |
| 490 | 490 | ||
| 491 | fields = String.Join(",", | 491 | fields = String.Join(",", |
| 492 | upgradeTuple.VersionMin, | 492 | upgradeSymbol.VersionMin, |
| 493 | upgradeTuple.VersionMax, | 493 | upgradeSymbol.VersionMax, |
| 494 | upgradeTuple.Language, | 494 | upgradeSymbol.Language, |
| 495 | attributes.ToString(), | 495 | attributes.ToString(), |
| 496 | upgradeTuple.Remove, | 496 | upgradeSymbol.Remove, |
| 497 | upgradeTuple.ActionProperty | 497 | upgradeSymbol.ActionProperty |
| 498 | ); | 498 | ); |
| 499 | break; | 499 | break; |
| 500 | } | 500 | } |
| 501 | 501 | ||
| 502 | case "WixAction": | 502 | case "WixAction": |
| 503 | { | 503 | { |
| 504 | var wixActionTuple = (WixActionTuple)tuple; | 504 | var wixActionSymbol = (WixActionSymbol)symbol; |
| 505 | var data = wixActionTuple.Fields[(int)WixActionTupleFields.SequenceTable].AsObject(); | 505 | var data = wixActionSymbol.Fields[(int)WixActionSymbolFields.SequenceTable].AsObject(); |
| 506 | var sequenceTableAsInt = data is string ? (int)SequenceStringToSequenceTable(data) : (int)wixActionTuple.SequenceTable; | 506 | var sequenceTableAsInt = data is string ? (int)SequenceStringToSequenceTable(data) : (int)wixActionSymbol.SequenceTable; |
| 507 | 507 | ||
| 508 | fields = String.Join(",", | 508 | fields = String.Join(",", |
| 509 | sequenceTableAsInt, | 509 | sequenceTableAsInt, |
| 510 | wixActionTuple.Action, | 510 | wixActionSymbol.Action, |
| 511 | wixActionTuple.Condition, | 511 | wixActionSymbol.Condition, |
| 512 | wixActionTuple.Sequence?.ToString() ?? String.Empty, | 512 | wixActionSymbol.Sequence?.ToString() ?? String.Empty, |
| 513 | wixActionTuple.Before, | 513 | wixActionSymbol.Before, |
| 514 | wixActionTuple.After, | 514 | wixActionSymbol.After, |
| 515 | wixActionTuple.Overridable == true ? "1" : "0" | 515 | wixActionSymbol.Overridable == true ? "1" : "0" |
| 516 | ); | 516 | ); |
| 517 | break; | 517 | break; |
| 518 | } | 518 | } |
| 519 | 519 | ||
| 520 | case "WixComplexReference": | 520 | case "WixComplexReference": |
| 521 | { | 521 | { |
| 522 | var wixComplexReferenceTuple = (WixComplexReferenceTuple)tuple; | 522 | var wixComplexReferenceSymbol = (WixComplexReferenceSymbol)symbol; |
| 523 | fields = String.Join(",", | 523 | fields = String.Join(",", |
| 524 | wixComplexReferenceTuple.Parent, | 524 | wixComplexReferenceSymbol.Parent, |
| 525 | (int)wixComplexReferenceTuple.ParentType, | 525 | (int)wixComplexReferenceSymbol.ParentType, |
| 526 | wixComplexReferenceTuple.ParentLanguage, | 526 | wixComplexReferenceSymbol.ParentLanguage, |
| 527 | wixComplexReferenceTuple.Child, | 527 | wixComplexReferenceSymbol.Child, |
| 528 | (int)wixComplexReferenceTuple.ChildType, | 528 | (int)wixComplexReferenceSymbol.ChildType, |
| 529 | wixComplexReferenceTuple.IsPrimary ? "1" : "0" | 529 | wixComplexReferenceSymbol.IsPrimary ? "1" : "0" |
| 530 | ); | 530 | ); |
| 531 | break; | 531 | break; |
| 532 | } | 532 | } |
| 533 | 533 | ||
| 534 | case "WixProperty": | 534 | case "WixProperty": |
| 535 | { | 535 | { |
| 536 | var wixPropertyTuple = (WixPropertyTuple)tuple; | 536 | var wixPropertySymbol = (WixPropertySymbol)symbol; |
| 537 | var attributes = wixPropertyTuple.Admin ? 0x1 : 0; | 537 | var attributes = wixPropertySymbol.Admin ? 0x1 : 0; |
| 538 | attributes |= wixPropertyTuple.Hidden ? 0x2 : 0; | 538 | attributes |= wixPropertySymbol.Hidden ? 0x2 : 0; |
| 539 | attributes |= wixPropertyTuple.Secure ? 0x4 : 0; | 539 | attributes |= wixPropertySymbol.Secure ? 0x4 : 0; |
| 540 | 540 | ||
| 541 | fields = String.Join(",", | 541 | fields = String.Join(",", |
| 542 | wixPropertyTuple.PropertyRef, | 542 | wixPropertySymbol.PropertyRef, |
| 543 | attributes.ToString() | 543 | attributes.ToString() |
| 544 | ); | 544 | ); |
| 545 | break; | 545 | break; |
| 546 | } | 546 | } |
| 547 | 547 | ||
| 548 | default: | 548 | default: |
| 549 | fields = String.Join(",", tuple.Fields.Select(SafeConvertField)); | 549 | fields = String.Join(",", symbol.Fields.Select(SafeConvertField)); |
| 550 | break; | 550 | break; |
| 551 | } | 551 | } |
| 552 | 552 | ||
diff --git a/src/test/WixToolsetTest.Converters.Tupleizer/TestData/Integration/test.wixout b/src/test/WixToolsetTest.Converters.Symbolizer/TestData/Integration/test.wixout index da64b8af..da64b8af 100644 --- a/src/test/WixToolsetTest.Converters.Tupleizer/TestData/Integration/test.wixout +++ b/src/test/WixToolsetTest.Converters.Symbolizer/TestData/Integration/test.wixout | |||
| Binary files differ | |||
diff --git a/src/test/WixToolsetTest.Converters.Tupleizer/TestData/Integration/test.wixproj b/src/test/WixToolsetTest.Converters.Symbolizer/TestData/Integration/test.wixproj index 8af13dc8..d7c4e625 100644 --- a/src/test/WixToolsetTest.Converters.Tupleizer/TestData/Integration/test.wixproj +++ b/src/test/WixToolsetTest.Converters.Symbolizer/TestData/Integration/test.wixproj | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | <ProductVersion>3.10</ProductVersion> | 6 | <ProductVersion>3.10</ProductVersion> |
| 7 | <ProjectGuid>d59f1c1e-9238-49fa-bfa2-ec1d9c2dda1d</ProjectGuid> | 7 | <ProjectGuid>d59f1c1e-9238-49fa-bfa2-ec1d9c2dda1d</ProjectGuid> |
| 8 | <SchemaVersion>2.0</SchemaVersion> | 8 | <SchemaVersion>2.0</SchemaVersion> |
| 9 | <OutputName>TupleizerWixout</OutputName> | 9 | <OutputName>SymbolizerWixout</OutputName> |
| 10 | <OutputType>Package</OutputType> | 10 | <OutputType>Package</OutputType> |
| 11 | </PropertyGroup> | 11 | </PropertyGroup> |
| 12 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> | 12 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> |
diff --git a/src/test/WixToolsetTest.Converters.Tupleizer/TestData/Integration/test.wxs b/src/test/WixToolsetTest.Converters.Symbolizer/TestData/Integration/test.wxs index 1006a254..46d4fb43 100644 --- a/src/test/WixToolsetTest.Converters.Tupleizer/TestData/Integration/test.wxs +++ b/src/test/WixToolsetTest.Converters.Symbolizer/TestData/Integration/test.wxs | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> | 2 | <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> |
| 3 | <Product Id="*" Name="TupleizerWixout" Language="1033" Version="1.0.0.0" Manufacturer="FireGiant" UpgradeCode="14a02d7f-9b32-4c92-b1f1-da518bf4e32a"> | 3 | <Product Id="*" Name="SymbolizerWixout" Language="1033" Version="1.0.0.0" Manufacturer="FireGiant" UpgradeCode="14a02d7f-9b32-4c92-b1f1-da518bf4e32a"> |
| 4 | <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> | 4 | <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> |
| 5 | 5 | ||
| 6 | <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." AllowSameVersionUpgrades="yes" IgnoreRemoveFailure="yes" /> | 6 | <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." AllowSameVersionUpgrades="yes" IgnoreRemoveFailure="yes" /> |
| 7 | <MediaTemplate /> | 7 | <MediaTemplate /> |
| 8 | 8 | ||
| 9 | <Feature Id="ProductFeature" Title="TupleizerWixout" Level="1"> | 9 | <Feature Id="ProductFeature" Title="SymbolizerWixout" Level="1"> |
| 10 | <Feature Id="ChildFeature"> | 10 | <Feature Id="ChildFeature"> |
| 11 | <ComponentGroupRef Id="ProductComponents" /> | 11 | <ComponentGroupRef Id="ProductComponents" /> |
| 12 | </Feature> | 12 | </Feature> |
| @@ -20,7 +20,7 @@ | |||
| 20 | <Fragment> | 20 | <Fragment> |
| 21 | <Directory Id="TARGETDIR" Name="SourceDir"> | 21 | <Directory Id="TARGETDIR" Name="SourceDir"> |
| 22 | <Directory Id="ProgramFilesFolder"> | 22 | <Directory Id="ProgramFilesFolder"> |
| 23 | <Directory Id="INSTALLFOLDER" Name="TupleizerWixout" /> | 23 | <Directory Id="INSTALLFOLDER" Name="SymbolizerWixout" /> |
| 24 | </Directory> | 24 | </Directory> |
| 25 | </Directory> | 25 | </Directory> |
| 26 | </Fragment> | 26 | </Fragment> |
diff --git a/src/test/WixToolsetTest.Converters.Tupleizer/WixToolsetTest.Converters.Tupleizer.csproj b/src/test/WixToolsetTest.Converters.Symbolizer/WixToolsetTest.Converters.Symbolizer.csproj index fa6a6bcf..57ff1968 100644 --- a/src/test/WixToolsetTest.Converters.Tupleizer/WixToolsetTest.Converters.Tupleizer.csproj +++ b/src/test/WixToolsetTest.Converters.Symbolizer/WixToolsetTest.Converters.Symbolizer.csproj | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | </ItemGroup> | 13 | </ItemGroup> |
| 14 | 14 | ||
| 15 | <ItemGroup> | 15 | <ItemGroup> |
| 16 | <ProjectReference Include="..\..\WixToolset.Converters.Tupleizer\WixToolset.Converters.Tupleizer.csproj" /> | 16 | <ProjectReference Include="..\..\WixToolset.Converters.Symbolizer\WixToolset.Converters.Symbolizer.csproj" /> |
| 17 | </ItemGroup> | 17 | </ItemGroup> |
| 18 | 18 | ||
| 19 | <ItemGroup> | 19 | <ItemGroup> |
diff --git a/src/test/WixToolsetTest.Converters.Symbolizer/WixToolsetTest.Converters.Symbolizer.v3.ncrunchproject b/src/test/WixToolsetTest.Converters.Symbolizer/WixToolsetTest.Converters.Symbolizer.v3.ncrunchproject new file mode 100644 index 00000000..18ab4f79 --- /dev/null +++ b/src/test/WixToolsetTest.Converters.Symbolizer/WixToolsetTest.Converters.Symbolizer.v3.ncrunchproject | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | <ProjectConfiguration> | ||
| 2 | <Settings> | ||
| 3 | <IgnoredTests> | ||
| 4 | <NamedTestSelector> | ||
| 5 | <TestName>WixToolsetTest.Converters.Symbolizer.ConvertSymbolsFixture.CanLoadWixoutAndConvertToIntermediate</TestName> | ||
| 6 | </NamedTestSelector> | ||
| 7 | </IgnoredTests> | ||
| 8 | </Settings> | ||
| 9 | </ProjectConfiguration> \ No newline at end of file | ||
diff --git a/src/test/WixToolsetTest.Converters.Tupleizer/WixToolsetTest.Converters.Tupleizer.v3.ncrunchproject b/src/test/WixToolsetTest.Converters.Tupleizer/WixToolsetTest.Converters.Tupleizer.v3.ncrunchproject deleted file mode 100644 index bb70cf0f..00000000 --- a/src/test/WixToolsetTest.Converters.Tupleizer/WixToolsetTest.Converters.Tupleizer.v3.ncrunchproject +++ /dev/null | |||
| @@ -1,9 +0,0 @@ | |||
| 1 | <ProjectConfiguration> | ||
| 2 | <Settings> | ||
| 3 | <IgnoredTests> | ||
| 4 | <NamedTestSelector> | ||
| 5 | <TestName>WixToolsetTest.Converters.Tupleizer.ConvertTuplesFixture.CanLoadWixoutAndConvertToIntermediate</TestName> | ||
| 6 | </NamedTestSelector> | ||
| 7 | </IgnoredTests> | ||
| 8 | </Settings> | ||
| 9 | </ProjectConfiguration> \ No newline at end of file | ||
