From 4bb99d4a7521f3182b3d8ea9833038dc067db118 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Fri, 2 Apr 2021 14:28:56 -0700 Subject: Move codepage from section and to package, module, patch symbols Contributes to wixtoolset/issues#5801 --- src/WixToolset.Data/IntermediateSection.cs | 16 +-- src/WixToolset.Data/Localization.cs | 29 ++++-- .../Symbols/ModuleSignatureSymbol.cs | 60 ----------- src/WixToolset.Data/Symbols/SymbolDefinitions.cs | 14 ++- src/WixToolset.Data/Symbols/WixModuleSymbol.cs | 68 +++++++++++++ src/WixToolset.Data/Symbols/WixPackageSymbol.cs | 111 +++++++++++++++++++++ src/WixToolset.Data/Symbols/WixPatchIdSymbol.cs | 90 ----------------- src/WixToolset.Data/Symbols/WixPatchSymbol.cs | 98 ++++++++++++++++++ .../WindowsInstallerTableDefinitions.cs | 2 +- src/test/WixToolsetTest.Data/SerializeFixture.cs | 18 ++-- 10 files changed, 321 insertions(+), 185 deletions(-) delete mode 100644 src/WixToolset.Data/Symbols/ModuleSignatureSymbol.cs create mode 100644 src/WixToolset.Data/Symbols/WixModuleSymbol.cs create mode 100644 src/WixToolset.Data/Symbols/WixPackageSymbol.cs delete mode 100644 src/WixToolset.Data/Symbols/WixPatchIdSymbol.cs create mode 100644 src/WixToolset.Data/Symbols/WixPatchSymbol.cs (limited to 'src') diff --git a/src/WixToolset.Data/IntermediateSection.cs b/src/WixToolset.Data/IntermediateSection.cs index 86aa0c89..b9157875 100644 --- a/src/WixToolset.Data/IntermediateSection.cs +++ b/src/WixToolset.Data/IntermediateSection.cs @@ -18,13 +18,11 @@ namespace WixToolset.Data /// /// Identifier for section. /// Type of section. - /// Codepage for resulting database. /// Optional compilation identifier - public IntermediateSection(string id, SectionType type, int codepage, string compilationId = null) + public IntermediateSection(string id, SectionType type, string compilationId = null) { this.Id = id; this.Type = type; - this.Codepage = codepage; this.CompilationId = compilationId; this.symbols = new List(); } @@ -41,12 +39,6 @@ namespace WixToolset.Data /// Type of section. public SectionType Type { get; } - /// - /// Gets the codepage for the section. - /// - /// Codepage for the section. - public int Codepage { get; } - /// /// Gets and sets the identifier of the compilation of the source file containing the section. /// @@ -98,7 +90,6 @@ namespace WixToolset.Data /// internal static IntermediateSection Deserialize(ISymbolDefinitionCreator creator, Uri baseUri, JsonObject jsonObject) { - var codepage = jsonObject.GetValueOrDefault("codepage", 0); var id = jsonObject.GetValueOrDefault("id"); var type = jsonObject.GetEnumOrDefault("type", SectionType.Unknown); @@ -107,7 +98,7 @@ namespace WixToolset.Data throw new ArgumentException("JSON object is not a valid section, unknown section type", nameof(type)); } - var section = new IntermediateSection(id, type, codepage); + var section = new IntermediateSection(id, type); var symbolsJson = jsonObject.GetValueOrDefault("symbols"); @@ -124,8 +115,7 @@ namespace WixToolset.Data { var jsonObject = new JsonObject { - { "type", this.Type.ToString().ToLowerInvariant() }, - { "codepage", this.Codepage } + { "type", this.Type.ToString().ToLowerInvariant() } }; if (!String.IsNullOrEmpty(this.Id)) diff --git a/src/WixToolset.Data/Localization.cs b/src/WixToolset.Data/Localization.cs index 7ce765f4..70c096de 100644 --- a/src/WixToolset.Data/Localization.cs +++ b/src/WixToolset.Data/Localization.cs @@ -18,9 +18,10 @@ namespace WixToolset.Data /// /// Instantiates a new localization object. /// - public Localization(int codepage, string culture, IDictionary variables, IDictionary localizedControls) + public Localization(int? codepage, int? summaryInformationCodepage, string culture, IDictionary variables, IDictionary localizedControls) { this.Codepage = codepage; + this.SummaryInformationCodepage = summaryInformationCodepage; this.Culture = culture?.ToLowerInvariant() ?? String.Empty; this.variables = new Dictionary(variables); this.localizedControls = new Dictionary(localizedControls); @@ -30,7 +31,13 @@ namespace WixToolset.Data /// Gets the codepage. /// /// The codepage. - public int Codepage { get; private set; } + public int? Codepage { get; private set; } + + /// + /// Gets the summary information codepage. + /// + /// The summary information codepage. + public int? SummaryInformationCodepage { get; private set; } /// /// Gets the culture. @@ -52,10 +59,17 @@ namespace WixToolset.Data internal JsonObject Serialize() { - var jsonObject = new JsonObject + var jsonObject = new JsonObject(); + + if (this.Codepage.HasValue) { - { "codepage", this.Codepage }, - }; + jsonObject.Add("codepage", this.Codepage.Value); + } + + if (this.SummaryInformationCodepage.HasValue) + { + jsonObject.Add("summaryCodepage", this.SummaryInformationCodepage.Value); + } jsonObject.AddIsNotNullOrEmpty("culture", this.Culture); @@ -94,7 +108,8 @@ namespace WixToolset.Data internal static Localization Deserialize(JsonObject jsonObject) { - var codepage = jsonObject.GetValueOrDefault("codepage", 0); + var codepage = jsonObject.GetValueOrDefault("codepage", null); + var summaryCodepage = jsonObject.GetValueOrDefault("summaryCodepage", null); var culture = jsonObject.GetValueOrDefault("culture"); var variables = new Dictionary(); @@ -116,7 +131,7 @@ namespace WixToolset.Data } } - return new Localization(codepage, culture, variables, controls); + return new Localization(codepage, summaryCodepage, culture, variables, controls); } } } diff --git a/src/WixToolset.Data/Symbols/ModuleSignatureSymbol.cs b/src/WixToolset.Data/Symbols/ModuleSignatureSymbol.cs deleted file mode 100644 index 5f6ded09..00000000 --- a/src/WixToolset.Data/Symbols/ModuleSignatureSymbol.cs +++ /dev/null @@ -1,60 +0,0 @@ -// 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. - -namespace WixToolset.Data -{ - using WixToolset.Data.Symbols; - - public static partial class SymbolDefinitions - { - public static readonly IntermediateSymbolDefinition ModuleSignature = new IntermediateSymbolDefinition( - SymbolDefinitionType.ModuleSignature, - new[] - { - new IntermediateFieldDefinition(nameof(ModuleSignatureSymbolFields.ModuleID), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(ModuleSignatureSymbolFields.Language), IntermediateFieldType.Number), - new IntermediateFieldDefinition(nameof(ModuleSignatureSymbolFields.Version), IntermediateFieldType.String), - }, - typeof(ModuleSignatureSymbol)); - } -} - -namespace WixToolset.Data.Symbols -{ - public enum ModuleSignatureSymbolFields - { - ModuleID, - Language, - Version, - } - - public class ModuleSignatureSymbol : IntermediateSymbol - { - public ModuleSignatureSymbol() : base(SymbolDefinitions.ModuleSignature, null, null) - { - } - - public ModuleSignatureSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.ModuleSignature, sourceLineNumber, id) - { - } - - public IntermediateField this[ModuleSignatureSymbolFields index] => this.Fields[(int)index]; - - public string ModuleID - { - get => (string)this.Fields[(int)ModuleSignatureSymbolFields.ModuleID]; - set => this.Set((int)ModuleSignatureSymbolFields.ModuleID, value); - } - - public int Language - { - get => (int)this.Fields[(int)ModuleSignatureSymbolFields.Language]; - set => this.Set((int)ModuleSignatureSymbolFields.Language, value); - } - - public string Version - { - get => (string)this.Fields[(int)ModuleSignatureSymbolFields.Version]; - set => this.Set((int)ModuleSignatureSymbolFields.Version, value); - } - } -} \ No newline at end of file diff --git a/src/WixToolset.Data/Symbols/SymbolDefinitions.cs b/src/WixToolset.Data/Symbols/SymbolDefinitions.cs index 54deb87f..0ed0a4ec 100644 --- a/src/WixToolset.Data/Symbols/SymbolDefinitions.cs +++ b/src/WixToolset.Data/Symbols/SymbolDefinitions.cs @@ -56,7 +56,7 @@ namespace WixToolset.Data ModuleDependency, ModuleExclusion, ModuleIgnoreTable, - ModuleSignature, + WixModule, ModuleSubstitution, MoveFile, Assembly, @@ -172,9 +172,10 @@ namespace WixToolset.Data WixMediaTemplate, WixMerge, WixOrdering, + WixPackage, WixPatchBaseline, WixPatchFamilyGroup, - WixPatchId, + WixPatch, WixPatchRef, WixPatchTarget, WixProductSearch, @@ -362,8 +363,8 @@ namespace WixToolset.Data case SymbolDefinitionType.ModuleIgnoreTable: return SymbolDefinitions.ModuleIgnoreTable; - case SymbolDefinitionType.ModuleSignature: - return SymbolDefinitions.ModuleSignature; + case SymbolDefinitionType.WixModule: + return SymbolDefinitions.WixModule; case SymbolDefinitionType.ModuleSubstitution: return SymbolDefinitions.ModuleSubstitution; @@ -707,13 +708,16 @@ namespace WixToolset.Data case SymbolDefinitionType.WixOrdering: return SymbolDefinitions.WixOrdering; + case SymbolDefinitionType.WixPackage: + return SymbolDefinitions.WixPackage; + case SymbolDefinitionType.WixPatchBaseline: return SymbolDefinitions.WixPatchBaseline; case SymbolDefinitionType.WixPatchFamilyGroup: return SymbolDefinitions.WixPatchFamilyGroup; - case SymbolDefinitionType.WixPatchId: + case SymbolDefinitionType.WixPatch: return SymbolDefinitions.WixPatchId; case SymbolDefinitionType.WixPatchRef: diff --git a/src/WixToolset.Data/Symbols/WixModuleSymbol.cs b/src/WixToolset.Data/Symbols/WixModuleSymbol.cs new file mode 100644 index 00000000..fbb16764 --- /dev/null +++ b/src/WixToolset.Data/Symbols/WixModuleSymbol.cs @@ -0,0 +1,68 @@ +// 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. + +namespace WixToolset.Data +{ + using WixToolset.Data.Symbols; + + public static partial class SymbolDefinitions + { + public static readonly IntermediateSymbolDefinition WixModule = new IntermediateSymbolDefinition( + SymbolDefinitionType.WixModule, + new[] + { + new IntermediateFieldDefinition(nameof(WixModuleSymbolFields.ModuleId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixModuleSymbolFields.Language), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixModuleSymbolFields.Version), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixModuleSymbolFields.Codepage), IntermediateFieldType.String), + }, + typeof(WixModuleSymbol)); + } +} + +namespace WixToolset.Data.Symbols +{ + public enum WixModuleSymbolFields + { + ModuleId, + Language, + Version, + Codepage, + } + + public class WixModuleSymbol : IntermediateSymbol + { + public WixModuleSymbol() : base(SymbolDefinitions.WixModule, null, null) + { + } + + public WixModuleSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixModule, sourceLineNumber, id) + { + } + + public IntermediateField this[WixModuleSymbolFields index] => this.Fields[(int)index]; + + public string ModuleId + { + get => (string)this.Fields[(int)WixModuleSymbolFields.ModuleId]; + set => this.Set((int)WixModuleSymbolFields.ModuleId, value); + } + + public string Language + { + get => (string)this.Fields[(int)WixModuleSymbolFields.Language]; + set => this.Set((int)WixModuleSymbolFields.Language, value); + } + + public string Version + { + get => (string)this.Fields[(int)WixModuleSymbolFields.Version]; + set => this.Set((int)WixModuleSymbolFields.Version, value); + } + + public string Codepage + { + get => (string)this.Fields[(int)WixModuleSymbolFields.Codepage]; + set => this.Set((int)WixModuleSymbolFields.Codepage, value); + } + } +} diff --git a/src/WixToolset.Data/Symbols/WixPackageSymbol.cs b/src/WixToolset.Data/Symbols/WixPackageSymbol.cs new file mode 100644 index 00000000..e1720033 --- /dev/null +++ b/src/WixToolset.Data/Symbols/WixPackageSymbol.cs @@ -0,0 +1,111 @@ +// 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. + +namespace WixToolset.Data +{ + using WixToolset.Data.Symbols; + + public static partial class SymbolDefinitions + { + public static readonly IntermediateSymbolDefinition WixPackage = new IntermediateSymbolDefinition( + SymbolDefinitionType.WixPackage, + new[] + { + new IntermediateFieldDefinition(nameof(WixPackageSymbolFields.PackageId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackageSymbolFields.UpgradeCode), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackageSymbolFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackageSymbolFields.Language), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackageSymbolFields.Version), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackageSymbolFields.Manufacturer), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackageSymbolFields.Attributes), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixPackageSymbolFields.Codepage), IntermediateFieldType.String), + }, + typeof(WixPackageSymbol)); + } +} + +namespace WixToolset.Data.Symbols +{ + using System; + + public enum WixPackageSymbolFields + { + PackageId, + UpgradeCode, + Name, + Language, + Version, + Manufacturer, + Attributes, + Codepage, + } + + [Flags] + public enum WixPackageAttributes + { + None = 0x0, + PerMachine = 0x1, + } + + public class WixPackageSymbol : IntermediateSymbol + { + public WixPackageSymbol() : base(SymbolDefinitions.WixPackage, null, null) + { + } + + public WixPackageSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixPackage, sourceLineNumber, id) + { + } + + public IntermediateField this[WixPackageSymbolFields index] => this.Fields[(int)index]; + + public string PackageId + { + get => (string)this.Fields[(int)WixPackageSymbolFields.PackageId]; + set => this.Set((int)WixPackageSymbolFields.PackageId, value); + } + + public string UpgradeCode + { + get => (string)this.Fields[(int)WixPackageSymbolFields.UpgradeCode]; + set => this.Set((int)WixPackageSymbolFields.UpgradeCode, value); + } + + public string Name + { + get => (string)this.Fields[(int)WixPackageSymbolFields.Name]; + set => this.Set((int)WixPackageSymbolFields.Name, value); + } + + public string Language + { + get => (string)this.Fields[(int)WixPackageSymbolFields.Language]; + set => this.Set((int)WixPackageSymbolFields.Language, value); + } + + public string Version + { + get => (string)this.Fields[(int)WixPackageSymbolFields.Version]; + set => this.Set((int)WixPackageSymbolFields.Version, value); + } + + public string Manufacturer + { + get => (string)this.Fields[(int)WixPackageSymbolFields.Manufacturer]; + set => this.Set((int)WixPackageSymbolFields.Manufacturer, value); + } + + public WixPackageAttributes Attributes + { + get => (WixPackageAttributes)this.Fields[(int)WixPackageSymbolFields.Attributes].AsNumber(); + set => this.Set((int)WixPackageSymbolFields.Attributes, (int)value); + } + + public string Codepage + { + get => (string)this.Fields[(int)WixPackageSymbolFields.Codepage]; + set => this.Set((int)WixPackageSymbolFields.Codepage, value); + } + + public bool PerMachine => (this.Attributes & WixPackageAttributes.PerMachine) == WixPackageAttributes.PerMachine; + } +} diff --git a/src/WixToolset.Data/Symbols/WixPatchIdSymbol.cs b/src/WixToolset.Data/Symbols/WixPatchIdSymbol.cs deleted file mode 100644 index 344fc058..00000000 --- a/src/WixToolset.Data/Symbols/WixPatchIdSymbol.cs +++ /dev/null @@ -1,90 +0,0 @@ -// 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. - -namespace WixToolset.Data -{ - using WixToolset.Data.Symbols; - - public static partial class SymbolDefinitions - { - public static readonly IntermediateSymbolDefinition WixPatchId = new IntermediateSymbolDefinition( - SymbolDefinitionType.WixPatchId, - new[] - { - new IntermediateFieldDefinition(nameof(WixPatchIdSymbolFields.ClientPatchId), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(WixPatchIdSymbolFields.OptimizePatchSizeForLargeFiles), IntermediateFieldType.Bool), - new IntermediateFieldDefinition(nameof(WixPatchIdSymbolFields.ApiPatchingSymbolFlags), IntermediateFieldType.Number), - }, - typeof(WixPatchIdSymbol)); - } -} - -namespace WixToolset.Data.Symbols -{ - using System; - - public enum WixPatchIdSymbolFields - { - ClientPatchId, - OptimizePatchSizeForLargeFiles, - ApiPatchingSymbolFlags, - } - - /// - /// The following flags are used with PATCH_OPTION_DATA SymbolOptionFlags: - /// - [Flags] - [CLSCompliant(false)] - public enum PatchSymbolFlags : uint - { - /// - /// Don't use imagehlp.dll - /// - PatchSymbolNoImagehlp = 0x00000001, - - /// - /// Don't fail patch due to imagehlp failures. - /// - PatchSymbolNoFailures = 0x00000002, - - /// - /// After matching decorated symbols, try to match remaining by undecorated names. - /// - PatchSymbolUndecoratedToo = 0x00000004, - - /// - /// (used internally) - /// - PatchSymbolReserved = 0x80000000, - } - - public class WixPatchIdSymbol : IntermediateSymbol - { - public WixPatchIdSymbol() : base(SymbolDefinitions.WixPatchId, null, null) - { - } - - public WixPatchIdSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixPatchId, sourceLineNumber, id) - { - } - - public IntermediateField this[WixPatchIdSymbolFields index] => this.Fields[(int)index]; - - public string ClientPatchId - { - get => (string)this.Fields[(int)WixPatchIdSymbolFields.ClientPatchId]; - set => this.Set((int)WixPatchIdSymbolFields.ClientPatchId, value); - } - - public bool? OptimizePatchSizeForLargeFiles - { - get => (bool?)this.Fields[(int)WixPatchIdSymbolFields.OptimizePatchSizeForLargeFiles]; - set => this.Set((int)WixPatchIdSymbolFields.OptimizePatchSizeForLargeFiles, value); - } - - public int? ApiPatchingSymbolFlags - { - get => (int?)this.Fields[(int)WixPatchIdSymbolFields.ApiPatchingSymbolFlags]; - set => this.Set((int)WixPatchIdSymbolFields.ApiPatchingSymbolFlags, value); - } - } -} \ No newline at end of file diff --git a/src/WixToolset.Data/Symbols/WixPatchSymbol.cs b/src/WixToolset.Data/Symbols/WixPatchSymbol.cs new file mode 100644 index 00000000..3f1f20bb --- /dev/null +++ b/src/WixToolset.Data/Symbols/WixPatchSymbol.cs @@ -0,0 +1,98 @@ +// 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. + +namespace WixToolset.Data +{ + using WixToolset.Data.Symbols; + + public static partial class SymbolDefinitions + { + public static readonly IntermediateSymbolDefinition WixPatchId = new IntermediateSymbolDefinition( + SymbolDefinitionType.WixPatch, + new[] + { + new IntermediateFieldDefinition(nameof(WixPatchSymbolFields.ClientPatchId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPatchSymbolFields.OptimizePatchSizeForLargeFiles), IntermediateFieldType.Bool), + new IntermediateFieldDefinition(nameof(WixPatchSymbolFields.ApiPatchingSymbolFlags), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixPatchSymbolFields.Codepage), IntermediateFieldType.String), + }, + typeof(WixPatchSymbol)); + } +} + +namespace WixToolset.Data.Symbols +{ + using System; + + public enum WixPatchSymbolFields + { + ClientPatchId, + OptimizePatchSizeForLargeFiles, + ApiPatchingSymbolFlags, + Codepage, + } + + /// + /// The following flags are used with PATCH_OPTION_DATA SymbolOptionFlags: + /// + [Flags] + [CLSCompliant(false)] + public enum PatchSymbolFlags : uint + { + /// + /// Don't use imagehlp.dll + /// + PatchSymbolNoImagehlp = 0x00000001, + + /// + /// Don't fail patch due to imagehlp failures. + /// + PatchSymbolNoFailures = 0x00000002, + + /// + /// After matching decorated symbols, try to match remaining by undecorated names. + /// + PatchSymbolUndecoratedToo = 0x00000004, + + /// + /// (used internally) + /// + PatchSymbolReserved = 0x80000000, + } + + public class WixPatchSymbol : IntermediateSymbol + { + public WixPatchSymbol() : base(SymbolDefinitions.WixPatchId, null, null) + { + } + + public WixPatchSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixPatchId, sourceLineNumber, id) + { + } + + public IntermediateField this[WixPatchSymbolFields index] => this.Fields[(int)index]; + + public string ClientPatchId + { + get => (string)this.Fields[(int)WixPatchSymbolFields.ClientPatchId]; + set => this.Set((int)WixPatchSymbolFields.ClientPatchId, value); + } + + public bool? OptimizePatchSizeForLargeFiles + { + get => (bool?)this.Fields[(int)WixPatchSymbolFields.OptimizePatchSizeForLargeFiles]; + set => this.Set((int)WixPatchSymbolFields.OptimizePatchSizeForLargeFiles, value); + } + + public int? ApiPatchingSymbolFlags + { + get => (int?)this.Fields[(int)WixPatchSymbolFields.ApiPatchingSymbolFlags]; + set => this.Set((int)WixPatchSymbolFields.ApiPatchingSymbolFlags, value); + } + + public string Codepage + { + get => (string)this.Fields[(int)WixPatchSymbolFields.Codepage]; + set => this.Set((int)WixPatchSymbolFields.Codepage, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs b/src/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs index dab5ed02..a64593ec 100644 --- a/src/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs +++ b/src/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs @@ -1440,7 +1440,7 @@ namespace WixToolset.Data.WindowsInstaller public static readonly TableDefinition ModuleSignature = new TableDefinition( "ModuleSignature", - SymbolDefinitions.ModuleSignature, + SymbolDefinitions.WixModule, new[] { new ColumnDefinition("ModuleID", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Module identifier (String.GUID).", modularizeType: ColumnModularizeType.Column), diff --git a/src/test/WixToolsetTest.Data/SerializeFixture.cs b/src/test/WixToolsetTest.Data/SerializeFixture.cs index ff39cb33..8a65c2d4 100644 --- a/src/test/WixToolsetTest.Data/SerializeFixture.cs +++ b/src/test/WixToolsetTest.Data/SerializeFixture.cs @@ -20,7 +20,7 @@ namespace WixToolsetTest.Data { var sln = new SourceLineNumber("test.wxs", 1); - var section = new IntermediateSection("test", SectionType.Product, 65001); + var section = new IntermediateSection("test", SectionType.Product); section.AddSymbol(new ComponentSymbol(sln, new Identifier(AccessModifier.Global, "TestComponent")) { @@ -62,7 +62,7 @@ namespace WixToolsetTest.Data public void CanUpdateIntermediate() { var sln = new SourceLineNumber("test.wxs", 1); - var section = new IntermediateSection("test", SectionType.Product, 65001); + var section = new IntermediateSection("test", SectionType.Product); section.AddSymbol(new ComponentSymbol(sln, new Identifier(AccessModifier.Global, "TestComponent")) { @@ -119,7 +119,7 @@ namespace WixToolsetTest.Data { var sln = new SourceLineNumber("test.wxs", 1); - var section = new IntermediateSection("test", SectionType.Product, 65001); + var section = new IntermediateSection("test", SectionType.Product); var fieldDefs = new[] { @@ -178,7 +178,7 @@ namespace WixToolsetTest.Data symbol.Set(1, 2); symbol.Set(2, true); - var section = new IntermediateSection("test", SectionType.Product, 65001); + var section = new IntermediateSection("test", SectionType.Product); section.AddSymbol(symbol); var intermediate1 = new Intermediate("TestIntermediate", new[] { section }, null); @@ -200,7 +200,7 @@ namespace WixToolsetTest.Data symbol2.Set(2, false); symbol2.Set(3, "baz"); - var section2 = new IntermediateSection("test2", SectionType.Fragment, 65001); + var section2 = new IntermediateSection("test2", SectionType.Fragment); section2.AddSymbol(symbol2); var intermediate2 = new Intermediate("TestIntermediate2", new[] { section2 }, null); @@ -261,7 +261,7 @@ namespace WixToolsetTest.Data symbol.AddTag("symbol1tag"); - var section = new IntermediateSection("test", SectionType.Product, 65001); + var section = new IntermediateSection("test", SectionType.Product); section.AddSymbol(symbol); var intermediate1 = new Intermediate("TestIntermediate", new[] { section }, null); @@ -289,7 +289,7 @@ namespace WixToolsetTest.Data symbol2.AddTag("symbol2tag1"); symbol2.AddTag("symbol2tag2"); - var section2 = new IntermediateSection("test2", SectionType.Fragment, 65001); + var section2 = new IntermediateSection("test2", SectionType.Fragment); section2.AddSymbol(symbol2); var intermediate2 = new Intermediate("TestIntermediate2", new[] { section2 }, null); @@ -351,10 +351,10 @@ namespace WixToolsetTest.Data var localizations = new[] { - new Localization(65001, null, bindVariables.ToDictionary(b => b.Id), controls.ToDictionary(c => c.GetKey())) + new Localization(65001, 1252, null, bindVariables.ToDictionary(b => b.Id), controls.ToDictionary(c => c.GetKey())) }; - var section = new IntermediateSection("test", SectionType.Product, 65001); + var section = new IntermediateSection("test", SectionType.Product); section.AddSymbol(new ComponentSymbol(sln, new Identifier(AccessModifier.Global, "TestComponent")) { -- cgit v1.2.3-55-g6feb