diff options
author | lbsa71 | 2009-02-19 14:54:21 +0000 |
---|---|---|
committer | lbsa71 | 2009-02-19 14:54:21 +0000 |
commit | 549c615e0e7fbc4fa284de533db673e7e2fd665b (patch) | |
tree | eb1b42f9ea8c581219a4f0743ea4e92d253037ee /Prebuild/src/Core/Nodes | |
parent | * Changed all AssemblyInfo to explicit version 1.0.0.0 to not confuse poor po... (diff) | |
download | opensim-SC_OLD-549c615e0e7fbc4fa284de533db673e7e2fd665b.zip opensim-SC_OLD-549c615e0e7fbc4fa284de533db673e7e2fd665b.tar.gz opensim-SC_OLD-549c615e0e7fbc4fa284de533db673e7e2fd665b.tar.bz2 opensim-SC_OLD-549c615e0e7fbc4fa284de533db673e7e2fd665b.tar.xz |
* reverted the revert of the revert. What can I say? I'm calling this a day, and will get back up on the horse tomorrow.
Diffstat (limited to '')
-rw-r--r-- | Prebuild/src/Core/Nodes/AuthorNode.cs | 9 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/ConfigurationNode.cs | 9 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/DataNode.cs | 59 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/DatabaseProjectNode.cs | 94 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/DatabaseReferenceNode.cs | 63 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/DescriptionNode.cs | 9 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/ExcludeNode.cs | 9 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/FileNode.cs | 42 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/FilesNode.cs | 14 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/MatchNode.cs | 51 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/OptionsNode.cs | 11 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/ProcessNode.cs | 9 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/ProjectNode.cs | 169 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/ReferenceNode.cs | 9 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/ReferencePathNode.cs | 9 | ||||
-rw-r--r-- | Prebuild/src/Core/Nodes/SolutionNode.cs | 120 |
16 files changed, 254 insertions, 432 deletions
diff --git a/Prebuild/src/Core/Nodes/AuthorNode.cs b/Prebuild/src/Core/Nodes/AuthorNode.cs index 20e72c0..03ea934 100644 --- a/Prebuild/src/Core/Nodes/AuthorNode.cs +++ b/Prebuild/src/Core/Nodes/AuthorNode.cs | |||
@@ -23,6 +23,15 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
23 | */ | 23 | */ |
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | #region CVS Information | ||
27 | /* | ||
28 | * $Source $ | ||
29 | * $Author: $ | ||
30 | * $Date: $ | ||
31 | * $Revision: $ | ||
32 | */ | ||
33 | #endregion | ||
34 | |||
26 | using System; | 35 | using System; |
27 | using System.Collections; | 36 | using System.Collections; |
28 | using System.Collections.Specialized; | 37 | using System.Collections.Specialized; |
diff --git a/Prebuild/src/Core/Nodes/ConfigurationNode.cs b/Prebuild/src/Core/Nodes/ConfigurationNode.cs index 67d78d5..828bff6 100644 --- a/Prebuild/src/Core/Nodes/ConfigurationNode.cs +++ b/Prebuild/src/Core/Nodes/ConfigurationNode.cs | |||
@@ -23,6 +23,15 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
23 | */ | 23 | */ |
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | #region CVS Information | ||
27 | /* | ||
28 | * $Source$ | ||
29 | * $Author: jendave $ | ||
30 | * $Date: 2006-01-28 09:49:58 +0900 (Sat, 28 Jan 2006) $ | ||
31 | * $Revision: 71 $ | ||
32 | */ | ||
33 | #endregion | ||
34 | |||
26 | using System; | 35 | using System; |
27 | using System.Xml; | 36 | using System.Xml; |
28 | 37 | ||
diff --git a/Prebuild/src/Core/Nodes/DataNode.cs b/Prebuild/src/Core/Nodes/DataNode.cs index 763e6c3..60ed122 100644 --- a/Prebuild/src/Core/Nodes/DataNode.cs +++ b/Prebuild/src/Core/Nodes/DataNode.cs | |||
@@ -23,24 +23,31 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
23 | */ | 23 | */ |
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | #region CVS Information | ||
27 | /* | ||
28 | * $Source$ | ||
29 | * $Author: jendave $ | ||
30 | * $Date: 2006-01-28 09:49:58 +0900 (Sat, 28 Jan 2006) $ | ||
31 | * $Revision: 71 $ | ||
32 | */ | ||
33 | #endregion | ||
34 | |||
26 | using System; | 35 | using System; |
27 | using System.Xml; | 36 | using System.Xml; |
28 | 37 | ||
29 | using Prebuild.Core.Attributes; | 38 | using Prebuild.Core.Attributes; |
30 | using Prebuild.Core.Interfaces; | 39 | using Prebuild.Core.Interfaces; |
31 | using System.IO; | ||
32 | 40 | ||
33 | namespace Prebuild.Core.Nodes | 41 | namespace Prebuild.Core.Nodes |
34 | { | 42 | { |
35 | /// <summary> | 43 | /// <summary> |
36 | /// | 44 | /// |
37 | /// </summary> | 45 | /// </summary> |
38 | public abstract class DataNode : IDataNode | 46 | public class DataNode : IDataNode |
39 | { | 47 | { |
40 | #region Fields | 48 | #region Fields |
41 | 49 | ||
42 | private IDataNode parent; | 50 | private IDataNode parent; |
43 | string[] m_WebTypes = new string[] { "aspx", "ascx", "master", "ashx", "asmx" }; | ||
44 | 51 | ||
45 | #endregion | 52 | #endregion |
46 | 53 | ||
@@ -61,10 +68,7 @@ namespace Prebuild.Core.Nodes | |||
61 | parent = value; | 68 | parent = value; |
62 | } | 69 | } |
63 | } | 70 | } |
64 | public string[] WebTypes | 71 | |
65 | { | ||
66 | get { return m_WebTypes; } | ||
67 | } | ||
68 | /// <summary> | 72 | /// <summary> |
69 | /// Parses the specified node. | 73 | /// Parses the specified node. |
70 | /// </summary> | 74 | /// </summary> |
@@ -72,46 +76,7 @@ namespace Prebuild.Core.Nodes | |||
72 | public virtual void Parse(XmlNode node) | 76 | public virtual void Parse(XmlNode node) |
73 | { | 77 | { |
74 | } | 78 | } |
75 | public BuildAction GetBuildActionByFileName(string fileName) | 79 | |
76 | { | ||
77 | string extension = Path.GetExtension(fileName).ToLower(); | ||
78 | foreach (string type in WebTypes) | ||
79 | { | ||
80 | if (extension == type) | ||
81 | return BuildAction.Content; | ||
82 | } | ||
83 | return BuildAction.Compile; | ||
84 | } | ||
85 | /// <summary> | ||
86 | /// Parses the file type to figure out what type it is | ||
87 | /// </summary> | ||
88 | /// <returns></returns> | ||
89 | public SubType GetSubTypeByFileName(string fileName) | ||
90 | { | ||
91 | string extension = System.IO.Path.GetExtension(fileName).ToLower(); | ||
92 | string designer = String.Format(".designer{0}", extension); | ||
93 | string path = fileName.ToLower(); | ||
94 | if (extension == ".resx") | ||
95 | { | ||
96 | return SubType.Designer; | ||
97 | } | ||
98 | else if (path.EndsWith(".settings")) | ||
99 | { | ||
100 | return SubType.Settings; | ||
101 | } | ||
102 | else | ||
103 | { | ||
104 | |||
105 | foreach (string type in WebTypes) | ||
106 | { | ||
107 | if (path.EndsWith(string.Format("{0}{1}", type, extension))) | ||
108 | { | ||
109 | return SubType.CodeBehind; | ||
110 | } | ||
111 | } | ||
112 | } | ||
113 | return SubType.Code; | ||
114 | } | ||
115 | #endregion | 80 | #endregion |
116 | } | 81 | } |
117 | } | 82 | } |
diff --git a/Prebuild/src/Core/Nodes/DatabaseProjectNode.cs b/Prebuild/src/Core/Nodes/DatabaseProjectNode.cs deleted file mode 100644 index 8696a79..0000000 --- a/Prebuild/src/Core/Nodes/DatabaseProjectNode.cs +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | using System; | ||
2 | using System.Collections; | ||
3 | using System.Collections.Generic; | ||
4 | using System.Text; | ||
5 | using System.Xml; | ||
6 | |||
7 | using Prebuild.Core.Attributes; | ||
8 | using Prebuild.Core.Interfaces; | ||
9 | using Prebuild.Core.Utilities; | ||
10 | |||
11 | namespace Prebuild.Core.Nodes | ||
12 | { | ||
13 | [DataNode("DatabaseProject")] | ||
14 | public class DatabaseProjectNode : DataNode | ||
15 | { | ||
16 | string name; | ||
17 | string path; | ||
18 | string fullpath; | ||
19 | Guid guid = Guid.NewGuid(); | ||
20 | readonly List<AuthorNode> authors = new List<AuthorNode>(); | ||
21 | readonly List<DatabaseReferenceNode> references = new List<DatabaseReferenceNode>(); | ||
22 | |||
23 | public Guid Guid | ||
24 | { | ||
25 | get { return guid; } | ||
26 | } | ||
27 | |||
28 | public string Name | ||
29 | { | ||
30 | get { return name; } | ||
31 | } | ||
32 | |||
33 | public string Path | ||
34 | { | ||
35 | get { return path; } | ||
36 | } | ||
37 | |||
38 | public string FullPath | ||
39 | { | ||
40 | get { return fullpath; } | ||
41 | } | ||
42 | |||
43 | public IEnumerable<DatabaseReferenceNode> References | ||
44 | { | ||
45 | get { return references; } | ||
46 | } | ||
47 | |||
48 | public override void Parse(XmlNode node) | ||
49 | { | ||
50 | name = Helper.AttributeValue(node, "name", name); | ||
51 | path = Helper.AttributeValue(node, "path", name); | ||
52 | |||
53 | try | ||
54 | { | ||
55 | fullpath = Helper.ResolvePath(path); | ||
56 | } | ||
57 | catch | ||
58 | { | ||
59 | throw new WarningException("Could not resolve Solution path: {0}", path); | ||
60 | } | ||
61 | |||
62 | Kernel.Instance.CurrentWorkingDirectory.Push(); | ||
63 | |||
64 | try | ||
65 | { | ||
66 | Helper.SetCurrentDir(fullpath); | ||
67 | |||
68 | if (node == null) | ||
69 | { | ||
70 | throw new ArgumentNullException("node"); | ||
71 | } | ||
72 | |||
73 | foreach (XmlNode child in node.ChildNodes) | ||
74 | { | ||
75 | IDataNode dataNode = Kernel.Instance.ParseNode(child, this); | ||
76 | |||
77 | if (dataNode == null) | ||
78 | continue; | ||
79 | |||
80 | if (dataNode is AuthorNode) | ||
81 | authors.Add((AuthorNode)dataNode); | ||
82 | else if (dataNode is DatabaseReferenceNode) | ||
83 | references.Add((DatabaseReferenceNode)dataNode); | ||
84 | } | ||
85 | } | ||
86 | finally | ||
87 | { | ||
88 | Kernel.Instance.CurrentWorkingDirectory.Pop(); | ||
89 | } | ||
90 | |||
91 | base.Parse(node); | ||
92 | } | ||
93 | } | ||
94 | } | ||
diff --git a/Prebuild/src/Core/Nodes/DatabaseReferenceNode.cs b/Prebuild/src/Core/Nodes/DatabaseReferenceNode.cs deleted file mode 100644 index 97c3964..0000000 --- a/Prebuild/src/Core/Nodes/DatabaseReferenceNode.cs +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | using System; | ||
2 | using Prebuild.Core.Attributes; | ||
3 | using Prebuild.Core.Utilities; | ||
4 | |||
5 | namespace Prebuild.Core.Nodes | ||
6 | { | ||
7 | [DataNode("DatabaseReference")] | ||
8 | public class DatabaseReferenceNode : DataNode | ||
9 | { | ||
10 | string name; | ||
11 | Guid providerId; | ||
12 | string connectionString; | ||
13 | |||
14 | public string Name | ||
15 | { | ||
16 | get { return name; } | ||
17 | } | ||
18 | |||
19 | public Guid ProviderId | ||
20 | { | ||
21 | get { return providerId; } | ||
22 | } | ||
23 | |||
24 | public string ConnectionString | ||
25 | { | ||
26 | get { return connectionString; } | ||
27 | } | ||
28 | |||
29 | public override void Parse(System.Xml.XmlNode node) | ||
30 | { | ||
31 | name = Helper.AttributeValue(node, "name", name); | ||
32 | |||
33 | string providerName = Helper.AttributeValue(node, "providerName", string.Empty); | ||
34 | if (providerName != null) | ||
35 | { | ||
36 | switch (providerName) | ||
37 | { | ||
38 | // digitaljeebus: pulled from HKLM\SOFTWARE\Microsoft\VisualStudio\9.0\DataProviders\* | ||
39 | // Not sure if these will help other operating systems, or if there's a better way. | ||
40 | case "Microsoft.SqlServerCe.Client.3.5": | ||
41 | providerId = new Guid("7C602B5B-ACCB-4acd-9DC0-CA66388C1533"); break; | ||
42 | case "System.Data.OleDb": | ||
43 | providerId = new Guid("7F041D59-D76A-44ed-9AA2-FBF6B0548B80"); break; | ||
44 | case "System.Data.OracleClient": | ||
45 | providerId = new Guid("8F5C5018-AE09-42cf-B2CC-2CCCC7CFC2BB"); break; | ||
46 | case "System.Data.SqlClient": | ||
47 | providerId = new Guid("91510608-8809-4020-8897-FBA057E22D54"); break; | ||
48 | case "System.Data.Odbc": | ||
49 | providerId = new Guid("C3D4F4CE-2C48-4381-B4D6-34FA50C51C86"); break; | ||
50 | |||
51 | default: | ||
52 | throw new ArgumentOutOfRangeException("providerName", providerName, "Could not provider name to an id."); | ||
53 | } | ||
54 | } | ||
55 | else | ||
56 | providerId = new Guid(Helper.AttributeValue(node, "providerId", Guid.Empty.ToString("B"))); | ||
57 | |||
58 | connectionString = Helper.AttributeValue(node, "connectionString", connectionString); | ||
59 | |||
60 | base.Parse(node); | ||
61 | } | ||
62 | } | ||
63 | } | ||
diff --git a/Prebuild/src/Core/Nodes/DescriptionNode.cs b/Prebuild/src/Core/Nodes/DescriptionNode.cs index 353a5ae..cff7afc 100644 --- a/Prebuild/src/Core/Nodes/DescriptionNode.cs +++ b/Prebuild/src/Core/Nodes/DescriptionNode.cs | |||
@@ -23,6 +23,15 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
23 | */ | 23 | */ |
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | #region CVS Information | ||
27 | /* | ||
28 | * $Source $ | ||
29 | * $Author: $ | ||
30 | * $Date: $ | ||
31 | * $Revision: $ | ||
32 | */ | ||
33 | #endregion | ||
34 | |||
26 | using System; | 35 | using System; |
27 | using System.Collections; | 36 | using System.Collections; |
28 | using System.Collections.Specialized; | 37 | using System.Collections.Specialized; |
diff --git a/Prebuild/src/Core/Nodes/ExcludeNode.cs b/Prebuild/src/Core/Nodes/ExcludeNode.cs index 7f04cba..afc869d 100644 --- a/Prebuild/src/Core/Nodes/ExcludeNode.cs +++ b/Prebuild/src/Core/Nodes/ExcludeNode.cs | |||
@@ -23,6 +23,15 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
23 | */ | 23 | */ |
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | #region CVS Information | ||
27 | /* | ||
28 | * $Source$ | ||
29 | * $Author: borrillis $ | ||
30 | * $Date: 2007-05-25 01:03:16 +0900 (Fri, 25 May 2007) $ | ||
31 | * $Revision: 243 $ | ||
32 | */ | ||
33 | #endregion | ||
34 | |||
26 | using System; | 35 | using System; |
27 | using System.Xml; | 36 | using System.Xml; |
28 | 37 | ||
diff --git a/Prebuild/src/Core/Nodes/FileNode.cs b/Prebuild/src/Core/Nodes/FileNode.cs index 1520fcb..083dba5 100644 --- a/Prebuild/src/Core/Nodes/FileNode.cs +++ b/Prebuild/src/Core/Nodes/FileNode.cs | |||
@@ -23,6 +23,15 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
23 | */ | 23 | */ |
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | #region CVS Information | ||
27 | /* | ||
28 | * $Source$ | ||
29 | * $Author: borrillis $ | ||
30 | * $Date: 2007-05-25 01:03:16 +0900 (Fri, 25 May 2007) $ | ||
31 | * $Revision: 243 $ | ||
32 | */ | ||
33 | #endregion | ||
34 | |||
26 | using System; | 35 | using System; |
27 | using System.IO; | 36 | using System.IO; |
28 | using System.Xml; | 37 | using System.Xml; |
@@ -30,7 +39,6 @@ using System.Xml; | |||
30 | using Prebuild.Core.Attributes; | 39 | using Prebuild.Core.Attributes; |
31 | using Prebuild.Core.Interfaces; | 40 | using Prebuild.Core.Interfaces; |
32 | using Prebuild.Core.Utilities; | 41 | using Prebuild.Core.Utilities; |
33 | using Prebuild.Core.Targets; | ||
34 | 42 | ||
35 | namespace Prebuild.Core.Nodes | 43 | namespace Prebuild.Core.Nodes |
36 | { | 44 | { |
@@ -85,11 +93,7 @@ namespace Prebuild.Core.Nodes | |||
85 | /// <summary> | 93 | /// <summary> |
86 | /// | 94 | /// |
87 | /// </summary> | 95 | /// </summary> |
88 | UserControl, | 96 | UserControl |
89 | /// <summary> | ||
90 | /// | ||
91 | /// </summary> | ||
92 | CodeBehind, | ||
93 | } | 97 | } |
94 | 98 | ||
95 | public enum CopyToOutput | 99 | public enum CopyToOutput |
@@ -109,9 +113,9 @@ namespace Prebuild.Core.Nodes | |||
109 | 113 | ||
110 | private string m_Path; | 114 | private string m_Path; |
111 | private string m_ResourceName = ""; | 115 | private string m_ResourceName = ""; |
112 | private BuildAction? m_BuildAction; | 116 | private BuildAction m_BuildAction = BuildAction.Compile; |
113 | private bool m_Valid; | 117 | private bool m_Valid; |
114 | private SubType? m_SubType; | 118 | private SubType m_SubType = SubType.Code; |
115 | private CopyToOutput m_CopyToOutput = CopyToOutput.Never; | 119 | private CopyToOutput m_CopyToOutput = CopyToOutput.Never; |
116 | private bool m_Link = false; | 120 | private bool m_Link = false; |
117 | private string m_LinkPath = string.Empty; | 121 | private string m_LinkPath = string.Empty; |
@@ -151,11 +155,7 @@ namespace Prebuild.Core.Nodes | |||
151 | { | 155 | { |
152 | get | 156 | get |
153 | { | 157 | { |
154 | if (m_BuildAction != null) | 158 | return m_BuildAction; |
155 | return m_BuildAction.Value; | ||
156 | else | ||
157 | return GetBuildActionByFileName(this.Path); | ||
158 | |||
159 | } | 159 | } |
160 | } | 160 | } |
161 | 161 | ||
@@ -189,10 +189,7 @@ namespace Prebuild.Core.Nodes | |||
189 | { | 189 | { |
190 | get | 190 | get |
191 | { | 191 | { |
192 | if (m_SubType != null) | 192 | return m_SubType; |
193 | return m_SubType.Value; | ||
194 | else | ||
195 | return GetSubTypeByFileName(this.Path); | ||
196 | } | 193 | } |
197 | } | 194 | } |
198 | 195 | ||
@@ -230,13 +227,10 @@ namespace Prebuild.Core.Nodes | |||
230 | /// <param name="node"></param> | 227 | /// <param name="node"></param> |
231 | public override void Parse(XmlNode node) | 228 | public override void Parse(XmlNode node) |
232 | { | 229 | { |
233 | string buildAction = Helper.AttributeValue(node, "buildAction", String.Empty); | 230 | m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction), |
234 | if (buildAction != string.Empty) | 231 | Helper.AttributeValue(node, "buildAction", m_BuildAction.ToString())); |
235 | m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction), buildAction); | 232 | m_SubType = (SubType)Enum.Parse(typeof(SubType), |
236 | string subType = Helper.AttributeValue(node, "subType", string.Empty); | 233 | Helper.AttributeValue(node, "subType", m_SubType.ToString())); |
237 | if (subType != String.Empty) | ||
238 | m_SubType = (SubType)Enum.Parse(typeof(SubType), subType); | ||
239 | |||
240 | m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString()); | 234 | m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString()); |
241 | this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString)); | 235 | this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString)); |
242 | if ( this.m_Link == true ) | 236 | if ( this.m_Link == true ) |
diff --git a/Prebuild/src/Core/Nodes/FilesNode.cs b/Prebuild/src/Core/Nodes/FilesNode.cs index dc306c2..7c1dd19 100644 --- a/Prebuild/src/Core/Nodes/FilesNode.cs +++ b/Prebuild/src/Core/Nodes/FilesNode.cs | |||
@@ -23,6 +23,15 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
23 | */ | 23 | */ |
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | #region CVS Information | ||
27 | /* | ||
28 | * $Source$ | ||
29 | * $Author: borrillis $ | ||
30 | * $Date: 2007-05-25 01:03:16 +0900 (Fri, 25 May 2007) $ | ||
31 | * $Revision: 243 $ | ||
32 | */ | ||
33 | #endregion | ||
34 | |||
26 | using System; | 35 | using System; |
27 | using System.Collections; | 36 | using System.Collections; |
28 | using System.Collections.Specialized; | 37 | using System.Collections.Specialized; |
@@ -30,7 +39,6 @@ using System.Xml; | |||
30 | 39 | ||
31 | using Prebuild.Core.Attributes; | 40 | using Prebuild.Core.Attributes; |
32 | using Prebuild.Core.Interfaces; | 41 | using Prebuild.Core.Interfaces; |
33 | using System.IO; | ||
34 | 42 | ||
35 | namespace Prebuild.Core.Nodes | 43 | namespace Prebuild.Core.Nodes |
36 | { | 44 | { |
@@ -216,8 +224,8 @@ namespace Prebuild.Core.Nodes | |||
216 | if (!m_Files.Contains(file)) | 224 | if (!m_Files.Contains(file)) |
217 | { | 225 | { |
218 | m_Files.Add(file); | 226 | m_Files.Add(file); |
219 | m_BuildActions[ file ] = matchNode.BuildAction == null ? GetBuildActionByFileName(file) : matchNode.BuildAction; | 227 | m_BuildActions[ file ] = matchNode.BuildAction; |
220 | m_SubTypes[file] = matchNode.SubType == null ? GetSubTypeByFileName(file) : matchNode.SubType.Value; | 228 | m_SubTypes[ file ] = matchNode.SubType; |
221 | m_ResourceNames[ file ] = matchNode.ResourceName; | 229 | m_ResourceNames[ file ] = matchNode.ResourceName; |
222 | this.m_PreservePaths[ file ] = matchNode.PreservePath; | 230 | this.m_PreservePaths[ file ] = matchNode.PreservePath; |
223 | this.m_Links[ file ] = matchNode.IsLink; | 231 | this.m_Links[ file ] = matchNode.IsLink; |
diff --git a/Prebuild/src/Core/Nodes/MatchNode.cs b/Prebuild/src/Core/Nodes/MatchNode.cs index 656d7d0..aeaf3c1 100644 --- a/Prebuild/src/Core/Nodes/MatchNode.cs +++ b/Prebuild/src/Core/Nodes/MatchNode.cs | |||
@@ -23,8 +23,16 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
23 | */ | 23 | */ |
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | #region CVS Information | ||
27 | /* | ||
28 | * $Source$ | ||
29 | * $Author: borrillis $ | ||
30 | * $Date: 2007-05-25 01:03:16 +0900 (Fri, 25 May 2007) $ | ||
31 | * $Revision: 243 $ | ||
32 | */ | ||
33 | #endregion | ||
34 | |||
26 | using System; | 35 | using System; |
27 | using System.Collections.Generic; | ||
28 | using System.Collections.Specialized; | 36 | using System.Collections.Specialized; |
29 | using System.IO; | 37 | using System.IO; |
30 | using System.Text.RegularExpressions; | 38 | using System.Text.RegularExpressions; |
@@ -45,16 +53,29 @@ namespace Prebuild.Core.Nodes | |||
45 | { | 53 | { |
46 | #region Fields | 54 | #region Fields |
47 | 55 | ||
48 | private readonly StringCollection m_Files = new StringCollection(); | 56 | private StringCollection m_Files; |
49 | private Regex m_Regex; | 57 | private Regex m_Regex; |
50 | private BuildAction? m_BuildAction; | 58 | private BuildAction m_BuildAction = BuildAction.Compile; |
51 | private SubType? m_SubType; | 59 | private SubType m_SubType = SubType.Code; |
52 | string m_ResourceName = ""; | 60 | string m_ResourceName = ""; |
53 | private CopyToOutput m_CopyToOutput; | 61 | private CopyToOutput m_CopyToOutput; |
54 | private bool m_Link; | 62 | private bool m_Link; |
55 | private string m_LinkPath; | 63 | private string m_LinkPath; |
56 | private bool m_PreservePath; | 64 | private bool m_PreservePath; |
57 | private readonly List<ExcludeNode> m_Exclusions = new List<ExcludeNode>(); | 65 | private ArrayList m_Exclusions; |
66 | |||
67 | #endregion | ||
68 | |||
69 | #region Constructors | ||
70 | |||
71 | /// <summary> | ||
72 | /// | ||
73 | /// </summary> | ||
74 | public MatchNode() | ||
75 | { | ||
76 | m_Files = new StringCollection(); | ||
77 | m_Exclusions = new ArrayList(); | ||
78 | } | ||
58 | 79 | ||
59 | #endregion | 80 | #endregion |
60 | 81 | ||
@@ -74,7 +95,7 @@ namespace Prebuild.Core.Nodes | |||
74 | /// <summary> | 95 | /// <summary> |
75 | /// | 96 | /// |
76 | /// </summary> | 97 | /// </summary> |
77 | public BuildAction? BuildAction | 98 | public BuildAction BuildAction |
78 | { | 99 | { |
79 | get | 100 | get |
80 | { | 101 | { |
@@ -85,7 +106,7 @@ namespace Prebuild.Core.Nodes | |||
85 | /// <summary> | 106 | /// <summary> |
86 | /// | 107 | /// |
87 | /// </summary> | 108 | /// </summary> |
88 | public SubType? SubType | 109 | public SubType SubType |
89 | { | 110 | { |
90 | get | 111 | get |
91 | { | 112 | { |
@@ -146,7 +167,7 @@ namespace Prebuild.Core.Nodes | |||
146 | /// <param name="pattern">The pattern.</param> | 167 | /// <param name="pattern">The pattern.</param> |
147 | /// <param name="recurse">if set to <c>true</c> [recurse].</param> | 168 | /// <param name="recurse">if set to <c>true</c> [recurse].</param> |
148 | /// <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> |
149 | private void RecurseDirectories(string path, string pattern, bool recurse, bool useRegex, List<ExcludeNode> exclusions) | 170 | private void RecurseDirectories(string path, string pattern, bool recurse, bool useRegex, ArrayList exclusions) |
150 | { | 171 | { |
151 | Match match; | 172 | Match match; |
152 | Boolean excludeFile; | 173 | Boolean excludeFile; |
@@ -258,14 +279,10 @@ namespace Prebuild.Core.Nodes | |||
258 | string pattern = Helper.AttributeValue(node, "pattern", "*"); | 279 | string pattern = Helper.AttributeValue(node, "pattern", "*"); |
259 | bool recurse = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "recurse", "false")); | 280 | bool recurse = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "recurse", "false")); |
260 | bool useRegex = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "useRegex", "false")); | 281 | bool useRegex = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "useRegex", "false")); |
261 | string buildAction = Helper.AttributeValue(node, "buildAction", String.Empty); | 282 | m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction), |
262 | if (buildAction != string.Empty) | 283 | Helper.AttributeValue(node, "buildAction", m_BuildAction.ToString())); |
263 | m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction), buildAction); | 284 | m_SubType = (SubType)Enum.Parse(typeof(SubType), |
264 | 285 | Helper.AttributeValue(node, "subType", m_SubType.ToString())); | |
265 | //TODO: Figure out where the subtype node is being assigned | ||
266 | //string subType = Helper.AttributeValue(node, "subType", string.Empty); | ||
267 | //if (subType != String.Empty) | ||
268 | // m_SubType = (SubType)Enum.Parse(typeof(SubType), subType); | ||
269 | m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString()); | 286 | m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString()); |
270 | 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())); |
271 | this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString)); | 288 | this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString)); |
@@ -312,7 +329,7 @@ namespace Prebuild.Core.Nodes | |||
312 | if(dataNode is ExcludeNode) | 329 | if(dataNode is ExcludeNode) |
313 | { | 330 | { |
314 | ExcludeNode excludeNode = (ExcludeNode)dataNode; | 331 | ExcludeNode excludeNode = (ExcludeNode)dataNode; |
315 | m_Exclusions.Add( excludeNode ); | 332 | m_Exclusions.Add( dataNode ); |
316 | } | 333 | } |
317 | } | 334 | } |
318 | 335 | ||
diff --git a/Prebuild/src/Core/Nodes/OptionsNode.cs b/Prebuild/src/Core/Nodes/OptionsNode.cs index b63034b..651c339 100644 --- a/Prebuild/src/Core/Nodes/OptionsNode.cs +++ b/Prebuild/src/Core/Nodes/OptionsNode.cs | |||
@@ -23,6 +23,17 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
23 | */ | 23 | */ |
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | #region CVS Information | ||
27 | /* | ||
28 | * $Source$ | ||
29 | * $Author: jendave $ | ||
30 | * $Date: 2007-01-09 01:55:40 +0900 (Tue, 09 Jan 2007) $ | ||
31 | * $Revision: 197 $ | ||
32 | */ | ||
33 | #endregion | ||
34 | |||
35 | |||
36 | |||
26 | using System; | 37 | using System; |
27 | using System.Collections; | 38 | using System.Collections; |
28 | using System.Collections.Specialized; | 39 | using System.Collections.Specialized; |
diff --git a/Prebuild/src/Core/Nodes/ProcessNode.cs b/Prebuild/src/Core/Nodes/ProcessNode.cs index 6bfbe16..2d2162c 100644 --- a/Prebuild/src/Core/Nodes/ProcessNode.cs +++ b/Prebuild/src/Core/Nodes/ProcessNode.cs | |||
@@ -23,6 +23,15 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
23 | */ | 23 | */ |
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | #region CVS Information | ||
27 | /* | ||
28 | * $Source$ | ||
29 | * $Author: jendave $ | ||
30 | * $Date: 2006-01-28 09:49:58 +0900 (Sat, 28 Jan 2006) $ | ||
31 | * $Revision: 71 $ | ||
32 | */ | ||
33 | #endregion | ||
34 | |||
26 | using System; | 35 | using System; |
27 | using System.Collections; | 36 | using System.Collections; |
28 | using System.Collections.Specialized; | 37 | using System.Collections.Specialized; |
diff --git a/Prebuild/src/Core/Nodes/ProjectNode.cs b/Prebuild/src/Core/Nodes/ProjectNode.cs index 0a24abf..e98ab5f 100644 --- a/Prebuild/src/Core/Nodes/ProjectNode.cs +++ b/Prebuild/src/Core/Nodes/ProjectNode.cs | |||
@@ -23,9 +23,17 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
23 | */ | 23 | */ |
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | #region CVS Information | ||
27 | /* | ||
28 | * $Source$ | ||
29 | * $Author: jendave $ | ||
30 | * $Date: 2007-05-26 06:58:26 +0900 (Sat, 26 May 2007) $ | ||
31 | * $Revision: 244 $ | ||
32 | */ | ||
33 | #endregion | ||
34 | |||
26 | using System; | 35 | using System; |
27 | using System.Collections; | 36 | using System.Collections; |
28 | using System.Collections.Generic; | ||
29 | using System.IO; | 37 | using System.IO; |
30 | using System.Xml; | 38 | using System.Xml; |
31 | 39 | ||
@@ -51,11 +59,7 @@ namespace Prebuild.Core.Nodes | |||
51 | /// <summary> | 59 | /// <summary> |
52 | /// The project is a library | 60 | /// The project is a library |
53 | /// </summary> | 61 | /// </summary> |
54 | Library, | 62 | Library |
55 | /// <summary> | ||
56 | /// The project is a website | ||
57 | /// </summary> | ||
58 | Web, | ||
59 | } | 63 | } |
60 | 64 | ||
61 | /// <summary> | 65 | /// <summary> |
@@ -72,25 +76,7 @@ namespace Prebuild.Core.Nodes | |||
72 | /// </summary> | 76 | /// </summary> |
73 | Mono | 77 | Mono |
74 | } | 78 | } |
75 | /// <summary> | 79 | |
76 | /// The version of the .NET framework to use (Required for VS2008) | ||
77 | /// <remarks>We don't need .NET 1.1 in here, it'll default when using vs2003.</remarks> | ||
78 | /// </summary> | ||
79 | public enum FrameworkVersion | ||
80 | { | ||
81 | /// <summary> | ||
82 | /// .NET 2.0 | ||
83 | /// </summary> | ||
84 | v2_0, | ||
85 | /// <summary> | ||
86 | /// .NET 3.0 | ||
87 | /// </summary> | ||
88 | v3_0, | ||
89 | /// <summary> | ||
90 | /// .NET 3.5 | ||
91 | /// </summary> | ||
92 | v3_5, | ||
93 | } | ||
94 | /// <summary> | 80 | /// <summary> |
95 | /// The Node object representing /Prebuild/Solution/Project elements | 81 | /// The Node object representing /Prebuild/Solution/Project elements |
96 | /// </summary> | 82 | /// </summary> |
@@ -109,45 +95,49 @@ namespace Prebuild.Core.Nodes | |||
109 | private string m_Language = "C#"; | 95 | private string m_Language = "C#"; |
110 | private ProjectType m_Type = ProjectType.Exe; | 96 | private ProjectType m_Type = ProjectType.Exe; |
111 | private ClrRuntime m_Runtime = ClrRuntime.Microsoft; | 97 | private ClrRuntime m_Runtime = ClrRuntime.Microsoft; |
112 | private FrameworkVersion m_Framework = FrameworkVersion.v2_0; | ||
113 | private string m_StartupObject = ""; | 98 | private string m_StartupObject = ""; |
114 | private string m_RootNamespace; | 99 | private string m_RootNamespace; |
115 | private string m_FilterGroups = ""; | 100 | private string m_FilterGroups = ""; |
116 | private string m_Version = ""; | 101 | private string m_Version = ""; |
117 | private Guid m_Guid; | 102 | private Guid m_Guid; |
118 | private string m_DebugStartParameters; | ||
119 | 103 | ||
120 | private Hashtable m_Configurations = new Hashtable(); | 104 | private Hashtable m_Configurations; |
121 | private readonly List<ReferencePathNode> m_ReferencePaths = new List<ReferencePathNode>(); | 105 | private ArrayList m_ReferencePaths; |
122 | private readonly List<ReferenceNode> m_References = new List<ReferenceNode>(); | 106 | private ArrayList m_References; |
123 | private readonly List<AuthorNode> m_Authors = new List<AuthorNode>(); | 107 | private ArrayList m_Authors; |
124 | private FilesNode m_Files; | 108 | private FilesNode m_Files; |
125 | 109 | ||
126 | #endregion | 110 | #endregion |
127 | 111 | ||
128 | #region Properties | 112 | #region Constructors |
129 | 113 | ||
130 | /// <summary> | 114 | /// <summary> |
131 | /// Gets the name. | 115 | /// Initializes a new instance of the <see cref="ProjectNode"/> class. |
132 | /// </summary> | 116 | /// </summary> |
133 | /// <value>The name.</value> | 117 | public ProjectNode() |
134 | public string Name | ||
135 | { | 118 | { |
136 | get | 119 | m_Configurations = new Hashtable(); |
137 | { | 120 | m_ReferencePaths = new ArrayList(); |
138 | return m_Name; | 121 | m_References = new ArrayList(); |
139 | } | 122 | m_Authors = new ArrayList(); |
140 | } | 123 | } |
124 | |||
125 | #endregion | ||
126 | |||
127 | #region Properties | ||
128 | |||
141 | /// <summary> | 129 | /// <summary> |
142 | /// The version of the .NET Framework to compile under | 130 | /// Gets the name. |
143 | /// </summary> | 131 | /// </summary> |
144 | public FrameworkVersion FrameworkVersion | 132 | /// <value>The name.</value> |
133 | public string Name | ||
145 | { | 134 | { |
146 | get | 135 | get |
147 | { | 136 | { |
148 | return this.m_Framework; | 137 | return m_Name; |
149 | } | 138 | } |
150 | } | 139 | } |
140 | |||
151 | /// <summary> | 141 | /// <summary> |
152 | /// Gets the path. | 142 | /// Gets the path. |
153 | /// </summary> | 143 | /// </summary> |
@@ -220,17 +210,17 @@ namespace Prebuild.Core.Nodes | |||
220 | } | 210 | } |
221 | } | 211 | } |
222 | 212 | ||
223 | /// <summary> | 213 | /// <summary> |
224 | /// Gets the app icon. | 214 | /// Gets the app icon. |
225 | /// </summary> | 215 | /// </summary> |
226 | /// <value>The app icon.</value> | 216 | /// <value>The app icon.</value> |
227 | public string ConfigFile | 217 | public string ConfigFile |
228 | { | 218 | { |
229 | get | 219 | get |
230 | { | 220 | { |
231 | return m_ConfigFile; | 221 | return m_ConfigFile; |
232 | } | 222 | } |
233 | } | 223 | } |
234 | 224 | ||
235 | /// <summary> | 225 | /// <summary> |
236 | /// | 226 | /// |
@@ -279,22 +269,22 @@ namespace Prebuild.Core.Nodes | |||
279 | } | 269 | } |
280 | } | 270 | } |
281 | 271 | ||
282 | private bool m_GenerateAssemblyInfoFile = false; | 272 | private bool m_GenerateAssemblyInfoFile = false; |
283 | 273 | ||
284 | /// <summary> | 274 | /// <summary> |
285 | /// | 275 | /// |
286 | /// </summary> | 276 | /// </summary> |
287 | public bool GenerateAssemblyInfoFile | 277 | public bool GenerateAssemblyInfoFile |
288 | { | 278 | { |
289 | get | 279 | get |
290 | { | 280 | { |
291 | return m_GenerateAssemblyInfoFile; | 281 | return m_GenerateAssemblyInfoFile; |
292 | } | 282 | } |
293 | set | 283 | set |
294 | { | 284 | { |
295 | m_GenerateAssemblyInfoFile = value; | 285 | m_GenerateAssemblyInfoFile = value; |
296 | } | 286 | } |
297 | } | 287 | } |
298 | 288 | ||
299 | /// <summary> | 289 | /// <summary> |
300 | /// Gets the startup object. | 290 | /// Gets the startup object. |
@@ -324,7 +314,7 @@ namespace Prebuild.Core.Nodes | |||
324 | /// Gets the configurations. | 314 | /// Gets the configurations. |
325 | /// </summary> | 315 | /// </summary> |
326 | /// <value>The configurations.</value> | 316 | /// <value>The configurations.</value> |
327 | public IList Configurations | 317 | public ICollection Configurations |
328 | { | 318 | { |
329 | get | 319 | get |
330 | { | 320 | { |
@@ -350,11 +340,11 @@ namespace Prebuild.Core.Nodes | |||
350 | /// Gets the reference paths. | 340 | /// Gets the reference paths. |
351 | /// </summary> | 341 | /// </summary> |
352 | /// <value>The reference paths.</value> | 342 | /// <value>The reference paths.</value> |
353 | public List<ReferencePathNode> ReferencePaths | 343 | public ArrayList ReferencePaths |
354 | { | 344 | { |
355 | get | 345 | get |
356 | { | 346 | { |
357 | List<ReferencePathNode> tmp = new List<ReferencePathNode>(m_ReferencePaths); | 347 | ArrayList tmp = new ArrayList(m_ReferencePaths); |
358 | tmp.Sort(); | 348 | tmp.Sort(); |
359 | return tmp; | 349 | return tmp; |
360 | } | 350 | } |
@@ -364,11 +354,11 @@ namespace Prebuild.Core.Nodes | |||
364 | /// Gets the references. | 354 | /// Gets the references. |
365 | /// </summary> | 355 | /// </summary> |
366 | /// <value>The references.</value> | 356 | /// <value>The references.</value> |
367 | public List<ReferenceNode> References | 357 | public ArrayList References |
368 | { | 358 | { |
369 | get | 359 | get |
370 | { | 360 | { |
371 | List<ReferenceNode> tmp = new List<ReferenceNode>(m_References); | 361 | ArrayList tmp = new ArrayList(m_References); |
372 | tmp.Sort(); | 362 | tmp.Sort(); |
373 | return tmp; | 363 | return tmp; |
374 | } | 364 | } |
@@ -378,7 +368,7 @@ namespace Prebuild.Core.Nodes | |||
378 | /// Gets the Authors list. | 368 | /// Gets the Authors list. |
379 | /// </summary> | 369 | /// </summary> |
380 | /// <value>The list of the project's authors.</value> | 370 | /// <value>The list of the project's authors.</value> |
381 | public List<AuthorNode> Authors | 371 | public ArrayList Authors |
382 | { | 372 | { |
383 | get | 373 | get |
384 | { | 374 | { |
@@ -434,15 +424,7 @@ namespace Prebuild.Core.Nodes | |||
434 | } | 424 | } |
435 | } | 425 | } |
436 | 426 | ||
437 | public string DebugStartParameters | 427 | #endregion |
438 | { | ||
439 | get | ||
440 | { | ||
441 | return m_DebugStartParameters; | ||
442 | } | ||
443 | } | ||
444 | |||
445 | #endregion | ||
446 | 428 | ||
447 | #region Private Methods | 429 | #region Private Methods |
448 | 430 | ||
@@ -488,18 +470,13 @@ namespace Prebuild.Core.Nodes | |||
488 | m_Language = Helper.AttributeValue(node, "language", m_Language); | 470 | m_Language = Helper.AttributeValue(node, "language", m_Language); |
489 | m_Type = (ProjectType)Helper.EnumAttributeValue(node, "type", typeof(ProjectType), m_Type); | 471 | m_Type = (ProjectType)Helper.EnumAttributeValue(node, "type", typeof(ProjectType), m_Type); |
490 | m_Runtime = (ClrRuntime)Helper.EnumAttributeValue(node, "runtime", typeof(ClrRuntime), m_Runtime); | 472 | m_Runtime = (ClrRuntime)Helper.EnumAttributeValue(node, "runtime", typeof(ClrRuntime), m_Runtime); |
491 | m_Framework = (FrameworkVersion)Helper.EnumAttributeValue(node, "frameworkVersion", typeof(FrameworkVersion), m_Framework); | ||
492 | m_StartupObject = Helper.AttributeValue(node, "startupObject", m_StartupObject); | 473 | m_StartupObject = Helper.AttributeValue(node, "startupObject", m_StartupObject); |
493 | m_RootNamespace = Helper.AttributeValue(node, "rootNamespace", m_RootNamespace); | 474 | m_RootNamespace = Helper.AttributeValue(node, "rootNamespace", m_RootNamespace); |
494 | 475 | m_GenerateAssemblyInfoFile = Helper.ParseBoolean(node, "generateAssemblyInfoFile", false); | |
476 | |||
495 | int hash = m_Name.GetHashCode(); | 477 | int hash = m_Name.GetHashCode(); |
496 | Guid guidByHash = new Guid(hash, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); | 478 | m_Guid = new Guid(hash, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); |
497 | string guid = Helper.AttributeValue(node, "guid", guidByHash.ToString()); | ||
498 | m_Guid = new Guid(guid); | ||
499 | 479 | ||
500 | m_GenerateAssemblyInfoFile = Helper.ParseBoolean(node, "generateAssemblyInfoFile", false); | ||
501 | m_DebugStartParameters = Helper.AttributeValue(node, "debugStartParameters", string.Empty); | ||
502 | |||
503 | if(m_AssemblyName == null || m_AssemblyName.Length < 1) | 480 | if(m_AssemblyName == null || m_AssemblyName.Length < 1) |
504 | { | 481 | { |
505 | m_AssemblyName = m_Name; | 482 | m_AssemblyName = m_Name; |
@@ -539,15 +516,15 @@ namespace Prebuild.Core.Nodes | |||
539 | } | 516 | } |
540 | else if(dataNode is ReferencePathNode) | 517 | else if(dataNode is ReferencePathNode) |
541 | { | 518 | { |
542 | m_ReferencePaths.Add((ReferencePathNode)dataNode); | 519 | m_ReferencePaths.Add(dataNode); |
543 | } | 520 | } |
544 | else if(dataNode is ReferenceNode) | 521 | else if(dataNode is ReferenceNode) |
545 | { | 522 | { |
546 | m_References.Add((ReferenceNode)dataNode); | 523 | m_References.Add(dataNode); |
547 | } | 524 | } |
548 | else if(dataNode is AuthorNode) | 525 | else if(dataNode is AuthorNode) |
549 | { | 526 | { |
550 | m_Authors.Add((AuthorNode)dataNode); | 527 | m_Authors.Add(dataNode); |
551 | } | 528 | } |
552 | else if(dataNode is FilesNode) | 529 | else if(dataNode is FilesNode) |
553 | { | 530 | { |
@@ -571,6 +548,6 @@ namespace Prebuild.Core.Nodes | |||
571 | return this.m_Name.CompareTo(that.m_Name); | 548 | return this.m_Name.CompareTo(that.m_Name); |
572 | } | 549 | } |
573 | 550 | ||
574 | #endregion | 551 | #endregion |
575 | } | 552 | } |
576 | } | 553 | } |
diff --git a/Prebuild/src/Core/Nodes/ReferenceNode.cs b/Prebuild/src/Core/Nodes/ReferenceNode.cs index 9c5d1a3..df0c2e4 100644 --- a/Prebuild/src/Core/Nodes/ReferenceNode.cs +++ b/Prebuild/src/Core/Nodes/ReferenceNode.cs | |||
@@ -23,6 +23,15 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
23 | */ | 23 | */ |
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | #region CVS Information | ||
27 | /* | ||
28 | * $Source$ | ||
29 | * $Author: jendave $ | ||
30 | * $Date: 2006-07-26 01:56:49 +0900 (Wed, 26 Jul 2006) $ | ||
31 | * $Revision: 132 $ | ||
32 | */ | ||
33 | #endregion | ||
34 | |||
26 | using System; | 35 | using System; |
27 | using System.Xml; | 36 | using System.Xml; |
28 | 37 | ||
diff --git a/Prebuild/src/Core/Nodes/ReferencePathNode.cs b/Prebuild/src/Core/Nodes/ReferencePathNode.cs index f0543c2..d4042ef 100644 --- a/Prebuild/src/Core/Nodes/ReferencePathNode.cs +++ b/Prebuild/src/Core/Nodes/ReferencePathNode.cs | |||
@@ -23,6 +23,15 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
23 | */ | 23 | */ |
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | #region CVS Information | ||
27 | /* | ||
28 | * $Source$ | ||
29 | * $Author: jendave $ | ||
30 | * $Date: 2006-01-28 09:49:58 +0900 (Sat, 28 Jan 2006) $ | ||
31 | * $Revision: 71 $ | ||
32 | */ | ||
33 | #endregion | ||
34 | |||
26 | using System; | 35 | using System; |
27 | using System.Collections; | 36 | using System.Collections; |
28 | using System.Collections.Specialized; | 37 | using System.Collections.Specialized; |
diff --git a/Prebuild/src/Core/Nodes/SolutionNode.cs b/Prebuild/src/Core/Nodes/SolutionNode.cs index 2a1b8e2..9473fe6 100644 --- a/Prebuild/src/Core/Nodes/SolutionNode.cs +++ b/Prebuild/src/Core/Nodes/SolutionNode.cs | |||
@@ -23,9 +23,17 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
23 | */ | 23 | */ |
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | #region CVS Information | ||
27 | /* | ||
28 | * $Source$ | ||
29 | * $Author: jendave $ | ||
30 | * $Date: 2006-03-01 01:15:42 +0900 (Wed, 01 Mar 2006) $ | ||
31 | * $Revision: 92 $ | ||
32 | */ | ||
33 | #endregion | ||
34 | |||
26 | using System; | 35 | using System; |
27 | using System.Collections; | 36 | using System.Collections; |
28 | using System.Collections.Generic; | ||
29 | using System.Diagnostics; | 37 | using System.Diagnostics; |
30 | using System.IO; | 38 | using System.IO; |
31 | using System.Xml; | 39 | using System.Xml; |
@@ -40,62 +48,40 @@ namespace Prebuild.Core.Nodes | |||
40 | /// | 48 | /// |
41 | /// </summary> | 49 | /// </summary> |
42 | [DataNode("Solution")] | 50 | [DataNode("Solution")] |
43 | [DataNode("EmbeddedSolution")] | ||
44 | [DebuggerDisplay("{Name}")] | ||
45 | public class SolutionNode : DataNode | 51 | public class SolutionNode : DataNode |
46 | { | 52 | { |
47 | #region Fields | 53 | #region Fields |
48 | 54 | ||
49 | private Guid m_Guid = Guid.NewGuid(); | ||
50 | private string m_Name = "unknown"; | 55 | private string m_Name = "unknown"; |
51 | private string m_Path = ""; | 56 | private string m_Path = ""; |
52 | private string m_FullPath = ""; | 57 | private string m_FullPath = ""; |
53 | private string m_ActiveConfig = "Debug"; | 58 | private string m_ActiveConfig = "Debug"; |
54 | private string m_Version = "1.0.0"; | 59 | private string m_Version = "1.0.0"; |
55 | 60 | ||
56 | private OptionsNode m_Options; | 61 | private OptionsNode m_Options; |
57 | private FilesNode m_Files; | 62 | private FilesNode m_Files; |
58 | private readonly Hashtable m_Configurations = new Hashtable(); | 63 | private Hashtable m_Configurations; |
59 | private readonly Hashtable m_Projects = new Hashtable(); | 64 | private Hashtable m_Projects; |
60 | private readonly Hashtable m_DatabaseProjects = new Hashtable(); | 65 | private ArrayList m_ProjectsOrder; |
61 | private readonly List<ProjectNode> m_ProjectsOrder = new List<ProjectNode>(); | 66 | |
62 | private readonly Hashtable m_Solutions = new Hashtable(); | 67 | #endregion |
68 | |||
69 | #region Constructors | ||
70 | |||
71 | /// <summary> | ||
72 | /// Initializes a new instance of the <see cref="SolutionNode"/> class. | ||
73 | /// </summary> | ||
74 | public SolutionNode() | ||
75 | { | ||
76 | m_Configurations = new Hashtable(); | ||
77 | m_Projects = new Hashtable(); | ||
78 | m_ProjectsOrder = new ArrayList(); | ||
79 | } | ||
63 | 80 | ||
64 | #endregion | 81 | #endregion |
65 | 82 | ||
66 | #region Properties | 83 | #region Properties |
67 | public override IDataNode Parent | 84 | |
68 | { | ||
69 | get | ||
70 | { | ||
71 | return base.Parent; | ||
72 | } | ||
73 | set | ||
74 | { | ||
75 | if (value is SolutionNode) | ||
76 | { | ||
77 | SolutionNode solution = (SolutionNode)value; | ||
78 | foreach (ConfigurationNode conf in solution.Configurations) | ||
79 | { | ||
80 | m_Configurations[conf.Name] = conf.Clone(); | ||
81 | } | ||
82 | } | ||
83 | |||
84 | base.Parent = value; | ||
85 | } | ||
86 | } | ||
87 | |||
88 | public Guid Guid | ||
89 | { | ||
90 | get | ||
91 | { | ||
92 | return m_Guid; | ||
93 | } | ||
94 | set | ||
95 | { | ||
96 | m_Guid = value; | ||
97 | } | ||
98 | } | ||
99 | /// <summary> | 85 | /// <summary> |
100 | /// Gets or sets the active config. | 86 | /// Gets or sets the active config. |
101 | /// </summary> | 87 | /// </summary> |
@@ -209,36 +195,7 @@ namespace Prebuild.Core.Nodes | |||
209 | return m_Configurations; | 195 | return m_Configurations; |
210 | } | 196 | } |
211 | } | 197 | } |
212 | /// <summary> | 198 | |
213 | /// Gets the database projects. | ||
214 | /// </summary> | ||
215 | public ICollection DatabaseProjects | ||
216 | { | ||
217 | get | ||
218 | { | ||
219 | return m_DatabaseProjects.Values; | ||
220 | } | ||
221 | } | ||
222 | /// <summary> | ||
223 | /// Gets the nested solutions. | ||
224 | /// </summary> | ||
225 | public ICollection Solutions | ||
226 | { | ||
227 | get | ||
228 | { | ||
229 | return m_Solutions.Values; | ||
230 | } | ||
231 | } | ||
232 | /// <summary> | ||
233 | /// Gets the nested solutions hash table. | ||
234 | /// </summary> | ||
235 | public Hashtable SolutionsTable | ||
236 | { | ||
237 | get | ||
238 | { | ||
239 | return this.m_Solutions; | ||
240 | } | ||
241 | } | ||
242 | /// <summary> | 199 | /// <summary> |
243 | /// Gets the projects. | 200 | /// Gets the projects. |
244 | /// </summary> | 201 | /// </summary> |
@@ -269,7 +226,7 @@ namespace Prebuild.Core.Nodes | |||
269 | /// Gets the projects table. | 226 | /// Gets the projects table. |
270 | /// </summary> | 227 | /// </summary> |
271 | /// <value>The projects table.</value> | 228 | /// <value>The projects table.</value> |
272 | public List<ProjectNode> ProjectsTableOrder | 229 | public ArrayList ProjectsTableOrder |
273 | { | 230 | { |
274 | get | 231 | get |
275 | { | 232 | { |
@@ -330,21 +287,8 @@ namespace Prebuild.Core.Nodes | |||
330 | else if(dataNode is ProjectNode) | 287 | else if(dataNode is ProjectNode) |
331 | { | 288 | { |
332 | m_Projects[((ProjectNode)dataNode).Name] = dataNode; | 289 | m_Projects[((ProjectNode)dataNode).Name] = dataNode; |
333 | m_ProjectsOrder.Add((ProjectNode)dataNode); | 290 | m_ProjectsOrder.Add(dataNode); |
334 | } | 291 | } |
335 | else if(dataNode is SolutionNode) | ||
336 | { | ||
337 | m_Solutions[((SolutionNode)dataNode).Name] = dataNode; | ||
338 | } | ||
339 | else if (dataNode is ProcessNode) | ||
340 | { | ||
341 | ProcessNode p = (ProcessNode)dataNode; | ||
342 | Kernel.Instance.ProcessFile(p, this); | ||
343 | } | ||
344 | else if (dataNode is DatabaseProjectNode) | ||
345 | { | ||
346 | m_DatabaseProjects[((DatabaseProjectNode)dataNode).Name] = dataNode; | ||
347 | } | ||
348 | } | 292 | } |
349 | } | 293 | } |
350 | finally | 294 | finally |