aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core/Compiler_Module.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core/Compiler_Module.cs')
-rw-r--r--src/WixToolset.Core/Compiler_Module.cs56
1 files changed, 52 insertions, 4 deletions
diff --git a/src/WixToolset.Core/Compiler_Module.cs b/src/WixToolset.Core/Compiler_Module.cs
index 2ecd9113..2f926d82 100644
--- a/src/WixToolset.Core/Compiler_Module.cs
+++ b/src/WixToolset.Core/Compiler_Module.cs
@@ -24,6 +24,12 @@ namespace WixToolset.Core
24 var codepage = 0; 24 var codepage = 0;
25 string moduleId = null; 25 string moduleId = null;
26 string version = null; 26 string version = null;
27 var setCodepage = false;
28 var setPackageName = false;
29 var setKeywords = false;
30 var ignoredForMergeModules = false;
31
32 this.GetDefaultPlatformAndInstallerVersion(out var platform, out var msiVersion);
27 33
28 this.activeName = null; 34 this.activeName = null;
29 this.activeLanguage = null; 35 this.activeLanguage = null;
@@ -50,7 +56,9 @@ namespace WixToolset.Core
50 break; 56 break;
51 case "Guid": 57 case "Guid":
52 moduleId = this.Core.GetAttributeGuidValue(sourceLineNumbers, attrib, false); 58 moduleId = this.Core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
53 this.Core.Write(WarningMessages.DeprecatedModuleGuidAttribute(sourceLineNumbers)); 59 break;
60 case "InstallerVersion":
61 msiVersion = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, Int32.MaxValue);
54 break; 62 break;
55 case "Language": 63 case "Language":
56 this.activeLanguage = this.Core.GetAttributeLocalizableIntegerValue(sourceLineNumbers, attrib, 0, Int16.MaxValue); 64 this.activeLanguage = this.Core.GetAttributeLocalizableIntegerValue(sourceLineNumbers, attrib, 0, Int16.MaxValue);
@@ -74,6 +82,11 @@ namespace WixToolset.Core
74 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 82 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
75 } 83 }
76 84
85 if (null == moduleId)
86 {
87 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Guid"));
88 }
89
77 if (null == this.activeLanguage) 90 if (null == this.activeLanguage)
78 { 91 {
79 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Language")); 92 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Language"));
@@ -174,9 +187,6 @@ namespace WixToolset.Core
174 case "IgnoreTable": 187 case "IgnoreTable":
175 this.ParseIgnoreTableElement(child); 188 this.ParseIgnoreTableElement(child);
176 break; 189 break;
177 case "Package":
178 this.ParsePackageElement(child, null, moduleId);
179 break;
180 case "Property": 190 case "Property":
181 this.ParsePropertyElement(child); 191 this.ParsePropertyElement(child);
182 break; 192 break;
@@ -196,6 +206,9 @@ namespace WixToolset.Core
196 case "Substitution": 206 case "Substitution":
197 this.ParseSubstitutionElement(child); 207 this.ParseSubstitutionElement(child);
198 break; 208 break;
209 case "SummaryInformation":
210 this.ParseSummaryInformationElement(child, ref setCodepage, ref setPackageName, ref setKeywords, ref ignoredForMergeModules);
211 break;
199 case "UI": 212 case "UI":
200 this.ParseUIElement(child); 213 this.ParseUIElement(child);
201 break; 214 break;
@@ -219,6 +232,33 @@ namespace WixToolset.Core
219 232
220 if (!this.Core.EncounteredError) 233 if (!this.Core.EncounteredError)
221 { 234 {
235 if (!setCodepage)
236 {
237 this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers)
238 {
239 PropertyId = SummaryInformationType.Codepage,
240 Value = "1252"
241 });
242 }
243
244 if (!setPackageName)
245 {
246 this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers)
247 {
248 PropertyId = SummaryInformationType.Subject,
249 Value = this.activeName
250 });
251 }
252
253 if (!setKeywords)
254 {
255 this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers)
256 {
257 PropertyId = SummaryInformationType.Keywords,
258 Value = "Installer"
259 });
260 }
261
222 var symbol = this.Core.AddSymbol(new ModuleSignatureSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, this.activeName, this.activeLanguage)) 262 var symbol = this.Core.AddSymbol(new ModuleSignatureSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, this.activeName, this.activeLanguage))
223 { 263 {
224 ModuleID = this.activeName, 264 ModuleID = this.activeName,
@@ -226,6 +266,14 @@ namespace WixToolset.Core
226 }); 266 });
227 267
228 symbol.Set((int)ModuleSignatureSymbolFields.Language, this.activeLanguage); 268 symbol.Set((int)ModuleSignatureSymbolFields.Language, this.activeLanguage);
269
270 this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers)
271 {
272 PropertyId = SummaryInformationType.PackageCode,
273 Value = moduleId
274 });
275
276 this.ValidateAndAddCommonSummaryInformationSymbols(sourceLineNumbers, msiVersion, platform);
229 } 277 }
230 } 278 }
231 finally 279 finally