aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2019-10-26 13:35:15 -0700
committerRob Mensching <rob@firegiant.com>2019-10-26 13:37:47 -0700
commit94da334adaafa4444fb278991aa01cce58d9f758 (patch)
tree1f9938c6579004d48abcea02ebb8a210c44af118
parent6c1ae2593faab59e1a01c96794e0835a6fcd0626 (diff)
downloadwix-94da334adaafa4444fb278991aa01cce58d9f758.tar.gz
wix-94da334adaafa4444fb278991aa01cce58d9f758.tar.bz2
wix-94da334adaafa4444fb278991aa01cce58d9f758.zip
Rename Output to WindowsInstallerData
-rw-r--r--src/WixToolset.Data/WindowsInstaller/Field.cs2
-rw-r--r--src/WixToolset.Data/WindowsInstaller/ObjectField.cs2
-rw-r--r--src/WixToolset.Data/WindowsInstaller/Row.cs2
-rw-r--r--src/WixToolset.Data/WindowsInstaller/SubStorage.cs12
-rw-r--r--src/WixToolset.Data/WindowsInstaller/Table.cs2
-rw-r--r--src/WixToolset.Data/WindowsInstaller/WindowsInstallerData.cs (renamed from src/WixToolset.Data/WindowsInstaller/Output.cs)28
-rw-r--r--src/WixToolset.Data/WindowsInstaller/Xsd/data.xsd (renamed from src/WixToolset.Data/WindowsInstaller/Xsd/outputs.xsd)10
-rw-r--r--src/WixToolset.Data/WindowsInstaller/Xsd/pdbs.xsd32
8 files changed, 30 insertions, 60 deletions
diff --git a/src/WixToolset.Data/WindowsInstaller/Field.cs b/src/WixToolset.Data/WindowsInstaller/Field.cs
index ac8df9a4..84e8d543 100644
--- a/src/WixToolset.Data/WindowsInstaller/Field.cs
+++ b/src/WixToolset.Data/WindowsInstaller/Field.cs
@@ -275,7 +275,7 @@ namespace WixToolset.Data.WindowsInstaller
275 /// <param name="writer">XmlWriter where the Field should persist itself as XML.</param> 275 /// <param name="writer">XmlWriter where the Field should persist itself as XML.</param>
276 internal virtual void Write(XmlWriter writer) 276 internal virtual void Write(XmlWriter writer)
277 { 277 {
278 writer.WriteStartElement("field", Output.XmlNamespaceUri); 278 writer.WriteStartElement("field", WindowsInstallerData.XmlNamespaceUri);
279 279
280 if (this.Modified) 280 if (this.Modified)
281 { 281 {
diff --git a/src/WixToolset.Data/WindowsInstaller/ObjectField.cs b/src/WixToolset.Data/WindowsInstaller/ObjectField.cs
index 4e654dde..f10837c1 100644
--- a/src/WixToolset.Data/WindowsInstaller/ObjectField.cs
+++ b/src/WixToolset.Data/WindowsInstaller/ObjectField.cs
@@ -130,7 +130,7 @@ namespace WixToolset.Data.WindowsInstaller
130 /// <param name="writer">XmlWriter where the Field should persist itself as XML.</param> 130 /// <param name="writer">XmlWriter where the Field should persist itself as XML.</param>
131 internal override void Write(XmlWriter writer) 131 internal override void Write(XmlWriter writer)
132 { 132 {
133 writer.WriteStartElement("field", Output.XmlNamespaceUri); 133 writer.WriteStartElement("field", WindowsInstallerData.XmlNamespaceUri);
134 134
135 if (this.EmbeddedFileIndex.HasValue) 135 if (this.EmbeddedFileIndex.HasValue)
136 { 136 {
diff --git a/src/WixToolset.Data/WindowsInstaller/Row.cs b/src/WixToolset.Data/WindowsInstaller/Row.cs
index a267f04b..a7a63d58 100644
--- a/src/WixToolset.Data/WindowsInstaller/Row.cs
+++ b/src/WixToolset.Data/WindowsInstaller/Row.cs
@@ -354,7 +354,7 @@ namespace WixToolset.Data.WindowsInstaller
354 /// <param name="writer">XmlWriter where the Row should persist itself as XML.</param> 354 /// <param name="writer">XmlWriter where the Row should persist itself as XML.</param>
355 internal void Write(XmlWriter writer) 355 internal void Write(XmlWriter writer)
356 { 356 {
357 writer.WriteStartElement("row", Output.XmlNamespaceUri); 357 writer.WriteStartElement("row", WindowsInstallerData.XmlNamespaceUri);
358 358
359 if (RowOperation.None != this.Operation) 359 if (RowOperation.None != this.Operation)
360 { 360 {
diff --git a/src/WixToolset.Data/WindowsInstaller/SubStorage.cs b/src/WixToolset.Data/WindowsInstaller/SubStorage.cs
index c1981f1b..6aae1dd8 100644
--- a/src/WixToolset.Data/WindowsInstaller/SubStorage.cs
+++ b/src/WixToolset.Data/WindowsInstaller/SubStorage.cs
@@ -14,7 +14,7 @@ namespace WixToolset.Data.WindowsInstaller
14 /// </summary> 14 /// </summary>
15 /// <param name="name">The substorage name.</param> 15 /// <param name="name">The substorage name.</param>
16 /// <param name="data">The substorage data.</param> 16 /// <param name="data">The substorage data.</param>
17 public SubStorage(string name, Output data) 17 public SubStorage(string name, WindowsInstallerData data)
18 { 18 {
19 this.Name = name; 19 this.Name = name;
20 this.Data = data; 20 this.Data = data;
@@ -30,7 +30,7 @@ namespace WixToolset.Data.WindowsInstaller
30 /// Gets the substorage data. 30 /// Gets the substorage data.
31 /// </summary> 31 /// </summary>
32 /// <value>The substorage data.</value> 32 /// <value>The substorage data.</value>
33 public Output Data { get; } 33 public WindowsInstallerData Data { get; }
34 34
35 /// <summary> 35 /// <summary>
36 /// Creates a SubStorage from the XmlReader. 36 /// Creates a SubStorage from the XmlReader.
@@ -44,7 +44,7 @@ namespace WixToolset.Data.WindowsInstaller
44 throw new XmlException(); 44 throw new XmlException();
45 } 45 }
46 46
47 Output data = null; 47 WindowsInstallerData data = null;
48 bool empty = reader.IsEmptyElement; 48 bool empty = reader.IsEmptyElement;
49 string name = null; 49 string name = null;
50 50
@@ -69,8 +69,8 @@ namespace WixToolset.Data.WindowsInstaller
69 case XmlNodeType.Element: 69 case XmlNodeType.Element:
70 switch (reader.LocalName) 70 switch (reader.LocalName)
71 { 71 {
72 case "wixOutput": 72 case WindowsInstallerData.XmlElementName:
73 data = Output.Read(reader, true); 73 data = WindowsInstallerData.Read(reader, true);
74 break; 74 break;
75 default: 75 default:
76 throw new XmlException(); 76 throw new XmlException();
@@ -97,7 +97,7 @@ namespace WixToolset.Data.WindowsInstaller
97 /// <param name="writer">XmlWriter where the SubStorage should persist itself as XML.</param> 97 /// <param name="writer">XmlWriter where the SubStorage should persist itself as XML.</param>
98 internal void Write(XmlWriter writer) 98 internal void Write(XmlWriter writer)
99 { 99 {
100 writer.WriteStartElement("subStorage", Output.XmlNamespaceUri); 100 writer.WriteStartElement("subStorage", WindowsInstallerData.XmlNamespaceUri);
101 101
102 writer.WriteAttributeString("name", this.Name); 102 writer.WriteAttributeString("name", this.Name);
103 103
diff --git a/src/WixToolset.Data/WindowsInstaller/Table.cs b/src/WixToolset.Data/WindowsInstaller/Table.cs
index c7f2c8f2..3325dd8b 100644
--- a/src/WixToolset.Data/WindowsInstaller/Table.cs
+++ b/src/WixToolset.Data/WindowsInstaller/Table.cs
@@ -291,7 +291,7 @@ namespace WixToolset.Data.WindowsInstaller
291 throw new ArgumentNullException("writer"); 291 throw new ArgumentNullException("writer");
292 } 292 }
293 293
294 writer.WriteStartElement("table", Output.XmlNamespaceUri); 294 writer.WriteStartElement("table", WindowsInstallerData.XmlNamespaceUri);
295 writer.WriteAttributeString("name", this.Name); 295 writer.WriteAttributeString("name", this.Name);
296 296
297 if (TableOperation.None != this.Operation) 297 if (TableOperation.None != this.Operation)
diff --git a/src/WixToolset.Data/WindowsInstaller/Output.cs b/src/WixToolset.Data/WindowsInstaller/WindowsInstallerData.cs
index ee46c159..0855997c 100644
--- a/src/WixToolset.Data/WindowsInstaller/Output.cs
+++ b/src/WixToolset.Data/WindowsInstaller/WindowsInstallerData.cs
@@ -11,17 +11,19 @@ namespace WixToolset.Data.WindowsInstaller
11 /// <summary> 11 /// <summary>
12 /// Output is generated by the linker. 12 /// Output is generated by the linker.
13 /// </summary> 13 /// </summary>
14 public sealed class Output 14 public sealed class WindowsInstallerData
15 { 15 {
16 public const string XmlNamespaceUri = "http://wixtoolset.org/schemas/v4/wixout"; 16 internal const string XmlNamespaceUri = "http://wixtoolset.org/schemas/v4/windowsinstallerdata";
17 internal const string XmlElementName = "windowsInstallerData";
18
17 private static readonly Version CurrentVersion = new Version("4.0.0.0"); 19 private static readonly Version CurrentVersion = new Version("4.0.0.0");
18 private const string WixOutputStreamName = "wix-wi.xml"; 20 private const string WixOutputStreamName = "wix-wid.xml";
19 21
20 /// <summary> 22 /// <summary>
21 /// Creates a new empty output object. 23 /// Creates a new empty output object.
22 /// </summary> 24 /// </summary>
23 /// <param name="sourceLineNumbers">The source line information for the output.</param> 25 /// <param name="sourceLineNumbers">The source line information for the output.</param>
24 public Output(SourceLineNumber sourceLineNumbers) 26 public WindowsInstallerData(SourceLineNumber sourceLineNumbers)
25 { 27 {
26 this.SourceLineNumbers = sourceLineNumbers; 28 this.SourceLineNumbers = sourceLineNumbers;
27 this.SubStorages = new List<SubStorage>(); 29 this.SubStorages = new List<SubStorage>();
@@ -64,7 +66,7 @@ namespace WixToolset.Data.WindowsInstaller
64 /// <param name="path">Path to output file saved on disk.</param> 66 /// <param name="path">Path to output file saved on disk.</param>
65 /// <param name="suppressVersionCheck">Suppresses wix.dll version mismatch check.</param> 67 /// <param name="suppressVersionCheck">Suppresses wix.dll version mismatch check.</param>
66 /// <returns>Output object.</returns> 68 /// <returns>Output object.</returns>
67 public static Output Load(string path, bool suppressVersionCheck) 69 public static WindowsInstallerData Load(string path, bool suppressVersionCheck)
68 { 70 {
69 using (var wixout = WixOutput.Read(path)) 71 using (var wixout = WixOutput.Read(path))
70 using (var stream = wixout.GetDataStream(WixOutputStreamName)) 72 using (var stream = wixout.GetDataStream(WixOutputStreamName))
@@ -73,7 +75,7 @@ namespace WixToolset.Data.WindowsInstaller
73 try 75 try
74 { 76 {
75 reader.MoveToContent(); 77 reader.MoveToContent();
76 return Output.Read(reader, suppressVersionCheck); 78 return WindowsInstallerData.Read(reader, suppressVersionCheck);
77 } 79 }
78 catch (XmlException xe) 80 catch (XmlException xe)
79 { 81 {
@@ -102,15 +104,15 @@ namespace WixToolset.Data.WindowsInstaller
102 /// <param name="reader">Reader to get data from.</param> 104 /// <param name="reader">Reader to get data from.</param>
103 /// <param name="suppressVersionCheck">Suppresses wix.dll version mismatch check.</param> 105 /// <param name="suppressVersionCheck">Suppresses wix.dll version mismatch check.</param>
104 /// <returns>The Output represented by the Xml.</returns> 106 /// <returns>The Output represented by the Xml.</returns>
105 internal static Output Read(XmlReader reader, bool suppressVersionCheck) 107 internal static WindowsInstallerData Read(XmlReader reader, bool suppressVersionCheck)
106 { 108 {
107 if (!reader.LocalName.Equals("wixOutput")) 109 if (!reader.LocalName.Equals(WindowsInstallerData.XmlElementName))
108 { 110 {
109 throw new XmlException(); 111 throw new XmlException();
110 } 112 }
111 113
112 var empty = reader.IsEmptyElement; 114 var empty = reader.IsEmptyElement;
113 var output = new Output(SourceLineNumber.CreateFromUri(reader.BaseURI)); 115 var output = new WindowsInstallerData(SourceLineNumber.CreateFromUri(reader.BaseURI));
114 Version version = null; 116 Version version = null;
115 117
116 while (reader.MoveToNextAttribute()) 118 while (reader.MoveToNextAttribute())
@@ -151,9 +153,9 @@ namespace WixToolset.Data.WindowsInstaller
151 } 153 }
152 } 154 }
153 155
154 if (!suppressVersionCheck && null != version && !Output.CurrentVersion.Equals(version)) 156 if (!suppressVersionCheck && null != version && !WindowsInstallerData.CurrentVersion.Equals(version))
155 { 157 {
156 throw new WixException(ErrorMessages.VersionMismatch(SourceLineNumber.CreateFromUri(reader.BaseURI), "wixOutput", version.ToString(), Output.CurrentVersion.ToString())); 158 throw new WixException(ErrorMessages.VersionMismatch(SourceLineNumber.CreateFromUri(reader.BaseURI), WindowsInstallerData.XmlElementName, version.ToString(), WindowsInstallerData.CurrentVersion.ToString()));
157 } 159 }
158 160
159 // loop through the rest of the xml building up the Output object 161 // loop through the rest of the xml building up the Output object
@@ -227,7 +229,7 @@ namespace WixToolset.Data.WindowsInstaller
227 /// <param name="writer">XmlWriter where the Output should persist itself as XML.</param> 229 /// <param name="writer">XmlWriter where the Output should persist itself as XML.</param>
228 internal void Write(XmlWriter writer) 230 internal void Write(XmlWriter writer)
229 { 231 {
230 writer.WriteStartElement("wixOutput", XmlNamespaceUri); 232 writer.WriteStartElement(WindowsInstallerData.XmlElementName, XmlNamespaceUri);
231 233
232 writer.WriteAttributeString("type", this.Type.ToString()); 234 writer.WriteAttributeString("type", this.Type.ToString());
233 235
@@ -236,7 +238,7 @@ namespace WixToolset.Data.WindowsInstaller
236 writer.WriteAttributeString("codepage", this.Codepage.ToString(CultureInfo.InvariantCulture)); 238 writer.WriteAttributeString("codepage", this.Codepage.ToString(CultureInfo.InvariantCulture));
237 } 239 }
238 240
239 writer.WriteAttributeString("version", Output.CurrentVersion.ToString()); 241 writer.WriteAttributeString("version", WindowsInstallerData.CurrentVersion.ToString());
240 242
241 // Collect all the table definitions and write them. 243 // Collect all the table definitions and write them.
242 var tableDefinitions = new TableDefinitionCollection(); 244 var tableDefinitions = new TableDefinitionCollection();
diff --git a/src/WixToolset.Data/WindowsInstaller/Xsd/outputs.xsd b/src/WixToolset.Data/WindowsInstaller/Xsd/data.xsd
index 00e20f12..a3dc7e2b 100644
--- a/src/WixToolset.Data/WindowsInstaller/Xsd/outputs.xsd
+++ b/src/WixToolset.Data/WindowsInstaller/Xsd/data.xsd
@@ -3,20 +3,20 @@
3 3
4 4
5<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 5<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
6 targetNamespace="http://wixtoolset.org/schemas/v4/wixout" 6 targetNamespace="http://wixtoolset.org/schemas/v4/windowsinstallerdata"
7 xmlns="http://wixtoolset.org/schemas/v4/wixout" 7 xmlns="http://wixtoolset.org/schemas/v4/windowsinstallerdata"
8 xmlns:objs="http://wixtoolset.org/schemas/v4/wixobj" 8 xmlns:objs="http://wixtoolset.org/schemas/v4/wixobj"
9 xmlns:tbls="http://wixtoolset.org/schemas/v4/wi/tables"> 9 xmlns:tbls="http://wixtoolset.org/schemas/v4/wi/tables">
10 <xs:annotation> 10 <xs:annotation>
11 <xs:documentation> 11 <xs:documentation>
12 Schema for describing WiX Output files (.wixout). 12 Schema for describing WiX Windows Installer Data files.
13 </xs:documentation> 13 </xs:documentation>
14 </xs:annotation> 14 </xs:annotation>
15 15
16 <xs:import namespace="http://wixtoolset.org/schemas/v4/wixobj" schemaLocation="objects.xsd" /> 16 <xs:import namespace="http://wixtoolset.org/schemas/v4/wixobj" schemaLocation="objects.xsd" />
17 <xs:import namespace="http://wixtoolset.org/schemas/v4/wi/tables" schemaLocation="tables.xsd" /> 17 <xs:import namespace="http://wixtoolset.org/schemas/v4/wi/tables" schemaLocation="tables.xsd" />
18 18
19 <xs:element name="wixOutput"> 19 <xs:element name="windowsInstallerData">
20 <xs:complexType> 20 <xs:complexType>
21 <xs:sequence> 21 <xs:sequence>
22 <xs:element ref="tbls:tableDefinitions" /> 22 <xs:element ref="tbls:tableDefinitions" />
@@ -54,7 +54,7 @@
54 <xs:element name="subStorage"> 54 <xs:element name="subStorage">
55 <xs:complexType> 55 <xs:complexType>
56 <xs:sequence minOccurs="1" maxOccurs="1"> 56 <xs:sequence minOccurs="1" maxOccurs="1">
57 <xs:element ref="wixOutput" /> 57 <xs:element ref="windowsInstallerData" />
58 </xs:sequence> 58 </xs:sequence>
59 <xs:attribute name="name" type="xs:string"> 59 <xs:attribute name="name" type="xs:string">
60 <xs:annotation> 60 <xs:annotation>
diff --git a/src/WixToolset.Data/WindowsInstaller/Xsd/pdbs.xsd b/src/WixToolset.Data/WindowsInstaller/Xsd/pdbs.xsd
deleted file mode 100644
index c1d1756d..00000000
--- a/src/WixToolset.Data/WindowsInstaller/Xsd/pdbs.xsd
+++ /dev/null
@@ -1,32 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- 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. -->
3
4
5<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
6 targetNamespace="http://wixtoolset.org/schemas/v4/wixpdb"
7 xmlns="http://wixtoolset.org/schemas/v4/wixpdb"
8 xmlns:outs="http://wixtoolset.org/schemas/v4/wixout">
9 <xs:annotation>
10 <xs:documentation>
11 Schema for describing WiX Pdb files (.wixpdb).
12 </xs:documentation>
13 </xs:annotation>
14
15 <xs:import namespace="http://wixtoolset.org/schemas/v4/wixobj" schemaLocation="objects.xsd" />
16 <xs:import namespace="http://wixtoolset.org/schemas/v4/wixout" schemaLocation="outputs.xsd" />
17 <xs:import namespace="http://wixtoolset.org/schemas/v4/wi/tables" schemaLocation="tables.xsd" />
18
19 <xs:element name="wixPdb">
20 <xs:complexType>
21 <xs:sequence>
22 <xs:element ref="outs:wixOutput" minOccurs="0" maxOccurs="unbounded" />
23 </xs:sequence>
24
25 <xs:attribute name="version" type="xs:string" use="required">
26 <xs:annotation>
27 <xs:documentation>Version of WiX used to create this pdb file</xs:documentation>
28 </xs:annotation>
29 </xs:attribute>
30 </xs:complexType>
31 </xs:element>
32</xs:schema>