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/Targets/ToolInfo.cs | |
parent | reverted last revision, until we decide how to handle capturing IM's (diff) | |
download | opensim-SC-dd9640cda82bca8125289f292238ea6b447cc6e9.zip opensim-SC-dd9640cda82bca8125289f292238ea6b447cc6e9.tar.gz opensim-SC-dd9640cda82bca8125289f292238ea6b447cc6e9.tar.bz2 opensim-SC-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/Targets/ToolInfo.cs')
-rw-r--r-- | Prebuild/src/Core/Targets/ToolInfo.cs | 197 |
1 files changed, 197 insertions, 0 deletions
diff --git a/Prebuild/src/Core/Targets/ToolInfo.cs b/Prebuild/src/Core/Targets/ToolInfo.cs new file mode 100644 index 0000000..935c674 --- /dev/null +++ b/Prebuild/src/Core/Targets/ToolInfo.cs | |||
@@ -0,0 +1,197 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | |||
5 | namespace Prebuild.Core.Targets | ||
6 | { | ||
7 | /// <summary> | ||
8 | /// | ||
9 | /// </summary> | ||
10 | public struct ToolInfo | ||
11 | { | ||
12 | string name; | ||
13 | string guid; | ||
14 | string fileExtension; | ||
15 | string xmlTag; | ||
16 | string importProject; | ||
17 | |||
18 | /// <summary> | ||
19 | /// Gets or sets the name. | ||
20 | /// </summary> | ||
21 | /// <value>The name.</value> | ||
22 | public string Name | ||
23 | { | ||
24 | get | ||
25 | { | ||
26 | return name; | ||
27 | } | ||
28 | set | ||
29 | { | ||
30 | name = value; | ||
31 | } | ||
32 | } | ||
33 | |||
34 | /// <summary> | ||
35 | /// Gets or sets the GUID. | ||
36 | /// </summary> | ||
37 | /// <value>The GUID.</value> | ||
38 | public string Guid | ||
39 | { | ||
40 | get | ||
41 | { | ||
42 | return guid; | ||
43 | } | ||
44 | set | ||
45 | { | ||
46 | guid = value; | ||
47 | } | ||
48 | } | ||
49 | |||
50 | /// <summary> | ||
51 | /// Gets or sets the file extension. | ||
52 | /// </summary> | ||
53 | /// <value>The file extension.</value> | ||
54 | public string FileExtension | ||
55 | { | ||
56 | get | ||
57 | { | ||
58 | return fileExtension; | ||
59 | } | ||
60 | set | ||
61 | { | ||
62 | fileExtension = value; | ||
63 | } | ||
64 | } | ||
65 | public string LanguageExtension | ||
66 | { | ||
67 | get | ||
68 | { | ||
69 | switch (this.Name) | ||
70 | { | ||
71 | case "C#": | ||
72 | return ".cs"; | ||
73 | case "VisualBasic": | ||
74 | return ".vb"; | ||
75 | case "Boo": | ||
76 | return ".boo"; | ||
77 | default: | ||
78 | return ".cs"; | ||
79 | } | ||
80 | } | ||
81 | } | ||
82 | /// <summary> | ||
83 | /// Gets or sets the XML tag. | ||
84 | /// </summary> | ||
85 | /// <value>The XML tag.</value> | ||
86 | public string XmlTag | ||
87 | { | ||
88 | get | ||
89 | { | ||
90 | return xmlTag; | ||
91 | } | ||
92 | set | ||
93 | { | ||
94 | xmlTag = value; | ||
95 | } | ||
96 | } | ||
97 | |||
98 | /// <summary> | ||
99 | /// Gets or sets the import project property. | ||
100 | /// </summary> | ||
101 | /// <value>The ImportProject tag.</value> | ||
102 | public string ImportProject | ||
103 | { | ||
104 | get | ||
105 | { | ||
106 | return importProject; | ||
107 | } | ||
108 | set | ||
109 | { | ||
110 | importProject = value; | ||
111 | } | ||
112 | } | ||
113 | |||
114 | /// <summary> | ||
115 | /// Initializes a new instance of the <see cref="ToolInfo"/> class. | ||
116 | /// </summary> | ||
117 | /// <param name="name">The name.</param> | ||
118 | /// <param name="guid">The GUID.</param> | ||
119 | /// <param name="fileExtension">The file extension.</param> | ||
120 | /// <param name="xml">The XML.</param> | ||
121 | /// <param name="importProject">The import project.</param> | ||
122 | public ToolInfo(string name, string guid, string fileExtension, string xml, string importProject) | ||
123 | { | ||
124 | this.name = name; | ||
125 | this.guid = guid; | ||
126 | this.fileExtension = fileExtension; | ||
127 | this.xmlTag = xml; | ||
128 | this.importProject = importProject; | ||
129 | } | ||
130 | |||
131 | /// <summary> | ||
132 | /// Initializes a new instance of the <see cref="ToolInfo"/> class. | ||
133 | /// </summary> | ||
134 | /// <param name="name">The name.</param> | ||
135 | /// <param name="guid">The GUID.</param> | ||
136 | /// <param name="fileExtension">The file extension.</param> | ||
137 | /// <param name="xml">The XML.</param> | ||
138 | public ToolInfo(string name, string guid, string fileExtension, string xml) | ||
139 | { | ||
140 | this.name = name; | ||
141 | this.guid = guid; | ||
142 | this.fileExtension = fileExtension; | ||
143 | this.xmlTag = xml; | ||
144 | this.importProject = "$(MSBuildBinPath)\\Microsoft." + xml + ".Targets"; | ||
145 | } | ||
146 | |||
147 | /// <summary> | ||
148 | /// Equals operator | ||
149 | /// </summary> | ||
150 | /// <param name="obj">ToolInfo to compare</param> | ||
151 | /// <returns>true if toolInfos are equal</returns> | ||
152 | public override bool Equals(object obj) | ||
153 | { | ||
154 | if (obj == null) | ||
155 | { | ||
156 | throw new ArgumentNullException("obj"); | ||
157 | } | ||
158 | if (obj.GetType() != typeof(ToolInfo)) | ||
159 | return false; | ||
160 | |||
161 | ToolInfo c = (ToolInfo)obj; | ||
162 | return ((this.name == c.name) && (this.guid == c.guid) && (this.fileExtension == c.fileExtension) && (this.importProject == c.importProject)); | ||
163 | } | ||
164 | |||
165 | /// <summary> | ||
166 | /// Equals operator | ||
167 | /// </summary> | ||
168 | /// <param name="c1">ToolInfo to compare</param> | ||
169 | /// <param name="c2">ToolInfo to compare</param> | ||
170 | /// <returns>True if toolInfos are equal</returns> | ||
171 | public static bool operator ==(ToolInfo c1, ToolInfo c2) | ||
172 | { | ||
173 | return ((c1.name == c2.name) && (c1.guid == c2.guid) && (c1.fileExtension == c2.fileExtension) && (c1.importProject == c2.importProject) && (c1.xmlTag == c2.xmlTag)); | ||
174 | } | ||
175 | |||
176 | /// <summary> | ||
177 | /// Not equals operator | ||
178 | /// </summary> | ||
179 | /// <param name="c1">ToolInfo to compare</param> | ||
180 | /// <param name="c2">ToolInfo to compare</param> | ||
181 | /// <returns>True if toolInfos are not equal</returns> | ||
182 | public static bool operator !=(ToolInfo c1, ToolInfo c2) | ||
183 | { | ||
184 | return !(c1 == c2); | ||
185 | } | ||
186 | |||
187 | /// <summary> | ||
188 | /// Hash Code | ||
189 | /// </summary> | ||
190 | /// <returns>Hash code</returns> | ||
191 | public override int GetHashCode() | ||
192 | { | ||
193 | return name.GetHashCode() ^ guid.GetHashCode() ^ this.fileExtension.GetHashCode() ^ this.importProject.GetHashCode() ^ this.xmlTag.GetHashCode(); | ||
194 | |||
195 | } | ||
196 | } | ||
197 | } | ||