diff options
author | Jeff Ames | 2008-03-17 20:55:21 +0000 |
---|---|---|
committer | Jeff Ames | 2008-03-17 20:55:21 +0000 |
commit | 79209c429705beb57ad9b787718856ab2c9fd37c (patch) | |
tree | 6f459e172985bce8ffbfc09a5b9a4594dd881a62 /Prebuild/src/Core/Nodes/ProjectNode.cs | |
parent | * More almost completely unproductive log message fiddling (diff) | |
download | opensim-SC_OLD-79209c429705beb57ad9b787718856ab2c9fd37c.zip opensim-SC_OLD-79209c429705beb57ad9b787718856ab2c9fd37c.tar.gz opensim-SC_OLD-79209c429705beb57ad9b787718856ab2c9fd37c.tar.bz2 opensim-SC_OLD-79209c429705beb57ad9b787718856ab2c9fd37c.tar.xz |
Merged changes in Prebuild trunk up to r258 into OpenSim's Prebuild.
Hopefully this should make merging upstream easier.
Building with NAnt should still work, but Visual Studio is untested.
Diffstat (limited to 'Prebuild/src/Core/Nodes/ProjectNode.cs')
-rw-r--r-- | Prebuild/src/Core/Nodes/ProjectNode.cs | 79 |
1 files changed, 61 insertions, 18 deletions
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 | } |