aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Prebuild/src/Core/Nodes/SolutionNode.cs
diff options
context:
space:
mode:
authorlbsa712009-02-19 12:48:38 +0000
committerlbsa712009-02-19 12:48:38 +0000
commitdd9640cda82bca8125289f292238ea6b447cc6e9 (patch)
tree5f558fa38e4c03b05eb5b91cc9db7ff2363c0b48 /Prebuild/src/Core/Nodes/SolutionNode.cs
parentreverted last revision, until we decide how to handle capturing IM's (diff)
downloadopensim-SC_OLD-dd9640cda82bca8125289f292238ea6b447cc6e9.zip
opensim-SC_OLD-dd9640cda82bca8125289f292238ea6b447cc6e9.tar.gz
opensim-SC_OLD-dd9640cda82bca8125289f292238ea6b447cc6e9.tar.bz2
opensim-SC_OLD-dd9640cda82bca8125289f292238ea6b447cc6e9.tar.xz
=== PREBUILD UPSTREAMS UPDATE : POTENTIAL BREAKAGE ===
* Applied upstreams changes to allow for auditing and debugging in our various environments. * This should, in theory, bring back 'multiple ref dirs'. * Temporarily Removed xmlns because prebuild-1.7 schema does not allow for multiple solutions per prebuild node (This will be a moot issue once the Prebuild node is moved out of prebuild.xml) * Autotools target: Various minor fixes * MonoDevelop Target : No changes. * Nant Target: Various minor fixes, support for net-3.5 and mono-2.0/3.5 targets * Sharpdevelop targets: No changes. * VS Targets: Refactored into using VSGenericTarget, and supports 2.0-3.5 * XCode Target: No changes. --- Regressions and outstanding issues --- * The Solution is assigned a random Guid - will lead to unnecessary reloads and loss of user settings. --- New features of Prebuild 2.0.4 --- * (Better) support for Web, WinForms and Database Projects and build actions * Conditional Framework Version compilation support (1.1, 2.0-3.5) * ArrayList -> List<>, ICollection -> IList (this means Prebuild can generate 1.1 solutions, but can't itself be built under 1.1 - how very meta) * Added <?include file="sub_prebuild.xml" ?> preprocessor directive.
Diffstat (limited to 'Prebuild/src/Core/Nodes/SolutionNode.cs')
-rw-r--r--Prebuild/src/Core/Nodes/SolutionNode.cs120
1 files changed, 88 insertions, 32 deletions
diff --git a/Prebuild/src/Core/Nodes/SolutionNode.cs b/Prebuild/src/Core/Nodes/SolutionNode.cs
index 9473fe6..2a1b8e2 100644
--- a/Prebuild/src/Core/Nodes/SolutionNode.cs
+++ b/Prebuild/src/Core/Nodes/SolutionNode.cs
@@ -23,17 +23,9 @@ 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
35using System; 26using System;
36using System.Collections; 27using System.Collections;
28using System.Collections.Generic;
37using System.Diagnostics; 29using System.Diagnostics;
38using System.IO; 30using System.IO;
39using System.Xml; 31using System.Xml;
@@ -48,40 +40,62 @@ namespace Prebuild.Core.Nodes
48 /// 40 ///
49 /// </summary> 41 /// </summary>
50 [DataNode("Solution")] 42 [DataNode("Solution")]
43 [DataNode("EmbeddedSolution")]
44 [DebuggerDisplay("{Name}")]
51 public class SolutionNode : DataNode 45 public class SolutionNode : DataNode
52 { 46 {
53 #region Fields 47 #region Fields
54 48
49 private Guid m_Guid = Guid.NewGuid();
55 private string m_Name = "unknown"; 50 private string m_Name = "unknown";
56 private string m_Path = ""; 51 private string m_Path = "";
57 private string m_FullPath = ""; 52 private string m_FullPath = "";
58 private string m_ActiveConfig = "Debug"; 53 private string m_ActiveConfig = "Debug";
59 private string m_Version = "1.0.0"; 54 private string m_Version = "1.0.0";
60 55
61 private OptionsNode m_Options; 56 private OptionsNode m_Options;
62 private FilesNode m_Files; 57 private FilesNode m_Files;
63 private Hashtable m_Configurations; 58 private readonly Hashtable m_Configurations = new Hashtable();
64 private Hashtable m_Projects; 59 private readonly Hashtable m_Projects = new Hashtable();
65 private ArrayList m_ProjectsOrder; 60 private readonly Hashtable m_DatabaseProjects = new Hashtable();
66 61 private readonly List<ProjectNode> m_ProjectsOrder = new List<ProjectNode>();
67 #endregion 62 private readonly Hashtable m_Solutions = new Hashtable();
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 }
80 63
81 #endregion 64 #endregion
82 65
83 #region Properties 66 #region Properties
84 67 public override IDataNode Parent
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 }
85 /// <summary> 99 /// <summary>
86 /// Gets or sets the active config. 100 /// Gets or sets the active config.
87 /// </summary> 101 /// </summary>
@@ -195,7 +209,36 @@ namespace Prebuild.Core.Nodes
195 return m_Configurations; 209 return m_Configurations;
196 } 210 }
197 } 211 }
198 212 /// <summary>
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 }
199 /// <summary> 242 /// <summary>
200 /// Gets the projects. 243 /// Gets the projects.
201 /// </summary> 244 /// </summary>
@@ -226,7 +269,7 @@ namespace Prebuild.Core.Nodes
226 /// Gets the projects table. 269 /// Gets the projects table.
227 /// </summary> 270 /// </summary>
228 /// <value>The projects table.</value> 271 /// <value>The projects table.</value>
229 public ArrayList ProjectsTableOrder 272 public List<ProjectNode> ProjectsTableOrder
230 { 273 {
231 get 274 get
232 { 275 {
@@ -287,8 +330,21 @@ namespace Prebuild.Core.Nodes
287 else if(dataNode is ProjectNode) 330 else if(dataNode is ProjectNode)
288 { 331 {
289 m_Projects[((ProjectNode)dataNode).Name] = dataNode; 332 m_Projects[((ProjectNode)dataNode).Name] = dataNode;
290 m_ProjectsOrder.Add(dataNode); 333 m_ProjectsOrder.Add((ProjectNode)dataNode);
291 } 334 }
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 }
292 } 348 }
293 } 349 }
294 finally 350 finally