diff options
author | lbsa71 | 2009-02-19 12:48:38 +0000 |
---|---|---|
committer | lbsa71 | 2009-02-19 12:48:38 +0000 |
commit | dd9640cda82bca8125289f292238ea6b447cc6e9 (patch) | |
tree | 5f558fa38e4c03b05eb5b91cc9db7ff2363c0b48 /Prebuild/src/Core/Nodes/ProjectNode.cs | |
parent | reverted last revision, until we decide how to handle capturing IM's (diff) | |
download | opensim-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/ProjectNode.cs')
-rw-r--r-- | Prebuild/src/Core/Nodes/ProjectNode.cs | 169 |
1 files changed, 96 insertions, 73 deletions
diff --git a/Prebuild/src/Core/Nodes/ProjectNode.cs b/Prebuild/src/Core/Nodes/ProjectNode.cs index e98ab5f..0a24abf 100644 --- a/Prebuild/src/Core/Nodes/ProjectNode.cs +++ b/Prebuild/src/Core/Nodes/ProjectNode.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: 2007-05-26 06:58:26 +0900 (Sat, 26 May 2007) $ | ||
31 | * $Revision: 244 $ | ||
32 | */ | ||
33 | #endregion | ||
34 | |||
35 | using System; | 26 | using System; |
36 | using System.Collections; | 27 | using System.Collections; |
28 | using System.Collections.Generic; | ||
37 | using System.IO; | 29 | using System.IO; |
38 | using System.Xml; | 30 | using System.Xml; |
39 | 31 | ||
@@ -59,7 +51,11 @@ namespace Prebuild.Core.Nodes | |||
59 | /// <summary> | 51 | /// <summary> |
60 | /// The project is a library | 52 | /// The project is a library |
61 | /// </summary> | 53 | /// </summary> |
62 | Library | 54 | Library, |
55 | /// <summary> | ||
56 | /// The project is a website | ||
57 | /// </summary> | ||
58 | Web, | ||
63 | } | 59 | } |
64 | 60 | ||
65 | /// <summary> | 61 | /// <summary> |
@@ -76,7 +72,25 @@ namespace Prebuild.Core.Nodes | |||
76 | /// </summary> | 72 | /// </summary> |
77 | Mono | 73 | Mono |
78 | } | 74 | } |
79 | 75 | /// <summary> | |
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 | } | ||
80 | /// <summary> | 94 | /// <summary> |
81 | /// The Node object representing /Prebuild/Solution/Project elements | 95 | /// The Node object representing /Prebuild/Solution/Project elements |
82 | /// </summary> | 96 | /// </summary> |
@@ -95,35 +109,22 @@ namespace Prebuild.Core.Nodes | |||
95 | private string m_Language = "C#"; | 109 | private string m_Language = "C#"; |
96 | private ProjectType m_Type = ProjectType.Exe; | 110 | private ProjectType m_Type = ProjectType.Exe; |
97 | private ClrRuntime m_Runtime = ClrRuntime.Microsoft; | 111 | private ClrRuntime m_Runtime = ClrRuntime.Microsoft; |
112 | private FrameworkVersion m_Framework = FrameworkVersion.v2_0; | ||
98 | private string m_StartupObject = ""; | 113 | private string m_StartupObject = ""; |
99 | private string m_RootNamespace; | 114 | private string m_RootNamespace; |
100 | private string m_FilterGroups = ""; | 115 | private string m_FilterGroups = ""; |
101 | private string m_Version = ""; | 116 | private string m_Version = ""; |
102 | private Guid m_Guid; | 117 | private Guid m_Guid; |
118 | private string m_DebugStartParameters; | ||
103 | 119 | ||
104 | private Hashtable m_Configurations; | 120 | private Hashtable m_Configurations = new Hashtable(); |
105 | private ArrayList m_ReferencePaths; | 121 | private readonly List<ReferencePathNode> m_ReferencePaths = new List<ReferencePathNode>(); |
106 | private ArrayList m_References; | 122 | private readonly List<ReferenceNode> m_References = new List<ReferenceNode>(); |
107 | private ArrayList m_Authors; | 123 | private readonly List<AuthorNode> m_Authors = new List<AuthorNode>(); |
108 | private FilesNode m_Files; | 124 | private FilesNode m_Files; |
109 | 125 | ||
110 | #endregion | 126 | #endregion |
111 | 127 | ||
112 | #region Constructors | ||
113 | |||
114 | /// <summary> | ||
115 | /// Initializes a new instance of the <see cref="ProjectNode"/> class. | ||
116 | /// </summary> | ||
117 | public ProjectNode() | ||
118 | { | ||
119 | m_Configurations = new Hashtable(); | ||
120 | m_ReferencePaths = new ArrayList(); | ||
121 | m_References = new ArrayList(); | ||
122 | m_Authors = new ArrayList(); | ||
123 | } | ||
124 | |||
125 | #endregion | ||
126 | |||
127 | #region Properties | 128 | #region Properties |
128 | 129 | ||
129 | /// <summary> | 130 | /// <summary> |
@@ -134,10 +135,19 @@ namespace Prebuild.Core.Nodes | |||
134 | { | 135 | { |
135 | get | 136 | get |
136 | { | 137 | { |
137 | return m_Name; | 138 | return m_Name; |
139 | } | ||
140 | } | ||
141 | /// <summary> | ||
142 | /// The version of the .NET Framework to compile under | ||
143 | /// </summary> | ||
144 | public FrameworkVersion FrameworkVersion | ||
145 | { | ||
146 | get | ||
147 | { | ||
148 | return this.m_Framework; | ||
138 | } | 149 | } |
139 | } | 150 | } |
140 | |||
141 | /// <summary> | 151 | /// <summary> |
142 | /// Gets the path. | 152 | /// Gets the path. |
143 | /// </summary> | 153 | /// </summary> |
@@ -210,17 +220,17 @@ namespace Prebuild.Core.Nodes | |||
210 | } | 220 | } |
211 | } | 221 | } |
212 | 222 | ||
213 | /// <summary> | 223 | /// <summary> |
214 | /// Gets the app icon. | 224 | /// Gets the app icon. |
215 | /// </summary> | 225 | /// </summary> |
216 | /// <value>The app icon.</value> | 226 | /// <value>The app icon.</value> |
217 | public string ConfigFile | 227 | public string ConfigFile |
218 | { | 228 | { |
219 | get | 229 | get |
220 | { | 230 | { |
221 | return m_ConfigFile; | 231 | return m_ConfigFile; |
222 | } | 232 | } |
223 | } | 233 | } |
224 | 234 | ||
225 | /// <summary> | 235 | /// <summary> |
226 | /// | 236 | /// |
@@ -269,22 +279,22 @@ namespace Prebuild.Core.Nodes | |||
269 | } | 279 | } |
270 | } | 280 | } |
271 | 281 | ||
272 | private bool m_GenerateAssemblyInfoFile = false; | 282 | private bool m_GenerateAssemblyInfoFile = false; |
273 | 283 | ||
274 | /// <summary> | 284 | /// <summary> |
275 | /// | 285 | /// |
276 | /// </summary> | 286 | /// </summary> |
277 | public bool GenerateAssemblyInfoFile | 287 | public bool GenerateAssemblyInfoFile |
278 | { | 288 | { |
279 | get | 289 | get |
280 | { | 290 | { |
281 | return m_GenerateAssemblyInfoFile; | 291 | return m_GenerateAssemblyInfoFile; |
282 | } | 292 | } |
283 | set | 293 | set |
284 | { | 294 | { |
285 | m_GenerateAssemblyInfoFile = value; | 295 | m_GenerateAssemblyInfoFile = value; |
286 | } | 296 | } |
287 | } | 297 | } |
288 | 298 | ||
289 | /// <summary> | 299 | /// <summary> |
290 | /// Gets the startup object. | 300 | /// Gets the startup object. |
@@ -314,7 +324,7 @@ namespace Prebuild.Core.Nodes | |||
314 | /// Gets the configurations. | 324 | /// Gets the configurations. |
315 | /// </summary> | 325 | /// </summary> |
316 | /// <value>The configurations.</value> | 326 | /// <value>The configurations.</value> |
317 | public ICollection Configurations | 327 | public IList Configurations |
318 | { | 328 | { |
319 | get | 329 | get |
320 | { | 330 | { |
@@ -340,11 +350,11 @@ namespace Prebuild.Core.Nodes | |||
340 | /// Gets the reference paths. | 350 | /// Gets the reference paths. |
341 | /// </summary> | 351 | /// </summary> |
342 | /// <value>The reference paths.</value> | 352 | /// <value>The reference paths.</value> |
343 | public ArrayList ReferencePaths | 353 | public List<ReferencePathNode> ReferencePaths |
344 | { | 354 | { |
345 | get | 355 | get |
346 | { | 356 | { |
347 | ArrayList tmp = new ArrayList(m_ReferencePaths); | 357 | List<ReferencePathNode> tmp = new List<ReferencePathNode>(m_ReferencePaths); |
348 | tmp.Sort(); | 358 | tmp.Sort(); |
349 | return tmp; | 359 | return tmp; |
350 | } | 360 | } |
@@ -354,11 +364,11 @@ namespace Prebuild.Core.Nodes | |||
354 | /// Gets the references. | 364 | /// Gets the references. |
355 | /// </summary> | 365 | /// </summary> |
356 | /// <value>The references.</value> | 366 | /// <value>The references.</value> |
357 | public ArrayList References | 367 | public List<ReferenceNode> References |
358 | { | 368 | { |
359 | get | 369 | get |
360 | { | 370 | { |
361 | ArrayList tmp = new ArrayList(m_References); | 371 | List<ReferenceNode> tmp = new List<ReferenceNode>(m_References); |
362 | tmp.Sort(); | 372 | tmp.Sort(); |
363 | return tmp; | 373 | return tmp; |
364 | } | 374 | } |
@@ -368,7 +378,7 @@ namespace Prebuild.Core.Nodes | |||
368 | /// Gets the Authors list. | 378 | /// Gets the Authors list. |
369 | /// </summary> | 379 | /// </summary> |
370 | /// <value>The list of the project's authors.</value> | 380 | /// <value>The list of the project's authors.</value> |
371 | public ArrayList Authors | 381 | public List<AuthorNode> Authors |
372 | { | 382 | { |
373 | get | 383 | get |
374 | { | 384 | { |
@@ -424,7 +434,15 @@ namespace Prebuild.Core.Nodes | |||
424 | } | 434 | } |
425 | } | 435 | } |
426 | 436 | ||
427 | #endregion | 437 | public string DebugStartParameters |
438 | { | ||
439 | get | ||
440 | { | ||
441 | return m_DebugStartParameters; | ||
442 | } | ||
443 | } | ||
444 | |||
445 | #endregion | ||
428 | 446 | ||
429 | #region Private Methods | 447 | #region Private Methods |
430 | 448 | ||
@@ -470,13 +488,18 @@ namespace Prebuild.Core.Nodes | |||
470 | m_Language = Helper.AttributeValue(node, "language", m_Language); | 488 | m_Language = Helper.AttributeValue(node, "language", m_Language); |
471 | m_Type = (ProjectType)Helper.EnumAttributeValue(node, "type", typeof(ProjectType), m_Type); | 489 | m_Type = (ProjectType)Helper.EnumAttributeValue(node, "type", typeof(ProjectType), m_Type); |
472 | m_Runtime = (ClrRuntime)Helper.EnumAttributeValue(node, "runtime", typeof(ClrRuntime), m_Runtime); | 490 | m_Runtime = (ClrRuntime)Helper.EnumAttributeValue(node, "runtime", typeof(ClrRuntime), m_Runtime); |
491 | m_Framework = (FrameworkVersion)Helper.EnumAttributeValue(node, "frameworkVersion", typeof(FrameworkVersion), m_Framework); | ||
473 | m_StartupObject = Helper.AttributeValue(node, "startupObject", m_StartupObject); | 492 | m_StartupObject = Helper.AttributeValue(node, "startupObject", m_StartupObject); |
474 | m_RootNamespace = Helper.AttributeValue(node, "rootNamespace", m_RootNamespace); | 493 | m_RootNamespace = Helper.AttributeValue(node, "rootNamespace", m_RootNamespace); |
475 | m_GenerateAssemblyInfoFile = Helper.ParseBoolean(node, "generateAssemblyInfoFile", false); | 494 | |
476 | |||
477 | int hash = m_Name.GetHashCode(); | 495 | int hash = m_Name.GetHashCode(); |
478 | m_Guid = new Guid(hash, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); | 496 | Guid guidByHash = 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); | ||
479 | 499 | ||
500 | m_GenerateAssemblyInfoFile = Helper.ParseBoolean(node, "generateAssemblyInfoFile", false); | ||
501 | m_DebugStartParameters = Helper.AttributeValue(node, "debugStartParameters", string.Empty); | ||
502 | |||
480 | if(m_AssemblyName == null || m_AssemblyName.Length < 1) | 503 | if(m_AssemblyName == null || m_AssemblyName.Length < 1) |
481 | { | 504 | { |
482 | m_AssemblyName = m_Name; | 505 | m_AssemblyName = m_Name; |
@@ -516,15 +539,15 @@ namespace Prebuild.Core.Nodes | |||
516 | } | 539 | } |
517 | else if(dataNode is ReferencePathNode) | 540 | else if(dataNode is ReferencePathNode) |
518 | { | 541 | { |
519 | m_ReferencePaths.Add(dataNode); | 542 | m_ReferencePaths.Add((ReferencePathNode)dataNode); |
520 | } | 543 | } |
521 | else if(dataNode is ReferenceNode) | 544 | else if(dataNode is ReferenceNode) |
522 | { | 545 | { |
523 | m_References.Add(dataNode); | 546 | m_References.Add((ReferenceNode)dataNode); |
524 | } | 547 | } |
525 | else if(dataNode is AuthorNode) | 548 | else if(dataNode is AuthorNode) |
526 | { | 549 | { |
527 | m_Authors.Add(dataNode); | 550 | m_Authors.Add((AuthorNode)dataNode); |
528 | } | 551 | } |
529 | else if(dataNode is FilesNode) | 552 | else if(dataNode is FilesNode) |
530 | { | 553 | { |
@@ -548,6 +571,6 @@ namespace Prebuild.Core.Nodes | |||
548 | return this.m_Name.CompareTo(that.m_Name); | 571 | return this.m_Name.CompareTo(that.m_Name); |
549 | } | 572 | } |
550 | 573 | ||
551 | #endregion | 574 | #endregion |
552 | } | 575 | } |
553 | } | 576 | } |