diff options
| author | Rob Mensching <rob@firegiant.com> | 2021-04-02 14:41:49 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2021-04-02 14:58:00 -0700 |
| commit | 4449fcc5b8d104817c67135229682c66c3d892ca (patch) | |
| tree | 327f617de2e296ddb4e62c50bf07ec8b5dcf0a3e /src/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs | |
| parent | 9cca339473d77c7036035f949239f5231c325968 (diff) | |
| download | wix-4449fcc5b8d104817c67135229682c66c3d892ca.tar.gz wix-4449fcc5b8d104817c67135229682c66c3d892ca.tar.bz2 wix-4449fcc5b8d104817c67135229682c66c3d892ca.zip | |
Enable codepages and languages to be set via .wxl files
Fixes wixtoolset/issues#5801
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs')
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs index bc95fd4c..1bd00900 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs | |||
| @@ -18,11 +18,12 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 18 | 18 | ||
| 19 | internal class CreateWindowsInstallerDataFromIRCommand | 19 | internal class CreateWindowsInstallerDataFromIRCommand |
| 20 | { | 20 | { |
| 21 | public CreateWindowsInstallerDataFromIRCommand(IMessaging messaging, IntermediateSection section, TableDefinitionCollection tableDefinitions, IEnumerable<IWindowsInstallerBackendBinderExtension> backendExtensions, IWindowsInstallerBackendHelper backendHelper) | 21 | public CreateWindowsInstallerDataFromIRCommand(IMessaging messaging, IntermediateSection section, TableDefinitionCollection tableDefinitions, int codepage, IEnumerable<IWindowsInstallerBackendBinderExtension> backendExtensions, IWindowsInstallerBackendHelper backendHelper) |
| 22 | { | 22 | { |
| 23 | this.Messaging = messaging; | 23 | this.Messaging = messaging; |
| 24 | this.Section = section; | 24 | this.Section = section; |
| 25 | this.TableDefinitions = tableDefinitions; | 25 | this.TableDefinitions = tableDefinitions; |
| 26 | this.Codepage = codepage; | ||
| 26 | this.BackendExtensions = backendExtensions; | 27 | this.BackendExtensions = backendExtensions; |
| 27 | this.BackendHelper = backendHelper; | 28 | this.BackendHelper = backendHelper; |
| 28 | this.GeneratedShortNames = new Dictionary<string, List<FileSymbol>>(); | 29 | this.GeneratedShortNames = new Dictionary<string, List<FileSymbol>>(); |
| @@ -36,6 +37,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 36 | 37 | ||
| 37 | private TableDefinitionCollection TableDefinitions { get; } | 38 | private TableDefinitionCollection TableDefinitions { get; } |
| 38 | 39 | ||
| 40 | private int Codepage { get; } | ||
| 41 | |||
| 39 | private IntermediateSection Section { get; } | 42 | private IntermediateSection Section { get; } |
| 40 | 43 | ||
| 41 | private Dictionary<string, List<FileSymbol>> GeneratedShortNames { get; } | 44 | private Dictionary<string, List<FileSymbol>> GeneratedShortNames { get; } |
| @@ -46,7 +49,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 46 | { | 49 | { |
| 47 | this.Data = new WindowsInstallerData(this.Section.Symbols.First().SourceLineNumbers) | 50 | this.Data = new WindowsInstallerData(this.Section.Symbols.First().SourceLineNumbers) |
| 48 | { | 51 | { |
| 49 | Codepage = this.Section.Codepage, | 52 | Codepage = this.Codepage, |
| 50 | Type = SectionTypeToOutputType(this.Section.Type) | 53 | Type = SectionTypeToOutputType(this.Section.Type) |
| 51 | }; | 54 | }; |
| 52 | 55 | ||
| @@ -219,6 +222,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 219 | this.AddWixEnsureTableSymbol((WixEnsureTableSymbol)symbol); | 222 | this.AddWixEnsureTableSymbol((WixEnsureTableSymbol)symbol); |
| 220 | break; | 223 | break; |
| 221 | 224 | ||
| 225 | case SymbolDefinitionType.WixPackage: | ||
| 226 | this.AddWixPackageSymbol((WixPackageSymbol)symbol); | ||
| 227 | break; | ||
| 228 | |||
| 222 | // Symbols used internally and are not added to the output. | 229 | // Symbols used internally and are not added to the output. |
| 223 | case SymbolDefinitionType.WixBuildInfo: | 230 | case SymbolDefinitionType.WixBuildInfo: |
| 224 | case SymbolDefinitionType.WixBindUpdatedFiles: | 231 | case SymbolDefinitionType.WixBindUpdatedFiles: |
| @@ -237,7 +244,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 237 | case SymbolDefinitionType.WixOrdering: | 244 | case SymbolDefinitionType.WixOrdering: |
| 238 | case SymbolDefinitionType.WixPatchBaseline: | 245 | case SymbolDefinitionType.WixPatchBaseline: |
| 239 | case SymbolDefinitionType.WixPatchFamilyGroup: | 246 | case SymbolDefinitionType.WixPatchFamilyGroup: |
| 240 | case SymbolDefinitionType.WixPatchId: | 247 | case SymbolDefinitionType.WixPatch: |
| 241 | case SymbolDefinitionType.WixPatchRef: | 248 | case SymbolDefinitionType.WixPatchRef: |
| 242 | case SymbolDefinitionType.WixPatchTarget: | 249 | case SymbolDefinitionType.WixPatchTarget: |
| 243 | case SymbolDefinitionType.WixProperty: | 250 | case SymbolDefinitionType.WixProperty: |
| @@ -1214,6 +1221,25 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 1214 | this.Data.EnsureTable(tableDefinition); | 1221 | this.Data.EnsureTable(tableDefinition); |
| 1215 | } | 1222 | } |
| 1216 | 1223 | ||
| 1224 | private void AddWixPackageSymbol(WixPackageSymbol symbol) | ||
| 1225 | { | ||
| 1226 | // TODO: Remove the following from the compiler and do it here instead. | ||
| 1227 | //this.AddProperty(sourceLineNumbers, new Identifier(AccessModifier.Global, "Manufacturer"), manufacturer, false, false, false, true); | ||
| 1228 | //this.AddProperty(sourceLineNumbers, new Identifier(AccessModifier.Global, "ProductCode"), productCode, false, false, false, true); | ||
| 1229 | //this.AddProperty(sourceLineNumbers, new Identifier(AccessModifier.Global, "ProductLanguage"), productLanguage, false, false, false, true); | ||
| 1230 | //this.AddProperty(sourceLineNumbers, new Identifier(AccessModifier.Global, "ProductName"), this.activeName, false, false, false, true); | ||
| 1231 | //this.AddProperty(sourceLineNumbers, new Identifier(AccessModifier.Global, "ProductVersion"), version, false, false, false, true); | ||
| 1232 | //if (null != upgradeCode) | ||
| 1233 | //{ | ||
| 1234 | // this.AddProperty(sourceLineNumbers, new Identifier(AccessModifier.Global, "UpgradeCode"), upgradeCode, false, false, false, true); | ||
| 1235 | //} | ||
| 1236 | |||
| 1237 | //if (isPerMachine) | ||
| 1238 | //{ | ||
| 1239 | // this.AddProperty(sourceLineNumbers, new Identifier(AccessModifier.Global, "ALLUSERS"), "1", false, false, false, false); | ||
| 1240 | //} | ||
| 1241 | } | ||
| 1242 | |||
| 1217 | private bool AddSymbolFromExtension(IntermediateSymbol symbol) | 1243 | private bool AddSymbolFromExtension(IntermediateSymbol symbol) |
| 1218 | { | 1244 | { |
| 1219 | foreach (var extension in this.BackendExtensions) | 1245 | foreach (var extension in this.BackendExtensions) |
