diff options
Diffstat (limited to 'Prebuild/src/Core/Nodes')
-rw-r--r-- | Prebuild/src/Core/Nodes/AuthorNode.cs | 98 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/ConfigurationNode.cs | 4 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/DataNode.cs | 2 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/DescriptionNode.cs | 98 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/ExcludeNode.cs | 27 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/FileNode.cs | 33 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/FilesNode.cs | 56 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/MatchNode.cs | 78 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/OptionsNode.cs | 2 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/ProcessNode.cs | 2 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/ProjectNode.cs | 79 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/ReferenceNode.cs | 4 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/ReferencePathNode.cs | 4 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/SolutionNode.cs | 34 |
14 files changed, 440 insertions, 81 deletions
diff --git a/Prebuild/src/Core/Nodes/AuthorNode.cs b/Prebuild/src/Core/Nodes/AuthorNode.cs new file mode 100644 index 0000000..03ea934 --- /dev/null +++ b/Prebuild/src/Core/Nodes/AuthorNode.cs | |||
@@ -0,0 +1,98 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2007 C.J. Adams-Collier (cjac@colliertech.org) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | #region CVS Information | ||
27 | /* | ||
28 | * $Source $ | ||
29 | * $Author: $ | ||
30 | * $Date: $ | ||
31 | * $Revision: $ | ||
32 | */ | ||
33 | #endregion | ||
34 | |||
35 | using System; | ||
36 | using System.Collections; | ||
37 | using System.Collections.Specialized; | ||
38 | using System.Xml; | ||
39 | |||
40 | using Prebuild.Core.Attributes; | ||
41 | using Prebuild.Core.Interfaces; | ||
42 | using Prebuild.Core.Utilities; | ||
43 | |||
44 | namespace Prebuild.Core.Nodes | ||
45 | { | ||
46 | /// <summary> | ||
47 | /// | ||
48 | /// </summary> | ||
49 | [DataNode("Author")] | ||
50 | public class AuthorNode : DataNode | ||
51 | { | ||
52 | #region Fields | ||
53 | |||
54 | private string m_Signature; | ||
55 | |||
56 | #endregion | ||
57 | |||
58 | #region Properties | ||
59 | |||
60 | /// <summary> | ||
61 | /// Gets the signature. | ||
62 | /// </summary> | ||
63 | /// <value>The signature.</value> | ||
64 | public string Signature | ||
65 | { | ||
66 | get | ||
67 | { | ||
68 | return m_Signature; | ||
69 | } | ||
70 | } | ||
71 | |||
72 | #endregion | ||
73 | |||
74 | #region Public Methods | ||
75 | |||
76 | /// <summary> | ||
77 | /// Parses the specified node. | ||
78 | /// </summary> | ||
79 | /// <param name="node">The node.</param> | ||
80 | public override void Parse(XmlNode node) | ||
81 | { | ||
82 | if( node == null ) | ||
83 | { | ||
84 | throw new ArgumentNullException("node"); | ||
85 | } | ||
86 | |||
87 | m_Signature = Helper.InterpolateForEnvironmentVariables(node.InnerText); | ||
88 | if(m_Signature == null) | ||
89 | { | ||
90 | m_Signature = ""; | ||
91 | } | ||
92 | |||
93 | m_Signature = m_Signature.Trim(); | ||
94 | } | ||
95 | |||
96 | #endregion | ||
97 | } | ||
98 | } | ||
diff --git a/Prebuild/src/Core/Nodes/ConfigurationNode.cs b/Prebuild/src/Core/Nodes/ConfigurationNode.cs index d2a5d20..828bff6 100644 --- a/Prebuild/src/Core/Nodes/ConfigurationNode.cs +++ b/Prebuild/src/Core/Nodes/ConfigurationNode.cs | |||
@@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
27 | /* | 27 | /* |
28 | * $Source$ | 28 | * $Source$ |
29 | * $Author: jendave $ | 29 | * $Author: jendave $ |
30 | * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $ | 30 | * $Date: 2006-01-28 09:49:58 +0900 (Sat, 28 Jan 2006) $ |
31 | * $Revision: 71 $ | 31 | * $Revision: 71 $ |
32 | */ | 32 | */ |
33 | #endregion | 33 | #endregion |
@@ -183,5 +183,5 @@ namespace Prebuild.Core.Nodes | |||
183 | } | 183 | } |
184 | 184 | ||
185 | #endregion | 185 | #endregion |
186 | } | 186 | } |
187 | } | 187 | } |
diff --git a/Prebuild/src/Core/Nodes/DataNode.cs b/Prebuild/src/Core/Nodes/DataNode.cs index aa05faa..60ed122 100644 --- a/Prebuild/src/Core/Nodes/DataNode.cs +++ b/Prebuild/src/Core/Nodes/DataNode.cs | |||
@@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
27 | /* | 27 | /* |
28 | * $Source$ | 28 | * $Source$ |
29 | * $Author: jendave $ | 29 | * $Author: jendave $ |
30 | * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $ | 30 | * $Date: 2006-01-28 09:49:58 +0900 (Sat, 28 Jan 2006) $ |
31 | * $Revision: 71 $ | 31 | * $Revision: 71 $ |
32 | */ | 32 | */ |
33 | #endregion | 33 | #endregion |
diff --git a/Prebuild/src/Core/Nodes/DescriptionNode.cs b/Prebuild/src/Core/Nodes/DescriptionNode.cs new file mode 100644 index 0000000..cff7afc --- /dev/null +++ b/Prebuild/src/Core/Nodes/DescriptionNode.cs | |||
@@ -0,0 +1,98 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2007 C.J. Adams-Collier (cjac@colliertech.org) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | #region CVS Information | ||
27 | /* | ||
28 | * $Source $ | ||
29 | * $Author: $ | ||
30 | * $Date: $ | ||
31 | * $Revision: $ | ||
32 | */ | ||
33 | #endregion | ||
34 | |||
35 | using System; | ||
36 | using System.Collections; | ||
37 | using System.Collections.Specialized; | ||
38 | using System.Xml; | ||
39 | |||
40 | using Prebuild.Core.Attributes; | ||
41 | using Prebuild.Core.Interfaces; | ||
42 | using Prebuild.Core.Utilities; | ||
43 | |||
44 | namespace Prebuild.Core.Nodes | ||
45 | { | ||
46 | /// <summary> | ||
47 | /// The object representing the /Prebuild/Solution/Project/Description element | ||
48 | /// </summary> | ||
49 | [DataNode("Description")] | ||
50 | public class DescriptionNode : DataNode | ||
51 | { | ||
52 | #region Fields | ||
53 | |||
54 | private string m_Value; | ||
55 | |||
56 | #endregion | ||
57 | |||
58 | #region Properties | ||
59 | |||
60 | /// <summary> | ||
61 | /// Gets the description Value. | ||
62 | /// </summary> | ||
63 | /// <value>The description Value.</value> | ||
64 | public string Value | ||
65 | { | ||
66 | get | ||
67 | { | ||
68 | return m_Value; | ||
69 | } | ||
70 | } | ||
71 | |||
72 | #endregion | ||
73 | |||
74 | #region Public Methods | ||
75 | |||
76 | /// <summary> | ||
77 | /// Parses the specified node. | ||
78 | /// </summary> | ||
79 | /// <param name="node">The node.</param> | ||
80 | public override void Parse(XmlNode node) | ||
81 | { | ||
82 | if( node == null ) | ||
83 | { | ||
84 | throw new ArgumentNullException("node"); | ||
85 | } | ||
86 | |||
87 | m_Value = Helper.InterpolateForEnvironmentVariables(node.InnerText); | ||
88 | if(m_Value == null) | ||
89 | { | ||
90 | m_Value = ""; | ||
91 | } | ||
92 | |||
93 | m_Value = m_Value.Trim(); | ||
94 | } | ||
95 | |||
96 | #endregion | ||
97 | } | ||
98 | } | ||
diff --git a/Prebuild/src/Core/Nodes/ExcludeNode.cs b/Prebuild/src/Core/Nodes/ExcludeNode.cs index 905626d..afc869d 100644 --- a/Prebuild/src/Core/Nodes/ExcludeNode.cs +++ b/Prebuild/src/Core/Nodes/ExcludeNode.cs | |||
@@ -26,9 +26,9 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
26 | #region CVS Information | 26 | #region CVS Information |
27 | /* | 27 | /* |
28 | * $Source$ | 28 | * $Source$ |
29 | * $Author: jendave $ | 29 | * $Author: borrillis $ |
30 | * $Date: 2006-01-31 16:35:39 +0100 (ti, 31 jan 2006) $ | 30 | * $Date: 2007-05-25 01:03:16 +0900 (Fri, 25 May 2007) $ |
31 | * $Revision: 74 $ | 31 | * $Revision: 243 $ |
32 | */ | 32 | */ |
33 | #endregion | 33 | #endregion |
34 | 34 | ||
@@ -49,7 +49,7 @@ namespace Prebuild.Core.Nodes | |||
49 | { | 49 | { |
50 | #region Fields | 50 | #region Fields |
51 | 51 | ||
52 | private string m_Name = "unknown"; | 52 | private string m_Pattern = ""; |
53 | 53 | ||
54 | #endregion | 54 | #endregion |
55 | 55 | ||
@@ -63,11 +63,23 @@ namespace Prebuild.Core.Nodes | |||
63 | { | 63 | { |
64 | get | 64 | get |
65 | { | 65 | { |
66 | return m_Name; | 66 | return m_Pattern; |
67 | } | 67 | } |
68 | } | 68 | } |
69 | 69 | ||
70 | #endregion | 70 | /// <summary> |
71 | /// Gets the pattern. | ||
72 | /// </summary> | ||
73 | /// <value>The pattern.</value> | ||
74 | public string Pattern | ||
75 | { | ||
76 | get | ||
77 | { | ||
78 | return m_Pattern; | ||
79 | } | ||
80 | } | ||
81 | |||
82 | #endregion | ||
71 | 83 | ||
72 | #region Public Methods | 84 | #region Public Methods |
73 | 85 | ||
@@ -77,7 +89,8 @@ namespace Prebuild.Core.Nodes | |||
77 | /// <param name="node">The node.</param> | 89 | /// <param name="node">The node.</param> |
78 | public override void Parse(XmlNode node) | 90 | public override void Parse(XmlNode node) |
79 | { | 91 | { |
80 | m_Name = Helper.AttributeValue(node, "name", m_Name); | 92 | m_Pattern = Helper.AttributeValue( node, "name", m_Pattern ); |
93 | m_Pattern = Helper.AttributeValue(node, "pattern", m_Pattern ); | ||
81 | } | 94 | } |
82 | 95 | ||
83 | #endregion | 96 | #endregion |
diff --git a/Prebuild/src/Core/Nodes/FileNode.cs b/Prebuild/src/Core/Nodes/FileNode.cs index ab0a2a3..083dba5 100644 --- a/Prebuild/src/Core/Nodes/FileNode.cs +++ b/Prebuild/src/Core/Nodes/FileNode.cs | |||
@@ -26,9 +26,9 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
26 | #region CVS Information | 26 | #region CVS Information |
27 | /* | 27 | /* |
28 | * $Source$ | 28 | * $Source$ |
29 | * $Author: jendave $ | 29 | * $Author: borrillis $ |
30 | * $Date: 2007-01-08 17:55:40 +0100 (må, 08 jan 2007) $ | 30 | * $Date: 2007-05-25 01:03:16 +0900 (Fri, 25 May 2007) $ |
31 | * $Revision: 197 $ | 31 | * $Revision: 243 $ |
32 | */ | 32 | */ |
33 | #endregion | 33 | #endregion |
34 | 34 | ||
@@ -118,6 +118,8 @@ namespace Prebuild.Core.Nodes | |||
118 | private SubType m_SubType = SubType.Code; | 118 | private SubType m_SubType = SubType.Code; |
119 | private CopyToOutput m_CopyToOutput = CopyToOutput.Never; | 119 | private CopyToOutput m_CopyToOutput = CopyToOutput.Never; |
120 | private bool m_Link = false; | 120 | private bool m_Link = false; |
121 | private string m_LinkPath = string.Empty; | ||
122 | private bool m_PreservePath = false; | ||
121 | 123 | ||
122 | 124 | ||
123 | #endregion | 125 | #endregion |
@@ -173,6 +175,13 @@ namespace Prebuild.Core.Nodes | |||
173 | } | 175 | } |
174 | } | 176 | } |
175 | 177 | ||
178 | public string LinkPath | ||
179 | { | ||
180 | get | ||
181 | { | ||
182 | return this.m_LinkPath; | ||
183 | } | ||
184 | } | ||
176 | /// <summary> | 185 | /// <summary> |
177 | /// | 186 | /// |
178 | /// </summary> | 187 | /// </summary> |
@@ -195,6 +204,19 @@ namespace Prebuild.Core.Nodes | |||
195 | } | 204 | } |
196 | } | 205 | } |
197 | 206 | ||
207 | /// <summary> | ||
208 | /// | ||
209 | /// </summary> | ||
210 | /// <param name="file"></param> | ||
211 | /// <returns></returns> | ||
212 | public bool PreservePath | ||
213 | { | ||
214 | get | ||
215 | { | ||
216 | return m_PreservePath; | ||
217 | } | ||
218 | } | ||
219 | |||
198 | #endregion | 220 | #endregion |
199 | 221 | ||
200 | #region Public Methods | 222 | #region Public Methods |
@@ -211,7 +233,12 @@ namespace Prebuild.Core.Nodes | |||
211 | Helper.AttributeValue(node, "subType", m_SubType.ToString())); | 233 | Helper.AttributeValue(node, "subType", m_SubType.ToString())); |
212 | m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString()); | 234 | m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString()); |
213 | this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString)); | 235 | this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString)); |
236 | if ( this.m_Link == true ) | ||
237 | { | ||
238 | this.m_LinkPath = Helper.AttributeValue( node, "linkPath", string.Empty ); | ||
239 | } | ||
214 | this.m_CopyToOutput = (CopyToOutput) Enum.Parse(typeof(CopyToOutput), Helper.AttributeValue(node, "copyToOutput", this.m_CopyToOutput.ToString())); | 240 | this.m_CopyToOutput = (CopyToOutput) Enum.Parse(typeof(CopyToOutput), Helper.AttributeValue(node, "copyToOutput", this.m_CopyToOutput.ToString())); |
241 | this.m_PreservePath = bool.Parse( Helper.AttributeValue( node, "preservePath", bool.FalseString ) ); | ||
215 | 242 | ||
216 | if( node == null ) | 243 | if( node == null ) |
217 | { | 244 | { |
diff --git a/Prebuild/src/Core/Nodes/FilesNode.cs b/Prebuild/src/Core/Nodes/FilesNode.cs index 05b2255..7c1dd19 100644 --- a/Prebuild/src/Core/Nodes/FilesNode.cs +++ b/Prebuild/src/Core/Nodes/FilesNode.cs | |||
@@ -26,9 +26,9 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
26 | #region CVS Information | 26 | #region CVS Information |
27 | /* | 27 | /* |
28 | * $Source$ | 28 | * $Source$ |
29 | * $Author: jendave $ | 29 | * $Author: borrillis $ |
30 | * $Date: 2006-09-20 09:42:51 +0200 (on, 20 sep 2006) $ | 30 | * $Date: 2007-05-25 01:03:16 +0900 (Fri, 25 May 2007) $ |
31 | * $Revision: 164 $ | 31 | * $Revision: 243 $ |
32 | */ | 32 | */ |
33 | #endregion | 33 | #endregion |
34 | 34 | ||
@@ -56,7 +56,8 @@ namespace Prebuild.Core.Nodes | |||
56 | private Hashtable m_ResourceNames; | 56 | private Hashtable m_ResourceNames; |
57 | private Hashtable m_CopyToOutputs; | 57 | private Hashtable m_CopyToOutputs; |
58 | private Hashtable m_Links; | 58 | private Hashtable m_Links; |
59 | 59 | private Hashtable m_LinkPaths; | |
60 | private Hashtable m_PreservePaths; | ||
60 | 61 | ||
61 | #endregion | 62 | #endregion |
62 | 63 | ||
@@ -73,7 +74,9 @@ namespace Prebuild.Core.Nodes | |||
73 | m_ResourceNames = new Hashtable(); | 74 | m_ResourceNames = new Hashtable(); |
74 | m_CopyToOutputs = new Hashtable(); | 75 | m_CopyToOutputs = new Hashtable(); |
75 | m_Links = new Hashtable(); | 76 | m_Links = new Hashtable(); |
76 | } | 77 | m_LinkPaths = new Hashtable(); |
78 | m_PreservePaths = new Hashtable(); | ||
79 | } | ||
77 | 80 | ||
78 | #endregion | 81 | #endregion |
79 | 82 | ||
@@ -127,6 +130,15 @@ namespace Prebuild.Core.Nodes | |||
127 | return (bool) this.m_Links[file]; | 130 | return (bool) this.m_Links[file]; |
128 | } | 131 | } |
129 | 132 | ||
133 | public string GetLinkPath( string file ) | ||
134 | { | ||
135 | if ( !this.m_LinkPaths.ContainsKey( file ) ) | ||
136 | { | ||
137 | return string.Empty; | ||
138 | } | ||
139 | return (string)this.m_LinkPaths[ file ]; | ||
140 | } | ||
141 | |||
130 | /// <summary> | 142 | /// <summary> |
131 | /// | 143 | /// |
132 | /// </summary> | 144 | /// </summary> |
@@ -157,6 +169,21 @@ namespace Prebuild.Core.Nodes | |||
157 | return (string)m_ResourceNames[file]; | 169 | return (string)m_ResourceNames[file]; |
158 | } | 170 | } |
159 | 171 | ||
172 | /// <summary> | ||
173 | /// | ||
174 | /// </summary> | ||
175 | /// <param name="file"></param> | ||
176 | /// <returns></returns> | ||
177 | public bool GetPreservePath( string file ) | ||
178 | { | ||
179 | if ( !m_PreservePaths.ContainsKey( file ) ) | ||
180 | { | ||
181 | return false; | ||
182 | } | ||
183 | |||
184 | return (bool)m_PreservePaths[ file ]; | ||
185 | } | ||
186 | |||
160 | /// <summary> | 187 | /// <summary> |
161 | /// | 188 | /// |
162 | /// </summary> | 189 | /// </summary> |
@@ -181,8 +208,10 @@ namespace Prebuild.Core.Nodes | |||
181 | m_BuildActions[fileNode.Path] = fileNode.BuildAction; | 208 | m_BuildActions[fileNode.Path] = fileNode.BuildAction; |
182 | m_SubTypes[fileNode.Path] = fileNode.SubType; | 209 | m_SubTypes[fileNode.Path] = fileNode.SubType; |
183 | m_ResourceNames[fileNode.Path] = fileNode.ResourceName; | 210 | m_ResourceNames[fileNode.Path] = fileNode.ResourceName; |
184 | this.m_Links[fileNode.Path] = fileNode.IsLink; | 211 | this.m_PreservePaths[ fileNode.Path ] = fileNode.PreservePath; |
185 | this.m_CopyToOutputs[fileNode.Path] = fileNode.CopyToOutput; | 212 | this.m_Links[ fileNode.Path ] = fileNode.IsLink; |
213 | this.m_LinkPaths[ fileNode.Path ] = fileNode.LinkPath; | ||
214 | this.m_CopyToOutputs[ fileNode.Path ] = fileNode.CopyToOutput; | ||
186 | 215 | ||
187 | } | 216 | } |
188 | } | 217 | } |
@@ -191,14 +220,17 @@ namespace Prebuild.Core.Nodes | |||
191 | { | 220 | { |
192 | foreach(string file in ((MatchNode)dataNode).Files) | 221 | foreach(string file in ((MatchNode)dataNode).Files) |
193 | { | 222 | { |
223 | MatchNode matchNode = (MatchNode)dataNode; | ||
194 | if (!m_Files.Contains(file)) | 224 | if (!m_Files.Contains(file)) |
195 | { | 225 | { |
196 | m_Files.Add(file); | 226 | m_Files.Add(file); |
197 | m_BuildActions[file] = ((MatchNode)dataNode).BuildAction; | 227 | m_BuildActions[ file ] = matchNode.BuildAction; |
198 | m_SubTypes[file] = ((MatchNode)dataNode).SubType; | 228 | m_SubTypes[ file ] = matchNode.SubType; |
199 | m_ResourceNames[file] = ((MatchNode)dataNode).ResourceName; | 229 | m_ResourceNames[ file ] = matchNode.ResourceName; |
200 | this.m_Links[file] = ((MatchNode) dataNode).IsLink; | 230 | this.m_PreservePaths[ file ] = matchNode.PreservePath; |
201 | this.m_CopyToOutputs[file] = ((MatchNode) dataNode).CopyToOutput; | 231 | this.m_Links[ file ] = matchNode.IsLink; |
232 | this.m_LinkPaths[ file ] = matchNode.LinkPath; | ||
233 | this.m_CopyToOutputs[ file ] = matchNode.CopyToOutput; | ||
202 | 234 | ||
203 | } | 235 | } |
204 | } | 236 | } |
diff --git a/Prebuild/src/Core/Nodes/MatchNode.cs b/Prebuild/src/Core/Nodes/MatchNode.cs index 8d7b467..aeaf3c1 100644 --- a/Prebuild/src/Core/Nodes/MatchNode.cs +++ b/Prebuild/src/Core/Nodes/MatchNode.cs | |||
@@ -26,9 +26,9 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
26 | #region CVS Information | 26 | #region CVS Information |
27 | /* | 27 | /* |
28 | * $Source$ | 28 | * $Source$ |
29 | * $Author: jendave $ | 29 | * $Author: borrillis $ |
30 | * $Date: 2006-09-20 09:42:51 +0200 (on, 20 sep 2006) $ | 30 | * $Date: 2007-05-25 01:03:16 +0900 (Fri, 25 May 2007) $ |
31 | * $Revision: 164 $ | 31 | * $Revision: 243 $ |
32 | */ | 32 | */ |
33 | #endregion | 33 | #endregion |
34 | 34 | ||
@@ -41,6 +41,7 @@ using System.Xml; | |||
41 | using Prebuild.Core.Attributes; | 41 | using Prebuild.Core.Attributes; |
42 | using Prebuild.Core.Interfaces; | 42 | using Prebuild.Core.Interfaces; |
43 | using Prebuild.Core.Utilities; | 43 | using Prebuild.Core.Utilities; |
44 | using System.Collections; | ||
44 | 45 | ||
45 | namespace Prebuild.Core.Nodes | 46 | namespace Prebuild.Core.Nodes |
46 | { | 47 | { |
@@ -59,7 +60,9 @@ namespace Prebuild.Core.Nodes | |||
59 | string m_ResourceName = ""; | 60 | string m_ResourceName = ""; |
60 | private CopyToOutput m_CopyToOutput; | 61 | private CopyToOutput m_CopyToOutput; |
61 | private bool m_Link; | 62 | private bool m_Link; |
62 | 63 | private string m_LinkPath; | |
64 | private bool m_PreservePath; | ||
65 | private ArrayList m_Exclusions; | ||
63 | 66 | ||
64 | #endregion | 67 | #endregion |
65 | 68 | ||
@@ -71,6 +74,7 @@ namespace Prebuild.Core.Nodes | |||
71 | public MatchNode() | 74 | public MatchNode() |
72 | { | 75 | { |
73 | m_Files = new StringCollection(); | 76 | m_Files = new StringCollection(); |
77 | m_Exclusions = new ArrayList(); | ||
74 | } | 78 | } |
75 | 79 | ||
76 | #endregion | 80 | #endregion |
@@ -126,6 +130,13 @@ namespace Prebuild.Core.Nodes | |||
126 | } | 130 | } |
127 | } | 131 | } |
128 | 132 | ||
133 | public string LinkPath | ||
134 | { | ||
135 | get | ||
136 | { | ||
137 | return this.m_LinkPath; | ||
138 | } | ||
139 | } | ||
129 | /// <summary> | 140 | /// <summary> |
130 | /// | 141 | /// |
131 | /// </summary> | 142 | /// </summary> |
@@ -137,6 +148,13 @@ namespace Prebuild.Core.Nodes | |||
137 | } | 148 | } |
138 | } | 149 | } |
139 | 150 | ||
151 | public bool PreservePath | ||
152 | { | ||
153 | get | ||
154 | { | ||
155 | return m_PreservePath; | ||
156 | } | ||
157 | } | ||
140 | 158 | ||
141 | #endregion | 159 | #endregion |
142 | 160 | ||
@@ -149,8 +167,10 @@ namespace Prebuild.Core.Nodes | |||
149 | /// <param name="pattern">The pattern.</param> | 167 | /// <param name="pattern">The pattern.</param> |
150 | /// <param name="recurse">if set to <c>true</c> [recurse].</param> | 168 | /// <param name="recurse">if set to <c>true</c> [recurse].</param> |
151 | /// <param name="useRegex">if set to <c>true</c> [use regex].</param> | 169 | /// <param name="useRegex">if set to <c>true</c> [use regex].</param> |
152 | private void RecurseDirectories(string path, string pattern, bool recurse, bool useRegex) | 170 | private void RecurseDirectories(string path, string pattern, bool recurse, bool useRegex, ArrayList exclusions) |
153 | { | 171 | { |
172 | Match match; | ||
173 | Boolean excludeFile; | ||
154 | try | 174 | try |
155 | { | 175 | { |
156 | string[] files; | 176 | string[] files; |
@@ -163,6 +183,7 @@ namespace Prebuild.Core.Nodes | |||
163 | string fileTemp; | 183 | string fileTemp; |
164 | foreach (string file in files) | 184 | foreach (string file in files) |
165 | { | 185 | { |
186 | excludeFile = false; | ||
166 | if (file.Substring(0,2) == "./" || file.Substring(0,2) == ".\\") | 187 | if (file.Substring(0,2) == "./" || file.Substring(0,2) == ".\\") |
167 | { | 188 | { |
168 | fileTemp = file.Substring(2); | 189 | fileTemp = file.Substring(2); |
@@ -171,8 +192,20 @@ namespace Prebuild.Core.Nodes | |||
171 | { | 192 | { |
172 | fileTemp = file; | 193 | fileTemp = file; |
173 | } | 194 | } |
174 | 195 | ||
175 | m_Files.Add(fileTemp); | 196 | // Check all excludions and set flag if there are any hits. |
197 | foreach ( ExcludeNode exclude in exclusions ) | ||
198 | { | ||
199 | Regex exRegEx = new Regex( exclude.Pattern ); | ||
200 | match = exRegEx.Match( file ); | ||
201 | excludeFile |= match.Success; | ||
202 | } | ||
203 | |||
204 | if ( !excludeFile ) | ||
205 | { | ||
206 | m_Files.Add( fileTemp ); | ||
207 | } | ||
208 | |||
176 | } | 209 | } |
177 | } | 210 | } |
178 | else | 211 | else |
@@ -182,14 +215,26 @@ namespace Prebuild.Core.Nodes | |||
182 | } | 215 | } |
183 | else | 216 | else |
184 | { | 217 | { |
185 | Match match; | ||
186 | files = Directory.GetFiles(path); | 218 | files = Directory.GetFiles(path); |
187 | foreach(string file in files) | 219 | foreach(string file in files) |
188 | { | 220 | { |
221 | excludeFile = false; | ||
222 | |||
189 | match = m_Regex.Match(file); | 223 | match = m_Regex.Match(file); |
190 | if(match.Success) | 224 | if(match.Success) |
191 | { | 225 | { |
192 | m_Files.Add(file); | 226 | // Check all excludions and set flag if there are any hits. |
227 | foreach ( ExcludeNode exclude in exclusions ) | ||
228 | { | ||
229 | Regex exRegEx = new Regex( exclude.Pattern ); | ||
230 | match = exRegEx.Match( file ); | ||
231 | excludeFile |= !match.Success; | ||
232 | } | ||
233 | |||
234 | if ( !excludeFile ) | ||
235 | { | ||
236 | m_Files.Add( file ); | ||
237 | } | ||
193 | } | 238 | } |
194 | } | 239 | } |
195 | } | 240 | } |
@@ -201,7 +246,7 @@ namespace Prebuild.Core.Nodes | |||
201 | { | 246 | { |
202 | foreach(string str in dirs) | 247 | foreach(string str in dirs) |
203 | { | 248 | { |
204 | RecurseDirectories(Helper.NormalizePath(str), pattern, recurse, useRegex); | 249 | RecurseDirectories(Helper.NormalizePath(str), pattern, recurse, useRegex, exclusions); |
205 | } | 250 | } |
206 | } | 251 | } |
207 | } | 252 | } |
@@ -241,6 +286,11 @@ namespace Prebuild.Core.Nodes | |||
241 | m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString()); | 286 | m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString()); |
242 | this.m_CopyToOutput = (CopyToOutput) Enum.Parse(typeof(CopyToOutput), Helper.AttributeValue(node, "copyToOutput", this.m_CopyToOutput.ToString())); | 287 | this.m_CopyToOutput = (CopyToOutput) Enum.Parse(typeof(CopyToOutput), Helper.AttributeValue(node, "copyToOutput", this.m_CopyToOutput.ToString())); |
243 | this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString)); | 288 | this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString)); |
289 | if ( this.m_Link == true ) | ||
290 | { | ||
291 | this.m_LinkPath = Helper.AttributeValue( node, "linkPath", string.Empty ); | ||
292 | } | ||
293 | this.m_PreservePath = bool.Parse( Helper.AttributeValue( node, "preservePath", bool.FalseString ) ); | ||
244 | 294 | ||
245 | 295 | ||
246 | if(path != null && path.Length == 0) | 296 | if(path != null && path.Length == 0) |
@@ -272,7 +322,6 @@ namespace Prebuild.Core.Nodes | |||
272 | throw new WarningException("Could not compile regex pattern: {0}", ex.Message); | 322 | throw new WarningException("Could not compile regex pattern: {0}", ex.Message); |
273 | } | 323 | } |
274 | 324 | ||
275 | RecurseDirectories(path, pattern, recurse, useRegex); | ||
276 | 325 | ||
277 | foreach(XmlNode child in node.ChildNodes) | 326 | foreach(XmlNode child in node.ChildNodes) |
278 | { | 327 | { |
@@ -280,13 +329,12 @@ namespace Prebuild.Core.Nodes | |||
280 | if(dataNode is ExcludeNode) | 329 | if(dataNode is ExcludeNode) |
281 | { | 330 | { |
282 | ExcludeNode excludeNode = (ExcludeNode)dataNode; | 331 | ExcludeNode excludeNode = (ExcludeNode)dataNode; |
283 | if (m_Files.Contains(Helper.NormalizePath(excludeNode.Name))) | 332 | m_Exclusions.Add( dataNode ); |
284 | { | ||
285 | m_Files.Remove(Helper.NormalizePath(excludeNode.Name)); | ||
286 | } | ||
287 | } | 333 | } |
288 | } | 334 | } |
289 | 335 | ||
336 | RecurseDirectories( path, pattern, recurse, useRegex, m_Exclusions ); | ||
337 | |||
290 | if(m_Files.Count < 1) | 338 | if(m_Files.Count < 1) |
291 | { | 339 | { |
292 | throw new WarningException("Match returned no files: {0}{1}", Helper.EndPath(path), pattern); | 340 | throw new WarningException("Match returned no files: {0}{1}", Helper.EndPath(path), pattern); |
diff --git a/Prebuild/src/Core/Nodes/OptionsNode.cs b/Prebuild/src/Core/Nodes/OptionsNode.cs index b7a784d..651c339 100644 --- a/Prebuild/src/Core/Nodes/OptionsNode.cs +++ b/Prebuild/src/Core/Nodes/OptionsNode.cs | |||
@@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
27 | /* | 27 | /* |
28 | * $Source$ | 28 | * $Source$ |
29 | * $Author: jendave $ | 29 | * $Author: jendave $ |
30 | * $Date: 2007-01-08 17:55:40 +0100 (må, 08 jan 2007) $ | 30 | * $Date: 2007-01-09 01:55:40 +0900 (Tue, 09 Jan 2007) $ |
31 | * $Revision: 197 $ | 31 | * $Revision: 197 $ |
32 | */ | 32 | */ |
33 | #endregion | 33 | #endregion |
diff --git a/Prebuild/src/Core/Nodes/ProcessNode.cs b/Prebuild/src/Core/Nodes/ProcessNode.cs index 5f3dbe6..2d2162c 100644 --- a/Prebuild/src/Core/Nodes/ProcessNode.cs +++ b/Prebuild/src/Core/Nodes/ProcessNode.cs | |||
@@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
27 | /* | 27 | /* |
28 | * $Source$ | 28 | * $Source$ |
29 | * $Author: jendave $ | 29 | * $Author: jendave $ |
30 | * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $ | 30 | * $Date: 2006-01-28 09:49:58 +0900 (Sat, 28 Jan 2006) $ |
31 | * $Revision: 71 $ | 31 | * $Revision: 71 $ |
32 | */ | 32 | */ |
33 | #endregion | 33 | #endregion |
diff --git a/Prebuild/src/Core/Nodes/ProjectNode.cs b/Prebuild/src/Core/Nodes/ProjectNode.cs index bddaace..e98ab5f 100644 --- a/Prebuild/src/Core/Nodes/ProjectNode.cs +++ b/Prebuild/src/Core/Nodes/ProjectNode.cs | |||
@@ -27,8 +27,8 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
27 | /* | 27 | /* |
28 | * $Source$ | 28 | * $Source$ |
29 | * $Author: jendave $ | 29 | * $Author: jendave $ |
30 | * $Date: 2006-11-11 05:43:20 +0100 (lö, 11 nov 2006) $ | 30 | * $Date: 2007-05-26 06:58:26 +0900 (Sat, 26 May 2007) $ |
31 | * $Revision: 192 $ | 31 | * $Revision: 244 $ |
32 | */ | 32 | */ |
33 | #endregion | 33 | #endregion |
34 | 34 | ||
@@ -44,20 +44,20 @@ using Prebuild.Core.Utilities; | |||
44 | namespace Prebuild.Core.Nodes | 44 | namespace Prebuild.Core.Nodes |
45 | { | 45 | { |
46 | /// <summary> | 46 | /// <summary> |
47 | /// | 47 | /// A set of values that the Project's type can be |
48 | /// </summary> | 48 | /// </summary> |
49 | public enum ProjectType | 49 | public enum ProjectType |
50 | { | 50 | { |
51 | /// <summary> | 51 | /// <summary> |
52 | /// | 52 | /// The project is a console executable |
53 | /// </summary> | 53 | /// </summary> |
54 | Exe, | 54 | Exe, |
55 | /// <summary> | 55 | /// <summary> |
56 | /// | 56 | /// The project is a windows executable |
57 | /// </summary> | 57 | /// </summary> |
58 | WinExe, | 58 | WinExe, |
59 | /// <summary> | 59 | /// <summary> |
60 | /// | 60 | /// The project is a library |
61 | /// </summary> | 61 | /// </summary> |
62 | Library | 62 | Library |
63 | } | 63 | } |
@@ -78,7 +78,7 @@ namespace Prebuild.Core.Nodes | |||
78 | } | 78 | } |
79 | 79 | ||
80 | /// <summary> | 80 | /// <summary> |
81 | /// | 81 | /// The Node object representing /Prebuild/Solution/Project elements |
82 | /// </summary> | 82 | /// </summary> |
83 | [DataNode("Project")] | 83 | [DataNode("Project")] |
84 | public class ProjectNode : DataNode, IComparable | 84 | public class ProjectNode : DataNode, IComparable |
@@ -90,6 +90,7 @@ namespace Prebuild.Core.Nodes | |||
90 | private string m_FullPath = ""; | 90 | private string m_FullPath = ""; |
91 | private string m_AssemblyName; | 91 | private string m_AssemblyName; |
92 | private string m_AppIcon = ""; | 92 | private string m_AppIcon = ""; |
93 | private string m_ConfigFile = ""; | ||
93 | private string m_DesignerFolder = ""; | 94 | private string m_DesignerFolder = ""; |
94 | private string m_Language = "C#"; | 95 | private string m_Language = "C#"; |
95 | private ProjectType m_Type = ProjectType.Exe; | 96 | private ProjectType m_Type = ProjectType.Exe; |
@@ -97,11 +98,13 @@ namespace Prebuild.Core.Nodes | |||
97 | private string m_StartupObject = ""; | 98 | private string m_StartupObject = ""; |
98 | private string m_RootNamespace; | 99 | private string m_RootNamespace; |
99 | private string m_FilterGroups = ""; | 100 | private string m_FilterGroups = ""; |
101 | private string m_Version = ""; | ||
100 | private Guid m_Guid; | 102 | private Guid m_Guid; |
101 | 103 | ||
102 | private Hashtable m_Configurations; | 104 | private Hashtable m_Configurations; |
103 | private ArrayList m_ReferencePaths; | 105 | private ArrayList m_ReferencePaths; |
104 | private ArrayList m_References; | 106 | private ArrayList m_References; |
107 | private ArrayList m_Authors; | ||
105 | private FilesNode m_Files; | 108 | private FilesNode m_Files; |
106 | 109 | ||
107 | #endregion | 110 | #endregion |
@@ -116,6 +119,7 @@ namespace Prebuild.Core.Nodes | |||
116 | m_Configurations = new Hashtable(); | 119 | m_Configurations = new Hashtable(); |
117 | m_ReferencePaths = new ArrayList(); | 120 | m_ReferencePaths = new ArrayList(); |
118 | m_References = new ArrayList(); | 121 | m_References = new ArrayList(); |
122 | m_Authors = new ArrayList(); | ||
119 | } | 123 | } |
120 | 124 | ||
121 | #endregion | 125 | #endregion |
@@ -159,6 +163,18 @@ namespace Prebuild.Core.Nodes | |||
159 | } | 163 | } |
160 | 164 | ||
161 | /// <summary> | 165 | /// <summary> |
166 | /// Gets the project's version | ||
167 | /// </summary> | ||
168 | /// <value>The project's version.</value> | ||
169 | public string Version | ||
170 | { | ||
171 | get | ||
172 | { | ||
173 | return m_Version; | ||
174 | } | ||
175 | } | ||
176 | |||
177 | /// <summary> | ||
162 | /// Gets the full path. | 178 | /// Gets the full path. |
163 | /// </summary> | 179 | /// </summary> |
164 | /// <value>The full path.</value> | 180 | /// <value>The full path.</value> |
@@ -194,6 +210,18 @@ namespace Prebuild.Core.Nodes | |||
194 | } | 210 | } |
195 | } | 211 | } |
196 | 212 | ||
213 | /// <summary> | ||
214 | /// Gets the app icon. | ||
215 | /// </summary> | ||
216 | /// <value>The app icon.</value> | ||
217 | public string ConfigFile | ||
218 | { | ||
219 | get | ||
220 | { | ||
221 | return m_ConfigFile; | ||
222 | } | ||
223 | } | ||
224 | |||
197 | /// <summary> | 225 | /// <summary> |
198 | /// | 226 | /// |
199 | /// </summary> | 227 | /// </summary> |
@@ -290,9 +318,9 @@ namespace Prebuild.Core.Nodes | |||
290 | { | 318 | { |
291 | get | 319 | get |
292 | { | 320 | { |
293 | ArrayList tmp = new ArrayList( ConfigurationsTable.Values); | 321 | ArrayList tmp = new ArrayList(ConfigurationsTable.Values); |
294 | tmp.Sort(); | 322 | tmp.Sort(); |
295 | return tmp; | 323 | return tmp; |
296 | } | 324 | } |
297 | } | 325 | } |
298 | 326 | ||
@@ -319,7 +347,7 @@ namespace Prebuild.Core.Nodes | |||
319 | ArrayList tmp = new ArrayList(m_ReferencePaths); | 347 | ArrayList tmp = new ArrayList(m_ReferencePaths); |
320 | tmp.Sort(); | 348 | tmp.Sort(); |
321 | return tmp; | 349 | return tmp; |
322 | } | 350 | } |
323 | } | 351 | } |
324 | 352 | ||
325 | /// <summary> | 353 | /// <summary> |
@@ -335,6 +363,18 @@ namespace Prebuild.Core.Nodes | |||
335 | return tmp; | 363 | return tmp; |
336 | } | 364 | } |
337 | } | 365 | } |
366 | |||
367 | /// <summary> | ||
368 | /// Gets the Authors list. | ||
369 | /// </summary> | ||
370 | /// <value>The list of the project's authors.</value> | ||
371 | public ArrayList Authors | ||
372 | { | ||
373 | get | ||
374 | { | ||
375 | return m_Authors; | ||
376 | } | ||
377 | } | ||
338 | 378 | ||
339 | /// <summary> | 379 | /// <summary> |
340 | /// Gets the files. | 380 | /// Gets the files. |
@@ -422,7 +462,9 @@ namespace Prebuild.Core.Nodes | |||
422 | m_Name = Helper.AttributeValue(node, "name", m_Name); | 462 | m_Name = Helper.AttributeValue(node, "name", m_Name); |
423 | m_Path = Helper.AttributeValue(node, "path", m_Path); | 463 | m_Path = Helper.AttributeValue(node, "path", m_Path); |
424 | m_FilterGroups = Helper.AttributeValue(node, "filterGroups", m_FilterGroups); | 464 | m_FilterGroups = Helper.AttributeValue(node, "filterGroups", m_FilterGroups); |
465 | m_Version = Helper.AttributeValue(node, "version", m_Version); | ||
425 | m_AppIcon = Helper.AttributeValue(node, "icon", m_AppIcon); | 466 | m_AppIcon = Helper.AttributeValue(node, "icon", m_AppIcon); |
467 | m_ConfigFile = Helper.AttributeValue(node, "configFile", m_ConfigFile); | ||
426 | m_DesignerFolder = Helper.AttributeValue(node, "designerFolder", m_DesignerFolder); | 468 | m_DesignerFolder = Helper.AttributeValue(node, "designerFolder", m_DesignerFolder); |
427 | m_AssemblyName = Helper.AttributeValue(node, "assemblyName", m_AssemblyName); | 469 | m_AssemblyName = Helper.AttributeValue(node, "assemblyName", m_AssemblyName); |
428 | m_Language = Helper.AttributeValue(node, "language", m_Language); | 470 | m_Language = Helper.AttributeValue(node, "language", m_Language); |
@@ -430,13 +472,11 @@ namespace Prebuild.Core.Nodes | |||
430 | m_Runtime = (ClrRuntime)Helper.EnumAttributeValue(node, "runtime", typeof(ClrRuntime), m_Runtime); | 472 | m_Runtime = (ClrRuntime)Helper.EnumAttributeValue(node, "runtime", typeof(ClrRuntime), m_Runtime); |
431 | m_StartupObject = Helper.AttributeValue(node, "startupObject", m_StartupObject); | 473 | m_StartupObject = Helper.AttributeValue(node, "startupObject", m_StartupObject); |
432 | m_RootNamespace = Helper.AttributeValue(node, "rootNamespace", m_RootNamespace); | 474 | m_RootNamespace = Helper.AttributeValue(node, "rootNamespace", m_RootNamespace); |
433 | 475 | m_GenerateAssemblyInfoFile = Helper.ParseBoolean(node, "generateAssemblyInfoFile", false); | |
476 | |||
434 | int hash = m_Name.GetHashCode(); | 477 | int hash = m_Name.GetHashCode(); |
478 | m_Guid = new Guid(hash, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); | ||
435 | 479 | ||
436 | m_Guid = new Guid( hash, 0, 0, 0, 0, 0, 0,0,0,0,0 ); | ||
437 | |||
438 | m_GenerateAssemblyInfoFile = Helper.ParseBoolean(node, "generateAssemblyInfoFile", false); | ||
439 | |||
440 | if(m_AssemblyName == null || m_AssemblyName.Length < 1) | 480 | if(m_AssemblyName == null || m_AssemblyName.Length < 1) |
441 | { | 481 | { |
442 | m_AssemblyName = m_Name; | 482 | m_AssemblyName = m_Name; |
@@ -482,6 +522,10 @@ namespace Prebuild.Core.Nodes | |||
482 | { | 522 | { |
483 | m_References.Add(dataNode); | 523 | m_References.Add(dataNode); |
484 | } | 524 | } |
525 | else if(dataNode is AuthorNode) | ||
526 | { | ||
527 | m_Authors.Add(dataNode); | ||
528 | } | ||
485 | else if(dataNode is FilesNode) | 529 | else if(dataNode is FilesNode) |
486 | { | 530 | { |
487 | m_Files = (FilesNode)dataNode; | 531 | m_Files = (FilesNode)dataNode; |
@@ -494,7 +538,6 @@ namespace Prebuild.Core.Nodes | |||
494 | } | 538 | } |
495 | } | 539 | } |
496 | 540 | ||
497 | |||
498 | #endregion | 541 | #endregion |
499 | 542 | ||
500 | #region IComparable Members | 543 | #region IComparable Members |
@@ -506,5 +549,5 @@ namespace Prebuild.Core.Nodes | |||
506 | } | 549 | } |
507 | 550 | ||
508 | #endregion | 551 | #endregion |
509 | } | 552 | } |
510 | } | 553 | } |
diff --git a/Prebuild/src/Core/Nodes/ReferenceNode.cs b/Prebuild/src/Core/Nodes/ReferenceNode.cs index 4b8262e..df0c2e4 100644 --- a/Prebuild/src/Core/Nodes/ReferenceNode.cs +++ b/Prebuild/src/Core/Nodes/ReferenceNode.cs | |||
@@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
27 | /* | 27 | /* |
28 | * $Source$ | 28 | * $Source$ |
29 | * $Author: jendave $ | 29 | * $Author: jendave $ |
30 | * $Date: 2006-07-25 18:56:49 +0200 (ti, 25 jul 2006) $ | 30 | * $Date: 2006-07-26 01:56:49 +0900 (Wed, 26 Jul 2006) $ |
31 | * $Revision: 132 $ | 31 | * $Revision: 132 $ |
32 | */ | 32 | */ |
33 | #endregion | 33 | #endregion |
@@ -149,5 +149,5 @@ namespace Prebuild.Core.Nodes | |||
149 | } | 149 | } |
150 | 150 | ||
151 | #endregion | 151 | #endregion |
152 | } | 152 | } |
153 | } | 153 | } |
diff --git a/Prebuild/src/Core/Nodes/ReferencePathNode.cs b/Prebuild/src/Core/Nodes/ReferencePathNode.cs index 4c981e7..d4042ef 100644 --- a/Prebuild/src/Core/Nodes/ReferencePathNode.cs +++ b/Prebuild/src/Core/Nodes/ReferencePathNode.cs | |||
@@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
27 | /* | 27 | /* |
28 | * $Source$ | 28 | * $Source$ |
29 | * $Author: jendave $ | 29 | * $Author: jendave $ |
30 | * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $ | 30 | * $Date: 2006-01-28 09:49:58 +0900 (Sat, 28 Jan 2006) $ |
31 | * $Revision: 71 $ | 31 | * $Revision: 71 $ |
32 | */ | 32 | */ |
33 | #endregion | 33 | #endregion |
@@ -104,5 +104,5 @@ namespace Prebuild.Core.Nodes | |||
104 | } | 104 | } |
105 | 105 | ||
106 | #endregion | 106 | #endregion |
107 | } | 107 | } |
108 | } | 108 | } |
diff --git a/Prebuild/src/Core/Nodes/SolutionNode.cs b/Prebuild/src/Core/Nodes/SolutionNode.cs index 3ea53a4..9473fe6 100644 --- a/Prebuild/src/Core/Nodes/SolutionNode.cs +++ b/Prebuild/src/Core/Nodes/SolutionNode.cs | |||
@@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
27 | /* | 27 | /* |
28 | * $Source$ | 28 | * $Source$ |
29 | * $Author: jendave $ | 29 | * $Author: jendave $ |
30 | * $Date: 2006-02-28 17:15:42 +0100 (ti, 28 feb 2006) $ | 30 | * $Date: 2006-03-01 01:15:42 +0900 (Wed, 01 Mar 2006) $ |
31 | * $Revision: 92 $ | 31 | * $Revision: 92 $ |
32 | */ | 32 | */ |
33 | #endregion | 33 | #endregion |
@@ -53,11 +53,11 @@ namespace Prebuild.Core.Nodes | |||
53 | #region Fields | 53 | #region Fields |
54 | 54 | ||
55 | private string m_Name = "unknown"; | 55 | private string m_Name = "unknown"; |
56 | private string m_Version = "1.0.0"; | ||
57 | private string m_Path = ""; | 56 | private string m_Path = ""; |
58 | private string m_FullPath = ""; | 57 | private string m_FullPath = ""; |
59 | private string m_ActiveConfig = "Debug"; | 58 | private string m_ActiveConfig = "Debug"; |
60 | 59 | private string m_Version = "1.0.0"; | |
60 | |||
61 | private OptionsNode m_Options; | 61 | private OptionsNode m_Options; |
62 | private FilesNode m_Files; | 62 | private FilesNode m_Files; |
63 | private Hashtable m_Configurations; | 63 | private Hashtable m_Configurations; |
@@ -111,18 +111,6 @@ namespace Prebuild.Core.Nodes | |||
111 | } | 111 | } |
112 | 112 | ||
113 | /// <summary> | 113 | /// <summary> |
114 | /// Gets the version. | ||
115 | /// </summary> | ||
116 | /// <value>The version.</value> | ||
117 | public string Version | ||
118 | { | ||
119 | get | ||
120 | { | ||
121 | return m_Version; | ||
122 | } | ||
123 | } | ||
124 | |||
125 | /// <summary> | ||
126 | /// Gets the path. | 114 | /// Gets the path. |
127 | /// </summary> | 115 | /// </summary> |
128 | /// <value>The path.</value> | 116 | /// <value>The path.</value> |
@@ -147,6 +135,18 @@ namespace Prebuild.Core.Nodes | |||
147 | } | 135 | } |
148 | 136 | ||
149 | /// <summary> | 137 | /// <summary> |
138 | /// Gets the version. | ||
139 | /// </summary> | ||
140 | /// <value>The version.</value> | ||
141 | public string Version | ||
142 | { | ||
143 | get | ||
144 | { | ||
145 | return m_Version; | ||
146 | } | ||
147 | } | ||
148 | |||
149 | /// <summary> | ||
150 | /// Gets the options. | 150 | /// Gets the options. |
151 | /// </summary> | 151 | /// </summary> |
152 | /// <value>The options.</value> | 152 | /// <value>The options.</value> |
@@ -181,7 +181,7 @@ namespace Prebuild.Core.Nodes | |||
181 | ArrayList tmp = new ArrayList(ConfigurationsTable.Values); | 181 | ArrayList tmp = new ArrayList(ConfigurationsTable.Values); |
182 | tmp.Sort(); | 182 | tmp.Sort(); |
183 | return tmp; | 183 | return tmp; |
184 | } | 184 | } |
185 | } | 185 | } |
186 | 186 | ||
187 | /// <summary> | 187 | /// <summary> |
@@ -245,9 +245,9 @@ namespace Prebuild.Core.Nodes | |||
245 | public override void Parse(XmlNode node) | 245 | public override void Parse(XmlNode node) |
246 | { | 246 | { |
247 | m_Name = Helper.AttributeValue(node, "name", m_Name); | 247 | m_Name = Helper.AttributeValue(node, "name", m_Name); |
248 | m_Version = Helper.AttributeValue(node, "version", m_Version); | ||
249 | m_ActiveConfig = Helper.AttributeValue(node, "activeConfig", m_ActiveConfig); | 248 | m_ActiveConfig = Helper.AttributeValue(node, "activeConfig", m_ActiveConfig); |
250 | m_Path = Helper.AttributeValue(node, "path", m_Path); | 249 | m_Path = Helper.AttributeValue(node, "path", m_Path); |
250 | m_Version = Helper.AttributeValue(node, "version", m_Version); | ||
251 | 251 | ||
252 | m_FullPath = m_Path; | 252 | m_FullPath = m_Path; |
253 | try | 253 | try |