diff options
author | BlueWall | 2010-08-31 17:02:36 -0400 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-09-04 02:12:21 +0100 |
commit | 1e44ec84bd90ec9078027d1d9d78e83c7d305f2a (patch) | |
tree | e34db5ced4bc7bf59b98ff9fb72271dda0f25a33 | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-1e44ec84bd90ec9078027d1d9d78e83c7d305f2a.zip opensim-SC_OLD-1e44ec84bd90ec9078027d1d9d78e83c7d305f2a.tar.gz opensim-SC_OLD-1e44ec84bd90ec9078027d1d9d78e83c7d305f2a.tar.bz2 opensim-SC_OLD-1e44ec84bd90ec9078027d1d9d78e83c7d305f2a.tar.xz |
Build system upgrade:
Upgrading Prebuild.exe to correctly construct build solutions
for crossplatform tools such as xbuild, monodevelop and nant.
NOTE: Module prebuild files will need modification to work,
as the prebuild must correctly define the reference path for
all assemblies shipped in the OpenSimulator ./bin directory.
These include assemblies such as XMLRPC.dll, OpenMetaverse.dll,
Nini.dll, etc. . The entries should follow the form:
<Reference name="Nini" path="../../../bin/"/>
See the distributed prebuild.xml for further examples.
Crossplatform tools: xbuild and monodevelop use the
vs2008 OpenSim.sln and the .csproj files in each namespace.
Changes to the Prebuild.exe are against svn 322 and are included
in a patch attached to the mantis. And the dnpb source are
available@ svn co https://dnpb.svn.sourceforge.net/svnroot/dnpb dnpb
The patches are pending application by the dnpb team. After which,
the un-modified upstream Prebuild.exe will work as expected.
99 files changed, 560 insertions, 19149 deletions
diff --git a/Prebuild/clean.bat b/Prebuild/clean.bat deleted file mode 100755 index 1d71cbf..0000000 --- a/Prebuild/clean.bat +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | NAnt.exe clean \ No newline at end of file | ||
diff --git a/Prebuild/clean.sh b/Prebuild/clean.sh deleted file mode 100755 index 900b6ed..0000000 --- a/Prebuild/clean.sh +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | nant clean | ||
diff --git a/Prebuild/doc/prebuild-example1.xml b/Prebuild/doc/prebuild-example1.xml deleted file mode 100644 index a2cee42..0000000 --- a/Prebuild/doc/prebuild-example1.xml +++ /dev/null | |||
@@ -1,300 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <Prebuild version="1.6" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd"> | ||
3 | <Solution name="RealmForge"> | ||
4 | <Configuration name="Debug"> | ||
5 | <Options> | ||
6 | <CompilerDefines>TRACE;DEBUG</CompilerDefines> | ||
7 | <OptimizeCode>false</OptimizeCode> | ||
8 | <CheckUnderflowOverflow>false</CheckUnderflowOverflow> | ||
9 | <AllowUnsafe>false</AllowUnsafe> | ||
10 | <WarningLevel>4</WarningLevel> | ||
11 | <WarningsAsErrors>false</WarningsAsErrors> | ||
12 | <SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings> | ||
13 | <OutputPath>..\bin</OutputPath> | ||
14 | <DebugInformation>true</DebugInformation> | ||
15 | <RegisterComInterop>false</RegisterComInterop> | ||
16 | <IncrementalBuild>true</IncrementalBuild> | ||
17 | <BaseAddress>285212672</BaseAddress> | ||
18 | <FileAlignment>4096</FileAlignment> | ||
19 | <NoStdLib>false</NoStdLib> | ||
20 | <XmlDocFile>Docs.xml</XmlDocFile> | ||
21 | </Options> | ||
22 | </Configuration> | ||
23 | <Configuration name="Release"> | ||
24 | <Options> | ||
25 | <CompilerDefines>TRACE</CompilerDefines> | ||
26 | <OptimizeCode>true</OptimizeCode> | ||
27 | <CheckUnderflowOverflow>false</CheckUnderflowOverflow> | ||
28 | <AllowUnsafe>false</AllowUnsafe> | ||
29 | <WarningLevel>4</WarningLevel> | ||
30 | <WarningsAsErrors>false</WarningsAsErrors> | ||
31 | <SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings> | ||
32 | <OutputPath>..\bin</OutputPath> | ||
33 | <DebugInformation>false</DebugInformation> | ||
34 | <RegisterComInterop>false</RegisterComInterop> | ||
35 | <IncrementalBuild>true</IncrementalBuild> | ||
36 | <BaseAddress>285212672</BaseAddress> | ||
37 | <FileAlignment>4096</FileAlignment> | ||
38 | <NoStdLib>false</NoStdLib> | ||
39 | <XmlDocFile>Docs.xml</XmlDocFile> | ||
40 | </Options> | ||
41 | </Configuration> | ||
42 | |||
43 | <Project name="RealmForge.Utility" path="Utility" type="Library" assemblyName="RealmForge.Utility" rootNamespace="RealmForge"> | ||
44 | <Configuration name="Debug"> | ||
45 | <Options> | ||
46 | <OutputPath>..\bin\lib\Utility</OutputPath> | ||
47 | <XmlDocFile>RealmForge.Utility.xml</XmlDocFile> | ||
48 | </Options> | ||
49 | </Configuration> | ||
50 | <Configuration name="Release"> | ||
51 | <Options> | ||
52 | <OutputPath>..\bin\lib\Utility</OutputPath> | ||
53 | <XmlDocFile>RealmForge.Utility.xml</XmlDocFile> | ||
54 | </Options> | ||
55 | </Configuration> | ||
56 | <ReferencePath>../bin</ReferencePath> | ||
57 | <Reference name="System"/> | ||
58 | <Reference name="System.Data"/> | ||
59 | <Reference name="System.Drawing"/> | ||
60 | <Reference name="System.Xml"/> | ||
61 | <Reference name="System.Runtime.Serialization.Formatters.Soap"/> | ||
62 | <Reference name="ICSharpCode.SharpZipLib"/> | ||
63 | <Files> | ||
64 | <Match pattern="*.cs" recurse="true"/> | ||
65 | </Files> | ||
66 | </Project> | ||
67 | |||
68 | <Project name="RealmForge.Framework" path="Framework" type="Library" assemblyName="RealmForge.Framework" rootNamespace="RealmForge"> | ||
69 | <Configuration name="Debug"> | ||
70 | <Options> | ||
71 | <OutputPath>..\bin\lib\Framework</OutputPath> | ||
72 | <XmlDocFile>RealmForge.Framework.xml</XmlDocFile> | ||
73 | </Options> | ||
74 | </Configuration> | ||
75 | <Configuration name="Release"> | ||
76 | <Options> | ||
77 | <OutputPath>..\bin\lib\Framework</OutputPath> | ||
78 | <XmlDocFile>RealmForge.Framework.xml</XmlDocFile> | ||
79 | </Options> | ||
80 | </Configuration> | ||
81 | <ReferencePath>../bin</ReferencePath> | ||
82 | <Reference name="System"/> | ||
83 | <Reference name="System.Data"/> | ||
84 | <Reference name="System.Xml"/> | ||
85 | <Reference name="System.Windows.Forms"/> | ||
86 | <Reference name="System.Drawing"/> | ||
87 | <Reference name="Axiom.MathLib"/> | ||
88 | <Reference name="RealmForge.Utility"/> | ||
89 | <Reference name="Tao.OpenAl"/> | ||
90 | <Reference name="ICSharpCode.SharpZipLib"/> | ||
91 | <Reference name="csogg"/> | ||
92 | <Reference name="csvorbis"/> | ||
93 | <Files> | ||
94 | <Match pattern="*.cs" recurse="true"/> | ||
95 | <Match pattern="*.txt" recurse="true"/> | ||
96 | </Files> | ||
97 | </Project> | ||
98 | |||
99 | <Project name="RealmForge.Genres" path="Genres" type="Library" assemblyName="RealmForge.Genres" rootNamespace="RealmForge"> | ||
100 | <Configuration name="Debug"> | ||
101 | <Options> | ||
102 | <OutputPath>..\bin\lib\Genres</OutputPath> | ||
103 | <XmlDocFile>RealmForge.Genres.xml</XmlDocFile> | ||
104 | </Options> | ||
105 | </Configuration> | ||
106 | <Configuration name="Release"> | ||
107 | <Options> | ||
108 | <OutputPath>..\bin\lib\Genres</OutputPath> | ||
109 | <XmlDocFile>RealmForge.Genres.xml</XmlDocFile> | ||
110 | </Options> | ||
111 | </Configuration> | ||
112 | <ReferencePath>../bin</ReferencePath> | ||
113 | <Reference name="System"/> | ||
114 | <Reference name="System.Data"/> | ||
115 | <Reference name="System.Xml"/> | ||
116 | <Reference name="System.Windows.Forms"/> | ||
117 | <Reference name="System.Drawing"/> | ||
118 | <Reference name="Axiom.MathLib"/> | ||
119 | <Reference name="RealmForge.Utility"/> | ||
120 | <Reference name="RealmForge.Framework"/> | ||
121 | <Files> | ||
122 | <Match pattern="*.cs" recurse="true"/> | ||
123 | </Files> | ||
124 | </Project> | ||
125 | |||
126 | <Project name="RealmForge.UI.Forms" path="Forms" type="Library" assemblyName="RealmForge.UI.Forms" rootNamespace="RealmForge"> | ||
127 | <Configuration name="Debug"> | ||
128 | <Options> | ||
129 | <OutputPath>..\bin\lib\Forms</OutputPath> | ||
130 | <XmlDocFile>RealmForge.UI.Forms.xml</XmlDocFile> | ||
131 | <AllowUnsafe>true</AllowUnsafe> | ||
132 | </Options> | ||
133 | </Configuration> | ||
134 | <Configuration name="Release"> | ||
135 | <Options> | ||
136 | <OutputPath>..\bin\lib\Forms</OutputPath> | ||
137 | <XmlDocFile>RealmForge.UI.Forms.xml</XmlDocFile> | ||
138 | <AllowUnsafe>true</AllowUnsafe> | ||
139 | </Options> | ||
140 | </Configuration> | ||
141 | <ReferencePath>../bin</ReferencePath> | ||
142 | <Reference name="System"/> | ||
143 | <Reference name="System.Drawing"/> | ||
144 | <Reference name="System.Data"/> | ||
145 | <Reference name="System.Design"/> | ||
146 | <Reference name="System.Windows.Forms"/> | ||
147 | <Reference name="System.Xml"/> | ||
148 | <Reference name="Axiom.MathLib"/> | ||
149 | <Reference name="wx.NET"/> | ||
150 | <Reference name="RealmForge.Framework"/> | ||
151 | <Reference name="RealmForge.Utility"/> | ||
152 | <Files> | ||
153 | <File buildAction="EmbeddedResource">IDE\Resources\ImagesCaptionIDE.bmp</File> | ||
154 | <File buildAction="EmbeddedResource">IDE\Resources\ImagesCaptionPlain.bmp</File> | ||
155 | <File buildAction="EmbeddedResource">IDE\Resources\ImagesMenuControl.bmp</File> | ||
156 | <File buildAction="EmbeddedResource">IDE\Resources\ImagesPopupMenu.bmp</File> | ||
157 | <File buildAction="EmbeddedResource">IDE\Resources\ImagesTabbedGroups.bmp</File> | ||
158 | <File buildAction="EmbeddedResource">IDE\Resources\ImagesTabControl.bmp</File> | ||
159 | <File buildAction="EmbeddedResource">IDE\Resources\LibraryIcon.ico</File> | ||
160 | <File buildAction="EmbeddedResource">IDE\Resources\TabbedInvalid.cur</File> | ||
161 | <File buildAction="EmbeddedResource">IDE\Resources\TabbedValid.cur</File> | ||
162 | <File buildAction="EmbeddedResource">IDE\Resources\WizardPicture.bmp</File> | ||
163 | <File buildAction="EmbeddedResource">Controls\Trees\tv_minus.bmp</File> | ||
164 | <File buildAction="EmbeddedResource">Controls\Trees\tv_plus.bmp</File> | ||
165 | <File buildAction="EmbeddedResource">Controls\Trees\treeview.bmp</File> | ||
166 | <File buildAction="EmbeddedResource">Controls\Trees\listview.bmp</File> | ||
167 | <File buildAction="EmbeddedResource">IDE\Menus\MenuControl.bmp</File> | ||
168 | <File buildAction="EmbeddedResource">IDE\Controls\InertButton.bmp</File> | ||
169 | <File buildAction="EmbeddedResource">IDE\Controls\TabbedGroups.bmp</File> | ||
170 | <File buildAction="EmbeddedResource">IDE\Controls\TabCOntrol.bmp</File> | ||
171 | <File buildAction="EmbeddedResource">IDE\Controls\WizardControl.bmp</File> | ||
172 | <File buildAction="EmbeddedResource">Forms\IDETest.resx</File> | ||
173 | <File buildAction="EmbeddedResource">Forms\IDEWindow.resx</File> | ||
174 | <File buildAction="EmbeddedResource">Forms\Launcher.resx</File> | ||
175 | <File buildAction="EmbeddedResource">Forms\MainRenderFrame.resx</File> | ||
176 | <Match pattern="*.cs" recurse="true"/> | ||
177 | </Files> | ||
178 | </Project> | ||
179 | |||
180 | <Project name="RealmForge.RAGE" path="RAGE" type="Library" assemblyName="RealmForge.RAGE" rootNamespace="RealmForge"> | ||
181 | <Configuration name="Debug"> | ||
182 | <Options> | ||
183 | <OutputPath>..\bin\lib\RAGE</OutputPath> | ||
184 | <XmlDocFile>RealmForge.RAGE.xml</XmlDocFile> | ||
185 | </Options> | ||
186 | </Configuration> | ||
187 | <Configuration name="Release"> | ||
188 | <Options> | ||
189 | <OutputPath>..\bin\lib\RAGE</OutputPath> | ||
190 | <XmlDocFile>RealmForge.RAGE.xml</XmlDocFile> | ||
191 | </Options> | ||
192 | </Configuration> | ||
193 | <ReferencePath>../bin</ReferencePath> | ||
194 | <ReferencePath>../bin</ReferencePath> | ||
195 | <Reference name="System"/> | ||
196 | <Reference name="System.XML"/> | ||
197 | <Reference name="System.Windows.Forms"/> | ||
198 | <Reference name="System.Drawing"/> | ||
199 | <Reference name="Axiom.Plugins.CgProgramManager"/> | ||
200 | <Reference name="Axiom.Engine"/> | ||
201 | <Reference name="Axiom.MathLib"/> | ||
202 | <Reference name="Axiom.Plugins.ParticleFX"/> | ||
203 | <Reference name="Axiom.Platforms.Win32"/> | ||
204 | <Reference name="Axiom.RenderSystems.DirectX9"/> | ||
205 | <Reference localCopy="false" name="Axiom.RenderSystems.OpenGL"/> | ||
206 | <Reference name="Axiom.SceneManagers.Octree"/> | ||
207 | <Reference name="ICSharpCode.SharpZipLib"/> | ||
208 | <Reference name="System.Data"/> | ||
209 | <Reference name="RealmForge.Framework"/> | ||
210 | <Reference name="RealmForge.Utility"/> | ||
211 | <Reference name="ode"/> | ||
212 | <Files> | ||
213 | <Match pattern="*.cs" recurse="true"/> | ||
214 | </Files> | ||
215 | </Project> | ||
216 | |||
217 | |||
218 | <Project name="RealmForge.ScriptLibrary" path="ScriptLibrary" type="Library" assemblyName="RealmForge.ScriptLibrary" rootNamespace="RSL"> | ||
219 | <Configuration name="Debug"> | ||
220 | <Options> | ||
221 | <OutputPath>..\bin\ScriptLibrary</OutputPath> | ||
222 | <XmlDocFile>RealmForge.ScriptLibrary.xml</XmlDocFile> | ||
223 | </Options> | ||
224 | </Configuration> | ||
225 | <Configuration name="Release"> | ||
226 | <Options> | ||
227 | <OutputPath>..\bin\ScriptLibrary</OutputPath> | ||
228 | <XmlDocFile>RealmForge.ScriptLibrary.xml</XmlDocFile> | ||
229 | </Options> | ||
230 | </Configuration> | ||
231 | <ReferencePath>../bin</ReferencePath> | ||
232 | <Reference name="System"/> | ||
233 | <Reference name="System.XML"/> | ||
234 | <Reference name="System.Windows.Forms"/> | ||
235 | <Reference name="System.Drawing"/> | ||
236 | <Reference name="Axiom.MathLib"/> | ||
237 | <Reference name="wx.NET"/> | ||
238 | <Reference name="RealmForge.UI.Forms"/> | ||
239 | <Reference name="RealmForge.RAGE"/> | ||
240 | <Reference name="RealmForge.Framework"/> | ||
241 | <Reference name="RealmForge.Utility"/> | ||
242 | <Files> | ||
243 | <Match pattern="*.cs" recurse="true"/> | ||
244 | </Files> | ||
245 | </Project> | ||
246 | |||
247 | |||
248 | <Project name="Updater" path="Updater" type="WinExe" icon="..\bin\Updater.ico" assemblyName="Updater" rootNamespace="RealmForge"> | ||
249 | <Configuration name="Debug"> | ||
250 | <Options> | ||
251 | <OutputPath>..\bin\lib\Updater</OutputPath> | ||
252 | <XmlDocFile>Updater.xml</XmlDocFile> | ||
253 | </Options> | ||
254 | </Configuration> | ||
255 | <Configuration name="Release"> | ||
256 | <Options> | ||
257 | <OutputPath>..\bin\lib\Updater</OutputPath> | ||
258 | <XmlDocFile>Updater.xml</XmlDocFile> | ||
259 | </Options> | ||
260 | </Configuration> | ||
261 | <ReferencePath>../bin</ReferencePath> | ||
262 | <Reference name="System"/> | ||
263 | <Reference name="RealmForge.UI.Forms"/> | ||
264 | <Reference name="RealmForge.Framework"/> | ||
265 | <Reference name="RealmForge.Utility"/> | ||
266 | <Files> | ||
267 | <Match pattern="*.cs" recurse="true"/> | ||
268 | </Files> | ||
269 | </Project> | ||
270 | |||
271 | |||
272 | <Project name="DemoGame" path="DemoGame" type="WinExe" icon="..\bin\RealmForge.ico" assemblyName="DemoGame" rootNamespace="RealmForge"> | ||
273 | <Configuration name="Debug"> | ||
274 | <Options> | ||
275 | <OutputPath>..\bin</OutputPath> | ||
276 | <XmlDocFile>DemoGame.xml</XmlDocFile> | ||
277 | </Options> | ||
278 | </Configuration> | ||
279 | <Configuration name="Release"> | ||
280 | <Options> | ||
281 | <OutputPath>..\bin</OutputPath> | ||
282 | <XmlDocFile>DemoGame.xml</XmlDocFile> | ||
283 | </Options> | ||
284 | </Configuration> | ||
285 | <ReferencePath>../bin</ReferencePath> | ||
286 | <Reference name="System"/> | ||
287 | <Reference name="RealmForge.UI.Forms"/> | ||
288 | <Reference name="RealmForge.ScriptLibrary"/> | ||
289 | <Reference name="RealmForge.RAGE"/> | ||
290 | <Reference name="RealmForge.Framework"/> | ||
291 | <Reference name="RealmForge.Utility"/> | ||
292 | <Files> | ||
293 | <Match pattern="*.cs" recurse="true"/> | ||
294 | </Files> | ||
295 | </Project> | ||
296 | |||
297 | </Solution> | ||
298 | </Prebuild> | ||
299 | |||
300 | |||
diff --git a/Prebuild/doc/prebuild-example2.xml b/Prebuild/doc/prebuild-example2.xml deleted file mode 100644 index bd23c4f..0000000 --- a/Prebuild/doc/prebuild-example2.xml +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd"> | ||
3 | <Solution name="Prebuild"> | ||
4 | <Configuration name="Debug"> | ||
5 | <Options> | ||
6 | <?if OS = "Win32" ?> | ||
7 | <CompilerDefines>DEBUG;TRACE;WIN32;NET</CompilerDefines> | ||
8 | <?else ?> | ||
9 | <CompilerDefines>DEBUG;TRACE;POSIX</CompilerDefines> | ||
10 | <?endif ?> | ||
11 | <OptimizeCode>false</OptimizeCode> | ||
12 | <OutputPath>bin\Debug</OutputPath> | ||
13 | <DebugInformation>true</DebugInformation> | ||
14 | <SuppressWarnings>1595</SuppressWarnings> | ||
15 | </Options> | ||
16 | </Configuration> | ||
17 | <Configuration name="Release"> | ||
18 | <Options> | ||
19 | <?if OS = "Win32" ?> | ||
20 | <CompilerDefines>TRACE;WIN32;NET</CompilerDefines> | ||
21 | <?else ?> | ||
22 | <CompilerDefines>TRACE;POSIX</CompilerDefines> | ||
23 | <?endif ?> | ||
24 | <OutputPath>bin\Release</OutputPath> | ||
25 | <OptimizeCode>true</OptimizeCode> | ||
26 | <DebugInformation>false</DebugInformation> | ||
27 | <SuppressWarnings>1595</SuppressWarnings> | ||
28 | </Options> | ||
29 | </Configuration> | ||
30 | <Files> | ||
31 | <File>prebuild.xml</File> | ||
32 | <Match path="doc" pattern="*.txt"/> | ||
33 | </Files> | ||
34 | <Project name="Prebuild" path="src" language="C#" assemblyName="Prebuild" icon="App.ico" type="Exe" rootNamespace="Prebuild" startupObject="Prebuild.Prebuild"> | ||
35 | <Configuration name="Debug"> | ||
36 | <Options> | ||
37 | <?if OS = "Win32" ?> | ||
38 | <CompilerDefines>DEBUG;TRACE;WIN32;NET</CompilerDefines> | ||
39 | <?else ?> | ||
40 | <CompilerDefines>DEBUG;TRACE;POSIX</CompilerDefines> | ||
41 | <?endif ?> | ||
42 | <OptimizeCode>false</OptimizeCode> | ||
43 | <OutputPath>bin\Debug</OutputPath> | ||
44 | <DebugInformation>true</DebugInformation> | ||
45 | <XmlDocFile>Prebuild.xml</XmlDocFile> | ||
46 | <SuppressWarnings>1595</SuppressWarnings> | ||
47 | </Options> | ||
48 | </Configuration> | ||
49 | <Configuration name="Release"> | ||
50 | <Options> | ||
51 | <?if OS = "Win32" ?> | ||
52 | <CompilerDefines>TRACE;WIN32;NET</CompilerDefines> | ||
53 | <?else ?> | ||
54 | <CompilerDefines>TRACE;POSIX</CompilerDefines> | ||
55 | <?endif ?> | ||
56 | <OutputPath>bin\Release</OutputPath> | ||
57 | <OptimizeCode>true</OptimizeCode> | ||
58 | <DebugInformation>false</DebugInformation> | ||
59 | <XmlDocFile>Prebuild.xml</XmlDocFile> | ||
60 | <SuppressWarnings>1595</SuppressWarnings> | ||
61 | </Options> | ||
62 | </Configuration> | ||
63 | <Reference name="System.Xml" /> | ||
64 | <Reference name="System" /> | ||
65 | <Files> | ||
66 | <Match pattern="App.ico" buildAction="EmbeddedResource"/> | ||
67 | <Match path="data" pattern="prebuild-1.6.xsd" buildAction="EmbeddedResource"/> | ||
68 | <Match pattern="*.cs" recurse="true"/> | ||
69 | </Files> | ||
70 | </Project> | ||
71 | </Solution> | ||
72 | </Prebuild> | ||
diff --git a/Prebuild/doc/prebuild-example3.xml b/Prebuild/doc/prebuild-example3.xml deleted file mode 100644 index 0111562..0000000 --- a/Prebuild/doc/prebuild-example3.xml +++ /dev/null | |||
@@ -1,113 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <!--The version of the XML schema specified in the version and xmlns attributes should match the one for which the version of Prebuild.exe used was compiled for. In this example it is the version 1.6 schema, you can find the XSD schema file at the url specified in the xmlns attribute. --> | ||
3 | <Prebuild version="1.6" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd"> | ||
4 | <Solution name="RealmForge"> <!--The title and file name for the solution, combine, workspace, or project group (depending on what development tool you are using)--> | ||
5 | <!--Configurations found as children of Solution are used as templates for the configurations found in the project, this allows you to avoid writing the same options in each project (and maintaining each of these). You can provide defaults and then override them in the configurations defined for each project. All options are optional.--> | ||
6 | <Configuration name="Debug"> | ||
7 | <Options> | ||
8 | <!-- simple logically expressions can be evaluated, if, else, elseif, and endif are valid statements. Note that it is not neccisary to define POSIX or WIN32 --> | ||
9 | <?if OS = "Win32" ?> | ||
10 | <CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines> | ||
11 | <?else ?> | ||
12 | <CompilerDefines>DEBUG;TRACE;POSIX</CompilerDefines> | ||
13 | <?endif ?> | ||
14 | <OptimizeCode>false</OptimizeCode> | ||
15 | <CheckUnderflowOverflow>false</CheckUnderflowOverflow> | ||
16 | <AllowUnsafe>false</AllowUnsafe> | ||
17 | <WarningLevel>4</WarningLevel> | ||
18 | <!--The filter for the number of warnings or errors shown and the tolerance level as to what is an error. This is value from 0 to 4 where 4 is the most strict (least tolerent).--> | ||
19 | |||
20 | <WarningsAsErrors>false</WarningsAsErrors> | ||
21 | <SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings> | ||
22 | <!-- A semicolon ';' delimited list of the warnings that are filtered and not shown in the output window during compiling a project. Only include the number portion of the warning codes that are shown in output during compilation (eg CS1591, should be entered as 1591)--> | ||
23 | |||
24 | <OutputPath>..\bin</OutputPath> | ||
25 | <DebugInformation>true</DebugInformation> | ||
26 | <RegisterComInterop>false</RegisterComInterop> | ||
27 | <IncrementalBuild>true</IncrementalBuild> | ||
28 | <BaseAddress>285212672</BaseAddress> | ||
29 | <FileAlignment>4096</FileAlignment> | ||
30 | <NoStdLib>false</NoStdLib> | ||
31 | <XmlDocFile>Docs.xml</XmlDocFile> | ||
32 | </Options> | ||
33 | </Configuration> | ||
34 | <Configuration name="Release"> <!-- You can define multple configurations that projects can have, but there is no way to define which one is selected by default as this is a part of the user preferences for a project, not the solution or project files --> | ||
35 | <Options> | ||
36 | <CompilerDefines>TRACE</CompilerDefines> | ||
37 | <OptimizeCode>true</OptimizeCode> | ||
38 | <CheckUnderflowOverflow>false</CheckUnderflowOverflow> | ||
39 | <AllowUnsafe>false</AllowUnsafe> | ||
40 | <WarningLevel>4</WarningLevel> | ||
41 | <WarningsAsErrors>false</WarningsAsErrors> | ||
42 | <SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings> | ||
43 | <OutputPath>..\bin</OutputPath> | ||
44 | <DebugInformation>false</DebugInformation> | ||
45 | <RegisterComInterop>false</RegisterComInterop> | ||
46 | <IncrementalBuild>true</IncrementalBuild> | ||
47 | <BaseAddress>285212672</BaseAddress> | ||
48 | <FileAlignment>4096</FileAlignment> | ||
49 | <NoStdLib>false</NoStdLib> | ||
50 | <XmlDocFile>Docs.xml</XmlDocFile> | ||
51 | </Options> | ||
52 | </Configuration> | ||
53 | |||
54 | <!-- One of the projects that is included in the Solution --> | ||
55 | <Project name="RealmForge.Utility" path="Utility" type="Library" assemblyName="RealmForge.Utility" rootNamespace="RealmForge"> | ||
56 | <Configuration name="Debug"> | ||
57 | <Options> | ||
58 | <OutputPath>..\bin\lib\Utility</OutputPath> | ||
59 | <XmlDocFile>RealmForge.Utility.xml</XmlDocFile> | ||
60 | </Options> | ||
61 | </Configuration> | ||
62 | <Configuration name="Release"> | ||
63 | <Options> | ||
64 | <OutputPath>..\bin\lib\Utility</OutputPath> | ||
65 | <XmlDocFile>RealmForge.Utility.xml</XmlDocFile> | ||
66 | </Options> | ||
67 | </Configuration> | ||
68 | <ReferencePath>../bin</ReferencePath> | ||
69 | <Reference name="System"/> | ||
70 | <Reference name="System.Data"/> | ||
71 | <Reference name="System.Drawing"/> | ||
72 | <Reference name="System.Xml"/> | ||
73 | <Reference name="System.Runtime.Serialization.Formatters.Soap"/> | ||
74 | <Reference name="ICSharpCode.SharpZipLib"/> | ||
75 | <Files> | ||
76 | <Match pattern="*.cs" recurse="true"/> | ||
77 | </Files> | ||
78 | </Project> | ||
79 | |||
80 | <!-- Another projects that is included in the Solution --> | ||
81 | <Project name="DemoGame" path="DemoGame" type="WinExe" icon="..\bin\RealmForge.ico" assemblyName="DemoGame" rootNamespace="RealmForge"> | ||
82 | <!-- icon is used to define the location of the .ico file that is embeeded in the assembly when the project is compiled. This is relative to the project path --> | ||
83 | <!--type defines the type of project, valid types are Library (.dll), WinExe (.exe), and Exe (.exe). WinExe is not windows specific, it just defines that it is a GUI application and that no Console or Command window will show when it is started--> | ||
84 | |||
85 | <Configuration name="Debug"> | ||
86 | <Options> | ||
87 | <OutputPath>..\bin</OutputPath> | ||
88 | <XmlDocFile>DemoGame.xml</XmlDocFile> | ||
89 | </Options> | ||
90 | </Configuration> | ||
91 | <Configuration name="Release"> | ||
92 | <Options> | ||
93 | <OutputPath>..\bin</OutputPath> | ||
94 | <XmlDocFile>DemoGame.xml</XmlDocFile> | ||
95 | </Options> | ||
96 | </Configuration> | ||
97 | <ReferencePath>../bin</ReferencePath> | ||
98 | <Reference name="System"/> <!-- Assemblies that are located in the GAC (installed, global) can be referenced--> | ||
99 | <Reference name="ode"/> <!-- Assemblies that are located in the output directory to which the file is built can be referenced --> | ||
100 | <Reference name="RealmForge.Utility"/> <!-- When you reference the name of another project, then that project (and it's output) will be referenced instead of looking for a pre-built assembly--> | ||
101 | <Files> | ||
102 | <!-- path defaults to . or the directory that prebuild.exe resides in --> | ||
103 | <Match path="." pattern="*.cs" recurse="true"/> | ||
104 | <Match pattern="*.bmp" recurse="true" buildAction="EmbeddedResource"/> | ||
105 | <Match pattern="[^a]*\.(png|jpg)" useRegex="true" buildAction="EmbeddedResource"/> | ||
106 | |||
107 | <!-- Uses a regex or regular expression to find all files that end with .png or .jpg but dont have the letter 'a' in their name and add them to the project as EmbeddedResource's. Because recurse enabled (default is false), only the values in the files in that are directly in the project directory (not child directories) are checked.--> | ||
108 | <!--EmbeddedResource, Content, and Compile are valid buildAction's--> | ||
109 | </Files> | ||
110 | </Project> | ||
111 | |||
112 | </Solution> | ||
113 | </Prebuild> | ||
diff --git a/Prebuild/doc/prebuild-example4.xml b/Prebuild/doc/prebuild-example4.xml deleted file mode 100644 index e5861b8..0000000 --- a/Prebuild/doc/prebuild-example4.xml +++ /dev/null | |||
@@ -1,715 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd" version="1.6"> | ||
3 | <Solution name="SdlDotNet"> | ||
4 | <Configuration name="Debug"> | ||
5 | <Options> | ||
6 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
7 | <OptimizeCode>false</OptimizeCode> | ||
8 | <AllowUnsafe>false</AllowUnsafe> | ||
9 | <OutputPath>bin\Debug</OutputPath> | ||
10 | <DebugInformation>true</DebugInformation> | ||
11 | <WarningLevel>4</WarningLevel> | ||
12 | <SuppressWarnings>1595</SuppressWarnings> | ||
13 | </Options> | ||
14 | </Configuration> | ||
15 | <Configuration name="Release"> | ||
16 | <Options> | ||
17 | <CompilerDefines>TRACE</CompilerDefines> | ||
18 | <OptimizeCode>true</OptimizeCode> | ||
19 | <AllowUnsafe>false</AllowUnsafe> | ||
20 | <OutputPath>bin\Release</OutputPath> | ||
21 | <DebugInformation>false</DebugInformation> | ||
22 | <WarningLevel>1</WarningLevel> | ||
23 | <SuppressWarnings>1595</SuppressWarnings> | ||
24 | </Options> | ||
25 | </Configuration> | ||
26 | <Files> | ||
27 | <File buildAction="Content">SdlDotNet.build</File> | ||
28 | <File buildAction="Content">prebuild.xml</File> | ||
29 | </Files> | ||
30 | <Project name="SdlDotNet" path="src" language="C#" type="Library" assemblyName="SdlDotNet" rootNamespace="SdlDotNet"> | ||
31 | <Configuration name="Debug"> | ||
32 | <Options> | ||
33 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
34 | <OptimizeCode>false</OptimizeCode> | ||
35 | <AllowUnsafe>false</AllowUnsafe> | ||
36 | <OutputPath>bin\Debug</OutputPath> | ||
37 | <DebugInformation>true</DebugInformation> | ||
38 | <XmlDocFile>SdlDotNet.xml</XmlDocFile> | ||
39 | <WarningLevel>4</WarningLevel> | ||
40 | <SuppressWarnings>1595</SuppressWarnings> | ||
41 | </Options> | ||
42 | </Configuration> | ||
43 | <Configuration name="Release"> | ||
44 | <Options> | ||
45 | <CompilerDefines>TRACE</CompilerDefines> | ||
46 | <OptimizeCode>true</OptimizeCode> | ||
47 | <AllowUnsafe>false</AllowUnsafe> | ||
48 | <OutputPath>bin\Release</OutputPath> | ||
49 | <XmlDocFile>SdlDotNet.xml</XmlDocFile> | ||
50 | <DebugInformation>false</DebugInformation> | ||
51 | <WarningLevel>1</WarningLevel> | ||
52 | <SuppressWarnings>1595</SuppressWarnings> | ||
53 | </Options> | ||
54 | </Configuration> | ||
55 | <Reference name="System" /> | ||
56 | <Reference name="System.Windows.Forms" /> | ||
57 | <Reference name="System.Drawing" /> | ||
58 | <Reference name="Tao.Sdl" localCopy="true" path="..\\lib"/> | ||
59 | <Files> | ||
60 | <Match path="." pattern="SurfaceControl.cs" subType="Component" recurse="true"/> | ||
61 | <Match path="." pattern="*.bmp" buildAction="EmbeddedResource" recurse="true"/> | ||
62 | <Match path="." pattern="*.cs" recurse="true"> | ||
63 | <Exclude name="SurfaceControl.cs"/> | ||
64 | </Match> | ||
65 | </Files> | ||
66 | </Project> | ||
67 | <Project name="Rectangles" path="examples\\Rectangles" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.Rectangles.Rectangles" assemblyName="Rectangles" rootNamespace="SdlDotNet.Examples.Rectangles" icon="App.ico"> | ||
68 | <Configuration name="Debug"> | ||
69 | <Options> | ||
70 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
71 | <OptimizeCode>false</OptimizeCode> | ||
72 | <AllowUnsafe>false</AllowUnsafe> | ||
73 | <OutputPath>bin\Debug</OutputPath> | ||
74 | <DebugInformation>true</DebugInformation> | ||
75 | <XmlDocFile>Rectangles.xml</XmlDocFile> | ||
76 | <WarningLevel>4</WarningLevel> | ||
77 | <SuppressWarnings>1595</SuppressWarnings> | ||
78 | </Options> | ||
79 | </Configuration> | ||
80 | <Configuration name="Release"> | ||
81 | <Options> | ||
82 | <CompilerDefines>TRACE</CompilerDefines> | ||
83 | <OptimizeCode>true</OptimizeCode> | ||
84 | <AllowUnsafe>false</AllowUnsafe> | ||
85 | <OutputPath>bin\Release</OutputPath> | ||
86 | <DebugInformation>false</DebugInformation> | ||
87 | <XmlDocFile>Rectangles.xml</XmlDocFile> | ||
88 | <WarningLevel>1</WarningLevel> | ||
89 | <SuppressWarnings>1595</SuppressWarnings> | ||
90 | </Options> | ||
91 | </Configuration> | ||
92 | <Reference name="System" /> | ||
93 | <Reference name="System.Drawing" /> | ||
94 | <Reference name="SdlDotNet" localCopy="true"/> | ||
95 | <Files> | ||
96 | <File buildAction="EmbeddedResource">App.ico</File> | ||
97 | <Match path="." pattern="*.cs" recurse="true"/> | ||
98 | </Files> | ||
99 | </Project> | ||
100 | <Project name="Gears" path="examples\\Gears" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.Gears.Gears" assemblyName="Gears" rootNamespace="SdlDotNet.Examples.Gears" icon="App.ico"> | ||
101 | <Configuration name="Debug"> | ||
102 | <Options> | ||
103 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
104 | <OptimizeCode>false</OptimizeCode> | ||
105 | <AllowUnsafe>false</AllowUnsafe> | ||
106 | <OutputPath>bin\Debug</OutputPath> | ||
107 | <DebugInformation>true</DebugInformation> | ||
108 | <XmlDocFile>Gears.xml</XmlDocFile> | ||
109 | <WarningLevel>4</WarningLevel> | ||
110 | <SuppressWarnings>1595</SuppressWarnings> | ||
111 | </Options> | ||
112 | </Configuration> | ||
113 | <Configuration name="Release"> | ||
114 | <Options> | ||
115 | <CompilerDefines>TRACE</CompilerDefines> | ||
116 | <OptimizeCode>true</OptimizeCode> | ||
117 | <AllowUnsafe>false</AllowUnsafe> | ||
118 | <OutputPath>bin\Release</OutputPath> | ||
119 | <DebugInformation>false</DebugInformation> | ||
120 | <XmlDocFile>Gears.xml</XmlDocFile> | ||
121 | <WarningLevel>1</WarningLevel> | ||
122 | <SuppressWarnings>1595</SuppressWarnings> | ||
123 | </Options> | ||
124 | </Configuration> | ||
125 | <Reference name="System" /> | ||
126 | <Reference name="System.Drawing" /> | ||
127 | <Reference name="SdlDotNet" localCopy="true"/> | ||
128 | <Reference name="Tao.OpenGl" localCopy="true" path="..\\..\\lib"/> | ||
129 | <Files> | ||
130 | <File buildAction="EmbeddedResource">App.ico</File> | ||
131 | <Match path="." pattern="*.cs" recurse="true"/> | ||
132 | </Files> | ||
133 | </Project> | ||
134 | <Project name="CDPlayer" path="examples\\CDPlayer" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.CDPlayer.CDPlayer" assemblyName="CDPlayer" rootNamespace="SdlDotNet.Examples.CDPlayer" icon="App.ico"> | ||
135 | <Configuration name="Debug"> | ||
136 | <Options> | ||
137 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
138 | <OptimizeCode>false</OptimizeCode> | ||
139 | <AllowUnsafe>false</AllowUnsafe> | ||
140 | <OutputPath>bin\Debug</OutputPath> | ||
141 | <DebugInformation>true</DebugInformation> | ||
142 | <XmlDocFile>CDPlayer.xml</XmlDocFile> | ||
143 | <WarningLevel>4</WarningLevel> | ||
144 | <SuppressWarnings>1595</SuppressWarnings> | ||
145 | </Options> | ||
146 | </Configuration> | ||
147 | <Configuration name="Release"> | ||
148 | <Options> | ||
149 | <CompilerDefines>TRACE</CompilerDefines> | ||
150 | <OptimizeCode>true</OptimizeCode> | ||
151 | <AllowUnsafe>false</AllowUnsafe> | ||
152 | <OutputPath>bin\Release</OutputPath> | ||
153 | <DebugInformation>false</DebugInformation> | ||
154 | <XmlDocFile>CDPlayer.xml</XmlDocFile> | ||
155 | <WarningLevel>1</WarningLevel> | ||
156 | <SuppressWarnings>1595</SuppressWarnings> | ||
157 | </Options> | ||
158 | </Configuration> | ||
159 | <Reference name="System" /> | ||
160 | <Reference name="System.Drawing" /> | ||
161 | <Reference name="System.Windows.Forms" /> | ||
162 | <Reference name="SdlDotNet" localCopy="true"/> | ||
163 | <Files> | ||
164 | <File buildAction="EmbeddedResource">App.ico</File> | ||
165 | <File subType="Form">CDPlayer.cs</File> | ||
166 | <Match path="." pattern="*.cs" recurse="true"> | ||
167 | <Exclude name="CDPlayer.cs"/> | ||
168 | </Match> | ||
169 | </Files> | ||
170 | </Project> | ||
171 | <Project name="MoviePlayer" path="examples\\MoviePlayer" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.MoviePlayer.MoviePlayer" assemblyName="MoviePlayer" rootNamespace="SdlDotNet.Examples.MoviePlayer" icon="App.ico"> | ||
172 | <Configuration name="Debug"> | ||
173 | <Options> | ||
174 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
175 | <OptimizeCode>false</OptimizeCode> | ||
176 | <AllowUnsafe>false</AllowUnsafe> | ||
177 | <OutputPath>bin\Debug</OutputPath> | ||
178 | <DebugInformation>true</DebugInformation> | ||
179 | <XmlDocFile>MoviePlayer.xml</XmlDocFile> | ||
180 | <WarningLevel>4</WarningLevel> | ||
181 | <SuppressWarnings>1595</SuppressWarnings> | ||
182 | </Options> | ||
183 | </Configuration> | ||
184 | <Configuration name="Release"> | ||
185 | <Options> | ||
186 | <CompilerDefines>TRACE</CompilerDefines> | ||
187 | <OptimizeCode>true</OptimizeCode> | ||
188 | <AllowUnsafe>false</AllowUnsafe> | ||
189 | <OutputPath>bin\Release</OutputPath> | ||
190 | <DebugInformation>false</DebugInformation> | ||
191 | <XmlDocFile>MoviePlayer.xml</XmlDocFile> | ||
192 | <WarningLevel>1</WarningLevel> | ||
193 | <SuppressWarnings>1595</SuppressWarnings> | ||
194 | </Options> | ||
195 | </Configuration> | ||
196 | <Reference name="System" /> | ||
197 | <Reference name="System.Drawing" /> | ||
198 | <Reference name="SdlDotNet" localCopy="true"/> | ||
199 | <Files> | ||
200 | <File buildAction="EmbeddedResource">App.ico</File> | ||
201 | <Match path="." pattern="*.cs" recurse="true"/> | ||
202 | </Files> | ||
203 | </Project> | ||
204 | <Project name="SimpleGame" path="examples\\SimpleGame" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.SimpleGame.GameMain" assemblyName="SimpleGame" rootNamespace="SdlDotNet.Examples.SimpleGame" icon="App.ico"> | ||
205 | <Configuration name="Debug"> | ||
206 | <Options> | ||
207 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
208 | <OptimizeCode>false</OptimizeCode> | ||
209 | <AllowUnsafe>false</AllowUnsafe> | ||
210 | <OutputPath>bin\Debug</OutputPath> | ||
211 | <DebugInformation>true</DebugInformation> | ||
212 | <XmlDocFile>SimpleGame.xml</XmlDocFile> | ||
213 | <WarningLevel>4</WarningLevel> | ||
214 | <SuppressWarnings>1595</SuppressWarnings> | ||
215 | </Options> | ||
216 | </Configuration> | ||
217 | <Configuration name="Release"> | ||
218 | <Options> | ||
219 | <CompilerDefines>TRACE</CompilerDefines> | ||
220 | <OptimizeCode>true</OptimizeCode> | ||
221 | <AllowUnsafe>false</AllowUnsafe> | ||
222 | <OutputPath>bin\Release</OutputPath> | ||
223 | <DebugInformation>false</DebugInformation> | ||
224 | <XmlDocFile>SimpleGame.xml</XmlDocFile> | ||
225 | <WarningLevel>1</WarningLevel> | ||
226 | <SuppressWarnings>1595</SuppressWarnings> | ||
227 | </Options> | ||
228 | </Configuration> | ||
229 | <Reference name="System" /> | ||
230 | <Reference name="System.Drawing" /> | ||
231 | <Reference name="SdlDotNet" localCopy="true"/> | ||
232 | <Files> | ||
233 | <File buildAction="EmbeddedResource">App.ico</File> | ||
234 | <Match path="." pattern="*.cs" recurse="true"/> | ||
235 | </Files> | ||
236 | </Project> | ||
237 | <Project name="BombRun" path="examples\\BombRun" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.BombRun.BombRun" assemblyName="BombRun" rootNamespace="SdlDotNet.Examples.BombRun" icon="App.ico"> | ||
238 | <Configuration name="Debug"> | ||
239 | <Options> | ||
240 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
241 | <OptimizeCode>false</OptimizeCode> | ||
242 | <AllowUnsafe>false</AllowUnsafe> | ||
243 | <OutputPath>bin\Debug</OutputPath> | ||
244 | <DebugInformation>true</DebugInformation> | ||
245 | <XmlDocFile>BombRun.xml</XmlDocFile> | ||
246 | <WarningLevel>4</WarningLevel> | ||
247 | <SuppressWarnings>1595</SuppressWarnings> | ||
248 | </Options> | ||
249 | </Configuration> | ||
250 | <Configuration name="Release"> | ||
251 | <Options> | ||
252 | <CompilerDefines>TRACE</CompilerDefines> | ||
253 | <OptimizeCode>true</OptimizeCode> | ||
254 | <AllowUnsafe>false</AllowUnsafe> | ||
255 | <OutputPath>bin\Release</OutputPath> | ||
256 | <DebugInformation>false</DebugInformation> | ||
257 | <XmlDocFile>BombRun.xml</XmlDocFile> | ||
258 | <WarningLevel>1</WarningLevel> | ||
259 | <SuppressWarnings>1595</SuppressWarnings> | ||
260 | </Options> | ||
261 | </Configuration> | ||
262 | <Reference name="System" /> | ||
263 | <Reference name="System.Drawing" /> | ||
264 | <Reference name="SdlDotNet" localCopy="true"/> | ||
265 | <Files> | ||
266 | <File buildAction="EmbeddedResource">App.ico</File> | ||
267 | <Match path="." pattern="*.cs" recurse="true"/> | ||
268 | </Files> | ||
269 | </Project> | ||
270 | <Project name="SnowDemo" path="examples\\SnowDemo" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.SnowDemo.SnowDemo" assemblyName="SnowDemo" rootNamespace="SdlDotNet.Examples.SnowDemo" icon="App.ico"> | ||
271 | <Configuration name="Debug"> | ||
272 | <Options> | ||
273 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
274 | <OptimizeCode>false</OptimizeCode> | ||
275 | <AllowUnsafe>false</AllowUnsafe> | ||
276 | <OutputPath>bin\Debug</OutputPath> | ||
277 | <DebugInformation>true</DebugInformation> | ||
278 | <XmlDocFile>SnowDemo.xml</XmlDocFile> | ||
279 | <WarningLevel>4</WarningLevel> | ||
280 | <SuppressWarnings>1595</SuppressWarnings> | ||
281 | </Options> | ||
282 | </Configuration> | ||
283 | <Configuration name="Release"> | ||
284 | <Options> | ||
285 | <CompilerDefines>TRACE</CompilerDefines> | ||
286 | <OptimizeCode>true</OptimizeCode> | ||
287 | <AllowUnsafe>false</AllowUnsafe> | ||
288 | <OutputPath>bin\Release</OutputPath> | ||
289 | <DebugInformation>false</DebugInformation> | ||
290 | <XmlDocFile>SnowDemo.xml</XmlDocFile> | ||
291 | <WarningLevel>1</WarningLevel> | ||
292 | <SuppressWarnings>1595</SuppressWarnings> | ||
293 | </Options> | ||
294 | </Configuration> | ||
295 | <Reference name="System" /> | ||
296 | <Reference name="System.Drawing" /> | ||
297 | <Reference name="SdlDotNet" localCopy="true"/> | ||
298 | <Files> | ||
299 | <File buildAction="EmbeddedResource">App.ico</File> | ||
300 | <Match path="." pattern="*.cs" recurse="true"/> | ||
301 | </Files> | ||
302 | </Project> | ||
303 | <Project name="BounceSprites" path="examples\\BounceSprites" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.BounceSprites.BounceSprites" assemblyName="BounceSprites" rootNamespace="SdlDotNet.Examples.BounceSprites" icon="App.ico"> | ||
304 | <Configuration name="Debug"> | ||
305 | <Options> | ||
306 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
307 | <OptimizeCode>false</OptimizeCode> | ||
308 | <AllowUnsafe>false</AllowUnsafe> | ||
309 | <OutputPath>bin\Debug</OutputPath> | ||
310 | <DebugInformation>true</DebugInformation> | ||
311 | <XmlDocFile>BounceSprites.xml</XmlDocFile> | ||
312 | <WarningLevel>4</WarningLevel> | ||
313 | <SuppressWarnings>1595</SuppressWarnings> | ||
314 | </Options> | ||
315 | </Configuration> | ||
316 | <Configuration name="Release"> | ||
317 | <Options> | ||
318 | <CompilerDefines>TRACE</CompilerDefines> | ||
319 | <OptimizeCode>true</OptimizeCode> | ||
320 | <AllowUnsafe>false</AllowUnsafe> | ||
321 | <OutputPath>bin\Release</OutputPath> | ||
322 | <DebugInformation>false</DebugInformation> | ||
323 | <XmlDocFile>BounceSprites.xml</XmlDocFile> | ||
324 | <WarningLevel>1</WarningLevel> | ||
325 | <SuppressWarnings>1595</SuppressWarnings> | ||
326 | </Options> | ||
327 | </Configuration> | ||
328 | <Reference name="System" /> | ||
329 | <Reference name="System.Drawing" /> | ||
330 | <Reference name="SdlDotNet" localCopy="true"/> | ||
331 | <Files> | ||
332 | <File buildAction="EmbeddedResource">App.ico</File> | ||
333 | <Match path="." pattern="*.cs" recurse="true"/> | ||
334 | </Files> | ||
335 | </Project> | ||
336 | <Project name="Triad" path="examples\\Triad" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.Triad.MainObject" assemblyName="Triad" rootNamespace="SdlDotNet.Examples.Triad" icon="App.ico"> | ||
337 | <Configuration name="Debug"> | ||
338 | <Options> | ||
339 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
340 | <OptimizeCode>false</OptimizeCode> | ||
341 | <AllowUnsafe>false</AllowUnsafe> | ||
342 | <OutputPath>bin\Debug</OutputPath> | ||
343 | <DebugInformation>true</DebugInformation> | ||
344 | <XmlDocFile>Triad.xml</XmlDocFile> | ||
345 | <WarningLevel>4</WarningLevel> | ||
346 | <SuppressWarnings>1595</SuppressWarnings> | ||
347 | </Options> | ||
348 | </Configuration> | ||
349 | <Configuration name="Release"> | ||
350 | <Options> | ||
351 | <CompilerDefines>TRACE</CompilerDefines> | ||
352 | <OptimizeCode>true</OptimizeCode> | ||
353 | <AllowUnsafe>false</AllowUnsafe> | ||
354 | <OutputPath>bin\Release</OutputPath> | ||
355 | <DebugInformation>false</DebugInformation> | ||
356 | <XmlDocFile>Triad.xml</XmlDocFile> | ||
357 | <WarningLevel>1</WarningLevel> | ||
358 | <SuppressWarnings>1595</SuppressWarnings> | ||
359 | </Options> | ||
360 | </Configuration> | ||
361 | <Reference name="System" /> | ||
362 | <Reference name="System.Drawing" /> | ||
363 | <Reference name="SdlDotNet" localCopy="true"/> | ||
364 | <Reference name="nunit.framework" localCopy="true" path="..\\..\\lib"/> | ||
365 | <Files> | ||
366 | <File buildAction="EmbeddedResource">App.ico</File> | ||
367 | <Match path="." pattern="*.cs" recurse="true"/> | ||
368 | </Files> | ||
369 | </Project> | ||
370 | <Project name="GuiExample" path="examples\\GuiExample" language="C#" type="Library" assemblyName="GuiExample" rootNamespace="SdlDotNet.Examples.GuiExample"> | ||
371 | <Configuration name="Debug"> | ||
372 | <Options> | ||
373 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
374 | <OptimizeCode>false</OptimizeCode> | ||
375 | <AllowUnsafe>false</AllowUnsafe> | ||
376 | <OutputPath>bin\Debug</OutputPath> | ||
377 | <DebugInformation>true</DebugInformation> | ||
378 | <XmlDocFile>GuiExample.xml</XmlDocFile> | ||
379 | <WarningLevel>4</WarningLevel> | ||
380 | <SuppressWarnings>1595</SuppressWarnings> | ||
381 | </Options> | ||
382 | </Configuration> | ||
383 | <Configuration name="Release"> | ||
384 | <Options> | ||
385 | <CompilerDefines>TRACE</CompilerDefines> | ||
386 | <OptimizeCode>true</OptimizeCode> | ||
387 | <AllowUnsafe>false</AllowUnsafe> | ||
388 | <OutputPath>bin\Release</OutputPath> | ||
389 | <DebugInformation>false</DebugInformation> | ||
390 | <XmlDocFile>GuiExample.xml</XmlDocFile> | ||
391 | <WarningLevel>1</WarningLevel> | ||
392 | <SuppressWarnings>1595</SuppressWarnings> | ||
393 | </Options> | ||
394 | </Configuration> | ||
395 | <Reference name="System" /> | ||
396 | <Reference name="System.Drawing" /> | ||
397 | <Reference name="SdlDotNet" localCopy="true"/> | ||
398 | <Files> | ||
399 | <Match path="." pattern="*.cs" recurse="true"/> | ||
400 | </Files> | ||
401 | </Project> | ||
402 | <Project name="SpriteGuiDemos" path="examples\\SpriteGuiDemos" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.SpriteGuiDemos.SdlDemo" assemblyName="SpriteGuiDemo" rootNamespace="SdlDotNet.Examples.SpriteGuiDemos" icon="App.ico"> | ||
403 | <Configuration name="Debug"> | ||
404 | <Options> | ||
405 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
406 | <OptimizeCode>false</OptimizeCode> | ||
407 | <AllowUnsafe>false</AllowUnsafe> | ||
408 | <OutputPath>bin\Debug</OutputPath> | ||
409 | <DebugInformation>true</DebugInformation> | ||
410 | <XmlDocFile>SpriteGuiDemos.xml</XmlDocFile> | ||
411 | <WarningLevel>4</WarningLevel> | ||
412 | <SuppressWarnings>1595</SuppressWarnings> | ||
413 | </Options> | ||
414 | </Configuration> | ||
415 | <Configuration name="Release"> | ||
416 | <Options> | ||
417 | <CompilerDefines>TRACE</CompilerDefines> | ||
418 | <OptimizeCode>true</OptimizeCode> | ||
419 | <AllowUnsafe>false</AllowUnsafe> | ||
420 | <OutputPath>bin\Release</OutputPath> | ||
421 | <DebugInformation>false</DebugInformation> | ||
422 | <XmlDocFile>SpriteGuiDemos.xml</XmlDocFile> | ||
423 | <WarningLevel>1</WarningLevel> | ||
424 | <SuppressWarnings>1595</SuppressWarnings> | ||
425 | </Options> | ||
426 | </Configuration> | ||
427 | <Reference name="System" /> | ||
428 | <Reference name="System.Drawing" /> | ||
429 | <Reference name="SdlDotNet" localCopy="true"/> | ||
430 | <Reference name="GuiExample" localCopy="true"/> | ||
431 | <Files> | ||
432 | <File buildAction="EmbeddedResource">App.ico</File> | ||
433 | <Match path="." pattern="*.cs" recurse="true"/> | ||
434 | </Files> | ||
435 | </Project> | ||
436 | <Project name="Tests" path="tests" language="C#" type="Library" assemblyName="SdlDotNet.Tests" rootNamespace="SdlDotNet.Tests"> | ||
437 | <Configuration name="Debug"> | ||
438 | <Options> | ||
439 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
440 | <OptimizeCode>false</OptimizeCode> | ||
441 | <AllowUnsafe>false</AllowUnsafe> | ||
442 | <OutputPath>bin\Debug</OutputPath> | ||
443 | <DebugInformation>true</DebugInformation> | ||
444 | <XmlDocFile>SdlDotNet.Tests.xml</XmlDocFile> | ||
445 | <WarningLevel>4</WarningLevel> | ||
446 | <SuppressWarnings>1595</SuppressWarnings> | ||
447 | </Options> | ||
448 | </Configuration> | ||
449 | <Configuration name="Release"> | ||
450 | <Options> | ||
451 | <CompilerDefines>TRACE</CompilerDefines> | ||
452 | <OptimizeCode>true</OptimizeCode> | ||
453 | <AllowUnsafe>false</AllowUnsafe> | ||
454 | <OutputPath>bin\Release</OutputPath> | ||
455 | <DebugInformation>false</DebugInformation> | ||
456 | <XmlDocFile>SdlDotNet.Tests.xml</XmlDocFile> | ||
457 | <WarningLevel>1</WarningLevel> | ||
458 | <SuppressWarnings>1595</SuppressWarnings> | ||
459 | </Options> | ||
460 | </Configuration> | ||
461 | <Reference name="System" /> | ||
462 | <Reference name="System.Drawing" /> | ||
463 | <Reference name="SdlDotNet" localCopy="true"/> | ||
464 | <Reference name="Tao.Sdl" localCopy="true" path="..\\lib"/> | ||
465 | <Reference name="GuiExample" localCopy="true"/> | ||
466 | <Reference name="nunit.framework" localCopy="true" path="..\\lib"/> | ||
467 | <Files> | ||
468 | <Match path="." pattern="*.cs" recurse="true"/> | ||
469 | </Files> | ||
470 | </Project> | ||
471 | <Project name="AudioExample" path="examples\\AudioExample" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.AudioExample.AudioExample" assemblyName="AudioExample" rootNamespace="SdlDotNet.Examples.AudioExample" icon="App.ico"> | ||
472 | <Configuration name="Debug"> | ||
473 | <Options> | ||
474 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
475 | <OptimizeCode>false</OptimizeCode> | ||
476 | <AllowUnsafe>false</AllowUnsafe> | ||
477 | <OutputPath>bin\Debug</OutputPath> | ||
478 | <DebugInformation>true</DebugInformation> | ||
479 | <XmlDocFile>AudioExample.xml</XmlDocFile> | ||
480 | <WarningLevel>4</WarningLevel> | ||
481 | <SuppressWarnings>1595</SuppressWarnings> | ||
482 | </Options> | ||
483 | </Configuration> | ||
484 | <Configuration name="Release"> | ||
485 | <Options> | ||
486 | <CompilerDefines>TRACE</CompilerDefines> | ||
487 | <OptimizeCode>true</OptimizeCode> | ||
488 | <AllowUnsafe>false</AllowUnsafe> | ||
489 | <OutputPath>bin\Release</OutputPath> | ||
490 | <DebugInformation>false</DebugInformation> | ||
491 | <XmlDocFile>AudioExample.xml</XmlDocFile> | ||
492 | <WarningLevel>1</WarningLevel> | ||
493 | <SuppressWarnings>1595</SuppressWarnings> | ||
494 | </Options> | ||
495 | </Configuration> | ||
496 | <Reference name="System" /> | ||
497 | <Reference name="System.Drawing" /> | ||
498 | <Reference name="SdlDotNet" localCopy="true"/> | ||
499 | <Files> | ||
500 | <File buildAction="EmbeddedResource">App.ico</File> | ||
501 | <Match path="." pattern="*.cs" recurse="true"/> | ||
502 | </Files> | ||
503 | </Project> | ||
504 | <Project name="SdlDotNet.Particles" path="extras\\Particles" language="C#" type="Library" assemblyName="SdlDotNet.Particles" rootNamespace="SdlDotNet.Particles"> | ||
505 | <Configuration name="Debug"> | ||
506 | <Options> | ||
507 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
508 | <OptimizeCode>false</OptimizeCode> | ||
509 | <AllowUnsafe>false</AllowUnsafe> | ||
510 | <OutputPath>bin\Debug</OutputPath> | ||
511 | <DebugInformation>true</DebugInformation> | ||
512 | <XmlDocFile>SdlDotNet.Particles.xml</XmlDocFile> | ||
513 | <WarningLevel>4</WarningLevel> | ||
514 | <SuppressWarnings>1595</SuppressWarnings> | ||
515 | </Options> | ||
516 | </Configuration> | ||
517 | <Configuration name="Release"> | ||
518 | <Options> | ||
519 | <CompilerDefines>TRACE</CompilerDefines> | ||
520 | <OptimizeCode>true</OptimizeCode> | ||
521 | <AllowUnsafe>false</AllowUnsafe> | ||
522 | <OutputPath>bin\Release</OutputPath> | ||
523 | <DebugInformation>false</DebugInformation> | ||
524 | <XmlDocFile>SdlDotNet.Particles.xml</XmlDocFile> | ||
525 | <WarningLevel>1</WarningLevel> | ||
526 | <SuppressWarnings>1595</SuppressWarnings> | ||
527 | </Options> | ||
528 | </Configuration> | ||
529 | <Reference name="System" /> | ||
530 | <Reference name="System.Drawing" /> | ||
531 | <Reference name="SdlDotNet" localCopy="true"/> | ||
532 | <Files> | ||
533 | <Match path="." pattern="*.cs" recurse="true"/> | ||
534 | </Files> | ||
535 | </Project> | ||
536 | <Project name="ParticlesExample" path="examples\\ParticlesExample" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.ParticlesExample.ParticlesExample" assemblyName="ParticlesExample" rootNamespace="SdlDotNet.Examples.ParticlesExample" icon="App.ico"> | ||
537 | <Configuration name="Debug"> | ||
538 | <Options> | ||
539 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
540 | <OptimizeCode>false</OptimizeCode> | ||
541 | <AllowUnsafe>false</AllowUnsafe> | ||
542 | <OutputPath>bin\Debug</OutputPath> | ||
543 | <DebugInformation>true</DebugInformation> | ||
544 | <XmlDocFile>ParticlesExample.xml</XmlDocFile> | ||
545 | <WarningLevel>4</WarningLevel> | ||
546 | <SuppressWarnings>1595</SuppressWarnings> | ||
547 | </Options> | ||
548 | </Configuration> | ||
549 | <Configuration name="Release"> | ||
550 | <Options> | ||
551 | <CompilerDefines>TRACE</CompilerDefines> | ||
552 | <OptimizeCode>true</OptimizeCode> | ||
553 | <AllowUnsafe>false</AllowUnsafe> | ||
554 | <OutputPath>bin\Release</OutputPath> | ||
555 | <DebugInformation>false</DebugInformation> | ||
556 | <XmlDocFile>ParticlesExample.xml</XmlDocFile> | ||
557 | <WarningLevel>1</WarningLevel> | ||
558 | <SuppressWarnings>1595</SuppressWarnings> | ||
559 | </Options> | ||
560 | </Configuration> | ||
561 | <Reference name="System" /> | ||
562 | <Reference name="System.Drawing" /> | ||
563 | <Reference name="SdlDotNet" localCopy="true"/> | ||
564 | <Reference name="SdlDotNet.Particles" localCopy="true"/> | ||
565 | <Files> | ||
566 | <File buildAction="EmbeddedResource">App.ico</File> | ||
567 | <Match path="." pattern="*.cs" recurse="true"/> | ||
568 | </Files> | ||
569 | </Project> | ||
570 | <!--<Project name="SdlDotNet.Gui" path="extras\\Gui" language="C#" type="Library" assemblyName="SdlDotNet.Gui" rootNamespace="SdlDotNet.Gui"> | ||
571 | <Configuration name="Debug"> | ||
572 | <Options> | ||
573 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
574 | <OptimizeCode>false</OptimizeCode> | ||
575 | <AllowUnsafe>false</AllowUnsafe> | ||
576 | <OutputPath>bin\Debug</OutputPath> | ||
577 | <DebugInformation>true</DebugInformation> | ||
578 | <XmlDocFile>SdlDotNet.Gui.xml</XmlDocFile> | ||
579 | <WarningLevel>4</WarningLevel> | ||
580 | </Options> | ||
581 | </Configuration> | ||
582 | <Configuration name="Release"> | ||
583 | <Options> | ||
584 | <CompilerDefines>TRACE</CompilerDefines> | ||
585 | <OptimizeCode>true</OptimizeCode> | ||
586 | <AllowUnsafe>false</AllowUnsafe> | ||
587 | <OutputPath>bin\Release</OutputPath> | ||
588 | <DebugInformation>false</DebugInformation> | ||
589 | <XmlDocFile>SdlDotNet.Gui.xml</XmlDocFile> | ||
590 | <WarningLevel>1</WarningLevel> | ||
591 | </Options> | ||
592 | </Configuration> | ||
593 | <Reference name="System" /> | ||
594 | <Reference name="System.Drawing" /> | ||
595 | <Reference name="SdlDotNet" localCopy="true"/> | ||
596 | <Files> | ||
597 | <Match path="." pattern="*.cs" recurse="true"/> | ||
598 | </Files> | ||
599 | </Project>--> | ||
600 | <Project name="NeHe" path="examples\\NeHe" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.NeHe.NeHe" assemblyName="NeHe" rootNamespace="SdlDotNet.Examples.NeHe" icon="App.ico"> | ||
601 | <Configuration name="Debug"> | ||
602 | <Options> | ||
603 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
604 | <OptimizeCode>false</OptimizeCode> | ||
605 | <AllowUnsafe>false</AllowUnsafe> | ||
606 | <OutputPath>bin\Debug</OutputPath> | ||
607 | <DebugInformation>true</DebugInformation> | ||
608 | <XmlDocFile>NeHe.xml</XmlDocFile> | ||
609 | <WarningLevel>4</WarningLevel> | ||
610 | <SuppressWarnings>1595</SuppressWarnings> | ||
611 | </Options> | ||
612 | </Configuration> | ||
613 | <Configuration name="Release"> | ||
614 | <Options> | ||
615 | <CompilerDefines>TRACE</CompilerDefines> | ||
616 | <OptimizeCode>true</OptimizeCode> | ||
617 | <AllowUnsafe>false</AllowUnsafe> | ||
618 | <OutputPath>bin\Release</OutputPath> | ||
619 | <DebugInformation>false</DebugInformation> | ||
620 | <XmlDocFile>NeHe.xml</XmlDocFile> | ||
621 | <WarningLevel>1</WarningLevel> | ||
622 | <SuppressWarnings>1595</SuppressWarnings> | ||
623 | </Options> | ||
624 | </Configuration> | ||
625 | <Reference name="System" /> | ||
626 | <Reference name="System.Drawing" /> | ||
627 | <Reference name="System.Windows.Forms" /> | ||
628 | <Reference name="SdlDotNet" localCopy="true"/> | ||
629 | <Reference name="Tao.OpenGl" localCopy="true" path="..\\..\\lib"/> | ||
630 | <Reference name="Tao.OpenGl.Glu" localCopy="true" path="..\\..\\lib"/> | ||
631 | <Reference name="Tao.Platform.Windows" localCopy="true" path="..\\..\\lib"/> | ||
632 | <Files> | ||
633 | <File buildAction="EmbeddedResource">App.ico</File> | ||
634 | <File subType="Form">NeHe.cs</File> | ||
635 | <Match path="." pattern="*.cs" recurse="true"> | ||
636 | <Exclude name="NeHe.cs"/> | ||
637 | </Match> | ||
638 | </Files> | ||
639 | </Project> | ||
640 | <Project name="RedBook" path="examples\\RedBook" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.RedBook.RedBook" assemblyName="RedBook" rootNamespace="SdlDotNet.Examples.RedBook" icon="App.ico"> | ||
641 | <Configuration name="Debug"> | ||
642 | <Options> | ||
643 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
644 | <OptimizeCode>false</OptimizeCode> | ||
645 | <AllowUnsafe>false</AllowUnsafe> | ||
646 | <OutputPath>bin\Debug</OutputPath> | ||
647 | <DebugInformation>true</DebugInformation> | ||
648 | <XmlDocFile>RedBook.xml</XmlDocFile> | ||
649 | <WarningLevel>4</WarningLevel> | ||
650 | <SuppressWarnings>1595</SuppressWarnings> | ||
651 | </Options> | ||
652 | </Configuration> | ||
653 | <Configuration name="Release"> | ||
654 | <Options> | ||
655 | <CompilerDefines>TRACE</CompilerDefines> | ||
656 | <OptimizeCode>true</OptimizeCode> | ||
657 | <AllowUnsafe>false</AllowUnsafe> | ||
658 | <OutputPath>bin\Release</OutputPath> | ||
659 | <DebugInformation>false</DebugInformation> | ||
660 | <XmlDocFile>RedBook.xml</XmlDocFile> | ||
661 | <WarningLevel>1</WarningLevel> | ||
662 | <SuppressWarnings>1595</SuppressWarnings> | ||
663 | </Options> | ||
664 | </Configuration> | ||
665 | <Reference name="System" /> | ||
666 | <Reference name="System.Drawing" /> | ||
667 | <Reference name="System.Windows.Forms" /> | ||
668 | <Reference name="SdlDotNet" localCopy="true"/> | ||
669 | <Reference name="Tao.OpenGl" localCopy="true" path="..\\..\\lib"/> | ||
670 | <Reference name="Tao.OpenGl.Glu" localCopy="true" path="..\\..\\lib"/> | ||
671 | <Reference name="Tao.FreeGlut" localCopy="true" path="..\\..\\lib"/> | ||
672 | <Files> | ||
673 | <File buildAction="EmbeddedResource">App.ico</File> | ||
674 | <File subType="Form">RedBook.cs</File> | ||
675 | <Match path="." pattern="*.cs" recurse="true"> | ||
676 | <Exclude name="RedBook.cs" /> | ||
677 | </Match> | ||
678 | </Files> | ||
679 | </Project> | ||
680 | <Project name="PhysFsTest" path="examples\\PhysFsTest" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.PhysFsTest.PhysFsTest" assemblyName="PhysFsTest" rootNamespace="SdlDotNet.Examples.PhysFsTest" icon="App.ico"> | ||
681 | <Configuration name="Debug"> | ||
682 | <Options> | ||
683 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
684 | <OptimizeCode>false</OptimizeCode> | ||
685 | <AllowUnsafe>false</AllowUnsafe> | ||
686 | <OutputPath>bin\Debug</OutputPath> | ||
687 | <DebugInformation>true</DebugInformation> | ||
688 | <XmlDocFile>PhysFsTest.xml</XmlDocFile> | ||
689 | <WarningLevel>4</WarningLevel> | ||
690 | <SuppressWarnings>1595</SuppressWarnings> | ||
691 | </Options> | ||
692 | </Configuration> | ||
693 | <Configuration name="Release"> | ||
694 | <Options> | ||
695 | <CompilerDefines>TRACE</CompilerDefines> | ||
696 | <OptimizeCode>true</OptimizeCode> | ||
697 | <AllowUnsafe>false</AllowUnsafe> | ||
698 | <OutputPath>bin\Release</OutputPath> | ||
699 | <DebugInformation>false</DebugInformation> | ||
700 | <XmlDocFile>PhysFsTest.xml</XmlDocFile> | ||
701 | <WarningLevel>1</WarningLevel> | ||
702 | <SuppressWarnings>1595</SuppressWarnings> | ||
703 | </Options> | ||
704 | </Configuration> | ||
705 | <Reference name="System" /> | ||
706 | <Reference name="System.Drawing" /> | ||
707 | <Reference name="SdlDotNet" localCopy="true"/> | ||
708 | <Reference name="Tao.PhysFs" localCopy="true" path="..\\..\\lib"/> | ||
709 | <Files> | ||
710 | <File buildAction="EmbeddedResource">App.ico</File> | ||
711 | <Match path="." pattern="*.cs" recurse="true"/> | ||
712 | </Files> | ||
713 | </Project> | ||
714 | </Solution> | ||
715 | </Prebuild> | ||
diff --git a/Prebuild/doc/prebuild-example5.xml b/Prebuild/doc/prebuild-example5.xml deleted file mode 100644 index 5221547..0000000 --- a/Prebuild/doc/prebuild-example5.xml +++ /dev/null | |||
@@ -1,187 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd" version="1.6"> | ||
3 | <Solution name="Tao.Sdl"> | ||
4 | <Configuration name="Debug"> | ||
5 | <Options> | ||
6 | <CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines> | ||
7 | <OptimizeCode>false</OptimizeCode> | ||
8 | <AllowUnsafe>true</AllowUnsafe> | ||
9 | <OutputPath>bin\Debug</OutputPath> | ||
10 | <XmlDocFile>Tao.Sdl.xml</XmlDocFile> | ||
11 | <DebugInformation>true</DebugInformation> | ||
12 | </Options> | ||
13 | </Configuration> | ||
14 | <Configuration name="Release"> | ||
15 | <Options> | ||
16 | <CompilerDefines>TRACE;WIN32</CompilerDefines> | ||
17 | <OptimizeCode>true</OptimizeCode> | ||
18 | <AllowUnsafe>true</AllowUnsafe> | ||
19 | <OutputPath>bin\Release</OutputPath> | ||
20 | <XmlDocFile>Tao.Sdl.xml</XmlDocFile> | ||
21 | <DebugInformation>false</DebugInformation> | ||
22 | </Options> | ||
23 | </Configuration> | ||
24 | <Files> | ||
25 | <File>Tao.Sdl.License.txt</File> | ||
26 | <File>Tao.Sdl.Readme.txt</File> | ||
27 | <File>Tao.Sdl.snk</File> | ||
28 | <File>Tao.Sdl.dll.config</File> | ||
29 | </Files> | ||
30 | <Project name="Tao.Sdl" path="." language="C#" type="Library"> | ||
31 | <Reference name="System" /> | ||
32 | <Files> | ||
33 | <File>AssemblyInfo.cs</File> | ||
34 | <File>Sdl.cs</File> | ||
35 | <File>SdlImage.cs</File> | ||
36 | <File>SdlMixer.cs</File> | ||
37 | <File>SdlTtf.cs</File> | ||
38 | <File>SdlNet.cs</File> | ||
39 | <File>SdlGfx.cs</File> | ||
40 | <File>Smpeg.cs</File> | ||
41 | <File>DelegateCallingConventionCdeclAttribute.cs</File> | ||
42 | </Files> | ||
43 | </Project> | ||
44 | <Project name="Tao.Sdl.Tests" path="..\\..\\tests\\Sdl\\" language="C#" type="Library"> | ||
45 | <Configuration name="Debug"> | ||
46 | <Options> | ||
47 | <CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines> | ||
48 | <OptimizeCode>false</OptimizeCode> | ||
49 | <AllowUnsafe>false</AllowUnsafe> | ||
50 | <OutputPath>bin\Debug</OutputPath> | ||
51 | <XmlDocFile>Tao.Sdl.Tests.xml</XmlDocFile> | ||
52 | <DebugInformation>true</DebugInformation> | ||
53 | </Options> | ||
54 | </Configuration> | ||
55 | <Configuration name="Release"> | ||
56 | <Options> | ||
57 | <CompilerDefines>TRACE;WIN32</CompilerDefines> | ||
58 | <OptimizeCode>true</OptimizeCode> | ||
59 | <AllowUnsafe>false</AllowUnsafe> | ||
60 | <OutputPath>bin\Release</OutputPath> | ||
61 | <XmlDocFile>Tao.Sdl.Tests.xml</XmlDocFile> | ||
62 | <DebugInformation>false</DebugInformation> | ||
63 | </Options> | ||
64 | </Configuration> | ||
65 | <Reference name="System" /> | ||
66 | <Reference name="nunit.framework.dll"/> | ||
67 | <Reference name="Tao.Sdl" /> | ||
68 | <Files> | ||
69 | <File>AssemblyInfo.cs</File> | ||
70 | <File>SdlTest.cs</File> | ||
71 | <File>SdlTestVideo.cs</File> | ||
72 | <File>SdlTestImage.cs</File> | ||
73 | <File>SdlTestTtf.cs</File> | ||
74 | <File>SdlTestMixer.cs</File> | ||
75 | <File>SdlTestGfx.cs</File> | ||
76 | <File>SmpegTest.cs</File> | ||
77 | </Files> | ||
78 | </Project> | ||
79 | <Project name="SdlExamples.Rectangles" path="..\\..\\examples\\SdlExamples\\Rectangles" language="C#" type="WinExe" startupObject="SdlExamples.Rectangles"> | ||
80 | <Configuration name="Debug"> | ||
81 | <Options> | ||
82 | <CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines> | ||
83 | <OptimizeCode>false</OptimizeCode> | ||
84 | <AllowUnsafe>false</AllowUnsafe> | ||
85 | <OutputPath>bin\Debug</OutputPath> | ||
86 | <DebugInformation>true</DebugInformation> | ||
87 | </Options> | ||
88 | </Configuration> | ||
89 | <Configuration name="Release"> | ||
90 | <Options> | ||
91 | <CompilerDefines>TRACE;WIN32</CompilerDefines> | ||
92 | <OptimizeCode>true</OptimizeCode> | ||
93 | <AllowUnsafe>false</AllowUnsafe> | ||
94 | <OutputPath>bin\Release</OutputPath> | ||
95 | <DebugInformation>false</DebugInformation> | ||
96 | </Options> | ||
97 | </Configuration> | ||
98 | <Reference name="System" /> | ||
99 | <Reference name="Tao.Sdl" /> | ||
100 | <Files> | ||
101 | <File>AssemblyInfo.cs</File> | ||
102 | <File>Rectangles.cs</File> | ||
103 | </Files> | ||
104 | </Project> | ||
105 | <Project name="SdlExamples.SmpegPlayer" path="..\\..\\examples\\SdlExamples\\SmpegPlayer" language="C#" type="WinExe" startupObject="SdlExamples.SmpegPlayer"> | ||
106 | <Configuration name="Debug"> | ||
107 | <Options> | ||
108 | <CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines> | ||
109 | <OptimizeCode>false</OptimizeCode> | ||
110 | <AllowUnsafe>false</AllowUnsafe> | ||
111 | <OutputPath>bin\Debug</OutputPath> | ||
112 | <DebugInformation>true</DebugInformation> | ||
113 | </Options> | ||
114 | </Configuration> | ||
115 | <Configuration name="Release"> | ||
116 | <Options> | ||
117 | <CompilerDefines>TRACE;WIN32</CompilerDefines> | ||
118 | <OptimizeCode>true</OptimizeCode> | ||
119 | <AllowUnsafe>false</AllowUnsafe> | ||
120 | <OutputPath>bin\Release</OutputPath> | ||
121 | <DebugInformation>false</DebugInformation> | ||
122 | </Options> | ||
123 | </Configuration> | ||
124 | <Reference name="System" /> | ||
125 | <Reference name="Tao.Sdl" /> | ||
126 | <Files> | ||
127 | <File>AssemblyInfo.cs</File> | ||
128 | <File>SmpegPlayer.cs</File> | ||
129 | </Files> | ||
130 | </Project> | ||
131 | <Project name="SdlExamples.GfxPrimitives" path="..\\..\\examples\\SdlExamples\\GfxPrimitives" language="C#" type="WinExe" startupObject="SdlExamples.GfxPrimitives"> | ||
132 | <Configuration name="Debug"> | ||
133 | <Options> | ||
134 | <CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines> | ||
135 | <OptimizeCode>false</OptimizeCode> | ||
136 | <AllowUnsafe>false</AllowUnsafe> | ||
137 | <OutputPath>bin\Debug</OutputPath> | ||
138 | <DebugInformation>true</DebugInformation> | ||
139 | </Options> | ||
140 | </Configuration> | ||
141 | <Configuration name="Release"> | ||
142 | <Options> | ||
143 | <CompilerDefines>TRACE;WIN32</CompilerDefines> | ||
144 | <OptimizeCode>true</OptimizeCode> | ||
145 | <AllowUnsafe>false</AllowUnsafe> | ||
146 | <OutputPath>bin\Release</OutputPath> | ||
147 | <DebugInformation>false</DebugInformation> | ||
148 | </Options> | ||
149 | </Configuration> | ||
150 | <Reference name="System" /> | ||
151 | <Reference name="Tao.Sdl" /> | ||
152 | <Files> | ||
153 | <File>AssemblyInfo.cs</File> | ||
154 | <File>GfxPrimitives.cs</File> | ||
155 | </Files> | ||
156 | </Project> | ||
157 | <Project name="Tao.PostProcess" path="..\\Tao.PostProcess\\" language="C#" type="Exe"> | ||
158 | <Configuration name="Debug"> | ||
159 | <Options> | ||
160 | <CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines> | ||
161 | <OptimizeCode>false</OptimizeCode> | ||
162 | <AllowUnsafe>false</AllowUnsafe> | ||
163 | <OutputPath>bin\Debug</OutputPath> | ||
164 | <DebugInformation>true</DebugInformation> | ||
165 | </Options> | ||
166 | </Configuration> | ||
167 | <Configuration name="Release"> | ||
168 | <Options> | ||
169 | <CompilerDefines>TRACE;WIN32</CompilerDefines> | ||
170 | <OptimizeCode>true</OptimizeCode> | ||
171 | <AllowUnsafe>false</AllowUnsafe> | ||
172 | <OutputPath>bin\Release</OutputPath> | ||
173 | <DebugInformation>false</DebugInformation> | ||
174 | </Options> | ||
175 | </Configuration> | ||
176 | <Reference name="System" /> | ||
177 | <Files> | ||
178 | <File>AssemblyInfo.cs</File> | ||
179 | <File>AppMain.cs</File> | ||
180 | <File>BuildProcessor.cs</File> | ||
181 | <File>Options.cs</File> | ||
182 | <File>ReleaseBuildProcessor.cs</File> | ||
183 | <File>UsageHelp.cs</File> | ||
184 | </Files> | ||
185 | </Project> | ||
186 | </Solution> | ||
187 | </Prebuild> | ||
diff --git a/Prebuild/prebuild.xml b/Prebuild/prebuild.xml deleted file mode 100644 index 1f81086..0000000 --- a/Prebuild/prebuild.xml +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" version="1.7"> | ||
3 | <Solution name="Prebuild" version="2.0.4"> | ||
4 | <Configuration name="Debug"> | ||
5 | <Options> | ||
6 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
7 | <OptimizeCode>false</OptimizeCode> | ||
8 | <OutputPath>bin/Debug</OutputPath> | ||
9 | <DebugInformation>true</DebugInformation> | ||
10 | <SuppressWarnings>1595</SuppressWarnings> | ||
11 | </Options> | ||
12 | </Configuration> | ||
13 | <Configuration name="Release"> | ||
14 | <Options> | ||
15 | <CompilerDefines>TRACE</CompilerDefines> | ||
16 | <OutputPath>bin/Release</OutputPath> | ||
17 | <OptimizeCode>true</OptimizeCode> | ||
18 | <DebugInformation>false</DebugInformation> | ||
19 | <SuppressWarnings>1595</SuppressWarnings> | ||
20 | </Options> | ||
21 | </Configuration> | ||
22 | <Files> | ||
23 | <File>prebuild.xml</File> | ||
24 | <File>prebuild</File> | ||
25 | </Files> | ||
26 | <Project name="Prebuild" | ||
27 | path="src" | ||
28 | language="C#" | ||
29 | assemblyName="prebuild" | ||
30 | icon="App.ico" | ||
31 | type="Exe" | ||
32 | rootNamespace="Prebuild" | ||
33 | startupObject="Prebuild.Prebuild" | ||
34 | version="2.0.3" | ||
35 | > | ||
36 | <Author>Matthew Holmes (matthew@wildfiregames.com)</Author> | ||
37 | <Author>Dan Moorehead (dan05a@gmail.com)</Author> | ||
38 | <Author>Dave Hudson (jendave@yahoo.com)</Author> | ||
39 | <Author>Rob Loach (http://robloach.net)</Author> | ||
40 | <Author>C.J. Adams-Collier (cjac@colliertech.org)</Author> | ||
41 | <Description>The Prebuild project generator</Description> | ||
42 | <Configuration name="Debug"> | ||
43 | <Options> | ||
44 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
45 | <OptimizeCode>false</OptimizeCode> | ||
46 | <OutputPath>bin/Debug</OutputPath> | ||
47 | <DebugInformation>true</DebugInformation> | ||
48 | <KeyFile>Prebuild.snk</KeyFile> | ||
49 | <SuppressWarnings>1595</SuppressWarnings> | ||
50 | </Options> | ||
51 | </Configuration> | ||
52 | <Configuration name="Release"> | ||
53 | <Options> | ||
54 | <CompilerDefines>TRACE</CompilerDefines> | ||
55 | <OutputPath>bin/Release</OutputPath> | ||
56 | <OptimizeCode>true</OptimizeCode> | ||
57 | <DebugInformation>false</DebugInformation> | ||
58 | <KeyFile>Prebuild.snk</KeyFile> | ||
59 | <SuppressWarnings>1595</SuppressWarnings> | ||
60 | </Options> | ||
61 | </Configuration> | ||
62 | <Reference name="System.EnterpriseServices" /> | ||
63 | <Reference name="System.Xml" /> | ||
64 | <Reference name="System" /> | ||
65 | <Files> | ||
66 | <Match pattern="App.ico" buildAction="EmbeddedResource"/> | ||
67 | <Match path="data" pattern="prebuild-1.7.xsd" buildAction="EmbeddedResource"/> | ||
68 | <Match path="data" pattern="autotools.xml" buildAction="EmbeddedResource"/> | ||
69 | <Match pattern="*.cs" recurse="true"/> | ||
70 | </Files> | ||
71 | </Project> | ||
72 | </Solution> | ||
73 | </Prebuild> | ||
diff --git a/Prebuild/scripts/Clean.bat b/Prebuild/scripts/Clean.bat deleted file mode 100755 index 806bbe8..0000000 --- a/Prebuild/scripts/Clean.bat +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | cd .. | ||
2 | Prebuild.exe /clean /yes /removedir obj /file prebuild.xml /build NET_2_0 /pause | ||
diff --git a/Prebuild/scripts/Clean.sh b/Prebuild/scripts/Clean.sh deleted file mode 100755 index b0a6530..0000000 --- a/Prebuild/scripts/Clean.sh +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | ./prebuild /clean /removedir obj /file ../prebuild.xml /pause | ||
4 | rm -rf ../Makefile | ||
diff --git a/Prebuild/scripts/Help.bat b/Prebuild/scripts/Help.bat deleted file mode 100755 index 7c843c4..0000000 --- a/Prebuild/scripts/Help.bat +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | cd .. | ||
2 | Prebuild.exe /usage /pause \ No newline at end of file | ||
diff --git a/Prebuild/scripts/MonoDevelop.sh b/Prebuild/scripts/MonoDevelop.sh deleted file mode 100755 index fbd7669..0000000 --- a/Prebuild/scripts/MonoDevelop.sh +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | prebuild /target monodev /file ../prebuild.xml /build NET_1_1 /pause | ||
diff --git a/Prebuild/scripts/Prebuild.nsi b/Prebuild/scripts/Prebuild.nsi deleted file mode 100644 index 8f9854e..0000000 --- a/Prebuild/scripts/Prebuild.nsi +++ /dev/null | |||
@@ -1,231 +0,0 @@ | |||
1 | !verbose 3 | ||
2 | |||
3 | !define PRODUCT_NAME "Prebuild" | ||
4 | !define PRODUCT_VERSION "1.3.1" | ||
5 | !define PRODUCT_PUBLISHER "Prebuild" | ||
6 | !define PRODUCT_PACKAGE "prebuild" | ||
7 | !define PRODUCT_WEB_SITE "http://dnpb.sourceforge.net" | ||
8 | !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Prebuild" | ||
9 | !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\Prebuild" | ||
10 | !define PRODUCT_UNINST_ROOT_KEY "HKLM" | ||
11 | !define PRODUCT_PATH ".." | ||
12 | |||
13 | ;!define MUI_WELCOMEFINISHPAGE_BITMAP "PrebuildLogo.bmp" | ||
14 | ;!define MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH | ||
15 | ;!define MUI_UNWELCOMEFINISHPAGE_BITMAP "PrebuildLogo.bmp" | ||
16 | ;!define MUI_UNWELCOMEFINISHPAGE_BITMAP_NOSTRETCH | ||
17 | |||
18 | BrandingText "© 2003-2006 David Hudson, http://dnpb.sourceforge.net/" | ||
19 | SetCompressor lzma | ||
20 | CRCCheck on | ||
21 | |||
22 | ; File Association defines | ||
23 | ;!include "fileassoc.nsh" | ||
24 | |||
25 | ; MUI 1.67 compatible ------ | ||
26 | !include "MUI.nsh" | ||
27 | |||
28 | ; MUI Settings | ||
29 | !define MUI_ABORTWARNING | ||
30 | !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico" | ||
31 | !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" | ||
32 | |||
33 | ;-------------------------------- | ||
34 | ;Variables | ||
35 | |||
36 | ;-------------------------------- | ||
37 | ;Installer Pages | ||
38 | |||
39 | ; Welcome page | ||
40 | !insertmacro MUI_PAGE_WELCOME | ||
41 | ; License page | ||
42 | !insertmacro MUI_PAGE_LICENSE "..\doc\license.txt" | ||
43 | ; Directory page | ||
44 | !insertmacro MUI_PAGE_DIRECTORY | ||
45 | |||
46 | ; Instfiles page | ||
47 | !insertmacro MUI_PAGE_INSTFILES | ||
48 | |||
49 | ; Finish page | ||
50 | !insertmacro MUI_PAGE_FINISH | ||
51 | |||
52 | ;------------------------------------ | ||
53 | ; Uninstaller pages | ||
54 | !insertmacro MUI_UNPAGE_CONFIRM | ||
55 | !insertmacro MUI_UNPAGE_INSTFILES | ||
56 | !insertmacro MUI_UNPAGE_FINISH | ||
57 | ;------------------------------------ | ||
58 | |||
59 | ; Language files | ||
60 | !insertmacro MUI_LANGUAGE "English" | ||
61 | |||
62 | ; Reserve files | ||
63 | !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS | ||
64 | |||
65 | ; MUI end ------ | ||
66 | |||
67 | Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" | ||
68 | OutFile "..\${PRODUCT_PACKAGE}-${PRODUCT_VERSION}-setup.exe" | ||
69 | InstallDir "$PROGRAMFILES\Prebuild" | ||
70 | InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "" | ||
71 | ShowInstDetails show | ||
72 | ShowUnInstDetails show | ||
73 | |||
74 | ; .NET Framework check | ||
75 | ; http://msdn.microsoft.com/netframework/default.aspx?pull=/library/en-us/dnnetdep/html/redistdeploy1_1.asp | ||
76 | ; Section "Detecting that the .NET Framework 1.1 is installed" | ||
77 | Function .onInit | ||
78 | ReadRegDWORD $R0 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322" Install | ||
79 | StrCmp $R0 "" 0 CheckPreviousVersion | ||
80 | MessageBox MB_OK "Microsoft .NET Framework 1.1 was not found on this system.$\r$\n$\r$\nUnable to continue this installation." | ||
81 | Abort | ||
82 | |||
83 | CheckPreviousVersion: | ||
84 | ReadRegStr $R0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" | ||
85 | StrCmp $R0 "" CheckOSVersion 0 | ||
86 | MessageBox MB_OK "An old version of Prebuild is installed on this computer, please uninstall first.$\r$\n$\r$\nUnable to continue this installation." | ||
87 | Abort | ||
88 | |||
89 | CheckOSVersion: | ||
90 | Call IsSupportedWindowsVersion | ||
91 | Pop $R0 | ||
92 | StrCmp $R0 "False" NoAbort 0 | ||
93 | MessageBox MB_OK "The operating system you are using is not supported by Prebuild (95/98/ME/NT3.x/NT4.x)." | ||
94 | Abort | ||
95 | |||
96 | NoAbort: | ||
97 | FunctionEnd | ||
98 | |||
99 | Section "Source" SecSource | ||
100 | SetOverwrite ifnewer | ||
101 | SetOutPath "$INSTDIR\src" | ||
102 | File /r /x *.swp /x .svn /x *.xml /x *.csproj /x *.user /x *.build /x *.prjx /x *.mdp /x bin /x obj /x *.nsi ${PRODUCT_PATH}\src\*.* | ||
103 | |||
104 | ;Store installation folder | ||
105 | WriteRegStr HKCU "Software\Prebuild" "" $INSTDIR | ||
106 | |||
107 | SectionEnd | ||
108 | |||
109 | Section "Runtime" SecRuntime | ||
110 | SetOverwrite ifnewer | ||
111 | SetOutPath "$INSTDIR" | ||
112 | File /r /x *.swp /x .svn /x *.nsi /x src /x *.sln /x *.cmbx /x *.mds ${PRODUCT_PATH}\Prebuild.exe ${PRODUCT_PATH}\prebuild.xml | ||
113 | |||
114 | ;Store installation folder | ||
115 | WriteRegStr HKCU "Software\Prebuild" "" $INSTDIR | ||
116 | |||
117 | SectionEnd | ||
118 | |||
119 | Section "Documentation" SecDocs | ||
120 | SetOverwrite ifnewer | ||
121 | SetOutPath "$INSTDIR\doc" | ||
122 | File /r /x *.swp /x .svn /x *.exe ${PRODUCT_PATH}\doc\*.* | ||
123 | |||
124 | ;Store installation folder | ||
125 | WriteRegStr HKCU "Software\Prebuild" "" $INSTDIR | ||
126 | SectionEnd | ||
127 | |||
128 | Section "Scripts" SecScripts | ||
129 | SetOverwrite ifnewer | ||
130 | SetOutPath "$INSTDIR\scripts" | ||
131 | File /r /x *.swp /x .svn /x *.nsi /x *.exe ${PRODUCT_PATH}\scripts\*.* | ||
132 | |||
133 | ;Store installation folder | ||
134 | WriteRegStr HKCU "Software\Prebuild" "" $INSTDIR | ||
135 | SectionEnd | ||
136 | |||
137 | ;Language strings | ||
138 | |||
139 | Section -AdditionalIcons | ||
140 | WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}" | ||
141 | SectionEnd | ||
142 | |||
143 | Section -Post | ||
144 | WriteUninstaller "$INSTDIR\uninst.exe" | ||
145 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" | ||
146 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe" | ||
147 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" | ||
148 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" | ||
149 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" | ||
150 | SectionEnd | ||
151 | |||
152 | Section Uninstall | ||
153 | |||
154 | DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" | ||
155 | DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}" | ||
156 | RMDir /r "$INSTDIR" | ||
157 | |||
158 | SectionEnd | ||
159 | |||
160 | ; GetWindowsVersion, taken from NSIS help, modified for our purposes | ||
161 | Function IsSupportedWindowsVersion | ||
162 | |||
163 | Push $R0 | ||
164 | Push $R1 | ||
165 | |||
166 | ReadRegStr $R0 HKLM \ | ||
167 | "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion | ||
168 | |||
169 | IfErrors 0 lbl_winnt | ||
170 | |||
171 | ; we are not NT | ||
172 | ReadRegStr $R0 HKLM \ | ||
173 | "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber | ||
174 | |||
175 | StrCpy $R1 $R0 1 | ||
176 | StrCmp $R1 '4' 0 lbl_error | ||
177 | |||
178 | StrCpy $R1 $R0 3 | ||
179 | |||
180 | StrCmp $R1 '4.0' lbl_win32_95 | ||
181 | StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98 | ||
182 | |||
183 | lbl_win32_95: | ||
184 | StrCpy $R0 'False' | ||
185 | Goto lbl_done | ||
186 | |||
187 | lbl_win32_98: | ||
188 | StrCpy $R0 'False' | ||
189 | Goto lbl_done | ||
190 | |||
191 | lbl_win32_ME: | ||
192 | StrCpy $R0 'False' | ||
193 | Goto lbl_done | ||
194 | |||
195 | lbl_winnt: | ||
196 | |||
197 | StrCpy $R1 $R0 1 | ||
198 | |||
199 | StrCmp $R1 '3' lbl_winnt_x | ||
200 | StrCmp $R1 '4' lbl_winnt_x | ||
201 | |||
202 | StrCpy $R1 $R0 3 | ||
203 | |||
204 | StrCmp $R1 '5.0' lbl_winnt_2000 | ||
205 | StrCmp $R1 '5.1' lbl_winnt_XP | ||
206 | StrCmp $R1 '5.2' lbl_winnt_2003 lbl_error | ||
207 | |||
208 | lbl_winnt_x: | ||
209 | StrCpy $R0 'False' | ||
210 | Goto lbl_done | ||
211 | |||
212 | lbl_winnt_2000: | ||
213 | Strcpy $R0 'True' | ||
214 | Goto lbl_done | ||
215 | |||
216 | lbl_winnt_XP: | ||
217 | Strcpy $R0 'True' | ||
218 | Goto lbl_done | ||
219 | |||
220 | lbl_winnt_2003: | ||
221 | Strcpy $R0 'True' | ||
222 | Goto lbl_done | ||
223 | |||
224 | lbl_error: | ||
225 | Strcpy $R0 'False' | ||
226 | lbl_done: | ||
227 | |||
228 | Pop $R1 | ||
229 | Exch $R0 | ||
230 | |||
231 | FunctionEnd | ||
diff --git a/Prebuild/scripts/SharpDevelop.bat b/Prebuild/scripts/SharpDevelop.bat deleted file mode 100755 index 08fea0b..0000000 --- a/Prebuild/scripts/SharpDevelop.bat +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | @rem Generates a combine (.cmbx) and a set of project files (.prjx) | ||
2 | @rem for SharpDevelop (http://icsharpcode.net/OpenSource/SD/Default.aspx) | ||
3 | cd .. | ||
4 | Prebuild.exe /target sharpdev /file prebuild.xml /build NET_1_1 /pause | ||
diff --git a/Prebuild/scripts/SharpDevelop2.bat b/Prebuild/scripts/SharpDevelop2.bat deleted file mode 100755 index 49120ab..0000000 --- a/Prebuild/scripts/SharpDevelop2.bat +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | @rem Generates a combine (.cmbx) and a set of project files (.prjx) | ||
2 | @rem for SharpDevelop (http://icsharpcode.net/OpenSource/SD/Default.aspx) | ||
3 | cd .. | ||
4 | Prebuild.exe /target sharpdev2 /file prebuild.xml /pause | ||
diff --git a/Prebuild/scripts/VS2002.bat b/Prebuild/scripts/VS2002.bat deleted file mode 100755 index dc5b6a7..0000000 --- a/Prebuild/scripts/VS2002.bat +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | @rem Generates a solution (.sln) and a set of project files (.csproj) | ||
2 | @rem for Microsoft Visual Studio .NET 2002 | ||
3 | cd .. | ||
4 | Prebuild.exe /target vs2002 /file prebuild.xml /build NET_1_1 /pause | ||
diff --git a/Prebuild/scripts/VS2003.bat b/Prebuild/scripts/VS2003.bat deleted file mode 100755 index 929a480..0000000 --- a/Prebuild/scripts/VS2003.bat +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | @rem Generates a solution (.sln) and a set of project files (.csproj) | ||
2 | @rem for Microsoft Visual Studio .NET 2002 | ||
3 | cd .. | ||
4 | Prebuild.exe /target vs2003 /file prebuild.xml /build NET_1_1 /pause | ||
diff --git a/Prebuild/scripts/VS2005.bat b/Prebuild/scripts/VS2005.bat deleted file mode 100755 index 7a7af1d..0000000 --- a/Prebuild/scripts/VS2005.bat +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | @rem Generates a solution (.sln) and a set of project files (.csproj, .vbproj, etc.) | ||
2 | @rem for Microsoft Visual Studio .NET 2005 | ||
3 | cd .. | ||
4 | Prebuild.exe /target vs2005 /file prebuild.xml /build NET_2_0 /pause | ||
diff --git a/Prebuild/scripts/VS2008.bat b/Prebuild/scripts/VS2008.bat deleted file mode 100755 index eb51a82..0000000 --- a/Prebuild/scripts/VS2008.bat +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | @rem Generates a solution (.sln) and a set of project files (.csproj, .vbproj, etc.) | ||
2 | @rem for Microsoft Visual Studio .NET 2008 | ||
3 | cd .. | ||
4 | Prebuild.exe /target vs2008 /file prebuild.xml /pause | ||
diff --git a/Prebuild/scripts/autotools.bat b/Prebuild/scripts/autotools.bat deleted file mode 100755 index 43f9a74..0000000 --- a/Prebuild/scripts/autotools.bat +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | @rem Generates Makefiles | ||
2 | @rem for autotools | ||
3 | cd .. | ||
4 | Prebuild.exe /target autotools /file prebuild.xml /pause | ||
diff --git a/Prebuild/scripts/autotools.sh b/Prebuild/scripts/autotools.sh deleted file mode 100755 index 4d140ce..0000000 --- a/Prebuild/scripts/autotools.sh +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | RUNTIME=`which mono` | ||
3 | |||
4 | SCRIPTDIR=`dirname $0` | ||
5 | ${RUNTIME} ${SCRIPTDIR}/../Prebuild.exe /target autotools /file ${SCRIPTDIR}/../prebuild.xml /build NET_2_0 | ||
diff --git a/Prebuild/scripts/makefile.bat b/Prebuild/scripts/makefile.bat deleted file mode 100755 index eef9a69..0000000 --- a/Prebuild/scripts/makefile.bat +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | @rem Generates makefiles | ||
2 | @rem for make | ||
3 | cd .. | ||
4 | Prebuild.exe /target makefile /file prebuild.xml /pause | ||
diff --git a/Prebuild/scripts/makefile.sh b/Prebuild/scripts/makefile.sh deleted file mode 100755 index 2e656cb..0000000 --- a/Prebuild/scripts/makefile.sh +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | ./prebuild /target makefile /file ../prebuild.xml /pause | ||
4 | |||
5 | if [ -f ../Makefile ] | ||
6 | then | ||
7 | rm -rf ../Makefile | ||
8 | fi | ||
9 | |||
10 | mv ../Prebuild.make ../Makefile | ||
diff --git a/Prebuild/scripts/nant.bat b/Prebuild/scripts/nant.bat deleted file mode 100755 index 925467d..0000000 --- a/Prebuild/scripts/nant.bat +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | @rem Generates a .build files | ||
2 | @rem for NAnt | ||
3 | cd .. | ||
4 | Prebuild.exe /target nant /file prebuild.xml /pause | ||
diff --git a/Prebuild/scripts/nant.sh b/Prebuild/scripts/nant.sh deleted file mode 100755 index 0311971..0000000 --- a/Prebuild/scripts/nant.sh +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | prebuild /target nant /file ../prebuild.xml /pause | ||
diff --git a/Prebuild/scripts/xcode.bat b/Prebuild/scripts/xcode.bat deleted file mode 100755 index 9883edf..0000000 --- a/Prebuild/scripts/xcode.bat +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | @rem Generates a Xcode files | ||
2 | @rem for NAnt | ||
3 | cd .. | ||
4 | Prebuild.exe /target xcode /file prebuild.xml /pause | ||
diff --git a/Prebuild/scripts/xcode.sh b/Prebuild/scripts/xcode.sh deleted file mode 100755 index e9b58f9..0000000 --- a/Prebuild/scripts/xcode.sh +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | prebuild /target xcode /file ../prebuild.xml /pause | ||
diff --git a/Prebuild/src/App.ico b/Prebuild/src/App.ico deleted file mode 100644 index ac4ea6f..0000000 --- a/Prebuild/src/App.ico +++ /dev/null | |||
Binary files differ | |||
diff --git a/Prebuild/src/Core/Attributes/DataNodeAttribute.cs b/Prebuild/src/Core/Attributes/DataNodeAttribute.cs deleted file mode 100644 index f1938a2..0000000 --- a/Prebuild/src/Core/Attributes/DataNodeAttribute.cs +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Collections.Specialized; | ||
28 | |||
29 | namespace Prebuild.Core.Attributes | ||
30 | { | ||
31 | /// <summary> | ||
32 | /// | ||
33 | /// </summary> | ||
34 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple=true)] | ||
35 | public sealed class DataNodeAttribute : Attribute | ||
36 | { | ||
37 | #region Fields | ||
38 | |||
39 | private string m_Name = "unknown"; | ||
40 | |||
41 | #endregion | ||
42 | |||
43 | #region Constructors | ||
44 | |||
45 | /// <summary> | ||
46 | /// Initializes a new instance of the <see cref="DataNodeAttribute"/> class. | ||
47 | /// </summary> | ||
48 | /// <param name="name">The name.</param> | ||
49 | public DataNodeAttribute(string name) | ||
50 | { | ||
51 | m_Name = name; | ||
52 | } | ||
53 | |||
54 | #endregion | ||
55 | |||
56 | #region Properties | ||
57 | |||
58 | /// <summary> | ||
59 | /// Gets the name. | ||
60 | /// </summary> | ||
61 | /// <value>The name.</value> | ||
62 | public string Name | ||
63 | { | ||
64 | get | ||
65 | { | ||
66 | return m_Name; | ||
67 | } | ||
68 | } | ||
69 | |||
70 | #endregion | ||
71 | } | ||
72 | } | ||
diff --git a/Prebuild/src/Core/Attributes/OptionNodeAttribute.cs b/Prebuild/src/Core/Attributes/OptionNodeAttribute.cs deleted file mode 100644 index 2d6a6a7..0000000 --- a/Prebuild/src/Core/Attributes/OptionNodeAttribute.cs +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | |||
28 | namespace Prebuild.Core.Attributes | ||
29 | { | ||
30 | /// <summary> | ||
31 | /// | ||
32 | /// </summary> | ||
33 | [AttributeUsage(AttributeTargets.Field)] | ||
34 | public sealed class OptionNodeAttribute : Attribute | ||
35 | { | ||
36 | #region Fields | ||
37 | |||
38 | private string m_NodeName; | ||
39 | |||
40 | #endregion | ||
41 | |||
42 | #region Constructors | ||
43 | |||
44 | /// <summary> | ||
45 | /// Initializes a new instance of the <see cref="OptionNodeAttribute"/> class. | ||
46 | /// </summary> | ||
47 | /// <param name="nodeName">Name of the node.</param> | ||
48 | public OptionNodeAttribute(string nodeName) | ||
49 | { | ||
50 | m_NodeName = nodeName; | ||
51 | } | ||
52 | |||
53 | #endregion | ||
54 | |||
55 | #region Properties | ||
56 | |||
57 | /// <summary> | ||
58 | /// Gets the name of the node. | ||
59 | /// </summary> | ||
60 | /// <value>The name of the node.</value> | ||
61 | public string NodeName | ||
62 | { | ||
63 | get | ||
64 | { | ||
65 | return m_NodeName; | ||
66 | } | ||
67 | } | ||
68 | |||
69 | #endregion | ||
70 | } | ||
71 | } | ||
diff --git a/Prebuild/src/Core/Attributes/TargetAttribute.cs b/Prebuild/src/Core/Attributes/TargetAttribute.cs deleted file mode 100644 index 5ad62ee..0000000 --- a/Prebuild/src/Core/Attributes/TargetAttribute.cs +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | |||
28 | namespace Prebuild.Core.Attributes | ||
29 | { | ||
30 | /// <summary> | ||
31 | /// | ||
32 | /// </summary> | ||
33 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)] | ||
34 | public sealed class TargetAttribute : Attribute | ||
35 | { | ||
36 | #region Fields | ||
37 | |||
38 | private string m_Name; | ||
39 | |||
40 | #endregion | ||
41 | |||
42 | #region Constructors | ||
43 | |||
44 | /// <summary> | ||
45 | /// Initializes a new instance of the <see cref="TargetAttribute"/> class. | ||
46 | /// </summary> | ||
47 | /// <param name="name">The name.</param> | ||
48 | public TargetAttribute(string name) | ||
49 | { | ||
50 | m_Name = name; | ||
51 | } | ||
52 | |||
53 | #endregion | ||
54 | |||
55 | #region Properties | ||
56 | |||
57 | /// <summary> | ||
58 | /// Gets the name. | ||
59 | /// </summary> | ||
60 | /// <value>The name.</value> | ||
61 | public string Name | ||
62 | { | ||
63 | get | ||
64 | { | ||
65 | return m_Name; | ||
66 | } | ||
67 | } | ||
68 | |||
69 | #endregion | ||
70 | } | ||
71 | } | ||
diff --git a/Prebuild/src/Core/FatalException.cs b/Prebuild/src/Core/FatalException.cs deleted file mode 100644 index 3487905..0000000 --- a/Prebuild/src/Core/FatalException.cs +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Runtime.Serialization; | ||
28 | |||
29 | namespace Prebuild.Core | ||
30 | { | ||
31 | /// <summary> | ||
32 | /// | ||
33 | /// </summary> | ||
34 | [Serializable()] | ||
35 | public class FatalException : Exception | ||
36 | { | ||
37 | #region Constructors | ||
38 | |||
39 | |||
40 | /// <summary> | ||
41 | /// Initializes a new instance of the <see cref="FatalException"/> class. | ||
42 | /// </summary> | ||
43 | public FatalException() | ||
44 | { | ||
45 | } | ||
46 | |||
47 | /// <summary> | ||
48 | /// Initializes a new instance of the <see cref="FatalException"/> class. | ||
49 | /// </summary> | ||
50 | /// <param name="format">The format.</param> | ||
51 | /// <param name="args">The args.</param> | ||
52 | public FatalException(string format, params object[] args) | ||
53 | : base(String.Format(format, args)) | ||
54 | { | ||
55 | } | ||
56 | |||
57 | /// <summary> | ||
58 | /// Exception with specified string | ||
59 | /// </summary> | ||
60 | /// <param name="message">Exception message</param> | ||
61 | public FatalException(string message): base(message) | ||
62 | { | ||
63 | } | ||
64 | |||
65 | /// <summary> | ||
66 | /// | ||
67 | /// </summary> | ||
68 | /// <param name="message"></param> | ||
69 | /// <param name="exception"></param> | ||
70 | public FatalException(string message, Exception exception) : base(message, exception) | ||
71 | { | ||
72 | } | ||
73 | |||
74 | /// <summary> | ||
75 | /// | ||
76 | /// </summary> | ||
77 | /// <param name="info"></param> | ||
78 | /// <param name="context"></param> | ||
79 | protected FatalException(SerializationInfo info, StreamingContext context) : base( info, context ) | ||
80 | { | ||
81 | } | ||
82 | |||
83 | #endregion | ||
84 | } | ||
85 | } | ||
diff --git a/Prebuild/src/Core/Interfaces/IDataNode.cs b/Prebuild/src/Core/Interfaces/IDataNode.cs deleted file mode 100644 index 986dd2d..0000000 --- a/Prebuild/src/Core/Interfaces/IDataNode.cs +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Xml; | ||
28 | |||
29 | namespace Prebuild.Core.Interfaces | ||
30 | { | ||
31 | /// <summary> | ||
32 | /// | ||
33 | /// </summary> | ||
34 | public interface IDataNode | ||
35 | { | ||
36 | /// <summary> | ||
37 | /// Gets or sets the parent. | ||
38 | /// </summary> | ||
39 | /// <value>The parent.</value> | ||
40 | IDataNode Parent { get; set; } | ||
41 | /// <summary> | ||
42 | /// Parses the specified node. | ||
43 | /// </summary> | ||
44 | /// <param name="node">The node.</param> | ||
45 | void Parse(XmlNode node); | ||
46 | } | ||
47 | } | ||
diff --git a/Prebuild/src/Core/Interfaces/ITarget.cs b/Prebuild/src/Core/Interfaces/ITarget.cs deleted file mode 100644 index 47115c6..0000000 --- a/Prebuild/src/Core/Interfaces/ITarget.cs +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | |||
28 | namespace Prebuild.Core.Interfaces | ||
29 | { | ||
30 | /// <summary> | ||
31 | /// | ||
32 | /// </summary> | ||
33 | public interface ITarget | ||
34 | { | ||
35 | /// <summary> | ||
36 | /// Writes the specified kern. | ||
37 | /// </summary> | ||
38 | /// <param name="kern">The kern.</param> | ||
39 | void Write(Kernel kern); | ||
40 | /// <summary> | ||
41 | /// Cleans the specified kern. | ||
42 | /// </summary> | ||
43 | /// <param name="kern">The kern.</param> | ||
44 | void Clean(Kernel kern); | ||
45 | /// <summary> | ||
46 | /// Gets the name. | ||
47 | /// </summary> | ||
48 | /// <value>The name.</value> | ||
49 | string Name { get; } | ||
50 | } | ||
51 | } \ No newline at end of file | ||
diff --git a/Prebuild/src/Core/Kernel.cs b/Prebuild/src/Core/Kernel.cs deleted file mode 100644 index 95ef04e..0000000 --- a/Prebuild/src/Core/Kernel.cs +++ /dev/null | |||
@@ -1,831 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2008 | ||
4 | Matthew Holmes (matthew@wildfiregames.com), | ||
5 | Dan Moorehead (dan05a@gmail.com), | ||
6 | Rob Loach (http://www.robloach.net), | ||
7 | C.J. Adams-Collier (cjac@colliertech.org) | ||
8 | |||
9 | Redistribution and use in source and binary forms, with or without | ||
10 | modification, are permitted provided that the following conditions are | ||
11 | met: | ||
12 | |||
13 | * Redistributions of source code must retain the above copyright | ||
14 | notice, this list of conditions and the following disclaimer. | ||
15 | |||
16 | * Redistributions in binary form must reproduce the above copyright | ||
17 | notice, this list of conditions and the following disclaimer in the | ||
18 | documentation and/or other materials provided with the distribution. | ||
19 | |||
20 | * The name of the author may not be used to endorse or promote | ||
21 | products derived from this software without specific prior written | ||
22 | permission. | ||
23 | |||
24 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | ||
25 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
26 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
27 | DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, | ||
28 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
29 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
30 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
31 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
32 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
33 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
34 | POSSIBILITY OF SUCH DAMAGE. | ||
35 | |||
36 | */ | ||
37 | #endregion | ||
38 | |||
39 | using System; | ||
40 | using System.Collections.Generic; | ||
41 | using System.Diagnostics; | ||
42 | using System.Collections; | ||
43 | using System.Collections.Specialized; | ||
44 | using System.IO; | ||
45 | using System.Reflection; | ||
46 | using System.Xml; | ||
47 | using System.Xml.Schema; | ||
48 | using System.Text; | ||
49 | |||
50 | using Prebuild.Core.Attributes; | ||
51 | using Prebuild.Core.Interfaces; | ||
52 | using Prebuild.Core.Nodes; | ||
53 | using Prebuild.Core.Parse; | ||
54 | using Prebuild.Core.Utilities; | ||
55 | |||
56 | namespace Prebuild.Core | ||
57 | { | ||
58 | /// <summary> | ||
59 | /// | ||
60 | /// </summary> | ||
61 | public class Kernel : IDisposable | ||
62 | { | ||
63 | #region Inner Classes | ||
64 | |||
65 | private struct NodeEntry | ||
66 | { | ||
67 | public Type Type; | ||
68 | public DataNodeAttribute Attribute; | ||
69 | } | ||
70 | |||
71 | #endregion | ||
72 | |||
73 | #region Fields | ||
74 | |||
75 | private static readonly Kernel m_Instance = new Kernel(); | ||
76 | |||
77 | /// <summary> | ||
78 | /// This must match the version of the schema that is embeeded | ||
79 | /// </summary> | ||
80 | private const string m_SchemaVersion = "1.7"; | ||
81 | private const string m_Schema = "prebuild-" + m_SchemaVersion + ".xsd"; | ||
82 | private const string m_SchemaURI = "http://dnpb.sourceforge.net/schemas/" + m_Schema; | ||
83 | bool disposed; | ||
84 | private Version m_Version; | ||
85 | private const string m_Revision = ""; | ||
86 | private CommandLineCollection m_CommandLine; | ||
87 | private Log m_Log; | ||
88 | private CurrentDirectory m_CurrentWorkingDirectory; | ||
89 | private XmlSchemaCollection m_Schemas; | ||
90 | |||
91 | private Hashtable m_Targets; | ||
92 | private Hashtable m_Nodes; | ||
93 | |||
94 | readonly List<SolutionNode> m_Solutions = new List<SolutionNode>(); | ||
95 | string m_Target; | ||
96 | string m_Clean; | ||
97 | string[] m_RemoveDirectories; | ||
98 | XmlDocument m_CurrentDoc; | ||
99 | bool m_PauseAfterFinish; | ||
100 | string[] m_ProjectGroups; | ||
101 | |||
102 | #endregion | ||
103 | |||
104 | #region Constructors | ||
105 | |||
106 | private Kernel() | ||
107 | { | ||
108 | } | ||
109 | |||
110 | #endregion | ||
111 | |||
112 | #region Properties | ||
113 | |||
114 | /// <summary> | ||
115 | /// Gets a value indicating whether [pause after finish]. | ||
116 | /// </summary> | ||
117 | /// <value><c>true</c> if [pause after finish]; otherwise, <c>false</c>.</value> | ||
118 | public bool PauseAfterFinish | ||
119 | { | ||
120 | get | ||
121 | { | ||
122 | return m_PauseAfterFinish; | ||
123 | } | ||
124 | } | ||
125 | |||
126 | /// <summary> | ||
127 | /// Gets the instance. | ||
128 | /// </summary> | ||
129 | /// <value>The instance.</value> | ||
130 | public static Kernel Instance | ||
131 | { | ||
132 | get | ||
133 | { | ||
134 | return m_Instance; | ||
135 | } | ||
136 | } | ||
137 | |||
138 | /// <summary> | ||
139 | /// Gets the version. | ||
140 | /// </summary> | ||
141 | /// <value>The version.</value> | ||
142 | public string Version | ||
143 | { | ||
144 | get | ||
145 | { | ||
146 | return String.Format("{0}.{1}.{2}{3}", m_Version.Major, m_Version.Minor, m_Version.Build, m_Revision); | ||
147 | } | ||
148 | } | ||
149 | |||
150 | /// <summary> | ||
151 | /// Gets the command line. | ||
152 | /// </summary> | ||
153 | /// <value>The command line.</value> | ||
154 | public CommandLineCollection CommandLine | ||
155 | { | ||
156 | get | ||
157 | { | ||
158 | return m_CommandLine; | ||
159 | } | ||
160 | } | ||
161 | |||
162 | /// <summary> | ||
163 | /// Gets the targets. | ||
164 | /// </summary> | ||
165 | /// <value>The targets.</value> | ||
166 | public Hashtable Targets | ||
167 | { | ||
168 | get | ||
169 | { | ||
170 | return m_Targets; | ||
171 | } | ||
172 | } | ||
173 | |||
174 | /// <summary> | ||
175 | /// Gets the log. | ||
176 | /// </summary> | ||
177 | /// <value>The log.</value> | ||
178 | public Log Log | ||
179 | { | ||
180 | get | ||
181 | { | ||
182 | return m_Log; | ||
183 | } | ||
184 | } | ||
185 | |||
186 | /// <summary> | ||
187 | /// Gets the current working directory. | ||
188 | /// </summary> | ||
189 | /// <value>The current working directory.</value> | ||
190 | public CurrentDirectory CurrentWorkingDirectory | ||
191 | { | ||
192 | get | ||
193 | { | ||
194 | return m_CurrentWorkingDirectory; | ||
195 | } | ||
196 | } | ||
197 | |||
198 | /// <summary> | ||
199 | /// Gets the solutions. | ||
200 | /// </summary> | ||
201 | /// <value>The solutions.</value> | ||
202 | public List<SolutionNode> Solutions | ||
203 | { | ||
204 | get | ||
205 | { | ||
206 | return m_Solutions; | ||
207 | } | ||
208 | } | ||
209 | |||
210 | /// <summary> | ||
211 | /// Gets the XmlDocument object representing the prebuild.xml | ||
212 | /// being processed | ||
213 | /// </summary> | ||
214 | /// <value>The XmlDocument object</value> | ||
215 | public XmlDocument CurrentDoc | ||
216 | { | ||
217 | get | ||
218 | { | ||
219 | return m_CurrentDoc; | ||
220 | } | ||
221 | } | ||
222 | |||
223 | #endregion | ||
224 | |||
225 | #region Private Methods | ||
226 | |||
227 | private static void RemoveDirectories(string rootDir, string[] dirNames) | ||
228 | { | ||
229 | foreach(string dir in Directory.GetDirectories(rootDir)) | ||
230 | { | ||
231 | string simpleName = Path.GetFileName(dir); | ||
232 | |||
233 | if(Array.IndexOf(dirNames, simpleName) != -1) | ||
234 | { | ||
235 | //delete if the name matches one of the directory names to delete | ||
236 | string fullDirPath = Path.GetFullPath(dir); | ||
237 | Directory.Delete(fullDirPath,true); | ||
238 | } | ||
239 | else//not a match, so check children | ||
240 | { | ||
241 | RemoveDirectories(dir,dirNames); | ||
242 | //recurse, checking children for them | ||
243 | } | ||
244 | } | ||
245 | } | ||
246 | |||
247 | // private void RemoveDirectoryMatches(string rootDir, string dirPattern) | ||
248 | // { | ||
249 | // foreach(string dir in Directory.GetDirectories(rootDir)) | ||
250 | // { | ||
251 | // foreach(string match in Directory.GetDirectories(dir)) | ||
252 | // {//delete all child directories that match | ||
253 | // Directory.Delete(Path.GetFullPath(match),true); | ||
254 | // } | ||
255 | // //recure through the rest checking for nested matches to delete | ||
256 | // RemoveDirectoryMatches(dir,dirPattern); | ||
257 | // } | ||
258 | // } | ||
259 | |||
260 | private void LoadSchema() | ||
261 | { | ||
262 | Assembly assembly = this.GetType().Assembly; | ||
263 | Stream stream = assembly.GetManifestResourceStream("Prebuild.data." + m_Schema); | ||
264 | if(stream == null) | ||
265 | { | ||
266 | //try without the default namespace prepending to it in case was compiled with SharpDevelop or MonoDevelop instead of Visual Studio .NET | ||
267 | stream = assembly.GetManifestResourceStream(m_Schema); | ||
268 | if(stream == null) | ||
269 | { | ||
270 | throw new System.Reflection.TargetException(string.Format("Could not find the scheme embedded resource file '{0}'.", m_Schema)); | ||
271 | } | ||
272 | } | ||
273 | XmlReader schema = new XmlTextReader(stream); | ||
274 | |||
275 | m_Schemas = new XmlSchemaCollection(); | ||
276 | m_Schemas.Add(m_SchemaURI, schema); | ||
277 | } | ||
278 | |||
279 | private void CacheVersion() | ||
280 | { | ||
281 | m_Version = Assembly.GetEntryAssembly().GetName().Version; | ||
282 | } | ||
283 | |||
284 | private void CacheTargets(Assembly assm) | ||
285 | { | ||
286 | foreach(Type t in assm.GetTypes()) | ||
287 | { | ||
288 | TargetAttribute ta = (TargetAttribute)Helper.CheckType(t, typeof(TargetAttribute), typeof(ITarget)); | ||
289 | |||
290 | if(ta == null) | ||
291 | continue; | ||
292 | |||
293 | if (t.IsAbstract) | ||
294 | continue; | ||
295 | |||
296 | ITarget target = (ITarget)assm.CreateInstance(t.FullName); | ||
297 | if (target == null) | ||
298 | { | ||
299 | throw new MissingMethodException("Could not create ITarget instance"); | ||
300 | } | ||
301 | |||
302 | m_Targets[ta.Name] = target; | ||
303 | } | ||
304 | } | ||
305 | |||
306 | private void CacheNodeTypes(Assembly assm) | ||
307 | { | ||
308 | foreach(Type t in assm.GetTypes()) | ||
309 | { | ||
310 | foreach (DataNodeAttribute dna in t.GetCustomAttributes(typeof(DataNodeAttribute), true)) | ||
311 | { | ||
312 | NodeEntry ne = new NodeEntry(); | ||
313 | ne.Type = t; | ||
314 | ne.Attribute = dna; | ||
315 | m_Nodes[dna.Name] = ne; | ||
316 | } | ||
317 | } | ||
318 | } | ||
319 | |||
320 | private void LogBanner() | ||
321 | { | ||
322 | m_Log.Write("Prebuild v" + this.Version); | ||
323 | m_Log.Write("Copyright (c) 2004-2008"); | ||
324 | m_Log.Write("Matthew Holmes (matthew@wildfiregames.com),"); | ||
325 | m_Log.Write("Dan Moorehead (dan05a@gmail.com),"); | ||
326 | m_Log.Write("David Hudson (jendave@yahoo.com),"); | ||
327 | m_Log.Write("Rob Loach (http://www.robloach.net),"); | ||
328 | m_Log.Write("C.J. Adams-Collier (cjac@colliertech.org),"); | ||
329 | |||
330 | m_Log.Write("See 'prebuild /usage' for help"); | ||
331 | m_Log.Write(); | ||
332 | } | ||
333 | |||
334 | |||
335 | |||
336 | private void ProcessFile(string file) | ||
337 | { | ||
338 | ProcessFile(file, this.m_Solutions); | ||
339 | } | ||
340 | |||
341 | public void ProcessFile(ProcessNode node, SolutionNode parent) | ||
342 | { | ||
343 | if (node.IsValid) | ||
344 | { | ||
345 | List<SolutionNode> list = new List<SolutionNode>(); | ||
346 | ProcessFile(node.Path, list); | ||
347 | |||
348 | foreach (SolutionNode solution in list) | ||
349 | parent.SolutionsTable[solution.Name] = solution; | ||
350 | } | ||
351 | } | ||
352 | |||
353 | /// <summary> | ||
354 | /// | ||
355 | /// </summary> | ||
356 | /// <param name="file"></param> | ||
357 | /// <param name="solutions"></param> | ||
358 | /// <returns></returns> | ||
359 | public void ProcessFile(string file, IList<SolutionNode> solutions) | ||
360 | { | ||
361 | m_CurrentWorkingDirectory.Push(); | ||
362 | |||
363 | string path = file; | ||
364 | try | ||
365 | { | ||
366 | try | ||
367 | { | ||
368 | path = Helper.ResolvePath(path); | ||
369 | } | ||
370 | catch(ArgumentException) | ||
371 | { | ||
372 | m_Log.Write("Could not open Prebuild file: " + path); | ||
373 | m_CurrentWorkingDirectory.Pop(); | ||
374 | return; | ||
375 | } | ||
376 | |||
377 | Helper.SetCurrentDir(Path.GetDirectoryName(path)); | ||
378 | |||
379 | XmlTextReader reader = new XmlTextReader(path); | ||
380 | |||
381 | Core.Parse.Preprocessor pre = new Core.Parse.Preprocessor(); | ||
382 | |||
383 | //register command line arguments as XML variables | ||
384 | IDictionaryEnumerator dict = m_CommandLine.GetEnumerator(); | ||
385 | while (dict.MoveNext()) | ||
386 | { | ||
387 | string name = dict.Key.ToString().Trim(); | ||
388 | if (name.Length > 0) | ||
389 | pre.RegisterVariable(name, dict.Value.ToString()); | ||
390 | } | ||
391 | |||
392 | string xml = pre.Process(reader);//remove script and evaulate pre-proccessing to get schema-conforming XML | ||
393 | |||
394 | // See if the user put into a pseudo target of "prebuild:preprocessed-input" to indicate they want to see the | ||
395 | // output before the system processes it. | ||
396 | if (m_CommandLine.WasPassed("ppi")) | ||
397 | { | ||
398 | // Get the filename if there is one, otherwise use a default. | ||
399 | string ppiFile = m_CommandLine["ppi"]; | ||
400 | if (ppiFile == null || ppiFile.Trim().Length == 0) | ||
401 | { | ||
402 | ppiFile = "preprocessed-input.xml"; | ||
403 | } | ||
404 | |||
405 | // Write out the string to the given stream. | ||
406 | try | ||
407 | { | ||
408 | using (StreamWriter ppiWriter = new StreamWriter(ppiFile)) | ||
409 | { | ||
410 | ppiWriter.WriteLine(xml); | ||
411 | } | ||
412 | } | ||
413 | catch(IOException ex) | ||
414 | { | ||
415 | Console.WriteLine("Could not write PPI file '{0}': {1}", ppiFile, ex.Message); | ||
416 | } | ||
417 | |||
418 | // Finish processing this special tag. | ||
419 | return; | ||
420 | } | ||
421 | |||
422 | m_CurrentDoc = new XmlDocument(); | ||
423 | try | ||
424 | { | ||
425 | XmlValidatingReader validator = new XmlValidatingReader(new XmlTextReader(new StringReader(xml))); | ||
426 | |||
427 | //validate while reading from string into XmlDocument DOM structure in memory | ||
428 | foreach(XmlSchema schema in m_Schemas) | ||
429 | { | ||
430 | validator.Schemas.Add(schema); | ||
431 | } | ||
432 | m_CurrentDoc.Load(validator); | ||
433 | } | ||
434 | catch(XmlException e) | ||
435 | { | ||
436 | throw new XmlException(e.ToString()); | ||
437 | } | ||
438 | |||
439 | //is there a purpose to writing it? An syntax/schema problem would have been found during pre.Process() and reported with details | ||
440 | if(m_CommandLine.WasPassed("ppo")) | ||
441 | { | ||
442 | string ppoFile = m_CommandLine["ppo"]; | ||
443 | if(ppoFile == null || ppoFile.Trim().Length < 1) | ||
444 | { | ||
445 | ppoFile = "preprocessed.xml"; | ||
446 | } | ||
447 | |||
448 | StreamWriter writer = null; | ||
449 | try | ||
450 | { | ||
451 | writer = new StreamWriter(ppoFile); | ||
452 | writer.Write(xml); | ||
453 | } | ||
454 | catch(IOException ex) | ||
455 | { | ||
456 | Console.WriteLine("Could not write PPO file '{0}': {1}", ppoFile, ex.Message); | ||
457 | } | ||
458 | finally | ||
459 | { | ||
460 | if(writer != null) | ||
461 | { | ||
462 | writer.Close(); | ||
463 | } | ||
464 | } | ||
465 | return; | ||
466 | } | ||
467 | //start reading the xml config file | ||
468 | XmlElement rootNode = m_CurrentDoc.DocumentElement; | ||
469 | //string suggestedVersion = Helper.AttributeValue(rootNode,"version","1.0"); | ||
470 | Helper.CheckForOSVariables = Helper.ParseBoolean(rootNode,"checkOsVars",false); | ||
471 | |||
472 | foreach(XmlNode node in rootNode.ChildNodes)//solutions or if pre-proc instructions | ||
473 | { | ||
474 | IDataNode dataNode = ParseNode(node, null); | ||
475 | if(dataNode is ProcessNode) | ||
476 | { | ||
477 | ProcessNode proc = (ProcessNode)dataNode; | ||
478 | if(proc.IsValid) | ||
479 | { | ||
480 | ProcessFile(proc.Path); | ||
481 | } | ||
482 | } | ||
483 | else if(dataNode is SolutionNode) | ||
484 | { | ||
485 | solutions.Add((SolutionNode)dataNode); | ||
486 | } | ||
487 | } | ||
488 | } | ||
489 | catch(XmlSchemaException xse) | ||
490 | { | ||
491 | m_Log.Write("XML validation error at line {0} in {1}:\n\n{2}", | ||
492 | xse.LineNumber, path, xse.Message); | ||
493 | } | ||
494 | finally | ||
495 | { | ||
496 | m_CurrentWorkingDirectory.Pop(); | ||
497 | } | ||
498 | } | ||
499 | |||
500 | #endregion | ||
501 | |||
502 | #region Public Methods | ||
503 | |||
504 | /// <summary> | ||
505 | /// Allows the project. | ||
506 | /// </summary> | ||
507 | /// <param name="projectGroupsFlags">The project groups flags.</param> | ||
508 | /// <returns></returns> | ||
509 | public bool AllowProject(string projectGroupsFlags) | ||
510 | { | ||
511 | if(m_ProjectGroups != null && m_ProjectGroups.Length > 0) | ||
512 | { | ||
513 | if(projectGroupsFlags != null && projectGroupsFlags.Length == 0) | ||
514 | { | ||
515 | foreach(string group in projectGroupsFlags.Split('|')) | ||
516 | { | ||
517 | if(Array.IndexOf(m_ProjectGroups, group) != -1) //if included in the filter list | ||
518 | { | ||
519 | return true; | ||
520 | } | ||
521 | } | ||
522 | } | ||
523 | return false;//not included in the list or no groups specified for the project | ||
524 | } | ||
525 | return true;//no filter specified in the command line args | ||
526 | } | ||
527 | |||
528 | /// <summary> | ||
529 | /// Gets the type of the node. | ||
530 | /// </summary> | ||
531 | /// <param name="node">The node.</param> | ||
532 | /// <returns></returns> | ||
533 | public Type GetNodeType(XmlNode node) | ||
534 | { | ||
535 | if( node == null ) | ||
536 | { | ||
537 | throw new ArgumentNullException("node"); | ||
538 | } | ||
539 | if(!m_Nodes.ContainsKey(node.Name)) | ||
540 | { | ||
541 | return null; | ||
542 | } | ||
543 | |||
544 | NodeEntry ne = (NodeEntry)m_Nodes[node.Name]; | ||
545 | return ne.Type; | ||
546 | } | ||
547 | |||
548 | /// <summary> | ||
549 | /// | ||
550 | /// </summary> | ||
551 | /// <param name="node"></param> | ||
552 | /// <param name="parent"></param> | ||
553 | /// <returns></returns> | ||
554 | public IDataNode ParseNode(XmlNode node, IDataNode parent) | ||
555 | { | ||
556 | return ParseNode(node, parent, null); | ||
557 | } | ||
558 | |||
559 | //Create an instance of the data node type that is mapped to the name of the xml DOM node | ||
560 | /// <summary> | ||
561 | /// Parses the node. | ||
562 | /// </summary> | ||
563 | /// <param name="node">The node.</param> | ||
564 | /// <param name="parent">The parent.</param> | ||
565 | /// <param name="preNode">The pre node.</param> | ||
566 | /// <returns></returns> | ||
567 | public IDataNode ParseNode(XmlNode node, IDataNode parent, IDataNode preNode) | ||
568 | { | ||
569 | IDataNode dataNode; | ||
570 | |||
571 | try | ||
572 | { | ||
573 | if( node == null ) | ||
574 | { | ||
575 | throw new ArgumentNullException("node"); | ||
576 | } | ||
577 | if(preNode == null) | ||
578 | { | ||
579 | if(!m_Nodes.ContainsKey(node.Name)) | ||
580 | { | ||
581 | //throw new XmlException("Unknown XML node: " + node.Name); | ||
582 | return null; | ||
583 | } | ||
584 | |||
585 | NodeEntry ne = (NodeEntry)m_Nodes[node.Name]; | ||
586 | Type type = ne.Type; | ||
587 | //DataNodeAttribute dna = ne.Attribute; | ||
588 | |||
589 | dataNode = (IDataNode)type.Assembly.CreateInstance(type.FullName); | ||
590 | if(dataNode == null) | ||
591 | { | ||
592 | throw new System.Reflection.TargetException("Could not create new parser instance: " + type.FullName); | ||
593 | } | ||
594 | } | ||
595 | else | ||
596 | dataNode = preNode; | ||
597 | |||
598 | dataNode.Parent = parent; | ||
599 | dataNode.Parse(node); | ||
600 | } | ||
601 | catch(WarningException wex) | ||
602 | { | ||
603 | m_Log.Write(LogType.Warning, wex.Message); | ||
604 | return null; | ||
605 | } | ||
606 | catch(FatalException fex) | ||
607 | { | ||
608 | m_Log.WriteException(LogType.Error, fex); | ||
609 | throw; | ||
610 | } | ||
611 | catch(Exception ex) | ||
612 | { | ||
613 | m_Log.WriteException(LogType.Error, ex); | ||
614 | throw; | ||
615 | } | ||
616 | |||
617 | return dataNode; | ||
618 | } | ||
619 | |||
620 | /// <summary> | ||
621 | /// Initializes the specified target. | ||
622 | /// </summary> | ||
623 | /// <param name="target">The target.</param> | ||
624 | /// <param name="args">The args.</param> | ||
625 | public void Initialize(LogTargets target, string[] args) | ||
626 | { | ||
627 | m_Targets = new Hashtable(); | ||
628 | CacheTargets(this.GetType().Assembly); | ||
629 | m_Nodes = new Hashtable(); | ||
630 | CacheNodeTypes(this.GetType().Assembly); | ||
631 | CacheVersion(); | ||
632 | |||
633 | m_CommandLine = new CommandLineCollection(args); | ||
634 | |||
635 | string logFile = null; | ||
636 | if(m_CommandLine.WasPassed("log")) | ||
637 | { | ||
638 | logFile = m_CommandLine["log"]; | ||
639 | |||
640 | if(logFile != null && logFile.Length == 0) | ||
641 | { | ||
642 | logFile = "Prebuild.log"; | ||
643 | } | ||
644 | } | ||
645 | else | ||
646 | { | ||
647 | target = target & ~LogTargets.File; //dont output to a file | ||
648 | } | ||
649 | |||
650 | m_Log = new Log(target, logFile); | ||
651 | LogBanner(); | ||
652 | |||
653 | m_CurrentWorkingDirectory = new CurrentDirectory(); | ||
654 | |||
655 | m_Target = m_CommandLine["target"]; | ||
656 | m_Clean = m_CommandLine["clean"]; | ||
657 | string removeDirs = m_CommandLine["removedir"]; | ||
658 | if(removeDirs != null && removeDirs.Length == 0) | ||
659 | { | ||
660 | m_RemoveDirectories = removeDirs.Split('|'); | ||
661 | } | ||
662 | |||
663 | string flags = m_CommandLine["allowedgroups"];//allows filtering by specifying a pipe-delimited list of groups to include | ||
664 | if(flags != null && flags.Length == 0) | ||
665 | { | ||
666 | m_ProjectGroups = flags.Split('|'); | ||
667 | } | ||
668 | m_PauseAfterFinish = m_CommandLine.WasPassed("pause"); | ||
669 | |||
670 | LoadSchema(); | ||
671 | } | ||
672 | |||
673 | /// <summary> | ||
674 | /// Processes this instance. | ||
675 | /// </summary> | ||
676 | public void Process() | ||
677 | { | ||
678 | bool perfomedOtherTask = false; | ||
679 | if(m_RemoveDirectories != null && m_RemoveDirectories.Length > 0) | ||
680 | { | ||
681 | try | ||
682 | { | ||
683 | RemoveDirectories(".",m_RemoveDirectories); | ||
684 | } | ||
685 | catch(IOException e) | ||
686 | { | ||
687 | m_Log.Write("Failed to remove directories named {0}",m_RemoveDirectories); | ||
688 | m_Log.WriteException(LogType.Error,e); | ||
689 | } | ||
690 | catch(UnauthorizedAccessException e) | ||
691 | { | ||
692 | m_Log.Write("Failed to remove directories named {0}",m_RemoveDirectories); | ||
693 | m_Log.WriteException(LogType.Error,e); | ||
694 | } | ||
695 | perfomedOtherTask = true; | ||
696 | } | ||
697 | |||
698 | if(m_Target != null && m_Clean != null) | ||
699 | { | ||
700 | m_Log.Write(LogType.Error, "The options /target and /clean cannot be passed together"); | ||
701 | return; | ||
702 | } | ||
703 | |||
704 | if(m_Target == null && m_Clean == null) | ||
705 | { | ||
706 | if(perfomedOtherTask) //finished | ||
707 | { | ||
708 | return; | ||
709 | } | ||
710 | m_Log.Write(LogType.Error, "Must pass either /target or /clean to process a Prebuild file"); | ||
711 | return; | ||
712 | } | ||
713 | |||
714 | string file = "./prebuild.xml"; | ||
715 | if(m_CommandLine.WasPassed("file")) | ||
716 | { | ||
717 | file = m_CommandLine["file"]; | ||
718 | } | ||
719 | |||
720 | ProcessFile(file); | ||
721 | |||
722 | string target = (m_Target != null ? m_Target.ToLower() : m_Clean.ToLower()); | ||
723 | bool clean = (m_Target == null); | ||
724 | if(clean && target != null && target.Length == 0) | ||
725 | { | ||
726 | target = "all"; | ||
727 | } | ||
728 | if(clean && target == "all")//default to all if no target was specified for clean | ||
729 | { | ||
730 | //check if they passed yes | ||
731 | if (!m_CommandLine.WasPassed("yes")) | ||
732 | { | ||
733 | Console.WriteLine("WARNING: This operation will clean ALL project files for all targets, are you sure? (y/n):"); | ||
734 | string ret = Console.ReadLine(); | ||
735 | if(ret == null) | ||
736 | { | ||
737 | return; | ||
738 | } | ||
739 | ret = ret.Trim().ToLower(); | ||
740 | if((ret.ToLower() != "y" && ret.ToLower() != "yes")) | ||
741 | { | ||
742 | return; | ||
743 | } | ||
744 | } | ||
745 | //clean all targets (just cleaning vs2002 target didn't clean nant) | ||
746 | foreach(ITarget targ in m_Targets.Values) | ||
747 | { | ||
748 | targ.Clean(this); | ||
749 | } | ||
750 | } | ||
751 | else | ||
752 | { | ||
753 | if (!m_Targets.Contains(target)) { | ||
754 | m_Log.Write(LogType.Error, "Unknown Target \"{0}\"", target); | ||
755 | return; | ||
756 | } | ||
757 | ITarget targ = (ITarget)m_Targets[target]; | ||
758 | |||
759 | if(clean) | ||
760 | { | ||
761 | targ.Clean(this); | ||
762 | } | ||
763 | else | ||
764 | { | ||
765 | targ.Write(this); | ||
766 | } | ||
767 | } | ||
768 | |||
769 | m_Log.Flush(); | ||
770 | } | ||
771 | |||
772 | #endregion | ||
773 | |||
774 | #region IDisposable Members | ||
775 | |||
776 | /// <summary> | ||
777 | /// | ||
778 | /// </summary> | ||
779 | public void Dispose() | ||
780 | { | ||
781 | Dispose(true); | ||
782 | GC.SuppressFinalize(this); | ||
783 | } | ||
784 | |||
785 | /// <summary> | ||
786 | /// Dispose objects | ||
787 | /// </summary> | ||
788 | /// <param name="disposing"> | ||
789 | /// If true, it will dispose close the handle | ||
790 | /// </param> | ||
791 | /// <remarks> | ||
792 | /// Will dispose managed and unmanaged resources. | ||
793 | /// </remarks> | ||
794 | protected virtual void Dispose(bool disposing) | ||
795 | { | ||
796 | if (!this.disposed) | ||
797 | { | ||
798 | if (disposing) | ||
799 | { | ||
800 | if (this.m_Log != null) | ||
801 | { | ||
802 | this.m_Log.Close(); | ||
803 | this.m_Log = null; | ||
804 | } | ||
805 | } | ||
806 | } | ||
807 | this.disposed = true; | ||
808 | } | ||
809 | |||
810 | /// <summary> | ||
811 | /// | ||
812 | /// </summary> | ||
813 | ~Kernel() | ||
814 | { | ||
815 | this.Dispose(false); | ||
816 | } | ||
817 | |||
818 | /// <summary> | ||
819 | /// Closes and destroys this object | ||
820 | /// </summary> | ||
821 | /// <remarks> | ||
822 | /// Same as Dispose(true) | ||
823 | /// </remarks> | ||
824 | public void Close() | ||
825 | { | ||
826 | Dispose(); | ||
827 | } | ||
828 | |||
829 | #endregion | ||
830 | } | ||
831 | } | ||
diff --git a/Prebuild/src/Core/Nodes/AuthorNode.cs b/Prebuild/src/Core/Nodes/AuthorNode.cs deleted file mode 100644 index 20e72c0..0000000 --- a/Prebuild/src/Core/Nodes/AuthorNode.cs +++ /dev/null | |||
@@ -1,89 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2007 C.J. Adams-Collier (cjac@colliertech.org) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Collections; | ||
28 | using System.Collections.Specialized; | ||
29 | using System.Xml; | ||
30 | |||
31 | using Prebuild.Core.Attributes; | ||
32 | using Prebuild.Core.Interfaces; | ||
33 | using Prebuild.Core.Utilities; | ||
34 | |||
35 | namespace Prebuild.Core.Nodes | ||
36 | { | ||
37 | /// <summary> | ||
38 | /// | ||
39 | /// </summary> | ||
40 | [DataNode("Author")] | ||
41 | public class AuthorNode : DataNode | ||
42 | { | ||
43 | #region Fields | ||
44 | |||
45 | private string m_Signature; | ||
46 | |||
47 | #endregion | ||
48 | |||
49 | #region Properties | ||
50 | |||
51 | /// <summary> | ||
52 | /// Gets the signature. | ||
53 | /// </summary> | ||
54 | /// <value>The signature.</value> | ||
55 | public string Signature | ||
56 | { | ||
57 | get | ||
58 | { | ||
59 | return m_Signature; | ||
60 | } | ||
61 | } | ||
62 | |||
63 | #endregion | ||
64 | |||
65 | #region Public Methods | ||
66 | |||
67 | /// <summary> | ||
68 | /// Parses the specified node. | ||
69 | /// </summary> | ||
70 | /// <param name="node">The node.</param> | ||
71 | public override void Parse(XmlNode node) | ||
72 | { | ||
73 | if( node == null ) | ||
74 | { | ||
75 | throw new ArgumentNullException("node"); | ||
76 | } | ||
77 | |||
78 | m_Signature = Helper.InterpolateForEnvironmentVariables(node.InnerText); | ||
79 | if(m_Signature == null) | ||
80 | { | ||
81 | m_Signature = ""; | ||
82 | } | ||
83 | |||
84 | m_Signature = m_Signature.Trim(); | ||
85 | } | ||
86 | |||
87 | #endregion | ||
88 | } | ||
89 | } | ||
diff --git a/Prebuild/src/Core/Nodes/ConfigurationNode.cs b/Prebuild/src/Core/Nodes/ConfigurationNode.cs deleted file mode 100644 index 67d78d5..0000000 --- a/Prebuild/src/Core/Nodes/ConfigurationNode.cs +++ /dev/null | |||
@@ -1,178 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Xml; | ||
28 | |||
29 | using Prebuild.Core.Attributes; | ||
30 | using Prebuild.Core.Interfaces; | ||
31 | using Prebuild.Core.Utilities; | ||
32 | |||
33 | namespace Prebuild.Core.Nodes | ||
34 | { | ||
35 | /// <summary> | ||
36 | /// | ||
37 | /// </summary> | ||
38 | [DataNode("Configuration")] | ||
39 | public class ConfigurationNode : DataNode, ICloneable, IComparable | ||
40 | { | ||
41 | #region Fields | ||
42 | |||
43 | private string m_Name = "unknown"; | ||
44 | private OptionsNode m_Options; | ||
45 | |||
46 | #endregion | ||
47 | |||
48 | #region Constructors | ||
49 | |||
50 | /// <summary> | ||
51 | /// Initializes a new instance of the <see cref="ConfigurationNode"/> class. | ||
52 | /// </summary> | ||
53 | public ConfigurationNode() | ||
54 | { | ||
55 | m_Options = new OptionsNode(); | ||
56 | } | ||
57 | |||
58 | #endregion | ||
59 | |||
60 | #region Properties | ||
61 | |||
62 | /// <summary> | ||
63 | /// Gets or sets the parent. | ||
64 | /// </summary> | ||
65 | /// <value>The parent.</value> | ||
66 | public override IDataNode Parent | ||
67 | { | ||
68 | get | ||
69 | { | ||
70 | return base.Parent; | ||
71 | } | ||
72 | set | ||
73 | { | ||
74 | base.Parent = value; | ||
75 | if(base.Parent is SolutionNode) | ||
76 | { | ||
77 | SolutionNode node = (SolutionNode)base.Parent; | ||
78 | if(node != null && node.Options != null) | ||
79 | { | ||
80 | node.Options.CopyTo(m_Options); | ||
81 | } | ||
82 | } | ||
83 | } | ||
84 | } | ||
85 | |||
86 | /// <summary> | ||
87 | /// Gets the name. | ||
88 | /// </summary> | ||
89 | /// <value>The name.</value> | ||
90 | public string Name | ||
91 | { | ||
92 | get | ||
93 | { | ||
94 | return m_Name; | ||
95 | } | ||
96 | } | ||
97 | |||
98 | /// <summary> | ||
99 | /// Gets or sets the options. | ||
100 | /// </summary> | ||
101 | /// <value>The options.</value> | ||
102 | public OptionsNode Options | ||
103 | { | ||
104 | get | ||
105 | { | ||
106 | return m_Options; | ||
107 | } | ||
108 | set | ||
109 | { | ||
110 | m_Options = value; | ||
111 | } | ||
112 | } | ||
113 | |||
114 | #endregion | ||
115 | |||
116 | #region Public Methods | ||
117 | |||
118 | /// <summary> | ||
119 | /// Parses the specified node. | ||
120 | /// </summary> | ||
121 | /// <param name="node">The node.</param> | ||
122 | public override void Parse(XmlNode node) | ||
123 | { | ||
124 | m_Name = Helper.AttributeValue(node, "name", m_Name); | ||
125 | if( node == null ) | ||
126 | { | ||
127 | throw new ArgumentNullException("node"); | ||
128 | } | ||
129 | foreach(XmlNode child in node.ChildNodes) | ||
130 | { | ||
131 | IDataNode dataNode = Kernel.Instance.ParseNode(child, this); | ||
132 | if(dataNode is OptionsNode) | ||
133 | { | ||
134 | ((OptionsNode)dataNode).CopyTo(m_Options); | ||
135 | } | ||
136 | } | ||
137 | } | ||
138 | |||
139 | /// <summary> | ||
140 | /// Copies to. | ||
141 | /// </summary> | ||
142 | /// <param name="conf">The conf.</param> | ||
143 | public void CopyTo(ConfigurationNode conf) | ||
144 | { | ||
145 | m_Options.CopyTo(conf.m_Options); | ||
146 | } | ||
147 | |||
148 | #endregion | ||
149 | |||
150 | #region ICloneable Members | ||
151 | |||
152 | /// <summary> | ||
153 | /// Creates a new object that is a copy of the current instance. | ||
154 | /// </summary> | ||
155 | /// <returns> | ||
156 | /// A new object that is a copy of this instance. | ||
157 | /// </returns> | ||
158 | public object Clone() | ||
159 | { | ||
160 | ConfigurationNode ret = new ConfigurationNode(); | ||
161 | ret.m_Name = m_Name; | ||
162 | m_Options.CopyTo(ret.m_Options); | ||
163 | return ret; | ||
164 | } | ||
165 | |||
166 | #endregion | ||
167 | |||
168 | #region IComparable Members | ||
169 | |||
170 | public int CompareTo(object obj) | ||
171 | { | ||
172 | ConfigurationNode that = (ConfigurationNode) obj; | ||
173 | return this.m_Name.CompareTo(that.m_Name); | ||
174 | } | ||
175 | |||
176 | #endregion | ||
177 | } | ||
178 | } | ||
diff --git a/Prebuild/src/Core/Nodes/DataNode.cs b/Prebuild/src/Core/Nodes/DataNode.cs deleted file mode 100644 index 763e6c3..0000000 --- a/Prebuild/src/Core/Nodes/DataNode.cs +++ /dev/null | |||
@@ -1,117 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Xml; | ||
28 | |||
29 | using Prebuild.Core.Attributes; | ||
30 | using Prebuild.Core.Interfaces; | ||
31 | using System.IO; | ||
32 | |||
33 | namespace Prebuild.Core.Nodes | ||
34 | { | ||
35 | /// <summary> | ||
36 | /// | ||
37 | /// </summary> | ||
38 | public abstract class DataNode : IDataNode | ||
39 | { | ||
40 | #region Fields | ||
41 | |||
42 | private IDataNode parent; | ||
43 | string[] m_WebTypes = new string[] { "aspx", "ascx", "master", "ashx", "asmx" }; | ||
44 | |||
45 | #endregion | ||
46 | |||
47 | #region IDataNode Members | ||
48 | |||
49 | /// <summary> | ||
50 | /// Gets or sets the parent. | ||
51 | /// </summary> | ||
52 | /// <value>The parent.</value> | ||
53 | public virtual IDataNode Parent | ||
54 | { | ||
55 | get | ||
56 | { | ||
57 | return parent; | ||
58 | } | ||
59 | set | ||
60 | { | ||
61 | parent = value; | ||
62 | } | ||
63 | } | ||
64 | public string[] WebTypes | ||
65 | { | ||
66 | get { return m_WebTypes; } | ||
67 | } | ||
68 | /// <summary> | ||
69 | /// Parses the specified node. | ||
70 | /// </summary> | ||
71 | /// <param name="node">The node.</param> | ||
72 | public virtual void Parse(XmlNode node) | ||
73 | { | ||
74 | } | ||
75 | public BuildAction GetBuildActionByFileName(string fileName) | ||
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 | ||
116 | } | ||
117 | } | ||
diff --git a/Prebuild/src/Core/Nodes/DatabaseProjectNode.cs b/Prebuild/src/Core/Nodes/DatabaseProjectNode.cs deleted file mode 100644 index 27c2051..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 845db24..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 deleted file mode 100644 index 353a5ae..0000000 --- a/Prebuild/src/Core/Nodes/DescriptionNode.cs +++ /dev/null | |||
@@ -1,89 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2007 C.J. Adams-Collier (cjac@colliertech.org) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Collections; | ||
28 | using System.Collections.Specialized; | ||
29 | using System.Xml; | ||
30 | |||
31 | using Prebuild.Core.Attributes; | ||
32 | using Prebuild.Core.Interfaces; | ||
33 | using Prebuild.Core.Utilities; | ||
34 | |||
35 | namespace Prebuild.Core.Nodes | ||
36 | { | ||
37 | /// <summary> | ||
38 | /// The object representing the /Prebuild/Solution/Project/Description element | ||
39 | /// </summary> | ||
40 | [DataNode("Description")] | ||
41 | public class DescriptionNode : DataNode | ||
42 | { | ||
43 | #region Fields | ||
44 | |||
45 | private string m_Value; | ||
46 | |||
47 | #endregion | ||
48 | |||
49 | #region Properties | ||
50 | |||
51 | /// <summary> | ||
52 | /// Gets the description Value. | ||
53 | /// </summary> | ||
54 | /// <value>The description Value.</value> | ||
55 | public string Value | ||
56 | { | ||
57 | get | ||
58 | { | ||
59 | return m_Value; | ||
60 | } | ||
61 | } | ||
62 | |||
63 | #endregion | ||
64 | |||
65 | #region Public Methods | ||
66 | |||
67 | /// <summary> | ||
68 | /// Parses the specified node. | ||
69 | /// </summary> | ||
70 | /// <param name="node">The node.</param> | ||
71 | public override void Parse(XmlNode node) | ||
72 | { | ||
73 | if( node == null ) | ||
74 | { | ||
75 | throw new ArgumentNullException("node"); | ||
76 | } | ||
77 | |||
78 | m_Value = Helper.InterpolateForEnvironmentVariables(node.InnerText); | ||
79 | if(m_Value == null) | ||
80 | { | ||
81 | m_Value = ""; | ||
82 | } | ||
83 | |||
84 | m_Value = m_Value.Trim(); | ||
85 | } | ||
86 | |||
87 | #endregion | ||
88 | } | ||
89 | } | ||
diff --git a/Prebuild/src/Core/Nodes/ExcludeNode.cs b/Prebuild/src/Core/Nodes/ExcludeNode.cs deleted file mode 100644 index 7f04cba..0000000 --- a/Prebuild/src/Core/Nodes/ExcludeNode.cs +++ /dev/null | |||
@@ -1,89 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Xml; | ||
28 | |||
29 | using Prebuild.Core.Attributes; | ||
30 | using Prebuild.Core.Interfaces; | ||
31 | using Prebuild.Core.Utilities; | ||
32 | |||
33 | namespace Prebuild.Core.Nodes | ||
34 | { | ||
35 | /// <summary> | ||
36 | /// | ||
37 | /// </summary> | ||
38 | [DataNode("Exclude")] | ||
39 | public class ExcludeNode : DataNode | ||
40 | { | ||
41 | #region Fields | ||
42 | |||
43 | private string m_Pattern = ""; | ||
44 | |||
45 | #endregion | ||
46 | |||
47 | #region Properties | ||
48 | |||
49 | /// <summary> | ||
50 | /// Gets the name. | ||
51 | /// </summary> | ||
52 | /// <value>The name.</value> | ||
53 | public string Name | ||
54 | { | ||
55 | get | ||
56 | { | ||
57 | return m_Pattern; | ||
58 | } | ||
59 | } | ||
60 | |||
61 | /// <summary> | ||
62 | /// Gets the pattern. | ||
63 | /// </summary> | ||
64 | /// <value>The pattern.</value> | ||
65 | public string Pattern | ||
66 | { | ||
67 | get | ||
68 | { | ||
69 | return m_Pattern; | ||
70 | } | ||
71 | } | ||
72 | |||
73 | #endregion | ||
74 | |||
75 | #region Public Methods | ||
76 | |||
77 | /// <summary> | ||
78 | /// Parses the specified node. | ||
79 | /// </summary> | ||
80 | /// <param name="node">The node.</param> | ||
81 | public override void Parse(XmlNode node) | ||
82 | { | ||
83 | m_Pattern = Helper.AttributeValue( node, "name", m_Pattern ); | ||
84 | m_Pattern = Helper.AttributeValue(node, "pattern", m_Pattern ); | ||
85 | } | ||
86 | |||
87 | #endregion | ||
88 | } | ||
89 | } | ||
diff --git a/Prebuild/src/Core/Nodes/FileNode.cs b/Prebuild/src/Core/Nodes/FileNode.cs deleted file mode 100644 index 1520fcb..0000000 --- a/Prebuild/src/Core/Nodes/FileNode.cs +++ /dev/null | |||
@@ -1,271 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.IO; | ||
28 | using System.Xml; | ||
29 | |||
30 | using Prebuild.Core.Attributes; | ||
31 | using Prebuild.Core.Interfaces; | ||
32 | using Prebuild.Core.Utilities; | ||
33 | using Prebuild.Core.Targets; | ||
34 | |||
35 | namespace Prebuild.Core.Nodes | ||
36 | { | ||
37 | /// <summary> | ||
38 | /// | ||
39 | /// </summary> | ||
40 | public enum BuildAction | ||
41 | { | ||
42 | /// <summary> | ||
43 | /// | ||
44 | /// </summary> | ||
45 | None, | ||
46 | /// <summary> | ||
47 | /// | ||
48 | /// </summary> | ||
49 | Compile, | ||
50 | /// <summary> | ||
51 | /// | ||
52 | /// </summary> | ||
53 | Content, | ||
54 | /// <summary> | ||
55 | /// | ||
56 | /// </summary> | ||
57 | EmbeddedResource | ||
58 | } | ||
59 | |||
60 | /// <summary> | ||
61 | /// | ||
62 | /// </summary> | ||
63 | public enum SubType | ||
64 | { | ||
65 | /// <summary> | ||
66 | /// | ||
67 | /// </summary> | ||
68 | Code, | ||
69 | /// <summary> | ||
70 | /// | ||
71 | /// </summary> | ||
72 | Component, | ||
73 | /// <summary> | ||
74 | /// | ||
75 | /// </summary> | ||
76 | Designer, | ||
77 | /// <summary> | ||
78 | /// | ||
79 | /// </summary> | ||
80 | Form, | ||
81 | /// <summary> | ||
82 | /// | ||
83 | /// </summary> | ||
84 | Settings, | ||
85 | /// <summary> | ||
86 | /// | ||
87 | /// </summary> | ||
88 | UserControl, | ||
89 | /// <summary> | ||
90 | /// | ||
91 | /// </summary> | ||
92 | CodeBehind, | ||
93 | } | ||
94 | |||
95 | public enum CopyToOutput | ||
96 | { | ||
97 | Never, | ||
98 | Always, | ||
99 | PreserveNewest | ||
100 | } | ||
101 | |||
102 | /// <summary> | ||
103 | /// | ||
104 | /// </summary> | ||
105 | [DataNode("File")] | ||
106 | public class FileNode : DataNode | ||
107 | { | ||
108 | #region Fields | ||
109 | |||
110 | private string m_Path; | ||
111 | private string m_ResourceName = ""; | ||
112 | private BuildAction? m_BuildAction; | ||
113 | private bool m_Valid; | ||
114 | private SubType? m_SubType; | ||
115 | private CopyToOutput m_CopyToOutput = CopyToOutput.Never; | ||
116 | private bool m_Link = false; | ||
117 | private string m_LinkPath = string.Empty; | ||
118 | private bool m_PreservePath = false; | ||
119 | |||
120 | |||
121 | #endregion | ||
122 | |||
123 | #region Properties | ||
124 | |||
125 | /// <summary> | ||
126 | /// | ||
127 | /// </summary> | ||
128 | public string Path | ||
129 | { | ||
130 | get | ||
131 | { | ||
132 | return m_Path; | ||
133 | } | ||
134 | } | ||
135 | |||
136 | /// <summary> | ||
137 | /// | ||
138 | /// </summary> | ||
139 | public string ResourceName | ||
140 | { | ||
141 | get | ||
142 | { | ||
143 | return m_ResourceName; | ||
144 | } | ||
145 | } | ||
146 | |||
147 | /// <summary> | ||
148 | /// | ||
149 | /// </summary> | ||
150 | public BuildAction BuildAction | ||
151 | { | ||
152 | get | ||
153 | { | ||
154 | if (m_BuildAction != null) | ||
155 | return m_BuildAction.Value; | ||
156 | else | ||
157 | return GetBuildActionByFileName(this.Path); | ||
158 | |||
159 | } | ||
160 | } | ||
161 | |||
162 | public CopyToOutput CopyToOutput | ||
163 | { | ||
164 | get | ||
165 | { | ||
166 | return this.m_CopyToOutput; | ||
167 | } | ||
168 | } | ||
169 | |||
170 | public bool IsLink | ||
171 | { | ||
172 | get | ||
173 | { | ||
174 | return this.m_Link; | ||
175 | } | ||
176 | } | ||
177 | |||
178 | public string LinkPath | ||
179 | { | ||
180 | get | ||
181 | { | ||
182 | return this.m_LinkPath; | ||
183 | } | ||
184 | } | ||
185 | /// <summary> | ||
186 | /// | ||
187 | /// </summary> | ||
188 | public SubType SubType | ||
189 | { | ||
190 | get | ||
191 | { | ||
192 | if (m_SubType != null) | ||
193 | return m_SubType.Value; | ||
194 | else | ||
195 | return GetSubTypeByFileName(this.Path); | ||
196 | } | ||
197 | } | ||
198 | |||
199 | /// <summary> | ||
200 | /// | ||
201 | /// </summary> | ||
202 | public bool IsValid | ||
203 | { | ||
204 | get | ||
205 | { | ||
206 | return m_Valid; | ||
207 | } | ||
208 | } | ||
209 | |||
210 | /// <summary> | ||
211 | /// | ||
212 | /// </summary> | ||
213 | /// <param name="file"></param> | ||
214 | /// <returns></returns> | ||
215 | public bool PreservePath | ||
216 | { | ||
217 | get | ||
218 | { | ||
219 | return m_PreservePath; | ||
220 | } | ||
221 | } | ||
222 | |||
223 | #endregion | ||
224 | |||
225 | #region Public Methods | ||
226 | |||
227 | /// <summary> | ||
228 | /// | ||
229 | /// </summary> | ||
230 | /// <param name="node"></param> | ||
231 | public override void Parse(XmlNode node) | ||
232 | { | ||
233 | string buildAction = Helper.AttributeValue(node, "buildAction", String.Empty); | ||
234 | if (buildAction != string.Empty) | ||
235 | m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction), buildAction); | ||
236 | string subType = Helper.AttributeValue(node, "subType", string.Empty); | ||
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()); | ||
241 | this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString)); | ||
242 | if ( this.m_Link == true ) | ||
243 | { | ||
244 | this.m_LinkPath = Helper.AttributeValue( node, "linkPath", string.Empty ); | ||
245 | } | ||
246 | this.m_CopyToOutput = (CopyToOutput) Enum.Parse(typeof(CopyToOutput), Helper.AttributeValue(node, "copyToOutput", this.m_CopyToOutput.ToString())); | ||
247 | this.m_PreservePath = bool.Parse( Helper.AttributeValue( node, "preservePath", bool.FalseString ) ); | ||
248 | |||
249 | if( node == null ) | ||
250 | { | ||
251 | throw new ArgumentNullException("node"); | ||
252 | } | ||
253 | |||
254 | m_Path = Helper.InterpolateForEnvironmentVariables(node.InnerText); | ||
255 | if(m_Path == null) | ||
256 | { | ||
257 | m_Path = ""; | ||
258 | } | ||
259 | |||
260 | m_Path = m_Path.Trim(); | ||
261 | m_Valid = true; | ||
262 | if(!File.Exists(m_Path)) | ||
263 | { | ||
264 | m_Valid = false; | ||
265 | Kernel.Instance.Log.Write(LogType.Warning, "File does not exist: {0}", m_Path); | ||
266 | } | ||
267 | } | ||
268 | |||
269 | #endregion | ||
270 | } | ||
271 | } | ||
diff --git a/Prebuild/src/Core/Nodes/FilesNode.cs b/Prebuild/src/Core/Nodes/FilesNode.cs deleted file mode 100644 index dc306c2..0000000 --- a/Prebuild/src/Core/Nodes/FilesNode.cs +++ /dev/null | |||
@@ -1,247 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Collections; | ||
28 | using System.Collections.Specialized; | ||
29 | using System.Xml; | ||
30 | |||
31 | using Prebuild.Core.Attributes; | ||
32 | using Prebuild.Core.Interfaces; | ||
33 | using System.IO; | ||
34 | |||
35 | namespace Prebuild.Core.Nodes | ||
36 | { | ||
37 | /// <summary> | ||
38 | /// | ||
39 | /// </summary> | ||
40 | [DataNode("Files")] | ||
41 | public class FilesNode : DataNode | ||
42 | { | ||
43 | #region Fields | ||
44 | |||
45 | private StringCollection m_Files; | ||
46 | private Hashtable m_BuildActions; | ||
47 | private Hashtable m_SubTypes; | ||
48 | private Hashtable m_ResourceNames; | ||
49 | private Hashtable m_CopyToOutputs; | ||
50 | private Hashtable m_Links; | ||
51 | private Hashtable m_LinkPaths; | ||
52 | private Hashtable m_PreservePaths; | ||
53 | |||
54 | #endregion | ||
55 | |||
56 | #region Constructors | ||
57 | |||
58 | /// <summary> | ||
59 | /// | ||
60 | /// </summary> | ||
61 | public FilesNode() | ||
62 | { | ||
63 | m_Files = new StringCollection(); | ||
64 | m_BuildActions = new Hashtable(); | ||
65 | m_SubTypes = new Hashtable(); | ||
66 | m_ResourceNames = new Hashtable(); | ||
67 | m_CopyToOutputs = new Hashtable(); | ||
68 | m_Links = new Hashtable(); | ||
69 | m_LinkPaths = new Hashtable(); | ||
70 | m_PreservePaths = new Hashtable(); | ||
71 | } | ||
72 | |||
73 | #endregion | ||
74 | |||
75 | #region Properties | ||
76 | |||
77 | /// <summary> | ||
78 | /// | ||
79 | /// </summary> | ||
80 | public int Count | ||
81 | { | ||
82 | get | ||
83 | { | ||
84 | return m_Files.Count; | ||
85 | } | ||
86 | } | ||
87 | |||
88 | #endregion | ||
89 | |||
90 | #region Public Methods | ||
91 | |||
92 | /// <summary> | ||
93 | /// | ||
94 | /// </summary> | ||
95 | /// <param name="file"></param> | ||
96 | /// <returns></returns> | ||
97 | public BuildAction GetBuildAction(string file) | ||
98 | { | ||
99 | if(!m_BuildActions.ContainsKey(file)) | ||
100 | { | ||
101 | return BuildAction.Compile; | ||
102 | } | ||
103 | |||
104 | return (BuildAction)m_BuildActions[file]; | ||
105 | } | ||
106 | |||
107 | public CopyToOutput GetCopyToOutput(string file) | ||
108 | { | ||
109 | if (!this.m_CopyToOutputs.ContainsKey(file)) | ||
110 | { | ||
111 | return CopyToOutput.Never; | ||
112 | } | ||
113 | return (CopyToOutput) this.m_CopyToOutputs[file]; | ||
114 | } | ||
115 | |||
116 | public bool GetIsLink(string file) | ||
117 | { | ||
118 | if (!this.m_Links.ContainsKey(file)) | ||
119 | { | ||
120 | return false; | ||
121 | } | ||
122 | return (bool) this.m_Links[file]; | ||
123 | } | ||
124 | |||
125 | public string GetLinkPath( string file ) | ||
126 | { | ||
127 | if ( !this.m_LinkPaths.ContainsKey( file ) ) | ||
128 | { | ||
129 | return string.Empty; | ||
130 | } | ||
131 | return (string)this.m_LinkPaths[ file ]; | ||
132 | } | ||
133 | |||
134 | /// <summary> | ||
135 | /// | ||
136 | /// </summary> | ||
137 | /// <param name="file"></param> | ||
138 | /// <returns></returns> | ||
139 | public SubType GetSubType(string file) | ||
140 | { | ||
141 | if(!m_SubTypes.ContainsKey(file)) | ||
142 | { | ||
143 | return SubType.Code; | ||
144 | } | ||
145 | |||
146 | return (SubType)m_SubTypes[file]; | ||
147 | } | ||
148 | |||
149 | /// <summary> | ||
150 | /// | ||
151 | /// </summary> | ||
152 | /// <param name="file"></param> | ||
153 | /// <returns></returns> | ||
154 | public string GetResourceName(string file) | ||
155 | { | ||
156 | if(!m_ResourceNames.ContainsKey(file)) | ||
157 | { | ||
158 | return ""; | ||
159 | } | ||
160 | |||
161 | return (string)m_ResourceNames[file]; | ||
162 | } | ||
163 | |||
164 | /// <summary> | ||
165 | /// | ||
166 | /// </summary> | ||
167 | /// <param name="file"></param> | ||
168 | /// <returns></returns> | ||
169 | public bool GetPreservePath( string file ) | ||
170 | { | ||
171 | if ( !m_PreservePaths.ContainsKey( file ) ) | ||
172 | { | ||
173 | return false; | ||
174 | } | ||
175 | |||
176 | return (bool)m_PreservePaths[ file ]; | ||
177 | } | ||
178 | |||
179 | /// <summary> | ||
180 | /// | ||
181 | /// </summary> | ||
182 | /// <param name="node"></param> | ||
183 | public override void Parse(XmlNode node) | ||
184 | { | ||
185 | if( node == null ) | ||
186 | { | ||
187 | throw new ArgumentNullException("node"); | ||
188 | } | ||
189 | foreach(XmlNode child in node.ChildNodes) | ||
190 | { | ||
191 | IDataNode dataNode = Kernel.Instance.ParseNode(child, this); | ||
192 | if(dataNode is FileNode) | ||
193 | { | ||
194 | FileNode fileNode = (FileNode)dataNode; | ||
195 | if(fileNode.IsValid) | ||
196 | { | ||
197 | if (!m_Files.Contains(fileNode.Path)) | ||
198 | { | ||
199 | m_Files.Add(fileNode.Path); | ||
200 | m_BuildActions[fileNode.Path] = fileNode.BuildAction; | ||
201 | m_SubTypes[fileNode.Path] = fileNode.SubType; | ||
202 | m_ResourceNames[fileNode.Path] = fileNode.ResourceName; | ||
203 | this.m_PreservePaths[ fileNode.Path ] = fileNode.PreservePath; | ||
204 | this.m_Links[ fileNode.Path ] = fileNode.IsLink; | ||
205 | this.m_LinkPaths[ fileNode.Path ] = fileNode.LinkPath; | ||
206 | this.m_CopyToOutputs[ fileNode.Path ] = fileNode.CopyToOutput; | ||
207 | |||
208 | } | ||
209 | } | ||
210 | } | ||
211 | else if(dataNode is MatchNode) | ||
212 | { | ||
213 | foreach(string file in ((MatchNode)dataNode).Files) | ||
214 | { | ||
215 | MatchNode matchNode = (MatchNode)dataNode; | ||
216 | if (!m_Files.Contains(file)) | ||
217 | { | ||
218 | m_Files.Add(file); | ||
219 | m_BuildActions[ file ] = matchNode.BuildAction == null ? GetBuildActionByFileName(file) : matchNode.BuildAction; | ||
220 | m_SubTypes[file] = matchNode.SubType == null ? GetSubTypeByFileName(file) : matchNode.SubType.Value; | ||
221 | m_ResourceNames[ file ] = matchNode.ResourceName; | ||
222 | this.m_PreservePaths[ file ] = matchNode.PreservePath; | ||
223 | this.m_Links[ file ] = matchNode.IsLink; | ||
224 | this.m_LinkPaths[ file ] = matchNode.LinkPath; | ||
225 | this.m_CopyToOutputs[ file ] = matchNode.CopyToOutput; | ||
226 | |||
227 | } | ||
228 | } | ||
229 | } | ||
230 | } | ||
231 | } | ||
232 | |||
233 | // TODO: Check in to why StringCollection's enumerator doesn't implement | ||
234 | // IEnumerator? | ||
235 | /// <summary> | ||
236 | /// | ||
237 | /// </summary> | ||
238 | /// <returns></returns> | ||
239 | public StringEnumerator GetEnumerator() | ||
240 | { | ||
241 | return m_Files.GetEnumerator(); | ||
242 | } | ||
243 | |||
244 | #endregion | ||
245 | |||
246 | } | ||
247 | } | ||
diff --git a/Prebuild/src/Core/Nodes/MatchNode.cs b/Prebuild/src/Core/Nodes/MatchNode.cs deleted file mode 100644 index 656d7d0..0000000 --- a/Prebuild/src/Core/Nodes/MatchNode.cs +++ /dev/null | |||
@@ -1,330 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Collections.Generic; | ||
28 | using System.Collections.Specialized; | ||
29 | using System.IO; | ||
30 | using System.Text.RegularExpressions; | ||
31 | using System.Xml; | ||
32 | |||
33 | using Prebuild.Core.Attributes; | ||
34 | using Prebuild.Core.Interfaces; | ||
35 | using Prebuild.Core.Utilities; | ||
36 | using System.Collections; | ||
37 | |||
38 | namespace Prebuild.Core.Nodes | ||
39 | { | ||
40 | /// <summary> | ||
41 | /// | ||
42 | /// </summary> | ||
43 | [DataNode("Match")] | ||
44 | public class MatchNode : DataNode | ||
45 | { | ||
46 | #region Fields | ||
47 | |||
48 | private readonly StringCollection m_Files = new StringCollection(); | ||
49 | private Regex m_Regex; | ||
50 | private BuildAction? m_BuildAction; | ||
51 | private SubType? m_SubType; | ||
52 | string m_ResourceName = ""; | ||
53 | private CopyToOutput m_CopyToOutput; | ||
54 | private bool m_Link; | ||
55 | private string m_LinkPath; | ||
56 | private bool m_PreservePath; | ||
57 | private readonly List<ExcludeNode> m_Exclusions = new List<ExcludeNode>(); | ||
58 | |||
59 | #endregion | ||
60 | |||
61 | #region Properties | ||
62 | |||
63 | /// <summary> | ||
64 | /// | ||
65 | /// </summary> | ||
66 | public StringCollection Files | ||
67 | { | ||
68 | get | ||
69 | { | ||
70 | return m_Files; | ||
71 | } | ||
72 | } | ||
73 | |||
74 | /// <summary> | ||
75 | /// | ||
76 | /// </summary> | ||
77 | public BuildAction? BuildAction | ||
78 | { | ||
79 | get | ||
80 | { | ||
81 | return m_BuildAction; | ||
82 | } | ||
83 | } | ||
84 | |||
85 | /// <summary> | ||
86 | /// | ||
87 | /// </summary> | ||
88 | public SubType? SubType | ||
89 | { | ||
90 | get | ||
91 | { | ||
92 | return m_SubType; | ||
93 | } | ||
94 | } | ||
95 | |||
96 | public CopyToOutput CopyToOutput | ||
97 | { | ||
98 | get | ||
99 | { | ||
100 | return this.m_CopyToOutput; | ||
101 | } | ||
102 | } | ||
103 | |||
104 | public bool IsLink | ||
105 | { | ||
106 | get | ||
107 | { | ||
108 | return this.m_Link; | ||
109 | } | ||
110 | } | ||
111 | |||
112 | public string LinkPath | ||
113 | { | ||
114 | get | ||
115 | { | ||
116 | return this.m_LinkPath; | ||
117 | } | ||
118 | } | ||
119 | /// <summary> | ||
120 | /// | ||
121 | /// </summary> | ||
122 | public string ResourceName | ||
123 | { | ||
124 | get | ||
125 | { | ||
126 | return m_ResourceName; | ||
127 | } | ||
128 | } | ||
129 | |||
130 | public bool PreservePath | ||
131 | { | ||
132 | get | ||
133 | { | ||
134 | return m_PreservePath; | ||
135 | } | ||
136 | } | ||
137 | |||
138 | #endregion | ||
139 | |||
140 | #region Private Methods | ||
141 | |||
142 | /// <summary> | ||
143 | /// Recurses the directories. | ||
144 | /// </summary> | ||
145 | /// <param name="path">The path.</param> | ||
146 | /// <param name="pattern">The pattern.</param> | ||
147 | /// <param name="recurse">if set to <c>true</c> [recurse].</param> | ||
148 | /// <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) | ||
150 | { | ||
151 | Match match; | ||
152 | Boolean excludeFile; | ||
153 | try | ||
154 | { | ||
155 | string[] files; | ||
156 | |||
157 | if(!useRegex) | ||
158 | { | ||
159 | files = Directory.GetFiles(path, pattern); | ||
160 | if(files != null) | ||
161 | { | ||
162 | string fileTemp; | ||
163 | foreach (string file in files) | ||
164 | { | ||
165 | excludeFile = false; | ||
166 | if (file.Substring(0,2) == "./" || file.Substring(0,2) == ".\\") | ||
167 | { | ||
168 | fileTemp = file.Substring(2); | ||
169 | } | ||
170 | else | ||
171 | { | ||
172 | fileTemp = file; | ||
173 | } | ||
174 | |||
175 | // Check all excludions and set flag if there are any hits. | ||
176 | foreach ( ExcludeNode exclude in exclusions ) | ||
177 | { | ||
178 | Regex exRegEx = new Regex( exclude.Pattern ); | ||
179 | match = exRegEx.Match( file ); | ||
180 | excludeFile |= match.Success; | ||
181 | } | ||
182 | |||
183 | if ( !excludeFile ) | ||
184 | { | ||
185 | m_Files.Add( fileTemp ); | ||
186 | } | ||
187 | |||
188 | } | ||
189 | } | ||
190 | else | ||
191 | { | ||
192 | return; | ||
193 | } | ||
194 | } | ||
195 | else | ||
196 | { | ||
197 | files = Directory.GetFiles(path); | ||
198 | foreach(string file in files) | ||
199 | { | ||
200 | excludeFile = false; | ||
201 | |||
202 | match = m_Regex.Match(file); | ||
203 | if(match.Success) | ||
204 | { | ||
205 | // Check all excludions and set flag if there are any hits. | ||
206 | foreach ( ExcludeNode exclude in exclusions ) | ||
207 | { | ||
208 | Regex exRegEx = new Regex( exclude.Pattern ); | ||
209 | match = exRegEx.Match( file ); | ||
210 | excludeFile |= !match.Success; | ||
211 | } | ||
212 | |||
213 | if ( !excludeFile ) | ||
214 | { | ||
215 | m_Files.Add( file ); | ||
216 | } | ||
217 | } | ||
218 | } | ||
219 | } | ||
220 | |||
221 | if(recurse) | ||
222 | { | ||
223 | string[] dirs = Directory.GetDirectories(path); | ||
224 | if(dirs != null && dirs.Length > 0) | ||
225 | { | ||
226 | foreach(string str in dirs) | ||
227 | { | ||
228 | RecurseDirectories(Helper.NormalizePath(str), pattern, recurse, useRegex, exclusions); | ||
229 | } | ||
230 | } | ||
231 | } | ||
232 | } | ||
233 | catch(DirectoryNotFoundException) | ||
234 | { | ||
235 | return; | ||
236 | } | ||
237 | catch(ArgumentException) | ||
238 | { | ||
239 | return; | ||
240 | } | ||
241 | } | ||
242 | |||
243 | #endregion | ||
244 | |||
245 | #region Public Methods | ||
246 | |||
247 | /// <summary> | ||
248 | /// | ||
249 | /// </summary> | ||
250 | /// <param name="node"></param> | ||
251 | public override void Parse(XmlNode node) | ||
252 | { | ||
253 | if( node == null ) | ||
254 | { | ||
255 | throw new ArgumentNullException("node"); | ||
256 | } | ||
257 | string path = Helper.AttributeValue(node, "path", "."); | ||
258 | string pattern = Helper.AttributeValue(node, "pattern", "*"); | ||
259 | 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")); | ||
261 | string buildAction = Helper.AttributeValue(node, "buildAction", String.Empty); | ||
262 | if (buildAction != string.Empty) | ||
263 | m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction), buildAction); | ||
264 | |||
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()); | ||
270 | 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)); | ||
272 | if ( this.m_Link == true ) | ||
273 | { | ||
274 | this.m_LinkPath = Helper.AttributeValue( node, "linkPath", string.Empty ); | ||
275 | } | ||
276 | this.m_PreservePath = bool.Parse( Helper.AttributeValue( node, "preservePath", bool.FalseString ) ); | ||
277 | |||
278 | |||
279 | if(path != null && path.Length == 0) | ||
280 | { | ||
281 | path = ".";//use current directory | ||
282 | } | ||
283 | //throw new WarningException("Match must have a 'path' attribute"); | ||
284 | |||
285 | if(pattern == null) | ||
286 | { | ||
287 | throw new WarningException("Match must have a 'pattern' attribute"); | ||
288 | } | ||
289 | |||
290 | path = Helper.NormalizePath(path); | ||
291 | if(!Directory.Exists(path)) | ||
292 | { | ||
293 | throw new WarningException("Match path does not exist: {0}", path); | ||
294 | } | ||
295 | |||
296 | try | ||
297 | { | ||
298 | if(useRegex) | ||
299 | { | ||
300 | m_Regex = new Regex(pattern); | ||
301 | } | ||
302 | } | ||
303 | catch(ArgumentException ex) | ||
304 | { | ||
305 | throw new WarningException("Could not compile regex pattern: {0}", ex.Message); | ||
306 | } | ||
307 | |||
308 | |||
309 | foreach(XmlNode child in node.ChildNodes) | ||
310 | { | ||
311 | IDataNode dataNode = Kernel.Instance.ParseNode(child, this); | ||
312 | if(dataNode is ExcludeNode) | ||
313 | { | ||
314 | ExcludeNode excludeNode = (ExcludeNode)dataNode; | ||
315 | m_Exclusions.Add( excludeNode ); | ||
316 | } | ||
317 | } | ||
318 | |||
319 | RecurseDirectories( path, pattern, recurse, useRegex, m_Exclusions ); | ||
320 | |||
321 | if(m_Files.Count < 1) | ||
322 | { | ||
323 | throw new WarningException("Match returned no files: {0}{1}", Helper.EndPath(path), pattern); | ||
324 | } | ||
325 | m_Regex = null; | ||
326 | } | ||
327 | |||
328 | #endregion | ||
329 | } | ||
330 | } | ||
diff --git a/Prebuild/src/Core/Nodes/OptionsNode.cs b/Prebuild/src/Core/Nodes/OptionsNode.cs deleted file mode 100644 index b63034b..0000000 --- a/Prebuild/src/Core/Nodes/OptionsNode.cs +++ /dev/null | |||
@@ -1,644 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Collections; | ||
28 | using System.Collections.Specialized; | ||
29 | using System.Reflection; | ||
30 | using System.Xml; | ||
31 | |||
32 | using Prebuild.Core.Attributes; | ||
33 | using Prebuild.Core.Interfaces; | ||
34 | using Prebuild.Core.Utilities; | ||
35 | |||
36 | namespace Prebuild.Core.Nodes | ||
37 | { | ||
38 | /// <summary> | ||
39 | /// | ||
40 | /// </summary> | ||
41 | [DataNode("Options")] | ||
42 | public class OptionsNode : DataNode | ||
43 | { | ||
44 | #region Fields | ||
45 | |||
46 | private static Hashtable m_OptionFields; | ||
47 | |||
48 | [OptionNode("CompilerDefines")] | ||
49 | private string m_CompilerDefines = ""; | ||
50 | |||
51 | /// <summary> | ||
52 | /// | ||
53 | /// </summary> | ||
54 | public string CompilerDefines | ||
55 | { | ||
56 | get | ||
57 | { | ||
58 | return m_CompilerDefines; | ||
59 | } | ||
60 | set | ||
61 | { | ||
62 | m_CompilerDefines = value; | ||
63 | } | ||
64 | } | ||
65 | |||
66 | [OptionNode("OptimizeCode")] | ||
67 | private bool m_OptimizeCode; | ||
68 | |||
69 | /// <summary> | ||
70 | /// | ||
71 | /// </summary> | ||
72 | public bool OptimizeCode | ||
73 | { | ||
74 | get | ||
75 | { | ||
76 | return m_OptimizeCode; | ||
77 | } | ||
78 | set | ||
79 | { | ||
80 | m_OptimizeCode = value; | ||
81 | } | ||
82 | } | ||
83 | |||
84 | [OptionNode("CheckUnderflowOverflow")] | ||
85 | private bool m_CheckUnderflowOverflow; | ||
86 | |||
87 | /// <summary> | ||
88 | /// | ||
89 | /// </summary> | ||
90 | public bool CheckUnderflowOverflow | ||
91 | { | ||
92 | get | ||
93 | { | ||
94 | return m_CheckUnderflowOverflow; | ||
95 | } | ||
96 | set | ||
97 | { | ||
98 | m_CheckUnderflowOverflow = value; | ||
99 | } | ||
100 | } | ||
101 | |||
102 | [OptionNode("AllowUnsafe")] | ||
103 | private bool m_AllowUnsafe; | ||
104 | |||
105 | /// <summary> | ||
106 | /// | ||
107 | /// </summary> | ||
108 | public bool AllowUnsafe | ||
109 | { | ||
110 | get | ||
111 | { | ||
112 | return m_AllowUnsafe; | ||
113 | } | ||
114 | set | ||
115 | { | ||
116 | m_AllowUnsafe = value; | ||
117 | } | ||
118 | } | ||
119 | |||
120 | [OptionNode("PreBuildEvent")] | ||
121 | private string m_PreBuildEvent; | ||
122 | |||
123 | /// <summary> | ||
124 | /// | ||
125 | /// </summary> | ||
126 | public string PreBuildEvent | ||
127 | { | ||
128 | get | ||
129 | { | ||
130 | return m_PreBuildEvent; | ||
131 | } | ||
132 | set | ||
133 | { | ||
134 | m_PreBuildEvent = value; | ||
135 | } | ||
136 | } | ||
137 | |||
138 | [OptionNode("PostBuildEvent")] | ||
139 | private string m_PostBuildEvent; | ||
140 | |||
141 | /// <summary> | ||
142 | /// | ||
143 | /// </summary> | ||
144 | public string PostBuildEvent | ||
145 | { | ||
146 | get | ||
147 | { | ||
148 | return m_PostBuildEvent; | ||
149 | } | ||
150 | set | ||
151 | { | ||
152 | m_PostBuildEvent = value; | ||
153 | } | ||
154 | } | ||
155 | |||
156 | [OptionNode("PreBuildEventArgs")] | ||
157 | private string m_PreBuildEventArgs; | ||
158 | |||
159 | /// <summary> | ||
160 | /// | ||
161 | /// </summary> | ||
162 | public string PreBuildEventArgs | ||
163 | { | ||
164 | get | ||
165 | { | ||
166 | return m_PreBuildEventArgs; | ||
167 | } | ||
168 | set | ||
169 | { | ||
170 | m_PreBuildEventArgs = value; | ||
171 | } | ||
172 | } | ||
173 | |||
174 | [OptionNode("PostBuildEventArgs")] | ||
175 | private string m_PostBuildEventArgs; | ||
176 | |||
177 | /// <summary> | ||
178 | /// | ||
179 | /// </summary> | ||
180 | public string PostBuildEventArgs | ||
181 | { | ||
182 | get | ||
183 | { | ||
184 | return m_PostBuildEventArgs; | ||
185 | } | ||
186 | set | ||
187 | { | ||
188 | m_PostBuildEventArgs = value; | ||
189 | } | ||
190 | } | ||
191 | |||
192 | [OptionNode("RunPostBuildEvent")] | ||
193 | private string m_RunPostBuildEvent; | ||
194 | |||
195 | /// <summary> | ||
196 | /// | ||
197 | /// </summary> | ||
198 | public string RunPostBuildEvent | ||
199 | { | ||
200 | get | ||
201 | { | ||
202 | return m_RunPostBuildEvent; | ||
203 | } | ||
204 | set | ||
205 | { | ||
206 | m_RunPostBuildEvent = value; | ||
207 | } | ||
208 | } | ||
209 | |||
210 | [OptionNode("RunScript")] | ||
211 | private string m_RunScript; | ||
212 | |||
213 | /// <summary> | ||
214 | /// | ||
215 | /// </summary> | ||
216 | public string RunScript | ||
217 | { | ||
218 | get | ||
219 | { | ||
220 | return m_RunScript; | ||
221 | } | ||
222 | set | ||
223 | { | ||
224 | m_RunScript = value; | ||
225 | } | ||
226 | } | ||
227 | |||
228 | [OptionNode("WarningLevel")] | ||
229 | private int m_WarningLevel = 4; | ||
230 | |||
231 | /// <summary> | ||
232 | /// | ||
233 | /// </summary> | ||
234 | public int WarningLevel | ||
235 | { | ||
236 | get | ||
237 | { | ||
238 | return m_WarningLevel; | ||
239 | } | ||
240 | set | ||
241 | { | ||
242 | m_WarningLevel = value; | ||
243 | } | ||
244 | } | ||
245 | |||
246 | [OptionNode("WarningsAsErrors")] | ||
247 | private bool m_WarningsAsErrors; | ||
248 | |||
249 | /// <summary> | ||
250 | /// | ||
251 | /// </summary> | ||
252 | public bool WarningsAsErrors | ||
253 | { | ||
254 | get | ||
255 | { | ||
256 | return m_WarningsAsErrors; | ||
257 | } | ||
258 | set | ||
259 | { | ||
260 | m_WarningsAsErrors = value; | ||
261 | } | ||
262 | } | ||
263 | |||
264 | [OptionNode("SuppressWarnings")] | ||
265 | private string m_SuppressWarnings = ""; | ||
266 | |||
267 | /// <summary> | ||
268 | /// | ||
269 | /// </summary> | ||
270 | public string SuppressWarnings | ||
271 | { | ||
272 | get | ||
273 | { | ||
274 | return m_SuppressWarnings; | ||
275 | } | ||
276 | set | ||
277 | { | ||
278 | m_SuppressWarnings = value; | ||
279 | } | ||
280 | } | ||
281 | |||
282 | [OptionNode("OutputPath")] | ||
283 | private string m_OutputPath = "bin/"; | ||
284 | |||
285 | /// <summary> | ||
286 | /// | ||
287 | /// </summary> | ||
288 | public string OutputPath | ||
289 | { | ||
290 | get | ||
291 | { | ||
292 | return m_OutputPath; | ||
293 | } | ||
294 | set | ||
295 | { | ||
296 | m_OutputPath = value; | ||
297 | } | ||
298 | } | ||
299 | |||
300 | [OptionNode("GenerateDocumentation")] | ||
301 | private bool m_GenerateDocumentation; | ||
302 | |||
303 | /// <summary> | ||
304 | /// | ||
305 | /// </summary> | ||
306 | public bool GenerateDocumentation | ||
307 | { | ||
308 | get | ||
309 | { | ||
310 | return m_GenerateDocumentation; | ||
311 | } | ||
312 | set | ||
313 | { | ||
314 | m_GenerateDocumentation = value; | ||
315 | } | ||
316 | } | ||
317 | |||
318 | [OptionNode("GenerateXmlDocFile")] | ||
319 | private bool m_GenerateXmlDocFile; | ||
320 | |||
321 | /// <summary> | ||
322 | /// | ||
323 | /// </summary> | ||
324 | public bool GenerateXmlDocFile | ||
325 | { | ||
326 | get | ||
327 | { | ||
328 | return m_GenerateXmlDocFile; | ||
329 | } | ||
330 | set | ||
331 | { | ||
332 | m_GenerateXmlDocFile = value; | ||
333 | } | ||
334 | } | ||
335 | |||
336 | [OptionNode("XmlDocFile")] | ||
337 | private string m_XmlDocFile = ""; | ||
338 | |||
339 | /// <summary> | ||
340 | /// | ||
341 | /// </summary> | ||
342 | public string XmlDocFile | ||
343 | { | ||
344 | get | ||
345 | { | ||
346 | return m_XmlDocFile; | ||
347 | } | ||
348 | set | ||
349 | { | ||
350 | m_XmlDocFile = value; | ||
351 | } | ||
352 | } | ||
353 | |||
354 | [OptionNode("KeyFile")] | ||
355 | private string m_KeyFile = ""; | ||
356 | |||
357 | /// <summary> | ||
358 | /// | ||
359 | /// </summary> | ||
360 | public string KeyFile | ||
361 | { | ||
362 | get | ||
363 | { | ||
364 | return m_KeyFile; | ||
365 | } | ||
366 | set | ||
367 | { | ||
368 | m_KeyFile = value; | ||
369 | } | ||
370 | } | ||
371 | |||
372 | [OptionNode("DebugInformation")] | ||
373 | private bool m_DebugInformation; | ||
374 | |||
375 | /// <summary> | ||
376 | /// | ||
377 | /// </summary> | ||
378 | public bool DebugInformation | ||
379 | { | ||
380 | get | ||
381 | { | ||
382 | return m_DebugInformation; | ||
383 | } | ||
384 | set | ||
385 | { | ||
386 | m_DebugInformation = value; | ||
387 | } | ||
388 | } | ||
389 | |||
390 | [OptionNode("RegisterComInterop")] | ||
391 | private bool m_RegisterComInterop; | ||
392 | |||
393 | /// <summary> | ||
394 | /// | ||
395 | /// </summary> | ||
396 | public bool RegisterComInterop | ||
397 | { | ||
398 | get | ||
399 | { | ||
400 | return m_RegisterComInterop; | ||
401 | } | ||
402 | set | ||
403 | { | ||
404 | m_RegisterComInterop = value; | ||
405 | } | ||
406 | } | ||
407 | |||
408 | [OptionNode("RemoveIntegerChecks")] | ||
409 | private bool m_RemoveIntegerChecks; | ||
410 | |||
411 | /// <summary> | ||
412 | /// | ||
413 | /// </summary> | ||
414 | public bool RemoveIntegerChecks | ||
415 | { | ||
416 | get | ||
417 | { | ||
418 | return m_RemoveIntegerChecks; | ||
419 | } | ||
420 | set | ||
421 | { | ||
422 | m_RemoveIntegerChecks = value; | ||
423 | } | ||
424 | } | ||
425 | |||
426 | [OptionNode("IncrementalBuild")] | ||
427 | private bool m_IncrementalBuild; | ||
428 | |||
429 | /// <summary> | ||
430 | /// | ||
431 | /// </summary> | ||
432 | public bool IncrementalBuild | ||
433 | { | ||
434 | get | ||
435 | { | ||
436 | return m_IncrementalBuild; | ||
437 | } | ||
438 | set | ||
439 | { | ||
440 | m_IncrementalBuild = value; | ||
441 | } | ||
442 | } | ||
443 | |||
444 | [OptionNode("BaseAddress")] | ||
445 | private string m_BaseAddress = "285212672"; | ||
446 | |||
447 | /// <summary> | ||
448 | /// | ||
449 | /// </summary> | ||
450 | public string BaseAddress | ||
451 | { | ||
452 | get | ||
453 | { | ||
454 | return m_BaseAddress; | ||
455 | } | ||
456 | set | ||
457 | { | ||
458 | m_BaseAddress = value; | ||
459 | } | ||
460 | } | ||
461 | |||
462 | [OptionNode("FileAlignment")] | ||
463 | private int m_FileAlignment = 4096; | ||
464 | |||
465 | /// <summary> | ||
466 | /// | ||
467 | /// </summary> | ||
468 | public int FileAlignment | ||
469 | { | ||
470 | get | ||
471 | { | ||
472 | return m_FileAlignment; | ||
473 | } | ||
474 | set | ||
475 | { | ||
476 | m_FileAlignment = value; | ||
477 | } | ||
478 | } | ||
479 | |||
480 | [OptionNode("NoStdLib")] | ||
481 | private bool m_NoStdLib; | ||
482 | |||
483 | /// <summary> | ||
484 | /// | ||
485 | /// </summary> | ||
486 | public bool NoStdLib | ||
487 | { | ||
488 | get | ||
489 | { | ||
490 | return m_NoStdLib; | ||
491 | } | ||
492 | set | ||
493 | { | ||
494 | m_NoStdLib = value; | ||
495 | } | ||
496 | } | ||
497 | |||
498 | private StringCollection m_FieldsDefined; | ||
499 | |||
500 | #endregion | ||
501 | |||
502 | #region Constructors | ||
503 | |||
504 | /// <summary> | ||
505 | /// Initializes the <see cref="OptionsNode"/> class. | ||
506 | /// </summary> | ||
507 | static OptionsNode() | ||
508 | { | ||
509 | Type t = typeof(OptionsNode); | ||
510 | |||
511 | m_OptionFields = new Hashtable(); | ||
512 | foreach(FieldInfo f in t.GetFields(BindingFlags.NonPublic | BindingFlags.Instance)) | ||
513 | { | ||
514 | object[] attrs = f.GetCustomAttributes(typeof(OptionNodeAttribute), false); | ||
515 | if(attrs == null || attrs.Length < 1) | ||
516 | { | ||
517 | continue; | ||
518 | } | ||
519 | |||
520 | OptionNodeAttribute ona = (OptionNodeAttribute)attrs[0]; | ||
521 | m_OptionFields[ona.NodeName] = f; | ||
522 | } | ||
523 | } | ||
524 | |||
525 | /// <summary> | ||
526 | /// Initializes a new instance of the <see cref="OptionsNode"/> class. | ||
527 | /// </summary> | ||
528 | public OptionsNode() | ||
529 | { | ||
530 | m_FieldsDefined = new StringCollection(); | ||
531 | } | ||
532 | |||
533 | #endregion | ||
534 | |||
535 | #region Properties | ||
536 | |||
537 | /// <summary> | ||
538 | /// Gets the <see cref="Object"/> at the specified index. | ||
539 | /// </summary> | ||
540 | /// <value></value> | ||
541 | public object this[string index] | ||
542 | { | ||
543 | get | ||
544 | { | ||
545 | if(!m_OptionFields.ContainsKey(index)) | ||
546 | { | ||
547 | return null; | ||
548 | } | ||
549 | |||
550 | FieldInfo f = (FieldInfo)m_OptionFields[index]; | ||
551 | return f.GetValue(this); | ||
552 | } | ||
553 | } | ||
554 | |||
555 | /// <summary> | ||
556 | /// Gets the <see cref="Object"/> at the specified index. | ||
557 | /// </summary> | ||
558 | /// <value></value> | ||
559 | public object this[string index, object defaultValue] | ||
560 | { | ||
561 | get | ||
562 | { | ||
563 | object valueObject = this[index]; | ||
564 | if(valueObject != null && valueObject is string && ((string)valueObject).Length == 0) | ||
565 | { | ||
566 | return defaultValue; | ||
567 | } | ||
568 | return valueObject; | ||
569 | } | ||
570 | } | ||
571 | |||
572 | |||
573 | #endregion | ||
574 | |||
575 | #region Private Methods | ||
576 | |||
577 | private void FlagDefined(string name) | ||
578 | { | ||
579 | if(!m_FieldsDefined.Contains(name)) | ||
580 | { | ||
581 | m_FieldsDefined.Add(name); | ||
582 | } | ||
583 | } | ||
584 | |||
585 | private void SetOption(string nodeName, string val) | ||
586 | { | ||
587 | lock(m_OptionFields) | ||
588 | { | ||
589 | if(!m_OptionFields.ContainsKey(nodeName)) | ||
590 | { | ||
591 | return; | ||
592 | } | ||
593 | |||
594 | FieldInfo f = (FieldInfo)m_OptionFields[nodeName]; | ||
595 | f.SetValue(this, Helper.TranslateValue(f.FieldType, val)); | ||
596 | FlagDefined(f.Name); | ||
597 | } | ||
598 | } | ||
599 | |||
600 | #endregion | ||
601 | |||
602 | #region Public Methods | ||
603 | |||
604 | /// <summary> | ||
605 | /// Parses the specified node. | ||
606 | /// </summary> | ||
607 | /// <param name="node">The node.</param> | ||
608 | public override void Parse(XmlNode node) | ||
609 | { | ||
610 | if( node == null ) | ||
611 | { | ||
612 | throw new ArgumentNullException("node"); | ||
613 | } | ||
614 | |||
615 | foreach(XmlNode child in node.ChildNodes) | ||
616 | { | ||
617 | SetOption(child.Name, Helper.InterpolateForEnvironmentVariables(child.InnerText)); | ||
618 | } | ||
619 | } | ||
620 | |||
621 | /// <summary> | ||
622 | /// Copies to. | ||
623 | /// </summary> | ||
624 | /// <param name="opt">The opt.</param> | ||
625 | public void CopyTo(OptionsNode opt) | ||
626 | { | ||
627 | if(opt == null) | ||
628 | { | ||
629 | return; | ||
630 | } | ||
631 | |||
632 | foreach(FieldInfo f in m_OptionFields.Values) | ||
633 | { | ||
634 | if(m_FieldsDefined.Contains(f.Name)) | ||
635 | { | ||
636 | f.SetValue(opt, f.GetValue(this)); | ||
637 | opt.m_FieldsDefined.Add(f.Name); | ||
638 | } | ||
639 | } | ||
640 | } | ||
641 | |||
642 | #endregion | ||
643 | } | ||
644 | } | ||
diff --git a/Prebuild/src/Core/Nodes/ProcessNode.cs b/Prebuild/src/Core/Nodes/ProcessNode.cs deleted file mode 100644 index 6bfbe16..0000000 --- a/Prebuild/src/Core/Nodes/ProcessNode.cs +++ /dev/null | |||
@@ -1,110 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Collections; | ||
28 | using System.Collections.Specialized; | ||
29 | using System.Xml; | ||
30 | |||
31 | using Prebuild.Core.Attributes; | ||
32 | using Prebuild.Core.Interfaces; | ||
33 | using Prebuild.Core.Utilities; | ||
34 | |||
35 | namespace Prebuild.Core.Nodes | ||
36 | { | ||
37 | /// <summary> | ||
38 | /// | ||
39 | /// </summary> | ||
40 | [DataNode("Process")] | ||
41 | public class ProcessNode : DataNode | ||
42 | { | ||
43 | #region Fields | ||
44 | |||
45 | private string m_Path; | ||
46 | private bool m_IsValid = true; | ||
47 | |||
48 | #endregion | ||
49 | |||
50 | #region Properties | ||
51 | |||
52 | /// <summary> | ||
53 | /// Gets the path. | ||
54 | /// </summary> | ||
55 | /// <value>The path.</value> | ||
56 | public string Path | ||
57 | { | ||
58 | get | ||
59 | { | ||
60 | return m_Path; | ||
61 | } | ||
62 | } | ||
63 | |||
64 | /// <summary> | ||
65 | /// Gets a value indicating whether this instance is valid. | ||
66 | /// </summary> | ||
67 | /// <value><c>true</c> if this instance is valid; otherwise, <c>false</c>.</value> | ||
68 | public bool IsValid | ||
69 | { | ||
70 | get | ||
71 | { | ||
72 | return m_IsValid; | ||
73 | } | ||
74 | } | ||
75 | |||
76 | #endregion | ||
77 | |||
78 | #region Public Methods | ||
79 | |||
80 | /// <summary> | ||
81 | /// Parses the specified node. | ||
82 | /// </summary> | ||
83 | /// <param name="node">The node.</param> | ||
84 | public override void Parse(XmlNode node) | ||
85 | { | ||
86 | if( node == null ) | ||
87 | { | ||
88 | throw new ArgumentNullException("node"); | ||
89 | } | ||
90 | |||
91 | m_Path = Helper.InterpolateForEnvironmentVariables(node.InnerText); | ||
92 | if(m_Path == null) | ||
93 | { | ||
94 | m_Path = ""; | ||
95 | } | ||
96 | |||
97 | try | ||
98 | { | ||
99 | m_Path = Helper.ResolvePath(m_Path); | ||
100 | } | ||
101 | catch(ArgumentException) | ||
102 | { | ||
103 | Kernel.Instance.Log.Write(LogType.Warning, "Could not find prebuild file for processing: {0}", m_Path); | ||
104 | m_IsValid = false; | ||
105 | } | ||
106 | } | ||
107 | |||
108 | #endregion | ||
109 | } | ||
110 | } | ||
diff --git a/Prebuild/src/Core/Nodes/ProjectNode.cs b/Prebuild/src/Core/Nodes/ProjectNode.cs deleted file mode 100644 index 04af7a3..0000000 --- a/Prebuild/src/Core/Nodes/ProjectNode.cs +++ /dev/null | |||
@@ -1,580 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Collections; | ||
28 | using System.Collections.Generic; | ||
29 | using System.IO; | ||
30 | using System.Xml; | ||
31 | |||
32 | using Prebuild.Core.Attributes; | ||
33 | using Prebuild.Core.Interfaces; | ||
34 | using Prebuild.Core.Utilities; | ||
35 | |||
36 | namespace Prebuild.Core.Nodes | ||
37 | { | ||
38 | /// <summary> | ||
39 | /// A set of values that the Project's type can be | ||
40 | /// </summary> | ||
41 | public enum ProjectType | ||
42 | { | ||
43 | /// <summary> | ||
44 | /// The project is a console executable | ||
45 | /// </summary> | ||
46 | Exe, | ||
47 | /// <summary> | ||
48 | /// The project is a windows executable | ||
49 | /// </summary> | ||
50 | WinExe, | ||
51 | /// <summary> | ||
52 | /// The project is a library | ||
53 | /// </summary> | ||
54 | Library, | ||
55 | /// <summary> | ||
56 | /// The project is a website | ||
57 | /// </summary> | ||
58 | Web, | ||
59 | } | ||
60 | |||
61 | /// <summary> | ||
62 | /// | ||
63 | /// </summary> | ||
64 | public enum ClrRuntime | ||
65 | { | ||
66 | /// <summary> | ||
67 | /// | ||
68 | /// </summary> | ||
69 | Microsoft, | ||
70 | /// <summary> | ||
71 | /// | ||
72 | /// </summary> | ||
73 | Mono | ||
74 | } | ||
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 | /// <summary> | ||
94 | /// .NET 4.0 | ||
95 | /// </summary> | ||
96 | v4_0, | ||
97 | } | ||
98 | /// <summary> | ||
99 | /// The Node object representing /Prebuild/Solution/Project elements | ||
100 | /// </summary> | ||
101 | [DataNode("Project")] | ||
102 | public class ProjectNode : DataNode, IComparable | ||
103 | { | ||
104 | #region Fields | ||
105 | |||
106 | private string m_Name = "unknown"; | ||
107 | private string m_Path = ""; | ||
108 | private string m_FullPath = ""; | ||
109 | private string m_AssemblyName; | ||
110 | private string m_AppIcon = ""; | ||
111 | private string m_ConfigFile = ""; | ||
112 | private string m_DesignerFolder = ""; | ||
113 | private string m_Language = "C#"; | ||
114 | private ProjectType m_Type = ProjectType.Exe; | ||
115 | private ClrRuntime m_Runtime = ClrRuntime.Microsoft; | ||
116 | private FrameworkVersion m_Framework = FrameworkVersion.v2_0; | ||
117 | private string m_StartupObject = ""; | ||
118 | private string m_RootNamespace; | ||
119 | private string m_FilterGroups = ""; | ||
120 | private string m_Version = ""; | ||
121 | private Guid m_Guid; | ||
122 | private string m_DebugStartParameters; | ||
123 | |||
124 | private Hashtable m_Configurations = new Hashtable(); | ||
125 | private readonly List<ReferencePathNode> m_ReferencePaths = new List<ReferencePathNode>(); | ||
126 | private readonly List<ReferenceNode> m_References = new List<ReferenceNode>(); | ||
127 | private readonly List<AuthorNode> m_Authors = new List<AuthorNode>(); | ||
128 | private FilesNode m_Files; | ||
129 | |||
130 | #endregion | ||
131 | |||
132 | #region Properties | ||
133 | |||
134 | /// <summary> | ||
135 | /// Gets the name. | ||
136 | /// </summary> | ||
137 | /// <value>The name.</value> | ||
138 | public string Name | ||
139 | { | ||
140 | get | ||
141 | { | ||
142 | return m_Name; | ||
143 | } | ||
144 | } | ||
145 | /// <summary> | ||
146 | /// The version of the .NET Framework to compile under | ||
147 | /// </summary> | ||
148 | public FrameworkVersion FrameworkVersion | ||
149 | { | ||
150 | get | ||
151 | { | ||
152 | return this.m_Framework; | ||
153 | } | ||
154 | } | ||
155 | /// <summary> | ||
156 | /// Gets the path. | ||
157 | /// </summary> | ||
158 | /// <value>The path.</value> | ||
159 | public string Path | ||
160 | { | ||
161 | get | ||
162 | { | ||
163 | return m_Path; | ||
164 | } | ||
165 | } | ||
166 | |||
167 | /// <summary> | ||
168 | /// Gets the filter groups. | ||
169 | /// </summary> | ||
170 | /// <value>The filter groups.</value> | ||
171 | public string FilterGroups | ||
172 | { | ||
173 | get | ||
174 | { | ||
175 | return m_FilterGroups; | ||
176 | } | ||
177 | } | ||
178 | |||
179 | /// <summary> | ||
180 | /// Gets the project's version | ||
181 | /// </summary> | ||
182 | /// <value>The project's version.</value> | ||
183 | public string Version | ||
184 | { | ||
185 | get | ||
186 | { | ||
187 | return m_Version; | ||
188 | } | ||
189 | } | ||
190 | |||
191 | /// <summary> | ||
192 | /// Gets the full path. | ||
193 | /// </summary> | ||
194 | /// <value>The full path.</value> | ||
195 | public string FullPath | ||
196 | { | ||
197 | get | ||
198 | { | ||
199 | return m_FullPath; | ||
200 | } | ||
201 | } | ||
202 | |||
203 | /// <summary> | ||
204 | /// Gets the name of the assembly. | ||
205 | /// </summary> | ||
206 | /// <value>The name of the assembly.</value> | ||
207 | public string AssemblyName | ||
208 | { | ||
209 | get | ||
210 | { | ||
211 | return m_AssemblyName; | ||
212 | } | ||
213 | } | ||
214 | |||
215 | /// <summary> | ||
216 | /// Gets the app icon. | ||
217 | /// </summary> | ||
218 | /// <value>The app icon.</value> | ||
219 | public string AppIcon | ||
220 | { | ||
221 | get | ||
222 | { | ||
223 | return m_AppIcon; | ||
224 | } | ||
225 | } | ||
226 | |||
227 | /// <summary> | ||
228 | /// Gets the app icon. | ||
229 | /// </summary> | ||
230 | /// <value>The app icon.</value> | ||
231 | public string ConfigFile | ||
232 | { | ||
233 | get | ||
234 | { | ||
235 | return m_ConfigFile; | ||
236 | } | ||
237 | } | ||
238 | |||
239 | /// <summary> | ||
240 | /// | ||
241 | /// </summary> | ||
242 | public string DesignerFolder | ||
243 | { | ||
244 | get | ||
245 | { | ||
246 | return m_DesignerFolder; | ||
247 | } | ||
248 | } | ||
249 | |||
250 | /// <summary> | ||
251 | /// Gets the language. | ||
252 | /// </summary> | ||
253 | /// <value>The language.</value> | ||
254 | public string Language | ||
255 | { | ||
256 | get | ||
257 | { | ||
258 | return m_Language; | ||
259 | } | ||
260 | } | ||
261 | |||
262 | /// <summary> | ||
263 | /// Gets the type. | ||
264 | /// </summary> | ||
265 | /// <value>The type.</value> | ||
266 | public ProjectType Type | ||
267 | { | ||
268 | get | ||
269 | { | ||
270 | return m_Type; | ||
271 | } | ||
272 | } | ||
273 | |||
274 | /// <summary> | ||
275 | /// Gets the runtime. | ||
276 | /// </summary> | ||
277 | /// <value>The runtime.</value> | ||
278 | public ClrRuntime Runtime | ||
279 | { | ||
280 | get | ||
281 | { | ||
282 | return m_Runtime; | ||
283 | } | ||
284 | } | ||
285 | |||
286 | private bool m_GenerateAssemblyInfoFile = false; | ||
287 | |||
288 | /// <summary> | ||
289 | /// | ||
290 | /// </summary> | ||
291 | public bool GenerateAssemblyInfoFile | ||
292 | { | ||
293 | get | ||
294 | { | ||
295 | return m_GenerateAssemblyInfoFile; | ||
296 | } | ||
297 | set | ||
298 | { | ||
299 | m_GenerateAssemblyInfoFile = value; | ||
300 | } | ||
301 | } | ||
302 | |||
303 | /// <summary> | ||
304 | /// Gets the startup object. | ||
305 | /// </summary> | ||
306 | /// <value>The startup object.</value> | ||
307 | public string StartupObject | ||
308 | { | ||
309 | get | ||
310 | { | ||
311 | return m_StartupObject; | ||
312 | } | ||
313 | } | ||
314 | |||
315 | /// <summary> | ||
316 | /// Gets the root namespace. | ||
317 | /// </summary> | ||
318 | /// <value>The root namespace.</value> | ||
319 | public string RootNamespace | ||
320 | { | ||
321 | get | ||
322 | { | ||
323 | return m_RootNamespace; | ||
324 | } | ||
325 | } | ||
326 | |||
327 | /// <summary> | ||
328 | /// Gets the configurations. | ||
329 | /// </summary> | ||
330 | /// <value>The configurations.</value> | ||
331 | public IList Configurations | ||
332 | { | ||
333 | get | ||
334 | { | ||
335 | ArrayList tmp = new ArrayList(ConfigurationsTable.Values); | ||
336 | tmp.Sort(); | ||
337 | return tmp; | ||
338 | } | ||
339 | } | ||
340 | |||
341 | /// <summary> | ||
342 | /// Gets the configurations table. | ||
343 | /// </summary> | ||
344 | /// <value>The configurations table.</value> | ||
345 | public Hashtable ConfigurationsTable | ||
346 | { | ||
347 | get | ||
348 | { | ||
349 | return m_Configurations; | ||
350 | } | ||
351 | } | ||
352 | |||
353 | /// <summary> | ||
354 | /// Gets the reference paths. | ||
355 | /// </summary> | ||
356 | /// <value>The reference paths.</value> | ||
357 | public List<ReferencePathNode> ReferencePaths | ||
358 | { | ||
359 | get | ||
360 | { | ||
361 | List<ReferencePathNode> tmp = new List<ReferencePathNode>(m_ReferencePaths); | ||
362 | tmp.Sort(); | ||
363 | return tmp; | ||
364 | } | ||
365 | } | ||
366 | |||
367 | /// <summary> | ||
368 | /// Gets the references. | ||
369 | /// </summary> | ||
370 | /// <value>The references.</value> | ||
371 | public List<ReferenceNode> References | ||
372 | { | ||
373 | get | ||
374 | { | ||
375 | List<ReferenceNode> tmp = new List<ReferenceNode>(m_References); | ||
376 | tmp.Sort(); | ||
377 | return tmp; | ||
378 | } | ||
379 | } | ||
380 | |||
381 | /// <summary> | ||
382 | /// Gets the Authors list. | ||
383 | /// </summary> | ||
384 | /// <value>The list of the project's authors.</value> | ||
385 | public List<AuthorNode> Authors | ||
386 | { | ||
387 | get | ||
388 | { | ||
389 | return m_Authors; | ||
390 | } | ||
391 | } | ||
392 | |||
393 | /// <summary> | ||
394 | /// Gets the files. | ||
395 | /// </summary> | ||
396 | /// <value>The files.</value> | ||
397 | public FilesNode Files | ||
398 | { | ||
399 | get | ||
400 | { | ||
401 | return m_Files; | ||
402 | } | ||
403 | } | ||
404 | |||
405 | /// <summary> | ||
406 | /// Gets or sets the parent. | ||
407 | /// </summary> | ||
408 | /// <value>The parent.</value> | ||
409 | public override IDataNode Parent | ||
410 | { | ||
411 | get | ||
412 | { | ||
413 | return base.Parent; | ||
414 | } | ||
415 | set | ||
416 | { | ||
417 | base.Parent = value; | ||
418 | if(base.Parent is SolutionNode && m_Configurations.Count < 1) | ||
419 | { | ||
420 | SolutionNode parent = (SolutionNode)base.Parent; | ||
421 | foreach(ConfigurationNode conf in parent.Configurations) | ||
422 | { | ||
423 | m_Configurations[conf.Name] = conf.Clone(); | ||
424 | } | ||
425 | } | ||
426 | } | ||
427 | } | ||
428 | |||
429 | /// <summary> | ||
430 | /// Gets the GUID. | ||
431 | /// </summary> | ||
432 | /// <value>The GUID.</value> | ||
433 | public Guid Guid | ||
434 | { | ||
435 | get | ||
436 | { | ||
437 | return m_Guid; | ||
438 | } | ||
439 | } | ||
440 | |||
441 | public string DebugStartParameters | ||
442 | { | ||
443 | get | ||
444 | { | ||
445 | return m_DebugStartParameters; | ||
446 | } | ||
447 | } | ||
448 | |||
449 | #endregion | ||
450 | |||
451 | #region Private Methods | ||
452 | |||
453 | private void HandleConfiguration(ConfigurationNode conf) | ||
454 | { | ||
455 | if(String.Compare(conf.Name, "all", true) == 0) //apply changes to all, this may not always be applied first, | ||
456 | //so it *may* override changes to the same properties for configurations defines at the project level | ||
457 | { | ||
458 | foreach(ConfigurationNode confNode in this.m_Configurations.Values) | ||
459 | { | ||
460 | conf.CopyTo(confNode);//update the config templates defines at the project level with the overrides | ||
461 | } | ||
462 | } | ||
463 | if(m_Configurations.ContainsKey(conf.Name)) | ||
464 | { | ||
465 | ConfigurationNode parentConf = (ConfigurationNode)m_Configurations[conf.Name]; | ||
466 | conf.CopyTo(parentConf);//update the config templates defines at the project level with the overrides | ||
467 | } | ||
468 | else | ||
469 | { | ||
470 | m_Configurations[conf.Name] = conf; | ||
471 | } | ||
472 | } | ||
473 | |||
474 | #endregion | ||
475 | |||
476 | #region Public Methods | ||
477 | |||
478 | /// <summary> | ||
479 | /// Parses the specified node. | ||
480 | /// </summary> | ||
481 | /// <param name="node">The node.</param> | ||
482 | public override void Parse(XmlNode node) | ||
483 | { | ||
484 | m_Name = Helper.AttributeValue(node, "name", m_Name); | ||
485 | m_Path = Helper.AttributeValue(node, "path", m_Path); | ||
486 | m_FilterGroups = Helper.AttributeValue(node, "filterGroups", m_FilterGroups); | ||
487 | m_Version = Helper.AttributeValue(node, "version", m_Version); | ||
488 | m_AppIcon = Helper.AttributeValue(node, "icon", m_AppIcon); | ||
489 | m_ConfigFile = Helper.AttributeValue(node, "configFile", m_ConfigFile); | ||
490 | m_DesignerFolder = Helper.AttributeValue(node, "designerFolder", m_DesignerFolder); | ||
491 | m_AssemblyName = Helper.AttributeValue(node, "assemblyName", m_AssemblyName); | ||
492 | m_Language = Helper.AttributeValue(node, "language", m_Language); | ||
493 | m_Type = (ProjectType)Helper.EnumAttributeValue(node, "type", typeof(ProjectType), m_Type); | ||
494 | m_Runtime = (ClrRuntime)Helper.EnumAttributeValue(node, "runtime", typeof(ClrRuntime), m_Runtime); | ||
495 | m_Framework = (FrameworkVersion)Helper.EnumAttributeValue(node, "frameworkVersion", typeof(FrameworkVersion), m_Framework); | ||
496 | m_StartupObject = Helper.AttributeValue(node, "startupObject", m_StartupObject); | ||
497 | m_RootNamespace = Helper.AttributeValue(node, "rootNamespace", m_RootNamespace); | ||
498 | |||
499 | int hash = m_Name.GetHashCode(); | ||
500 | Guid guidByHash = new Guid(hash, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); | ||
501 | string guid = Helper.AttributeValue(node, "guid", guidByHash.ToString()); | ||
502 | m_Guid = new Guid(guid); | ||
503 | |||
504 | m_GenerateAssemblyInfoFile = Helper.ParseBoolean(node, "generateAssemblyInfoFile", false); | ||
505 | m_DebugStartParameters = Helper.AttributeValue(node, "debugStartParameters", string.Empty); | ||
506 | |||
507 | if(m_AssemblyName == null || m_AssemblyName.Length < 1) | ||
508 | { | ||
509 | m_AssemblyName = m_Name; | ||
510 | } | ||
511 | |||
512 | if(m_RootNamespace == null || m_RootNamespace.Length < 1) | ||
513 | { | ||
514 | m_RootNamespace = m_Name; | ||
515 | } | ||
516 | |||
517 | m_FullPath = m_Path; | ||
518 | try | ||
519 | { | ||
520 | m_FullPath = Helper.ResolvePath(m_FullPath); | ||
521 | } | ||
522 | catch | ||
523 | { | ||
524 | throw new WarningException("Could not resolve Solution path: {0}", m_Path); | ||
525 | } | ||
526 | |||
527 | Kernel.Instance.CurrentWorkingDirectory.Push(); | ||
528 | try | ||
529 | { | ||
530 | Helper.SetCurrentDir(m_FullPath); | ||
531 | |||
532 | if( node == null ) | ||
533 | { | ||
534 | throw new ArgumentNullException("node"); | ||
535 | } | ||
536 | |||
537 | foreach(XmlNode child in node.ChildNodes) | ||
538 | { | ||
539 | IDataNode dataNode = Kernel.Instance.ParseNode(child, this); | ||
540 | if(dataNode is ConfigurationNode) | ||
541 | { | ||
542 | HandleConfiguration((ConfigurationNode)dataNode); | ||
543 | } | ||
544 | else if(dataNode is ReferencePathNode) | ||
545 | { | ||
546 | m_ReferencePaths.Add((ReferencePathNode)dataNode); | ||
547 | } | ||
548 | else if(dataNode is ReferenceNode) | ||
549 | { | ||
550 | m_References.Add((ReferenceNode)dataNode); | ||
551 | } | ||
552 | else if(dataNode is AuthorNode) | ||
553 | { | ||
554 | m_Authors.Add((AuthorNode)dataNode); | ||
555 | } | ||
556 | else if(dataNode is FilesNode) | ||
557 | { | ||
558 | m_Files = (FilesNode)dataNode; | ||
559 | } | ||
560 | } | ||
561 | } | ||
562 | finally | ||
563 | { | ||
564 | Kernel.Instance.CurrentWorkingDirectory.Pop(); | ||
565 | } | ||
566 | } | ||
567 | |||
568 | #endregion | ||
569 | |||
570 | #region IComparable Members | ||
571 | |||
572 | public int CompareTo(object obj) | ||
573 | { | ||
574 | ProjectNode that = (ProjectNode)obj; | ||
575 | return this.m_Name.CompareTo(that.m_Name); | ||
576 | } | ||
577 | |||
578 | #endregion | ||
579 | } | ||
580 | } | ||
diff --git a/Prebuild/src/Core/Nodes/ReferenceNode.cs b/Prebuild/src/Core/Nodes/ReferenceNode.cs deleted file mode 100644 index 9c5d1a3..0000000 --- a/Prebuild/src/Core/Nodes/ReferenceNode.cs +++ /dev/null | |||
@@ -1,144 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Xml; | ||
28 | |||
29 | using Prebuild.Core.Attributes; | ||
30 | using Prebuild.Core.Interfaces; | ||
31 | using Prebuild.Core.Utilities; | ||
32 | |||
33 | namespace Prebuild.Core.Nodes | ||
34 | { | ||
35 | /// <summary> | ||
36 | /// | ||
37 | /// </summary> | ||
38 | [DataNode("Reference")] | ||
39 | public class ReferenceNode : DataNode, IComparable | ||
40 | { | ||
41 | #region Fields | ||
42 | |||
43 | private string m_Name = "unknown"; | ||
44 | private string m_Path; | ||
45 | private string m_LocalCopy; | ||
46 | private string m_Version; | ||
47 | |||
48 | #endregion | ||
49 | |||
50 | #region Properties | ||
51 | |||
52 | /// <summary> | ||
53 | /// Gets the name. | ||
54 | /// </summary> | ||
55 | /// <value>The name.</value> | ||
56 | public string Name | ||
57 | { | ||
58 | get | ||
59 | { | ||
60 | return m_Name; | ||
61 | } | ||
62 | } | ||
63 | |||
64 | /// <summary> | ||
65 | /// Gets the path. | ||
66 | /// </summary> | ||
67 | /// <value>The path.</value> | ||
68 | public string Path | ||
69 | { | ||
70 | get | ||
71 | { | ||
72 | return m_Path; | ||
73 | } | ||
74 | } | ||
75 | |||
76 | /// <summary> | ||
77 | /// Gets a value indicating whether [local copy specified]. | ||
78 | /// </summary> | ||
79 | /// <value><c>true</c> if [local copy specified]; otherwise, <c>false</c>.</value> | ||
80 | public bool LocalCopySpecified | ||
81 | { | ||
82 | get | ||
83 | { | ||
84 | return ( m_LocalCopy != null && m_LocalCopy.Length == 0); | ||
85 | } | ||
86 | } | ||
87 | |||
88 | /// <summary> | ||
89 | /// Gets a value indicating whether [local copy]. | ||
90 | /// </summary> | ||
91 | /// <value><c>true</c> if [local copy]; otherwise, <c>false</c>.</value> | ||
92 | public bool LocalCopy | ||
93 | { | ||
94 | get | ||
95 | { | ||
96 | if( m_LocalCopy == null) | ||
97 | { | ||
98 | return false; | ||
99 | } | ||
100 | return bool.Parse(m_LocalCopy); | ||
101 | } | ||
102 | } | ||
103 | |||
104 | /// <summary> | ||
105 | /// Gets the version. | ||
106 | /// </summary> | ||
107 | /// <value>The version.</value> | ||
108 | public string Version | ||
109 | { | ||
110 | get | ||
111 | { | ||
112 | return m_Version; | ||
113 | } | ||
114 | } | ||
115 | |||
116 | #endregion | ||
117 | |||
118 | #region Public Methods | ||
119 | |||
120 | /// <summary> | ||
121 | /// Parses the specified node. | ||
122 | /// </summary> | ||
123 | /// <param name="node">The node.</param> | ||
124 | public override void Parse(XmlNode node) | ||
125 | { | ||
126 | m_Name = Helper.AttributeValue(node, "name", m_Name); | ||
127 | m_Path = Helper.AttributeValue(node, "path", m_Path); | ||
128 | m_LocalCopy = Helper.AttributeValue(node, "localCopy", m_LocalCopy); | ||
129 | m_Version = Helper.AttributeValue(node, "version", m_Version); | ||
130 | } | ||
131 | |||
132 | #endregion | ||
133 | |||
134 | #region IComparable Members | ||
135 | |||
136 | public int CompareTo(object obj) | ||
137 | { | ||
138 | ReferenceNode that = (ReferenceNode)obj; | ||
139 | return this.m_Name.CompareTo(that.m_Name); | ||
140 | } | ||
141 | |||
142 | #endregion | ||
143 | } | ||
144 | } | ||
diff --git a/Prebuild/src/Core/Nodes/ReferencePathNode.cs b/Prebuild/src/Core/Nodes/ReferencePathNode.cs deleted file mode 100644 index f0543c2..0000000 --- a/Prebuild/src/Core/Nodes/ReferencePathNode.cs +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Collections; | ||
28 | using System.Collections.Specialized; | ||
29 | using System.Xml; | ||
30 | |||
31 | using Prebuild.Core.Attributes; | ||
32 | using Prebuild.Core.Interfaces; | ||
33 | using Prebuild.Core.Utilities; | ||
34 | |||
35 | namespace Prebuild.Core.Nodes | ||
36 | { | ||
37 | /// <summary> | ||
38 | /// | ||
39 | /// </summary> | ||
40 | [DataNode("ReferencePath")] | ||
41 | public class ReferencePathNode : DataNode, IComparable | ||
42 | { | ||
43 | #region Fields | ||
44 | |||
45 | private string m_Path; | ||
46 | |||
47 | #endregion | ||
48 | |||
49 | #region Properties | ||
50 | |||
51 | /// <summary> | ||
52 | /// Gets the path. | ||
53 | /// </summary> | ||
54 | /// <value>The path.</value> | ||
55 | public string Path | ||
56 | { | ||
57 | get | ||
58 | { | ||
59 | return m_Path; | ||
60 | } | ||
61 | } | ||
62 | |||
63 | #endregion | ||
64 | |||
65 | #region Public Methods | ||
66 | |||
67 | /// <summary> | ||
68 | /// Parses the specified node. | ||
69 | /// </summary> | ||
70 | /// <param name="node">The node.</param> | ||
71 | public override void Parse(XmlNode node) | ||
72 | { | ||
73 | if( node == null ) | ||
74 | { | ||
75 | throw new ArgumentNullException("node"); | ||
76 | } | ||
77 | |||
78 | m_Path = Helper.InterpolateForEnvironmentVariables(node.InnerText); | ||
79 | if(m_Path == null) | ||
80 | { | ||
81 | m_Path = ""; | ||
82 | } | ||
83 | |||
84 | m_Path = m_Path.Trim(); | ||
85 | } | ||
86 | |||
87 | #endregion | ||
88 | |||
89 | #region IComparable Members | ||
90 | |||
91 | public int CompareTo(object obj) | ||
92 | { | ||
93 | ReferencePathNode that = (ReferencePathNode)obj; | ||
94 | return this.m_Path.CompareTo(that.m_Path); | ||
95 | } | ||
96 | |||
97 | #endregion | ||
98 | } | ||
99 | } | ||
diff --git a/Prebuild/src/Core/Nodes/SolutionNode.cs b/Prebuild/src/Core/Nodes/SolutionNode.cs deleted file mode 100644 index 2a1b8e2..0000000 --- a/Prebuild/src/Core/Nodes/SolutionNode.cs +++ /dev/null | |||
@@ -1,358 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Collections; | ||
28 | using System.Collections.Generic; | ||
29 | using System.Diagnostics; | ||
30 | using System.IO; | ||
31 | using System.Xml; | ||
32 | |||
33 | using Prebuild.Core.Attributes; | ||
34 | using Prebuild.Core.Interfaces; | ||
35 | using Prebuild.Core.Utilities; | ||
36 | |||
37 | namespace Prebuild.Core.Nodes | ||
38 | { | ||
39 | /// <summary> | ||
40 | /// | ||
41 | /// </summary> | ||
42 | [DataNode("Solution")] | ||
43 | [DataNode("EmbeddedSolution")] | ||
44 | [DebuggerDisplay("{Name}")] | ||
45 | public class SolutionNode : DataNode | ||
46 | { | ||
47 | #region Fields | ||
48 | |||
49 | private Guid m_Guid = Guid.NewGuid(); | ||
50 | private string m_Name = "unknown"; | ||
51 | private string m_Path = ""; | ||
52 | private string m_FullPath = ""; | ||
53 | private string m_ActiveConfig = "Debug"; | ||
54 | private string m_Version = "1.0.0"; | ||
55 | |||
56 | private OptionsNode m_Options; | ||
57 | private FilesNode m_Files; | ||
58 | private readonly Hashtable m_Configurations = new Hashtable(); | ||
59 | private readonly Hashtable m_Projects = new Hashtable(); | ||
60 | private readonly Hashtable m_DatabaseProjects = new Hashtable(); | ||
61 | private readonly List<ProjectNode> m_ProjectsOrder = new List<ProjectNode>(); | ||
62 | private readonly Hashtable m_Solutions = new Hashtable(); | ||
63 | |||
64 | #endregion | ||
65 | |||
66 | #region Properties | ||
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 | } | ||
99 | /// <summary> | ||
100 | /// Gets or sets the active config. | ||
101 | /// </summary> | ||
102 | /// <value>The active config.</value> | ||
103 | public string ActiveConfig | ||
104 | { | ||
105 | get | ||
106 | { | ||
107 | return m_ActiveConfig; | ||
108 | } | ||
109 | set | ||
110 | { | ||
111 | m_ActiveConfig = value; | ||
112 | } | ||
113 | } | ||
114 | |||
115 | /// <summary> | ||
116 | /// Gets the name. | ||
117 | /// </summary> | ||
118 | /// <value>The name.</value> | ||
119 | public string Name | ||
120 | { | ||
121 | get | ||
122 | { | ||
123 | return m_Name; | ||
124 | } | ||
125 | } | ||
126 | |||
127 | /// <summary> | ||
128 | /// Gets the path. | ||
129 | /// </summary> | ||
130 | /// <value>The path.</value> | ||
131 | public string Path | ||
132 | { | ||
133 | get | ||
134 | { | ||
135 | return m_Path; | ||
136 | } | ||
137 | } | ||
138 | |||
139 | /// <summary> | ||
140 | /// Gets the full path. | ||
141 | /// </summary> | ||
142 | /// <value>The full path.</value> | ||
143 | public string FullPath | ||
144 | { | ||
145 | get | ||
146 | { | ||
147 | return m_FullPath; | ||
148 | } | ||
149 | } | ||
150 | |||
151 | /// <summary> | ||
152 | /// Gets the version. | ||
153 | /// </summary> | ||
154 | /// <value>The version.</value> | ||
155 | public string Version | ||
156 | { | ||
157 | get | ||
158 | { | ||
159 | return m_Version; | ||
160 | } | ||
161 | } | ||
162 | |||
163 | /// <summary> | ||
164 | /// Gets the options. | ||
165 | /// </summary> | ||
166 | /// <value>The options.</value> | ||
167 | public OptionsNode Options | ||
168 | { | ||
169 | get | ||
170 | { | ||
171 | return m_Options; | ||
172 | } | ||
173 | } | ||
174 | |||
175 | /// <summary> | ||
176 | /// Gets the files. | ||
177 | /// </summary> | ||
178 | /// <value>The files.</value> | ||
179 | public FilesNode Files | ||
180 | { | ||
181 | get | ||
182 | { | ||
183 | return m_Files; | ||
184 | } | ||
185 | } | ||
186 | |||
187 | /// <summary> | ||
188 | /// Gets the configurations. | ||
189 | /// </summary> | ||
190 | /// <value>The configurations.</value> | ||
191 | public ICollection Configurations | ||
192 | { | ||
193 | get | ||
194 | { | ||
195 | ArrayList tmp = new ArrayList(ConfigurationsTable.Values); | ||
196 | tmp.Sort(); | ||
197 | return tmp; | ||
198 | } | ||
199 | } | ||
200 | |||
201 | /// <summary> | ||
202 | /// Gets the configurations table. | ||
203 | /// </summary> | ||
204 | /// <value>The configurations table.</value> | ||
205 | public Hashtable ConfigurationsTable | ||
206 | { | ||
207 | get | ||
208 | { | ||
209 | return m_Configurations; | ||
210 | } | ||
211 | } | ||
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 | } | ||
242 | /// <summary> | ||
243 | /// Gets the projects. | ||
244 | /// </summary> | ||
245 | /// <value>The projects.</value> | ||
246 | public ICollection Projects | ||
247 | { | ||
248 | get | ||
249 | { | ||
250 | ArrayList tmp = new ArrayList(m_Projects.Values); | ||
251 | tmp.Sort(); | ||
252 | return tmp; | ||
253 | } | ||
254 | } | ||
255 | |||
256 | /// <summary> | ||
257 | /// Gets the projects table. | ||
258 | /// </summary> | ||
259 | /// <value>The projects table.</value> | ||
260 | public Hashtable ProjectsTable | ||
261 | { | ||
262 | get | ||
263 | { | ||
264 | return m_Projects; | ||
265 | } | ||
266 | } | ||
267 | |||
268 | /// <summary> | ||
269 | /// Gets the projects table. | ||
270 | /// </summary> | ||
271 | /// <value>The projects table.</value> | ||
272 | public List<ProjectNode> ProjectsTableOrder | ||
273 | { | ||
274 | get | ||
275 | { | ||
276 | return m_ProjectsOrder; | ||
277 | } | ||
278 | } | ||
279 | |||
280 | #endregion | ||
281 | |||
282 | #region Public Methods | ||
283 | |||
284 | /// <summary> | ||
285 | /// Parses the specified node. | ||
286 | /// </summary> | ||
287 | /// <param name="node">The node.</param> | ||
288 | public override void Parse(XmlNode node) | ||
289 | { | ||
290 | m_Name = Helper.AttributeValue(node, "name", m_Name); | ||
291 | m_ActiveConfig = Helper.AttributeValue(node, "activeConfig", m_ActiveConfig); | ||
292 | m_Path = Helper.AttributeValue(node, "path", m_Path); | ||
293 | m_Version = Helper.AttributeValue(node, "version", m_Version); | ||
294 | |||
295 | m_FullPath = m_Path; | ||
296 | try | ||
297 | { | ||
298 | m_FullPath = Helper.ResolvePath(m_FullPath); | ||
299 | } | ||
300 | catch | ||
301 | { | ||
302 | throw new WarningException("Could not resolve solution path: {0}", m_Path); | ||
303 | } | ||
304 | |||
305 | Kernel.Instance.CurrentWorkingDirectory.Push(); | ||
306 | try | ||
307 | { | ||
308 | Helper.SetCurrentDir(m_FullPath); | ||
309 | |||
310 | if( node == null ) | ||
311 | { | ||
312 | throw new ArgumentNullException("node"); | ||
313 | } | ||
314 | |||
315 | foreach(XmlNode child in node.ChildNodes) | ||
316 | { | ||
317 | IDataNode dataNode = Kernel.Instance.ParseNode(child, this); | ||
318 | if(dataNode is OptionsNode) | ||
319 | { | ||
320 | m_Options = (OptionsNode)dataNode; | ||
321 | } | ||
322 | else if(dataNode is FilesNode) | ||
323 | { | ||
324 | m_Files = (FilesNode)dataNode; | ||
325 | } | ||
326 | else if(dataNode is ConfigurationNode) | ||
327 | { | ||
328 | m_Configurations[((ConfigurationNode)dataNode).Name] = dataNode; | ||
329 | } | ||
330 | else if(dataNode is ProjectNode) | ||
331 | { | ||
332 | m_Projects[((ProjectNode)dataNode).Name] = dataNode; | ||
333 | m_ProjectsOrder.Add((ProjectNode)dataNode); | ||
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 | } | ||
348 | } | ||
349 | } | ||
350 | finally | ||
351 | { | ||
352 | Kernel.Instance.CurrentWorkingDirectory.Pop(); | ||
353 | } | ||
354 | } | ||
355 | |||
356 | #endregion | ||
357 | } | ||
358 | } | ||
diff --git a/Prebuild/src/Core/Parse/IfContext.cs b/Prebuild/src/Core/Parse/IfContext.cs deleted file mode 100644 index 3c79d38..0000000 --- a/Prebuild/src/Core/Parse/IfContext.cs +++ /dev/null | |||
@@ -1,154 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | |||
28 | namespace Prebuild.Core.Parse | ||
29 | { | ||
30 | /// <summary> | ||
31 | /// | ||
32 | /// </summary> | ||
33 | public enum IfState | ||
34 | { | ||
35 | /// <summary> | ||
36 | /// | ||
37 | /// </summary> | ||
38 | None, | ||
39 | /// <summary> | ||
40 | /// | ||
41 | /// </summary> | ||
42 | If, | ||
43 | /// <summary> | ||
44 | /// | ||
45 | /// </summary> | ||
46 | ElseIf, | ||
47 | /// <summary> | ||
48 | /// | ||
49 | /// </summary> | ||
50 | Else | ||
51 | } | ||
52 | |||
53 | /// <summary> | ||
54 | /// Summary description for IfContext. | ||
55 | /// </summary> | ||
56 | // Inspired by the equivalent WiX class (see www.sourceforge.net/projects/wix/) | ||
57 | public class IfContext | ||
58 | { | ||
59 | #region Properties | ||
60 | |||
61 | bool m_Active; | ||
62 | bool m_Keep; | ||
63 | bool m_EverKept; | ||
64 | IfState m_State = IfState.None; | ||
65 | |||
66 | #endregion | ||
67 | |||
68 | #region Constructors | ||
69 | |||
70 | /// <summary> | ||
71 | /// Initializes a new instance of the <see cref="IfContext"/> class. | ||
72 | /// </summary> | ||
73 | /// <param name="active">if set to <c>true</c> [active].</param> | ||
74 | /// <param name="keep">if set to <c>true</c> [keep].</param> | ||
75 | /// <param name="state">The state.</param> | ||
76 | public IfContext(bool active, bool keep, IfState state) | ||
77 | { | ||
78 | m_Active = active; | ||
79 | m_Keep = keep; | ||
80 | m_EverKept = keep; | ||
81 | m_State = state; | ||
82 | } | ||
83 | |||
84 | #endregion | ||
85 | |||
86 | #region Properties | ||
87 | |||
88 | /// <summary> | ||
89 | /// Gets or sets a value indicating whether this <see cref="IfContext"/> is active. | ||
90 | /// </summary> | ||
91 | /// <value><c>true</c> if active; otherwise, <c>false</c>.</value> | ||
92 | public bool Active | ||
93 | { | ||
94 | get | ||
95 | { | ||
96 | return m_Active; | ||
97 | } | ||
98 | set | ||
99 | { | ||
100 | m_Active = value; | ||
101 | } | ||
102 | } | ||
103 | |||
104 | /// <summary> | ||
105 | /// Gets or sets a value indicating whether this <see cref="IfContext"/> is keep. | ||
106 | /// </summary> | ||
107 | /// <value><c>true</c> if keep; otherwise, <c>false</c>.</value> | ||
108 | public bool Keep | ||
109 | { | ||
110 | get | ||
111 | { | ||
112 | return m_Keep; | ||
113 | } | ||
114 | set | ||
115 | { | ||
116 | m_Keep = value; | ||
117 | if(m_Keep) | ||
118 | { | ||
119 | m_EverKept = true; | ||
120 | } | ||
121 | } | ||
122 | } | ||
123 | |||
124 | /// <summary> | ||
125 | /// Gets a value indicating whether [ever kept]. | ||
126 | /// </summary> | ||
127 | /// <value><c>true</c> if [ever kept]; otherwise, <c>false</c>.</value> | ||
128 | public bool EverKept | ||
129 | { | ||
130 | get | ||
131 | { | ||
132 | return m_EverKept; | ||
133 | } | ||
134 | } | ||
135 | |||
136 | /// <summary> | ||
137 | /// Gets or sets the state. | ||
138 | /// </summary> | ||
139 | /// <value>The state.</value> | ||
140 | public IfState State | ||
141 | { | ||
142 | get | ||
143 | { | ||
144 | return m_State; | ||
145 | } | ||
146 | set | ||
147 | { | ||
148 | m_State = value; | ||
149 | } | ||
150 | } | ||
151 | |||
152 | #endregion | ||
153 | } | ||
154 | } | ||
diff --git a/Prebuild/src/Core/Parse/Preprocessor.cs b/Prebuild/src/Core/Parse/Preprocessor.cs deleted file mode 100644 index b2306e4..0000000 --- a/Prebuild/src/Core/Parse/Preprocessor.cs +++ /dev/null | |||
@@ -1,663 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Collections; | ||
28 | using System.IO; | ||
29 | using System.Text.RegularExpressions; | ||
30 | using System.Xml; | ||
31 | |||
32 | namespace Prebuild.Core.Parse | ||
33 | { | ||
34 | /// <summary> | ||
35 | /// | ||
36 | /// </summary> | ||
37 | public enum OperatorSymbol | ||
38 | { | ||
39 | /// <summary> | ||
40 | /// | ||
41 | /// </summary> | ||
42 | None, | ||
43 | /// <summary> | ||
44 | /// | ||
45 | /// </summary> | ||
46 | Equal, | ||
47 | /// <summary> | ||
48 | /// | ||
49 | /// </summary> | ||
50 | NotEqual, | ||
51 | /// <summary> | ||
52 | /// | ||
53 | /// </summary> | ||
54 | LessThan, | ||
55 | /// <summary> | ||
56 | /// | ||
57 | /// </summary> | ||
58 | GreaterThan, | ||
59 | /// <summary> | ||
60 | /// | ||
61 | /// </summary> | ||
62 | LessThanEqual, | ||
63 | /// <summary> | ||
64 | /// | ||
65 | /// </summary> | ||
66 | GreaterThanEqual | ||
67 | } | ||
68 | |||
69 | /// <summary> | ||
70 | /// | ||
71 | /// </summary> | ||
72 | public class Preprocessor | ||
73 | { | ||
74 | #region Constants | ||
75 | |||
76 | /// <summary> | ||
77 | /// Includes the regex to look for file tags in the <?include | ||
78 | /// ?> processing instruction. | ||
79 | /// </summary> | ||
80 | private static readonly Regex includeFileRegex = new Regex("file=\"(.+?)\""); | ||
81 | |||
82 | #endregion | ||
83 | |||
84 | #region Fields | ||
85 | |||
86 | XmlDocument m_OutDoc; | ||
87 | Stack m_IfStack; | ||
88 | Hashtable m_Variables; | ||
89 | |||
90 | #endregion | ||
91 | |||
92 | #region Constructors | ||
93 | |||
94 | /// <summary> | ||
95 | /// Initializes a new instance of the <see cref="Preprocessor"/> class. | ||
96 | /// </summary> | ||
97 | public Preprocessor() | ||
98 | { | ||
99 | m_OutDoc = new XmlDocument(); | ||
100 | m_IfStack = new Stack(); | ||
101 | m_Variables = new Hashtable(); | ||
102 | |||
103 | RegisterVariable("OS", GetOS()); | ||
104 | RegisterVariable("RuntimeVersion", Environment.Version.Major); | ||
105 | RegisterVariable("RuntimeMajor", Environment.Version.Major); | ||
106 | RegisterVariable("RuntimeMinor", Environment.Version.Minor); | ||
107 | RegisterVariable("RuntimeRevision", Environment.Version.Revision); | ||
108 | } | ||
109 | |||
110 | #endregion | ||
111 | |||
112 | #region Properties | ||
113 | |||
114 | /// <summary> | ||
115 | /// Gets the processed doc. | ||
116 | /// </summary> | ||
117 | /// <value>The processed doc.</value> | ||
118 | public XmlDocument ProcessedDoc | ||
119 | { | ||
120 | get | ||
121 | { | ||
122 | return m_OutDoc; | ||
123 | } | ||
124 | } | ||
125 | |||
126 | #endregion | ||
127 | |||
128 | #region Private Methods | ||
129 | |||
130 | /// <summary> | ||
131 | /// Parts of this code were taken from NAnt and is subject to the GPL | ||
132 | /// as per NAnt's license. Thanks to the NAnt guys for this little gem. | ||
133 | /// </summary> | ||
134 | /// <returns></returns> | ||
135 | public static string GetOS() | ||
136 | { | ||
137 | PlatformID platId = Environment.OSVersion.Platform; | ||
138 | if(platId == PlatformID.Win32NT || platId == PlatformID.Win32Windows) | ||
139 | { | ||
140 | return "Win32"; | ||
141 | } | ||
142 | |||
143 | if (File.Exists("/System/Library/Frameworks/Cocoa.framework/Cocoa")) | ||
144 | { | ||
145 | return "MACOSX"; | ||
146 | } | ||
147 | |||
148 | /* | ||
149 | * .NET 1.x, under Mono, the UNIX code is 128. Under | ||
150 | * .NET 2.x, Mono or MS, the UNIX code is 4 | ||
151 | */ | ||
152 | if(Environment.Version.Major == 1) | ||
153 | { | ||
154 | if((int)platId == 128) | ||
155 | { | ||
156 | return "UNIX"; | ||
157 | } | ||
158 | } | ||
159 | else if((int)platId == 4) | ||
160 | { | ||
161 | return "UNIX"; | ||
162 | } | ||
163 | |||
164 | return "Unknown"; | ||
165 | } | ||
166 | |||
167 | private static bool CompareNum(OperatorSymbol oper, int val1, int val2) | ||
168 | { | ||
169 | switch(oper) | ||
170 | { | ||
171 | case OperatorSymbol.Equal: | ||
172 | return (val1 == val2); | ||
173 | case OperatorSymbol.NotEqual: | ||
174 | return (val1 != val2); | ||
175 | case OperatorSymbol.LessThan: | ||
176 | return (val1 < val2); | ||
177 | case OperatorSymbol.LessThanEqual: | ||
178 | return (val1 <= val2); | ||
179 | case OperatorSymbol.GreaterThan: | ||
180 | return (val1 > val2); | ||
181 | case OperatorSymbol.GreaterThanEqual: | ||
182 | return (val1 >= val2); | ||
183 | } | ||
184 | |||
185 | throw new WarningException("Unknown operator type"); | ||
186 | } | ||
187 | |||
188 | private static bool CompareStr(OperatorSymbol oper, string val1, string val2) | ||
189 | { | ||
190 | switch(oper) | ||
191 | { | ||
192 | case OperatorSymbol.Equal: | ||
193 | return (val1 == val2); | ||
194 | case OperatorSymbol.NotEqual: | ||
195 | return (val1 != val2); | ||
196 | case OperatorSymbol.LessThan: | ||
197 | return (val1.CompareTo(val2) < 0); | ||
198 | case OperatorSymbol.LessThanEqual: | ||
199 | return (val1.CompareTo(val2) <= 0); | ||
200 | case OperatorSymbol.GreaterThan: | ||
201 | return (val1.CompareTo(val2) > 0); | ||
202 | case OperatorSymbol.GreaterThanEqual: | ||
203 | return (val1.CompareTo(val2) >= 0); | ||
204 | } | ||
205 | |||
206 | throw new WarningException("Unknown operator type"); | ||
207 | } | ||
208 | |||
209 | private static char NextChar(int idx, string str) | ||
210 | { | ||
211 | if((idx + 1) >= str.Length) | ||
212 | { | ||
213 | return Char.MaxValue; | ||
214 | } | ||
215 | |||
216 | return str[idx + 1]; | ||
217 | } | ||
218 | // Very very simple expression parser. Can only match expressions of the form | ||
219 | // <var> <op> <value>: | ||
220 | // OS = Windows | ||
221 | // OS != Linux | ||
222 | // RuntimeMinor > 0 | ||
223 | private bool ParseExpression(string exp) | ||
224 | { | ||
225 | if(exp == null) | ||
226 | { | ||
227 | throw new ArgumentException("Invalid expression, cannot be null"); | ||
228 | } | ||
229 | |||
230 | exp = exp.Trim(); | ||
231 | if(exp.Length < 1) | ||
232 | { | ||
233 | throw new ArgumentException("Invalid expression, cannot be 0 length"); | ||
234 | } | ||
235 | |||
236 | string id = ""; | ||
237 | string str = ""; | ||
238 | OperatorSymbol oper = OperatorSymbol.None; | ||
239 | bool inStr = false; | ||
240 | char c; | ||
241 | |||
242 | for(int i = 0; i < exp.Length; i++) | ||
243 | { | ||
244 | c = exp[i]; | ||
245 | if(Char.IsWhiteSpace(c)) | ||
246 | { | ||
247 | continue; | ||
248 | } | ||
249 | |||
250 | if(Char.IsLetterOrDigit(c) || c == '_') | ||
251 | { | ||
252 | if(inStr) | ||
253 | { | ||
254 | str += c; | ||
255 | } | ||
256 | else | ||
257 | { | ||
258 | id += c; | ||
259 | } | ||
260 | } | ||
261 | else if(c == '\"') | ||
262 | { | ||
263 | inStr = !inStr; | ||
264 | if(inStr) | ||
265 | { | ||
266 | str = ""; | ||
267 | } | ||
268 | } | ||
269 | else | ||
270 | { | ||
271 | if(inStr) | ||
272 | { | ||
273 | str += c; | ||
274 | } | ||
275 | else | ||
276 | { | ||
277 | switch(c) | ||
278 | { | ||
279 | case '=': | ||
280 | oper = OperatorSymbol.Equal; | ||
281 | break; | ||
282 | |||
283 | case '!': | ||
284 | if(NextChar(i, exp) == '=') | ||
285 | { | ||
286 | oper = OperatorSymbol.NotEqual; | ||
287 | } | ||
288 | |||
289 | break; | ||
290 | |||
291 | case '<': | ||
292 | if(NextChar(i, exp) == '=') | ||
293 | { | ||
294 | oper = OperatorSymbol.LessThanEqual; | ||
295 | } | ||
296 | else | ||
297 | { | ||
298 | oper = OperatorSymbol.LessThan; | ||
299 | } | ||
300 | |||
301 | break; | ||
302 | |||
303 | case '>': | ||
304 | if(NextChar(i, exp) == '=') | ||
305 | { | ||
306 | oper = OperatorSymbol.GreaterThanEqual; | ||
307 | } | ||
308 | else | ||
309 | { | ||
310 | oper = OperatorSymbol.GreaterThan; | ||
311 | } | ||
312 | |||
313 | break; | ||
314 | } | ||
315 | } | ||
316 | } | ||
317 | } | ||
318 | |||
319 | |||
320 | if(inStr) | ||
321 | { | ||
322 | throw new WarningException("Expected end of string in expression"); | ||
323 | } | ||
324 | |||
325 | if(oper == OperatorSymbol.None) | ||
326 | { | ||
327 | throw new WarningException("Expected operator in expression"); | ||
328 | } | ||
329 | else if(id.Length < 1) | ||
330 | { | ||
331 | throw new WarningException("Expected identifier in expression"); | ||
332 | } | ||
333 | else if(str.Length < 1) | ||
334 | { | ||
335 | throw new WarningException("Expected value in expression"); | ||
336 | } | ||
337 | |||
338 | bool ret = false; | ||
339 | try | ||
340 | { | ||
341 | object val = m_Variables[id.ToLower()]; | ||
342 | if(val == null) | ||
343 | { | ||
344 | throw new WarningException("Unknown identifier '{0}'", id); | ||
345 | } | ||
346 | |||
347 | int numVal, numVal2; | ||
348 | string strVal, strVal2; | ||
349 | Type t = val.GetType(); | ||
350 | if(t.IsAssignableFrom(typeof(int))) | ||
351 | { | ||
352 | numVal = (int)val; | ||
353 | numVal2 = Int32.Parse(str); | ||
354 | ret = CompareNum(oper, numVal, numVal2); | ||
355 | } | ||
356 | else | ||
357 | { | ||
358 | strVal = val.ToString(); | ||
359 | strVal2 = str; | ||
360 | ret = CompareStr(oper, strVal, strVal2); | ||
361 | } | ||
362 | } | ||
363 | catch(ArgumentException ex) | ||
364 | { | ||
365 | ex.ToString(); | ||
366 | throw new WarningException("Invalid value type for system variable '{0}', expected int", id); | ||
367 | } | ||
368 | |||
369 | return ret; | ||
370 | } | ||
371 | |||
372 | #endregion | ||
373 | |||
374 | #region Public Methods | ||
375 | |||
376 | /// <summary> | ||
377 | /// | ||
378 | /// </summary> | ||
379 | /// <param name="name"></param> | ||
380 | /// <param name="variableValue"></param> | ||
381 | public void RegisterVariable(string name, object variableValue) | ||
382 | { | ||
383 | if(name == null || variableValue == null) | ||
384 | { | ||
385 | return; | ||
386 | } | ||
387 | |||
388 | m_Variables[name.ToLower()] = variableValue; | ||
389 | } | ||
390 | |||
391 | /// <summary> | ||
392 | /// Performs validation on the xml source as well as evaluates conditional and flow expresions | ||
393 | /// </summary> | ||
394 | /// <exception cref="ArgumentException">For invalid use of conditional expressions or for invalid XML syntax. If a XmlValidatingReader is passed, then will also throw exceptions for non-schema-conforming xml</exception> | ||
395 | /// <param name="reader"></param> | ||
396 | /// <returns>the output xml </returns> | ||
397 | public string Process(XmlReader initialReader) | ||
398 | { | ||
399 | if(initialReader == null) | ||
400 | { | ||
401 | throw new ArgumentException("Invalid XML reader to pre-process"); | ||
402 | } | ||
403 | |||
404 | IfContext context = new IfContext(true, true, IfState.None); | ||
405 | StringWriter xmlText = new StringWriter(); | ||
406 | XmlTextWriter writer = new XmlTextWriter(xmlText); | ||
407 | writer.Formatting = Formatting.Indented; | ||
408 | |||
409 | // Create a queue of XML readers and add the initial | ||
410 | // reader to it. Then we process until we run out of | ||
411 | // readers which lets the <?include?> operation add more | ||
412 | // readers to generate a multi-file parser and not require | ||
413 | // XML fragments that a recursive version would use. | ||
414 | Stack readerStack = new Stack(); | ||
415 | readerStack.Push(initialReader); | ||
416 | |||
417 | while(readerStack.Count > 0) | ||
418 | { | ||
419 | // Pop off the next reader. | ||
420 | XmlReader reader = (XmlReader) readerStack.Pop(); | ||
421 | |||
422 | // Process through this XML reader until it is | ||
423 | // completed (or it is replaced by the include | ||
424 | // operation). | ||
425 | while(reader.Read()) | ||
426 | { | ||
427 | // The prebuild file has a series of processing | ||
428 | // instructions which allow for specific | ||
429 | // inclusions based on operating system or to | ||
430 | // include additional files. | ||
431 | if(reader.NodeType == XmlNodeType.ProcessingInstruction) | ||
432 | { | ||
433 | bool ignore = false; | ||
434 | |||
435 | switch(reader.LocalName) | ||
436 | { | ||
437 | case "include": | ||
438 | // use regular expressions to parse out the attributes. | ||
439 | MatchCollection matches = includeFileRegex.Matches(reader.Value); | ||
440 | |||
441 | // make sure there is only one file attribute. | ||
442 | if(matches.Count > 1) | ||
443 | { | ||
444 | throw new WarningException("An <?include ?> node was found, but it specified more than one file."); | ||
445 | } | ||
446 | |||
447 | if(matches.Count == 0) | ||
448 | { | ||
449 | throw new WarningException("An <?include ?> node was found, but it did not specify the file attribute."); | ||
450 | } | ||
451 | |||
452 | // Push current reader back onto the stack. | ||
453 | readerStack.Push(reader); | ||
454 | |||
455 | // Pull the file out from the regex and make sure it is a valid file before using it. | ||
456 | string filename = matches[0].Groups[1].Value; | ||
457 | |||
458 | filename = String.Join(Path.DirectorySeparatorChar.ToString(), filename.Split(new char[] { '/', '\\' })); | ||
459 | |||
460 | if (!filename.Contains("*")) | ||
461 | { | ||
462 | FileInfo includeFile = new FileInfo(filename); | ||
463 | |||
464 | if (!includeFile.Exists) | ||
465 | { | ||
466 | throw new WarningException("Cannot include file: " + includeFile.FullName); | ||
467 | } | ||
468 | |||
469 | // Create a new reader object for this file, and push it onto the stack | ||
470 | XmlReader newReader = new XmlTextReader(includeFile.Open(FileMode.Open, FileAccess.Read, FileShare.Read)); | ||
471 | readerStack.Push(newReader); | ||
472 | } | ||
473 | else | ||
474 | { | ||
475 | WildCardInclude(readerStack, filename); | ||
476 | } | ||
477 | |||
478 | // continue reading with whatever reader is on the top of the stack | ||
479 | reader = (XmlReader)readerStack.Pop(); | ||
480 | ignore = true; | ||
481 | |||
482 | break; | ||
483 | |||
484 | case "if": | ||
485 | m_IfStack.Push(context); | ||
486 | context = new IfContext(context.Keep & context.Active, ParseExpression(reader.Value), IfState.If); | ||
487 | ignore = true; | ||
488 | break; | ||
489 | |||
490 | case "elseif": | ||
491 | if(m_IfStack.Count == 0) | ||
492 | { | ||
493 | throw new WarningException("Unexpected 'elseif' outside of 'if'"); | ||
494 | } | ||
495 | else if(context.State != IfState.If && context.State != IfState.ElseIf) | ||
496 | { | ||
497 | throw new WarningException("Unexpected 'elseif' outside of 'if'"); | ||
498 | } | ||
499 | |||
500 | context.State = IfState.ElseIf; | ||
501 | if(!context.EverKept) | ||
502 | { | ||
503 | context.Keep = ParseExpression(reader.Value); | ||
504 | } | ||
505 | else | ||
506 | { | ||
507 | context.Keep = false; | ||
508 | } | ||
509 | |||
510 | ignore = true; | ||
511 | break; | ||
512 | |||
513 | case "else": | ||
514 | if(m_IfStack.Count == 0) | ||
515 | { | ||
516 | throw new WarningException("Unexpected 'else' outside of 'if'"); | ||
517 | } | ||
518 | else if(context.State != IfState.If && context.State != IfState.ElseIf) | ||
519 | { | ||
520 | throw new WarningException("Unexpected 'else' outside of 'if'"); | ||
521 | } | ||
522 | |||
523 | context.State = IfState.Else; | ||
524 | context.Keep = !context.EverKept; | ||
525 | ignore = true; | ||
526 | break; | ||
527 | |||
528 | case "endif": | ||
529 | if(m_IfStack.Count == 0) | ||
530 | { | ||
531 | throw new WarningException("Unexpected 'endif' outside of 'if'"); | ||
532 | } | ||
533 | |||
534 | context = (IfContext)m_IfStack.Pop(); | ||
535 | ignore = true; | ||
536 | break; | ||
537 | } | ||
538 | |||
539 | if(ignore) | ||
540 | { | ||
541 | continue; | ||
542 | } | ||
543 | }//end pre-proc instruction | ||
544 | |||
545 | if(!context.Active || !context.Keep) | ||
546 | { | ||
547 | continue; | ||
548 | } | ||
549 | |||
550 | switch(reader.NodeType) | ||
551 | { | ||
552 | case XmlNodeType.Element: | ||
553 | bool empty = reader.IsEmptyElement; | ||
554 | writer.WriteStartElement(reader.Name); | ||
555 | |||
556 | while (reader.MoveToNextAttribute()) | ||
557 | { | ||
558 | writer.WriteAttributeString(reader.Name, reader.Value); | ||
559 | } | ||
560 | |||
561 | if(empty) | ||
562 | { | ||
563 | writer.WriteEndElement(); | ||
564 | } | ||
565 | |||
566 | break; | ||
567 | |||
568 | case XmlNodeType.EndElement: | ||
569 | writer.WriteEndElement(); | ||
570 | break; | ||
571 | |||
572 | case XmlNodeType.Text: | ||
573 | writer.WriteString(reader.Value); | ||
574 | break; | ||
575 | |||
576 | case XmlNodeType.CDATA: | ||
577 | writer.WriteCData(reader.Value); | ||
578 | break; | ||
579 | |||
580 | default: | ||
581 | break; | ||
582 | } | ||
583 | } | ||
584 | |||
585 | if(m_IfStack.Count != 0) | ||
586 | { | ||
587 | throw new WarningException("Mismatched 'if', 'endif' pair"); | ||
588 | } | ||
589 | } | ||
590 | |||
591 | return xmlText.ToString(); | ||
592 | } | ||
593 | |||
594 | private static void WildCardInclude(Stack readerStack, string include) | ||
595 | { | ||
596 | if (!include.Contains("*")) | ||
597 | { | ||
598 | return; | ||
599 | } | ||
600 | |||
601 | // Console.WriteLine("Processing {0}", include); | ||
602 | |||
603 | // Break up the include into pre and post wildcard sections | ||
604 | string preWildcard = include.Substring(0, include.IndexOf("*")); | ||
605 | string postWildcard = include.Substring(include.IndexOf("*") + 2); | ||
606 | |||
607 | // If preWildcard is a directory, recurse | ||
608 | if (Directory.Exists(preWildcard)) | ||
609 | { | ||
610 | string[] directories = Directory.GetDirectories(preWildcard); | ||
611 | Array.Sort(directories); | ||
612 | Array.Reverse(directories); | ||
613 | foreach (string dirPath in directories ) | ||
614 | { | ||
615 | Console.WriteLine("Scanning : {0}", dirPath); | ||
616 | |||
617 | string includeFile = Path.Combine(dirPath, postWildcard); | ||
618 | if (includeFile.Contains("*")) | ||
619 | { | ||
620 | // postWildcard included another wildcard, recurse. | ||
621 | WildCardInclude(readerStack, includeFile); | ||
622 | } | ||
623 | else | ||
624 | { | ||
625 | FileInfo file = new FileInfo(includeFile); | ||
626 | if (file.Exists) | ||
627 | { | ||
628 | Console.WriteLine("Including File: {0}", includeFile); | ||
629 | XmlReader newReader = new XmlTextReader(file.Open(FileMode.Open, FileAccess.Read, FileShare.Read)); | ||
630 | readerStack.Push(newReader); | ||
631 | } | ||
632 | } | ||
633 | } | ||
634 | } | ||
635 | else | ||
636 | { | ||
637 | // preWildcard is not a path to a directory, so the wildcard is in the filename | ||
638 | string searchFilename = Path.GetFileName(preWildcard.Substring(preWildcard.IndexOf("/") + 1) + "*" + postWildcard); | ||
639 | // Console.WriteLine("searchFilename: {0}", searchFilename); | ||
640 | |||
641 | string searchDirectory = Path.GetDirectoryName(preWildcard); | ||
642 | // Console.WriteLine("searchDirectory: {0}", searchDirectory); | ||
643 | |||
644 | string[] files = Directory.GetFiles(searchDirectory, searchFilename); | ||
645 | Array.Sort(files); | ||
646 | Array.Reverse(files); | ||
647 | foreach (string includeFile in files) | ||
648 | { | ||
649 | FileInfo file = new FileInfo(includeFile); | ||
650 | if (file.Exists) | ||
651 | { | ||
652 | Console.WriteLine("Including File: {0}", includeFile); | ||
653 | XmlReader newReader = new XmlTextReader(file.Open(FileMode.Open, FileAccess.Read, FileShare.Read)); | ||
654 | readerStack.Push(newReader); | ||
655 | } | ||
656 | } | ||
657 | } | ||
658 | |||
659 | } | ||
660 | |||
661 | #endregion | ||
662 | } | ||
663 | } | ||
diff --git a/Prebuild/src/Core/Targets/AutotoolsTarget.cs b/Prebuild/src/Core/Targets/AutotoolsTarget.cs deleted file mode 100644 index 5dcbb38..0000000 --- a/Prebuild/src/Core/Targets/AutotoolsTarget.cs +++ /dev/null | |||
@@ -1,1782 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | |||
4 | Copyright (c) 2004 - 2008 | ||
5 | Matthew Holmes (matthew@wildfiregames.com), | ||
6 | Dan Moorehead (dan05a@gmail.com), | ||
7 | Dave Hudson (jendave@yahoo.com), | ||
8 | C.J. Adams-Collier (cjac@colliertech.org), | ||
9 | |||
10 | Redistribution and use in source and binary forms, with or without | ||
11 | modification, are permitted provided that the following conditions are | ||
12 | met: | ||
13 | |||
14 | * Redistributions of source code must retain the above copyright | ||
15 | notice, this list of conditions and the following disclaimer. | ||
16 | |||
17 | * Redistributions in binary form must reproduce the above copyright | ||
18 | notice, this list of conditions and the following disclaimer in the | ||
19 | documentation and/or other materials provided with the distribution. | ||
20 | |||
21 | * The name of the author may not be used to endorse or promote | ||
22 | products derived from this software without specific prior written | ||
23 | permission. | ||
24 | |||
25 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | ||
26 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
27 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
28 | DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, | ||
29 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
30 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
31 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
32 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
33 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
34 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
35 | POSSIBILITY OF SUCH DAMAGE. | ||
36 | |||
37 | */ | ||
38 | #endregion | ||
39 | |||
40 | #region MIT X11 license | ||
41 | |||
42 | /* | ||
43 | Portions of this file authored by Lluis Sanchez Gual | ||
44 | |||
45 | Copyright (C) 2006 Novell, Inc (http://www.novell.com) | ||
46 | |||
47 | Permission is hereby granted, free of charge, to any person obtaining | ||
48 | a copy of this software and associated documentation files (the | ||
49 | "Software"), to deal in the Software without restriction, including | ||
50 | without limitation the rights to use, copy, modify, merge, publish, | ||
51 | distribute, sublicense, and/or sell copies of the Software, and to | ||
52 | permit persons to whom the Software is furnished to do so, subject to | ||
53 | the following conditions: | ||
54 | |||
55 | The above copyright notice and this permission notice shall be | ||
56 | included in all copies or substantial portions of the Software. | ||
57 | |||
58 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
59 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
60 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
61 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
62 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
63 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
64 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
65 | */ | ||
66 | |||
67 | #endregion | ||
68 | using System; | ||
69 | using System.Collections; | ||
70 | using System.Collections.Generic; | ||
71 | using System.Collections.Specialized; | ||
72 | using System.IO; | ||
73 | using System.Reflection; | ||
74 | using System.Text; | ||
75 | using System.Text.RegularExpressions; | ||
76 | using System.Xml; | ||
77 | using System.Xml.Xsl; | ||
78 | using System.Net; | ||
79 | using System.Diagnostics; | ||
80 | |||
81 | using Prebuild.Core.Attributes; | ||
82 | using Prebuild.Core.Interfaces; | ||
83 | using Prebuild.Core.Nodes; | ||
84 | using Prebuild.Core.Parse; | ||
85 | using Prebuild.Core.Utilities; | ||
86 | |||
87 | namespace Prebuild.Core.Targets | ||
88 | { | ||
89 | public enum ClrVersion | ||
90 | { | ||
91 | Default, | ||
92 | Net_1_1, | ||
93 | Net_2_0 | ||
94 | } | ||
95 | |||
96 | public class SystemPackage | ||
97 | { | ||
98 | string name; | ||
99 | string version; | ||
100 | string description; | ||
101 | string[] assemblies; | ||
102 | bool isInternal; | ||
103 | ClrVersion targetVersion; | ||
104 | |||
105 | public void Initialize(string name, | ||
106 | string version, | ||
107 | string description, | ||
108 | string[] assemblies, | ||
109 | ClrVersion targetVersion, | ||
110 | bool isInternal) | ||
111 | { | ||
112 | this.isInternal = isInternal; | ||
113 | this.name = name; | ||
114 | this.version = version; | ||
115 | this.assemblies = assemblies; | ||
116 | this.description = description; | ||
117 | this.targetVersion = targetVersion; | ||
118 | } | ||
119 | |||
120 | public string Name | ||
121 | { | ||
122 | get { return name; } | ||
123 | } | ||
124 | |||
125 | public string Version | ||
126 | { | ||
127 | get { return version; } | ||
128 | } | ||
129 | |||
130 | public string Description | ||
131 | { | ||
132 | get { return description; } | ||
133 | } | ||
134 | |||
135 | public ClrVersion TargetVersion | ||
136 | { | ||
137 | get { return targetVersion; } | ||
138 | } | ||
139 | |||
140 | // The package is part of the mono SDK | ||
141 | public bool IsCorePackage | ||
142 | { | ||
143 | get { return name == "mono"; } | ||
144 | } | ||
145 | |||
146 | // The package has been registered by an add-in, and is not installed | ||
147 | // in the system. | ||
148 | public bool IsInternalPackage | ||
149 | { | ||
150 | get { return isInternal; } | ||
151 | } | ||
152 | |||
153 | public string[] Assemblies | ||
154 | { | ||
155 | get { return assemblies; } | ||
156 | } | ||
157 | |||
158 | } | ||
159 | |||
160 | |||
161 | /// <summary> | ||
162 | /// | ||
163 | /// </summary> | ||
164 | [Target("autotools")] | ||
165 | public class AutotoolsTarget : ITarget | ||
166 | { | ||
167 | #region Fields | ||
168 | |||
169 | Kernel m_Kernel; | ||
170 | XmlDocument autotoolsDoc; | ||
171 | XmlUrlResolver xr; | ||
172 | System.Security.Policy.Evidence e; | ||
173 | Hashtable assemblyPathToPackage = new Hashtable(); | ||
174 | Hashtable assemblyFullNameToPath = new Hashtable(); | ||
175 | Hashtable packagesHash = new Hashtable(); | ||
176 | readonly List<SystemPackage> packages = new List<SystemPackage>(); | ||
177 | |||
178 | #endregion | ||
179 | |||
180 | #region Private Methods | ||
181 | |||
182 | private void mkdirDashP(string dirName) | ||
183 | { | ||
184 | DirectoryInfo di = new DirectoryInfo(dirName); | ||
185 | if (di.Exists) | ||
186 | return; | ||
187 | |||
188 | string parentDirName = System.IO.Path.GetDirectoryName(dirName); | ||
189 | DirectoryInfo parentDi = new DirectoryInfo(parentDirName); | ||
190 | if (!parentDi.Exists) | ||
191 | mkdirDashP(parentDirName); | ||
192 | |||
193 | di.Create(); | ||
194 | } | ||
195 | |||
196 | private void chkMkDir(string dirName) | ||
197 | { | ||
198 | System.IO.DirectoryInfo di = | ||
199 | new System.IO.DirectoryInfo(dirName); | ||
200 | |||
201 | if (!di.Exists) | ||
202 | di.Create(); | ||
203 | } | ||
204 | |||
205 | private void transformToFile(string filename, XsltArgumentList argList, string nodeName) | ||
206 | { | ||
207 | // Create an XslTransform for this file | ||
208 | XslTransform templateTransformer = | ||
209 | new XslTransform(); | ||
210 | |||
211 | // Load up the template | ||
212 | XmlNode templateNode = | ||
213 | autotoolsDoc.SelectSingleNode(nodeName + "/*"); | ||
214 | templateTransformer.Load(templateNode.CreateNavigator(), xr, e); | ||
215 | |||
216 | // Create a writer for the transformed template | ||
217 | XmlTextWriter templateWriter = | ||
218 | new XmlTextWriter(filename, null); | ||
219 | |||
220 | // Perform transformation, writing the file | ||
221 | templateTransformer.Transform | ||
222 | (m_Kernel.CurrentDoc, argList, templateWriter, xr); | ||
223 | } | ||
224 | |||
225 | string NormalizeAsmName(string name) | ||
226 | { | ||
227 | int i = name.IndexOf(", PublicKeyToken=null"); | ||
228 | if (i != -1) | ||
229 | return name.Substring(0, i).Trim(); | ||
230 | else | ||
231 | return name; | ||
232 | } | ||
233 | |||
234 | private void AddAssembly(string assemblyfile, SystemPackage package) | ||
235 | { | ||
236 | if (!File.Exists(assemblyfile)) | ||
237 | return; | ||
238 | |||
239 | try | ||
240 | { | ||
241 | System.Reflection.AssemblyName an = System.Reflection.AssemblyName.GetAssemblyName(assemblyfile); | ||
242 | assemblyFullNameToPath[NormalizeAsmName(an.FullName)] = assemblyfile; | ||
243 | assemblyPathToPackage[assemblyfile] = package; | ||
244 | } | ||
245 | catch | ||
246 | { | ||
247 | } | ||
248 | } | ||
249 | |||
250 | private List<string> GetAssembliesWithLibInfo(string line, string file) | ||
251 | { | ||
252 | List<string> references = new List<string>(); | ||
253 | List<string> libdirs = new List<string>(); | ||
254 | List<string> retval = new List<string>(); | ||
255 | foreach (string piece in line.Split(' ')) | ||
256 | { | ||
257 | if (piece.ToLower().Trim().StartsWith("/r:") || piece.ToLower().Trim().StartsWith("-r:")) | ||
258 | { | ||
259 | references.Add(ProcessPiece(piece.Substring(3).Trim(), file)); | ||
260 | } | ||
261 | else if (piece.ToLower().Trim().StartsWith("/lib:") || piece.ToLower().Trim().StartsWith("-lib:")) | ||
262 | { | ||
263 | libdirs.Add(ProcessPiece(piece.Substring(5).Trim(), file)); | ||
264 | } | ||
265 | } | ||
266 | |||
267 | foreach (string refrnc in references) | ||
268 | { | ||
269 | foreach (string libdir in libdirs) | ||
270 | { | ||
271 | if (File.Exists(libdir + Path.DirectorySeparatorChar + refrnc)) | ||
272 | { | ||
273 | retval.Add(libdir + Path.DirectorySeparatorChar + refrnc); | ||
274 | } | ||
275 | } | ||
276 | } | ||
277 | |||
278 | return retval; | ||
279 | } | ||
280 | |||
281 | private List<string> GetAssembliesWithoutLibInfo(string line, string file) | ||
282 | { | ||
283 | List<string> references = new List<string>(); | ||
284 | foreach (string reference in line.Split(' ')) | ||
285 | { | ||
286 | if (reference.ToLower().Trim().StartsWith("/r:") || reference.ToLower().Trim().StartsWith("-r:")) | ||
287 | { | ||
288 | string final_ref = reference.Substring(3).Trim(); | ||
289 | references.Add(ProcessPiece(final_ref, file)); | ||
290 | } | ||
291 | } | ||
292 | return references; | ||
293 | } | ||
294 | |||
295 | private string ProcessPiece(string piece, string pcfile) | ||
296 | { | ||
297 | int start = piece.IndexOf("${"); | ||
298 | if (start == -1) | ||
299 | return piece; | ||
300 | |||
301 | int end = piece.IndexOf("}"); | ||
302 | if (end == -1) | ||
303 | return piece; | ||
304 | |||
305 | string variable = piece.Substring(start + 2, end - start - 2); | ||
306 | string interp = GetVariableFromPkgConfig(variable, Path.GetFileNameWithoutExtension(pcfile)); | ||
307 | return ProcessPiece(piece.Replace("${" + variable + "}", interp), pcfile); | ||
308 | } | ||
309 | |||
310 | private string GetVariableFromPkgConfig(string var, string pcfile) | ||
311 | { | ||
312 | ProcessStartInfo psi = new ProcessStartInfo("pkg-config"); | ||
313 | psi.RedirectStandardOutput = true; | ||
314 | psi.UseShellExecute = false; | ||
315 | psi.Arguments = String.Format("--variable={0} {1}", var, pcfile); | ||
316 | Process p = new Process(); | ||
317 | p.StartInfo = psi; | ||
318 | p.Start(); | ||
319 | string ret = p.StandardOutput.ReadToEnd().Trim(); | ||
320 | p.WaitForExit(); | ||
321 | if (String.IsNullOrEmpty(ret)) | ||
322 | return String.Empty; | ||
323 | return ret; | ||
324 | } | ||
325 | |||
326 | private void ParsePCFile(string pcfile) | ||
327 | { | ||
328 | // Don't register the package twice | ||
329 | string pname = Path.GetFileNameWithoutExtension(pcfile); | ||
330 | if (packagesHash.Contains(pname)) | ||
331 | return; | ||
332 | |||
333 | List<string> fullassemblies = null; | ||
334 | string version = ""; | ||
335 | string desc = ""; | ||
336 | |||
337 | SystemPackage package = new SystemPackage(); | ||
338 | |||
339 | using (StreamReader reader = new StreamReader(pcfile)) | ||
340 | { | ||
341 | string line; | ||
342 | while ((line = reader.ReadLine()) != null) | ||
343 | { | ||
344 | string lowerLine = line.ToLower(); | ||
345 | if (lowerLine.StartsWith("libs:") && lowerLine.IndexOf(".dll") != -1) | ||
346 | { | ||
347 | string choppedLine = line.Substring(5).Trim(); | ||
348 | if (choppedLine.IndexOf("-lib:") != -1 || choppedLine.IndexOf("/lib:") != -1) | ||
349 | { | ||
350 | fullassemblies = GetAssembliesWithLibInfo(choppedLine, pcfile); | ||
351 | } | ||
352 | else | ||
353 | { | ||
354 | fullassemblies = GetAssembliesWithoutLibInfo(choppedLine, pcfile); | ||
355 | } | ||
356 | } | ||
357 | else if (lowerLine.StartsWith("version:")) | ||
358 | { | ||
359 | // "version:".Length == 8 | ||
360 | version = line.Substring(8).Trim(); | ||
361 | } | ||
362 | else if (lowerLine.StartsWith("description:")) | ||
363 | { | ||
364 | // "description:".Length == 12 | ||
365 | desc = line.Substring(12).Trim(); | ||
366 | } | ||
367 | } | ||
368 | } | ||
369 | |||
370 | if (fullassemblies == null) | ||
371 | return; | ||
372 | |||
373 | foreach (string assembly in fullassemblies) | ||
374 | { | ||
375 | AddAssembly(assembly, package); | ||
376 | } | ||
377 | |||
378 | package.Initialize(pname, | ||
379 | version, | ||
380 | desc, | ||
381 | fullassemblies.ToArray(), | ||
382 | ClrVersion.Default, | ||
383 | false); | ||
384 | packages.Add(package); | ||
385 | packagesHash[pname] = package; | ||
386 | } | ||
387 | |||
388 | void RegisterSystemAssemblies(string prefix, string version, ClrVersion ver) | ||
389 | { | ||
390 | SystemPackage package = new SystemPackage(); | ||
391 | List<string> list = new List<string>(); | ||
392 | |||
393 | string dir = Path.Combine(prefix, version); | ||
394 | if (!Directory.Exists(dir)) | ||
395 | { | ||
396 | return; | ||
397 | } | ||
398 | |||
399 | foreach (string assembly in Directory.GetFiles(dir, "*.dll")) | ||
400 | { | ||
401 | AddAssembly(assembly, package); | ||
402 | list.Add(assembly); | ||
403 | } | ||
404 | |||
405 | package.Initialize("mono", | ||
406 | version, | ||
407 | "The Mono runtime", | ||
408 | list.ToArray(), | ||
409 | ver, | ||
410 | false); | ||
411 | packages.Add(package); | ||
412 | } | ||
413 | |||
414 | void RunInitialization() | ||
415 | { | ||
416 | string versionDir; | ||
417 | |||
418 | if (Environment.Version.Major == 1) | ||
419 | { | ||
420 | versionDir = "1.0"; | ||
421 | } | ||
422 | else | ||
423 | { | ||
424 | versionDir = "2.0"; | ||
425 | } | ||
426 | |||
427 | //Pull up assemblies from the installed mono system. | ||
428 | string prefix = Path.GetDirectoryName(typeof(int).Assembly.Location); | ||
429 | |||
430 | if (prefix.IndexOf(Path.Combine("mono", versionDir)) == -1) | ||
431 | prefix = Path.Combine(prefix, "mono"); | ||
432 | else | ||
433 | prefix = Path.GetDirectoryName(prefix); | ||
434 | |||
435 | RegisterSystemAssemblies(prefix, "1.0", ClrVersion.Net_1_1); | ||
436 | RegisterSystemAssemblies(prefix, "2.0", ClrVersion.Net_2_0); | ||
437 | |||
438 | string search_dirs = Environment.GetEnvironmentVariable("PKG_CONFIG_PATH"); | ||
439 | string libpath = Environment.GetEnvironmentVariable("PKG_CONFIG_LIBPATH"); | ||
440 | |||
441 | if (String.IsNullOrEmpty(libpath)) | ||
442 | { | ||
443 | string path_dirs = Environment.GetEnvironmentVariable("PATH"); | ||
444 | foreach (string pathdir in path_dirs.Split(Path.PathSeparator)) | ||
445 | { | ||
446 | if (pathdir == null) | ||
447 | continue; | ||
448 | if (File.Exists(pathdir + Path.DirectorySeparatorChar + "pkg-config")) | ||
449 | { | ||
450 | libpath = Path.Combine(pathdir, ".."); | ||
451 | libpath = Path.Combine(libpath, "lib"); | ||
452 | libpath = Path.Combine(libpath, "pkgconfig"); | ||
453 | break; | ||
454 | } | ||
455 | } | ||
456 | } | ||
457 | search_dirs += Path.PathSeparator + libpath; | ||
458 | if (!string.IsNullOrEmpty(search_dirs)) | ||
459 | { | ||
460 | List<string> scanDirs = new List<string>(); | ||
461 | foreach (string potentialDir in search_dirs.Split(Path.PathSeparator)) | ||
462 | { | ||
463 | if (!scanDirs.Contains(potentialDir)) | ||
464 | scanDirs.Add(potentialDir); | ||
465 | } | ||
466 | foreach (string pcdir in scanDirs) | ||
467 | { | ||
468 | if (pcdir == null) | ||
469 | continue; | ||
470 | |||
471 | if (Directory.Exists(pcdir)) | ||
472 | { | ||
473 | foreach (string pcfile in Directory.GetFiles(pcdir, "*.pc")) | ||
474 | { | ||
475 | ParsePCFile(pcfile); | ||
476 | } | ||
477 | } | ||
478 | } | ||
479 | } | ||
480 | } | ||
481 | |||
482 | private void WriteCombine(SolutionNode solution) | ||
483 | { | ||
484 | #region "Create Solution directory if it doesn't exist" | ||
485 | string solutionDir = Path.Combine(solution.FullPath, | ||
486 | Path.Combine("autotools", | ||
487 | solution.Name)); | ||
488 | chkMkDir(solutionDir); | ||
489 | #endregion | ||
490 | |||
491 | #region "Write Solution-level files" | ||
492 | XsltArgumentList argList = new XsltArgumentList(); | ||
493 | argList.AddParam("solutionName", "", solution.Name); | ||
494 | // $solutionDir is $rootDir/$solutionName/ | ||
495 | transformToFile(Path.Combine(solutionDir, "configure.ac"), | ||
496 | argList, "/Autotools/SolutionConfigureAc"); | ||
497 | transformToFile(Path.Combine(solutionDir, "Makefile.am"), | ||
498 | argList, "/Autotools/SolutionMakefileAm"); | ||
499 | transformToFile(Path.Combine(solutionDir, "autogen.sh"), | ||
500 | argList, "/Autotools/SolutionAutogenSh"); | ||
501 | #endregion | ||
502 | |||
503 | foreach (ProjectNode project in solution.ProjectsTableOrder) | ||
504 | { | ||
505 | m_Kernel.Log.Write(String.Format("Writing project: {0}", | ||
506 | project.Name)); | ||
507 | WriteProject(solution, project); | ||
508 | } | ||
509 | } | ||
510 | private static string PrependPath(string path) | ||
511 | { | ||
512 | string tmpPath = Helper.NormalizePath(path, '/'); | ||
513 | Regex regex = new Regex(@"(\w):/(\w+)"); | ||
514 | Match match = regex.Match(tmpPath); | ||
515 | if (match.Success || tmpPath[0] == '.' || tmpPath[0] == '/') | ||
516 | { | ||
517 | tmpPath = Helper.NormalizePath(tmpPath); | ||
518 | } | ||
519 | else | ||
520 | { | ||
521 | tmpPath = Helper.NormalizePath("./" + tmpPath); | ||
522 | } | ||
523 | |||
524 | return tmpPath; | ||
525 | } | ||
526 | |||
527 | private static string BuildReference(SolutionNode solution, | ||
528 | ReferenceNode refr) | ||
529 | { | ||
530 | string ret = ""; | ||
531 | if (solution.ProjectsTable.ContainsKey(refr.Name)) | ||
532 | { | ||
533 | ProjectNode project = | ||
534 | (ProjectNode)solution.ProjectsTable[refr.Name]; | ||
535 | string fileRef = FindFileReference(refr.Name, project); | ||
536 | string finalPath = | ||
537 | Helper.NormalizePath(Helper.MakeFilePath(project.FullPath + | ||
538 | "/$(BUILD_DIR)/$(CONFIG)/", | ||
539 | refr.Name, "dll"), | ||
540 | '/'); | ||
541 | ret += finalPath; | ||
542 | return ret; | ||
543 | } | ||
544 | else | ||
545 | { | ||
546 | ProjectNode project = (ProjectNode)refr.Parent; | ||
547 | string fileRef = FindFileReference(refr.Name, project); | ||
548 | |||
549 | if (refr.Path != null || fileRef != null) | ||
550 | { | ||
551 | string finalPath = ((refr.Path != null) ? | ||
552 | Helper.NormalizePath(refr.Path + "/" + | ||
553 | refr.Name + ".dll", | ||
554 | '/') : | ||
555 | fileRef | ||
556 | ); | ||
557 | ret += Path.Combine(project.Path, finalPath); | ||
558 | return ret; | ||
559 | } | ||
560 | |||
561 | try | ||
562 | { | ||
563 | //Assembly assem = Assembly.Load(refr.Name); | ||
564 | //if (assem != null) | ||
565 | //{ | ||
566 | // int index = refr.Name.IndexOf(","); | ||
567 | // if ( index > 0) | ||
568 | // { | ||
569 | // ret += assem.Location; | ||
570 | // //Console.WriteLine("Location1: " + assem.Location); | ||
571 | // } | ||
572 | // else | ||
573 | // { | ||
574 | // ret += (refr.Name + ".dll"); | ||
575 | // //Console.WriteLine("Location2: " + assem.Location); | ||
576 | // } | ||
577 | //} | ||
578 | //else | ||
579 | //{ | ||
580 | int index = refr.Name.IndexOf(","); | ||
581 | if (index > 0) | ||
582 | { | ||
583 | ret += refr.Name.Substring(0, index) + ".dll"; | ||
584 | //Console.WriteLine("Location3: " + assem.Location); | ||
585 | } | ||
586 | else | ||
587 | { | ||
588 | ret += (refr.Name + ".dll"); | ||
589 | //Console.WriteLine("Location4: " + assem.Location); | ||
590 | } | ||
591 | //} | ||
592 | } | ||
593 | catch (System.NullReferenceException e) | ||
594 | { | ||
595 | e.ToString(); | ||
596 | int index = refr.Name.IndexOf(","); | ||
597 | if (index > 0) | ||
598 | { | ||
599 | ret += refr.Name.Substring(0, index) + ".dll"; | ||
600 | //Console.WriteLine("Location5: " + assem.Location); | ||
601 | } | ||
602 | else | ||
603 | { | ||
604 | ret += (refr.Name + ".dll"); | ||
605 | //Console.WriteLine("Location6: " + assem.Location); | ||
606 | } | ||
607 | } | ||
608 | } | ||
609 | return ret; | ||
610 | } | ||
611 | |||
612 | private static string BuildReferencePath(SolutionNode solution, | ||
613 | ReferenceNode refr) | ||
614 | { | ||
615 | string ret = ""; | ||
616 | if (solution.ProjectsTable.ContainsKey(refr.Name)) | ||
617 | { | ||
618 | ProjectNode project = | ||
619 | (ProjectNode)solution.ProjectsTable[refr.Name]; | ||
620 | string finalPath = | ||
621 | Helper.NormalizePath(Helper.MakeReferencePath(project.FullPath + | ||
622 | "/${build.dir}/"), | ||
623 | '/'); | ||
624 | ret += finalPath; | ||
625 | return ret; | ||
626 | } | ||
627 | else | ||
628 | { | ||
629 | ProjectNode project = (ProjectNode)refr.Parent; | ||
630 | string fileRef = FindFileReference(refr.Name, project); | ||
631 | |||
632 | if (refr.Path != null || fileRef != null) | ||
633 | { | ||
634 | string finalPath = ((refr.Path != null) ? | ||
635 | Helper.NormalizePath(refr.Path, '/') : | ||
636 | fileRef | ||
637 | ); | ||
638 | ret += finalPath; | ||
639 | return ret; | ||
640 | } | ||
641 | |||
642 | try | ||
643 | { | ||
644 | Assembly assem = Assembly.Load(refr.Name); | ||
645 | if (assem != null) | ||
646 | { | ||
647 | ret += ""; | ||
648 | } | ||
649 | else | ||
650 | { | ||
651 | ret += ""; | ||
652 | } | ||
653 | } | ||
654 | catch (System.NullReferenceException e) | ||
655 | { | ||
656 | e.ToString(); | ||
657 | ret += ""; | ||
658 | } | ||
659 | } | ||
660 | return ret; | ||
661 | } | ||
662 | |||
663 | private static string FindFileReference(string refName, | ||
664 | ProjectNode project) | ||
665 | { | ||
666 | foreach (ReferencePathNode refPath in project.ReferencePaths) | ||
667 | { | ||
668 | string fullPath = | ||
669 | Helper.MakeFilePath(refPath.Path, refName, "dll"); | ||
670 | |||
671 | if (File.Exists(fullPath)) { | ||
672 | return fullPath; | ||
673 | } | ||
674 | } | ||
675 | |||
676 | return null; | ||
677 | } | ||
678 | |||
679 | /// <summary> | ||
680 | /// Gets the XML doc file. | ||
681 | /// </summary> | ||
682 | /// <param name="project">The project.</param> | ||
683 | /// <param name="conf">The conf.</param> | ||
684 | /// <returns></returns> | ||
685 | public static string GetXmlDocFile(ProjectNode project, ConfigurationNode conf) | ||
686 | { | ||
687 | if (conf == null) | ||
688 | { | ||
689 | throw new ArgumentNullException("conf"); | ||
690 | } | ||
691 | if (project == null) | ||
692 | { | ||
693 | throw new ArgumentNullException("project"); | ||
694 | } | ||
695 | string docFile = (string)conf.Options["XmlDocFile"]; | ||
696 | // if(docFile != null && docFile.Length == 0)//default to assembly name if not specified | ||
697 | // { | ||
698 | // return Path.GetFileNameWithoutExtension(project.AssemblyName) + ".xml"; | ||
699 | // } | ||
700 | return docFile; | ||
701 | } | ||
702 | |||
703 | /// <summary> | ||
704 | /// Normalizes the path. | ||
705 | /// </summary> | ||
706 | /// <param name="path">The path.</param> | ||
707 | /// <returns></returns> | ||
708 | public static string NormalizePath(string path) | ||
709 | { | ||
710 | if (path == null) | ||
711 | { | ||
712 | return ""; | ||
713 | } | ||
714 | |||
715 | StringBuilder tmpPath; | ||
716 | |||
717 | if (Core.Parse.Preprocessor.GetOS() == "Win32") | ||
718 | { | ||
719 | tmpPath = new StringBuilder(path.Replace('\\', '/')); | ||
720 | tmpPath.Replace("/", @"\\"); | ||
721 | } | ||
722 | else | ||
723 | { | ||
724 | tmpPath = new StringBuilder(path.Replace('\\', '/')); | ||
725 | tmpPath = tmpPath.Replace('/', Path.DirectorySeparatorChar); | ||
726 | } | ||
727 | return tmpPath.ToString(); | ||
728 | } | ||
729 | |||
730 | private void WriteProject(SolutionNode solution, ProjectNode project) | ||
731 | { | ||
732 | string solutionDir = Path.Combine(solution.FullPath, Path.Combine("autotools", solution.Name)); | ||
733 | string projectDir = Path.Combine(solutionDir, project.Name); | ||
734 | string projectVersion = project.Version; | ||
735 | bool hasAssemblyConfig = false; | ||
736 | chkMkDir(projectDir); | ||
737 | |||
738 | List<string> | ||
739 | compiledFiles = new List<string>(), | ||
740 | contentFiles = new List<string>(), | ||
741 | embeddedFiles = new List<string>(), | ||
742 | |||
743 | binaryLibs = new List<string>(), | ||
744 | pkgLibs = new List<string>(), | ||
745 | systemLibs = new List<string>(), | ||
746 | runtimeLibs = new List<string>(), | ||
747 | |||
748 | extraDistFiles = new List<string>(), | ||
749 | localCopyTargets = new List<string>(); | ||
750 | |||
751 | // If there exists a .config file for this assembly, copy | ||
752 | // it to the project folder | ||
753 | |||
754 | // TODO: Support copying .config.osx files | ||
755 | // TODO: support processing the .config file for native library deps | ||
756 | string projectAssemblyName = project.Name; | ||
757 | if (project.AssemblyName != null) | ||
758 | projectAssemblyName = project.AssemblyName; | ||
759 | |||
760 | if (File.Exists(Path.Combine(project.FullPath, projectAssemblyName) + ".dll.config")) | ||
761 | { | ||
762 | hasAssemblyConfig = true; | ||
763 | System.IO.File.Copy(Path.Combine(project.FullPath, projectAssemblyName + ".dll.config"), Path.Combine(projectDir, projectAssemblyName + ".dll.config"), true); | ||
764 | extraDistFiles.Add(project.AssemblyName + ".dll.config"); | ||
765 | } | ||
766 | |||
767 | foreach (ConfigurationNode conf in project.Configurations) | ||
768 | { | ||
769 | if (conf.Options.KeyFile != string.Empty) | ||
770 | { | ||
771 | // Copy snk file into the project's directory | ||
772 | // Use the snk from the project directory directly | ||
773 | string source = Path.Combine(project.FullPath, conf.Options.KeyFile); | ||
774 | string keyFile = conf.Options.KeyFile; | ||
775 | Regex re = new Regex(".*/"); | ||
776 | keyFile = re.Replace(keyFile, ""); | ||
777 | |||
778 | string dest = Path.Combine(projectDir, keyFile); | ||
779 | // Tell the user if there's a problem copying the file | ||
780 | try | ||
781 | { | ||
782 | mkdirDashP(System.IO.Path.GetDirectoryName(dest)); | ||
783 | System.IO.File.Copy(source, dest, true); | ||
784 | } | ||
785 | catch (System.IO.IOException e) | ||
786 | { | ||
787 | Console.WriteLine(e.Message); | ||
788 | } | ||
789 | } | ||
790 | } | ||
791 | |||
792 | // Copy compiled, embedded and content files into the project's directory | ||
793 | foreach (string filename in project.Files) | ||
794 | { | ||
795 | string source = Path.Combine(project.FullPath, filename); | ||
796 | string dest = Path.Combine(projectDir, filename); | ||
797 | |||
798 | if (filename.Contains("AssemblyInfo.cs")) | ||
799 | { | ||
800 | // If we've got an AssemblyInfo.cs, pull the version number from it | ||
801 | string[] sources = { source }; | ||
802 | string[] args = { "" }; | ||
803 | Microsoft.CSharp.CSharpCodeProvider cscp = | ||
804 | new Microsoft.CSharp.CSharpCodeProvider(); | ||
805 | |||
806 | string tempAssemblyFile = Path.Combine(Path.GetTempPath(), project.Name + "-temp.dll"); | ||
807 | System.CodeDom.Compiler.CompilerParameters cparam = | ||
808 | new System.CodeDom.Compiler.CompilerParameters(args, tempAssemblyFile); | ||
809 | |||
810 | System.CodeDom.Compiler.CompilerResults cr = | ||
811 | cscp.CompileAssemblyFromFile(cparam, sources); | ||
812 | |||
813 | foreach (System.CodeDom.Compiler.CompilerError error in cr.Errors) | ||
814 | Console.WriteLine("Error! '{0}'", error.ErrorText); | ||
815 | |||
816 | try { | ||
817 | string projectFullName = cr.CompiledAssembly.FullName; | ||
818 | Regex verRegex = new Regex("Version=([\\d\\.]+)"); | ||
819 | Match verMatch = verRegex.Match(projectFullName); | ||
820 | if (verMatch.Success) | ||
821 | projectVersion = verMatch.Groups[1].Value; | ||
822 | }catch{ | ||
823 | Console.WriteLine("Couldn't compile AssemblyInfo.cs"); | ||
824 | } | ||
825 | |||
826 | // Clean up the temp file | ||
827 | try | ||
828 | { | ||
829 | if (File.Exists(tempAssemblyFile)) | ||
830 | File.Delete(tempAssemblyFile); | ||
831 | } | ||
832 | catch | ||
833 | { | ||
834 | Console.WriteLine("Error! '{0}'", e.ToString()); | ||
835 | } | ||
836 | |||
837 | } | ||
838 | |||
839 | // Tell the user if there's a problem copying the file | ||
840 | try | ||
841 | { | ||
842 | mkdirDashP(System.IO.Path.GetDirectoryName(dest)); | ||
843 | System.IO.File.Copy(source, dest, true); | ||
844 | } | ||
845 | catch (System.IO.IOException e) | ||
846 | { | ||
847 | Console.WriteLine(e.Message); | ||
848 | } | ||
849 | |||
850 | switch (project.Files.GetBuildAction(filename)) | ||
851 | { | ||
852 | case BuildAction.Compile: | ||
853 | compiledFiles.Add(filename); | ||
854 | break; | ||
855 | case BuildAction.Content: | ||
856 | contentFiles.Add(filename); | ||
857 | extraDistFiles.Add(filename); | ||
858 | break; | ||
859 | case BuildAction.EmbeddedResource: | ||
860 | embeddedFiles.Add(filename); | ||
861 | break; | ||
862 | } | ||
863 | } | ||
864 | |||
865 | // Set up references | ||
866 | for (int refNum = 0; refNum < project.References.Count; refNum++) | ||
867 | { | ||
868 | ReferenceNode refr = (ReferenceNode)project.References[refNum]; | ||
869 | Assembly refAssembly = Assembly.LoadWithPartialName(refr.Name); | ||
870 | |||
871 | /* Determine which pkg-config (.pc) file refers to | ||
872 | this assembly */ | ||
873 | |||
874 | SystemPackage package = null; | ||
875 | |||
876 | if (packagesHash.Contains(refr.Name)){ | ||
877 | package = (SystemPackage)packagesHash[refr.Name]; | ||
878 | |||
879 | }else{ | ||
880 | string assemblyFullName = string.Empty; | ||
881 | if (refAssembly != null) | ||
882 | assemblyFullName = refAssembly.FullName; | ||
883 | |||
884 | string assemblyFileName = string.Empty; | ||
885 | if (assemblyFullName != string.Empty && | ||
886 | assemblyFullNameToPath.Contains(assemblyFullName) | ||
887 | ) | ||
888 | assemblyFileName = | ||
889 | (string)assemblyFullNameToPath[assemblyFullName]; | ||
890 | |||
891 | if (assemblyFileName != string.Empty && | ||
892 | assemblyPathToPackage.Contains(assemblyFileName) | ||
893 | ) | ||
894 | package = (SystemPackage)assemblyPathToPackage[assemblyFileName]; | ||
895 | |||
896 | } | ||
897 | |||
898 | /* If we know the .pc file and it is not "mono" | ||
899 | (already in the path), add a -pkg: argument */ | ||
900 | |||
901 | if (package != null && | ||
902 | package.Name != "mono" && | ||
903 | !pkgLibs.Contains(package.Name) | ||
904 | ) | ||
905 | pkgLibs.Add(package.Name); | ||
906 | |||
907 | string fileRef = | ||
908 | FindFileReference(refr.Name, (ProjectNode)refr.Parent); | ||
909 | |||
910 | if (refr.LocalCopy || | ||
911 | solution.ProjectsTable.ContainsKey(refr.Name) || | ||
912 | fileRef != null || | ||
913 | refr.Path != null | ||
914 | ) | ||
915 | { | ||
916 | |||
917 | /* Attempt to copy the referenced lib to the | ||
918 | project's directory */ | ||
919 | |||
920 | string filename = refr.Name + ".dll"; | ||
921 | string source = filename; | ||
922 | if (refr.Path != null) | ||
923 | source = Path.Combine(refr.Path, source); | ||
924 | source = Path.Combine(project.FullPath, source); | ||
925 | string dest = Path.Combine(projectDir, filename); | ||
926 | |||
927 | /* Since we depend on this binary dll to build, we | ||
928 | * will add a compile- time dependency on the | ||
929 | * copied dll, and add the dll to the list of | ||
930 | * files distributed with this package | ||
931 | */ | ||
932 | |||
933 | binaryLibs.Add(refr.Name + ".dll"); | ||
934 | extraDistFiles.Add(refr.Name + ".dll"); | ||
935 | |||
936 | // TODO: Support copying .config.osx files | ||
937 | // TODO: Support for determining native dependencies | ||
938 | if (File.Exists(source + ".config")) | ||
939 | { | ||
940 | System.IO.File.Copy(source + ".config", Path.GetDirectoryName(dest), true); | ||
941 | extraDistFiles.Add(refr.Name + ".dll.config"); | ||
942 | } | ||
943 | |||
944 | try | ||
945 | { | ||
946 | System.IO.File.Copy(source, dest, true); | ||
947 | } | ||
948 | catch (System.IO.IOException) | ||
949 | { | ||
950 | if (solution.ProjectsTable.ContainsKey(refr.Name)){ | ||
951 | |||
952 | /* If an assembly is referenced, marked for | ||
953 | * local copy, in the list of projects for | ||
954 | * this solution, but does not exist, put a | ||
955 | * target into the Makefile.am to build the | ||
956 | * assembly and copy it to this project's | ||
957 | * directory | ||
958 | */ | ||
959 | |||
960 | ProjectNode sourcePrj = | ||
961 | ((ProjectNode)(solution.ProjectsTable[refr.Name])); | ||
962 | |||
963 | string target = | ||
964 | String.Format("{0}:\n" + | ||
965 | "\t$(MAKE) -C ../{1}\n" + | ||
966 | "\tln ../{2}/$@ $@\n", | ||
967 | filename, | ||
968 | sourcePrj.Name, | ||
969 | sourcePrj.Name ); | ||
970 | |||
971 | localCopyTargets.Add(target); | ||
972 | } | ||
973 | } | ||
974 | } | ||
975 | else if( !pkgLibs.Contains(refr.Name) ) | ||
976 | { | ||
977 | // Else, let's assume it's in the GAC or the lib path | ||
978 | string assemName = string.Empty; | ||
979 | int index = refr.Name.IndexOf(","); | ||
980 | |||
981 | if (index > 0) | ||
982 | assemName = refr.Name.Substring(0, index); | ||
983 | else | ||
984 | assemName = refr.Name; | ||
985 | |||
986 | m_Kernel.Log.Write(String.Format( | ||
987 | "Warning: Couldn't find an appropriate assembly " + | ||
988 | "for reference:\n'{0}'", refr.Name | ||
989 | )); | ||
990 | systemLibs.Add(assemName); | ||
991 | } | ||
992 | } | ||
993 | |||
994 | const string lineSep = " \\\n\t"; | ||
995 | string compiledFilesString = string.Empty; | ||
996 | if (compiledFiles.Count > 0) | ||
997 | compiledFilesString = | ||
998 | lineSep + string.Join(lineSep, compiledFiles.ToArray()); | ||
999 | |||
1000 | string embeddedFilesString = ""; | ||
1001 | if (embeddedFiles.Count > 0) | ||
1002 | embeddedFilesString = | ||
1003 | lineSep + string.Join(lineSep, embeddedFiles.ToArray()); | ||
1004 | |||
1005 | string contentFilesString = ""; | ||
1006 | if (contentFiles.Count > 0) | ||
1007 | contentFilesString = | ||
1008 | lineSep + string.Join(lineSep, contentFiles.ToArray()); | ||
1009 | |||
1010 | string extraDistFilesString = ""; | ||
1011 | if (extraDistFiles.Count > 0) | ||
1012 | extraDistFilesString = | ||
1013 | lineSep + string.Join(lineSep, extraDistFiles.ToArray()); | ||
1014 | |||
1015 | string pkgLibsString = ""; | ||
1016 | if (pkgLibs.Count > 0) | ||
1017 | pkgLibsString = | ||
1018 | lineSep + string.Join(lineSep, pkgLibs.ToArray()); | ||
1019 | |||
1020 | string binaryLibsString = ""; | ||
1021 | if (binaryLibs.Count > 0) | ||
1022 | binaryLibsString = | ||
1023 | lineSep + string.Join(lineSep, binaryLibs.ToArray()); | ||
1024 | |||
1025 | string systemLibsString = ""; | ||
1026 | if (systemLibs.Count > 0) | ||
1027 | systemLibsString = | ||
1028 | lineSep + string.Join(lineSep, systemLibs.ToArray()); | ||
1029 | |||
1030 | string localCopyTargetsString = ""; | ||
1031 | if (localCopyTargets.Count > 0) | ||
1032 | localCopyTargetsString = | ||
1033 | string.Join("\n", localCopyTargets.ToArray()); | ||
1034 | |||
1035 | string monoPath = ""; | ||
1036 | foreach (string runtimeLib in runtimeLibs) | ||
1037 | { | ||
1038 | monoPath += ":`pkg-config --variable=libdir " + runtimeLib + "`"; | ||
1039 | } | ||
1040 | |||
1041 | // Add the project name to the list of transformation | ||
1042 | // parameters | ||
1043 | XsltArgumentList argList = new XsltArgumentList(); | ||
1044 | argList.AddParam("projectName", "", project.Name); | ||
1045 | argList.AddParam("solutionName", "", solution.Name); | ||
1046 | argList.AddParam("assemblyName", "", projectAssemblyName); | ||
1047 | argList.AddParam("compiledFiles", "", compiledFilesString); | ||
1048 | argList.AddParam("embeddedFiles", "", embeddedFilesString); | ||
1049 | argList.AddParam("contentFiles", "", contentFilesString); | ||
1050 | argList.AddParam("extraDistFiles", "", extraDistFilesString); | ||
1051 | argList.AddParam("pkgLibs", "", pkgLibsString); | ||
1052 | argList.AddParam("binaryLibs", "", binaryLibsString); | ||
1053 | argList.AddParam("systemLibs", "", systemLibsString); | ||
1054 | argList.AddParam("monoPath", "", monoPath); | ||
1055 | argList.AddParam("localCopyTargets", "", localCopyTargetsString); | ||
1056 | argList.AddParam("projectVersion", "", projectVersion); | ||
1057 | argList.AddParam("hasAssemblyConfig", "", hasAssemblyConfig ? "true" : ""); | ||
1058 | |||
1059 | // Transform the templates | ||
1060 | transformToFile(Path.Combine(projectDir, "configure.ac"), argList, "/Autotools/ProjectConfigureAc"); | ||
1061 | transformToFile(Path.Combine(projectDir, "Makefile.am"), argList, "/Autotools/ProjectMakefileAm"); | ||
1062 | transformToFile(Path.Combine(projectDir, "autogen.sh"), argList, "/Autotools/ProjectAutogenSh"); | ||
1063 | |||
1064 | if (project.Type == Core.Nodes.ProjectType.Library) | ||
1065 | transformToFile(Path.Combine(projectDir, project.Name + ".pc.in"), argList, "/Autotools/ProjectPcIn"); | ||
1066 | if (project.Type == Core.Nodes.ProjectType.Exe || project.Type == Core.Nodes.ProjectType.WinExe) | ||
1067 | transformToFile(Path.Combine(projectDir, project.Name.ToLower() + ".in"), argList, "/Autotools/ProjectWrapperScriptIn"); | ||
1068 | } | ||
1069 | |||
1070 | private void WriteProjectOld(SolutionNode solution, ProjectNode project) | ||
1071 | { | ||
1072 | string projFile = Helper.MakeFilePath(project.FullPath, "Include", "am"); | ||
1073 | StreamWriter ss = new StreamWriter(projFile); | ||
1074 | ss.NewLine = "\n"; | ||
1075 | |||
1076 | m_Kernel.CurrentWorkingDirectory.Push(); | ||
1077 | Helper.SetCurrentDir(Path.GetDirectoryName(projFile)); | ||
1078 | |||
1079 | using (ss) | ||
1080 | { | ||
1081 | ss.WriteLine(Helper.AssemblyFullName(project.AssemblyName, project.Type) + ":"); | ||
1082 | ss.WriteLine("\tmkdir -p " + Helper.MakePathRelativeTo(solution.FullPath, project.Path) + "/$(BUILD_DIR)/$(CONFIG)/"); | ||
1083 | foreach (string file in project.Files) | ||
1084 | { | ||
1085 | if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings) | ||
1086 | { | ||
1087 | ss.Write("\tresgen "); | ||
1088 | ss.Write(Helper.NormalizePath(Path.Combine(project.Path, file.Substring(0, file.LastIndexOf('.')) + ".resx "), '/')); | ||
1089 | if (project.Files.GetResourceName(file) != "") | ||
1090 | { | ||
1091 | ss.WriteLine(Helper.NormalizePath(Path.Combine(project.Path, project.RootNamespace + "." + project.Files.GetResourceName(file) + ".resources"), '/')); | ||
1092 | } | ||
1093 | else | ||
1094 | { | ||
1095 | ss.WriteLine(Helper.NormalizePath(Path.Combine(project.Path, project.RootNamespace + "." + file.Substring(0, file.LastIndexOf('.')) + ".resources"), '/')); | ||
1096 | } | ||
1097 | } | ||
1098 | } | ||
1099 | ss.WriteLine("\t$(CSC)\t/out:" + Helper.MakePathRelativeTo(solution.FullPath, project.Path) + "/$(BUILD_DIR)/$(CONFIG)/" + Helper.AssemblyFullName(project.AssemblyName, project.Type) + " \\"); | ||
1100 | ss.WriteLine("\t\t/target:" + project.Type.ToString().ToLower() + " \\"); | ||
1101 | if (project.References.Count > 0) | ||
1102 | { | ||
1103 | ss.Write("\t\t/reference:"); | ||
1104 | bool firstref = true; | ||
1105 | foreach (ReferenceNode refr in project.References) | ||
1106 | { | ||
1107 | if (firstref) | ||
1108 | { | ||
1109 | firstref = false; | ||
1110 | } | ||
1111 | else | ||
1112 | { | ||
1113 | ss.Write(","); | ||
1114 | } | ||
1115 | ss.Write("{0}", Helper.NormalizePath(Helper.MakePathRelativeTo(solution.FullPath, BuildReference(solution, refr)), '/')); | ||
1116 | } | ||
1117 | ss.WriteLine(" \\"); | ||
1118 | } | ||
1119 | //ss.WriteLine("\t\tProperties/AssemblyInfo.cs \\"); | ||
1120 | |||
1121 | foreach (string file in project.Files) | ||
1122 | { | ||
1123 | switch (project.Files.GetBuildAction(file)) | ||
1124 | { | ||
1125 | case BuildAction.EmbeddedResource: | ||
1126 | ss.Write("\t\t/resource:"); | ||
1127 | ss.WriteLine(Helper.NormalizePath(Path.Combine(project.Path, file), '/') + " \\"); | ||
1128 | break; | ||
1129 | default: | ||
1130 | if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings) | ||
1131 | { | ||
1132 | ss.Write("\t\t/resource:"); | ||
1133 | if (project.Files.GetResourceName(file) != "") | ||
1134 | { | ||
1135 | ss.WriteLine(Helper.NormalizePath(Path.Combine(project.Path, project.RootNamespace + "." + project.Files.GetResourceName(file) + ".resources"), '/') + "," + project.RootNamespace + "." + project.Files.GetResourceName(file) + ".resources" + " \\"); | ||
1136 | } | ||
1137 | else | ||
1138 | { | ||
1139 | ss.WriteLine(Helper.NormalizePath(Path.Combine(project.Path, project.RootNamespace + "." + file.Substring(0, file.LastIndexOf('.')) + ".resources"), '/') + "," + project.RootNamespace + "." + file.Substring(0, file.LastIndexOf('.')) + ".resources" + " \\"); | ||
1140 | } | ||
1141 | } | ||
1142 | break; | ||
1143 | } | ||
1144 | } | ||
1145 | |||
1146 | foreach (ConfigurationNode conf in project.Configurations) | ||
1147 | { | ||
1148 | if (conf.Options.KeyFile != "") | ||
1149 | { | ||
1150 | ss.WriteLine("\t\t/keyfile:" + Helper.NormalizePath(Path.Combine(project.Path, conf.Options.KeyFile), '/') + " \\"); | ||
1151 | break; | ||
1152 | } | ||
1153 | } | ||
1154 | foreach (ConfigurationNode conf in project.Configurations) | ||
1155 | { | ||
1156 | if (conf.Options.AllowUnsafe) | ||
1157 | { | ||
1158 | ss.WriteLine("\t\t/unsafe \\"); | ||
1159 | break; | ||
1160 | } | ||
1161 | } | ||
1162 | if (project.AppIcon != "") | ||
1163 | { | ||
1164 | ss.WriteLine("\t\t/win32icon:" + Helper.NormalizePath(Path.Combine(project.Path, project.AppIcon), '/') + " \\"); | ||
1165 | } | ||
1166 | |||
1167 | foreach (ConfigurationNode conf in project.Configurations) | ||
1168 | { | ||
1169 | ss.WriteLine("\t\t/define:{0}", conf.Options.CompilerDefines.Replace(';', ',') + " \\"); | ||
1170 | break; | ||
1171 | } | ||
1172 | |||
1173 | foreach (ConfigurationNode conf in project.Configurations) | ||
1174 | { | ||
1175 | if (GetXmlDocFile(project, conf) != "") | ||
1176 | { | ||
1177 | ss.WriteLine("\t\t/doc:" + Helper.MakePathRelativeTo(solution.FullPath, project.Path) + "/$(BUILD_DIR)/$(CONFIG)/" + project.Name + ".xml \\"); | ||
1178 | break; | ||
1179 | } | ||
1180 | } | ||
1181 | foreach (string file in project.Files) | ||
1182 | { | ||
1183 | switch (project.Files.GetBuildAction(file)) | ||
1184 | { | ||
1185 | case BuildAction.Compile: | ||
1186 | ss.WriteLine("\t\t\\"); | ||
1187 | ss.Write("\t\t" + NormalizePath(Path.Combine(Helper.MakePathRelativeTo(solution.FullPath, project.Path), file))); | ||
1188 | break; | ||
1189 | default: | ||
1190 | break; | ||
1191 | } | ||
1192 | } | ||
1193 | ss.WriteLine(); | ||
1194 | ss.WriteLine(); | ||
1195 | |||
1196 | if (project.Type == ProjectType.Library) | ||
1197 | { | ||
1198 | ss.WriteLine("install-data-local:"); | ||
1199 | ss.WriteLine(" echo \"$(GACUTIL) /i bin/Release/" + project.Name + ".dll /f $(GACUTIL_FLAGS)\"; \\"); | ||
1200 | ss.WriteLine(" $(GACUTIL) /i bin/Release/" + project.Name + ".dll /f $(GACUTIL_FLAGS) || exit 1;"); | ||
1201 | ss.WriteLine(); | ||
1202 | ss.WriteLine("uninstall-local:"); | ||
1203 | ss.WriteLine(" echo \"$(GACUTIL) /u " + project.Name + " $(GACUTIL_FLAGS)\"; \\"); | ||
1204 | ss.WriteLine(" $(GACUTIL) /u " + project.Name + " $(GACUTIL_FLAGS) || exit 1;"); | ||
1205 | ss.WriteLine(); | ||
1206 | } | ||
1207 | ss.WriteLine("CLEANFILES = $(BUILD_DIR)/$(CONFIG)/" + Helper.AssemblyFullName(project.AssemblyName, project.Type) + " $(BUILD_DIR)/$(CONFIG)/" + project.AssemblyName + ".mdb $(BUILD_DIR)/$(CONFIG)/" + project.AssemblyName + ".pdb " + project.AssemblyName + ".xml"); | ||
1208 | ss.WriteLine("EXTRA_DIST = \\"); | ||
1209 | ss.Write(" $(FILES)"); | ||
1210 | foreach (ConfigurationNode conf in project.Configurations) | ||
1211 | { | ||
1212 | if (conf.Options.KeyFile != "") | ||
1213 | { | ||
1214 | ss.Write(" \\"); | ||
1215 | ss.WriteLine("\t" + conf.Options.KeyFile); | ||
1216 | } | ||
1217 | break; | ||
1218 | } | ||
1219 | } | ||
1220 | m_Kernel.CurrentWorkingDirectory.Pop(); | ||
1221 | } | ||
1222 | bool hasLibrary = false; | ||
1223 | |||
1224 | private void WriteCombineOld(SolutionNode solution) | ||
1225 | { | ||
1226 | |||
1227 | /* TODO: These vars should be pulled from the prebuild.xml file */ | ||
1228 | string releaseVersion = "2.0.0"; | ||
1229 | string assemblyVersion = "2.1.0.0"; | ||
1230 | string description = | ||
1231 | "Tao Framework " + solution.Name + " Binding For .NET"; | ||
1232 | |||
1233 | hasLibrary = false; | ||
1234 | m_Kernel.Log.Write("Creating Autotools make files"); | ||
1235 | foreach (ProjectNode project in solution.Projects) | ||
1236 | { | ||
1237 | if (m_Kernel.AllowProject(project.FilterGroups)) | ||
1238 | { | ||
1239 | m_Kernel.Log.Write("...Creating makefile: {0}", project.Name); | ||
1240 | WriteProject(solution, project); | ||
1241 | } | ||
1242 | } | ||
1243 | |||
1244 | m_Kernel.Log.Write(""); | ||
1245 | string combFile = Helper.MakeFilePath(solution.FullPath, "Makefile", "am"); | ||
1246 | StreamWriter ss = new StreamWriter(combFile); | ||
1247 | ss.NewLine = "\n"; | ||
1248 | |||
1249 | m_Kernel.CurrentWorkingDirectory.Push(); | ||
1250 | Helper.SetCurrentDir(Path.GetDirectoryName(combFile)); | ||
1251 | |||
1252 | using (ss) | ||
1253 | { | ||
1254 | foreach (ProjectNode project in solution.ProjectsTableOrder) | ||
1255 | { | ||
1256 | if (project.Type == ProjectType.Library) | ||
1257 | { | ||
1258 | hasLibrary = true; | ||
1259 | break; | ||
1260 | } | ||
1261 | } | ||
1262 | |||
1263 | if (hasLibrary) | ||
1264 | { | ||
1265 | ss.Write("pkgconfig_in_files = "); | ||
1266 | foreach (ProjectNode project in solution.ProjectsTableOrder) | ||
1267 | { | ||
1268 | if (project.Type == ProjectType.Library) | ||
1269 | { | ||
1270 | string combFilepc = Helper.MakeFilePath(solution.FullPath, project.Name, "pc.in"); | ||
1271 | ss.Write(" " + project.Name + ".pc.in "); | ||
1272 | StreamWriter sspc = new StreamWriter(combFilepc); | ||
1273 | sspc.NewLine = "\n"; | ||
1274 | using (sspc) | ||
1275 | { | ||
1276 | sspc.WriteLine("prefix=@prefix@"); | ||
1277 | sspc.WriteLine("exec_prefix=${prefix}"); | ||
1278 | sspc.WriteLine("libdir=${exec_prefix}/lib"); | ||
1279 | sspc.WriteLine(); | ||
1280 | sspc.WriteLine("Name: @PACKAGE_NAME@"); | ||
1281 | sspc.WriteLine("Description: @DESCRIPTION@"); | ||
1282 | sspc.WriteLine("Version: @ASSEMBLY_VERSION@"); | ||
1283 | sspc.WriteLine("Libs: -r:${libdir}/mono/gac/@PACKAGE_NAME@/@ASSEMBLY_VERSION@__@PUBKEY@/@PACKAGE_NAME@.dll"); | ||
1284 | } | ||
1285 | } | ||
1286 | } | ||
1287 | |||
1288 | ss.WriteLine(); | ||
1289 | ss.WriteLine("pkgconfigdir=$(prefix)/lib/pkgconfig"); | ||
1290 | ss.WriteLine("pkgconfig_DATA=$(pkgconfig_in_files:.pc.in=.pc)"); | ||
1291 | } | ||
1292 | ss.WriteLine(); | ||
1293 | foreach (ProjectNode project in solution.ProjectsTableOrder) | ||
1294 | { | ||
1295 | string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); | ||
1296 | ss.WriteLine("-include x {0}", | ||
1297 | Helper.NormalizePath(Helper.MakeFilePath(path, "Include", "am"), '/')); | ||
1298 | } | ||
1299 | ss.WriteLine(); | ||
1300 | ss.WriteLine("all: \\"); | ||
1301 | ss.Write("\t"); | ||
1302 | foreach (ProjectNode project in solution.ProjectsTableOrder) | ||
1303 | { | ||
1304 | string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); | ||
1305 | ss.Write(Helper.AssemblyFullName(project.AssemblyName, project.Type) + " "); | ||
1306 | |||
1307 | } | ||
1308 | ss.WriteLine(); | ||
1309 | if (hasLibrary) | ||
1310 | { | ||
1311 | ss.WriteLine("EXTRA_DIST = \\"); | ||
1312 | ss.WriteLine("\t$(pkgconfig_in_files)"); | ||
1313 | } | ||
1314 | else | ||
1315 | { | ||
1316 | ss.WriteLine("EXTRA_DIST = "); | ||
1317 | } | ||
1318 | ss.WriteLine(); | ||
1319 | ss.WriteLine("DISTCLEANFILES = \\"); | ||
1320 | ss.WriteLine("\tconfigure \\"); | ||
1321 | ss.WriteLine("\tMakefile.in \\"); | ||
1322 | ss.WriteLine("\taclocal.m4"); | ||
1323 | } | ||
1324 | combFile = Helper.MakeFilePath(solution.FullPath, "configure", "ac"); | ||
1325 | StreamWriter ts = new StreamWriter(combFile); | ||
1326 | ts.NewLine = "\n"; | ||
1327 | using (ts) | ||
1328 | { | ||
1329 | if (this.hasLibrary) | ||
1330 | { | ||
1331 | foreach (ProjectNode project in solution.ProjectsTableOrder) | ||
1332 | { | ||
1333 | if (project.Type == ProjectType.Library) | ||
1334 | { | ||
1335 | ts.WriteLine("AC_INIT(" + project.Name + ".pc.in)"); | ||
1336 | break; | ||
1337 | } | ||
1338 | } | ||
1339 | } | ||
1340 | else | ||
1341 | { | ||
1342 | ts.WriteLine("AC_INIT(Makefile.am)"); | ||
1343 | } | ||
1344 | ts.WriteLine("AC_PREREQ(2.53)"); | ||
1345 | ts.WriteLine("AC_CANONICAL_SYSTEM"); | ||
1346 | |||
1347 | ts.WriteLine("PACKAGE_NAME={0}", solution.Name); | ||
1348 | ts.WriteLine("PACKAGE_VERSION={0}", releaseVersion); | ||
1349 | ts.WriteLine("DESCRIPTION=\"{0}\"", description); | ||
1350 | ts.WriteLine("AC_SUBST(DESCRIPTION)"); | ||
1351 | ts.WriteLine("AM_INIT_AUTOMAKE([$PACKAGE_NAME],[$PACKAGE_VERSION],[$DESCRIPTION])"); | ||
1352 | |||
1353 | ts.WriteLine("ASSEMBLY_VERSION={0}", assemblyVersion); | ||
1354 | ts.WriteLine("AC_SUBST(ASSEMBLY_VERSION)"); | ||
1355 | |||
1356 | ts.WriteLine("PUBKEY=`sn -t $PACKAGE_NAME.snk | grep 'Public Key Token' | awk -F: '{print $2}' | sed -e 's/^ //'`"); | ||
1357 | ts.WriteLine("AC_SUBST(PUBKEY)"); | ||
1358 | |||
1359 | ts.WriteLine(); | ||
1360 | ts.WriteLine("AM_MAINTAINER_MODE"); | ||
1361 | ts.WriteLine(); | ||
1362 | ts.WriteLine("dnl AC_PROG_INTLTOOL([0.25])"); | ||
1363 | ts.WriteLine(); | ||
1364 | ts.WriteLine("AC_PROG_INSTALL"); | ||
1365 | ts.WriteLine(); | ||
1366 | ts.WriteLine("MONO_REQUIRED_VERSION=1.1"); | ||
1367 | ts.WriteLine(); | ||
1368 | ts.WriteLine("AC_MSG_CHECKING([whether we're compiling from CVS])"); | ||
1369 | ts.WriteLine("if test -f \"$srcdir/.cvs_version\" ; then"); | ||
1370 | ts.WriteLine(" from_cvs=yes"); | ||
1371 | ts.WriteLine("else"); | ||
1372 | ts.WriteLine(" if test -f \"$srcdir/.svn\" ; then"); | ||
1373 | ts.WriteLine(" from_cvs=yes"); | ||
1374 | ts.WriteLine(" else"); | ||
1375 | ts.WriteLine(" from_cvs=no"); | ||
1376 | ts.WriteLine(" fi"); | ||
1377 | ts.WriteLine("fi"); | ||
1378 | ts.WriteLine(); | ||
1379 | ts.WriteLine("AC_MSG_RESULT($from_cvs)"); | ||
1380 | ts.WriteLine(); | ||
1381 | ts.WriteLine("AC_PATH_PROG(MONO, mono)"); | ||
1382 | ts.WriteLine("AC_PATH_PROG(GMCS, gmcs)"); | ||
1383 | ts.WriteLine("AC_PATH_PROG(GACUTIL, gacutil)"); | ||
1384 | ts.WriteLine(); | ||
1385 | ts.WriteLine("AC_MSG_CHECKING([for mono])"); | ||
1386 | ts.WriteLine("dnl if test \"x$MONO\" = \"x\" ; then"); | ||
1387 | ts.WriteLine("dnl AC_MSG_ERROR([Can't find \"mono\" in your PATH])"); | ||
1388 | ts.WriteLine("dnl else"); | ||
1389 | ts.WriteLine(" AC_MSG_RESULT([found])"); | ||
1390 | ts.WriteLine("dnl fi"); | ||
1391 | ts.WriteLine(); | ||
1392 | ts.WriteLine("AC_MSG_CHECKING([for gmcs])"); | ||
1393 | ts.WriteLine("dnl if test \"x$GMCS\" = \"x\" ; then"); | ||
1394 | ts.WriteLine("dnl AC_MSG_ERROR([Can't find \"gmcs\" in your PATH])"); | ||
1395 | ts.WriteLine("dnl else"); | ||
1396 | ts.WriteLine(" AC_MSG_RESULT([found])"); | ||
1397 | ts.WriteLine("dnl fi"); | ||
1398 | ts.WriteLine(); | ||
1399 | //ts.WriteLine("AC_MSG_CHECKING([for gacutil])"); | ||
1400 | //ts.WriteLine("if test \"x$GACUTIL\" = \"x\" ; then"); | ||
1401 | //ts.WriteLine(" AC_MSG_ERROR([Can't find \"gacutil\" in your PATH])"); | ||
1402 | //ts.WriteLine("else"); | ||
1403 | //ts.WriteLine(" AC_MSG_RESULT([found])"); | ||
1404 | //ts.WriteLine("fi"); | ||
1405 | ts.WriteLine(); | ||
1406 | ts.WriteLine("AC_SUBST(PATH)"); | ||
1407 | ts.WriteLine("AC_SUBST(LD_LIBRARY_PATH)"); | ||
1408 | ts.WriteLine(); | ||
1409 | ts.WriteLine("dnl CSFLAGS=\"-debug -nowarn:1574\""); | ||
1410 | ts.WriteLine("CSFLAGS=\"\""); | ||
1411 | ts.WriteLine("AC_SUBST(CSFLAGS)"); | ||
1412 | ts.WriteLine(); | ||
1413 | // ts.WriteLine("AC_MSG_CHECKING(--disable-sdl argument)"); | ||
1414 | // ts.WriteLine("AC_ARG_ENABLE(sdl,"); | ||
1415 | // ts.WriteLine(" [ --disable-sdl Disable Sdl interface.],"); | ||
1416 | // ts.WriteLine(" [disable_sdl=$disableval],"); | ||
1417 | // ts.WriteLine(" [disable_sdl=\"no\"])"); | ||
1418 | // ts.WriteLine("AC_MSG_RESULT($disable_sdl)"); | ||
1419 | // ts.WriteLine("if test \"$disable_sdl\" = \"yes\"; then"); | ||
1420 | // ts.WriteLine(" AC_DEFINE(FEAT_SDL)"); | ||
1421 | // ts.WriteLine("fi"); | ||
1422 | ts.WriteLine(); | ||
1423 | ts.WriteLine("dnl Find pkg-config"); | ||
1424 | ts.WriteLine("AC_PATH_PROG(PKGCONFIG, pkg-config, no)"); | ||
1425 | ts.WriteLine("if test \"x$PKG_CONFIG\" = \"xno\"; then"); | ||
1426 | ts.WriteLine(" AC_MSG_ERROR([You need to install pkg-config])"); | ||
1427 | ts.WriteLine("fi"); | ||
1428 | ts.WriteLine(); | ||
1429 | ts.WriteLine("PKG_CHECK_MODULES(MONO_DEPENDENCY, mono >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false)"); | ||
1430 | ts.WriteLine("BUILD_DIR=\"bin\""); | ||
1431 | ts.WriteLine("AC_SUBST(BUILD_DIR)"); | ||
1432 | ts.WriteLine("CONFIG=\"Release\""); | ||
1433 | ts.WriteLine("AC_SUBST(CONFIG)"); | ||
1434 | ts.WriteLine(); | ||
1435 | ts.WriteLine("if test \"x$has_mono\" = \"xtrue\"; then"); | ||
1436 | ts.WriteLine(" AC_PATH_PROG(RUNTIME, mono, no)"); | ||
1437 | ts.WriteLine(" AC_PATH_PROG(CSC, gmcs, no)"); | ||
1438 | ts.WriteLine(" if test `uname -s` = \"Darwin\"; then"); | ||
1439 | ts.WriteLine(" LIB_PREFIX="); | ||
1440 | ts.WriteLine(" LIB_SUFFIX=.dylib"); | ||
1441 | ts.WriteLine(" else"); | ||
1442 | ts.WriteLine(" LIB_PREFIX=.so"); | ||
1443 | ts.WriteLine(" LIB_SUFFIX="); | ||
1444 | ts.WriteLine(" fi"); | ||
1445 | ts.WriteLine("else"); | ||
1446 | ts.WriteLine(" AC_PATH_PROG(CSC, csc.exe, no)"); | ||
1447 | ts.WriteLine(" if test x$CSC = \"xno\"; then"); | ||
1448 | ts.WriteLine(" AC_MSG_ERROR([You need to install either mono or .Net])"); | ||
1449 | ts.WriteLine(" else"); | ||
1450 | ts.WriteLine(" RUNTIME="); | ||
1451 | ts.WriteLine(" LIB_PREFIX="); | ||
1452 | ts.WriteLine(" LIB_SUFFIX=.dylib"); | ||
1453 | ts.WriteLine(" fi"); | ||
1454 | ts.WriteLine("fi"); | ||
1455 | ts.WriteLine(); | ||
1456 | ts.WriteLine("AC_SUBST(LIB_PREFIX)"); | ||
1457 | ts.WriteLine("AC_SUBST(LIB_SUFFIX)"); | ||
1458 | ts.WriteLine(); | ||
1459 | ts.WriteLine("AC_SUBST(BASE_DEPENDENCIES_CFLAGS)"); | ||
1460 | ts.WriteLine("AC_SUBST(BASE_DEPENDENCIES_LIBS)"); | ||
1461 | ts.WriteLine(); | ||
1462 | ts.WriteLine("dnl Find monodoc"); | ||
1463 | ts.WriteLine("MONODOC_REQUIRED_VERSION=1.0"); | ||
1464 | ts.WriteLine("AC_SUBST(MONODOC_REQUIRED_VERSION)"); | ||
1465 | ts.WriteLine("PKG_CHECK_MODULES(MONODOC_DEPENDENCY, monodoc >= $MONODOC_REQUIRED_VERSION, enable_monodoc=yes, enable_monodoc=no)"); | ||
1466 | ts.WriteLine(); | ||
1467 | ts.WriteLine("if test \"x$enable_monodoc\" = \"xyes\"; then"); | ||
1468 | ts.WriteLine(" AC_PATH_PROG(MONODOC, monodoc, no)"); | ||
1469 | ts.WriteLine(" if test x$MONODOC = xno; then"); | ||
1470 | ts.WriteLine(" enable_monodoc=no"); | ||
1471 | ts.WriteLine(" fi"); | ||
1472 | ts.WriteLine("else"); | ||
1473 | ts.WriteLine(" MONODOC="); | ||
1474 | ts.WriteLine("fi"); | ||
1475 | ts.WriteLine(); | ||
1476 | ts.WriteLine("AC_SUBST(MONODOC)"); | ||
1477 | ts.WriteLine("AM_CONDITIONAL(ENABLE_MONODOC, test \"x$enable_monodoc\" = \"xyes\")"); | ||
1478 | ts.WriteLine(); | ||
1479 | ts.WriteLine("AC_PATH_PROG(GACUTIL, gacutil, no)"); | ||
1480 | ts.WriteLine("if test \"x$GACUTIL\" = \"xno\" ; then"); | ||
1481 | ts.WriteLine(" AC_MSG_ERROR([No gacutil tool found])"); | ||
1482 | ts.WriteLine("fi"); | ||
1483 | ts.WriteLine(); | ||
1484 | // foreach(ProjectNode project in solution.ProjectsTableOrder) | ||
1485 | // { | ||
1486 | // if (project.Type == ProjectType.Library) | ||
1487 | // { | ||
1488 | // } | ||
1489 | // } | ||
1490 | ts.WriteLine("GACUTIL_FLAGS='/package $(PACKAGE_NAME) /gacdir $(DESTDIR)$(prefix)'"); | ||
1491 | ts.WriteLine("AC_SUBST(GACUTIL_FLAGS)"); | ||
1492 | ts.WriteLine(); | ||
1493 | ts.WriteLine("winbuild=no"); | ||
1494 | ts.WriteLine("case \"$host\" in"); | ||
1495 | ts.WriteLine(" *-*-mingw*|*-*-cygwin*)"); | ||
1496 | ts.WriteLine(" winbuild=yes"); | ||
1497 | ts.WriteLine(" ;;"); | ||
1498 | ts.WriteLine("esac"); | ||
1499 | ts.WriteLine("AM_CONDITIONAL(WINBUILD, test x$winbuild = xyes)"); | ||
1500 | ts.WriteLine(); | ||
1501 | // ts.WriteLine("dnl Check for SDL"); | ||
1502 | // ts.WriteLine(); | ||
1503 | // ts.WriteLine("AC_PATH_PROG([SDL_CONFIG], [sdl-config])"); | ||
1504 | // ts.WriteLine("have_sdl=no"); | ||
1505 | // ts.WriteLine("if test -n \"${SDL_CONFIG}\"; then"); | ||
1506 | // ts.WriteLine(" have_sdl=yes"); | ||
1507 | // ts.WriteLine(" SDL_CFLAGS=`$SDL_CONFIG --cflags`"); | ||
1508 | // ts.WriteLine(" SDL_LIBS=`$SDL_CONFIG --libs`"); | ||
1509 | // ts.WriteLine(" #"); | ||
1510 | // ts.WriteLine(" # sdl-config sometimes emits an rpath flag pointing at its library"); | ||
1511 | // ts.WriteLine(" # installation directory. We don't want this, as it prevents users from"); | ||
1512 | // ts.WriteLine(" # linking sdl-viewer against, for example, a locally compiled libGL when a"); | ||
1513 | // ts.WriteLine(" # version of the library also exists in SDL's library installation"); | ||
1514 | // ts.WriteLine(" # directory, typically /usr/lib."); | ||
1515 | // ts.WriteLine(" #"); | ||
1516 | // ts.WriteLine(" SDL_LIBS=`echo $SDL_LIBS | sed 's/-Wl,-rpath,[[^ ]]* //'`"); | ||
1517 | // ts.WriteLine("fi"); | ||
1518 | // ts.WriteLine("AC_SUBST([SDL_CFLAGS])"); | ||
1519 | // ts.WriteLine("AC_SUBST([SDL_LIBS])"); | ||
1520 | ts.WriteLine(); | ||
1521 | ts.WriteLine("AC_OUTPUT(["); | ||
1522 | ts.WriteLine("Makefile"); | ||
1523 | // TODO: this does not work quite right. | ||
1524 | //ts.WriteLine("Properties/AssemblyInfo.cs"); | ||
1525 | foreach (ProjectNode project in solution.ProjectsTableOrder) | ||
1526 | { | ||
1527 | if (project.Type == ProjectType.Library) | ||
1528 | { | ||
1529 | ts.WriteLine(project.Name + ".pc"); | ||
1530 | } | ||
1531 | // string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); | ||
1532 | // ts.WriteLine(Helper.NormalizePath(Helper.MakeFilePath(path, "Include"),'/')); | ||
1533 | } | ||
1534 | ts.WriteLine("])"); | ||
1535 | ts.WriteLine(); | ||
1536 | ts.WriteLine("#po/Makefile.in"); | ||
1537 | ts.WriteLine(); | ||
1538 | ts.WriteLine("echo \"---\""); | ||
1539 | ts.WriteLine("echo \"Configuration summary\""); | ||
1540 | ts.WriteLine("echo \"\""); | ||
1541 | ts.WriteLine("echo \" * Installation prefix: $prefix\""); | ||
1542 | ts.WriteLine("echo \" * compiler: $CSC\""); | ||
1543 | ts.WriteLine("echo \" * Documentation: $enable_monodoc ($MONODOC)\""); | ||
1544 | ts.WriteLine("echo \" * Package Name: $PACKAGE_NAME\""); | ||
1545 | ts.WriteLine("echo \" * Version: $PACKAGE_VERSION\""); | ||
1546 | ts.WriteLine("echo \" * Public Key: $PUBKEY\""); | ||
1547 | ts.WriteLine("echo \"\""); | ||
1548 | ts.WriteLine("echo \"---\""); | ||
1549 | ts.WriteLine(); | ||
1550 | } | ||
1551 | |||
1552 | ts.NewLine = "\n"; | ||
1553 | foreach (ProjectNode project in solution.ProjectsTableOrder) | ||
1554 | { | ||
1555 | if (project.GenerateAssemblyInfoFile) | ||
1556 | { | ||
1557 | GenerateAssemblyInfoFile(solution, combFile); | ||
1558 | } | ||
1559 | } | ||
1560 | } | ||
1561 | |||
1562 | private static void GenerateAssemblyInfoFile(SolutionNode solution, string combFile) | ||
1563 | { | ||
1564 | System.IO.Directory.CreateDirectory(Helper.MakePathRelativeTo(solution.FullPath, "Properties")); | ||
1565 | combFile = Helper.MakeFilePath(solution.FullPath + "/Properties/", "AssemblyInfo.cs", "in"); | ||
1566 | StreamWriter ai = new StreamWriter(combFile); | ||
1567 | |||
1568 | using (ai) | ||
1569 | { | ||
1570 | ai.WriteLine("#region License"); | ||
1571 | ai.WriteLine("/*"); | ||
1572 | ai.WriteLine("MIT License"); | ||
1573 | ai.WriteLine("Copyright (c)2003-2006 Tao Framework Team"); | ||
1574 | ai.WriteLine("http://www.taoframework.com"); | ||
1575 | ai.WriteLine("All rights reserved."); | ||
1576 | ai.WriteLine(""); | ||
1577 | ai.WriteLine("Permission is hereby granted, free of charge, to any person obtaining a copy"); | ||
1578 | ai.WriteLine("of this software and associated documentation files (the \"Software\"), to deal"); | ||
1579 | ai.WriteLine("in the Software without restriction, including without limitation the rights"); | ||
1580 | ai.WriteLine("to use, copy, modify, merge, publish, distribute, sublicense, and/or sell"); | ||
1581 | ai.WriteLine("copies of the Software, and to permit persons to whom the Software is"); | ||
1582 | ai.WriteLine("furnished to do so, subject to the following conditions:"); | ||
1583 | ai.WriteLine(""); | ||
1584 | ai.WriteLine("The above copyright notice and this permission notice shall be included in all"); | ||
1585 | ai.WriteLine("copies or substantial portions of the Software."); | ||
1586 | ai.WriteLine(""); | ||
1587 | ai.WriteLine("THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR"); | ||
1588 | ai.WriteLine("IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,"); | ||
1589 | ai.WriteLine("FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE"); | ||
1590 | ai.WriteLine("AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER"); | ||
1591 | ai.WriteLine("LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,"); | ||
1592 | ai.WriteLine("OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE"); | ||
1593 | ai.WriteLine("SOFTWARE."); | ||
1594 | ai.WriteLine("*/"); | ||
1595 | ai.WriteLine("#endregion License"); | ||
1596 | ai.WriteLine(""); | ||
1597 | ai.WriteLine("using System;"); | ||
1598 | ai.WriteLine("using System.Reflection;"); | ||
1599 | ai.WriteLine("using System.Runtime.InteropServices;"); | ||
1600 | ai.WriteLine("using System.Security;"); | ||
1601 | ai.WriteLine("using System.Security.Permissions;"); | ||
1602 | ai.WriteLine(""); | ||
1603 | ai.WriteLine("[assembly: AllowPartiallyTrustedCallers]"); | ||
1604 | ai.WriteLine("[assembly: AssemblyCompany(\"Tao Framework -- http://www.taoframework.com\")]"); | ||
1605 | ai.WriteLine("[assembly: AssemblyConfiguration(\"Retail\")]"); | ||
1606 | ai.WriteLine("[assembly: AssemblyCopyright(\"Copyright (c)2003-2006 Tao Framework Team. All rights reserved.\")]"); | ||
1607 | ai.WriteLine("[assembly: AssemblyCulture(\"\")]"); | ||
1608 | ai.WriteLine("[assembly: AssemblyDefaultAlias(\"@PACKAGE_NAME@\")]"); | ||
1609 | ai.WriteLine("[assembly: AssemblyDelaySign(false)]"); | ||
1610 | ai.WriteLine("[assembly: AssemblyDescription(\"@DESCRIPTION@\")]"); | ||
1611 | ai.WriteLine("[assembly: AssemblyFileVersion(\"@ASSEMBLY_VERSION@\")]"); | ||
1612 | ai.WriteLine("[assembly: AssemblyInformationalVersion(\"@ASSEMBLY_VERSION@\")]"); | ||
1613 | ai.WriteLine("[assembly: AssemblyKeyName(\"\")]"); | ||
1614 | ai.WriteLine("[assembly: AssemblyProduct(\"@PACKAGE_NAME@.dll\")]"); | ||
1615 | ai.WriteLine("[assembly: AssemblyTitle(\"@DESCRIPTION@\")]"); | ||
1616 | ai.WriteLine("[assembly: AssemblyTrademark(\"Tao Framework -- http://www.taoframework.com\")]"); | ||
1617 | ai.WriteLine("[assembly: AssemblyVersion(\"@ASSEMBLY_VERSION@\")]"); | ||
1618 | ai.WriteLine("[assembly: CLSCompliant(true)]"); | ||
1619 | ai.WriteLine("[assembly: ComVisible(false)]"); | ||
1620 | ai.WriteLine("[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]"); | ||
1621 | ai.WriteLine("[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.SkipVerification)]"); | ||
1622 | ai.WriteLine("[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.UnmanagedCode)]"); | ||
1623 | |||
1624 | } | ||
1625 | //return combFile; | ||
1626 | } | ||
1627 | |||
1628 | private void CleanProject(ProjectNode project) | ||
1629 | { | ||
1630 | m_Kernel.Log.Write("...Cleaning project: {0}", project.Name); | ||
1631 | string projectFile = Helper.MakeFilePath(project.FullPath, "Include", "am"); | ||
1632 | Helper.DeleteIfExists(projectFile); | ||
1633 | } | ||
1634 | |||
1635 | private void CleanSolution(SolutionNode solution) | ||
1636 | { | ||
1637 | m_Kernel.Log.Write("Cleaning Autotools make files for", solution.Name); | ||
1638 | |||
1639 | string slnFile = Helper.MakeFilePath(solution.FullPath, "Makefile", "am"); | ||
1640 | Helper.DeleteIfExists(slnFile); | ||
1641 | |||
1642 | slnFile = Helper.MakeFilePath(solution.FullPath, "Makefile", "in"); | ||
1643 | Helper.DeleteIfExists(slnFile); | ||
1644 | |||
1645 | slnFile = Helper.MakeFilePath(solution.FullPath, "configure", "ac"); | ||
1646 | Helper.DeleteIfExists(slnFile); | ||
1647 | |||
1648 | slnFile = Helper.MakeFilePath(solution.FullPath, "configure"); | ||
1649 | Helper.DeleteIfExists(slnFile); | ||
1650 | |||
1651 | slnFile = Helper.MakeFilePath(solution.FullPath, "Makefile"); | ||
1652 | Helper.DeleteIfExists(slnFile); | ||
1653 | |||
1654 | foreach (ProjectNode project in solution.Projects) | ||
1655 | { | ||
1656 | CleanProject(project); | ||
1657 | } | ||
1658 | |||
1659 | m_Kernel.Log.Write(""); | ||
1660 | } | ||
1661 | |||
1662 | #endregion | ||
1663 | |||
1664 | #region ITarget Members | ||
1665 | |||
1666 | /// <summary> | ||
1667 | /// Writes the specified kern. | ||
1668 | /// </summary> | ||
1669 | /// <param name="kern">The kern.</param> | ||
1670 | public void Write(Kernel kern) | ||
1671 | { | ||
1672 | if (kern == null) | ||
1673 | { | ||
1674 | throw new ArgumentNullException("kern"); | ||
1675 | } | ||
1676 | m_Kernel = kern; | ||
1677 | m_Kernel.Log.Write("Parsing system pkg-config files"); | ||
1678 | RunInitialization(); | ||
1679 | |||
1680 | string streamName = "autotools.xml"; | ||
1681 | string fqStreamName = String.Format("Prebuild.data.{0}", | ||
1682 | streamName | ||
1683 | ); | ||
1684 | |||
1685 | // Retrieve stream for the autotools template XML | ||
1686 | Stream autotoolsStream = Assembly.GetExecutingAssembly() | ||
1687 | .GetManifestResourceStream(fqStreamName); | ||
1688 | |||
1689 | if(autotoolsStream == null) { | ||
1690 | |||
1691 | /* | ||
1692 | * try without the default namespace prepended, in | ||
1693 | * case prebuild.exe assembly was compiled with | ||
1694 | * something other than Visual Studio .NET | ||
1695 | */ | ||
1696 | |||
1697 | autotoolsStream = Assembly.GetExecutingAssembly() | ||
1698 | .GetManifestResourceStream(streamName); | ||
1699 | if(autotoolsStream == null){ | ||
1700 | string errStr = | ||
1701 | String.Format("Could not find embedded resource file:\n" + | ||
1702 | "'{0}' or '{1}'", | ||
1703 | streamName, fqStreamName | ||
1704 | ); | ||
1705 | |||
1706 | m_Kernel.Log.Write(errStr); | ||
1707 | |||
1708 | throw new System.Reflection.TargetException(errStr); | ||
1709 | } | ||
1710 | } | ||
1711 | |||
1712 | // Create an XML URL Resolver with default credentials | ||
1713 | xr = new System.Xml.XmlUrlResolver(); | ||
1714 | xr.Credentials = CredentialCache.DefaultCredentials; | ||
1715 | |||
1716 | // Create a default evidence - no need to limit access | ||
1717 | e = new System.Security.Policy.Evidence(); | ||
1718 | |||
1719 | // Load the autotools XML | ||
1720 | autotoolsDoc = new XmlDocument(); | ||
1721 | autotoolsDoc.Load(autotoolsStream); | ||
1722 | |||
1723 | /* rootDir is the filesystem location where the Autotools | ||
1724 | * build tree will be created - for now we'll make it | ||
1725 | * $PWD/autotools | ||
1726 | */ | ||
1727 | |||
1728 | string pwd = Directory.GetCurrentDirectory(); | ||
1729 | //string pwd = System.Environment.GetEnvironmentVariable("PWD"); | ||
1730 | string rootDir = ""; | ||
1731 | //if (pwd.Length != 0) | ||
1732 | //{ | ||
1733 | rootDir = Path.Combine(pwd, "autotools"); | ||
1734 | //} | ||
1735 | //else | ||
1736 | //{ | ||
1737 | // pwd = Assembly.GetExecutingAssembly() | ||
1738 | //} | ||
1739 | chkMkDir(rootDir); | ||
1740 | |||
1741 | foreach (SolutionNode solution in kern.Solutions) | ||
1742 | { | ||
1743 | m_Kernel.Log.Write(String.Format("Writing solution: {0}", | ||
1744 | solution.Name)); | ||
1745 | WriteCombine(solution); | ||
1746 | } | ||
1747 | m_Kernel = null; | ||
1748 | } | ||
1749 | |||
1750 | /// <summary> | ||
1751 | /// Cleans the specified kern. | ||
1752 | /// </summary> | ||
1753 | /// <param name="kern">The kern.</param> | ||
1754 | public virtual void Clean(Kernel kern) | ||
1755 | { | ||
1756 | if (kern == null) | ||
1757 | { | ||
1758 | throw new ArgumentNullException("kern"); | ||
1759 | } | ||
1760 | m_Kernel = kern; | ||
1761 | foreach (SolutionNode sol in kern.Solutions) | ||
1762 | { | ||
1763 | CleanSolution(sol); | ||
1764 | } | ||
1765 | m_Kernel = null; | ||
1766 | } | ||
1767 | |||
1768 | /// <summary> | ||
1769 | /// Gets the name. | ||
1770 | /// </summary> | ||
1771 | /// <value>The name.</value> | ||
1772 | public string Name | ||
1773 | { | ||
1774 | get | ||
1775 | { | ||
1776 | return "autotools"; | ||
1777 | } | ||
1778 | } | ||
1779 | |||
1780 | #endregion | ||
1781 | } | ||
1782 | } | ||
diff --git a/Prebuild/src/Core/Targets/DebugTarget.cs b/Prebuild/src/Core/Targets/DebugTarget.cs deleted file mode 100644 index dc4e666..0000000 --- a/Prebuild/src/Core/Targets/DebugTarget.cs +++ /dev/null | |||
@@ -1,102 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | #region CVS Information | ||
27 | /* | ||
28 | * $Source$ | ||
29 | * $Author: jendave $ | ||
30 | * $Date: 2006-09-20 09:42:51 +0200 (on, 20 sep 2006) $ | ||
31 | * $Revision: 164 $ | ||
32 | */ | ||
33 | #endregion | ||
34 | |||
35 | using System; | ||
36 | |||
37 | using Prebuild.Core.Attributes; | ||
38 | using Prebuild.Core.Interfaces; | ||
39 | using Prebuild.Core.Nodes; | ||
40 | |||
41 | #if (DEBUG && _DEBUG_TARGET) | ||
42 | namespace Prebuild.Core.Targets | ||
43 | { | ||
44 | [Target("debug")] | ||
45 | public class DebugTarget : ITarget | ||
46 | { | ||
47 | #region Fields | ||
48 | |||
49 | private Kernel m_Kernel = null; | ||
50 | |||
51 | #endregion | ||
52 | |||
53 | #region ITarget Members | ||
54 | |||
55 | public void Write() | ||
56 | { | ||
57 | foreach(SolutionNode s in m_Kernel.Solutions) | ||
58 | { | ||
59 | Console.WriteLine("Solution [ {0}, {1} ]", s.Name, s.Path); | ||
60 | foreach(string file in s.Files) | ||
61 | { | ||
62 | Console.WriteLine("\tFile [ {0} ]", file); | ||
63 | } | ||
64 | |||
65 | foreach(ProjectNode proj in s.Projects) | ||
66 | { | ||
67 | Console.WriteLine("\tProject [ {0}, {1}. {2} ]", proj.Name, proj.Path, proj.Language); | ||
68 | foreach(string file in proj.Files) | ||
69 | Console.WriteLine("\t\tFile [ {0} ]", file); | ||
70 | } | ||
71 | } | ||
72 | } | ||
73 | |||
74 | public void Clean() | ||
75 | { | ||
76 | Console.WriteLine("Not implemented"); | ||
77 | } | ||
78 | |||
79 | public string Name | ||
80 | { | ||
81 | get | ||
82 | { | ||
83 | return "debug"; | ||
84 | } | ||
85 | } | ||
86 | |||
87 | public Kernel Kernel | ||
88 | { | ||
89 | get | ||
90 | { | ||
91 | return m_Kernel; | ||
92 | } | ||
93 | set | ||
94 | { | ||
95 | m_Kernel = value; | ||
96 | } | ||
97 | } | ||
98 | |||
99 | #endregion | ||
100 | } | ||
101 | } | ||
102 | #endif | ||
diff --git a/Prebuild/src/Core/Targets/MakefileTarget.cs b/Prebuild/src/Core/Targets/MakefileTarget.cs deleted file mode 100644 index 86676d0..0000000 --- a/Prebuild/src/Core/Targets/MakefileTarget.cs +++ /dev/null | |||
@@ -1,471 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004 Crestez Leonard (cleonard@go.ro) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Collections; | ||
28 | using System.Collections.Specialized; | ||
29 | using System.IO; | ||
30 | using System.Text.RegularExpressions; | ||
31 | |||
32 | using Prebuild.Core.Attributes; | ||
33 | using Prebuild.Core.Interfaces; | ||
34 | using Prebuild.Core.Nodes; | ||
35 | using Prebuild.Core.Utilities; | ||
36 | |||
37 | namespace Prebuild.Core.Targets | ||
38 | { | ||
39 | [Target("makefile")] | ||
40 | public class MakefileTarget : ITarget | ||
41 | { | ||
42 | #region Fields | ||
43 | |||
44 | private Kernel m_Kernel = null; | ||
45 | |||
46 | #endregion | ||
47 | |||
48 | #region Private Methods | ||
49 | |||
50 | // This converts a path relative to the path of a project to | ||
51 | // a path relative to the solution path. | ||
52 | private string NicePath(ProjectNode proj, string path) | ||
53 | { | ||
54 | string res; | ||
55 | SolutionNode solution = (SolutionNode)proj.Parent; | ||
56 | res = Path.Combine(Helper.NormalizePath(proj.FullPath, '/'), Helper.NormalizePath(path, '/')); | ||
57 | res = Helper.NormalizePath(res, '/'); | ||
58 | res = res.Replace("/./", "/"); | ||
59 | while (res.IndexOf("/../") >= 0) | ||
60 | { | ||
61 | int a = res.IndexOf("/../"); | ||
62 | int b = res.LastIndexOf("/", a - 1); | ||
63 | res = res.Remove(b, a - b + 3); | ||
64 | } | ||
65 | res = Helper.MakePathRelativeTo(solution.FullPath, res); | ||
66 | if (res.StartsWith("./")) | ||
67 | res = res.Substring(2, res.Length - 2); | ||
68 | res = Helper.NormalizePath(res, '/'); | ||
69 | return res; | ||
70 | } | ||
71 | |||
72 | private void WriteProjectFiles(StreamWriter f, SolutionNode solution, ProjectNode project) | ||
73 | { | ||
74 | // Write list of source code files | ||
75 | f.WriteLine("SOURCES_{0} = \\", project.Name); | ||
76 | foreach (string file in project.Files) | ||
77 | if (project.Files.GetBuildAction(file) == BuildAction.Compile) | ||
78 | f.WriteLine("\t{0} \\", NicePath(project, file)); | ||
79 | f.WriteLine(); | ||
80 | |||
81 | // Write list of resource files | ||
82 | f.WriteLine("RESOURCES_{0} = \\", project.Name); | ||
83 | foreach (string file in project.Files) | ||
84 | if (project.Files.GetBuildAction(file) == BuildAction.EmbeddedResource) | ||
85 | { | ||
86 | string path = NicePath(project, file); | ||
87 | f.WriteLine("\t-resource:{0},{1} \\", path, Path.GetFileName(path)); | ||
88 | } | ||
89 | f.WriteLine(); | ||
90 | |||
91 | // There's also Content and None in BuildAction. | ||
92 | // What am I supposed to do with that? | ||
93 | } | ||
94 | |||
95 | private string FindFileReference(string refName, ProjectNode project) | ||
96 | { | ||
97 | foreach (ReferencePathNode refPath in project.ReferencePaths) | ||
98 | { | ||
99 | string fullPath = NicePath(project, Helper.MakeFilePath(refPath.Path, refName, "dll")); | ||
100 | if (File.Exists(fullPath)) | ||
101 | return fullPath; | ||
102 | } | ||
103 | return null; | ||
104 | } | ||
105 | |||
106 | private void WriteProjectReferences(StreamWriter f, SolutionNode solution, ProjectNode project) | ||
107 | { | ||
108 | f.WriteLine("REFERENCES_{0} = \\", project.Name); | ||
109 | foreach (ReferenceNode refr in project.References) | ||
110 | { | ||
111 | string path; | ||
112 | // Project references change with configurations. | ||
113 | if (solution.ProjectsTable.Contains(refr.Name)) | ||
114 | continue; | ||
115 | path = FindFileReference(refr.Name, project); | ||
116 | if (path != null) | ||
117 | f.WriteLine("\t-r:{0} \\", path); | ||
118 | else | ||
119 | f.WriteLine("\t-r:{0} \\", refr.Name); | ||
120 | } | ||
121 | f.WriteLine(); | ||
122 | } | ||
123 | |||
124 | private void WriteProjectDependencies(StreamWriter f, SolutionNode solution, ProjectNode project) | ||
125 | { | ||
126 | f.WriteLine("DEPENDENCIES_{0} = \\", project.Name); | ||
127 | f.WriteLine("\t$(SOURCES_{0}) \\", project.Name); | ||
128 | foreach (string file in project.Files) | ||
129 | if (project.Files.GetBuildAction(file) == BuildAction.EmbeddedResource) | ||
130 | f.WriteLine("\t{0} \\", NicePath(project, file)); | ||
131 | f.WriteLine(); | ||
132 | } | ||
133 | |||
134 | private string ProjectTypeToExtension(ProjectType t) | ||
135 | { | ||
136 | if (t == ProjectType.Exe || t == ProjectType.WinExe) | ||
137 | { | ||
138 | return "exe"; | ||
139 | } | ||
140 | else if (t == ProjectType.Library) | ||
141 | { | ||
142 | return "dll"; | ||
143 | } | ||
144 | else | ||
145 | { | ||
146 | throw new FatalException("Bad ProjectType: {0}", t); | ||
147 | } | ||
148 | } | ||
149 | |||
150 | private string ProjectTypeToTarget(ProjectType t) | ||
151 | { | ||
152 | if (t == ProjectType.Exe) | ||
153 | { | ||
154 | return "exe"; | ||
155 | } | ||
156 | else if (t == ProjectType.WinExe) | ||
157 | { | ||
158 | return "winexe"; | ||
159 | } | ||
160 | else if (t == ProjectType.Library) | ||
161 | { | ||
162 | return "library"; | ||
163 | } | ||
164 | else | ||
165 | { | ||
166 | throw new FatalException("Bad ProjectType: {0}", t); | ||
167 | } | ||
168 | } | ||
169 | |||
170 | private string ProjectOutput(ProjectNode project, ConfigurationNode config) | ||
171 | { | ||
172 | string filepath; | ||
173 | filepath = Helper.MakeFilePath((string)config.Options["OutputPath"], | ||
174 | project.AssemblyName, ProjectTypeToExtension(project.Type)); | ||
175 | return NicePath(project, filepath); | ||
176 | } | ||
177 | |||
178 | // Returns true if two configs in one project have the same output. | ||
179 | private bool ProjectClashes(ProjectNode project) | ||
180 | { | ||
181 | foreach (ConfigurationNode conf1 in project.Configurations) | ||
182 | foreach (ConfigurationNode conf2 in project.Configurations) | ||
183 | if (ProjectOutput(project, conf1) == ProjectOutput(project, conf2) && conf1 != conf2) | ||
184 | { | ||
185 | m_Kernel.Log.Write("Warning: Configurations {0} and {1} for project {2} output the same file", | ||
186 | conf1.Name, conf2.Name, project.Name); | ||
187 | m_Kernel.Log.Write("Warning: I'm going to use some timestamps(extra empty files)."); | ||
188 | return true; | ||
189 | } | ||
190 | return false; | ||
191 | } | ||
192 | |||
193 | private void WriteProject(StreamWriter f, SolutionNode solution, ProjectNode project) | ||
194 | { | ||
195 | f.WriteLine("# This is for project {0}", project.Name); | ||
196 | f.WriteLine(); | ||
197 | |||
198 | WriteProjectFiles(f, solution, project); | ||
199 | WriteProjectReferences(f, solution, project); | ||
200 | WriteProjectDependencies(f, solution, project); | ||
201 | |||
202 | bool clash = ProjectClashes(project); | ||
203 | |||
204 | foreach (ConfigurationNode conf in project.Configurations) | ||
205 | { | ||
206 | string outpath = ProjectOutput(project, conf); | ||
207 | string filesToClean = outpath; | ||
208 | |||
209 | if (clash) | ||
210 | { | ||
211 | f.WriteLine("{0}-{1}: .{0}-{1}-timestamp", project.Name, conf.Name); | ||
212 | f.WriteLine(); | ||
213 | f.Write(".{0}-{1}-timestamp: $(DEPENDENCIES_{0})", project.Name, conf.Name); | ||
214 | } | ||
215 | else | ||
216 | { | ||
217 | f.WriteLine("{0}-{1}: {2}", project.Name, conf.Name, outpath); | ||
218 | f.WriteLine(); | ||
219 | f.Write("{2}: $(DEPENDENCIES_{0})", project.Name, conf.Name, outpath); | ||
220 | } | ||
221 | // Dependencies on other projects. | ||
222 | foreach (ReferenceNode refr in project.References) | ||
223 | if (solution.ProjectsTable.Contains(refr.Name)) | ||
224 | { | ||
225 | ProjectNode refProj = (ProjectNode)solution.ProjectsTable[refr.Name]; | ||
226 | if (ProjectClashes(refProj)) | ||
227 | f.Write(" .{0}-{1}-timestamp", refProj.Name, conf.Name); | ||
228 | else | ||
229 | f.Write(" {0}", ProjectOutput(refProj, conf)); | ||
230 | } | ||
231 | f.WriteLine(); | ||
232 | |||
233 | // make directory for output. | ||
234 | if (Path.GetDirectoryName(outpath) != "") | ||
235 | { | ||
236 | f.WriteLine("\tmkdir -p {0}", Path.GetDirectoryName(outpath)); | ||
237 | } | ||
238 | // mcs command line. | ||
239 | f.Write("\tgmcs", project.Name); | ||
240 | f.Write(" -warn:{0}", conf.Options["WarningLevel"]); | ||
241 | if ((bool)conf.Options["DebugInformation"]) | ||
242 | f.Write(" -debug"); | ||
243 | if ((bool)conf.Options["AllowUnsafe"]) | ||
244 | f.Write(" -unsafe"); | ||
245 | if ((bool)conf.Options["CheckUnderflowOverflow"]) | ||
246 | f.Write(" -checked"); | ||
247 | if (project.StartupObject != "") | ||
248 | f.Write(" -main:{0}", project.StartupObject); | ||
249 | if ((string)conf.Options["CompilerDefines"] != "") | ||
250 | { | ||
251 | f.Write(" -define:\"{0}\"", conf.Options["CompilerDefines"]); | ||
252 | } | ||
253 | |||
254 | f.Write(" -target:{0} -out:{1}", ProjectTypeToTarget(project.Type), outpath); | ||
255 | |||
256 | // Build references to other projects. Now that sux. | ||
257 | // We have to reference the other project in the same conf. | ||
258 | foreach (ReferenceNode refr in project.References) | ||
259 | if (solution.ProjectsTable.Contains(refr.Name)) | ||
260 | { | ||
261 | ProjectNode refProj; | ||
262 | refProj = (ProjectNode)solution.ProjectsTable[refr.Name]; | ||
263 | f.Write(" -r:{0}", ProjectOutput(refProj, conf)); | ||
264 | } | ||
265 | |||
266 | f.Write(" $(REFERENCES_{0})", project.Name); | ||
267 | f.Write(" $(RESOURCES_{0})", project.Name); | ||
268 | f.Write(" $(SOURCES_{0})", project.Name); | ||
269 | f.WriteLine(); | ||
270 | |||
271 | // Copy references with localcopy. | ||
272 | foreach (ReferenceNode refr in project.References) | ||
273 | if (refr.LocalCopy) | ||
274 | { | ||
275 | string outPath, srcPath, destPath; | ||
276 | outPath = Helper.NormalizePath((string)conf.Options["OutputPath"]); | ||
277 | if (solution.ProjectsTable.Contains(refr.Name)) | ||
278 | { | ||
279 | ProjectNode refProj; | ||
280 | refProj = (ProjectNode)solution.ProjectsTable[refr.Name]; | ||
281 | srcPath = ProjectOutput(refProj, conf); | ||
282 | destPath = Path.Combine(outPath, Path.GetFileName(srcPath)); | ||
283 | destPath = NicePath(project, destPath); | ||
284 | if (srcPath != destPath) | ||
285 | { | ||
286 | f.WriteLine("\tcp -f {0} {1}", srcPath, destPath); | ||
287 | filesToClean += " " + destPath; | ||
288 | } | ||
289 | continue; | ||
290 | } | ||
291 | srcPath = FindFileReference(refr.Name, project); | ||
292 | if (srcPath != null) | ||
293 | { | ||
294 | destPath = Path.Combine(outPath, Path.GetFileName(srcPath)); | ||
295 | destPath = NicePath(project, destPath); | ||
296 | f.WriteLine("\tcp -f {0} {1}", srcPath, destPath); | ||
297 | filesToClean += " " + destPath; | ||
298 | } | ||
299 | } | ||
300 | |||
301 | if (clash) | ||
302 | { | ||
303 | filesToClean += String.Format(" .{0}-{1}-timestamp", project.Name, conf.Name); | ||
304 | f.WriteLine("\ttouch .{0}-{1}-timestamp", project.Name, conf.Name); | ||
305 | f.Write("\trm -rf"); | ||
306 | foreach (ConfigurationNode otherConf in project.Configurations) | ||
307 | if (otherConf != conf) | ||
308 | f.WriteLine(" .{0}-{1}-timestamp", project.Name, otherConf.Name); | ||
309 | f.WriteLine(); | ||
310 | } | ||
311 | f.WriteLine(); | ||
312 | f.WriteLine("{0}-{1}-clean:", project.Name, conf.Name); | ||
313 | f.WriteLine("\trm -rf {0}", filesToClean); | ||
314 | f.WriteLine(); | ||
315 | } | ||
316 | } | ||
317 | |||
318 | private void WriteIntro(StreamWriter f, SolutionNode solution) | ||
319 | { | ||
320 | f.WriteLine("# Makefile for {0} generated by Prebuild ( http://dnpb.sf.net )", solution.Name); | ||
321 | f.WriteLine("# Do not edit."); | ||
322 | f.WriteLine("#"); | ||
323 | |||
324 | f.Write("# Configurations:"); | ||
325 | foreach (ConfigurationNode conf in solution.Configurations) | ||
326 | f.Write(" {0}", conf.Name); | ||
327 | f.WriteLine(); | ||
328 | |||
329 | f.WriteLine("# Projects:"); | ||
330 | foreach (ProjectNode proj in solution.Projects) | ||
331 | f.WriteLine("#\t{0}", proj.Name); | ||
332 | |||
333 | f.WriteLine("#"); | ||
334 | f.WriteLine("# Building:"); | ||
335 | f.WriteLine("#\t\"make\" to build everything under the default(first) configuration"); | ||
336 | f.WriteLine("#\t\"make CONF\" to build every project under configuration CONF"); | ||
337 | f.WriteLine("#\t\"make PROJ\" to build project PROJ under the default(first) configuration"); | ||
338 | f.WriteLine("#\t\"make PROJ-CONF\" to build project PROJ under configuration CONF"); | ||
339 | f.WriteLine("#"); | ||
340 | f.WriteLine("# Cleaning (removing results of build):"); | ||
341 | f.WriteLine("#\t\"make clean\" to clean everything, that's what you probably want"); | ||
342 | f.WriteLine("#\t\"make CONF\" to clean everything for a configuration"); | ||
343 | f.WriteLine("#\t\"make PROJ\" to clean everything for a project"); | ||
344 | f.WriteLine("#\t\"make PROJ-CONF\" to clea project PROJ under configuration CONF"); | ||
345 | f.WriteLine(); | ||
346 | } | ||
347 | |||
348 | private void WritePhony(StreamWriter f, SolutionNode solution) | ||
349 | { | ||
350 | string defconf = ""; | ||
351 | foreach (ConfigurationNode conf in solution.Configurations) | ||
352 | { | ||
353 | defconf = conf.Name; | ||
354 | break; | ||
355 | } | ||
356 | |||
357 | f.Write(".PHONY: all"); | ||
358 | foreach (ProjectNode proj in solution.Projects) | ||
359 | f.Write(" {0} {0}-clean", proj.Name); | ||
360 | foreach (ConfigurationNode conf in solution.Configurations) | ||
361 | f.Write(" {0} {0}-clean", conf.Name); | ||
362 | foreach (ProjectNode proj in solution.Projects) | ||
363 | foreach (ConfigurationNode conf in solution.Configurations) | ||
364 | f.Write(" {0}-{1} {0}-{1}-clean", proj.Name, conf.Name); | ||
365 | f.WriteLine(); | ||
366 | f.WriteLine(); | ||
367 | |||
368 | f.WriteLine("all: {0}", defconf); | ||
369 | f.WriteLine(); | ||
370 | |||
371 | f.Write("clean:"); | ||
372 | foreach (ConfigurationNode conf in solution.Configurations) | ||
373 | f.Write(" {0}-clean", conf.Name); | ||
374 | f.WriteLine(); | ||
375 | f.WriteLine(); | ||
376 | |||
377 | foreach (ConfigurationNode conf in solution.Configurations) | ||
378 | { | ||
379 | f.Write("{0}: ", conf.Name); | ||
380 | foreach (ProjectNode proj in solution.Projects) | ||
381 | f.Write(" {0}-{1}", proj.Name, conf.Name); | ||
382 | f.WriteLine(); | ||
383 | f.WriteLine(); | ||
384 | |||
385 | f.Write("{0}-clean: ", conf.Name); | ||
386 | foreach (ProjectNode proj in solution.Projects) | ||
387 | f.Write(" {0}-{1}-clean", proj.Name, conf.Name); | ||
388 | f.WriteLine(); | ||
389 | f.WriteLine(); | ||
390 | } | ||
391 | |||
392 | foreach (ProjectNode proj in solution.Projects) | ||
393 | { | ||
394 | f.WriteLine("{0}: {0}-{1}", proj.Name, defconf); | ||
395 | f.WriteLine(); | ||
396 | |||
397 | f.Write("{0}-clean:", proj.Name); | ||
398 | foreach (ConfigurationNode conf in proj.Configurations) | ||
399 | f.Write(" {0}-{1}-clean", proj.Name, conf.Name); | ||
400 | f.WriteLine(); | ||
401 | f.WriteLine(); | ||
402 | } | ||
403 | } | ||
404 | |||
405 | private void WriteSolution(SolutionNode solution) | ||
406 | { | ||
407 | m_Kernel.Log.Write("Creating makefile for {0}", solution.Name); | ||
408 | m_Kernel.CurrentWorkingDirectory.Push(); | ||
409 | |||
410 | string file = "Makefile";// Helper.MakeFilePath(solution.FullPath, solution.Name, "make"); | ||
411 | StreamWriter f = new StreamWriter(file); | ||
412 | |||
413 | Helper.SetCurrentDir(Path.GetDirectoryName(file)); | ||
414 | |||
415 | using (f) | ||
416 | { | ||
417 | WriteIntro(f, solution); | ||
418 | WritePhony(f, solution); | ||
419 | |||
420 | foreach (ProjectNode project in solution.Projects) | ||
421 | { | ||
422 | m_Kernel.Log.Write("...Creating Project: {0}", project.Name); | ||
423 | WriteProject(f, solution, project); | ||
424 | } | ||
425 | } | ||
426 | |||
427 | m_Kernel.Log.Write(""); | ||
428 | m_Kernel.CurrentWorkingDirectory.Pop(); | ||
429 | } | ||
430 | |||
431 | private void CleanSolution(SolutionNode solution) | ||
432 | { | ||
433 | m_Kernel.Log.Write("Cleaning makefile for {0}", solution.Name); | ||
434 | |||
435 | string file = Helper.MakeFilePath(solution.FullPath, solution.Name, "make"); | ||
436 | Helper.DeleteIfExists(file); | ||
437 | |||
438 | m_Kernel.Log.Write(""); | ||
439 | } | ||
440 | |||
441 | #endregion | ||
442 | |||
443 | #region ITarget Members | ||
444 | |||
445 | public void Write(Kernel kern) | ||
446 | { | ||
447 | m_Kernel = kern; | ||
448 | foreach (SolutionNode solution in kern.Solutions) | ||
449 | WriteSolution(solution); | ||
450 | m_Kernel = null; | ||
451 | } | ||
452 | |||
453 | public virtual void Clean(Kernel kern) | ||
454 | { | ||
455 | m_Kernel = kern; | ||
456 | foreach (SolutionNode sol in kern.Solutions) | ||
457 | CleanSolution(sol); | ||
458 | m_Kernel = null; | ||
459 | } | ||
460 | |||
461 | public string Name | ||
462 | { | ||
463 | get | ||
464 | { | ||
465 | return "makefile"; | ||
466 | } | ||
467 | } | ||
468 | |||
469 | #endregion | ||
470 | } | ||
471 | } | ||
diff --git a/Prebuild/src/Core/Targets/MonoDevelopTarget.cs b/Prebuild/src/Core/Targets/MonoDevelopTarget.cs deleted file mode 100644 index c8401fd..0000000 --- a/Prebuild/src/Core/Targets/MonoDevelopTarget.cs +++ /dev/null | |||
@@ -1,464 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Collections; | ||
28 | using System.Collections.Specialized; | ||
29 | using System.IO; | ||
30 | using System.Reflection; | ||
31 | using System.Text.RegularExpressions; | ||
32 | |||
33 | using Prebuild.Core.Attributes; | ||
34 | using Prebuild.Core.Interfaces; | ||
35 | using Prebuild.Core.Nodes; | ||
36 | using Prebuild.Core.Utilities; | ||
37 | |||
38 | namespace Prebuild.Core.Targets | ||
39 | { | ||
40 | /// <summary> | ||
41 | /// | ||
42 | /// </summary> | ||
43 | [Target("monodev")] | ||
44 | public class MonoDevelopTarget : ITarget | ||
45 | { | ||
46 | #region Fields | ||
47 | |||
48 | private Kernel m_Kernel; | ||
49 | |||
50 | #endregion | ||
51 | |||
52 | #region Private Methods | ||
53 | |||
54 | private static string PrependPath(string path) | ||
55 | { | ||
56 | string tmpPath = Helper.NormalizePath(path, '/'); | ||
57 | Regex regex = new Regex(@"(\w):/(\w+)"); | ||
58 | Match match = regex.Match(tmpPath); | ||
59 | if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/') | ||
60 | { | ||
61 | tmpPath = Helper.NormalizePath(tmpPath); | ||
62 | } | ||
63 | else | ||
64 | { | ||
65 | tmpPath = Helper.NormalizePath("./" + tmpPath); | ||
66 | } | ||
67 | |||
68 | return tmpPath; | ||
69 | } | ||
70 | |||
71 | private static string BuildReference(SolutionNode solution, ReferenceNode refr) | ||
72 | { | ||
73 | string ret = "<ProjectReference type=\""; | ||
74 | if(solution.ProjectsTable.ContainsKey(refr.Name)) | ||
75 | { | ||
76 | ret += "Project\""; | ||
77 | ret += " localcopy=\"" + refr.LocalCopy.ToString() + "\" refto=\"" + refr.Name + "\" />"; | ||
78 | } | ||
79 | else | ||
80 | { | ||
81 | ProjectNode project = (ProjectNode)refr.Parent; | ||
82 | string fileRef = FindFileReference(refr.Name, project); | ||
83 | |||
84 | if(refr.Path != null || fileRef != null) | ||
85 | { | ||
86 | ret += "Assembly\" refto=\""; | ||
87 | |||
88 | string finalPath = (refr.Path != null) ? Helper.MakeFilePath(refr.Path, refr.Name, "dll") : fileRef; | ||
89 | |||
90 | ret += finalPath; | ||
91 | ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />"; | ||
92 | return ret; | ||
93 | } | ||
94 | |||
95 | ret += "Gac\""; | ||
96 | ret += " localcopy=\"" + refr.LocalCopy.ToString() + "\""; | ||
97 | ret += " refto=\""; | ||
98 | try | ||
99 | { | ||
100 | /* | ||
101 | Day changed to 28 Mar 2007 | ||
102 | ... | ||
103 | 08:09 < cj> is there anything that replaces Assembly.LoadFromPartialName() ? | ||
104 | 08:09 < jonp> no | ||
105 | 08:10 < jonp> in their infinite wisdom [sic], microsoft decided that the | ||
106 | ability to load any assembly version by-name was an inherently | ||
107 | bad idea | ||
108 | 08:11 < cj> I'm thinking of a bunch of four-letter words right now... | ||
109 | 08:11 < cj> security through making it difficult for the developer!!! | ||
110 | 08:12 < jonp> just use the Obsolete API | ||
111 | 08:12 < jonp> it should still work | ||
112 | 08:12 < cj> alrighty. | ||
113 | 08:12 < jonp> you just get warnings when using it | ||
114 | */ | ||
115 | Assembly assem = Assembly.LoadWithPartialName(refr.Name); | ||
116 | ret += assem.FullName; | ||
117 | //ret += refr.Name; | ||
118 | } | ||
119 | catch (System.NullReferenceException e) | ||
120 | { | ||
121 | e.ToString(); | ||
122 | ret += refr.Name; | ||
123 | } | ||
124 | ret += "\" />"; | ||
125 | } | ||
126 | |||
127 | return ret; | ||
128 | } | ||
129 | |||
130 | private static string FindFileReference(string refName, ProjectNode project) | ||
131 | { | ||
132 | foreach(ReferencePathNode refPath in project.ReferencePaths) | ||
133 | { | ||
134 | string fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll"); | ||
135 | |||
136 | if(File.Exists(fullPath)) | ||
137 | { | ||
138 | return fullPath; | ||
139 | } | ||
140 | } | ||
141 | |||
142 | return null; | ||
143 | } | ||
144 | |||
145 | /// <summary> | ||
146 | /// Gets the XML doc file. | ||
147 | /// </summary> | ||
148 | /// <param name="project">The project.</param> | ||
149 | /// <param name="conf">The conf.</param> | ||
150 | /// <returns></returns> | ||
151 | public static string GenerateXmlDocFile(ProjectNode project, ConfigurationNode conf) | ||
152 | { | ||
153 | if( conf == null ) | ||
154 | { | ||
155 | throw new ArgumentNullException("conf"); | ||
156 | } | ||
157 | if( project == null ) | ||
158 | { | ||
159 | throw new ArgumentNullException("project"); | ||
160 | } | ||
161 | string docFile = (string)conf.Options["XmlDocFile"]; | ||
162 | if(docFile != null && docFile.Length == 0)//default to assembly name if not specified | ||
163 | { | ||
164 | return "False"; | ||
165 | } | ||
166 | return "True"; | ||
167 | } | ||
168 | |||
169 | private void WriteProject(SolutionNode solution, ProjectNode project) | ||
170 | { | ||
171 | string csComp = "Mcs"; | ||
172 | string netRuntime = "Mono"; | ||
173 | if(project.Runtime == ClrRuntime.Microsoft) | ||
174 | { | ||
175 | csComp = "Csc"; | ||
176 | netRuntime = "MsNet"; | ||
177 | } | ||
178 | |||
179 | string projFile = Helper.MakeFilePath(project.FullPath, project.Name, "mdp"); | ||
180 | StreamWriter ss = new StreamWriter(projFile); | ||
181 | |||
182 | m_Kernel.CurrentWorkingDirectory.Push(); | ||
183 | Helper.SetCurrentDir(Path.GetDirectoryName(projFile)); | ||
184 | |||
185 | using(ss) | ||
186 | { | ||
187 | ss.WriteLine( | ||
188 | "<Project name=\"{0}\" description=\"\" standardNamespace=\"{1}\" newfilesearch=\"None\" enableviewstate=\"True\" fileversion=\"2.0\" language=\"C#\" clr-version=\"Net_2_0\" ctype=\"DotNetProject\">", | ||
189 | project.Name, | ||
190 | project.RootNamespace | ||
191 | ); | ||
192 | |||
193 | int count = 0; | ||
194 | |||
195 | ss.WriteLine(" <Configurations active=\"{0}\">", solution.ActiveConfig); | ||
196 | |||
197 | foreach(ConfigurationNode conf in project.Configurations) | ||
198 | { | ||
199 | ss.WriteLine(" <Configuration name=\"{0}\" ctype=\"DotNetProjectConfiguration\">", conf.Name); | ||
200 | ss.Write(" <Output"); | ||
201 | ss.Write(" directory=\"{0}\"", Helper.EndPath(Helper.NormalizePath(".\\" + conf.Options["OutputPath"].ToString()))); | ||
202 | ss.Write(" assembly=\"{0}\"", project.AssemblyName); | ||
203 | ss.Write(" executeScript=\"{0}\"", conf.Options["RunScript"]); | ||
204 | //ss.Write(" executeBeforeBuild=\"{0}\"", conf.Options["PreBuildEvent"]); | ||
205 | //ss.Write(" executeAfterBuild=\"{0}\"", conf.Options["PostBuildEvent"]); | ||
206 | if (conf.Options["PreBuildEvent"] != null && conf.Options["PreBuildEvent"].ToString().Length != 0) | ||
207 | { | ||
208 | ss.Write(" executeBeforeBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PreBuildEvent"].ToString())); | ||
209 | } | ||
210 | else | ||
211 | { | ||
212 | ss.Write(" executeBeforeBuild=\"{0}\"", conf.Options["PreBuildEvent"]); | ||
213 | } | ||
214 | if (conf.Options["PostBuildEvent"] != null && conf.Options["PostBuildEvent"].ToString().Length != 0) | ||
215 | { | ||
216 | ss.Write(" executeAfterBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PostBuildEvent"].ToString())); | ||
217 | } | ||
218 | else | ||
219 | { | ||
220 | ss.Write(" executeAfterBuild=\"{0}\"", conf.Options["PostBuildEvent"]); | ||
221 | } | ||
222 | ss.Write(" executeBeforeBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]); | ||
223 | ss.Write(" executeAfterBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]); | ||
224 | ss.WriteLine(" />"); | ||
225 | |||
226 | ss.Write(" <Build"); | ||
227 | ss.Write(" debugmode=\"True\""); | ||
228 | if (project.Type == ProjectType.WinExe) | ||
229 | { | ||
230 | ss.Write(" target=\"{0}\"", ProjectType.Exe.ToString()); | ||
231 | } | ||
232 | else | ||
233 | { | ||
234 | ss.Write(" target=\"{0}\"", project.Type); | ||
235 | } | ||
236 | ss.WriteLine(" />"); | ||
237 | |||
238 | ss.Write(" <Execution"); | ||
239 | ss.Write(" runwithwarnings=\"{0}\"", !conf.Options.WarningsAsErrors); | ||
240 | ss.Write(" consolepause=\"True\""); | ||
241 | ss.Write(" runtime=\"{0}\"", netRuntime); | ||
242 | ss.Write(" clr-version=\"Net_2_0\""); | ||
243 | ss.WriteLine(" />"); | ||
244 | |||
245 | ss.Write(" <CodeGeneration"); | ||
246 | ss.Write(" compiler=\"{0}\"", csComp); | ||
247 | ss.Write(" warninglevel=\"{0}\"", conf.Options["WarningLevel"]); | ||
248 | ss.Write(" nowarn=\"{0}\"", conf.Options["SuppressWarnings"]); | ||
249 | ss.Write(" includedebuginformation=\"{0}\"", conf.Options["DebugInformation"]); | ||
250 | ss.Write(" optimize=\"{0}\"", conf.Options["OptimizeCode"]); | ||
251 | ss.Write(" unsafecodeallowed=\"{0}\"", conf.Options["AllowUnsafe"]); | ||
252 | ss.Write(" generateoverflowchecks=\"{0}\"", conf.Options["CheckUnderflowOverflow"]); | ||
253 | ss.Write(" mainclass=\"{0}\"", project.StartupObject); | ||
254 | ss.Write(" target=\"{0}\"", project.Type); | ||
255 | ss.Write(" definesymbols=\"{0}\"", conf.Options["CompilerDefines"]); | ||
256 | ss.Write(" generatexmldocumentation=\"{0}\"", GenerateXmlDocFile(project, conf)); | ||
257 | ss.Write(" win32Icon=\"{0}\"", project.AppIcon); | ||
258 | ss.Write(" ctype=\"CSharpCompilerParameters\""); | ||
259 | ss.WriteLine(" />"); | ||
260 | ss.WriteLine(" </Configuration>"); | ||
261 | |||
262 | count++; | ||
263 | } | ||
264 | ss.WriteLine(" </Configurations>"); | ||
265 | |||
266 | ss.Write(" <DeploymentInformation"); | ||
267 | ss.Write(" target=\"\""); | ||
268 | ss.Write(" script=\"\""); | ||
269 | ss.Write(" strategy=\"File\""); | ||
270 | ss.WriteLine(">"); | ||
271 | ss.WriteLine(" <excludeFiles />"); | ||
272 | ss.WriteLine(" </DeploymentInformation>"); | ||
273 | |||
274 | ss.WriteLine(" <Contents>"); | ||
275 | foreach(string file in project.Files) | ||
276 | { | ||
277 | string buildAction = "Compile"; | ||
278 | switch(project.Files.GetBuildAction(file)) | ||
279 | { | ||
280 | case BuildAction.None: | ||
281 | buildAction = "Nothing"; | ||
282 | break; | ||
283 | |||
284 | case BuildAction.Content: | ||
285 | buildAction = "Exclude"; | ||
286 | break; | ||
287 | |||
288 | case BuildAction.EmbeddedResource: | ||
289 | buildAction = "EmbedAsResource"; | ||
290 | break; | ||
291 | |||
292 | default: | ||
293 | buildAction = "Compile"; | ||
294 | break; | ||
295 | } | ||
296 | |||
297 | // Sort of a hack, we try and resolve the path and make it relative, if we can. | ||
298 | string filePath = PrependPath(file); | ||
299 | ss.WriteLine(" <File name=\"{0}\" subtype=\"Code\" buildaction=\"{1}\" dependson=\"\" data=\"\" />", filePath, buildAction); | ||
300 | } | ||
301 | ss.WriteLine(" </Contents>"); | ||
302 | |||
303 | ss.WriteLine(" <References>"); | ||
304 | foreach(ReferenceNode refr in project.References) | ||
305 | { | ||
306 | ss.WriteLine(" {0}", BuildReference(solution, refr)); | ||
307 | } | ||
308 | ss.WriteLine(" </References>"); | ||
309 | |||
310 | |||
311 | ss.WriteLine("</Project>"); | ||
312 | } | ||
313 | |||
314 | m_Kernel.CurrentWorkingDirectory.Pop(); | ||
315 | } | ||
316 | |||
317 | private void WriteCombine(SolutionNode solution) | ||
318 | { | ||
319 | m_Kernel.Log.Write("Creating MonoDevelop combine and project files"); | ||
320 | foreach(ProjectNode project in solution.Projects) | ||
321 | { | ||
322 | if(m_Kernel.AllowProject(project.FilterGroups)) | ||
323 | { | ||
324 | m_Kernel.Log.Write("...Creating project: {0}", project.Name); | ||
325 | WriteProject(solution, project); | ||
326 | } | ||
327 | } | ||
328 | |||
329 | m_Kernel.Log.Write(""); | ||
330 | string combFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "mds"); | ||
331 | StreamWriter ss = new StreamWriter(combFile); | ||
332 | |||
333 | m_Kernel.CurrentWorkingDirectory.Push(); | ||
334 | Helper.SetCurrentDir(Path.GetDirectoryName(combFile)); | ||
335 | |||
336 | int count = 0; | ||
337 | |||
338 | using(ss) | ||
339 | { | ||
340 | ss.WriteLine("<Combine name=\"{0}\" fileversion=\"2.0\" description=\"\">", solution.Name); | ||
341 | |||
342 | count = 0; | ||
343 | foreach(ConfigurationNode conf in solution.Configurations) | ||
344 | { | ||
345 | if(count == 0) | ||
346 | { | ||
347 | ss.WriteLine(" <Configurations active=\"{0}\">", conf.Name); | ||
348 | } | ||
349 | |||
350 | ss.WriteLine(" <Configuration name=\"{0}\" ctype=\"CombineConfiguration\">", conf.Name); | ||
351 | foreach(ProjectNode project in solution.Projects) | ||
352 | { | ||
353 | ss.WriteLine(" <Entry configuration=\"{1}\" build=\"True\" name=\"{0}\" />", project.Name, conf.Name); | ||
354 | } | ||
355 | ss.WriteLine(" </Configuration>"); | ||
356 | |||
357 | count++; | ||
358 | } | ||
359 | ss.WriteLine(" </Configurations>"); | ||
360 | |||
361 | count = 0; | ||
362 | |||
363 | foreach(ProjectNode project in solution.Projects) | ||
364 | { | ||
365 | if(count == 0) | ||
366 | ss.WriteLine(" <StartMode startupentry=\"{0}\" single=\"True\">", project.Name); | ||
367 | |||
368 | ss.WriteLine(" <Execute type=\"None\" entry=\"{0}\" />", project.Name); | ||
369 | count++; | ||
370 | } | ||
371 | ss.WriteLine(" </StartMode>"); | ||
372 | |||
373 | ss.WriteLine(" <Entries>"); | ||
374 | foreach(ProjectNode project in solution.Projects) | ||
375 | { | ||
376 | string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); | ||
377 | ss.WriteLine(" <Entry filename=\"{0}\" />", | ||
378 | Helper.MakeFilePath(path, project.Name, "mdp")); | ||
379 | } | ||
380 | ss.WriteLine(" </Entries>"); | ||
381 | |||
382 | ss.WriteLine("</Combine>"); | ||
383 | } | ||
384 | |||
385 | m_Kernel.CurrentWorkingDirectory.Pop(); | ||
386 | } | ||
387 | |||
388 | private void CleanProject(ProjectNode project) | ||
389 | { | ||
390 | m_Kernel.Log.Write("...Cleaning project: {0}", project.Name); | ||
391 | string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, "mdp"); | ||
392 | Helper.DeleteIfExists(projectFile); | ||
393 | } | ||
394 | |||
395 | private void CleanSolution(SolutionNode solution) | ||
396 | { | ||
397 | m_Kernel.Log.Write("Cleaning MonoDevelop combine and project files for", solution.Name); | ||
398 | |||
399 | string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "mds"); | ||
400 | Helper.DeleteIfExists(slnFile); | ||
401 | |||
402 | foreach(ProjectNode project in solution.Projects) | ||
403 | { | ||
404 | CleanProject(project); | ||
405 | } | ||
406 | |||
407 | m_Kernel.Log.Write(""); | ||
408 | } | ||
409 | |||
410 | #endregion | ||
411 | |||
412 | #region ITarget Members | ||
413 | |||
414 | /// <summary> | ||
415 | /// Writes the specified kern. | ||
416 | /// </summary> | ||
417 | /// <param name="kern">The kern.</param> | ||
418 | public void Write(Kernel kern) | ||
419 | { | ||
420 | if( kern == null ) | ||
421 | { | ||
422 | throw new ArgumentNullException("kern"); | ||
423 | } | ||
424 | m_Kernel = kern; | ||
425 | foreach(SolutionNode solution in kern.Solutions) | ||
426 | { | ||
427 | WriteCombine(solution); | ||
428 | } | ||
429 | m_Kernel = null; | ||
430 | } | ||
431 | |||
432 | /// <summary> | ||
433 | /// Cleans the specified kern. | ||
434 | /// </summary> | ||
435 | /// <param name="kern">The kern.</param> | ||
436 | public virtual void Clean(Kernel kern) | ||
437 | { | ||
438 | if( kern == null ) | ||
439 | { | ||
440 | throw new ArgumentNullException("kern"); | ||
441 | } | ||
442 | m_Kernel = kern; | ||
443 | foreach(SolutionNode sol in kern.Solutions) | ||
444 | { | ||
445 | CleanSolution(sol); | ||
446 | } | ||
447 | m_Kernel = null; | ||
448 | } | ||
449 | |||
450 | /// <summary> | ||
451 | /// Gets the name. | ||
452 | /// </summary> | ||
453 | /// <value>The name.</value> | ||
454 | public string Name | ||
455 | { | ||
456 | get | ||
457 | { | ||
458 | return "sharpdev"; | ||
459 | } | ||
460 | } | ||
461 | |||
462 | #endregion | ||
463 | } | ||
464 | } | ||
diff --git a/Prebuild/src/Core/Targets/NAntTarget.cs b/Prebuild/src/Core/Targets/NAntTarget.cs deleted file mode 100644 index 9a6ee17..0000000 --- a/Prebuild/src/Core/Targets/NAntTarget.cs +++ /dev/null | |||
@@ -1,738 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004 - 2008 | ||
4 | Matthew Holmes (matthew@wildfiregames.com), | ||
5 | Dan Moorehead (dan05a@gmail.com), | ||
6 | C.J. Adams-Collier (cjac@colliertech.org), | ||
7 | |||
8 | Redistribution and use in source and binary forms, with or without | ||
9 | modification, are permitted provided that the following conditions are | ||
10 | met: | ||
11 | |||
12 | * Redistributions of source code must retain the above copyright | ||
13 | notice, this list of conditions and the following disclaimer. | ||
14 | |||
15 | * Redistributions in binary form must reproduce the above copyright | ||
16 | notice, this list of conditions and the following disclaimer in the | ||
17 | documentation and/or other materials provided with the distribution. | ||
18 | |||
19 | * The name of the author may not be used to endorse or promote | ||
20 | products derived from this software without specific prior written | ||
21 | permission. | ||
22 | |||
23 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | ||
24 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
25 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
26 | DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, | ||
27 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
28 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
29 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
30 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
31 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
32 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
33 | POSSIBILITY OF SUCH DAMAGE. | ||
34 | */ | ||
35 | |||
36 | #endregion | ||
37 | |||
38 | using System; | ||
39 | using System.Collections; | ||
40 | using System.Collections.Specialized; | ||
41 | using System.IO; | ||
42 | using System.Reflection; | ||
43 | using System.Text.RegularExpressions; | ||
44 | |||
45 | using Prebuild.Core.Attributes; | ||
46 | using Prebuild.Core.Interfaces; | ||
47 | using Prebuild.Core.Nodes; | ||
48 | using Prebuild.Core.Utilities; | ||
49 | |||
50 | namespace Prebuild.Core.Targets | ||
51 | { | ||
52 | /// <summary> | ||
53 | /// | ||
54 | /// </summary> | ||
55 | [Target("nant")] | ||
56 | public class NAntTarget : ITarget | ||
57 | { | ||
58 | #region Fields | ||
59 | |||
60 | private Kernel m_Kernel; | ||
61 | |||
62 | #endregion | ||
63 | |||
64 | #region Private Methods | ||
65 | |||
66 | private static string PrependPath(string path) | ||
67 | { | ||
68 | string tmpPath = Helper.NormalizePath(path, '/'); | ||
69 | Regex regex = new Regex(@"(\w):/(\w+)"); | ||
70 | Match match = regex.Match(tmpPath); | ||
71 | //if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/') | ||
72 | //{ | ||
73 | tmpPath = Helper.NormalizePath(tmpPath); | ||
74 | //} | ||
75 | // else | ||
76 | // { | ||
77 | // tmpPath = Helper.NormalizePath("./" + tmpPath); | ||
78 | // } | ||
79 | |||
80 | return tmpPath; | ||
81 | } | ||
82 | |||
83 | private static string BuildReference(SolutionNode solution, ProjectNode currentProject, ReferenceNode refr) | ||
84 | { | ||
85 | |||
86 | if (!String.IsNullOrEmpty(refr.Path)) | ||
87 | { | ||
88 | return refr.Path; | ||
89 | } | ||
90 | |||
91 | if (solution.ProjectsTable.ContainsKey(refr.Name)) | ||
92 | { | ||
93 | ProjectNode projectRef = (ProjectNode) solution.ProjectsTable[refr.Name]; | ||
94 | string finalPath = | ||
95 | Helper.NormalizePath(refr.Name + GetProjectExtension(projectRef), '/'); | ||
96 | return finalPath; | ||
97 | } | ||
98 | |||
99 | ProjectNode project = (ProjectNode) refr.Parent; | ||
100 | |||
101 | // Do we have an explicit file reference? | ||
102 | string fileRef = FindFileReference(refr.Name, project); | ||
103 | if (fileRef != null) | ||
104 | { | ||
105 | return fileRef; | ||
106 | } | ||
107 | |||
108 | // Is there an explicit path in the project ref? | ||
109 | if (refr.Path != null) | ||
110 | { | ||
111 | return Helper.NormalizePath(refr.Path + "/" + refr.Name + GetProjectExtension(project), '/'); | ||
112 | } | ||
113 | |||
114 | // No, it's an extensionless GAC ref, but nant needs the .dll extension anyway | ||
115 | return refr.Name + ".dll"; | ||
116 | } | ||
117 | |||
118 | public static string GetRefFileName(string refName) | ||
119 | { | ||
120 | if (ExtensionSpecified(refName)) | ||
121 | { | ||
122 | return refName; | ||
123 | } | ||
124 | else | ||
125 | { | ||
126 | return refName + ".dll"; | ||
127 | } | ||
128 | } | ||
129 | |||
130 | private static bool ExtensionSpecified(string refName) | ||
131 | { | ||
132 | return refName.EndsWith(".dll") || refName.EndsWith(".exe"); | ||
133 | } | ||
134 | |||
135 | private static string GetProjectExtension(ProjectNode project) | ||
136 | { | ||
137 | string extension = ".dll"; | ||
138 | if (project.Type == ProjectType.Exe || project.Type == ProjectType.WinExe) | ||
139 | { | ||
140 | extension = ".exe"; | ||
141 | } | ||
142 | return extension; | ||
143 | } | ||
144 | |||
145 | private static string FindFileReference(string refName, ProjectNode project) | ||
146 | { | ||
147 | foreach (ReferencePathNode refPath in project.ReferencePaths) | ||
148 | { | ||
149 | string fullPath = Helper.MakeFilePath(refPath.Path, refName); | ||
150 | |||
151 | if (File.Exists(fullPath)) | ||
152 | { | ||
153 | return fullPath; | ||
154 | } | ||
155 | |||
156 | fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll"); | ||
157 | |||
158 | if (File.Exists(fullPath)) | ||
159 | { | ||
160 | return fullPath; | ||
161 | } | ||
162 | |||
163 | fullPath = Helper.MakeFilePath(refPath.Path, refName, "exe"); | ||
164 | |||
165 | if (File.Exists(fullPath)) | ||
166 | { | ||
167 | return fullPath; | ||
168 | } | ||
169 | } | ||
170 | |||
171 | return null; | ||
172 | } | ||
173 | |||
174 | /// <summary> | ||
175 | /// Gets the XML doc file. | ||
176 | /// </summary> | ||
177 | /// <param name="project">The project.</param> | ||
178 | /// <param name="conf">The conf.</param> | ||
179 | /// <returns></returns> | ||
180 | public static string GetXmlDocFile(ProjectNode project, ConfigurationNode conf) | ||
181 | { | ||
182 | if (conf == null) | ||
183 | { | ||
184 | throw new ArgumentNullException("conf"); | ||
185 | } | ||
186 | if (project == null) | ||
187 | { | ||
188 | throw new ArgumentNullException("project"); | ||
189 | } | ||
190 | string docFile = (string)conf.Options["XmlDocFile"]; | ||
191 | // if(docFile != null && docFile.Length == 0)//default to assembly name if not specified | ||
192 | // { | ||
193 | // return Path.GetFileNameWithoutExtension(project.AssemblyName) + ".xml"; | ||
194 | // } | ||
195 | return docFile; | ||
196 | } | ||
197 | |||
198 | private void WriteProject(SolutionNode solution, ProjectNode project) | ||
199 | { | ||
200 | string projFile = Helper.MakeFilePath(project.FullPath, project.Name + GetProjectExtension(project), "build"); | ||
201 | StreamWriter ss = new StreamWriter(projFile); | ||
202 | |||
203 | m_Kernel.CurrentWorkingDirectory.Push(); | ||
204 | Helper.SetCurrentDir(Path.GetDirectoryName(projFile)); | ||
205 | bool hasDoc = false; | ||
206 | |||
207 | using (ss) | ||
208 | { | ||
209 | ss.WriteLine("<?xml version=\"1.0\" ?>"); | ||
210 | ss.WriteLine("<project name=\"{0}\" default=\"build\">", project.Name); | ||
211 | ss.WriteLine(" <target name=\"{0}\">", "build"); | ||
212 | ss.WriteLine(" <echo message=\"Build Directory is ${project::get-base-directory()}/${build.dir}\" />"); | ||
213 | ss.WriteLine(" <mkdir dir=\"${project::get-base-directory()}/${build.dir}\" />"); | ||
214 | ss.WriteLine(" <copy todir=\"${project::get-base-directory()}/${build.dir}\" flatten=\"true\">"); | ||
215 | ss.WriteLine(" <fileset basedir=\"${project::get-base-directory()}\">"); | ||
216 | foreach (ReferenceNode refr in project.References) | ||
217 | { | ||
218 | if (refr.LocalCopy) | ||
219 | { | ||
220 | ss.WriteLine(" <include name=\"{0}", Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReference(solution, project, refr)) + "\" />", '/')); | ||
221 | } | ||
222 | } | ||
223 | |||
224 | ss.WriteLine(" </fileset>"); | ||
225 | ss.WriteLine(" </copy>"); | ||
226 | if (project.ConfigFile != null && project.ConfigFile.Length!=0) | ||
227 | { | ||
228 | ss.Write(" <copy file=\"" + project.ConfigFile + "\" tofile=\"${project::get-base-directory()}/${build.dir}/${project::get-name()}"); | ||
229 | |||
230 | if (project.Type == ProjectType.Library) | ||
231 | { | ||
232 | ss.Write(".dll.config\""); | ||
233 | } | ||
234 | else | ||
235 | { | ||
236 | ss.Write(".exe.config\""); | ||
237 | } | ||
238 | ss.WriteLine(" />"); | ||
239 | } | ||
240 | |||
241 | // Add the content files to just be copied | ||
242 | ss.WriteLine(" {0}", "<copy todir=\"${project::get-base-directory()}/${build.dir}\">"); | ||
243 | ss.WriteLine(" {0}", "<fileset basedir=\".\">"); | ||
244 | |||
245 | foreach (string file in project.Files) | ||
246 | { | ||
247 | // Ignore if we aren't content | ||
248 | if (project.Files.GetBuildAction(file) != BuildAction.Content) | ||
249 | continue; | ||
250 | |||
251 | // Create a include tag | ||
252 | ss.WriteLine(" {0}", "<include name=\"" + Helper.NormalizePath(PrependPath(file), '/') + "\" />"); | ||
253 | } | ||
254 | |||
255 | ss.WriteLine(" {0}", "</fileset>"); | ||
256 | ss.WriteLine(" {0}", "</copy>"); | ||
257 | |||
258 | ss.Write(" <csc"); | ||
259 | ss.Write(" target=\"{0}\"", project.Type.ToString().ToLower()); | ||
260 | ss.Write(" debug=\"{0}\"", "${build.debug}"); | ||
261 | foreach (ConfigurationNode conf in project.Configurations) | ||
262 | { | ||
263 | if (conf.Options.KeyFile != "") | ||
264 | { | ||
265 | ss.Write(" keyfile=\"{0}\"", conf.Options.KeyFile); | ||
266 | break; | ||
267 | } | ||
268 | } | ||
269 | foreach (ConfigurationNode conf in project.Configurations) | ||
270 | { | ||
271 | ss.Write(" unsafe=\"{0}\"", conf.Options.AllowUnsafe); | ||
272 | break; | ||
273 | } | ||
274 | foreach (ConfigurationNode conf in project.Configurations) | ||
275 | { | ||
276 | ss.Write(" warnaserror=\"{0}\"", conf.Options.WarningsAsErrors); | ||
277 | break; | ||
278 | } | ||
279 | foreach (ConfigurationNode conf in project.Configurations) | ||
280 | { | ||
281 | ss.Write(" define=\"{0}\"", conf.Options.CompilerDefines); | ||
282 | break; | ||
283 | } | ||
284 | foreach (ConfigurationNode conf in project.Configurations) | ||
285 | { | ||
286 | ss.Write(" nostdlib=\"{0}\"", conf.Options["NoStdLib"]); | ||
287 | break; | ||
288 | } | ||
289 | |||
290 | ss.Write(" main=\"{0}\"", project.StartupObject); | ||
291 | |||
292 | foreach (ConfigurationNode conf in project.Configurations) | ||
293 | { | ||
294 | if (GetXmlDocFile(project, conf) != "") | ||
295 | { | ||
296 | ss.Write(" doc=\"{0}\"", "${project::get-base-directory()}/${build.dir}/" + GetXmlDocFile(project, conf)); | ||
297 | hasDoc = true; | ||
298 | } | ||
299 | break; | ||
300 | } | ||
301 | ss.Write(" output=\"{0}", "${project::get-base-directory()}/${build.dir}/${project::get-name()}"); | ||
302 | if (project.Type == ProjectType.Library) | ||
303 | { | ||
304 | ss.Write(".dll\""); | ||
305 | } | ||
306 | else | ||
307 | { | ||
308 | ss.Write(".exe\""); | ||
309 | } | ||
310 | if (project.AppIcon != null && project.AppIcon.Length != 0) | ||
311 | { | ||
312 | ss.Write(" win32icon=\"{0}\"", Helper.NormalizePath(project.AppIcon, '/')); | ||
313 | } | ||
314 | ss.WriteLine(">"); | ||
315 | ss.WriteLine(" <resources prefix=\"{0}\" dynamicprefix=\"true\" >", project.RootNamespace); | ||
316 | foreach (string file in project.Files) | ||
317 | { | ||
318 | switch (project.Files.GetBuildAction(file)) | ||
319 | { | ||
320 | case BuildAction.EmbeddedResource: | ||
321 | ss.WriteLine(" {0}", "<include name=\"" + Helper.NormalizePath(PrependPath(file), '/') + "\" />"); | ||
322 | break; | ||
323 | default: | ||
324 | if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings) | ||
325 | { | ||
326 | ss.WriteLine(" <include name=\"{0}\" />", file.Substring(0, file.LastIndexOf('.')) + ".resx"); | ||
327 | } | ||
328 | break; | ||
329 | } | ||
330 | } | ||
331 | //if (project.Files.GetSubType(file).ToString() != "Code") | ||
332 | //{ | ||
333 | // ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".resx"); | ||
334 | |||
335 | ss.WriteLine(" </resources>"); | ||
336 | ss.WriteLine(" <sources failonempty=\"true\">"); | ||
337 | foreach (string file in project.Files) | ||
338 | { | ||
339 | switch (project.Files.GetBuildAction(file)) | ||
340 | { | ||
341 | case BuildAction.Compile: | ||
342 | ss.WriteLine(" <include name=\"" + Helper.NormalizePath(PrependPath(file), '/') + "\" />"); | ||
343 | break; | ||
344 | default: | ||
345 | break; | ||
346 | } | ||
347 | } | ||
348 | ss.WriteLine(" </sources>"); | ||
349 | ss.WriteLine(" <references basedir=\"${project::get-base-directory()}\">"); | ||
350 | ss.WriteLine(" <lib>"); | ||
351 | ss.WriteLine(" <include name=\"${project::get-base-directory()}\" />"); | ||
352 | foreach(ReferencePathNode refPath in project.ReferencePaths) | ||
353 | { | ||
354 | ss.WriteLine(" <include name=\"${project::get-base-directory()}/" + refPath.Path.TrimEnd('/', '\\') + "\" />"); | ||
355 | } | ||
356 | ss.WriteLine(" </lib>"); | ||
357 | foreach (ReferenceNode refr in project.References) | ||
358 | { | ||
359 | string path = Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReference(solution, project, refr)), '/'); | ||
360 | ss.WriteLine(" <include name=\"" + path + "\" />"); | ||
361 | } | ||
362 | ss.WriteLine(" </references>"); | ||
363 | |||
364 | ss.WriteLine(" </csc>"); | ||
365 | |||
366 | foreach (ConfigurationNode conf in project.Configurations) | ||
367 | { | ||
368 | if (!String.IsNullOrEmpty(conf.Options.OutputPath)) | ||
369 | { | ||
370 | string targetDir = Helper.NormalizePath(conf.Options.OutputPath, '/'); | ||
371 | |||
372 | ss.WriteLine(" <echo message=\"Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/" + targetDir + "\" />"); | ||
373 | |||
374 | ss.WriteLine(" <mkdir dir=\"${project::get-base-directory()}/" + targetDir + "\"/>"); | ||
375 | |||
376 | ss.WriteLine(" <copy todir=\"${project::get-base-directory()}/" + targetDir + "\">"); | ||
377 | ss.WriteLine(" <fileset basedir=\"${project::get-base-directory()}/${build.dir}/\" >"); | ||
378 | ss.WriteLine(" <include name=\"*.dll\"/>"); | ||
379 | ss.WriteLine(" <include name=\"*.exe\"/>"); | ||
380 | ss.WriteLine(" <include name=\"*.mdb\" if='${build.debug}'/>"); | ||
381 | ss.WriteLine(" <include name=\"*.pdb\" if='${build.debug}'/>"); | ||
382 | ss.WriteLine(" </fileset>"); | ||
383 | ss.WriteLine(" </copy>"); | ||
384 | break; | ||
385 | } | ||
386 | } | ||
387 | |||
388 | ss.WriteLine(" </target>"); | ||
389 | |||
390 | ss.WriteLine(" <target name=\"clean\">"); | ||
391 | ss.WriteLine(" <delete dir=\"${bin.dir}\" failonerror=\"false\" />"); | ||
392 | ss.WriteLine(" <delete dir=\"${obj.dir}\" failonerror=\"false\" />"); | ||
393 | ss.WriteLine(" </target>"); | ||
394 | |||
395 | ss.WriteLine(" <target name=\"doc\" description=\"Creates documentation.\">"); | ||
396 | if (hasDoc) | ||
397 | { | ||
398 | ss.WriteLine(" <property name=\"doc.target\" value=\"\" />"); | ||
399 | ss.WriteLine(" <if test=\"${platform::is-unix()}\">"); | ||
400 | ss.WriteLine(" <property name=\"doc.target\" value=\"Web\" />"); | ||
401 | ss.WriteLine(" </if>"); | ||
402 | ss.WriteLine(" <ndoc failonerror=\"false\" verbose=\"true\">"); | ||
403 | ss.WriteLine(" <assemblies basedir=\"${project::get-base-directory()}\">"); | ||
404 | ss.Write(" <include name=\"${build.dir}/${project::get-name()}"); | ||
405 | if (project.Type == ProjectType.Library) | ||
406 | { | ||
407 | ss.WriteLine(".dll\" />"); | ||
408 | } | ||
409 | else | ||
410 | { | ||
411 | ss.WriteLine(".exe\" />"); | ||
412 | } | ||
413 | |||
414 | ss.WriteLine(" </assemblies>"); | ||
415 | ss.WriteLine(" <summaries basedir=\"${project::get-base-directory()}\">"); | ||
416 | ss.WriteLine(" <include name=\"${build.dir}/${project::get-name()}.xml\"/>"); | ||
417 | ss.WriteLine(" </summaries>"); | ||
418 | ss.WriteLine(" <referencepaths basedir=\"${project::get-base-directory()}\">"); | ||
419 | ss.WriteLine(" <include name=\"${build.dir}\" />"); | ||
420 | // foreach(ReferenceNode refr in project.References) | ||
421 | // { | ||
422 | // string path = Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReferencePath(solution, refr)), '/'); | ||
423 | // if (path != "") | ||
424 | // { | ||
425 | // ss.WriteLine(" <include name=\"{0}\" />", path); | ||
426 | // } | ||
427 | // } | ||
428 | ss.WriteLine(" </referencepaths>"); | ||
429 | ss.WriteLine(" <documenters>"); | ||
430 | ss.WriteLine(" <documenter name=\"MSDN\">"); | ||
431 | ss.WriteLine(" <property name=\"OutputDirectory\" value=\"${project::get-base-directory()}/${build.dir}/doc/${project::get-name()}\" />"); | ||
432 | ss.WriteLine(" <property name=\"OutputTarget\" value=\"${doc.target}\" />"); | ||
433 | ss.WriteLine(" <property name=\"HtmlHelpName\" value=\"${project::get-name()}\" />"); | ||
434 | ss.WriteLine(" <property name=\"IncludeFavorites\" value=\"False\" />"); | ||
435 | ss.WriteLine(" <property name=\"Title\" value=\"${project::get-name()} SDK Documentation\" />"); | ||
436 | ss.WriteLine(" <property name=\"SplitTOCs\" value=\"False\" />"); | ||
437 | ss.WriteLine(" <property name=\"DefaulTOC\" value=\"\" />"); | ||
438 | ss.WriteLine(" <property name=\"ShowVisualBasic\" value=\"True\" />"); | ||
439 | ss.WriteLine(" <property name=\"AutoDocumentConstructors\" value=\"True\" />"); | ||
440 | ss.WriteLine(" <property name=\"ShowMissingSummaries\" value=\"${build.debug}\" />"); | ||
441 | ss.WriteLine(" <property name=\"ShowMissingRemarks\" value=\"${build.debug}\" />"); | ||
442 | ss.WriteLine(" <property name=\"ShowMissingParams\" value=\"${build.debug}\" />"); | ||
443 | ss.WriteLine(" <property name=\"ShowMissingReturns\" value=\"${build.debug}\" />"); | ||
444 | ss.WriteLine(" <property name=\"ShowMissingValues\" value=\"${build.debug}\" />"); | ||
445 | ss.WriteLine(" <property name=\"DocumentInternals\" value=\"False\" />"); | ||
446 | ss.WriteLine(" <property name=\"DocumentPrivates\" value=\"False\" />"); | ||
447 | ss.WriteLine(" <property name=\"DocumentProtected\" value=\"True\" />"); | ||
448 | ss.WriteLine(" <property name=\"DocumentEmptyNamespaces\" value=\"${build.debug}\" />"); | ||
449 | ss.WriteLine(" <property name=\"IncludeAssemblyVersion\" value=\"True\" />"); | ||
450 | ss.WriteLine(" </documenter>"); | ||
451 | ss.WriteLine(" </documenters>"); | ||
452 | ss.WriteLine(" </ndoc>"); | ||
453 | } | ||
454 | ss.WriteLine(" </target>"); | ||
455 | ss.WriteLine("</project>"); | ||
456 | } | ||
457 | m_Kernel.CurrentWorkingDirectory.Pop(); | ||
458 | } | ||
459 | |||
460 | private void WriteCombine(SolutionNode solution) | ||
461 | { | ||
462 | m_Kernel.Log.Write("Creating NAnt build files"); | ||
463 | foreach (ProjectNode project in solution.Projects) | ||
464 | { | ||
465 | if (m_Kernel.AllowProject(project.FilterGroups)) | ||
466 | { | ||
467 | m_Kernel.Log.Write("...Creating project: {0}", project.Name); | ||
468 | WriteProject(solution, project); | ||
469 | } | ||
470 | } | ||
471 | |||
472 | m_Kernel.Log.Write(""); | ||
473 | string combFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "build"); | ||
474 | StreamWriter ss = new StreamWriter(combFile); | ||
475 | |||
476 | m_Kernel.CurrentWorkingDirectory.Push(); | ||
477 | Helper.SetCurrentDir(Path.GetDirectoryName(combFile)); | ||
478 | |||
479 | using (ss) | ||
480 | { | ||
481 | ss.WriteLine("<?xml version=\"1.0\" ?>"); | ||
482 | ss.WriteLine("<project name=\"{0}\" default=\"build\">", solution.Name); | ||
483 | ss.WriteLine(" <echo message=\"Using '${nant.settings.currentframework}' Framework\"/>"); | ||
484 | ss.WriteLine(); | ||
485 | |||
486 | //ss.WriteLine(" <property name=\"dist.dir\" value=\"dist\" />"); | ||
487 | //ss.WriteLine(" <property name=\"source.dir\" value=\"source\" />"); | ||
488 | ss.WriteLine(" <property name=\"bin.dir\" value=\"bin\" />"); | ||
489 | ss.WriteLine(" <property name=\"obj.dir\" value=\"obj\" />"); | ||
490 | ss.WriteLine(" <property name=\"doc.dir\" value=\"doc\" />"); | ||
491 | ss.WriteLine(" <property name=\"project.main.dir\" value=\"${project::get-base-directory()}\" />"); | ||
492 | |||
493 | // actually use active config out of prebuild.xml | ||
494 | ss.WriteLine(" <property name=\"project.config\" value=\"{0}\" />", solution.ActiveConfig); | ||
495 | |||
496 | foreach (ConfigurationNode conf in solution.Configurations) | ||
497 | { | ||
498 | ss.WriteLine(); | ||
499 | ss.WriteLine(" <target name=\"{0}\" description=\"\">", conf.Name); | ||
500 | ss.WriteLine(" <property name=\"project.config\" value=\"{0}\" />", conf.Name); | ||
501 | ss.WriteLine(" <property name=\"build.debug\" value=\"{0}\" />", conf.Options["DebugInformation"].ToString().ToLower()); | ||
502 | ss.WriteLine(" </target>"); | ||
503 | ss.WriteLine(); | ||
504 | } | ||
505 | |||
506 | ss.WriteLine(" <target name=\"net-1.1\" description=\"Sets framework to .NET 1.1\">"); | ||
507 | ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"net-1.1\" />"); | ||
508 | ss.WriteLine(" </target>"); | ||
509 | ss.WriteLine(); | ||
510 | |||
511 | ss.WriteLine(" <target name=\"net-2.0\" description=\"Sets framework to .NET 2.0\">"); | ||
512 | ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"net-2.0\" />"); | ||
513 | ss.WriteLine(" </target>"); | ||
514 | ss.WriteLine(); | ||
515 | |||
516 | ss.WriteLine(" <target name=\"net-3.5\" description=\"Sets framework to .NET 3.5\">"); | ||
517 | ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"net-3.5\" />"); | ||
518 | ss.WriteLine(" </target>"); | ||
519 | ss.WriteLine(); | ||
520 | |||
521 | ss.WriteLine(" <target name=\"mono-1.0\" description=\"Sets framework to mono 1.0\">"); | ||
522 | ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"mono-1.0\" />"); | ||
523 | ss.WriteLine(" </target>"); | ||
524 | ss.WriteLine(); | ||
525 | |||
526 | ss.WriteLine(" <target name=\"mono-2.0\" description=\"Sets framework to mono 2.0\">"); | ||
527 | ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"mono-2.0\" />"); | ||
528 | ss.WriteLine(" </target>"); | ||
529 | ss.WriteLine(); | ||
530 | |||
531 | ss.WriteLine(" <target name=\"mono-3.5\" description=\"Sets framework to mono 3.5\">"); | ||
532 | ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"mono-3.5\" />"); | ||
533 | ss.WriteLine(" </target>"); | ||
534 | ss.WriteLine(); | ||
535 | |||
536 | ss.WriteLine(" <target name=\"init\" description=\"\">"); | ||
537 | ss.WriteLine(" <call target=\"${project.config}\" />"); | ||
538 | ss.WriteLine(" <property name=\"sys.os.platform\""); | ||
539 | ss.WriteLine(" value=\"${platform::get-name()}\""); | ||
540 | ss.WriteLine(" />"); | ||
541 | ss.WriteLine(" <echo message=\"Platform ${sys.os.platform}\" />"); | ||
542 | ss.WriteLine(" <property name=\"build.dir\" value=\"${bin.dir}/${project.config}\" />"); | ||
543 | ss.WriteLine(" </target>"); | ||
544 | ss.WriteLine(); | ||
545 | |||
546 | |||
547 | // sdague - ok, this is an ugly hack, but what it lets | ||
548 | // us do is native include of files into the nant | ||
549 | // created files from all .nant/*include files. This | ||
550 | // lets us keep using prebuild, but allows for | ||
551 | // extended nant targets to do build and the like. | ||
552 | |||
553 | try | ||
554 | { | ||
555 | Regex re = new Regex(".include$"); | ||
556 | DirectoryInfo nantdir = new DirectoryInfo(".nant"); | ||
557 | foreach (FileSystemInfo item in nantdir.GetFileSystemInfos()) | ||
558 | { | ||
559 | if (item is DirectoryInfo) { } | ||
560 | else if (item is FileInfo) | ||
561 | { | ||
562 | if (re.Match(((FileInfo)item).FullName) != | ||
563 | System.Text.RegularExpressions.Match.Empty) | ||
564 | { | ||
565 | Console.WriteLine("Including file: " + ((FileInfo)item).FullName); | ||
566 | |||
567 | using (FileStream fs = new FileStream(((FileInfo)item).FullName, | ||
568 | FileMode.Open, | ||
569 | FileAccess.Read, | ||
570 | FileShare.None)) | ||
571 | { | ||
572 | using (StreamReader sr = new StreamReader(fs)) | ||
573 | { | ||
574 | ss.WriteLine("<!-- included from {0} -->", ((FileInfo)item).FullName); | ||
575 | while (sr.Peek() != -1) | ||
576 | { | ||
577 | ss.WriteLine(sr.ReadLine()); | ||
578 | } | ||
579 | ss.WriteLine(); | ||
580 | } | ||
581 | } | ||
582 | } | ||
583 | } | ||
584 | } | ||
585 | } | ||
586 | catch { } | ||
587 | // ss.WriteLine(" <include buildfile=\".nant/local.include\" />"); | ||
588 | // ss.WriteLine(" <target name=\"zip\" description=\"\">"); | ||
589 | // ss.WriteLine(" <zip zipfile=\"{0}-{1}.zip\">", solution.Name, solution.Version); | ||
590 | // ss.WriteLine(" <fileset basedir=\"${project::get-base-directory()}\">"); | ||
591 | |||
592 | // ss.WriteLine(" <include name=\"${project::get-base-directory()}/**/*.cs\" />"); | ||
593 | // // ss.WriteLine(" <include name=\"${project.main.dir}/**/*\" />"); | ||
594 | // ss.WriteLine(" </fileset>"); | ||
595 | // ss.WriteLine(" </zip>"); | ||
596 | // ss.WriteLine(" <echo message=\"Building zip target\" />"); | ||
597 | // ss.WriteLine(" </target>"); | ||
598 | ss.WriteLine(); | ||
599 | |||
600 | |||
601 | ss.WriteLine(" <target name=\"clean\" description=\"\">"); | ||
602 | ss.WriteLine(" <echo message=\"Deleting all builds from all configurations\" />"); | ||
603 | //ss.WriteLine(" <delete dir=\"${dist.dir}\" failonerror=\"false\" />"); | ||
604 | ss.WriteLine(" <delete failonerror=\"false\">"); | ||
605 | ss.WriteLine(" <fileset basedir=\"${bin.dir}\">"); | ||
606 | ss.WriteLine(" <include name=\"OpenSim*.dll\"/>"); | ||
607 | ss.WriteLine(" <include name=\"OpenSim*.exe\"/>"); | ||
608 | ss.WriteLine(" <include name=\"ScriptEngines/*\"/>"); | ||
609 | ss.WriteLine(" <include name=\"Physics/*\"/>"); | ||
610 | ss.WriteLine(" <exclude name=\"OpenSim.32BitLaunch.exe\"/>"); | ||
611 | ss.WriteLine(" <exclude name=\"ScriptEngines/Default.lsl\"/>"); | ||
612 | ss.WriteLine(" </fileset>"); | ||
613 | ss.WriteLine(" </delete>"); | ||
614 | ss.WriteLine(" <delete dir=\"${obj.dir}\" failonerror=\"false\" />"); | ||
615 | foreach (ProjectNode project in solution.Projects) | ||
616 | { | ||
617 | string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); | ||
618 | ss.Write(" <nant buildfile=\"{0}\"", | ||
619 | Helper.NormalizePath(Helper.MakeFilePath(path, project.Name + GetProjectExtension(project), "build"), '/')); | ||
620 | ss.WriteLine(" target=\"clean\" />"); | ||
621 | } | ||
622 | ss.WriteLine(" </target>"); | ||
623 | ss.WriteLine(); | ||
624 | |||
625 | ss.WriteLine(" <target name=\"build\" depends=\"init\" description=\"\">"); | ||
626 | |||
627 | foreach (ProjectNode project in solution.ProjectsTableOrder) | ||
628 | { | ||
629 | string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); | ||
630 | ss.Write(" <nant buildfile=\"{0}\"", | ||
631 | Helper.NormalizePath(Helper.MakeFilePath(path, project.Name + GetProjectExtension(project), "build"), '/')); | ||
632 | ss.WriteLine(" target=\"build\" />"); | ||
633 | } | ||
634 | ss.WriteLine(" </target>"); | ||
635 | ss.WriteLine(); | ||
636 | |||
637 | ss.WriteLine(" <target name=\"build-release\" depends=\"Release, init, build\" description=\"Builds in Release mode\" />"); | ||
638 | ss.WriteLine(); | ||
639 | ss.WriteLine(" <target name=\"build-debug\" depends=\"Debug, init, build\" description=\"Builds in Debug mode\" />"); | ||
640 | ss.WriteLine(); | ||
641 | //ss.WriteLine(" <target name=\"package\" depends=\"clean, doc, copyfiles, zip\" description=\"Builds in Release mode\" />"); | ||
642 | ss.WriteLine(" <target name=\"package\" depends=\"clean, doc\" description=\"Builds all\" />"); | ||
643 | ss.WriteLine(); | ||
644 | |||
645 | ss.WriteLine(" <target name=\"doc\" depends=\"build-release\">"); | ||
646 | ss.WriteLine(" <echo message=\"Generating all documentation from all builds\" />"); | ||
647 | foreach (ProjectNode project in solution.Projects) | ||
648 | { | ||
649 | string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); | ||
650 | ss.Write(" <nant buildfile=\"{0}\"", | ||
651 | Helper.NormalizePath(Helper.MakeFilePath(path, project.Name + GetProjectExtension(project), "build"), '/')); | ||
652 | ss.WriteLine(" target=\"doc\" />"); | ||
653 | } | ||
654 | ss.WriteLine(" </target>"); | ||
655 | ss.WriteLine(); | ||
656 | ss.WriteLine("</project>"); | ||
657 | } | ||
658 | |||
659 | m_Kernel.CurrentWorkingDirectory.Pop(); | ||
660 | } | ||
661 | |||
662 | private void CleanProject(ProjectNode project) | ||
663 | { | ||
664 | m_Kernel.Log.Write("...Cleaning project: {0}", project.Name); | ||
665 | string projectFile = Helper.MakeFilePath(project.FullPath, project.Name + GetProjectExtension(project), "build"); | ||
666 | Helper.DeleteIfExists(projectFile); | ||
667 | } | ||
668 | |||
669 | private void CleanSolution(SolutionNode solution) | ||
670 | { | ||
671 | m_Kernel.Log.Write("Cleaning NAnt build files for", solution.Name); | ||
672 | |||
673 | string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "build"); | ||
674 | Helper.DeleteIfExists(slnFile); | ||
675 | |||
676 | foreach (ProjectNode project in solution.Projects) | ||
677 | { | ||
678 | CleanProject(project); | ||
679 | } | ||
680 | |||
681 | m_Kernel.Log.Write(""); | ||
682 | } | ||
683 | |||
684 | #endregion | ||
685 | |||
686 | #region ITarget Members | ||
687 | |||
688 | /// <summary> | ||
689 | /// Writes the specified kern. | ||
690 | /// </summary> | ||
691 | /// <param name="kern">The kern.</param> | ||
692 | public void Write(Kernel kern) | ||
693 | { | ||
694 | if (kern == null) | ||
695 | { | ||
696 | throw new ArgumentNullException("kern"); | ||
697 | } | ||
698 | m_Kernel = kern; | ||
699 | foreach (SolutionNode solution in kern.Solutions) | ||
700 | { | ||
701 | WriteCombine(solution); | ||
702 | } | ||
703 | m_Kernel = null; | ||
704 | } | ||
705 | |||
706 | /// <summary> | ||
707 | /// Cleans the specified kern. | ||
708 | /// </summary> | ||
709 | /// <param name="kern">The kern.</param> | ||
710 | public virtual void Clean(Kernel kern) | ||
711 | { | ||
712 | if (kern == null) | ||
713 | { | ||
714 | throw new ArgumentNullException("kern"); | ||
715 | } | ||
716 | m_Kernel = kern; | ||
717 | foreach (SolutionNode sol in kern.Solutions) | ||
718 | { | ||
719 | CleanSolution(sol); | ||
720 | } | ||
721 | m_Kernel = null; | ||
722 | } | ||
723 | |||
724 | /// <summary> | ||
725 | /// Gets the name. | ||
726 | /// </summary> | ||
727 | /// <value>The name.</value> | ||
728 | public string Name | ||
729 | { | ||
730 | get | ||
731 | { | ||
732 | return "nant"; | ||
733 | } | ||
734 | } | ||
735 | |||
736 | #endregion | ||
737 | } | ||
738 | } | ||
diff --git a/Prebuild/src/Core/Targets/SharpDevelop2Target.cs b/Prebuild/src/Core/Targets/SharpDevelop2Target.cs deleted file mode 100644 index 66dd1bc..0000000 --- a/Prebuild/src/Core/Targets/SharpDevelop2Target.cs +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | |||
28 | using Prebuild.Core.Attributes; | ||
29 | |||
30 | namespace Prebuild.Core.Targets | ||
31 | { | ||
32 | /// <summary> | ||
33 | /// | ||
34 | /// </summary> | ||
35 | [Target("sharpdev2")] | ||
36 | public class SharpDevelop2Target : VS2005Target | ||
37 | { | ||
38 | #region Properties | ||
39 | public override string VersionName | ||
40 | { | ||
41 | get | ||
42 | { | ||
43 | return "SharpDevelop2"; | ||
44 | } | ||
45 | } | ||
46 | #endregion | ||
47 | |||
48 | #region Public Methods | ||
49 | |||
50 | /// <summary> | ||
51 | /// Writes the specified kern. | ||
52 | /// </summary> | ||
53 | /// <param name="kern">The kern.</param> | ||
54 | public override void Write(Kernel kern) | ||
55 | { | ||
56 | base.Write(kern); | ||
57 | } | ||
58 | |||
59 | /// <summary> | ||
60 | /// Cleans the specified kern. | ||
61 | /// </summary> | ||
62 | /// <param name="kern">The kern.</param> | ||
63 | public override void Clean(Kernel kern) | ||
64 | { | ||
65 | base.Clean(kern); | ||
66 | } | ||
67 | |||
68 | /// <summary> | ||
69 | /// Gets the name. | ||
70 | /// </summary> | ||
71 | /// <value>The name.</value> | ||
72 | public override string Name | ||
73 | { | ||
74 | get | ||
75 | { | ||
76 | return "sharpdev2"; | ||
77 | } | ||
78 | } | ||
79 | |||
80 | #endregion | ||
81 | } | ||
82 | } | ||
diff --git a/Prebuild/src/Core/Targets/SharpDevelopTarget.cs b/Prebuild/src/Core/Targets/SharpDevelopTarget.cs deleted file mode 100644 index cf7ce02..0000000 --- a/Prebuild/src/Core/Targets/SharpDevelopTarget.cs +++ /dev/null | |||
@@ -1,428 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Collections; | ||
28 | using System.Collections.Specialized; | ||
29 | using System.IO; | ||
30 | using System.Text.RegularExpressions; | ||
31 | using System.Reflection; | ||
32 | |||
33 | using Prebuild.Core.Attributes; | ||
34 | using Prebuild.Core.Interfaces; | ||
35 | using Prebuild.Core.Nodes; | ||
36 | using Prebuild.Core.Utilities; | ||
37 | |||
38 | namespace Prebuild.Core.Targets | ||
39 | { | ||
40 | /// <summary> | ||
41 | /// | ||
42 | /// </summary> | ||
43 | [Target("sharpdev")] | ||
44 | public class SharpDevelopTarget : ITarget | ||
45 | { | ||
46 | #region Fields | ||
47 | |||
48 | private Kernel m_Kernel; | ||
49 | |||
50 | #endregion | ||
51 | |||
52 | #region Private Methods | ||
53 | |||
54 | private static string PrependPath(string path) | ||
55 | { | ||
56 | string tmpPath = Helper.NormalizePath(path, '/'); | ||
57 | Regex regex = new Regex(@"(\w):/(\w+)"); | ||
58 | Match match = regex.Match(tmpPath); | ||
59 | if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/') | ||
60 | { | ||
61 | tmpPath = Helper.NormalizePath(tmpPath); | ||
62 | } | ||
63 | else | ||
64 | { | ||
65 | tmpPath = Helper.NormalizePath("./" + tmpPath); | ||
66 | } | ||
67 | |||
68 | return tmpPath; | ||
69 | } | ||
70 | |||
71 | private static string BuildReference(SolutionNode solution, ReferenceNode refr) | ||
72 | { | ||
73 | string ret = "<Reference type=\""; | ||
74 | if(solution.ProjectsTable.ContainsKey(refr.Name)) | ||
75 | { | ||
76 | ret += "Project\" refto=\"" + refr.Name; | ||
77 | ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />"; | ||
78 | } | ||
79 | else | ||
80 | { | ||
81 | ProjectNode project = (ProjectNode)refr.Parent; | ||
82 | string fileRef = FindFileReference(refr.Name, project); | ||
83 | |||
84 | if(refr.Path != null || fileRef != null) | ||
85 | { | ||
86 | ret += "Assembly\" refto=\""; | ||
87 | |||
88 | string finalPath = (refr.Path != null) ? Helper.MakeFilePath(refr.Path, refr.Name, "dll") : fileRef; | ||
89 | |||
90 | ret += finalPath; | ||
91 | ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />"; | ||
92 | return ret; | ||
93 | } | ||
94 | |||
95 | ret += "Gac\" refto=\""; | ||
96 | try | ||
97 | { | ||
98 | //Assembly assem = Assembly.Load(refr.Name); | ||
99 | ret += refr.Name;// assem.FullName; | ||
100 | } | ||
101 | catch (System.NullReferenceException e) | ||
102 | { | ||
103 | e.ToString(); | ||
104 | ret += refr.Name; | ||
105 | } | ||
106 | ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />"; | ||
107 | } | ||
108 | |||
109 | return ret; | ||
110 | } | ||
111 | |||
112 | private static string FindFileReference(string refName, ProjectNode project) | ||
113 | { | ||
114 | foreach(ReferencePathNode refPath in project.ReferencePaths) | ||
115 | { | ||
116 | string fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll"); | ||
117 | |||
118 | if(File.Exists(fullPath)) | ||
119 | { | ||
120 | return fullPath; | ||
121 | } | ||
122 | } | ||
123 | |||
124 | return null; | ||
125 | } | ||
126 | |||
127 | /// <summary> | ||
128 | /// Gets the XML doc file. | ||
129 | /// </summary> | ||
130 | /// <param name="project">The project.</param> | ||
131 | /// <param name="conf">The conf.</param> | ||
132 | /// <returns></returns> | ||
133 | public static string GenerateXmlDocFile(ProjectNode project, ConfigurationNode conf) | ||
134 | { | ||
135 | if( conf == null ) | ||
136 | { | ||
137 | throw new ArgumentNullException("conf"); | ||
138 | } | ||
139 | if( project == null ) | ||
140 | { | ||
141 | throw new ArgumentNullException("project"); | ||
142 | } | ||
143 | string docFile = (string)conf.Options["XmlDocFile"]; | ||
144 | if(docFile != null && docFile.Length == 0)//default to assembly name if not specified | ||
145 | { | ||
146 | return "False"; | ||
147 | } | ||
148 | return "True"; | ||
149 | } | ||
150 | |||
151 | private void WriteProject(SolutionNode solution, ProjectNode project) | ||
152 | { | ||
153 | string csComp = "Csc"; | ||
154 | string netRuntime = "MsNet"; | ||
155 | if(project.Runtime == ClrRuntime.Mono) | ||
156 | { | ||
157 | csComp = "Mcs"; | ||
158 | netRuntime = "Mono"; | ||
159 | } | ||
160 | |||
161 | string projFile = Helper.MakeFilePath(project.FullPath, project.Name, "prjx"); | ||
162 | StreamWriter ss = new StreamWriter(projFile); | ||
163 | |||
164 | m_Kernel.CurrentWorkingDirectory.Push(); | ||
165 | Helper.SetCurrentDir(Path.GetDirectoryName(projFile)); | ||
166 | |||
167 | using(ss) | ||
168 | { | ||
169 | ss.WriteLine( | ||
170 | "<Project name=\"{0}\" standardNamespace=\"{1}\" description=\"\" newfilesearch=\"None\" enableviewstate=\"True\" version=\"1.1\" projecttype=\"C#\">", | ||
171 | project.Name, | ||
172 | project.RootNamespace | ||
173 | ); | ||
174 | |||
175 | ss.WriteLine(" <Contents>"); | ||
176 | foreach(string file in project.Files) | ||
177 | { | ||
178 | string buildAction = "Compile"; | ||
179 | switch(project.Files.GetBuildAction(file)) | ||
180 | { | ||
181 | case BuildAction.None: | ||
182 | buildAction = "Nothing"; | ||
183 | break; | ||
184 | |||
185 | case BuildAction.Content: | ||
186 | buildAction = "Exclude"; | ||
187 | break; | ||
188 | |||
189 | case BuildAction.EmbeddedResource: | ||
190 | buildAction = "EmbedAsResource"; | ||
191 | break; | ||
192 | |||
193 | default: | ||
194 | buildAction = "Compile"; | ||
195 | break; | ||
196 | } | ||
197 | |||
198 | // Sort of a hack, we try and resolve the path and make it relative, if we can. | ||
199 | string filePath = PrependPath(file); | ||
200 | ss.WriteLine(" <File name=\"{0}\" subtype=\"Code\" buildaction=\"{1}\" dependson=\"\" data=\"\" />", filePath, buildAction); | ||
201 | } | ||
202 | ss.WriteLine(" </Contents>"); | ||
203 | |||
204 | ss.WriteLine(" <References>"); | ||
205 | foreach(ReferenceNode refr in project.References) | ||
206 | { | ||
207 | ss.WriteLine(" {0}", BuildReference(solution, refr)); | ||
208 | } | ||
209 | ss.WriteLine(" </References>"); | ||
210 | |||
211 | ss.Write(" <DeploymentInformation"); | ||
212 | ss.Write(" target=\"\""); | ||
213 | ss.Write(" script=\"\""); | ||
214 | ss.Write(" strategy=\"File\""); | ||
215 | ss.WriteLine(" />"); | ||
216 | |||
217 | int count = 0; | ||
218 | |||
219 | ss.WriteLine(" <Configurations active=\"{0}\">", solution.ActiveConfig); | ||
220 | |||
221 | foreach(ConfigurationNode conf in project.Configurations) | ||
222 | { | ||
223 | ss.Write(" <Configuration"); | ||
224 | ss.Write(" runwithwarnings=\"True\""); | ||
225 | ss.Write(" name=\"{0}\"", conf.Name); | ||
226 | ss.WriteLine(">"); | ||
227 | ss.Write(" <CodeGeneration"); | ||
228 | ss.Write(" runtime=\"{0}\"", netRuntime); | ||
229 | ss.Write(" compiler=\"{0}\"", csComp); | ||
230 | ss.Write(" compilerversion=\"\""); | ||
231 | ss.Write(" warninglevel=\"{0}\"", conf.Options["WarningLevel"]); | ||
232 | ss.Write(" nowarn=\"{0}\"", conf.Options["SuppressWarnings"]); | ||
233 | ss.Write(" includedebuginformation=\"{0}\"", conf.Options["DebugInformation"]); | ||
234 | ss.Write(" optimize=\"{0}\"", conf.Options["OptimizeCode"]); | ||
235 | ss.Write(" unsafecodeallowed=\"{0}\"", conf.Options["AllowUnsafe"]); | ||
236 | ss.Write(" generateoverflowchecks=\"{0}\"", conf.Options["CheckUnderflowOverflow"]); | ||
237 | ss.Write(" mainclass=\"{0}\"", project.StartupObject); | ||
238 | ss.Write(" target=\"{0}\"", project.Type); | ||
239 | ss.Write(" definesymbols=\"{0}\"", conf.Options["CompilerDefines"]); | ||
240 | ss.Write(" generatexmldocumentation=\"{0}\"", GenerateXmlDocFile(project, conf)); | ||
241 | ss.Write(" win32Icon=\"{0}\"", Helper.NormalizePath(".\\" + project.AppIcon)); | ||
242 | ss.Write(" noconfig=\"{0}\"", "False"); | ||
243 | ss.Write(" nostdlib=\"{0}\"", conf.Options["NoStdLib"]); | ||
244 | ss.WriteLine(" />"); | ||
245 | |||
246 | ss.Write(" <Execution"); | ||
247 | ss.Write(" commandlineparameters=\"\""); | ||
248 | ss.Write(" consolepause=\"True\""); | ||
249 | ss.WriteLine(" />"); | ||
250 | |||
251 | ss.Write(" <Output"); | ||
252 | ss.Write(" directory=\".\\{0}\"", Helper.NormalizePath(conf.Options["OutputPath"].ToString())); | ||
253 | ss.Write(" assembly=\"{0}\"", project.AssemblyName); | ||
254 | ss.Write(" executeScript=\"{0}\"", conf.Options["RunScript"]); | ||
255 | if (conf.Options["PreBuildEvent"] != null && conf.Options["PreBuildEvent"].ToString().Length != 0) | ||
256 | { | ||
257 | ss.Write(" executeBeforeBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PreBuildEvent"].ToString())); | ||
258 | } | ||
259 | else | ||
260 | { | ||
261 | ss.Write(" executeBeforeBuild=\"{0}\"", conf.Options["PreBuildEvent"]); | ||
262 | } | ||
263 | if (conf.Options["PostBuildEvent"] != null && conf.Options["PostBuildEvent"].ToString().Length != 0) | ||
264 | { | ||
265 | ss.Write(" executeAfterBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PostBuildEvent"].ToString())); | ||
266 | } | ||
267 | else | ||
268 | { | ||
269 | ss.Write(" executeAfterBuild=\"{0}\"", conf.Options["PostBuildEvent"]); | ||
270 | } | ||
271 | ss.Write(" executeBeforeBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]); | ||
272 | ss.Write(" executeAfterBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]); | ||
273 | ss.WriteLine(" />"); | ||
274 | ss.WriteLine(" </Configuration>"); | ||
275 | |||
276 | count++; | ||
277 | } | ||
278 | ss.WriteLine(" </Configurations>"); | ||
279 | ss.WriteLine("</Project>"); | ||
280 | } | ||
281 | |||
282 | m_Kernel.CurrentWorkingDirectory.Pop(); | ||
283 | } | ||
284 | |||
285 | private void WriteCombine(SolutionNode solution) | ||
286 | { | ||
287 | m_Kernel.Log.Write("Creating SharpDevelop combine and project files"); | ||
288 | foreach(ProjectNode project in solution.Projects) | ||
289 | { | ||
290 | if(m_Kernel.AllowProject(project.FilterGroups)) | ||
291 | { | ||
292 | m_Kernel.Log.Write("...Creating project: {0}", project.Name); | ||
293 | WriteProject(solution, project); | ||
294 | } | ||
295 | } | ||
296 | |||
297 | m_Kernel.Log.Write(""); | ||
298 | string combFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "cmbx"); | ||
299 | StreamWriter ss = new StreamWriter(combFile); | ||
300 | |||
301 | m_Kernel.CurrentWorkingDirectory.Push(); | ||
302 | Helper.SetCurrentDir(Path.GetDirectoryName(combFile)); | ||
303 | |||
304 | using(ss) | ||
305 | { | ||
306 | ss.WriteLine("<Combine fileversion=\"1.0\" name=\"{0}\" description=\"\">", solution.Name); | ||
307 | |||
308 | int count = 0; | ||
309 | foreach(ProjectNode project in solution.Projects) | ||
310 | { | ||
311 | if(count == 0) | ||
312 | ss.WriteLine(" <StartMode startupentry=\"{0}\" single=\"True\">", project.Name); | ||
313 | |||
314 | ss.WriteLine(" <Execute entry=\"{0}\" type=\"None\" />", project.Name); | ||
315 | count++; | ||
316 | } | ||
317 | ss.WriteLine(" </StartMode>"); | ||
318 | |||
319 | ss.WriteLine(" <Entries>"); | ||
320 | foreach(ProjectNode project in solution.Projects) | ||
321 | { | ||
322 | string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); | ||
323 | ss.WriteLine(" <Entry filename=\"{0}\" />", | ||
324 | Helper.MakeFilePath(path, project.Name, "prjx")); | ||
325 | } | ||
326 | ss.WriteLine(" </Entries>"); | ||
327 | |||
328 | count = 0; | ||
329 | foreach(ConfigurationNode conf in solution.Configurations) | ||
330 | { | ||
331 | if(count == 0) | ||
332 | { | ||
333 | ss.WriteLine(" <Configurations active=\"{0}\">", conf.Name); | ||
334 | } | ||
335 | |||
336 | ss.WriteLine(" <Configuration name=\"{0}\">", conf.Name); | ||
337 | foreach(ProjectNode project in solution.Projects) | ||
338 | { | ||
339 | ss.WriteLine(" <Entry name=\"{0}\" configurationname=\"{1}\" build=\"True\" />", project.Name, conf.Name); | ||
340 | } | ||
341 | ss.WriteLine(" </Configuration>"); | ||
342 | |||
343 | count++; | ||
344 | } | ||
345 | ss.WriteLine(" </Configurations>"); | ||
346 | ss.WriteLine("</Combine>"); | ||
347 | } | ||
348 | |||
349 | m_Kernel.CurrentWorkingDirectory.Pop(); | ||
350 | } | ||
351 | |||
352 | private void CleanProject(ProjectNode project) | ||
353 | { | ||
354 | m_Kernel.Log.Write("...Cleaning project: {0}", project.Name); | ||
355 | string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, "prjx"); | ||
356 | Helper.DeleteIfExists(projectFile); | ||
357 | } | ||
358 | |||
359 | private void CleanSolution(SolutionNode solution) | ||
360 | { | ||
361 | m_Kernel.Log.Write("Cleaning SharpDevelop combine and project files for", solution.Name); | ||
362 | |||
363 | string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "cmbx"); | ||
364 | Helper.DeleteIfExists(slnFile); | ||
365 | |||
366 | foreach(ProjectNode project in solution.Projects) | ||
367 | { | ||
368 | CleanProject(project); | ||
369 | } | ||
370 | |||
371 | m_Kernel.Log.Write(""); | ||
372 | } | ||
373 | |||
374 | #endregion | ||
375 | |||
376 | #region ITarget Members | ||
377 | |||
378 | /// <summary> | ||
379 | /// Writes the specified kern. | ||
380 | /// </summary> | ||
381 | /// <param name="kern">The kern.</param> | ||
382 | public void Write(Kernel kern) | ||
383 | { | ||
384 | if( kern == null ) | ||
385 | { | ||
386 | throw new ArgumentNullException("kern"); | ||
387 | } | ||
388 | m_Kernel = kern; | ||
389 | foreach(SolutionNode solution in kern.Solutions) | ||
390 | { | ||
391 | WriteCombine(solution); | ||
392 | } | ||
393 | m_Kernel = null; | ||
394 | } | ||
395 | |||
396 | /// <summary> | ||
397 | /// Cleans the specified kern. | ||
398 | /// </summary> | ||
399 | /// <param name="kern">The kern.</param> | ||
400 | public virtual void Clean(Kernel kern) | ||
401 | { | ||
402 | if( kern == null ) | ||
403 | { | ||
404 | throw new ArgumentNullException("kern"); | ||
405 | } | ||
406 | m_Kernel = kern; | ||
407 | foreach(SolutionNode sol in kern.Solutions) | ||
408 | { | ||
409 | CleanSolution(sol); | ||
410 | } | ||
411 | m_Kernel = null; | ||
412 | } | ||
413 | |||
414 | /// <summary> | ||
415 | /// Gets the name. | ||
416 | /// </summary> | ||
417 | /// <value>The name.</value> | ||
418 | public string Name | ||
419 | { | ||
420 | get | ||
421 | { | ||
422 | return "sharpdev"; | ||
423 | } | ||
424 | } | ||
425 | |||
426 | #endregion | ||
427 | } | ||
428 | } | ||
diff --git a/Prebuild/src/Core/Targets/ToolInfo.cs b/Prebuild/src/Core/Targets/ToolInfo.cs deleted file mode 100644 index 935c674..0000000 --- a/Prebuild/src/Core/Targets/ToolInfo.cs +++ /dev/null | |||
@@ -1,197 +0,0 @@ | |||
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 | } | ||
diff --git a/Prebuild/src/Core/Targets/VS2002Target.cs b/Prebuild/src/Core/Targets/VS2002Target.cs deleted file mode 100644 index 2292624..0000000 --- a/Prebuild/src/Core/Targets/VS2002Target.cs +++ /dev/null | |||
@@ -1,87 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | |||
28 | using Prebuild.Core.Attributes; | ||
29 | |||
30 | namespace Prebuild.Core.Targets | ||
31 | { | ||
32 | /// <summary> | ||
33 | /// | ||
34 | /// </summary> | ||
35 | [Target("vs2002")] | ||
36 | public class VS2002Target : VS2003Target | ||
37 | { | ||
38 | #region Private Methods | ||
39 | |||
40 | private void SetVS2002() | ||
41 | { | ||
42 | this.SolutionVersion = "7.00"; | ||
43 | this.ProductVersion = "7.0.9254"; | ||
44 | this.SchemaVersion = "1.0"; | ||
45 | this.VersionName = "2002"; | ||
46 | this.Version = VSVersion.VS70; | ||
47 | } | ||
48 | |||
49 | #endregion | ||
50 | |||
51 | #region Public Methods | ||
52 | |||
53 | /// <summary> | ||
54 | /// Writes the specified kern. | ||
55 | /// </summary> | ||
56 | /// <param name="kern">The kern.</param> | ||
57 | public override void Write(Kernel kern) | ||
58 | { | ||
59 | SetVS2002(); | ||
60 | base.Write(kern); | ||
61 | } | ||
62 | |||
63 | /// <summary> | ||
64 | /// Cleans the specified kern. | ||
65 | /// </summary> | ||
66 | /// <param name="kern">The kern.</param> | ||
67 | public override void Clean(Kernel kern) | ||
68 | { | ||
69 | SetVS2002(); | ||
70 | base.Clean(kern); | ||
71 | } | ||
72 | |||
73 | /// <summary> | ||
74 | /// Gets the name. | ||
75 | /// </summary> | ||
76 | /// <value>The name.</value> | ||
77 | public override string Name | ||
78 | { | ||
79 | get | ||
80 | { | ||
81 | return "vs2002"; | ||
82 | } | ||
83 | } | ||
84 | |||
85 | #endregion | ||
86 | } | ||
87 | } | ||
diff --git a/Prebuild/src/Core/Targets/VS2003Target.cs b/Prebuild/src/Core/Targets/VS2003Target.cs deleted file mode 100644 index 1bcb7dc..0000000 --- a/Prebuild/src/Core/Targets/VS2003Target.cs +++ /dev/null | |||
@@ -1,602 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Collections; | ||
28 | using System.Collections.Specialized; | ||
29 | using System.IO; | ||
30 | |||
31 | using Prebuild.Core.Attributes; | ||
32 | using Prebuild.Core.Interfaces; | ||
33 | using Prebuild.Core.Nodes; | ||
34 | using Prebuild.Core.Utilities; | ||
35 | |||
36 | namespace Prebuild.Core.Targets | ||
37 | { | ||
38 | [Target("vs2003")] | ||
39 | public class VS2003Target : ITarget | ||
40 | { | ||
41 | |||
42 | #region Fields | ||
43 | |||
44 | string solutionVersion = "8.00"; | ||
45 | string productVersion = "7.10.3077"; | ||
46 | string schemaVersion = "2.0"; | ||
47 | string versionName = "2003"; | ||
48 | VSVersion version = VSVersion.VS71; | ||
49 | |||
50 | Hashtable m_Tools; | ||
51 | Kernel m_Kernel; | ||
52 | |||
53 | /// <summary> | ||
54 | /// Gets or sets the solution version. | ||
55 | /// </summary> | ||
56 | /// <value>The solution version.</value> | ||
57 | protected string SolutionVersion | ||
58 | { | ||
59 | get | ||
60 | { | ||
61 | return this.solutionVersion; | ||
62 | } | ||
63 | set | ||
64 | { | ||
65 | this.solutionVersion = value; | ||
66 | } | ||
67 | } | ||
68 | /// <summary> | ||
69 | /// Gets or sets the product version. | ||
70 | /// </summary> | ||
71 | /// <value>The product version.</value> | ||
72 | protected string ProductVersion | ||
73 | { | ||
74 | get | ||
75 | { | ||
76 | return this.productVersion; | ||
77 | } | ||
78 | set | ||
79 | { | ||
80 | this.productVersion = value; | ||
81 | } | ||
82 | } | ||
83 | /// <summary> | ||
84 | /// Gets or sets the schema version. | ||
85 | /// </summary> | ||
86 | /// <value>The schema version.</value> | ||
87 | protected string SchemaVersion | ||
88 | { | ||
89 | get | ||
90 | { | ||
91 | return this.schemaVersion; | ||
92 | } | ||
93 | set | ||
94 | { | ||
95 | this.schemaVersion = value; | ||
96 | } | ||
97 | } | ||
98 | /// <summary> | ||
99 | /// Gets or sets the name of the version. | ||
100 | /// </summary> | ||
101 | /// <value>The name of the version.</value> | ||
102 | protected string VersionName | ||
103 | { | ||
104 | get | ||
105 | { | ||
106 | return this.versionName; | ||
107 | } | ||
108 | set | ||
109 | { | ||
110 | this.versionName = value; | ||
111 | } | ||
112 | } | ||
113 | /// <summary> | ||
114 | /// Gets or sets the version. | ||
115 | /// </summary> | ||
116 | /// <value>The version.</value> | ||
117 | protected VSVersion Version | ||
118 | { | ||
119 | get | ||
120 | { | ||
121 | return this.version; | ||
122 | } | ||
123 | set | ||
124 | { | ||
125 | this.version = value; | ||
126 | } | ||
127 | } | ||
128 | |||
129 | #endregion | ||
130 | |||
131 | #region Constructors | ||
132 | |||
133 | /// <summary> | ||
134 | /// Initializes a new instance of the <see cref="VS2003Target"/> class. | ||
135 | /// </summary> | ||
136 | public VS2003Target() | ||
137 | { | ||
138 | m_Tools = new Hashtable(); | ||
139 | |||
140 | m_Tools["C#"] = new ToolInfo("C#", "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}", "csproj", "CSHARP"); | ||
141 | m_Tools["VB.NET"] = new ToolInfo("VB.NET", "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}", "vbproj", "VisualBasic"); | ||
142 | } | ||
143 | |||
144 | #endregion | ||
145 | |||
146 | #region Private Methods | ||
147 | |||
148 | private string MakeRefPath(ProjectNode project) | ||
149 | { | ||
150 | string ret = ""; | ||
151 | foreach(ReferencePathNode node in project.ReferencePaths) | ||
152 | { | ||
153 | try | ||
154 | { | ||
155 | string fullPath = Helper.ResolvePath(node.Path); | ||
156 | if(ret.Length < 1) | ||
157 | { | ||
158 | ret = fullPath; | ||
159 | } | ||
160 | else | ||
161 | { | ||
162 | ret += ";" + fullPath; | ||
163 | } | ||
164 | } | ||
165 | catch(ArgumentException) | ||
166 | { | ||
167 | m_Kernel.Log.Write(LogType.Warning, "Could not resolve reference path: {0}", node.Path); | ||
168 | } | ||
169 | } | ||
170 | |||
171 | return ret; | ||
172 | } | ||
173 | |||
174 | private void WriteProject(SolutionNode solution, ProjectNode project) | ||
175 | { | ||
176 | if(!m_Tools.ContainsKey(project.Language)) | ||
177 | { | ||
178 | throw new UnknownLanguageException("Unknown .NET language: " + project.Language); | ||
179 | } | ||
180 | |||
181 | ToolInfo toolInfo = (ToolInfo)m_Tools[project.Language]; | ||
182 | string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension); | ||
183 | StreamWriter ps = new StreamWriter(projectFile); | ||
184 | |||
185 | m_Kernel.CurrentWorkingDirectory.Push(); | ||
186 | Helper.SetCurrentDir(Path.GetDirectoryName(projectFile)); | ||
187 | |||
188 | IEnumerator enumerator; | ||
189 | //ConfigurationNode scripts; | ||
190 | |||
191 | using(ps) | ||
192 | { | ||
193 | ps.WriteLine("<VisualStudioProject>"); | ||
194 | ps.WriteLine(" <{0}", toolInfo.XmlTag); | ||
195 | ps.WriteLine("\t\t\t\tProjectType = \"Local\""); | ||
196 | ps.WriteLine("\t\t\t\tProductVersion = \"{0}\"", this.ProductVersion); | ||
197 | ps.WriteLine("\t\t\t\tSchemaVersion = \"{0}\"", this.SchemaVersion); | ||
198 | ps.WriteLine("\t\t\t\tProjectGuid = \"{{{0}}}\"", project.Guid.ToString().ToUpper()); | ||
199 | ps.WriteLine("\t\t>"); | ||
200 | |||
201 | ps.WriteLine("\t\t\t\t<Build>"); | ||
202 | ps.WriteLine(" <Settings"); | ||
203 | ps.WriteLine("\t\t\t\t ApplicationIcon = \"{0}\"",project.AppIcon); | ||
204 | ps.WriteLine("\t\t\t\t AssemblyKeyContainerName = \"\""); | ||
205 | ps.WriteLine("\t\t\t\t AssemblyName = \"{0}\"", project.AssemblyName); | ||
206 | ps.WriteLine("\t\t\t\t AssemblyOriginatorKeyFile = \"\""); | ||
207 | ps.WriteLine("\t\t\t\t DefaultClientScript = \"JScript\""); | ||
208 | ps.WriteLine("\t\t\t\t DefaultHTMLPageLayout = \"Grid\""); | ||
209 | ps.WriteLine("\t\t\t\t DefaultTargetSchema = \"IE50\""); | ||
210 | ps.WriteLine("\t\t\t\t DelaySign = \"false\""); | ||
211 | |||
212 | if(this.Version == VSVersion.VS70) | ||
213 | { | ||
214 | ps.WriteLine("\t\t\t\t NoStandardLibraries = \"false\""); | ||
215 | } | ||
216 | |||
217 | ps.WriteLine("\t\t\t\t OutputType = \"{0}\"", project.Type.ToString()); | ||
218 | |||
219 | enumerator = project.Configurations.GetEnumerator(); | ||
220 | enumerator.Reset(); | ||
221 | enumerator.MoveNext(); | ||
222 | foreach(ConfigurationNode conf in project.Configurations) | ||
223 | { | ||
224 | if (conf.Options["PreBuildEvent"] != null && conf.Options["PreBuildEvent"].ToString().Length != 0) | ||
225 | { | ||
226 | ps.WriteLine("\t\t\t\t PreBuildEvent = \"{0}\"", Helper.NormalizePath(conf.Options["PreBuildEvent"].ToString())); | ||
227 | } | ||
228 | else | ||
229 | { | ||
230 | ps.WriteLine("\t\t\t\t PreBuildEvent = \"{0}\"", conf.Options["PreBuildEvent"]); | ||
231 | } | ||
232 | if (conf.Options["PostBuildEvent"] != null && conf.Options["PostBuildEvent"].ToString().Length != 0) | ||
233 | { | ||
234 | ps.WriteLine("\t\t\t\t PostBuildEvent = \"{0}\"", Helper.NormalizePath(conf.Options["PostBuildEvent"].ToString())); | ||
235 | } | ||
236 | else | ||
237 | { | ||
238 | ps.WriteLine("\t\t\t\t PostBuildEvent = \"{0}\"", conf.Options["PostBuildEvent"]); | ||
239 | } | ||
240 | if (conf.Options["RunPostBuildEvent"] == null) | ||
241 | { | ||
242 | ps.WriteLine("\t\t\t\t RunPostBuildEvent = \"{0}\"", "OnBuildSuccess"); | ||
243 | } | ||
244 | else | ||
245 | { | ||
246 | ps.WriteLine("\t\t\t\t RunPostBuildEvent = \"{0}\"", conf.Options["RunPostBuildEvent"]); | ||
247 | } | ||
248 | break; | ||
249 | } | ||
250 | |||
251 | ps.WriteLine("\t\t\t\t RootNamespace = \"{0}\"", project.RootNamespace); | ||
252 | ps.WriteLine("\t\t\t\t StartupObject = \"{0}\"", project.StartupObject); | ||
253 | ps.WriteLine("\t\t >"); | ||
254 | |||
255 | foreach(ConfigurationNode conf in project.Configurations) | ||
256 | { | ||
257 | ps.WriteLine("\t\t\t\t <Config"); | ||
258 | ps.WriteLine("\t\t\t\t Name = \"{0}\"", conf.Name); | ||
259 | ps.WriteLine("\t\t\t\t AllowUnsafeBlocks = \"{0}\"", conf.Options["AllowUnsafe"].ToString().ToLower()); | ||
260 | ps.WriteLine("\t\t\t\t BaseAddress = \"{0}\"", conf.Options["BaseAddress"]); | ||
261 | ps.WriteLine("\t\t\t\t CheckForOverflowUnderflow = \"{0}\"", conf.Options["CheckUnderflowOverflow"].ToString().ToLower()); | ||
262 | ps.WriteLine("\t\t\t\t ConfigurationOverrideFile = \"\""); | ||
263 | ps.WriteLine("\t\t\t\t DefineConstants = \"{0}\"", conf.Options["CompilerDefines"]); | ||
264 | ps.WriteLine("\t\t\t\t DocumentationFile = \"{0}\"", GetXmlDocFile(project, conf));//default to the assembly name | ||
265 | ps.WriteLine("\t\t\t\t DebugSymbols = \"{0}\"", conf.Options["DebugInformation"].ToString().ToLower()); | ||
266 | ps.WriteLine("\t\t\t\t FileAlignment = \"{0}\"", conf.Options["FileAlignment"]); | ||
267 | ps.WriteLine("\t\t\t\t IncrementalBuild = \"{0}\"", conf.Options["IncrementalBuild"].ToString().ToLower()); | ||
268 | |||
269 | if(this.Version == VSVersion.VS71) | ||
270 | { | ||
271 | ps.WriteLine("\t\t\t\t NoStdLib = \"{0}\"", conf.Options["NoStdLib"].ToString().ToLower()); | ||
272 | ps.WriteLine("\t\t\t\t NoWarn = \"{0}\"", conf.Options["SuppressWarnings"].ToString().ToLower()); | ||
273 | } | ||
274 | |||
275 | ps.WriteLine("\t\t\t\t Optimize = \"{0}\"", conf.Options["OptimizeCode"].ToString().ToLower()); | ||
276 | ps.WriteLine(" OutputPath = \"{0}\"", | ||
277 | Helper.EndPath(Helper.NormalizePath(conf.Options["OutputPath"].ToString()))); | ||
278 | ps.WriteLine(" RegisterForComInterop = \"{0}\"", conf.Options["RegisterComInterop"].ToString().ToLower()); | ||
279 | ps.WriteLine(" RemoveIntegerChecks = \"{0}\"", conf.Options["RemoveIntegerChecks"].ToString().ToLower()); | ||
280 | ps.WriteLine(" TreatWarningsAsErrors = \"{0}\"", conf.Options["WarningsAsErrors"].ToString().ToLower()); | ||
281 | ps.WriteLine(" WarningLevel = \"{0}\"", conf.Options["WarningLevel"]); | ||
282 | ps.WriteLine(" />"); | ||
283 | } | ||
284 | |||
285 | ps.WriteLine(" </Settings>"); | ||
286 | |||
287 | ps.WriteLine(" <References>"); | ||
288 | foreach(ReferenceNode refr in project.References) | ||
289 | { | ||
290 | ps.WriteLine(" <Reference"); | ||
291 | ps.WriteLine(" Name = \"{0}\"", refr.Name); | ||
292 | ps.WriteLine(" AssemblyName = \"{0}\"", refr.Name); | ||
293 | |||
294 | if(solution.ProjectsTable.ContainsKey(refr.Name)) | ||
295 | { | ||
296 | ProjectNode refProject = (ProjectNode)solution.ProjectsTable[refr.Name]; | ||
297 | ps.WriteLine(" Project = \"{{{0}}}\"", refProject.Guid.ToString().ToUpper()); | ||
298 | ps.WriteLine(" Package = \"{0}\"", toolInfo.Guid.ToString().ToUpper()); | ||
299 | } | ||
300 | else | ||
301 | { | ||
302 | if(refr.Path != null) | ||
303 | { | ||
304 | ps.WriteLine(" HintPath = \"{0}\"", Helper.MakeFilePath(refr.Path, refr.Name, "dll")); | ||
305 | } | ||
306 | |||
307 | } | ||
308 | |||
309 | if(refr.LocalCopySpecified) | ||
310 | { | ||
311 | ps.WriteLine(" Private = \"{0}\"",refr.LocalCopy); | ||
312 | } | ||
313 | |||
314 | ps.WriteLine(" />"); | ||
315 | } | ||
316 | ps.WriteLine(" </References>"); | ||
317 | |||
318 | ps.WriteLine(" </Build>"); | ||
319 | ps.WriteLine(" <Files>"); | ||
320 | |||
321 | ps.WriteLine(" <Include>"); | ||
322 | |||
323 | foreach(string file in project.Files) | ||
324 | { | ||
325 | string fileName = file.Replace(".\\", ""); | ||
326 | ps.WriteLine(" <File"); | ||
327 | ps.WriteLine(" RelPath = \"{0}\"", fileName); | ||
328 | ps.WriteLine(" SubType = \"{0}\"", project.Files.GetSubType(file)); | ||
329 | ps.WriteLine(" BuildAction = \"{0}\"", project.Files.GetBuildAction(file)); | ||
330 | ps.WriteLine(" />"); | ||
331 | |||
332 | if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings) | ||
333 | { | ||
334 | ps.WriteLine(" <File"); | ||
335 | ps.WriteLine(" RelPath = \"{0}\"", fileName.Substring(0, fileName.LastIndexOf('.')) + ".resx"); | ||
336 | int slash = fileName.LastIndexOf('\\'); | ||
337 | if (slash == -1) | ||
338 | { | ||
339 | ps.WriteLine(" DependentUpon = \"{0}\"", fileName); | ||
340 | } | ||
341 | else | ||
342 | { | ||
343 | ps.WriteLine(" DependentUpon = \"{0}\"", fileName.Substring(slash + 1, fileName.Length - slash - 1)); | ||
344 | } | ||
345 | ps.WriteLine(" BuildAction = \"{0}\"", "EmbeddedResource"); | ||
346 | ps.WriteLine(" />"); | ||
347 | |||
348 | } | ||
349 | } | ||
350 | ps.WriteLine(" </Include>"); | ||
351 | |||
352 | ps.WriteLine(" </Files>"); | ||
353 | ps.WriteLine(" </{0}>", toolInfo.XmlTag); | ||
354 | ps.WriteLine("</VisualStudioProject>"); | ||
355 | } | ||
356 | |||
357 | ps = new StreamWriter(projectFile + ".user"); | ||
358 | using(ps) | ||
359 | { | ||
360 | ps.WriteLine("<VisualStudioProject>"); | ||
361 | ps.WriteLine(" <{0}>", toolInfo.XmlTag); | ||
362 | ps.WriteLine(" <Build>"); | ||
363 | |||
364 | ps.WriteLine(" <Settings ReferencePath=\"{0}\">", MakeRefPath(project)); | ||
365 | foreach(ConfigurationNode conf in project.Configurations) | ||
366 | { | ||
367 | ps.WriteLine(" <Config"); | ||
368 | ps.WriteLine(" Name = \"{0}\"", conf.Name); | ||
369 | ps.WriteLine(" />"); | ||
370 | } | ||
371 | ps.WriteLine(" </Settings>"); | ||
372 | |||
373 | ps.WriteLine(" </Build>"); | ||
374 | ps.WriteLine(" </{0}>", toolInfo.XmlTag); | ||
375 | ps.WriteLine("</VisualStudioProject>"); | ||
376 | } | ||
377 | |||
378 | m_Kernel.CurrentWorkingDirectory.Pop(); | ||
379 | } | ||
380 | |||
381 | /// <summary> | ||
382 | /// Gets the XML doc file. | ||
383 | /// </summary> | ||
384 | /// <param name="project">The project.</param> | ||
385 | /// <param name="conf">The conf.</param> | ||
386 | /// <returns></returns> | ||
387 | public static string GetXmlDocFile(ProjectNode project, ConfigurationNode conf) | ||
388 | { | ||
389 | if( conf == null ) | ||
390 | { | ||
391 | throw new ArgumentNullException("conf"); | ||
392 | } | ||
393 | if( project == null ) | ||
394 | { | ||
395 | throw new ArgumentNullException("project"); | ||
396 | } | ||
397 | // if(!(bool)conf.Options["GenerateXmlDocFile"]) //default to none, if the generate option is false | ||
398 | // { | ||
399 | // return string.Empty; | ||
400 | // } | ||
401 | |||
402 | //default to "AssemblyName.xml" | ||
403 | //string defaultValue = Path.GetFileNameWithoutExtension(project.AssemblyName) + ".xml"; | ||
404 | //return (string)conf.Options["XmlDocFile", defaultValue]; | ||
405 | |||
406 | //default to no XmlDocFile file | ||
407 | return (string)conf.Options["XmlDocFile", ""]; | ||
408 | } | ||
409 | |||
410 | private void WriteSolution(SolutionNode solution) | ||
411 | { | ||
412 | m_Kernel.Log.Write("Creating Visual Studio {0} solution and project files", this.VersionName); | ||
413 | |||
414 | foreach(ProjectNode project in solution.Projects) | ||
415 | { | ||
416 | if(m_Kernel.AllowProject(project.FilterGroups)) | ||
417 | { | ||
418 | m_Kernel.Log.Write("...Creating project: {0}", project.Name); | ||
419 | WriteProject(solution, project); | ||
420 | } | ||
421 | } | ||
422 | |||
423 | m_Kernel.Log.Write(""); | ||
424 | string solutionFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln"); | ||
425 | StreamWriter ss = new StreamWriter(solutionFile); | ||
426 | |||
427 | m_Kernel.CurrentWorkingDirectory.Push(); | ||
428 | Helper.SetCurrentDir(Path.GetDirectoryName(solutionFile)); | ||
429 | |||
430 | using(ss) | ||
431 | { | ||
432 | ss.WriteLine("Microsoft Visual Studio Solution File, Format Version {0}", this.SolutionVersion); | ||
433 | foreach(ProjectNode project in solution.Projects) | ||
434 | { | ||
435 | if(!m_Tools.ContainsKey(project.Language)) | ||
436 | { | ||
437 | throw new UnknownLanguageException("Unknown .NET language: " + project.Language); | ||
438 | } | ||
439 | |||
440 | ToolInfo toolInfo = (ToolInfo)m_Tools[project.Language]; | ||
441 | |||
442 | string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); | ||
443 | ss.WriteLine("Project(\"{0}\") = \"{1}\", \"{2}\", \"{{{3}}}\"", | ||
444 | toolInfo.Guid, project.Name, Helper.MakeFilePath(path, project.Name, | ||
445 | toolInfo.FileExtension), project.Guid.ToString().ToUpper()); | ||
446 | |||
447 | ss.WriteLine("\tProjectSection(ProjectDependencies) = postProject"); | ||
448 | ss.WriteLine("\tEndProjectSection"); | ||
449 | |||
450 | ss.WriteLine("EndProject"); | ||
451 | } | ||
452 | |||
453 | ss.WriteLine("Global"); | ||
454 | |||
455 | ss.WriteLine("\tGlobalSection(SolutionConfiguration) = preSolution"); | ||
456 | foreach(ConfigurationNode conf in solution.Configurations) | ||
457 | { | ||
458 | ss.WriteLine("\t\t{0} = {0}", conf.Name); | ||
459 | } | ||
460 | ss.WriteLine("\tEndGlobalSection"); | ||
461 | |||
462 | ss.WriteLine("\tGlobalSection(ProjectDependencies) = postSolution"); | ||
463 | foreach(ProjectNode project in solution.Projects) | ||
464 | { | ||
465 | for(int i = 0; i < project.References.Count; i++) | ||
466 | { | ||
467 | ReferenceNode refr = (ReferenceNode)project.References[i]; | ||
468 | if(solution.ProjectsTable.ContainsKey(refr.Name)) | ||
469 | { | ||
470 | ProjectNode refProject = (ProjectNode)solution.ProjectsTable[refr.Name]; | ||
471 | ss.WriteLine("\t\t({{{0}}}).{1} = ({{{2}}})", | ||
472 | project.Guid.ToString().ToUpper() | ||
473 | , i, | ||
474 | refProject.Guid.ToString().ToUpper() | ||
475 | ); | ||
476 | } | ||
477 | } | ||
478 | } | ||
479 | ss.WriteLine("\tEndGlobalSection"); | ||
480 | |||
481 | ss.WriteLine("\tGlobalSection(ProjectConfiguration) = postSolution"); | ||
482 | foreach(ProjectNode project in solution.Projects) | ||
483 | { | ||
484 | foreach(ConfigurationNode conf in solution.Configurations) | ||
485 | { | ||
486 | ss.WriteLine("\t\t{{{0}}}.{1}.ActiveCfg = {1}|.NET", | ||
487 | project.Guid.ToString().ToUpper(), | ||
488 | conf.Name); | ||
489 | |||
490 | ss.WriteLine("\t\t{{{0}}}.{1}.Build.0 = {1}|.NET", | ||
491 | project.Guid.ToString().ToUpper(), | ||
492 | conf.Name); | ||
493 | } | ||
494 | } | ||
495 | ss.WriteLine("\tEndGlobalSection"); | ||
496 | |||
497 | if(solution.Files != null) | ||
498 | { | ||
499 | ss.WriteLine("\tGlobalSection(SolutionItems) = postSolution"); | ||
500 | foreach(string file in solution.Files) | ||
501 | { | ||
502 | ss.WriteLine("\t\t{0} = {0}", file); | ||
503 | } | ||
504 | ss.WriteLine("\tEndGlobalSection"); | ||
505 | } | ||
506 | |||
507 | ss.WriteLine("\tGlobalSection(ExtensibilityGlobals) = postSolution"); | ||
508 | ss.WriteLine("\tEndGlobalSection"); | ||
509 | ss.WriteLine("\tGlobalSection(ExtensibilityAddIns) = postSolution"); | ||
510 | ss.WriteLine("\tEndGlobalSection"); | ||
511 | |||
512 | ss.WriteLine("EndGlobal"); | ||
513 | } | ||
514 | |||
515 | m_Kernel.CurrentWorkingDirectory.Pop(); | ||
516 | } | ||
517 | |||
518 | private void CleanProject(ProjectNode project) | ||
519 | { | ||
520 | m_Kernel.Log.Write("...Cleaning project: {0}", project.Name); | ||
521 | |||
522 | ToolInfo toolInfo = (ToolInfo)m_Tools[project.Language]; | ||
523 | string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension); | ||
524 | string userFile = projectFile + ".user"; | ||
525 | |||
526 | Helper.DeleteIfExists(projectFile); | ||
527 | Helper.DeleteIfExists(userFile); | ||
528 | } | ||
529 | |||
530 | private void CleanSolution(SolutionNode solution) | ||
531 | { | ||
532 | m_Kernel.Log.Write("Cleaning Visual Studio {0} solution and project files", this.VersionName, solution.Name); | ||
533 | |||
534 | string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln"); | ||
535 | string suoFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "suo"); | ||
536 | |||
537 | Helper.DeleteIfExists(slnFile); | ||
538 | Helper.DeleteIfExists(suoFile); | ||
539 | |||
540 | foreach(ProjectNode project in solution.Projects) | ||
541 | { | ||
542 | CleanProject(project); | ||
543 | } | ||
544 | |||
545 | m_Kernel.Log.Write(""); | ||
546 | } | ||
547 | |||
548 | #endregion | ||
549 | |||
550 | #region ITarget Members | ||
551 | |||
552 | /// <summary> | ||
553 | /// Writes the specified kern. | ||
554 | /// </summary> | ||
555 | /// <param name="kern">The kern.</param> | ||
556 | public virtual void Write(Kernel kern) | ||
557 | { | ||
558 | if( kern == null ) | ||
559 | { | ||
560 | throw new ArgumentNullException("kern"); | ||
561 | } | ||
562 | m_Kernel = kern; | ||
563 | foreach(SolutionNode sol in m_Kernel.Solutions) | ||
564 | { | ||
565 | WriteSolution(sol); | ||
566 | } | ||
567 | m_Kernel = null; | ||
568 | } | ||
569 | |||
570 | /// <summary> | ||
571 | /// Cleans the specified kern. | ||
572 | /// </summary> | ||
573 | /// <param name="kern">The kern.</param> | ||
574 | public virtual void Clean(Kernel kern) | ||
575 | { | ||
576 | if( kern == null ) | ||
577 | { | ||
578 | throw new ArgumentNullException("kern"); | ||
579 | } | ||
580 | m_Kernel = kern; | ||
581 | foreach(SolutionNode sol in m_Kernel.Solutions) | ||
582 | { | ||
583 | CleanSolution(sol); | ||
584 | } | ||
585 | m_Kernel = null; | ||
586 | } | ||
587 | |||
588 | /// <summary> | ||
589 | /// Gets the name. | ||
590 | /// </summary> | ||
591 | /// <value>The name.</value> | ||
592 | public virtual string Name | ||
593 | { | ||
594 | get | ||
595 | { | ||
596 | return "vs2003"; | ||
597 | } | ||
598 | } | ||
599 | |||
600 | #endregion | ||
601 | } | ||
602 | } | ||
diff --git a/Prebuild/src/Core/Targets/VS2005Target.cs b/Prebuild/src/Core/Targets/VS2005Target.cs deleted file mode 100644 index 63461c9..0000000 --- a/Prebuild/src/Core/Targets/VS2005Target.cs +++ /dev/null | |||
@@ -1,149 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004 Matthew Holmes (matthew@wildfiregames.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Collections; | ||
28 | using System.Collections.Specialized; | ||
29 | using System.IO; | ||
30 | using System.Text; | ||
31 | |||
32 | using Prebuild.Core.Attributes; | ||
33 | using Prebuild.Core.Interfaces; | ||
34 | using Prebuild.Core.Nodes; | ||
35 | using Prebuild.Core.Utilities; | ||
36 | |||
37 | namespace Prebuild.Core.Targets | ||
38 | { | ||
39 | /// <summary> | ||
40 | /// | ||
41 | /// </summary> | ||
42 | [Target("vs2005")] | ||
43 | public class VS2005Target : VSGenericTarget | ||
44 | { | ||
45 | #region Inner Classes | ||
46 | |||
47 | #endregion | ||
48 | |||
49 | #region Fields | ||
50 | |||
51 | string solutionVersion = "9.00"; | ||
52 | string productVersion = "8.0.50727"; | ||
53 | string schemaVersion = "2.0"; | ||
54 | string versionName = "Visual C# 2005"; | ||
55 | string name = "vs2005"; | ||
56 | |||
57 | VSVersion version = VSVersion.VS80; | ||
58 | |||
59 | public override string SolutionTag | ||
60 | { | ||
61 | get { return "# Visual Studio 2005"; } | ||
62 | } | ||
63 | |||
64 | protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion) | ||
65 | { | ||
66 | return string.Empty; | ||
67 | } | ||
68 | /// <summary> | ||
69 | /// Gets or sets the solution version. | ||
70 | /// </summary> | ||
71 | /// <value>The solution version.</value> | ||
72 | public override string SolutionVersion | ||
73 | { | ||
74 | get | ||
75 | { | ||
76 | return solutionVersion; | ||
77 | } | ||
78 | } | ||
79 | /// <summary> | ||
80 | /// Gets or sets the product version. | ||
81 | /// </summary> | ||
82 | /// <value>The product version.</value> | ||
83 | public override string ProductVersion | ||
84 | { | ||
85 | get | ||
86 | { | ||
87 | return productVersion; | ||
88 | } | ||
89 | } | ||
90 | /// <summary> | ||
91 | /// Gets or sets the schema version. | ||
92 | /// </summary> | ||
93 | /// <value>The schema version.</value> | ||
94 | public override string SchemaVersion | ||
95 | { | ||
96 | get | ||
97 | { | ||
98 | return schemaVersion; | ||
99 | } | ||
100 | } | ||
101 | /// <summary> | ||
102 | /// Gets or sets the name of the version. | ||
103 | /// </summary> | ||
104 | /// <value>The name of the version.</value> | ||
105 | public override string VersionName | ||
106 | { | ||
107 | get | ||
108 | { | ||
109 | return versionName; | ||
110 | } | ||
111 | } | ||
112 | /// <summary> | ||
113 | /// Gets or sets the version. | ||
114 | /// </summary> | ||
115 | /// <value>The version.</value> | ||
116 | public override VSVersion Version | ||
117 | { | ||
118 | get | ||
119 | { | ||
120 | return version; | ||
121 | } | ||
122 | } | ||
123 | /// <summary> | ||
124 | /// Gets the name. | ||
125 | /// </summary> | ||
126 | /// <value>The name.</value> | ||
127 | public override string Name | ||
128 | { | ||
129 | get | ||
130 | { | ||
131 | return name; | ||
132 | } | ||
133 | } | ||
134 | |||
135 | #endregion | ||
136 | |||
137 | #region Constructors | ||
138 | |||
139 | /// <summary> | ||
140 | /// Initializes a new instance of the <see cref="VS2005Target"/> class. | ||
141 | /// </summary> | ||
142 | public VS2005Target() | ||
143 | : base() | ||
144 | { | ||
145 | } | ||
146 | |||
147 | #endregion | ||
148 | } | ||
149 | } | ||
diff --git a/Prebuild/src/Core/Targets/VS2008Target.cs b/Prebuild/src/Core/Targets/VS2008Target.cs deleted file mode 100644 index e685962..0000000 --- a/Prebuild/src/Core/Targets/VS2008Target.cs +++ /dev/null | |||
@@ -1,132 +0,0 @@ | |||
1 | using System; | ||
2 | using System.Collections; | ||
3 | using System.Collections.Specialized; | ||
4 | using System.IO; | ||
5 | using System.Text; | ||
6 | |||
7 | using Prebuild.Core.Attributes; | ||
8 | using Prebuild.Core.Interfaces; | ||
9 | using Prebuild.Core.Nodes; | ||
10 | using Prebuild.Core.Utilities; | ||
11 | using System.CodeDom.Compiler; | ||
12 | |||
13 | namespace Prebuild.Core.Targets | ||
14 | { | ||
15 | |||
16 | /// <summary> | ||
17 | /// | ||
18 | /// </summary> | ||
19 | [Target("vs2008")] | ||
20 | public class VS2008Target : VSGenericTarget | ||
21 | { | ||
22 | #region Fields | ||
23 | string solutionVersion = "10.00"; | ||
24 | string productVersion = "9.0.21022"; | ||
25 | string schemaVersion = "2.0"; | ||
26 | string versionName = "Visual Studio 2008"; | ||
27 | string name = "vs2008"; | ||
28 | VSVersion version = VSVersion.VS90; | ||
29 | |||
30 | Hashtable tools; | ||
31 | Kernel kernel; | ||
32 | |||
33 | /// <summary> | ||
34 | /// Gets or sets the solution version. | ||
35 | /// </summary> | ||
36 | /// <value>The solution version.</value> | ||
37 | public override string SolutionVersion | ||
38 | { | ||
39 | get | ||
40 | { | ||
41 | return solutionVersion; | ||
42 | } | ||
43 | } | ||
44 | /// <summary> | ||
45 | /// Gets or sets the product version. | ||
46 | /// </summary> | ||
47 | /// <value>The product version.</value> | ||
48 | public override string ProductVersion | ||
49 | { | ||
50 | get | ||
51 | { | ||
52 | return productVersion; | ||
53 | } | ||
54 | } | ||
55 | /// <summary> | ||
56 | /// Gets or sets the schema version. | ||
57 | /// </summary> | ||
58 | /// <value>The schema version.</value> | ||
59 | public override string SchemaVersion | ||
60 | { | ||
61 | get | ||
62 | { | ||
63 | return schemaVersion; | ||
64 | } | ||
65 | } | ||
66 | /// <summary> | ||
67 | /// Gets or sets the name of the version. | ||
68 | /// </summary> | ||
69 | /// <value>The name of the version.</value> | ||
70 | public override string VersionName | ||
71 | { | ||
72 | get | ||
73 | { | ||
74 | return versionName; | ||
75 | } | ||
76 | } | ||
77 | /// <summary> | ||
78 | /// Gets or sets the version. | ||
79 | /// </summary> | ||
80 | /// <value>The version.</value> | ||
81 | public override VSVersion Version | ||
82 | { | ||
83 | get | ||
84 | { | ||
85 | return version; | ||
86 | } | ||
87 | } | ||
88 | /// <summary> | ||
89 | /// Gets the name. | ||
90 | /// </summary> | ||
91 | /// <value>The name.</value> | ||
92 | public override string Name | ||
93 | { | ||
94 | get | ||
95 | { | ||
96 | return name; | ||
97 | } | ||
98 | } | ||
99 | |||
100 | protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion) | ||
101 | { | ||
102 | switch (frameworkVersion) | ||
103 | { | ||
104 | case FrameworkVersion.v3_5: | ||
105 | return "ToolsVersion=\"3.5\""; | ||
106 | case FrameworkVersion.v3_0: | ||
107 | return "ToolsVersion=\"3.0\""; | ||
108 | default: | ||
109 | return "ToolsVersion=\"2.0\""; | ||
110 | } | ||
111 | } | ||
112 | |||
113 | public override string SolutionTag | ||
114 | { | ||
115 | get { return "# Visual Studio 2008"; } | ||
116 | } | ||
117 | |||
118 | #endregion | ||
119 | |||
120 | #region Constructors | ||
121 | |||
122 | /// <summary> | ||
123 | /// Initializes a new instance of the <see cref="VS2008Target"/> class. | ||
124 | /// </summary> | ||
125 | public VS2008Target() | ||
126 | : base() | ||
127 | { | ||
128 | } | ||
129 | |||
130 | #endregion | ||
131 | } | ||
132 | } | ||
diff --git a/Prebuild/src/Core/Targets/VS2010Target.cs b/Prebuild/src/Core/Targets/VS2010Target.cs deleted file mode 100644 index 8772d18..0000000 --- a/Prebuild/src/Core/Targets/VS2010Target.cs +++ /dev/null | |||
@@ -1,134 +0,0 @@ | |||
1 | using System; | ||
2 | using System.Collections; | ||
3 | using System.Collections.Specialized; | ||
4 | using System.IO; | ||
5 | using System.Text; | ||
6 | |||
7 | using Prebuild.Core.Attributes; | ||
8 | using Prebuild.Core.Interfaces; | ||
9 | using Prebuild.Core.Nodes; | ||
10 | using Prebuild.Core.Utilities; | ||
11 | using System.CodeDom.Compiler; | ||
12 | |||
13 | namespace Prebuild.Core.Targets | ||
14 | { | ||
15 | |||
16 | /// <summary> | ||
17 | /// | ||
18 | /// </summary> | ||
19 | [Target("vs2010")] | ||
20 | public class VS2010Target : VSGenericTarget | ||
21 | { | ||
22 | #region Fields | ||
23 | string solutionVersion = "11.00"; | ||
24 | string productVersion = "9.0.21022"; | ||
25 | string schemaVersion = "2.0"; | ||
26 | string versionName = "Visual Studio 2010"; | ||
27 | string name = "vs2008"; | ||
28 | VSVersion version = VSVersion.VS10; | ||
29 | |||
30 | Hashtable tools; | ||
31 | Kernel kernel; | ||
32 | |||
33 | /// <summary> | ||
34 | /// Gets or sets the solution version. | ||
35 | /// </summary> | ||
36 | /// <value>The solution version.</value> | ||
37 | public override string SolutionVersion | ||
38 | { | ||
39 | get | ||
40 | { | ||
41 | return solutionVersion; | ||
42 | } | ||
43 | } | ||
44 | /// <summary> | ||
45 | /// Gets or sets the product version. | ||
46 | /// </summary> | ||
47 | /// <value>The product version.</value> | ||
48 | public override string ProductVersion | ||
49 | { | ||
50 | get | ||
51 | { | ||
52 | return productVersion; | ||
53 | } | ||
54 | } | ||
55 | /// <summary> | ||
56 | /// Gets or sets the schema version. | ||
57 | /// </summary> | ||
58 | /// <value>The schema version.</value> | ||
59 | public override string SchemaVersion | ||
60 | { | ||
61 | get | ||
62 | { | ||
63 | return schemaVersion; | ||
64 | } | ||
65 | } | ||
66 | /// <summary> | ||
67 | /// Gets or sets the name of the version. | ||
68 | /// </summary> | ||
69 | /// <value>The name of the version.</value> | ||
70 | public override string VersionName | ||
71 | { | ||
72 | get | ||
73 | { | ||
74 | return versionName; | ||
75 | } | ||
76 | } | ||
77 | /// <summary> | ||
78 | /// Gets or sets the version. | ||
79 | /// </summary> | ||
80 | /// <value>The version.</value> | ||
81 | public override VSVersion Version | ||
82 | { | ||
83 | get | ||
84 | { | ||
85 | return version; | ||
86 | } | ||
87 | } | ||
88 | /// <summary> | ||
89 | /// Gets the name. | ||
90 | /// </summary> | ||
91 | /// <value>The name.</value> | ||
92 | public override string Name | ||
93 | { | ||
94 | get | ||
95 | { | ||
96 | return name; | ||
97 | } | ||
98 | } | ||
99 | |||
100 | protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion) | ||
101 | { | ||
102 | switch (frameworkVersion) | ||
103 | { | ||
104 | case FrameworkVersion.v4_0: | ||
105 | return "ToolsVersion=\"4.0\""; | ||
106 | case FrameworkVersion.v3_5: | ||
107 | return "ToolsVersion=\"3.5\""; | ||
108 | case FrameworkVersion.v3_0: | ||
109 | return "ToolsVersion=\"3.0\""; | ||
110 | default: | ||
111 | return "ToolsVersion=\"2.0\""; | ||
112 | } | ||
113 | } | ||
114 | |||
115 | public override string SolutionTag | ||
116 | { | ||
117 | get { return "# Visual Studio 2010"; } | ||
118 | } | ||
119 | |||
120 | #endregion | ||
121 | |||
122 | #region Constructors | ||
123 | |||
124 | /// <summary> | ||
125 | /// Initializes a new instance of the <see cref="VS2010Target"/> class. | ||
126 | /// </summary> | ||
127 | public VS2010Target() | ||
128 | : base() | ||
129 | { | ||
130 | } | ||
131 | |||
132 | #endregion | ||
133 | } | ||
134 | } | ||
diff --git a/Prebuild/src/Core/Targets/VSGenericTarget.cs b/Prebuild/src/Core/Targets/VSGenericTarget.cs deleted file mode 100644 index fdcc2b9..0000000 --- a/Prebuild/src/Core/Targets/VSGenericTarget.cs +++ /dev/null | |||
@@ -1,887 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2008 Matthew Holmes (matthew@wildfiregames.com), John Anderson (sontek@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Collections; | ||
28 | using System.Collections.Generic; | ||
29 | using System.Collections.Specialized; | ||
30 | using System.IO; | ||
31 | using System.Text; | ||
32 | |||
33 | using Prebuild.Core.Attributes; | ||
34 | using Prebuild.Core.Interfaces; | ||
35 | using Prebuild.Core.Nodes; | ||
36 | using Prebuild.Core.Utilities; | ||
37 | using System.CodeDom.Compiler; | ||
38 | |||
39 | namespace Prebuild.Core.Targets | ||
40 | { | ||
41 | |||
42 | /// <summary> | ||
43 | /// | ||
44 | /// </summary> | ||
45 | public abstract class VSGenericTarget : ITarget | ||
46 | { | ||
47 | #region Fields | ||
48 | |||
49 | readonly Hashtable tools = new Hashtable(); | ||
50 | Kernel kernel; | ||
51 | #endregion | ||
52 | |||
53 | #region Properties | ||
54 | /// <summary> | ||
55 | /// Gets or sets the solution version. | ||
56 | /// </summary> | ||
57 | /// <value>The solution version.</value> | ||
58 | public abstract string SolutionVersion { get; } | ||
59 | /// <summary> | ||
60 | /// Gets or sets the product version. | ||
61 | /// </summary> | ||
62 | /// <value>The product version.</value> | ||
63 | public abstract string ProductVersion { get; } | ||
64 | /// <summary> | ||
65 | /// Gets or sets the schema version. | ||
66 | /// </summary> | ||
67 | /// <value>The schema version.</value> | ||
68 | public abstract string SchemaVersion { get; } | ||
69 | /// <summary> | ||
70 | /// Gets or sets the name of the version. | ||
71 | /// </summary> | ||
72 | /// <value>The name of the version.</value> | ||
73 | public abstract string VersionName { get; } | ||
74 | /// <summary> | ||
75 | /// Gets or sets the version. | ||
76 | /// </summary> | ||
77 | /// <value>The version.</value> | ||
78 | public abstract VSVersion Version { get; } | ||
79 | /// <summary> | ||
80 | /// Gets the name. | ||
81 | /// </summary> | ||
82 | /// <value>The name.</value> | ||
83 | public abstract string Name { get; } | ||
84 | |||
85 | protected abstract string GetToolsVersionXml(FrameworkVersion version); | ||
86 | public abstract string SolutionTag { get; } | ||
87 | |||
88 | #endregion | ||
89 | |||
90 | #region Constructors | ||
91 | |||
92 | /// <summary> | ||
93 | /// Initializes a new instance of the <see cref="VSGenericTarget"/> class. | ||
94 | /// </summary> | ||
95 | protected VSGenericTarget() | ||
96 | { | ||
97 | this.tools["C#"] = new ToolInfo("C#", "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}", "csproj", "CSHARP", "$(MSBuildBinPath)\\Microsoft.CSHARP.Targets"); | ||
98 | this.tools["Database"] = new ToolInfo("Database", "{4F174C21-8C12-11D0-8340-0000F80270F8}", "dbp", "UNKNOWN"); | ||
99 | this.tools["Boo"] = new ToolInfo("Boo", "{45CEA7DC-C2ED-48A6-ACE0-E16144C02365}", "booproj", "Boo", "$(BooBinPath)\\Boo.Microsoft.Build.targets"); | ||
100 | this.tools["VisualBasic"] = new ToolInfo("VisualBasic", "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}", "vbproj", "VisualBasic", "$(MSBuildBinPath)\\Microsoft.VisualBasic.Targets"); | ||
101 | this.tools["Folder"] = new ToolInfo("Folder", "{2150E333-8FDC-42A3-9474-1A3956D46DE8}", null, null); | ||
102 | } | ||
103 | |||
104 | #endregion | ||
105 | |||
106 | #region Private Methods | ||
107 | |||
108 | private string MakeRefPath(ProjectNode project) | ||
109 | { | ||
110 | string ret = ""; | ||
111 | foreach (ReferencePathNode node in project.ReferencePaths) | ||
112 | { | ||
113 | try | ||
114 | { | ||
115 | string fullPath = Helper.ResolvePath(node.Path); | ||
116 | if (ret.Length < 1) | ||
117 | { | ||
118 | ret = fullPath; | ||
119 | } | ||
120 | else | ||
121 | { | ||
122 | ret += ";" + fullPath; | ||
123 | } | ||
124 | } | ||
125 | catch (ArgumentException) | ||
126 | { | ||
127 | this.kernel.Log.Write(LogType.Warning, "Could not resolve reference path: {0}", node.Path); | ||
128 | } | ||
129 | } | ||
130 | |||
131 | return ret; | ||
132 | } | ||
133 | |||
134 | private static ProjectNode FindProjectInSolution(string name, SolutionNode solution) | ||
135 | { | ||
136 | SolutionNode node = solution; | ||
137 | |||
138 | while (node.Parent is SolutionNode) | ||
139 | node = node.Parent as SolutionNode; | ||
140 | |||
141 | return FindProjectInSolutionRecursively(name, node); | ||
142 | } | ||
143 | |||
144 | private static ProjectNode FindProjectInSolutionRecursively(string name, SolutionNode solution) | ||
145 | { | ||
146 | if (solution.ProjectsTable.ContainsKey(name)) | ||
147 | return (ProjectNode)solution.ProjectsTable[name]; | ||
148 | |||
149 | foreach (SolutionNode child in solution.Solutions) | ||
150 | { | ||
151 | ProjectNode node = FindProjectInSolutionRecursively(name, child); | ||
152 | if (node != null) | ||
153 | return node; | ||
154 | } | ||
155 | |||
156 | return null; | ||
157 | } | ||
158 | |||
159 | private void WriteProject(SolutionNode solution, ProjectNode project) | ||
160 | { | ||
161 | if (!tools.ContainsKey(project.Language)) | ||
162 | { | ||
163 | throw new UnknownLanguageException("Unknown .NET language: " + project.Language); | ||
164 | } | ||
165 | |||
166 | ToolInfo toolInfo = (ToolInfo)tools[project.Language]; | ||
167 | string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension); | ||
168 | StreamWriter ps = new StreamWriter(projectFile); | ||
169 | |||
170 | kernel.CurrentWorkingDirectory.Push(); | ||
171 | Helper.SetCurrentDir(Path.GetDirectoryName(projectFile)); | ||
172 | |||
173 | #region Project File | ||
174 | using (ps) | ||
175 | { | ||
176 | ps.WriteLine("<Project DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\" ToolsVersion=\"{0}\">", this.Version == VSVersion.VS10 ? "4.0" : "3.5"); | ||
177 | ps.WriteLine(" <PropertyGroup>"); | ||
178 | ps.WriteLine(" <ProjectType>Local</ProjectType>"); | ||
179 | ps.WriteLine(" <ProductVersion>{0}</ProductVersion>", this.ProductVersion); | ||
180 | ps.WriteLine(" <SchemaVersion>{0}</SchemaVersion>", this.SchemaVersion); | ||
181 | ps.WriteLine(" <ProjectGuid>{{{0}}}</ProjectGuid>", project.Guid.ToString().ToUpper()); | ||
182 | |||
183 | // Visual Studio has a hard coded guid for the project type | ||
184 | if (project.Type == ProjectType.Web) | ||
185 | ps.WriteLine(" <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>"); | ||
186 | ps.WriteLine(" <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>"); | ||
187 | ps.WriteLine(" <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>"); | ||
188 | ps.WriteLine(" <ApplicationIcon>{0}</ApplicationIcon>", project.AppIcon); | ||
189 | ps.WriteLine(" <AssemblyKeyContainerName>"); | ||
190 | ps.WriteLine(" </AssemblyKeyContainerName>"); | ||
191 | ps.WriteLine(" <AssemblyName>{0}</AssemblyName>", project.AssemblyName); | ||
192 | foreach (ConfigurationNode conf in project.Configurations) | ||
193 | { | ||
194 | if (conf.Options.KeyFile != "") | ||
195 | { | ||
196 | ps.WriteLine(" <AssemblyOriginatorKeyFile>{0}</AssemblyOriginatorKeyFile>", conf.Options.KeyFile); | ||
197 | ps.WriteLine(" <SignAssembly>true</SignAssembly>"); | ||
198 | break; | ||
199 | } | ||
200 | } | ||
201 | ps.WriteLine(" <DefaultClientScript>JScript</DefaultClientScript>"); | ||
202 | ps.WriteLine(" <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>"); | ||
203 | ps.WriteLine(" <DefaultTargetSchema>IE50</DefaultTargetSchema>"); | ||
204 | ps.WriteLine(" <DelaySign>false</DelaySign>"); | ||
205 | ps.WriteLine(" <TargetFrameworkVersion>{0}</TargetFrameworkVersion>", project.FrameworkVersion.ToString().Replace("_", ".")); | ||
206 | |||
207 | ps.WriteLine(" <OutputType>{0}</OutputType>", project.Type == ProjectType.Web ? ProjectType.Library.ToString() : project.Type.ToString()); | ||
208 | ps.WriteLine(" <AppDesignerFolder>{0}</AppDesignerFolder>", project.DesignerFolder); | ||
209 | ps.WriteLine(" <RootNamespace>{0}</RootNamespace>", project.RootNamespace); | ||
210 | ps.WriteLine(" <StartupObject>{0}</StartupObject>", project.StartupObject); | ||
211 | if (string.IsNullOrEmpty(project.DebugStartParameters)) | ||
212 | { | ||
213 | ps.WriteLine(" <StartArguments>{0}</StartArguments>", project.DebugStartParameters); | ||
214 | } | ||
215 | ps.WriteLine(" <FileUpgradeFlags>"); | ||
216 | ps.WriteLine(" </FileUpgradeFlags>"); | ||
217 | |||
218 | ps.WriteLine(" </PropertyGroup>"); | ||
219 | |||
220 | foreach (ConfigurationNode conf in project.Configurations) | ||
221 | { | ||
222 | ps.Write(" <PropertyGroup "); | ||
223 | ps.WriteLine("Condition=\" '$(Configuration)|$(Platform)' == '{0}|AnyCPU' \">", conf.Name); | ||
224 | ps.WriteLine(" <AllowUnsafeBlocks>{0}</AllowUnsafeBlocks>", conf.Options["AllowUnsafe"]); | ||
225 | ps.WriteLine(" <BaseAddress>{0}</BaseAddress>", conf.Options["BaseAddress"]); | ||
226 | ps.WriteLine(" <CheckForOverflowUnderflow>{0}</CheckForOverflowUnderflow>", conf.Options["CheckUnderflowOverflow"]); | ||
227 | ps.WriteLine(" <ConfigurationOverrideFile>"); | ||
228 | ps.WriteLine(" </ConfigurationOverrideFile>"); | ||
229 | ps.WriteLine(" <DefineConstants>{0}</DefineConstants>", conf.Options["CompilerDefines"]); | ||
230 | ps.WriteLine(" <DocumentationFile>{0}</DocumentationFile>", Helper.NormalizePath(conf.Options["XmlDocFile"].ToString())); | ||
231 | ps.WriteLine(" <DebugSymbols>{0}</DebugSymbols>", conf.Options["DebugInformation"]); | ||
232 | ps.WriteLine(" <FileAlignment>{0}</FileAlignment>", conf.Options["FileAlignment"]); | ||
233 | ps.WriteLine(" <Optimize>{0}</Optimize>", conf.Options["OptimizeCode"]); | ||
234 | if (project.Type != ProjectType.Web) | ||
235 | ps.WriteLine(" <OutputPath>{0}</OutputPath>", | ||
236 | Helper.EndPath(Helper.NormalizePath(conf.Options["OutputPath"].ToString()))); | ||
237 | else | ||
238 | ps.WriteLine(" <OutputPath>{0}</OutputPath>", | ||
239 | Helper.EndPath(Helper.NormalizePath("bin\\"))); | ||
240 | |||
241 | ps.WriteLine(" <RegisterForComInterop>{0}</RegisterForComInterop>", conf.Options["RegisterComInterop"]); | ||
242 | ps.WriteLine(" <RemoveIntegerChecks>{0}</RemoveIntegerChecks>", conf.Options["RemoveIntegerChecks"]); | ||
243 | ps.WriteLine(" <TreatWarningsAsErrors>{0}</TreatWarningsAsErrors>", conf.Options["WarningsAsErrors"]); | ||
244 | ps.WriteLine(" <WarningLevel>{0}</WarningLevel>", conf.Options["WarningLevel"]); | ||
245 | ps.WriteLine(" <NoStdLib>{0}</NoStdLib>", conf.Options["NoStdLib"]); | ||
246 | ps.WriteLine(" <NoWarn>{0}</NoWarn>", conf.Options["SuppressWarnings"]); | ||
247 | ps.WriteLine(" </PropertyGroup>"); | ||
248 | } | ||
249 | |||
250 | //ps.WriteLine(" </Settings>"); | ||
251 | |||
252 | List<ProjectNode> projectReferences = new List<ProjectNode>(); | ||
253 | List<ReferenceNode> otherReferences = new List<ReferenceNode>(); | ||
254 | |||
255 | foreach (ReferenceNode refr in project.References) | ||
256 | { | ||
257 | ProjectNode projectNode = FindProjectInSolution(refr.Name, solution); | ||
258 | |||
259 | if (projectNode == null) | ||
260 | otherReferences.Add(refr); | ||
261 | else | ||
262 | projectReferences.Add(projectNode); | ||
263 | } | ||
264 | // Assembly References | ||
265 | ps.WriteLine(" <ItemGroup>"); | ||
266 | |||
267 | foreach (ReferenceNode refr in otherReferences) | ||
268 | { | ||
269 | ps.Write(" <Reference"); | ||
270 | ps.Write(" Include=\""); | ||
271 | ps.Write(refr.Name); | ||
272 | ps.WriteLine("\" >"); | ||
273 | ps.Write(" <Name>"); | ||
274 | ps.Write(refr.Name); | ||
275 | ps.WriteLine("</Name>"); | ||
276 | // TODO: Allow reference to *.exe files | ||
277 | ps.WriteLine(" <Private>{0}</Private>", refr.LocalCopy); | ||
278 | ps.WriteLine(" </Reference>"); | ||
279 | } | ||
280 | ps.WriteLine(" </ItemGroup>"); | ||
281 | |||
282 | //Project References | ||
283 | ps.WriteLine(" <ItemGroup>"); | ||
284 | foreach (ProjectNode projectReference in projectReferences) | ||
285 | { | ||
286 | ToolInfo tool = (ToolInfo)tools[projectReference.Language]; | ||
287 | if (tools == null) | ||
288 | throw new UnknownLanguageException(); | ||
289 | |||
290 | string path = | ||
291 | Helper.MakePathRelativeTo(project.FullPath, | ||
292 | Helper.MakeFilePath(projectReference.FullPath, projectReference.Name, tool.FileExtension)); | ||
293 | ps.WriteLine(" <ProjectReference Include=\"{0}\">", path); | ||
294 | |||
295 | // TODO: Allow reference to visual basic projects | ||
296 | ps.WriteLine(" <Name>{0}</Name>", projectReference.Name); | ||
297 | ps.WriteLine(" <Project>{0}</Project>", projectReference.Guid.ToString("B").ToUpper()); | ||
298 | ps.WriteLine(" <Package>{0}</Package>", tool.Guid.ToUpper()); | ||
299 | |||
300 | ps.WriteLine(" <Private>False</Private>" ); | ||
301 | |||
302 | ps.WriteLine(" </ProjectReference>"); | ||
303 | } | ||
304 | ps.WriteLine(" </ItemGroup>"); | ||
305 | |||
306 | // ps.WriteLine(" </Build>"); | ||
307 | ps.WriteLine(" <ItemGroup>"); | ||
308 | |||
309 | // ps.WriteLine(" <Include>"); | ||
310 | List<string> list = new List<string>(); | ||
311 | |||
312 | foreach (string path in project.Files) | ||
313 | { | ||
314 | string lower = path.ToLower(); | ||
315 | if (lower.EndsWith(".resx")) | ||
316 | { | ||
317 | string codebehind = String.Format("{0}.Designer{1}", path.Substring(0, path.LastIndexOf('.')), toolInfo.LanguageExtension); | ||
318 | if (!list.Contains(codebehind)) | ||
319 | list.Add(codebehind); | ||
320 | } | ||
321 | } | ||
322 | |||
323 | foreach (string file in project.Files) | ||
324 | { | ||
325 | // if (file == "Properties\\Bind.Designer.cs") | ||
326 | // { | ||
327 | // Console.WriteLine("Wait a minute!"); | ||
328 | // Console.WriteLine(project.Files.GetSubType(file).ToString()); | ||
329 | // } | ||
330 | |||
331 | SubType subType = project.Files.GetSubType(file); | ||
332 | |||
333 | if (subType != SubType.Code && subType != SubType.Settings && subType != SubType.Designer | ||
334 | && subType != SubType.CodeBehind) | ||
335 | { | ||
336 | ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".resx"); | ||
337 | ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file)); | ||
338 | ps.WriteLine(" <SubType>Designer</SubType>"); | ||
339 | ps.WriteLine(" </EmbeddedResource>"); | ||
340 | // | ||
341 | } | ||
342 | |||
343 | if (subType == SubType.Designer) | ||
344 | { | ||
345 | ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file); | ||
346 | ps.WriteLine(" <SubType>" + subType + "</SubType>"); | ||
347 | ps.WriteLine(" <Generator>ResXFileCodeGenerator</Generator>"); | ||
348 | |||
349 | string autogen_name = file.Substring(0, file.LastIndexOf('.')) + ".Designer.cs"; | ||
350 | string dependent_name = file.Substring(0, file.LastIndexOf('.')) + ".cs"; | ||
351 | |||
352 | ps.WriteLine(" <LastGenOutput>{0}</LastGenOutput>", autogen_name); | ||
353 | |||
354 | // Check for a parent .cs file with the same name as this designer file | ||
355 | if (File.Exists(dependent_name)) | ||
356 | ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(dependent_name)); | ||
357 | |||
358 | ps.WriteLine(" </EmbeddedResource>"); | ||
359 | if (File.Exists(autogen_name)) | ||
360 | { | ||
361 | ps.WriteLine(" <Compile Include=\"{0}\">", autogen_name); | ||
362 | ps.WriteLine(" <AutoGen>True</AutoGen>"); | ||
363 | ps.WriteLine(" <DesignTime>True</DesignTime>"); | ||
364 | |||
365 | // If a parent .cs file exists, link this autogen file to it. Otherwise link | ||
366 | // to the designer file | ||
367 | if (File.Exists(dependent_name)) | ||
368 | ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(dependent_name)); | ||
369 | else | ||
370 | ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file)); | ||
371 | |||
372 | ps.WriteLine(" </Compile>"); | ||
373 | } | ||
374 | list.Add(autogen_name); | ||
375 | } | ||
376 | if (subType == SubType.Settings) | ||
377 | { | ||
378 | ps.Write(" <{0} ", project.Files.GetBuildAction(file)); | ||
379 | ps.WriteLine("Include=\"{0}\">", file); | ||
380 | string fileName = Path.GetFileName(file); | ||
381 | if (project.Files.GetBuildAction(file) == BuildAction.None) | ||
382 | { | ||
383 | ps.WriteLine(" <Generator>SettingsSingleFileGenerator</Generator>"); | ||
384 | ps.WriteLine(" <LastGenOutput>{0}</LastGenOutput>", fileName.Substring(0, fileName.LastIndexOf('.')) + ".Designer.cs"); | ||
385 | } | ||
386 | else | ||
387 | { | ||
388 | ps.WriteLine(" <SubType>Code</SubType>"); | ||
389 | ps.WriteLine(" <AutoGen>True</AutoGen>"); | ||
390 | ps.WriteLine(" <DesignTimeSharedInput>True</DesignTimeSharedInput>"); | ||
391 | string fileNameShort = fileName.Substring(0, fileName.LastIndexOf('.')); | ||
392 | string fileNameShorter = fileNameShort.Substring(0, fileNameShort.LastIndexOf('.')); | ||
393 | ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(fileNameShorter + ".settings")); | ||
394 | } | ||
395 | ps.WriteLine(" </{0}>", project.Files.GetBuildAction(file)); | ||
396 | } | ||
397 | else if (subType != SubType.Designer) | ||
398 | { | ||
399 | string path = Helper.NormalizePath(file); | ||
400 | string path_lower = path.ToLower(); | ||
401 | |||
402 | if (!list.Contains(file)) | ||
403 | { | ||
404 | ps.Write(" <{0} ", project.Files.GetBuildAction(path)); | ||
405 | |||
406 | int startPos = 0; | ||
407 | if (project.Files.GetPreservePath(file)) | ||
408 | { | ||
409 | while ((@"./\").IndexOf(file.Substring(startPos, 1)) != -1) | ||
410 | startPos++; | ||
411 | |||
412 | } | ||
413 | else | ||
414 | { | ||
415 | startPos = file.LastIndexOf(Path.GetFileName(path)); | ||
416 | } | ||
417 | |||
418 | ps.WriteLine("Include=\"{0}\">", path); | ||
419 | |||
420 | int last_period_index = file.LastIndexOf('.'); | ||
421 | string short_file_name = file.Substring(0, last_period_index); | ||
422 | string extension = Path.GetExtension(path); | ||
423 | string designer_format = string.Format(".designer{0}", extension); | ||
424 | |||
425 | if (path_lower.EndsWith(designer_format)) | ||
426 | { | ||
427 | int designer_index = path_lower.IndexOf(designer_format); | ||
428 | string file_name = path.Substring(0, designer_index); | ||
429 | |||
430 | if (File.Exists(file_name)) | ||
431 | ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file_name)); | ||
432 | else if (File.Exists(file_name + ".resx")) | ||
433 | ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file_name + ".resx")); | ||
434 | } | ||
435 | else if (subType == SubType.CodeBehind) | ||
436 | { | ||
437 | ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(short_file_name)); | ||
438 | } | ||
439 | if (project.Files.GetIsLink(file)) | ||
440 | { | ||
441 | string alias = project.Files.GetLinkPath(file); | ||
442 | alias += file.Substring(startPos); | ||
443 | alias = Helper.NormalizePath(alias); | ||
444 | ps.WriteLine(" <Link>{0}</Link>", alias); | ||
445 | } | ||
446 | else if (project.Files.GetBuildAction(file) != BuildAction.None) | ||
447 | { | ||
448 | if (project.Files.GetBuildAction(file) != BuildAction.EmbeddedResource) | ||
449 | { | ||
450 | ps.WriteLine(" <SubType>{0}</SubType>", subType); | ||
451 | } | ||
452 | } | ||
453 | |||
454 | if (project.Files.GetCopyToOutput(file) != CopyToOutput.Never) | ||
455 | { | ||
456 | ps.WriteLine(" <CopyToOutputDirectory>{0}</CopyToOutputDirectory>", project.Files.GetCopyToOutput(file)); | ||
457 | } | ||
458 | |||
459 | ps.WriteLine(" </{0}>", project.Files.GetBuildAction(file)); | ||
460 | } | ||
461 | } | ||
462 | } | ||
463 | |||
464 | ps.WriteLine(" </ItemGroup>"); | ||
465 | ps.WriteLine(" <Import Project=\"" + toolInfo.ImportProject + "\" />"); | ||
466 | ps.WriteLine(" <PropertyGroup>"); | ||
467 | ps.WriteLine(" <PreBuildEvent>"); | ||
468 | ps.WriteLine(" </PreBuildEvent>"); | ||
469 | ps.WriteLine(" <PostBuildEvent>"); | ||
470 | ps.WriteLine(" </PostBuildEvent>"); | ||
471 | ps.WriteLine(" </PropertyGroup>"); | ||
472 | ps.WriteLine("</Project>"); | ||
473 | } | ||
474 | #endregion | ||
475 | |||
476 | #region User File | ||
477 | |||
478 | ps = new StreamWriter(projectFile + ".user"); | ||
479 | using (ps) | ||
480 | { | ||
481 | ps.WriteLine("<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">"); | ||
482 | //ps.WriteLine( "<VisualStudioProject>" ); | ||
483 | //ps.WriteLine(" <{0}>", toolInfo.XMLTag); | ||
484 | //ps.WriteLine(" <Build>"); | ||
485 | ps.WriteLine(" <PropertyGroup>"); | ||
486 | //ps.WriteLine(" <Settings ReferencePath=\"{0}\">", MakeRefPath(project)); | ||
487 | ps.WriteLine(" <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>"); | ||
488 | ps.WriteLine(" <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>"); | ||
489 | ps.WriteLine(" <ReferencePath>{0}</ReferencePath>", MakeRefPath(project)); | ||
490 | ps.WriteLine(" <LastOpenVersion>{0}</LastOpenVersion>", this.ProductVersion); | ||
491 | ps.WriteLine(" <ProjectView>ProjectFiles</ProjectView>"); | ||
492 | ps.WriteLine(" <ProjectTrust>0</ProjectTrust>"); | ||
493 | ps.WriteLine(" </PropertyGroup>"); | ||
494 | foreach (ConfigurationNode conf in project.Configurations) | ||
495 | { | ||
496 | ps.Write(" <PropertyGroup"); | ||
497 | ps.Write(" Condition = \" '$(Configuration)|$(Platform)' == '{0}|AnyCPU' \"", conf.Name); | ||
498 | ps.WriteLine(" />"); | ||
499 | } | ||
500 | ps.WriteLine("</Project>"); | ||
501 | } | ||
502 | #endregion | ||
503 | |||
504 | kernel.CurrentWorkingDirectory.Pop(); | ||
505 | } | ||
506 | |||
507 | private void WriteSolution(SolutionNode solution, bool writeSolutionToDisk) | ||
508 | { | ||
509 | kernel.Log.Write("Creating {0} solution and project files", this.VersionName); | ||
510 | |||
511 | foreach (SolutionNode child in solution.Solutions) | ||
512 | { | ||
513 | kernel.Log.Write("...Creating folder: {0}", child.Name); | ||
514 | WriteSolution(child, false); | ||
515 | } | ||
516 | |||
517 | foreach (ProjectNode project in solution.Projects) | ||
518 | { | ||
519 | kernel.Log.Write("...Creating project: {0}", project.Name); | ||
520 | WriteProject(solution, project); | ||
521 | } | ||
522 | |||
523 | foreach (DatabaseProjectNode project in solution.DatabaseProjects) | ||
524 | { | ||
525 | kernel.Log.Write("...Creating database project: {0}", project.Name); | ||
526 | WriteDatabaseProject(solution, project); | ||
527 | } | ||
528 | |||
529 | if (writeSolutionToDisk) // only write main solution | ||
530 | { | ||
531 | kernel.Log.Write(""); | ||
532 | string solutionFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln"); | ||
533 | |||
534 | using (StreamWriter ss = new StreamWriter(solutionFile)) | ||
535 | { | ||
536 | kernel.CurrentWorkingDirectory.Push(); | ||
537 | Helper.SetCurrentDir(Path.GetDirectoryName(solutionFile)); | ||
538 | |||
539 | ss.WriteLine("Microsoft Visual Studio Solution File, Format Version {0}", this.SolutionVersion); | ||
540 | ss.WriteLine(SolutionTag); | ||
541 | |||
542 | WriteProjectDeclarations(ss, solution, solution); | ||
543 | |||
544 | ss.WriteLine("Global"); | ||
545 | |||
546 | ss.WriteLine("\tGlobalSection(SolutionConfigurationPlatforms) = preSolution"); | ||
547 | foreach (ConfigurationNode conf in solution.Configurations) | ||
548 | { | ||
549 | ss.WriteLine("\t\t{0}|Any CPU = {0}|Any CPU", conf.Name); | ||
550 | } | ||
551 | ss.WriteLine("\tEndGlobalSection"); | ||
552 | |||
553 | ss.WriteLine("\tGlobalSection(ProjectConfigurationPlatforms) = postSolution"); | ||
554 | WriteConfigurationLines(solution.Configurations, solution, ss); | ||
555 | ss.WriteLine("\tEndGlobalSection"); | ||
556 | |||
557 | if (solution.Solutions.Count > 0) | ||
558 | { | ||
559 | ss.WriteLine("\tGlobalSection(NestedProjects) = preSolution"); | ||
560 | foreach (SolutionNode embeddedSolution in solution.Solutions) | ||
561 | { | ||
562 | WriteNestedProjectMap(ss, embeddedSolution); | ||
563 | } | ||
564 | ss.WriteLine("\tEndGlobalSection"); | ||
565 | } | ||
566 | |||
567 | ss.WriteLine("EndGlobal"); | ||
568 | } | ||
569 | |||
570 | kernel.CurrentWorkingDirectory.Pop(); | ||
571 | } | ||
572 | } | ||
573 | |||
574 | private void WriteProjectDeclarations(StreamWriter writer, SolutionNode actualSolution, SolutionNode embeddedSolution) | ||
575 | { | ||
576 | foreach (SolutionNode childSolution in embeddedSolution.Solutions) | ||
577 | { | ||
578 | WriteEmbeddedSolution(writer, childSolution); | ||
579 | WriteProjectDeclarations(writer, actualSolution, childSolution); | ||
580 | } | ||
581 | |||
582 | foreach (ProjectNode project in embeddedSolution.Projects) | ||
583 | { | ||
584 | WriteProject(actualSolution, writer, project); | ||
585 | } | ||
586 | |||
587 | foreach (DatabaseProjectNode dbProject in embeddedSolution.DatabaseProjects) | ||
588 | { | ||
589 | WriteProject(actualSolution, writer, dbProject); | ||
590 | } | ||
591 | |||
592 | if (actualSolution.Guid == embeddedSolution.Guid) | ||
593 | { | ||
594 | WriteSolutionFiles(actualSolution, writer); | ||
595 | } | ||
596 | } | ||
597 | |||
598 | private static void WriteNestedProjectMap(StreamWriter writer, SolutionNode embeddedSolution) | ||
599 | { | ||
600 | foreach (ProjectNode project in embeddedSolution.Projects) | ||
601 | { | ||
602 | WriteNestedProject(writer, embeddedSolution, project.Guid); | ||
603 | } | ||
604 | |||
605 | foreach (DatabaseProjectNode dbProject in embeddedSolution.DatabaseProjects) | ||
606 | { | ||
607 | WriteNestedProject(writer, embeddedSolution, dbProject.Guid); | ||
608 | } | ||
609 | |||
610 | foreach (SolutionNode child in embeddedSolution.Solutions) | ||
611 | { | ||
612 | WriteNestedProject(writer, embeddedSolution, child.Guid); | ||
613 | WriteNestedProjectMap(writer, child); | ||
614 | } | ||
615 | } | ||
616 | |||
617 | private static void WriteNestedProject(StreamWriter writer, SolutionNode solution, Guid projectGuid) | ||
618 | { | ||
619 | WriteNestedFolder(writer, solution.Guid, projectGuid); | ||
620 | } | ||
621 | |||
622 | private static void WriteNestedFolder(StreamWriter writer, Guid parentGuid, Guid childGuid) | ||
623 | { | ||
624 | writer.WriteLine("\t\t{0} = {1}", | ||
625 | childGuid.ToString("B").ToUpper(), | ||
626 | parentGuid.ToString("B").ToUpper()); | ||
627 | } | ||
628 | |||
629 | private static void WriteConfigurationLines(ICollection configurations, SolutionNode solution, StreamWriter ss) | ||
630 | { | ||
631 | foreach (ProjectNode project in solution.Projects) | ||
632 | { | ||
633 | foreach (ConfigurationNode conf in configurations) | ||
634 | { | ||
635 | ss.WriteLine("\t\t{0}.{1}|Any CPU.ActiveCfg = {1}|Any CPU", | ||
636 | project.Guid.ToString("B").ToUpper(), | ||
637 | conf.Name); | ||
638 | |||
639 | ss.WriteLine("\t\t{0}.{1}|Any CPU.Build.0 = {1}|Any CPU", | ||
640 | project.Guid.ToString("B").ToUpper(), | ||
641 | conf.Name); | ||
642 | } | ||
643 | } | ||
644 | |||
645 | foreach (SolutionNode child in solution.Solutions) | ||
646 | { | ||
647 | WriteConfigurationLines(configurations, child, ss); | ||
648 | } | ||
649 | } | ||
650 | |||
651 | private void WriteSolutionFiles(SolutionNode solution, StreamWriter ss) | ||
652 | { | ||
653 | if (solution.Files != null && solution.Files.Count > 0) | ||
654 | { | ||
655 | WriteProject(ss, "Folder", solution.Guid, "Solution Files", "Solution Files", solution.Files); | ||
656 | } | ||
657 | } | ||
658 | |||
659 | private void WriteEmbeddedSolution(StreamWriter writer, SolutionNode embeddedSolution) | ||
660 | { | ||
661 | WriteProject(writer, "Folder", embeddedSolution.Guid, embeddedSolution.Name, embeddedSolution.Name, embeddedSolution.Files); | ||
662 | } | ||
663 | |||
664 | private void WriteProject(SolutionNode solution, StreamWriter ss, ProjectNode project) | ||
665 | { | ||
666 | WriteProject(ss, solution, project.Language, project.Guid, project.Name, project.FullPath); | ||
667 | } | ||
668 | |||
669 | private void WriteProject(SolutionNode solution, StreamWriter ss, DatabaseProjectNode dbProject) | ||
670 | { | ||
671 | if (solution.Files != null && solution.Files.Count > 0) | ||
672 | WriteProject(ss, solution, "Database", dbProject.Guid, dbProject.Name, dbProject.FullPath); | ||
673 | } | ||
674 | |||
675 | private static bool ExtensionSpecified(string refName) | ||
676 | { | ||
677 | return refName.EndsWith(".dll") || refName.EndsWith(".exe"); | ||
678 | } | ||
679 | |||
680 | private static string GetProjectExtension(ProjectNode project) | ||
681 | { | ||
682 | string extension = ".dll"; | ||
683 | if (project.Type == ProjectType.Exe) | ||
684 | { | ||
685 | extension = ".exe"; | ||
686 | } | ||
687 | return extension; | ||
688 | } | ||
689 | |||
690 | const string ProjectDeclarationBeginFormat = "Project(\"{0}\") = \"{1}\", \"{2}\", \"{3}\""; | ||
691 | const string ProjectDeclarationEndFormat = "EndProject"; | ||
692 | |||
693 | private void WriteProject(StreamWriter ss, SolutionNode solution, string language, Guid guid, string name, string projectFullPath) | ||
694 | { | ||
695 | if (!tools.ContainsKey(language)) | ||
696 | throw new UnknownLanguageException("Unknown .NET language: " + language); | ||
697 | |||
698 | ToolInfo toolInfo = (ToolInfo)tools[language]; | ||
699 | |||
700 | string path = Helper.MakePathRelativeTo(solution.FullPath, projectFullPath); | ||
701 | |||
702 | path = Helper.MakeFilePath(path, name, toolInfo.FileExtension); | ||
703 | |||
704 | WriteProject(ss, language, guid, name, path); | ||
705 | } | ||
706 | |||
707 | private void WriteProject(StreamWriter writer, string language, Guid projectGuid, string name, string location) | ||
708 | { | ||
709 | WriteProject(writer, language, projectGuid, name, location, null); | ||
710 | } | ||
711 | |||
712 | private void WriteProject(StreamWriter writer, string language, Guid projectGuid, string name, string location, FilesNode files) | ||
713 | { | ||
714 | if (!tools.ContainsKey(language)) | ||
715 | throw new UnknownLanguageException("Unknown .NET language: " + language); | ||
716 | |||
717 | ToolInfo toolInfo = (ToolInfo)tools[language]; | ||
718 | |||
719 | writer.WriteLine(ProjectDeclarationBeginFormat, | ||
720 | toolInfo.Guid, | ||
721 | name, | ||
722 | location, | ||
723 | projectGuid.ToString("B").ToUpper()); | ||
724 | |||
725 | if (files != null) | ||
726 | { | ||
727 | writer.WriteLine("\tProjectSection(SolutionItems) = preProject"); | ||
728 | |||
729 | foreach (string file in files) | ||
730 | writer.WriteLine("\t\t{0} = {0}", file); | ||
731 | |||
732 | writer.WriteLine("\tEndProjectSection"); | ||
733 | } | ||
734 | |||
735 | writer.WriteLine(ProjectDeclarationEndFormat); | ||
736 | } | ||
737 | |||
738 | private void WriteDatabaseProject(SolutionNode solution, DatabaseProjectNode project) | ||
739 | { | ||
740 | string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, "dbp"); | ||
741 | IndentedTextWriter ps = new IndentedTextWriter(new StreamWriter(projectFile), " "); | ||
742 | |||
743 | kernel.CurrentWorkingDirectory.Push(); | ||
744 | |||
745 | Helper.SetCurrentDir(Path.GetDirectoryName(projectFile)); | ||
746 | |||
747 | using (ps) | ||
748 | { | ||
749 | ps.WriteLine("# Microsoft Developer Studio Project File - Database Project"); | ||
750 | ps.WriteLine("Begin DataProject = \"{0}\"", project.Name); | ||
751 | ps.Indent++; | ||
752 | ps.WriteLine("MSDTVersion = \"80\""); | ||
753 | // TODO: Use the project.Files property | ||
754 | if (ContainsSqlFiles(Path.GetDirectoryName(projectFile))) | ||
755 | WriteDatabaseFoldersAndFiles(ps, Path.GetDirectoryName(projectFile)); | ||
756 | |||
757 | ps.WriteLine("Begin DBRefFolder = \"Database References\""); | ||
758 | ps.Indent++; | ||
759 | foreach (DatabaseReferenceNode reference in project.References) | ||
760 | { | ||
761 | ps.WriteLine("Begin DBRefNode = \"{0}\"", reference.Name); | ||
762 | ps.Indent++; | ||
763 | ps.WriteLine("ConnectStr = \"{0}\"", reference.ConnectionString); | ||
764 | ps.WriteLine("Provider = \"{0}\"", reference.ProviderId.ToString("B").ToUpper()); | ||
765 | //ps.WriteLine("Colorizer = 5"); | ||
766 | ps.Indent--; | ||
767 | ps.WriteLine("End"); | ||
768 | } | ||
769 | ps.Indent--; | ||
770 | ps.WriteLine("End"); | ||
771 | ps.Indent--; | ||
772 | ps.WriteLine("End"); | ||
773 | |||
774 | ps.Flush(); | ||
775 | } | ||
776 | |||
777 | kernel.CurrentWorkingDirectory.Pop(); | ||
778 | } | ||
779 | |||
780 | private bool ContainsSqlFiles(string folder) | ||
781 | { | ||
782 | foreach (string file in Directory.GetFiles(folder, "*.sql")) | ||
783 | { | ||
784 | return true; // if the folder contains 1 .sql file, that's good enough | ||
785 | } | ||
786 | |||
787 | foreach (string child in Directory.GetDirectories(folder)) | ||
788 | { | ||
789 | if (ContainsSqlFiles(child)) | ||
790 | return true; // if 1 child folder contains a .sql file, still good enough | ||
791 | } | ||
792 | |||
793 | return false; | ||
794 | } | ||
795 | |||
796 | private void WriteDatabaseFoldersAndFiles(IndentedTextWriter writer, string folder) | ||
797 | { | ||
798 | foreach (string child in Directory.GetDirectories(folder)) | ||
799 | { | ||
800 | if (ContainsSqlFiles(child)) | ||
801 | { | ||
802 | writer.WriteLine("Begin Folder = \"{0}\"", Path.GetFileName(child)); | ||
803 | writer.Indent++; | ||
804 | WriteDatabaseFoldersAndFiles(writer, child); | ||
805 | writer.Indent--; | ||
806 | writer.WriteLine("End"); | ||
807 | } | ||
808 | } | ||
809 | foreach (string file in Directory.GetFiles(folder, "*.sql")) | ||
810 | { | ||
811 | writer.WriteLine("Script = \"{0}\"", Path.GetFileName(file)); | ||
812 | } | ||
813 | } | ||
814 | |||
815 | private void CleanProject(ProjectNode project) | ||
816 | { | ||
817 | kernel.Log.Write("...Cleaning project: {0}", project.Name); | ||
818 | |||
819 | ToolInfo toolInfo = (ToolInfo)tools[project.Language]; | ||
820 | string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension); | ||
821 | string userFile = projectFile + ".user"; | ||
822 | |||
823 | Helper.DeleteIfExists(projectFile); | ||
824 | Helper.DeleteIfExists(userFile); | ||
825 | } | ||
826 | |||
827 | private void CleanSolution(SolutionNode solution) | ||
828 | { | ||
829 | kernel.Log.Write("Cleaning {0} solution and project files", this.VersionName, solution.Name); | ||
830 | |||
831 | string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln"); | ||
832 | string suoFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "suo"); | ||
833 | |||
834 | Helper.DeleteIfExists(slnFile); | ||
835 | Helper.DeleteIfExists(suoFile); | ||
836 | |||
837 | foreach (ProjectNode project in solution.Projects) | ||
838 | { | ||
839 | CleanProject(project); | ||
840 | } | ||
841 | |||
842 | kernel.Log.Write(""); | ||
843 | } | ||
844 | |||
845 | #endregion | ||
846 | |||
847 | #region ITarget Members | ||
848 | |||
849 | /// <summary> | ||
850 | /// Writes the specified kern. | ||
851 | /// </summary> | ||
852 | /// <param name="kern">The kern.</param> | ||
853 | public virtual void Write(Kernel kern) | ||
854 | { | ||
855 | if (kern == null) | ||
856 | { | ||
857 | throw new ArgumentNullException("kern"); | ||
858 | } | ||
859 | kernel = kern; | ||
860 | foreach (SolutionNode sol in kernel.Solutions) | ||
861 | { | ||
862 | WriteSolution(sol, true); | ||
863 | } | ||
864 | kernel = null; | ||
865 | } | ||
866 | |||
867 | /// <summary> | ||
868 | /// Cleans the specified kern. | ||
869 | /// </summary> | ||
870 | /// <param name="kern">The kern.</param> | ||
871 | public virtual void Clean(Kernel kern) | ||
872 | { | ||
873 | if (kern == null) | ||
874 | { | ||
875 | throw new ArgumentNullException("kern"); | ||
876 | } | ||
877 | kernel = kern; | ||
878 | foreach (SolutionNode sol in kernel.Solutions) | ||
879 | { | ||
880 | CleanSolution(sol); | ||
881 | } | ||
882 | kernel = null; | ||
883 | } | ||
884 | |||
885 | #endregion | ||
886 | } | ||
887 | } | ||
diff --git a/Prebuild/src/Core/Targets/VSVersion.cs b/Prebuild/src/Core/Targets/VSVersion.cs deleted file mode 100644 index 59549b0..0000000 --- a/Prebuild/src/Core/Targets/VSVersion.cs +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2008-2009 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com), John Anderson (sontek@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | namespace Prebuild.Core.Targets | ||
27 | { | ||
28 | /// <summary> | ||
29 | /// | ||
30 | /// </summary> | ||
31 | public enum VSVersion | ||
32 | { | ||
33 | /// <summary> | ||
34 | /// Visual Studio 2002 | ||
35 | /// </summary> | ||
36 | VS70, | ||
37 | /// <summary> | ||
38 | /// Visual Studio 2003 | ||
39 | /// </summary> | ||
40 | VS71, | ||
41 | /// <summary> | ||
42 | /// Visual Studio 2005 | ||
43 | /// </summary> | ||
44 | VS80, | ||
45 | /// <summary> | ||
46 | /// Visual Studio 2008 | ||
47 | /// </summary> | ||
48 | VS90, | ||
49 | /// <summary> | ||
50 | /// Visual Studio 2010 | ||
51 | /// </summary> | ||
52 | VS10 | ||
53 | } | ||
54 | } | ||
diff --git a/Prebuild/src/Core/Targets/XcodeTarget.cs b/Prebuild/src/Core/Targets/XcodeTarget.cs deleted file mode 100644 index d96f65b..0000000 --- a/Prebuild/src/Core/Targets/XcodeTarget.cs +++ /dev/null | |||
@@ -1,596 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Collections; | ||
28 | using System.Collections.Specialized; | ||
29 | using System.IO; | ||
30 | using System.Reflection; | ||
31 | using System.Text.RegularExpressions; | ||
32 | |||
33 | using Prebuild.Core.Attributes; | ||
34 | using Prebuild.Core.Interfaces; | ||
35 | using Prebuild.Core.Nodes; | ||
36 | using Prebuild.Core.Utilities; | ||
37 | |||
38 | namespace Prebuild.Core.Targets | ||
39 | { | ||
40 | /// <summary> | ||
41 | /// | ||
42 | /// </summary> | ||
43 | [Target("xcode")] | ||
44 | public class XcodeTarget : ITarget | ||
45 | { | ||
46 | #region Fields | ||
47 | |||
48 | private Kernel m_Kernel; | ||
49 | |||
50 | #endregion | ||
51 | |||
52 | #region Private Methods | ||
53 | |||
54 | private static string PrependPath(string path) | ||
55 | { | ||
56 | string tmpPath = Helper.NormalizePath(path, '/'); | ||
57 | Regex regex = new Regex(@"(\w):/(\w+)"); | ||
58 | Match match = regex.Match(tmpPath); | ||
59 | //if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/') | ||
60 | //{ | ||
61 | tmpPath = Helper.NormalizePath(tmpPath); | ||
62 | //} | ||
63 | // else | ||
64 | // { | ||
65 | // tmpPath = Helper.NormalizePath("./" + tmpPath); | ||
66 | // } | ||
67 | |||
68 | return tmpPath; | ||
69 | } | ||
70 | |||
71 | private static string BuildReference(SolutionNode solution, ReferenceNode refr) | ||
72 | { | ||
73 | string ret = ""; | ||
74 | if (solution.ProjectsTable.ContainsKey(refr.Name)) | ||
75 | { | ||
76 | ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name]; | ||
77 | string fileRef = FindFileReference(refr.Name, project); | ||
78 | string finalPath = Helper.NormalizePath(Helper.MakeFilePath(project.FullPath + "/${build.dir}/", refr.Name, "dll"), '/'); | ||
79 | ret += finalPath; | ||
80 | return ret; | ||
81 | } | ||
82 | else | ||
83 | { | ||
84 | ProjectNode project = (ProjectNode)refr.Parent; | ||
85 | string fileRef = FindFileReference(refr.Name, project); | ||
86 | |||
87 | if (refr.Path != null || fileRef != null) | ||
88 | { | ||
89 | string finalPath = (refr.Path != null) ? Helper.NormalizePath(refr.Path + "/" + refr.Name + ".dll", '/') : fileRef; | ||
90 | ret += finalPath; | ||
91 | return ret; | ||
92 | } | ||
93 | |||
94 | try | ||
95 | { | ||
96 | //Assembly assem = Assembly.Load(refr.Name); | ||
97 | //if (assem != null) | ||
98 | //{ | ||
99 | //ret += (refr.Name + ".dll"); | ||
100 | //} | ||
101 | //else | ||
102 | //{ | ||
103 | ret += (refr.Name + ".dll"); | ||
104 | //} | ||
105 | } | ||
106 | catch (System.NullReferenceException e) | ||
107 | { | ||
108 | e.ToString(); | ||
109 | ret += refr.Name + ".dll"; | ||
110 | } | ||
111 | } | ||
112 | return ret; | ||
113 | } | ||
114 | |||
115 | private static string BuildReferencePath(SolutionNode solution, ReferenceNode refr) | ||
116 | { | ||
117 | string ret = ""; | ||
118 | if (solution.ProjectsTable.ContainsKey(refr.Name)) | ||
119 | { | ||
120 | ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name]; | ||
121 | string fileRef = FindFileReference(refr.Name, project); | ||
122 | string finalPath = Helper.NormalizePath(Helper.MakeReferencePath(project.FullPath + "/${build.dir}/"), '/'); | ||
123 | ret += finalPath; | ||
124 | return ret; | ||
125 | } | ||
126 | else | ||
127 | { | ||
128 | ProjectNode project = (ProjectNode)refr.Parent; | ||
129 | string fileRef = FindFileReference(refr.Name, project); | ||
130 | |||
131 | if (refr.Path != null || fileRef != null) | ||
132 | { | ||
133 | string finalPath = (refr.Path != null) ? Helper.NormalizePath(refr.Path, '/') : fileRef; | ||
134 | ret += finalPath; | ||
135 | return ret; | ||
136 | } | ||
137 | |||
138 | try | ||
139 | { | ||
140 | Assembly assem = Assembly.Load(refr.Name); | ||
141 | if (assem != null) | ||
142 | { | ||
143 | ret += ""; | ||
144 | } | ||
145 | else | ||
146 | { | ||
147 | ret += ""; | ||
148 | } | ||
149 | } | ||
150 | catch (System.NullReferenceException e) | ||
151 | { | ||
152 | e.ToString(); | ||
153 | ret += ""; | ||
154 | } | ||
155 | } | ||
156 | return ret; | ||
157 | } | ||
158 | |||
159 | private static string FindFileReference(string refName, ProjectNode project) | ||
160 | { | ||
161 | foreach (ReferencePathNode refPath in project.ReferencePaths) | ||
162 | { | ||
163 | string fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll"); | ||
164 | |||
165 | if (File.Exists(fullPath)) | ||
166 | { | ||
167 | return fullPath; | ||
168 | } | ||
169 | } | ||
170 | |||
171 | return null; | ||
172 | } | ||
173 | |||
174 | /// <summary> | ||
175 | /// Gets the XML doc file. | ||
176 | /// </summary> | ||
177 | /// <param name="project">The project.</param> | ||
178 | /// <param name="conf">The conf.</param> | ||
179 | /// <returns></returns> | ||
180 | public static string GetXmlDocFile(ProjectNode project, ConfigurationNode conf) | ||
181 | { | ||
182 | if (conf == null) | ||
183 | { | ||
184 | throw new ArgumentNullException("conf"); | ||
185 | } | ||
186 | if (project == null) | ||
187 | { | ||
188 | throw new ArgumentNullException("project"); | ||
189 | } | ||
190 | string docFile = (string)conf.Options["XmlDocFile"]; | ||
191 | // if(docFile != null && docFile.Length == 0)//default to assembly name if not specified | ||
192 | // { | ||
193 | // return Path.GetFileNameWithoutExtension(project.AssemblyName) + ".xml"; | ||
194 | // } | ||
195 | return docFile; | ||
196 | } | ||
197 | |||
198 | private void WriteProject(SolutionNode solution, ProjectNode project) | ||
199 | { | ||
200 | string projFile = Helper.MakeFilePath(project.FullPath, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build"); | ||
201 | StreamWriter ss = new StreamWriter(projFile); | ||
202 | |||
203 | m_Kernel.CurrentWorkingDirectory.Push(); | ||
204 | Helper.SetCurrentDir(Path.GetDirectoryName(projFile)); | ||
205 | bool hasDoc = false; | ||
206 | |||
207 | using (ss) | ||
208 | { | ||
209 | ss.WriteLine("<?xml version=\"1.0\" ?>"); | ||
210 | ss.WriteLine("<project name=\"{0}\" default=\"build\">", project.Name); | ||
211 | ss.WriteLine(" <target name=\"{0}\">", "build"); | ||
212 | ss.WriteLine(" <echo message=\"Build Directory is ${project::get-base-directory()}/${build.dir}\" />"); | ||
213 | ss.WriteLine(" <mkdir dir=\"${project::get-base-directory()}/${build.dir}\" />"); | ||
214 | ss.WriteLine(" <copy todir=\"${project::get-base-directory()}/${build.dir}\">"); | ||
215 | ss.WriteLine(" <fileset basedir=\"${project::get-base-directory()}\">"); | ||
216 | foreach (ReferenceNode refr in project.References) | ||
217 | { | ||
218 | if (refr.LocalCopy) | ||
219 | { | ||
220 | ss.WriteLine(" <include name=\"{0}", Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReference(solution, refr)) + "\" />", '/')); | ||
221 | } | ||
222 | } | ||
223 | ss.WriteLine(" </fileset>"); | ||
224 | ss.WriteLine(" </copy>"); | ||
225 | ss.Write(" <csc"); | ||
226 | ss.Write(" target=\"{0}\"", project.Type.ToString().ToLower()); | ||
227 | ss.Write(" debug=\"{0}\"", "${build.debug}"); | ||
228 | foreach (ConfigurationNode conf in project.Configurations) | ||
229 | { | ||
230 | if (conf.Options.KeyFile != "") | ||
231 | { | ||
232 | ss.Write(" keyfile=\"{0}\"", conf.Options.KeyFile); | ||
233 | break; | ||
234 | } | ||
235 | } | ||
236 | foreach (ConfigurationNode conf in project.Configurations) | ||
237 | { | ||
238 | ss.Write(" unsafe=\"{0}\"", conf.Options.AllowUnsafe); | ||
239 | break; | ||
240 | } | ||
241 | foreach (ConfigurationNode conf in project.Configurations) | ||
242 | { | ||
243 | ss.Write(" define=\"{0}\"", conf.Options.CompilerDefines); | ||
244 | break; | ||
245 | } | ||
246 | foreach (ConfigurationNode conf in project.Configurations) | ||
247 | { | ||
248 | if (GetXmlDocFile(project, conf) != "") | ||
249 | { | ||
250 | ss.Write(" doc=\"{0}\"", "${project::get-base-directory()}/${build.dir}/" + GetXmlDocFile(project, conf)); | ||
251 | hasDoc = true; | ||
252 | } | ||
253 | break; | ||
254 | } | ||
255 | ss.Write(" output=\"{0}", "${project::get-base-directory()}/${build.dir}/${project::get-name()}"); | ||
256 | if (project.Type == ProjectType.Library) | ||
257 | { | ||
258 | ss.Write(".dll\""); | ||
259 | } | ||
260 | else | ||
261 | { | ||
262 | ss.Write(".exe\""); | ||
263 | } | ||
264 | if (project.AppIcon != null && project.AppIcon.Length != 0) | ||
265 | { | ||
266 | ss.Write(" win32icon=\"{0}\"", Helper.NormalizePath(project.AppIcon, '/')); | ||
267 | } | ||
268 | ss.WriteLine(">"); | ||
269 | ss.WriteLine(" <resources prefix=\"{0}\" dynamicprefix=\"true\" >", project.RootNamespace); | ||
270 | foreach (string file in project.Files) | ||
271 | { | ||
272 | switch (project.Files.GetBuildAction(file)) | ||
273 | { | ||
274 | case BuildAction.EmbeddedResource: | ||
275 | ss.WriteLine(" {0}", "<include name=\"" + Helper.NormalizePath(PrependPath(file), '/') + "\" />"); | ||
276 | break; | ||
277 | default: | ||
278 | if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings) | ||
279 | { | ||
280 | ss.WriteLine(" <include name=\"{0}\" />", file.Substring(0, file.LastIndexOf('.')) + ".resx"); | ||
281 | } | ||
282 | break; | ||
283 | } | ||
284 | } | ||
285 | //if (project.Files.GetSubType(file).ToString() != "Code") | ||
286 | //{ | ||
287 | // ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".resx"); | ||
288 | |||
289 | ss.WriteLine(" </resources>"); | ||
290 | ss.WriteLine(" <sources failonempty=\"true\">"); | ||
291 | foreach (string file in project.Files) | ||
292 | { | ||
293 | switch (project.Files.GetBuildAction(file)) | ||
294 | { | ||
295 | case BuildAction.Compile: | ||
296 | ss.WriteLine(" <include name=\"" + Helper.NormalizePath(PrependPath(file), '/') + "\" />"); | ||
297 | break; | ||
298 | default: | ||
299 | break; | ||
300 | } | ||
301 | } | ||
302 | ss.WriteLine(" </sources>"); | ||
303 | ss.WriteLine(" <references basedir=\"${project::get-base-directory()}\">"); | ||
304 | ss.WriteLine(" <lib>"); | ||
305 | ss.WriteLine(" <include name=\"${project::get-base-directory()}\" />"); | ||
306 | ss.WriteLine(" <include name=\"${project::get-base-directory()}/${build.dir}\" />"); | ||
307 | ss.WriteLine(" </lib>"); | ||
308 | foreach (ReferenceNode refr in project.References) | ||
309 | { | ||
310 | ss.WriteLine(" <include name=\"{0}", Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReference(solution, refr)) + "\" />", '/')); | ||
311 | } | ||
312 | ss.WriteLine(" </references>"); | ||
313 | |||
314 | ss.WriteLine(" </csc>"); | ||
315 | ss.WriteLine(" </target>"); | ||
316 | |||
317 | ss.WriteLine(" <target name=\"clean\">"); | ||
318 | ss.WriteLine(" <delete dir=\"${bin.dir}\" failonerror=\"false\" />"); | ||
319 | ss.WriteLine(" <delete dir=\"${obj.dir}\" failonerror=\"false\" />"); | ||
320 | ss.WriteLine(" </target>"); | ||
321 | |||
322 | ss.WriteLine(" <target name=\"doc\" description=\"Creates documentation.\">"); | ||
323 | if (hasDoc) | ||
324 | { | ||
325 | ss.WriteLine(" <property name=\"doc.target\" value=\"\" />"); | ||
326 | ss.WriteLine(" <if test=\"${platform::is-unix()}\">"); | ||
327 | ss.WriteLine(" <property name=\"doc.target\" value=\"Web\" />"); | ||
328 | ss.WriteLine(" </if>"); | ||
329 | ss.WriteLine(" <ndoc failonerror=\"false\" verbose=\"true\">"); | ||
330 | ss.WriteLine(" <assemblies basedir=\"${project::get-base-directory()}\">"); | ||
331 | ss.Write(" <include name=\"${build.dir}/${project::get-name()}"); | ||
332 | if (project.Type == ProjectType.Library) | ||
333 | { | ||
334 | ss.WriteLine(".dll\" />"); | ||
335 | } | ||
336 | else | ||
337 | { | ||
338 | ss.WriteLine(".exe\" />"); | ||
339 | } | ||
340 | |||
341 | ss.WriteLine(" </assemblies>"); | ||
342 | ss.WriteLine(" <summaries basedir=\"${project::get-base-directory()}\">"); | ||
343 | ss.WriteLine(" <include name=\"${build.dir}/${project::get-name()}.xml\"/>"); | ||
344 | ss.WriteLine(" </summaries>"); | ||
345 | ss.WriteLine(" <referencepaths basedir=\"${project::get-base-directory()}\">"); | ||
346 | ss.WriteLine(" <include name=\"${build.dir}\" />"); | ||
347 | // foreach(ReferenceNode refr in project.References) | ||
348 | // { | ||
349 | // string path = Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReferencePath(solution, refr)), '/'); | ||
350 | // if (path != "") | ||
351 | // { | ||
352 | // ss.WriteLine(" <include name=\"{0}\" />", path); | ||
353 | // } | ||
354 | // } | ||
355 | ss.WriteLine(" </referencepaths>"); | ||
356 | ss.WriteLine(" <documenters>"); | ||
357 | ss.WriteLine(" <documenter name=\"MSDN\">"); | ||
358 | ss.WriteLine(" <property name=\"OutputDirectory\" value=\"${project::get-base-directory()}/${build.dir}/doc/${project::get-name()}\" />"); | ||
359 | ss.WriteLine(" <property name=\"OutputTarget\" value=\"${doc.target}\" />"); | ||
360 | ss.WriteLine(" <property name=\"HtmlHelpName\" value=\"${project::get-name()}\" />"); | ||
361 | ss.WriteLine(" <property name=\"IncludeFavorites\" value=\"False\" />"); | ||
362 | ss.WriteLine(" <property name=\"Title\" value=\"${project::get-name()} SDK Documentation\" />"); | ||
363 | ss.WriteLine(" <property name=\"SplitTOCs\" value=\"False\" />"); | ||
364 | ss.WriteLine(" <property name=\"DefaulTOC\" value=\"\" />"); | ||
365 | ss.WriteLine(" <property name=\"ShowVisualBasic\" value=\"True\" />"); | ||
366 | ss.WriteLine(" <property name=\"AutoDocumentConstructors\" value=\"True\" />"); | ||
367 | ss.WriteLine(" <property name=\"ShowMissingSummaries\" value=\"${build.debug}\" />"); | ||
368 | ss.WriteLine(" <property name=\"ShowMissingRemarks\" value=\"${build.debug}\" />"); | ||
369 | ss.WriteLine(" <property name=\"ShowMissingParams\" value=\"${build.debug}\" />"); | ||
370 | ss.WriteLine(" <property name=\"ShowMissingReturns\" value=\"${build.debug}\" />"); | ||
371 | ss.WriteLine(" <property name=\"ShowMissingValues\" value=\"${build.debug}\" />"); | ||
372 | ss.WriteLine(" <property name=\"DocumentInternals\" value=\"False\" />"); | ||
373 | ss.WriteLine(" <property name=\"DocumentPrivates\" value=\"False\" />"); | ||
374 | ss.WriteLine(" <property name=\"DocumentProtected\" value=\"True\" />"); | ||
375 | ss.WriteLine(" <property name=\"DocumentEmptyNamespaces\" value=\"${build.debug}\" />"); | ||
376 | ss.WriteLine(" <property name=\"IncludeAssemblyVersion\" value=\"True\" />"); | ||
377 | ss.WriteLine(" </documenter>"); | ||
378 | ss.WriteLine(" </documenters>"); | ||
379 | ss.WriteLine(" </ndoc>"); | ||
380 | } | ||
381 | ss.WriteLine(" </target>"); | ||
382 | ss.WriteLine("</project>"); | ||
383 | } | ||
384 | m_Kernel.CurrentWorkingDirectory.Pop(); | ||
385 | } | ||
386 | |||
387 | private void WriteCombine(SolutionNode solution) | ||
388 | { | ||
389 | m_Kernel.Log.Write("Creating Xcode build files"); | ||
390 | foreach (ProjectNode project in solution.Projects) | ||
391 | { | ||
392 | if (m_Kernel.AllowProject(project.FilterGroups)) | ||
393 | { | ||
394 | m_Kernel.Log.Write("...Creating project: {0}", project.Name); | ||
395 | WriteProject(solution, project); | ||
396 | } | ||
397 | } | ||
398 | |||
399 | m_Kernel.Log.Write(""); | ||
400 | DirectoryInfo directoryInfo = new DirectoryInfo(Path.Combine(solution.FullPath, solution.Name + ".xcodeproj")); | ||
401 | if (!directoryInfo.Exists) | ||
402 | { | ||
403 | directoryInfo.Create(); | ||
404 | } | ||
405 | string combFile = Helper.MakeFilePath(Path.Combine(solution.FullPath, solution.Name + ".xcodeproj"), "project", "pbxproj"); | ||
406 | StreamWriter ss = new StreamWriter(combFile); | ||
407 | |||
408 | m_Kernel.CurrentWorkingDirectory.Push(); | ||
409 | Helper.SetCurrentDir(Path.GetDirectoryName(combFile)); | ||
410 | |||
411 | using (ss) | ||
412 | { | ||
413 | ss.WriteLine("<?xml version=\"1.0\" ?>"); | ||
414 | ss.WriteLine("<project name=\"{0}\" default=\"build\">", solution.Name); | ||
415 | ss.WriteLine(" <echo message=\"Using '${nant.settings.currentframework}' Framework\"/>"); | ||
416 | ss.WriteLine(); | ||
417 | |||
418 | //ss.WriteLine(" <property name=\"dist.dir\" value=\"dist\" />"); | ||
419 | //ss.WriteLine(" <property name=\"source.dir\" value=\"source\" />"); | ||
420 | ss.WriteLine(" <property name=\"bin.dir\" value=\"bin\" />"); | ||
421 | ss.WriteLine(" <property name=\"obj.dir\" value=\"obj\" />"); | ||
422 | ss.WriteLine(" <property name=\"doc.dir\" value=\"doc\" />"); | ||
423 | ss.WriteLine(" <property name=\"project.main.dir\" value=\"${project::get-base-directory()}\" />"); | ||
424 | |||
425 | foreach (ConfigurationNode conf in solution.Configurations) | ||
426 | { | ||
427 | // Set the project.config to a non-debug configuration | ||
428 | if (conf.Options["DebugInformation"].ToString().ToLower() != "true") | ||
429 | { | ||
430 | ss.WriteLine(" <property name=\"project.config\" value=\"{0}\" />", conf.Name); | ||
431 | } | ||
432 | ss.WriteLine(); | ||
433 | ss.WriteLine(" <target name=\"{0}\" description=\"\">", conf.Name); | ||
434 | ss.WriteLine(" <property name=\"project.config\" value=\"{0}\" />", conf.Name); | ||
435 | ss.WriteLine(" <property name=\"build.debug\" value=\"{0}\" />", conf.Options["DebugInformation"].ToString().ToLower()); | ||
436 | ss.WriteLine(" </target>"); | ||
437 | ss.WriteLine(); | ||
438 | } | ||
439 | |||
440 | ss.WriteLine(" <target name=\"net-1.1\" description=\"Sets framework to .NET 1.1\">"); | ||
441 | ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"net-1.1\" />"); | ||
442 | ss.WriteLine(" </target>"); | ||
443 | ss.WriteLine(); | ||
444 | |||
445 | ss.WriteLine(" <target name=\"net-2.0\" description=\"Sets framework to .NET 2.0\">"); | ||
446 | ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"net-2.0\" />"); | ||
447 | ss.WriteLine(" </target>"); | ||
448 | ss.WriteLine(); | ||
449 | |||
450 | ss.WriteLine(" <target name=\"mono-2.0\" description=\"Sets framework to mono 2.0\">"); | ||
451 | ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"mono-2.0\" />"); | ||
452 | ss.WriteLine(" </target>"); | ||
453 | ss.WriteLine(); | ||
454 | |||
455 | ss.WriteLine(" <target name=\"mono-1.0\" description=\"Sets framework to mono 1.0\">"); | ||
456 | ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"mono-1.0\" />"); | ||
457 | ss.WriteLine(" </target>"); | ||
458 | ss.WriteLine(); | ||
459 | |||
460 | ss.WriteLine(" <target name=\"init\" description=\"\">"); | ||
461 | ss.WriteLine(" <call target=\"${project.config}\" />"); | ||
462 | ss.WriteLine(" <sysinfo />"); | ||
463 | ss.WriteLine(" <echo message=\"Platform ${sys.os.platform}\" />"); | ||
464 | ss.WriteLine(" <property name=\"build.dir\" value=\"${bin.dir}/${project.config}\" />"); | ||
465 | ss.WriteLine(" </target>"); | ||
466 | ss.WriteLine(); | ||
467 | |||
468 | ss.WriteLine(" <target name=\"clean\" description=\"\">"); | ||
469 | ss.WriteLine(" <echo message=\"Deleting all builds from all configurations\" />"); | ||
470 | //ss.WriteLine(" <delete dir=\"${dist.dir}\" failonerror=\"false\" />"); | ||
471 | ss.WriteLine(" <delete dir=\"${bin.dir}\" failonerror=\"false\" />"); | ||
472 | ss.WriteLine(" <delete dir=\"${obj.dir}\" failonerror=\"false\" />"); | ||
473 | //foreach(ProjectNode project in solution.Projects) | ||
474 | //{ | ||
475 | // string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); | ||
476 | // ss.Write(" <nant buildfile=\"{0}\"", | ||
477 | // Helper.NormalizePath(Helper.MakeFilePath(path, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build"),'/')); | ||
478 | // ss.WriteLine(" target=\"clean\" />"); | ||
479 | //} | ||
480 | ss.WriteLine(" </target>"); | ||
481 | ss.WriteLine(); | ||
482 | |||
483 | ss.WriteLine(" <target name=\"build\" depends=\"init\" description=\"\">"); | ||
484 | |||
485 | foreach (ProjectNode project in solution.ProjectsTableOrder) | ||
486 | { | ||
487 | string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); | ||
488 | ss.Write(" <nant buildfile=\"{0}\"", | ||
489 | Helper.NormalizePath(Helper.MakeFilePath(path, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build"), '/')); | ||
490 | ss.WriteLine(" target=\"build\" />"); | ||
491 | } | ||
492 | ss.WriteLine(" </target>"); | ||
493 | ss.WriteLine(); | ||
494 | |||
495 | ss.WriteLine(" <target name=\"build-release\" depends=\"Release, init, build\" description=\"Builds in Release mode\" />"); | ||
496 | ss.WriteLine(); | ||
497 | ss.WriteLine(" <target name=\"build-debug\" depends=\"Debug, init, build\" description=\"Builds in Debug mode\" />"); | ||
498 | ss.WriteLine(); | ||
499 | //ss.WriteLine(" <target name=\"package\" depends=\"clean, doc, copyfiles, zip\" description=\"Builds in Release mode\" />"); | ||
500 | ss.WriteLine(" <target name=\"package\" depends=\"clean, doc\" description=\"Builds all\" />"); | ||
501 | ss.WriteLine(); | ||
502 | |||
503 | ss.WriteLine(" <target name=\"doc\" depends=\"build-release\">"); | ||
504 | ss.WriteLine(" <echo message=\"Generating all documentation from all builds\" />"); | ||
505 | foreach (ProjectNode project in solution.Projects) | ||
506 | { | ||
507 | string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); | ||
508 | ss.Write(" <nant buildfile=\"{0}\"", | ||
509 | Helper.NormalizePath(Helper.MakeFilePath(path, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build"), '/')); | ||
510 | ss.WriteLine(" target=\"doc\" />"); | ||
511 | } | ||
512 | ss.WriteLine(" </target>"); | ||
513 | ss.WriteLine(); | ||
514 | ss.WriteLine("</project>"); | ||
515 | } | ||
516 | |||
517 | m_Kernel.CurrentWorkingDirectory.Pop(); | ||
518 | } | ||
519 | |||
520 | private void CleanProject(ProjectNode project) | ||
521 | { | ||
522 | m_Kernel.Log.Write("...Cleaning project: {0}", project.Name); | ||
523 | string projectFile = Helper.MakeFilePath(project.FullPath, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build"); | ||
524 | Helper.DeleteIfExists(projectFile); | ||
525 | } | ||
526 | |||
527 | private void CleanSolution(SolutionNode solution) | ||
528 | { | ||
529 | m_Kernel.Log.Write("Cleaning Xcode build files for", solution.Name); | ||
530 | |||
531 | string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "build"); | ||
532 | Helper.DeleteIfExists(slnFile); | ||
533 | |||
534 | foreach (ProjectNode project in solution.Projects) | ||
535 | { | ||
536 | CleanProject(project); | ||
537 | } | ||
538 | |||
539 | m_Kernel.Log.Write(""); | ||
540 | } | ||
541 | |||
542 | #endregion | ||
543 | |||
544 | #region ITarget Members | ||
545 | |||
546 | /// <summary> | ||
547 | /// Writes the specified kern. | ||
548 | /// </summary> | ||
549 | /// <param name="kern">The kern.</param> | ||
550 | public void Write(Kernel kern) | ||
551 | { | ||
552 | if (kern == null) | ||
553 | { | ||
554 | throw new ArgumentNullException("kern"); | ||
555 | } | ||
556 | m_Kernel = kern; | ||
557 | foreach (SolutionNode solution in kern.Solutions) | ||
558 | { | ||
559 | WriteCombine(solution); | ||
560 | } | ||
561 | m_Kernel = null; | ||
562 | } | ||
563 | |||
564 | /// <summary> | ||
565 | /// Cleans the specified kern. | ||
566 | /// </summary> | ||
567 | /// <param name="kern">The kern.</param> | ||
568 | public virtual void Clean(Kernel kern) | ||
569 | { | ||
570 | if (kern == null) | ||
571 | { | ||
572 | throw new ArgumentNullException("kern"); | ||
573 | } | ||
574 | m_Kernel = kern; | ||
575 | foreach (SolutionNode sol in kern.Solutions) | ||
576 | { | ||
577 | CleanSolution(sol); | ||
578 | } | ||
579 | m_Kernel = null; | ||
580 | } | ||
581 | |||
582 | /// <summary> | ||
583 | /// Gets the name. | ||
584 | /// </summary> | ||
585 | /// <value>The name.</value> | ||
586 | public string Name | ||
587 | { | ||
588 | get | ||
589 | { | ||
590 | return "xcode"; | ||
591 | } | ||
592 | } | ||
593 | |||
594 | #endregion | ||
595 | } | ||
596 | } | ||
diff --git a/Prebuild/src/Core/UnknownLanguageException.cs b/Prebuild/src/Core/UnknownLanguageException.cs deleted file mode 100644 index 607b66c..0000000 --- a/Prebuild/src/Core/UnknownLanguageException.cs +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | /* | ||
2 | * $RCSfile$ | ||
3 | * Copyright (C) 2004, 2005 David Hudson (jendave@yahoo.com) | ||
4 | * | ||
5 | * This library is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU Lesser General Public | ||
7 | * License as published by the Free Software Foundation; either | ||
8 | * version 2.1 of the License, or (at your option) any later version. | ||
9 | * | ||
10 | * This library is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | * Lesser General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU Lesser General Public | ||
16 | * License along with this library; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | using System; | ||
21 | using System.Runtime.Serialization; | ||
22 | |||
23 | namespace Prebuild.Core | ||
24 | { | ||
25 | /// <summary> | ||
26 | /// </summary> | ||
27 | [Serializable()] | ||
28 | public class UnknownLanguageException : Exception | ||
29 | { | ||
30 | /// <summary> | ||
31 | /// Basic exception. | ||
32 | /// </summary> | ||
33 | public UnknownLanguageException() | ||
34 | { | ||
35 | } | ||
36 | |||
37 | /// <summary> | ||
38 | /// Exception with specified string | ||
39 | /// </summary> | ||
40 | /// <param name="message">Exception message</param> | ||
41 | public UnknownLanguageException(string message): base(message) | ||
42 | { | ||
43 | } | ||
44 | |||
45 | /// <summary> | ||
46 | /// | ||
47 | /// </summary> | ||
48 | /// <param name="message"></param> | ||
49 | /// <param name="exception"></param> | ||
50 | public UnknownLanguageException(string message, Exception exception) : base(message, exception) | ||
51 | { | ||
52 | } | ||
53 | |||
54 | /// <summary> | ||
55 | /// | ||
56 | /// </summary> | ||
57 | /// <param name="info"></param> | ||
58 | /// <param name="context"></param> | ||
59 | protected UnknownLanguageException(SerializationInfo info, StreamingContext context) : base( info, context ) | ||
60 | { | ||
61 | } | ||
62 | } | ||
63 | } | ||
diff --git a/Prebuild/src/Core/Utilities/CommandLineCollection.cs b/Prebuild/src/Core/Utilities/CommandLineCollection.cs deleted file mode 100644 index 22752aa..0000000 --- a/Prebuild/src/Core/Utilities/CommandLineCollection.cs +++ /dev/null | |||
@@ -1,153 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Collections; | ||
28 | using System.Collections.Specialized; | ||
29 | using System.Diagnostics; | ||
30 | |||
31 | namespace Prebuild.Core.Utilities | ||
32 | { | ||
33 | /// <summary> | ||
34 | /// The CommandLine class parses and interprets the command-line arguments passed to | ||
35 | /// prebuild. | ||
36 | /// </summary> | ||
37 | public class CommandLineCollection | ||
38 | { | ||
39 | #region Fields | ||
40 | |||
41 | // The raw OS arguments | ||
42 | private string[] m_RawArgs; | ||
43 | |||
44 | // Command-line argument storage | ||
45 | private Hashtable m_Arguments; | ||
46 | |||
47 | #endregion | ||
48 | |||
49 | #region Constructors | ||
50 | |||
51 | /// <summary> | ||
52 | /// Create a new CommandLine instance and set some internal variables. | ||
53 | /// </summary> | ||
54 | public CommandLineCollection(string[] args) | ||
55 | { | ||
56 | m_RawArgs = args; | ||
57 | m_Arguments = new Hashtable(); | ||
58 | |||
59 | Parse(); | ||
60 | } | ||
61 | |||
62 | #endregion | ||
63 | |||
64 | #region Private Methods | ||
65 | |||
66 | private void Parse() | ||
67 | { | ||
68 | if(m_RawArgs.Length < 1) | ||
69 | return; | ||
70 | |||
71 | int idx = 0; | ||
72 | string arg = null, lastArg = null; | ||
73 | |||
74 | while(idx <m_RawArgs.Length) | ||
75 | { | ||
76 | arg = m_RawArgs[idx]; | ||
77 | |||
78 | if(arg.Length > 2 && arg[0] == '/') | ||
79 | { | ||
80 | arg = arg.Substring(1); | ||
81 | lastArg = arg; | ||
82 | m_Arguments[arg] = ""; | ||
83 | } | ||
84 | else | ||
85 | { | ||
86 | if(lastArg != null) | ||
87 | { | ||
88 | m_Arguments[lastArg] = arg; | ||
89 | lastArg = null; | ||
90 | } | ||
91 | } | ||
92 | |||
93 | idx++; | ||
94 | } | ||
95 | } | ||
96 | |||
97 | #endregion | ||
98 | |||
99 | #region Public Methods | ||
100 | |||
101 | /// <summary> | ||
102 | /// Wases the passed. | ||
103 | /// </summary> | ||
104 | /// <param name="arg">The arg.</param> | ||
105 | /// <returns></returns> | ||
106 | public bool WasPassed(string arg) | ||
107 | { | ||
108 | return (m_Arguments.ContainsKey(arg)); | ||
109 | } | ||
110 | |||
111 | #endregion | ||
112 | |||
113 | #region Properties | ||
114 | |||
115 | /// <summary> | ||
116 | /// Gets the parameter associated with the command line option | ||
117 | /// </summary> | ||
118 | /// <remarks>Returns null if option was not specified, | ||
119 | /// null string if no parameter was specified, and the value if a parameter was specified</remarks> | ||
120 | public string this[string index] | ||
121 | { | ||
122 | get | ||
123 | { | ||
124 | if(m_Arguments.ContainsKey(index)) | ||
125 | { | ||
126 | return (string)(m_Arguments[index]); | ||
127 | } | ||
128 | else | ||
129 | { | ||
130 | return null; | ||
131 | } | ||
132 | } | ||
133 | } | ||
134 | |||
135 | #endregion | ||
136 | |||
137 | #region IEnumerable Members | ||
138 | |||
139 | /// <summary> | ||
140 | /// Returns an enumerator that can iterate through a collection. | ||
141 | /// </summary> | ||
142 | /// <returns> | ||
143 | /// An <see cref="T:System.Collections.IDictionaryEnumerator"/> | ||
144 | /// that can be used to iterate through the collection. | ||
145 | /// </returns> | ||
146 | public IDictionaryEnumerator GetEnumerator() | ||
147 | { | ||
148 | return m_Arguments.GetEnumerator(); | ||
149 | } | ||
150 | |||
151 | #endregion | ||
152 | } | ||
153 | } | ||
diff --git a/Prebuild/src/Core/Utilities/CurrentDirectory.cs b/Prebuild/src/Core/Utilities/CurrentDirectory.cs deleted file mode 100644 index 5fabdf0..0000000 --- a/Prebuild/src/Core/Utilities/CurrentDirectory.cs +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Collections; | ||
28 | |||
29 | namespace Prebuild.Core.Utilities | ||
30 | { | ||
31 | /// <summary> | ||
32 | /// | ||
33 | /// </summary> | ||
34 | public class CurrentDirectory | ||
35 | { | ||
36 | #region Fields | ||
37 | |||
38 | private Stack m_Stack; | ||
39 | |||
40 | #endregion | ||
41 | |||
42 | #region Constructors | ||
43 | |||
44 | /// <summary> | ||
45 | /// Initializes a new instance of the <see cref="CurrentDirectory"/> class. | ||
46 | /// </summary> | ||
47 | public CurrentDirectory() | ||
48 | { | ||
49 | m_Stack = new Stack(); | ||
50 | } | ||
51 | |||
52 | #endregion | ||
53 | |||
54 | #region Public Methods | ||
55 | |||
56 | /// <summary> | ||
57 | /// Pushes this instance. | ||
58 | /// </summary> | ||
59 | public void Push() | ||
60 | { | ||
61 | m_Stack.Push(Environment.CurrentDirectory); | ||
62 | } | ||
63 | |||
64 | /// <summary> | ||
65 | /// Pops this instance. | ||
66 | /// </summary> | ||
67 | public void Pop() | ||
68 | { | ||
69 | if(m_Stack.Count < 1) | ||
70 | { | ||
71 | return; | ||
72 | } | ||
73 | |||
74 | string cwd = (string)m_Stack.Pop(); | ||
75 | Helper.SetCurrentDir(cwd); | ||
76 | } | ||
77 | |||
78 | #endregion | ||
79 | } | ||
80 | } | ||
diff --git a/Prebuild/src/Core/Utilities/Helper.cs b/Prebuild/src/Core/Utilities/Helper.cs deleted file mode 100644 index 9a0d131..0000000 --- a/Prebuild/src/Core/Utilities/Helper.cs +++ /dev/null | |||
@@ -1,654 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Collections; | ||
28 | using System.Diagnostics; | ||
29 | using System.IO; | ||
30 | using System.Runtime.InteropServices; | ||
31 | using System.Text.RegularExpressions; | ||
32 | using System.Collections.Specialized; | ||
33 | using System.Xml; | ||
34 | using Prebuild.Core.Nodes; | ||
35 | |||
36 | namespace Prebuild.Core.Utilities | ||
37 | { | ||
38 | /// <summary> | ||
39 | /// | ||
40 | /// </summary> | ||
41 | public class Helper | ||
42 | { | ||
43 | #region Fields | ||
44 | |||
45 | private static Stack dirStack; | ||
46 | private static Regex varRegex; | ||
47 | static bool checkForOSVariables; | ||
48 | |||
49 | /// <summary> | ||
50 | /// | ||
51 | /// </summary> | ||
52 | public static bool CheckForOSVariables | ||
53 | { | ||
54 | get | ||
55 | { | ||
56 | return checkForOSVariables; | ||
57 | } | ||
58 | set | ||
59 | { | ||
60 | checkForOSVariables = value; | ||
61 | } | ||
62 | } | ||
63 | |||
64 | #endregion | ||
65 | |||
66 | #region Constructors | ||
67 | |||
68 | /// <summary> | ||
69 | /// Initializes the <see cref="Helper"/> class. | ||
70 | /// </summary> | ||
71 | static Helper() | ||
72 | { | ||
73 | dirStack = new Stack(); | ||
74 | //m_VarRegex = new Regex(@"\${(?<var>[\w|_]+)}"); | ||
75 | } | ||
76 | |||
77 | #endregion | ||
78 | |||
79 | #region Properties | ||
80 | |||
81 | /// <summary> | ||
82 | /// | ||
83 | /// </summary> | ||
84 | public static Stack DirStack | ||
85 | { | ||
86 | get | ||
87 | { | ||
88 | return dirStack; | ||
89 | } | ||
90 | } | ||
91 | |||
92 | /// <summary> | ||
93 | /// | ||
94 | /// </summary> | ||
95 | public static Regex VarRegex | ||
96 | { | ||
97 | get | ||
98 | { | ||
99 | return varRegex; | ||
100 | } | ||
101 | set | ||
102 | { | ||
103 | varRegex = value; | ||
104 | } | ||
105 | } | ||
106 | |||
107 | #endregion | ||
108 | |||
109 | #region Public Methods | ||
110 | |||
111 | #region String Parsing | ||
112 | #region Inner Classes and Delegates | ||
113 | /// <summary> | ||
114 | /// | ||
115 | /// </summary> | ||
116 | public delegate string StringLookup(string key); | ||
117 | |||
118 | #endregion | ||
119 | |||
120 | /// <summary> | ||
121 | /// Gets a collection of StringLocationPair objects that represent the matches | ||
122 | /// </summary> | ||
123 | /// <param name="target">The target.</param> | ||
124 | /// <param name="beforeGroup">The before group.</param> | ||
125 | /// <param name="afterGroup">The after group.</param> | ||
126 | /// <param name="includeDelimitersInSubstrings">if set to <c>true</c> [include delimiters in substrings].</param> | ||
127 | /// <returns></returns> | ||
128 | public static StringCollection FindGroups(string target, string beforeGroup, string afterGroup, bool includeDelimitersInSubstrings) | ||
129 | { | ||
130 | if( beforeGroup == null ) | ||
131 | { | ||
132 | throw new ArgumentNullException("beforeGroup"); | ||
133 | } | ||
134 | if( afterGroup == null ) | ||
135 | { | ||
136 | throw new ArgumentNullException("afterGroup"); | ||
137 | } | ||
138 | StringCollection results = new StringCollection(); | ||
139 | if(target == null || target.Length == 0) | ||
140 | { | ||
141 | return results; | ||
142 | } | ||
143 | |||
144 | int beforeMod = 0; | ||
145 | int afterMod = 0; | ||
146 | if(includeDelimitersInSubstrings) | ||
147 | { | ||
148 | //be sure to not exlude the delims | ||
149 | beforeMod = beforeGroup.Length; | ||
150 | afterMod = afterGroup.Length; | ||
151 | } | ||
152 | int startIndex = 0; | ||
153 | while((startIndex = target.IndexOf(beforeGroup,startIndex)) != -1) { | ||
154 | int endIndex = target.IndexOf(afterGroup,startIndex);//the index of the char after it | ||
155 | if(endIndex == -1) | ||
156 | { | ||
157 | break; | ||
158 | } | ||
159 | int length = endIndex - startIndex - beforeGroup.Length;//move to the first char in the string | ||
160 | string substring = substring = target.Substring(startIndex + beforeGroup.Length - beforeMod, | ||
161 | length - afterMod); | ||
162 | |||
163 | results.Add(substring); | ||
164 | //results.Add(new StringLocationPair(substring,startIndex)); | ||
165 | startIndex = endIndex + 1; | ||
166 | //the Interpolate*() methods will not work if expressions are expandded inside expression due to an optimization | ||
167 | //so start after endIndex | ||
168 | |||
169 | } | ||
170 | return results; | ||
171 | } | ||
172 | |||
173 | /// <summary> | ||
174 | /// Replaces the groups. | ||
175 | /// </summary> | ||
176 | /// <param name="target">The target.</param> | ||
177 | /// <param name="beforeGroup">The before group.</param> | ||
178 | /// <param name="afterGroup">The after group.</param> | ||
179 | /// <param name="lookup">The lookup.</param> | ||
180 | /// <returns></returns> | ||
181 | public static string ReplaceGroups(string target, string beforeGroup, string afterGroup, StringLookup lookup) { | ||
182 | if( target == null ) | ||
183 | { | ||
184 | throw new ArgumentNullException("target"); | ||
185 | } | ||
186 | //int targetLength = target.Length; | ||
187 | StringCollection strings = FindGroups(target,beforeGroup,afterGroup,false); | ||
188 | if( lookup == null ) | ||
189 | { | ||
190 | throw new ArgumentNullException("lookup"); | ||
191 | } | ||
192 | foreach(string substring in strings) | ||
193 | { | ||
194 | target = target.Replace(beforeGroup + substring + afterGroup, lookup(substring) ); | ||
195 | } | ||
196 | return target; | ||
197 | } | ||
198 | |||
199 | /// <summary> | ||
200 | /// Replaces ${var} statements in a string with the corresonding values as detirmined by the lookup delegate | ||
201 | /// </summary> | ||
202 | /// <param name="target">The target.</param> | ||
203 | /// <param name="lookup">The lookup.</param> | ||
204 | /// <returns></returns> | ||
205 | public static string InterpolateForVariables(string target, StringLookup lookup) | ||
206 | { | ||
207 | return ReplaceGroups(target, "${" , "}" , lookup); | ||
208 | } | ||
209 | |||
210 | /// <summary> | ||
211 | /// Replaces ${var} statements in a string with the corresonding environment variable with name var | ||
212 | /// </summary> | ||
213 | /// <param name="target"></param> | ||
214 | /// <returns></returns> | ||
215 | public static string InterpolateForEnvironmentVariables(string target) | ||
216 | { | ||
217 | return InterpolateForVariables(target, new StringLookup(Environment.GetEnvironmentVariable)); | ||
218 | } | ||
219 | |||
220 | #endregion | ||
221 | |||
222 | /// <summary> | ||
223 | /// Translates the value. | ||
224 | /// </summary> | ||
225 | /// <param name="translateType">Type of the translate.</param> | ||
226 | /// <param name="translationItem">The translation item.</param> | ||
227 | /// <returns></returns> | ||
228 | public static object TranslateValue(Type translateType, string translationItem) | ||
229 | { | ||
230 | if(translationItem == null) | ||
231 | { | ||
232 | return null; | ||
233 | } | ||
234 | |||
235 | try | ||
236 | { | ||
237 | string lowerVal = translationItem.ToLower(); | ||
238 | if(translateType == typeof(bool)) | ||
239 | { | ||
240 | return (lowerVal == "true" || lowerVal == "1" || lowerVal == "y" || lowerVal == "yes" || lowerVal == "on"); | ||
241 | } | ||
242 | else if(translateType == typeof(int)) | ||
243 | { | ||
244 | return (Int32.Parse(translationItem)); | ||
245 | } | ||
246 | else | ||
247 | { | ||
248 | return translationItem; | ||
249 | } | ||
250 | } | ||
251 | catch(FormatException) | ||
252 | { | ||
253 | return null; | ||
254 | } | ||
255 | } | ||
256 | |||
257 | /// <summary> | ||
258 | /// Deletes if exists. | ||
259 | /// </summary> | ||
260 | /// <param name="file">The file.</param> | ||
261 | /// <returns></returns> | ||
262 | public static bool DeleteIfExists(string file) | ||
263 | { | ||
264 | string resFile = null; | ||
265 | try | ||
266 | { | ||
267 | resFile = ResolvePath(file); | ||
268 | } | ||
269 | catch(ArgumentException) | ||
270 | { | ||
271 | return false; | ||
272 | } | ||
273 | |||
274 | if(!File.Exists(resFile)) | ||
275 | { | ||
276 | return false; | ||
277 | } | ||
278 | |||
279 | File.Delete(resFile); | ||
280 | return true; | ||
281 | } | ||
282 | |||
283 | static readonly char seperator = Path.DirectorySeparatorChar; | ||
284 | |||
285 | // This little gem was taken from the NeL source, thanks guys! | ||
286 | /// <summary> | ||
287 | /// Makes a relative path | ||
288 | /// </summary> | ||
289 | /// <param name="startPath">Path to start from</param> | ||
290 | /// <param name="endPath">Path to end at</param> | ||
291 | /// <returns>Path that will get from startPath to endPath</returns> | ||
292 | public static string MakePathRelativeTo(string startPath, string endPath) | ||
293 | { | ||
294 | string tmp = NormalizePath(startPath, seperator); | ||
295 | string src = NormalizePath(endPath, seperator); | ||
296 | string prefix = ""; | ||
297 | |||
298 | while(true) | ||
299 | { | ||
300 | if((String.Compare(tmp, 0, src, 0, tmp.Length) == 0)) | ||
301 | { | ||
302 | string ret; | ||
303 | int size = tmp.Length; | ||
304 | if(size == src.Length) | ||
305 | { | ||
306 | return "./"; | ||
307 | } | ||
308 | if((src.Length > tmp.Length) && src[tmp.Length - 1] != seperator) | ||
309 | { | ||
310 | } | ||
311 | else | ||
312 | { | ||
313 | ret = prefix + endPath.Substring(size, endPath.Length - size); | ||
314 | ret = ret.Trim(); | ||
315 | if(ret[0] == seperator) | ||
316 | { | ||
317 | ret = "." + ret; | ||
318 | } | ||
319 | |||
320 | return NormalizePath(ret); | ||
321 | } | ||
322 | |||
323 | } | ||
324 | |||
325 | if(tmp.Length < 2) | ||
326 | { | ||
327 | break; | ||
328 | } | ||
329 | |||
330 | int lastPos = tmp.LastIndexOf(seperator, tmp.Length - 2); | ||
331 | int prevPos = tmp.IndexOf(seperator); | ||
332 | |||
333 | if((lastPos == prevPos) || (lastPos == -1)) | ||
334 | { | ||
335 | break; | ||
336 | } | ||
337 | |||
338 | tmp = tmp.Substring(0, lastPos + 1); | ||
339 | prefix += ".." + seperator.ToString(); | ||
340 | } | ||
341 | |||
342 | return endPath; | ||
343 | } | ||
344 | |||
345 | /// <summary> | ||
346 | /// Resolves the path. | ||
347 | /// </summary> | ||
348 | /// <param name="path">The path.</param> | ||
349 | /// <returns></returns> | ||
350 | public static string ResolvePath(string path) | ||
351 | { | ||
352 | string tmpPath = NormalizePath(path); | ||
353 | if(tmpPath.Length < 1) | ||
354 | { | ||
355 | tmpPath = "."; | ||
356 | } | ||
357 | |||
358 | tmpPath = Path.GetFullPath(tmpPath); | ||
359 | if(!File.Exists(tmpPath) && !Directory.Exists(tmpPath)) | ||
360 | { | ||
361 | throw new ArgumentException("Path could not be resolved: " + tmpPath); | ||
362 | } | ||
363 | |||
364 | return tmpPath; | ||
365 | } | ||
366 | |||
367 | /// <summary> | ||
368 | /// Normalizes the path. | ||
369 | /// </summary> | ||
370 | /// <param name="path">The path.</param> | ||
371 | /// <param name="separatorCharacter">The separator character.</param> | ||
372 | /// <returns></returns> | ||
373 | public static string NormalizePath(string path, char separatorCharacter) | ||
374 | { | ||
375 | if(path == null || path == "" || path.Length < 1) | ||
376 | { | ||
377 | return ""; | ||
378 | } | ||
379 | |||
380 | string tmpPath = path.Replace('\\', '/'); | ||
381 | tmpPath = tmpPath.Replace('/', separatorCharacter); | ||
382 | return tmpPath; | ||
383 | } | ||
384 | |||
385 | /// <summary> | ||
386 | /// Normalizes the path. | ||
387 | /// </summary> | ||
388 | /// <param name="path">The path.</param> | ||
389 | /// <returns></returns> | ||
390 | public static string NormalizePath(string path) | ||
391 | { | ||
392 | return NormalizePath(path, Path.DirectorySeparatorChar); | ||
393 | } | ||
394 | |||
395 | /// <summary> | ||
396 | /// Ends the path. | ||
397 | /// </summary> | ||
398 | /// <param name="path">The path.</param> | ||
399 | /// <param name="separatorCharacter">The separator character.</param> | ||
400 | /// <returns></returns> | ||
401 | public static string EndPath(string path, char separatorCharacter) | ||
402 | { | ||
403 | if(path == null || path == "" || path.Length < 1) | ||
404 | { | ||
405 | return ""; | ||
406 | } | ||
407 | |||
408 | if(!path.EndsWith(separatorCharacter.ToString())) | ||
409 | { | ||
410 | return (path + separatorCharacter); | ||
411 | } | ||
412 | |||
413 | return path; | ||
414 | } | ||
415 | |||
416 | /// <summary> | ||
417 | /// Ends the path. | ||
418 | /// </summary> | ||
419 | /// <param name="path">The path.</param> | ||
420 | /// <returns></returns> | ||
421 | public static string EndPath(string path) | ||
422 | { | ||
423 | return EndPath(path, Path.DirectorySeparatorChar); | ||
424 | } | ||
425 | |||
426 | /// <summary> | ||
427 | /// Makes the file path. | ||
428 | /// </summary> | ||
429 | /// <param name="path">The path.</param> | ||
430 | /// <param name="name">The name.</param> | ||
431 | /// <param name="ext">The ext.</param> | ||
432 | /// <returns></returns> | ||
433 | public static string MakeFilePath(string path, string name, string ext) | ||
434 | { | ||
435 | string ret = EndPath(NormalizePath(path)); | ||
436 | |||
437 | if( name == null ) | ||
438 | { | ||
439 | throw new ArgumentNullException("name"); | ||
440 | } | ||
441 | |||
442 | ret += name; | ||
443 | if(!name.EndsWith("." + ext)) | ||
444 | { | ||
445 | ret += "." + ext; | ||
446 | } | ||
447 | |||
448 | //foreach(char c in Path.GetInvalidPathChars()) | ||
449 | //{ | ||
450 | // ret = ret.Replace(c, '_'); | ||
451 | //} | ||
452 | |||
453 | return ret; | ||
454 | } | ||
455 | |||
456 | /// <summary> | ||
457 | /// Makes the file path. | ||
458 | /// </summary> | ||
459 | /// <param name="path">The path.</param> | ||
460 | /// <param name="name">The name.</param> | ||
461 | /// <returns></returns> | ||
462 | public static string MakeFilePath(string path, string name) | ||
463 | { | ||
464 | string ret = EndPath(NormalizePath(path)); | ||
465 | |||
466 | if( name == null ) | ||
467 | { | ||
468 | throw new ArgumentNullException("name"); | ||
469 | } | ||
470 | |||
471 | ret += name; | ||
472 | |||
473 | //foreach (char c in Path.GetInvalidPathChars()) | ||
474 | //{ | ||
475 | // ret = ret.Replace(c, '_'); | ||
476 | //} | ||
477 | |||
478 | return ret; | ||
479 | } | ||
480 | |||
481 | /// <summary> | ||
482 | /// | ||
483 | /// </summary> | ||
484 | /// <param name="path"></param> | ||
485 | /// <returns></returns> | ||
486 | public static string MakeReferencePath(string path) | ||
487 | { | ||
488 | string ret = EndPath(NormalizePath(path)); | ||
489 | |||
490 | //foreach (char c in Path.GetInvalidPathChars()) | ||
491 | //{ | ||
492 | // ret = ret.Replace(c, '_'); | ||
493 | //} | ||
494 | |||
495 | return ret; | ||
496 | } | ||
497 | |||
498 | /// <summary> | ||
499 | /// Sets the current dir. | ||
500 | /// </summary> | ||
501 | /// <param name="path">The path.</param> | ||
502 | public static void SetCurrentDir(string path) | ||
503 | { | ||
504 | if( path == null ) | ||
505 | { | ||
506 | throw new ArgumentNullException("path"); | ||
507 | } | ||
508 | if(path.Length < 1) | ||
509 | { | ||
510 | return; | ||
511 | } | ||
512 | |||
513 | Environment.CurrentDirectory = path; | ||
514 | } | ||
515 | |||
516 | /// <summary> | ||
517 | /// Checks the type. | ||
518 | /// </summary> | ||
519 | /// <param name="typeToCheck">The type to check.</param> | ||
520 | /// <param name="attr">The attr.</param> | ||
521 | /// <param name="inter">The inter.</param> | ||
522 | /// <returns></returns> | ||
523 | public static object CheckType(Type typeToCheck, Type attr, Type inter) | ||
524 | { | ||
525 | if(typeToCheck == null || attr == null) | ||
526 | { | ||
527 | return null; | ||
528 | } | ||
529 | |||
530 | object[] attrs = typeToCheck.GetCustomAttributes(attr, false); | ||
531 | if(attrs == null || attrs.Length < 1) | ||
532 | { | ||
533 | return null; | ||
534 | } | ||
535 | if( inter == null ) | ||
536 | { | ||
537 | throw new ArgumentNullException("inter"); | ||
538 | } | ||
539 | |||
540 | if(typeToCheck.GetInterface(inter.FullName) == null) | ||
541 | { | ||
542 | return null; | ||
543 | } | ||
544 | |||
545 | return attrs[0]; | ||
546 | } | ||
547 | |||
548 | /* A bit of overhead for simple group parsing, there are problems with Regex in Mono | ||
549 | public static string ParseValue(string val) | ||
550 | { | ||
551 | if(val == null || val.Length < 1 || !CheckForOSVariables) | ||
552 | return val; | ||
553 | |||
554 | string tmp = val; | ||
555 | Match m = m_VarRegex.Match(val); | ||
556 | while(m.Success) | ||
557 | { | ||
558 | if(m.Groups["var"] == null) | ||
559 | continue; | ||
560 | |||
561 | Capture c = m.Groups["var"].Captures[0]; | ||
562 | if(c == null) | ||
563 | continue; | ||
564 | |||
565 | string var = c.Value; | ||
566 | string envVal = Environment.GetEnvironmentVariable(var); | ||
567 | if(envVal == null) | ||
568 | envVal = ""; | ||
569 | |||
570 | tmp = tmp.Replace("${" + var + "}", envVal); | ||
571 | m = m.NextMatch(); | ||
572 | } | ||
573 | |||
574 | return tmp; | ||
575 | }*/ | ||
576 | |||
577 | /// <summary> | ||
578 | /// Attributes the value. | ||
579 | /// </summary> | ||
580 | /// <param name="node">The node.</param> | ||
581 | /// <param name="attr">The attr.</param> | ||
582 | /// <param name="def">The def.</param> | ||
583 | /// <returns></returns> | ||
584 | public static string AttributeValue(XmlNode node, string attr, string def) | ||
585 | { | ||
586 | if( node == null ) | ||
587 | { | ||
588 | throw new ArgumentNullException("node"); | ||
589 | } | ||
590 | if(node.Attributes[attr] == null) | ||
591 | { | ||
592 | return def; | ||
593 | } | ||
594 | string val = node.Attributes[attr].Value; | ||
595 | if(!CheckForOSVariables) | ||
596 | { | ||
597 | return val; | ||
598 | } | ||
599 | |||
600 | return InterpolateForEnvironmentVariables(val); | ||
601 | } | ||
602 | |||
603 | /// <summary> | ||
604 | /// Parses the boolean. | ||
605 | /// </summary> | ||
606 | /// <param name="node">The node.</param> | ||
607 | /// <param name="attr">The attr.</param> | ||
608 | /// <param name="defaultValue">if set to <c>true</c> [default value].</param> | ||
609 | /// <returns></returns> | ||
610 | public static bool ParseBoolean(XmlNode node, string attr, bool defaultValue) | ||
611 | { | ||
612 | if( node == null ) | ||
613 | { | ||
614 | throw new ArgumentNullException("node"); | ||
615 | } | ||
616 | if(node.Attributes[attr] == null) | ||
617 | { | ||
618 | return defaultValue; | ||
619 | } | ||
620 | return bool.Parse(node.Attributes[attr].Value); | ||
621 | } | ||
622 | |||
623 | /// <summary> | ||
624 | /// Enums the attribute value. | ||
625 | /// </summary> | ||
626 | /// <param name="node">The node.</param> | ||
627 | /// <param name="attr">The attr.</param> | ||
628 | /// <param name="enumType">Type of the enum.</param> | ||
629 | /// <param name="def">The def.</param> | ||
630 | /// <returns></returns> | ||
631 | public static object EnumAttributeValue(XmlNode node, string attr, Type enumType, object def) | ||
632 | { | ||
633 | if( def == null ) | ||
634 | { | ||
635 | throw new ArgumentNullException("def"); | ||
636 | } | ||
637 | string val = AttributeValue(node, attr, def.ToString()); | ||
638 | return Enum.Parse(enumType, val, true); | ||
639 | } | ||
640 | |||
641 | /// <summary> | ||
642 | /// | ||
643 | /// </summary> | ||
644 | /// <param name="assemblyName"></param> | ||
645 | /// <param name="projectType"></param> | ||
646 | /// <returns></returns> | ||
647 | public static string AssemblyFullName(string assemblyName, ProjectType projectType) | ||
648 | { | ||
649 | return assemblyName + (projectType == ProjectType.Library ? ".dll" : ".exe"); | ||
650 | } | ||
651 | |||
652 | #endregion | ||
653 | } | ||
654 | } | ||
diff --git a/Prebuild/src/Core/Utilities/Log.cs b/Prebuild/src/Core/Utilities/Log.cs deleted file mode 100644 index 548e987..0000000 --- a/Prebuild/src/Core/Utilities/Log.cs +++ /dev/null | |||
@@ -1,270 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.IO; | ||
28 | |||
29 | namespace Prebuild.Core.Utilities | ||
30 | { | ||
31 | /// <summary> | ||
32 | /// | ||
33 | /// </summary> | ||
34 | public enum LogType | ||
35 | { | ||
36 | /// <summary> | ||
37 | /// | ||
38 | /// </summary> | ||
39 | None, | ||
40 | /// <summary> | ||
41 | /// | ||
42 | /// </summary> | ||
43 | Info, | ||
44 | /// <summary> | ||
45 | /// | ||
46 | /// </summary> | ||
47 | Warning, | ||
48 | /// <summary> | ||
49 | /// | ||
50 | /// </summary> | ||
51 | Error | ||
52 | } | ||
53 | |||
54 | /// <summary> | ||
55 | /// | ||
56 | /// </summary> | ||
57 | [Flags] | ||
58 | public enum LogTargets | ||
59 | { | ||
60 | /// <summary> | ||
61 | /// | ||
62 | /// </summary> | ||
63 | None = 0, | ||
64 | /// <summary> | ||
65 | /// | ||
66 | /// </summary> | ||
67 | Null = 1, | ||
68 | /// <summary> | ||
69 | /// | ||
70 | /// </summary> | ||
71 | File = 2, | ||
72 | /// <summary> | ||
73 | /// | ||
74 | /// </summary> | ||
75 | Console = 4 | ||
76 | } | ||
77 | |||
78 | /// <summary> | ||
79 | /// Summary description for Log. | ||
80 | /// </summary> | ||
81 | public class Log : IDisposable | ||
82 | { | ||
83 | #region Fields | ||
84 | |||
85 | private StreamWriter m_Writer; | ||
86 | private LogTargets m_Target = LogTargets.Null; | ||
87 | bool disposed; | ||
88 | |||
89 | #endregion | ||
90 | |||
91 | #region Constructors | ||
92 | |||
93 | /// <summary> | ||
94 | /// Initializes a new instance of the <see cref="Log"/> class. | ||
95 | /// </summary> | ||
96 | /// <param name="target">The target.</param> | ||
97 | /// <param name="fileName">Name of the file.</param> | ||
98 | public Log(LogTargets target, string fileName) | ||
99 | { | ||
100 | m_Target = target; | ||
101 | |||
102 | if((m_Target & LogTargets.File) != 0) | ||
103 | { | ||
104 | m_Writer = new StreamWriter(fileName, false); | ||
105 | } | ||
106 | } | ||
107 | |||
108 | #endregion | ||
109 | |||
110 | #region Public Methods | ||
111 | |||
112 | /// <summary> | ||
113 | /// Writes this instance. | ||
114 | /// </summary> | ||
115 | public void Write() | ||
116 | { | ||
117 | Write(string.Empty); | ||
118 | } | ||
119 | |||
120 | /// <summary> | ||
121 | /// Writes the specified MSG. | ||
122 | /// </summary> | ||
123 | /// <param name="msg">The MSG.</param> | ||
124 | public void Write(string msg) | ||
125 | { | ||
126 | if((m_Target & LogTargets.Null) != 0) | ||
127 | { | ||
128 | return; | ||
129 | } | ||
130 | |||
131 | if((m_Target & LogTargets.Console) != 0) | ||
132 | { | ||
133 | Console.WriteLine(msg); | ||
134 | } | ||
135 | if((m_Target & LogTargets.File) != 0 && m_Writer != null) | ||
136 | { | ||
137 | m_Writer.WriteLine(msg); | ||
138 | } | ||
139 | } | ||
140 | |||
141 | /// <summary> | ||
142 | /// Writes the specified format. | ||
143 | /// </summary> | ||
144 | /// <param name="format">The format.</param> | ||
145 | /// <param name="args">The args.</param> | ||
146 | public void Write(string format, params object[] args) | ||
147 | { | ||
148 | Write(string.Format(format,args)); | ||
149 | } | ||
150 | |||
151 | /// <summary> | ||
152 | /// Writes the specified type. | ||
153 | /// </summary> | ||
154 | /// <param name="type">The type.</param> | ||
155 | /// <param name="format">The format.</param> | ||
156 | /// <param name="args">The args.</param> | ||
157 | public void Write(LogType type, string format, params object[] args) | ||
158 | { | ||
159 | if((m_Target & LogTargets.Null) != 0) | ||
160 | { | ||
161 | return; | ||
162 | } | ||
163 | |||
164 | string str = ""; | ||
165 | switch(type) | ||
166 | { | ||
167 | case LogType.Info: | ||
168 | str = "[I] "; | ||
169 | break; | ||
170 | case LogType.Warning: | ||
171 | str = "[!] "; | ||
172 | break; | ||
173 | case LogType.Error: | ||
174 | str = "[X] "; | ||
175 | break; | ||
176 | } | ||
177 | |||
178 | Write(str + format,args); | ||
179 | } | ||
180 | |||
181 | /// <summary> | ||
182 | /// Writes the exception. | ||
183 | /// </summary> | ||
184 | /// <param name="type">The type.</param> | ||
185 | /// <param name="ex">The ex.</param> | ||
186 | public void WriteException(LogType type, Exception ex) | ||
187 | { | ||
188 | if(ex != null) | ||
189 | { | ||
190 | Write(type, ex.Message); | ||
191 | //#if DEBUG | ||
192 | m_Writer.WriteLine("Exception @{0} stack trace [[", ex.TargetSite.Name); | ||
193 | m_Writer.WriteLine(ex.StackTrace); | ||
194 | m_Writer.WriteLine("]]"); | ||
195 | //#endif | ||
196 | } | ||
197 | } | ||
198 | |||
199 | /// <summary> | ||
200 | /// Flushes this instance. | ||
201 | /// </summary> | ||
202 | public void Flush() | ||
203 | { | ||
204 | if(m_Writer != null) | ||
205 | { | ||
206 | m_Writer.Flush(); | ||
207 | } | ||
208 | } | ||
209 | |||
210 | #endregion | ||
211 | |||
212 | #region IDisposable Members | ||
213 | |||
214 | /// <summary> | ||
215 | /// Performs application-defined tasks associated with freeing, releasing, or | ||
216 | /// resetting unmanaged resources. | ||
217 | /// </summary> | ||
218 | public void Dispose() | ||
219 | { | ||
220 | Dispose(true); | ||
221 | GC.SuppressFinalize(this); | ||
222 | } | ||
223 | |||
224 | /// <summary> | ||
225 | /// Dispose objects | ||
226 | /// </summary> | ||
227 | /// <param name="disposing"> | ||
228 | /// If true, it will dispose close the handle | ||
229 | /// </param> | ||
230 | /// <remarks> | ||
231 | /// Will dispose managed and unmanaged resources. | ||
232 | /// </remarks> | ||
233 | protected virtual void Dispose(bool disposing) | ||
234 | { | ||
235 | if (!this.disposed) | ||
236 | { | ||
237 | if (disposing) | ||
238 | { | ||
239 | if (m_Writer != null) | ||
240 | { | ||
241 | m_Writer.Close(); | ||
242 | m_Writer = null; | ||
243 | } | ||
244 | } | ||
245 | } | ||
246 | this.disposed = true; | ||
247 | } | ||
248 | |||
249 | /// <summary> | ||
250 | /// | ||
251 | /// </summary> | ||
252 | ~Log() | ||
253 | { | ||
254 | this.Dispose(false); | ||
255 | } | ||
256 | |||
257 | /// <summary> | ||
258 | /// Closes and destroys this object | ||
259 | /// </summary> | ||
260 | /// <remarks> | ||
261 | /// Same as Dispose(true) | ||
262 | /// </remarks> | ||
263 | public void Close() | ||
264 | { | ||
265 | Dispose(); | ||
266 | } | ||
267 | |||
268 | #endregion | ||
269 | } | ||
270 | } | ||
diff --git a/Prebuild/src/Core/WarningException.cs b/Prebuild/src/Core/WarningException.cs deleted file mode 100644 index df90dc8..0000000 --- a/Prebuild/src/Core/WarningException.cs +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Runtime.Serialization; | ||
28 | |||
29 | namespace Prebuild.Core | ||
30 | { | ||
31 | /// <summary> | ||
32 | /// | ||
33 | /// </summary> | ||
34 | [Serializable()] | ||
35 | public class WarningException : Exception | ||
36 | { | ||
37 | #region Constructors | ||
38 | |||
39 | /// <summary> | ||
40 | /// | ||
41 | /// </summary> | ||
42 | public WarningException() | ||
43 | { | ||
44 | } | ||
45 | |||
46 | /// <summary> | ||
47 | /// | ||
48 | /// </summary> | ||
49 | /// <param name="format"></param> | ||
50 | /// <param name="args"></param> | ||
51 | public WarningException(string format, params object[] args) | ||
52 | : base(String.Format(format, args)) | ||
53 | { | ||
54 | } | ||
55 | |||
56 | /// <summary> | ||
57 | /// Exception with specified string | ||
58 | /// </summary> | ||
59 | /// <param name="message">Exception message</param> | ||
60 | public WarningException(string message): base(message) | ||
61 | { | ||
62 | } | ||
63 | |||
64 | /// <summary> | ||
65 | /// | ||
66 | /// </summary> | ||
67 | /// <param name="message"></param> | ||
68 | /// <param name="exception"></param> | ||
69 | public WarningException(string message, Exception exception) : base(message, exception) | ||
70 | { | ||
71 | } | ||
72 | |||
73 | /// <summary> | ||
74 | /// | ||
75 | /// </summary> | ||
76 | /// <param name="info"></param> | ||
77 | /// <param name="context"></param> | ||
78 | protected WarningException(SerializationInfo info, StreamingContext context) : base( info, context ) | ||
79 | { | ||
80 | } | ||
81 | |||
82 | #endregion | ||
83 | } | ||
84 | } | ||
diff --git a/Prebuild/src/Prebuild.cs b/Prebuild/src/Prebuild.cs deleted file mode 100644 index 2d12b53..0000000 --- a/Prebuild/src/Prebuild.cs +++ /dev/null | |||
@@ -1,165 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | #region CVS Information | ||
27 | /* | ||
28 | * $Source$ | ||
29 | * $Author: jendave $ | ||
30 | * $Date: 2006-09-26 23:43:35 +0200 (ti, 26 sep 2006) $ | ||
31 | * $Revision: 168 $ | ||
32 | */ | ||
33 | #endregion | ||
34 | |||
35 | using System; | ||
36 | using System.Collections.Specialized; | ||
37 | using System.IO; | ||
38 | using System.Reflection; | ||
39 | using System.Runtime.InteropServices; | ||
40 | using System.EnterpriseServices.Internal; | ||
41 | |||
42 | using Prebuild.Core; | ||
43 | using Prebuild.Core.Utilities; | ||
44 | |||
45 | namespace Prebuild | ||
46 | { | ||
47 | /// <summary> | ||
48 | /// | ||
49 | /// </summary> | ||
50 | class Prebuild | ||
51 | { | ||
52 | #region Main | ||
53 | |||
54 | [STAThread] | ||
55 | static void Main(string[] args) | ||
56 | { | ||
57 | Kernel kernel = null; | ||
58 | try | ||
59 | { | ||
60 | kernel = Kernel.Instance; | ||
61 | kernel.Initialize(LogTargets.File | LogTargets.Console, args); | ||
62 | bool exit = false; | ||
63 | |||
64 | if(kernel.CommandLine.WasPassed("usage")) | ||
65 | { | ||
66 | exit = true; | ||
67 | OutputUsage(); | ||
68 | } | ||
69 | if(kernel.CommandLine.WasPassed("showtargets")) | ||
70 | { | ||
71 | exit = true; | ||
72 | OutputTargets(kernel); | ||
73 | } | ||
74 | if(kernel.CommandLine.WasPassed("install")) | ||
75 | { | ||
76 | exit = true; | ||
77 | InstallAssembly(kernel); | ||
78 | } | ||
79 | if(kernel.CommandLine.WasPassed("remove")) | ||
80 | { | ||
81 | exit = true; | ||
82 | RemoveAssembly(kernel); | ||
83 | } | ||
84 | |||
85 | if(!exit) | ||
86 | { | ||
87 | kernel.Process(); | ||
88 | } | ||
89 | } | ||
90 | catch(Exception ex) | ||
91 | { | ||
92 | Console.WriteLine("Unhandled error: {0}", ex.Message); | ||
93 | //#if DEBUG | ||
94 | Console.WriteLine("{0}", ex.StackTrace); | ||
95 | //#endif | ||
96 | } | ||
97 | finally | ||
98 | { | ||
99 | if(kernel.PauseAfterFinish) | ||
100 | { | ||
101 | Console.WriteLine("\nPress enter to continue..."); | ||
102 | Console.ReadLine(); | ||
103 | } | ||
104 | } | ||
105 | } | ||
106 | |||
107 | #endregion | ||
108 | |||
109 | #region Private Methods | ||
110 | |||
111 | private static void InstallAssembly(Kernel kernel) | ||
112 | { | ||
113 | Publish publish = new Publish(); | ||
114 | string file = kernel.CommandLine["install"]; | ||
115 | //Console.WriteLine(".."+file+".."); | ||
116 | publish.GacInstall(file); | ||
117 | } | ||
118 | |||
119 | private static void RemoveAssembly(Kernel kernel) | ||
120 | { | ||
121 | Publish publish = new Publish(); | ||
122 | string file = kernel.CommandLine["remove"]; | ||
123 | publish.GacRemove(file); | ||
124 | } | ||
125 | |||
126 | private static void OutputUsage() | ||
127 | { | ||
128 | Console.WriteLine("Usage: prebuild /target <target> [options]"); | ||
129 | Console.WriteLine("Available command-line switches:"); | ||
130 | Console.WriteLine(); | ||
131 | Console.WriteLine("/target Target for Prebuild"); | ||
132 | Console.WriteLine("/clean Clean the build files for the given target"); | ||
133 | Console.WriteLine("/file XML file to process"); | ||
134 | Console.WriteLine("/log Log file to write to"); | ||
135 | Console.WriteLine("/ppo Pre-process the file, but perform no other processing"); | ||
136 | Console.WriteLine("/pause Pauses the application after execution to view the output"); | ||
137 | Console.WriteLine("/yes Default to yes to any questions asked"); | ||
138 | Console.WriteLine("/install Install assembly into the GAC"); | ||
139 | Console.WriteLine("/remove Remove assembly from the GAC"); | ||
140 | Console.WriteLine(); | ||
141 | Console.WriteLine("See 'prebuild /showtargets for a list of available targets"); | ||
142 | Console.WriteLine("See readme.txt or check out http://dnpb.sourceforge.net for more information"); | ||
143 | Console.WriteLine(); | ||
144 | } | ||
145 | |||
146 | private static void OutputTargets(Kernel kern) | ||
147 | { | ||
148 | Console.WriteLine("Targets available in Prebuild:"); | ||
149 | Console.WriteLine(""); | ||
150 | if(kern.Targets.Keys.Count > 0) | ||
151 | { | ||
152 | string[] targs = new string[kern.Targets.Keys.Count]; | ||
153 | kern.Targets.Keys.CopyTo(targs, 0); | ||
154 | Array.Sort(targs); | ||
155 | foreach(string target in targs) | ||
156 | { | ||
157 | Console.WriteLine(target); | ||
158 | } | ||
159 | } | ||
160 | Console.WriteLine(""); | ||
161 | } | ||
162 | |||
163 | #endregion | ||
164 | } | ||
165 | } | ||
diff --git a/Prebuild/src/Prebuild.snk b/Prebuild/src/Prebuild.snk deleted file mode 100644 index f9dce05..0000000 --- a/Prebuild/src/Prebuild.snk +++ /dev/null | |||
Binary files differ | |||
diff --git a/Prebuild/src/Properties/AssemblyInfo.cs b/Prebuild/src/Properties/AssemblyInfo.cs deleted file mode 100644 index 65c8736..0000000 --- a/Prebuild/src/Properties/AssemblyInfo.cs +++ /dev/null | |||
@@ -1,112 +0,0 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | |||
4 | Copyright (c) 2004 - 2008 | ||
5 | Matthew Holmes (matthew@wildfiregames.com), | ||
6 | Dan Moorehead (dan05a@gmail.com), | ||
7 | Dave Hudson (jendave@yahoo.com), | ||
8 | Rob Loach (http://www.robloach.net), | ||
9 | C.J. Adams-Collier (cjac@colliertech.org), | ||
10 | |||
11 | Redistribution and use in source and binary forms, with or without | ||
12 | modification, are permitted provided that the following conditions are | ||
13 | met: | ||
14 | |||
15 | * Redistributions of source code must retain the above copyright | ||
16 | notice, this list of conditions and the following disclaimer. | ||
17 | |||
18 | * Redistributions in binary form must reproduce the above copyright | ||
19 | notice, this list of conditions and the following disclaimer in the | ||
20 | documentation and/or other materials provided with the distribution. | ||
21 | |||
22 | * The name of the author may not be used to endorse or promote | ||
23 | products derived from this software without specific prior written | ||
24 | permission. | ||
25 | |||
26 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | ||
27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
29 | DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, | ||
30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
36 | POSSIBILITY OF SUCH DAMAGE. | ||
37 | |||
38 | */ | ||
39 | #endregion | ||
40 | |||
41 | using System; | ||
42 | using System.Reflection; | ||
43 | using System.Runtime.CompilerServices; | ||
44 | using System.Runtime.InteropServices; | ||
45 | using System.Security.Permissions; | ||
46 | using System.Resources; | ||
47 | |||
48 | |||
49 | // FxCop recommended attributes | ||
50 | [assembly: ComVisible(false)] | ||
51 | [assembly: FileIOPermission(SecurityAction.RequestMinimum, Unrestricted=true)] | ||
52 | [assembly: CLSCompliant(true)] | ||
53 | |||
54 | // | ||
55 | // General Information about an assembly is controlled through the following | ||
56 | // set of attributes. Change these attribute values to modify the information | ||
57 | // associated with an assembly. | ||
58 | // | ||
59 | [assembly: AssemblyTitle(".NET Prebuild")] | ||
60 | [assembly: AssemblyDescription("A .NET project file build tool")] | ||
61 | [assembly: AssemblyConfiguration(".NET CLR")] | ||
62 | [assembly: AssemblyCompany("The Prebuild Project")] | ||
63 | [assembly: AssemblyProduct("")] | ||
64 | [assembly: AssemblyCopyright("Copyright 2004-2008 " + | ||
65 | "Matthew Holmes, " + | ||
66 | "Dan Moorehead, " + | ||
67 | "C.J. Adams-Collier, " + | ||
68 | "Rob Loach, " + | ||
69 | "David Hudson,")] | ||
70 | [assembly: AssemblyTrademark("")] | ||
71 | [assembly: AssemblyCulture("")] | ||
72 | [assembly: NeutralResourcesLanguageAttribute("en-US")] | ||
73 | [assembly: AssemblyVersion("2.0.4.*")] | ||
74 | |||
75 | // | ||
76 | // Version information for an assembly consists of the following four values: | ||
77 | // | ||
78 | // Major Version | ||
79 | // Minor Version | ||
80 | // Build Number | ||
81 | // Revision | ||
82 | // | ||
83 | // You can specify all the values or you can default the Revision and Build Numbers | ||
84 | // by using the '*' as shown below: | ||
85 | |||
86 | // | ||
87 | // In order to sign your assembly you must specify a key to use. Refer to the | ||
88 | // Microsoft .NET Framework documentation for more information on assembly signing. | ||
89 | // | ||
90 | // Use the attributes below to control which key is used for signing. | ||
91 | // | ||
92 | // Notes: | ||
93 | // (*) If no key is specified, the assembly is not signed. | ||
94 | // (*) KeyName refers to a key that has been installed in the Crypto Service | ||
95 | // Provider (CSP) on your machine. KeyFile refers to a file which contains | ||
96 | // a key. | ||
97 | // (*) If the KeyFile and the KeyName values are both specified, the | ||
98 | // following processing occurs: | ||
99 | // (1) If the KeyName can be found in the CSP, that key is used. | ||
100 | // (2) If the KeyName does not exist and the KeyFile does exist, the key | ||
101 | // in the KeyFile is installed into the CSP and used. | ||
102 | // (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. | ||
103 | // When specifying the KeyFile, the location of the KeyFile should be | ||
104 | // relative to the project output directory which is | ||
105 | // %Project Directory%\obj\<configuration>. For example, if your KeyFile is | ||
106 | // located in the project directory, you would specify the AssemblyKeyFile | ||
107 | // attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] | ||
108 | // (*) Delay Signing is an advanced option - see the Microsoft .NET Framework | ||
109 | // documentation for more information on this. | ||
110 | // | ||
111 | [assembly: AssemblyDelaySign(false)] | ||
112 | [assembly: AssemblyKeyName("")] | ||
diff --git a/Prebuild/src/data/autotools.xml b/Prebuild/src/data/autotools.xml deleted file mode 100644 index ee4b064..0000000 --- a/Prebuild/src/data/autotools.xml +++ /dev/null | |||
@@ -1,790 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <Autotools> | ||
3 | <ProjectAutogenSh> | ||
4 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
5 | xmlns:dnpb="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" | ||
6 | exclude-result-prefixes="dnpb" | ||
7 | > | ||
8 | <xsl:template match="/"><xsl:text disable-output-escaping="yes">#!/bin/sh | ||
9 | # Run this to generate all the initial makefiles, etc. | ||
10 | # Ripped off from Mono, which ripped off from GNOME macros version | ||
11 | |||
12 | DIE=0 | ||
13 | |||
14 | srcdir=`dirname $0` | ||
15 | test -z "$srcdir" && srcdir=. | ||
16 | |||
17 | if [ -n "$MONO_PATH" ]; then | ||
18 | # from -> /mono/lib:/another/mono/lib | ||
19 | # to -> /mono /another/mono | ||
20 | for i in `echo ${MONO_PATH} | tr ":" " "`; do | ||
21 | i=`dirname ${i}` | ||
22 | if [ -n "{i}" -a -d "${i}/share/aclocal" ]; then | ||
23 | ACLOCAL_FLAGS="-I ${i}/share/aclocal $ACLOCAL_FLAGS" | ||
24 | fi | ||
25 | if [ -n "{i}" -a -d "${i}/bin" ]; then | ||
26 | PATH="${i}/bin:$PATH" | ||
27 | fi | ||
28 | done | ||
29 | export PATH | ||
30 | fi | ||
31 | |||
32 | (autoconf --version) < /dev/null > /dev/null 2>&1 || { | ||
33 | echo | ||
34 | echo "**Error**: You must have \`autoconf' installed to compile Mono." | ||
35 | echo "Download the appropriate package for your distribution," | ||
36 | echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" | ||
37 | DIE=1 | ||
38 | } | ||
39 | |||
40 | if [ -z "$LIBTOOL" ]; then | ||
41 | LIBTOOL=`which glibtool 2>/dev/null` | ||
42 | if [ ! -x "$LIBTOOL" ]; then | ||
43 | LIBTOOL=`which libtool` | ||
44 | fi | ||
45 | fi | ||
46 | |||
47 | (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && { | ||
48 | ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || { | ||
49 | echo | ||
50 | echo "**Error**: You must have \`libtool' installed to compile Mono." | ||
51 | echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz" | ||
52 | echo "(or a newer version if it is available)" | ||
53 | DIE=1 | ||
54 | } | ||
55 | } | ||
56 | |||
57 | grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && { | ||
58 | grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \ | ||
59 | (gettext --version) < /dev/null > /dev/null 2>&1 || { | ||
60 | echo | ||
61 | echo "**Error**: You must have \`gettext' installed to compile Mono." | ||
62 | echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz" | ||
63 | echo "(or a newer version if it is available)" | ||
64 | DIE=1 | ||
65 | } | ||
66 | } | ||
67 | |||
68 | (automake --version) < /dev/null > /dev/null 2>&1 || { | ||
69 | echo | ||
70 | echo "**Error**: You must have \`automake' installed to compile Mono." | ||
71 | echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" | ||
72 | echo "(or a newer version if it is available)" | ||
73 | DIE=1 | ||
74 | NO_AUTOMAKE=yes | ||
75 | } | ||
76 | |||
77 | # if no automake, don't bother testing for aclocal | ||
78 | test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { | ||
79 | echo | ||
80 | echo "**Error**: Missing \`aclocal'. The version of \`automake'" | ||
81 | echo "installed doesn't appear recent enough." | ||
82 | echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" | ||
83 | echo "(or a newer version if it is available)" | ||
84 | DIE=1 | ||
85 | } | ||
86 | |||
87 | if test "$DIE" -eq 1; then | ||
88 | exit 1 | ||
89 | fi | ||
90 | |||
91 | if test -z "$NOCONFIGURE"; then | ||
92 | |||
93 | if test -z "$*"; then | ||
94 | echo "**Warning**: I am going to run \`configure' with no arguments." | ||
95 | echo "If you wish to pass any to it, please specify them on the" | ||
96 | echo \`$0\'" command line." | ||
97 | echo | ||
98 | fi | ||
99 | |||
100 | fi | ||
101 | |||
102 | case $CC in | ||
103 | xlc ) | ||
104 | am_opt=--include-deps;; | ||
105 | esac | ||
106 | |||
107 | |||
108 | if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then | ||
109 | if test -z "$NO_LIBTOOLIZE" ; then | ||
110 | echo "Running libtoolize..." | ||
111 | ${LIBTOOL}ize --force --copy | ||
112 | fi | ||
113 | fi | ||
114 | |||
115 | echo "Running aclocal $ACLOCAL_FLAGS ..." | ||
116 | aclocal $ACLOCAL_FLAGS || { | ||
117 | echo | ||
118 | echo "**Error**: aclocal failed. This may mean that you have not" | ||
119 | echo "installed all of the packages you need, or you may need to" | ||
120 | echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\"" | ||
121 | echo "for the prefix where you installed the packages whose" | ||
122 | echo "macros were not found" | ||
123 | exit 1 | ||
124 | } | ||
125 | |||
126 | if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then | ||
127 | echo "Running autoheader..." | ||
128 | autoheader || { echo "**Error**: autoheader failed."; exit 1; } | ||
129 | fi | ||
130 | |||
131 | echo "Running automake --gnu $am_opt ..." | ||
132 | automake --add-missing --gnu $am_opt || | ||
133 | { echo "**Error**: automake failed."; exit 1; } | ||
134 | echo "Running autoconf ..." | ||
135 | autoconf || { echo "**Error**: autoconf failed."; exit 1; } | ||
136 | |||
137 | conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c | ||
138 | |||
139 | if test x$NOCONFIGURE = x; then | ||
140 | echo Running $srcdir/configure $conf_flags "$@" ... | ||
141 | $srcdir/configure $conf_flags "$@" \ | ||
142 | && echo Now type \`make\' to compile $PKG_NAME || exit 1 | ||
143 | else | ||
144 | echo Skipping configure process. | ||
145 | fi | ||
146 | </xsl:text> | ||
147 | </xsl:template> | ||
148 | </xsl:stylesheet> | ||
149 | </ProjectAutogenSh> | ||
150 | |||
151 | <ProjectConfigureAc> | ||
152 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
153 | xmlns:dnpb="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" | ||
154 | exclude-result-prefixes="dnpb" | ||
155 | xml:space="preserve" | ||
156 | > | ||
157 | <!-- Removes the xml version header in the generated file --> | ||
158 | <xsl:output method="text"/> | ||
159 | <xsl:param name="solutionName" /> | ||
160 | <xsl:param name="projectName" /> | ||
161 | <xsl:param name="projectVersion" /> | ||
162 | <xsl:param name="assemblyName" /> | ||
163 | <xsl:variable name="lcProjectName"><xsl:value-of select="translate($projectName, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/></xsl:variable> | ||
164 | <xsl:template match="/"> | ||
165 | <xsl:for-each select="//dnpb:Solution[@name=$solutionName]/dnpb:Project[@name=$projectName]" | ||
166 | >AC_INIT([<xsl:value-of select="$projectName" />],[<xsl:value-of select="$projectVersion" />]) | ||
167 | |||
168 | AC_PREREQ(2.60) | ||
169 | AC_CANONICAL_SYSTEM | ||
170 | AC_CONFIG_AUX_DIR(.) | ||
171 | AM_INIT_AUTOMAKE([1.9 tar-ustar foreign]) | ||
172 | AM_MAINTAINER_MODE | ||
173 | dnl AC_PROG_INTLTOOL([0.25]) | ||
174 | AC_PROG_INSTALL | ||
175 | |||
176 | ASSEMBLY_NAME=<xsl:value-of select="$assemblyName" /> | ||
177 | PROJECT_NAME=<xsl:value-of select="$projectName" /> | ||
178 | PROJECT_VERSION=$VERSION | ||
179 | PROJECT_DESCRIPTION="<xsl:value-of select="dnpb:Description/text()" />" | ||
180 | PROJECT_TYPE="<xsl:value-of select="@type" />" | ||
181 | |||
182 | AC_SUBST(ASSEMBLY_NAME) | ||
183 | AC_SUBST(PROJECT_NAME) | ||
184 | AC_SUBST(PROJECT_VERSION) | ||
185 | AC_SUBST(DESCRIPTION) | ||
186 | |||
187 | AC_MSG_CHECKING([assembly type]) | ||
188 | case $PROJECT_TYPE in | ||
189 | *Exe) | ||
190 | ASSEMBLY_EXTENSION=exe | ||
191 | ;; | ||
192 | *Library) | ||
193 | ASSEMBLY_EXTENSION=dll | ||
194 | ;; | ||
195 | *) | ||
196 | AC_MSG_ERROR([*** Please add support for project type $PROJECT_TYPE to configure.ac checks!]) | ||
197 | ;; | ||
198 | esac | ||
199 | AC_MSG_RESULT([$PROJECT_TYPE]) | ||
200 | |||
201 | AC_SUBST(ASSEMBLY_EXTENSION) | ||
202 | |||
203 | AC_MSG_CHECKING([whether we're compiling from an RCS]) | ||
204 | if test -f "$srcdir/.cvs_version" ; then | ||
205 | from_rcs=cvs | ||
206 | else | ||
207 | if test -f "$srcdir/.svn/entries" ; then | ||
208 | from_rcs=svn | ||
209 | else | ||
210 | from_rcs=no | ||
211 | fi | ||
212 | fi | ||
213 | |||
214 | AC_MSG_RESULT($from_rcs) | ||
215 | |||
216 | MONO_REQUIRED_VERSION=1.1 | ||
217 | <xsl:text disable-output-escaping="yes"> | ||
218 | PKG_CHECK_MODULES(MONO_DEPENDENCY, mono >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false) | ||
219 | </xsl:text> | ||
220 | if test "x$has_mono" = "xtrue"; then | ||
221 | AC_PATH_PROG(RUNTIME, mono, no) | ||
222 | AC_PATH_PROG(CSC, gmcs, no) | ||
223 | AC_PATH_PROG(RESGEN, resgen2, no) | ||
224 | if test `uname -s` = "Darwin"; then | ||
225 | LIB_PREFIX= | ||
226 | LIB_SUFFIX=.dylib | ||
227 | else | ||
228 | LIB_PREFIX=.so | ||
229 | LIB_SUFFIX= | ||
230 | fi | ||
231 | else | ||
232 | AC_PATH_PROG(CSC, csc.exe, no) | ||
233 | if test x$CSC = "xno"; then | ||
234 | AC_MSG_ERROR([You need to install either mono or .Net]) | ||
235 | else | ||
236 | RUNTIME= | ||
237 | LIB_PREFIX= | ||
238 | LIB_SUFFIX= | ||
239 | fi | ||
240 | fi | ||
241 | |||
242 | AC_PATH_PROG(GACUTIL, gacutil) | ||
243 | if test "x$GACUTIL" = "xno" ; then | ||
244 | AC_MSG_ERROR([No gacutil tool found]) | ||
245 | fi | ||
246 | |||
247 | GACUTIL_FLAGS='/package <xsl:value-of select="$assemblyName" /> /gacdir $(DESTDIR)$(prefix)/lib' | ||
248 | AC_SUBST(GACUTIL_FLAGS) | ||
249 | |||
250 | AC_SUBST(PATH) | ||
251 | AC_SUBST(LD_LIBRARY_PATH) | ||
252 | |||
253 | AC_SUBST(LIB_PREFIX) | ||
254 | AC_SUBST(LIB_SUFFIX) | ||
255 | AC_SUBST(RUNTIME) | ||
256 | AC_SUBST(CSC) | ||
257 | AC_SUBST(RESGEN) | ||
258 | AC_SUBST(GACUTIL) | ||
259 | |||
260 | AC_SUBST(BASE_DEPENDENCIES_CFLAGS) | ||
261 | AC_SUBST(BASE_DEPENDENCIES_LIBS) | ||
262 | |||
263 | dnl Find monodoc | ||
264 | MONODOC_REQUIRED_VERSION=1.0 | ||
265 | AC_SUBST(MONODOC_REQUIRED_VERSION) | ||
266 | <xsl:text disable-output-escaping="yes"> | ||
267 | PKG_CHECK_MODULES(MONODOC_DEPENDENCY, monodoc >= $MONODOC_REQUIRED_VERSION, enable_monodoc=yes, enable_monodoc=no) | ||
268 | </xsl:text> | ||
269 | if test "x$enable_monodoc" = "xyes"; then | ||
270 | AC_PATH_PROG(MONODOC, monodoc, no) | ||
271 | if test x$MONODOC = xno; then | ||
272 | enable_monodoc=no | ||
273 | fi | ||
274 | else | ||
275 | MONODOC= | ||
276 | fi | ||
277 | |||
278 | AC_SUBST(MONODOC) | ||
279 | AM_CONDITIONAL(ENABLE_MONODOC, test "x$enable_monodoc" = "xyes") | ||
280 | |||
281 | winbuild=no | ||
282 | case "$host" in | ||
283 | *-*-mingw*|*-*-cygwin*) | ||
284 | winbuild=yes | ||
285 | ;; | ||
286 | esac | ||
287 | AM_CONDITIONAL(WINBUILD, test x$winbuild = xyes) | ||
288 | |||
289 | <xsl:if test="@type='Exe' or @type='WinExe'">AC_CONFIG_FILES(<xsl:value-of select="$lcProjectName" />)</xsl:if> | ||
290 | <xsl:if test="@type='Library'">AC_CONFIG_FILES(<xsl:value-of select="$projectName" />.pc)</xsl:if> | ||
291 | |||
292 | AC_CONFIG_FILES(Makefile) | ||
293 | AC_OUTPUT | ||
294 | |||
295 | echo "===" | ||
296 | echo "" | ||
297 | echo "Project configuration summary" | ||
298 | echo "" | ||
299 | echo " * Installation prefix: $prefix" | ||
300 | echo " * compiler: $CSC" | ||
301 | echo " * Documentation: $enable_monodoc ($MONODOC)" | ||
302 | echo " * Project Name: $PROJECT_NAME" | ||
303 | echo " * Version: $PROJECT_VERSION" | ||
304 | echo "" | ||
305 | echo "===" | ||
306 | |||
307 | </xsl:for-each> | ||
308 | </xsl:template> | ||
309 | </xsl:stylesheet> | ||
310 | </ProjectConfigureAc> | ||
311 | |||
312 | <ProjectMakefileAm> | ||
313 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
314 | xmlns:dnpb="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" | ||
315 | exclude-result-prefixes="dnpb" | ||
316 | xml:space="preserve" | ||
317 | > | ||
318 | <xsl:param name="projectName" /> | ||
319 | <xsl:param name="solutionName" /> | ||
320 | <xsl:param name="assemblyName" /> | ||
321 | <xsl:variable name="lcProjectName"><xsl:value-of select="translate($projectName, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/></xsl:variable> | ||
322 | <xsl:param name="embeddedFiles" /> | ||
323 | <xsl:param name="compiledFiles" /> | ||
324 | <xsl:param name="contentFiles" /> | ||
325 | <xsl:param name="extraDistFiles" /> | ||
326 | <xsl:param name="pkgLibs" /> | ||
327 | <xsl:param name="binaryLibs" /> | ||
328 | <xsl:param name="systemLibs" /> | ||
329 | <xsl:param name="localCopyTargets" /> | ||
330 | <xsl:param name="hasAssemblyConfig" /> | ||
331 | |||
332 | <xsl:template match="/"> | ||
333 | <xsl:for-each select="//dnpb:Solution[@name=$solutionName]/dnpb:Project[@name=$projectName]"> | ||
334 | <xsl:variable name="lcType"><xsl:value-of select="translate(@type, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" /></xsl:variable> | ||
335 | |||
336 | ASSEMBLY=$(ASSEMBLY_NAME).$(ASSEMBLY_EXTENSION) | ||
337 | <!-- | ||
338 | If the project is an application, create targets for the wrapper script | ||
339 | --> | ||
340 | <xsl:if test="@type='Exe' or @type='WinExe'"> | ||
341 | <xsl:value-of select="$lcProjectName" />dir = $(prefix)/lib/<xsl:value-of select="$lcProjectName" /> | ||
342 | <xsl:value-of select="$lcProjectName" />_DATA = $(ASSEMBLY)<xsl:if test="$hasAssemblyConfig='true'"> $(ASSEMBLY).config</xsl:if> | ||
343 | |||
344 | bin_SCRIPTS=<xsl:value-of select="$lcProjectName" /> | ||
345 | </xsl:if><xsl:if test="@type='Library'"> | ||
346 | pkgconfigdir = $(prefix)/lib/pkgconfig | ||
347 | pkgconfig_DATA = <xsl:value-of select="$projectName" />.pc | ||
348 | <xsl:if test="$hasAssemblyConfig='true'"> | ||
349 | <xsl:value-of select="translate($lcProjectName, '.', '_')" />dir = $(prefix)/lib/mono/<xsl:value-of select="$projectName" /> | ||
350 | <xsl:value-of select="translate($lcProjectName, '.', '_')" />_DATA = $(ASSEMBLY).config | ||
351 | </xsl:if> | ||
352 | noinst_DATA = $(ASSEMBLY) | ||
353 | </xsl:if> | ||
354 | |||
355 | PACKAGES =<xsl:value-of select="$pkgLibs" /> | ||
356 | BINARY_LIBS =<xsl:value-of select="$binaryLibs" /> | ||
357 | SYSTEM_LIBS =<xsl:value-of select="$systemLibs" /> | ||
358 | RESOURCES_SRC =<xsl:value-of select="$embeddedFiles" /> | ||
359 | RESOURCES = $(RESOURCES_SRC:.resx=.resources) | ||
360 | SOURCES =<xsl:value-of select="$compiledFiles" /> | ||
361 | |||
362 | EXTRA_DIST=$(SOURCES) $(BINARY_LIBS) $(RESOURCES_SRC) install-sh missing <xsl:value-of select="$extraDistFiles" /> | ||
363 | |||
364 | CLEANFILES=$(ASSEMBLY) | ||
365 | |||
366 | <xsl:value-of select="$localCopyTargets" /> | ||
367 | |||
368 | <xsl:for-each select="//dnpb:Solution[@name=$solutionName]/dnpb:Project[@name=$projectName]/dnpb:Configuration"> | ||
369 | <xsl:variable name="outputPath"><xsl:value-of select="dnpb:Options/dnpb:OutputPath/text()" /></xsl:variable> | ||
370 | <xsl:variable name="keyFile"><xsl:value-of select="dnpb:Options/dnpb:KeyFile/text()" /></xsl:variable> | ||
371 | <xsl:variable name="docFile"><xsl:value-of select="dnpb:Options/dnpb:XmlDocFile/text()" /></xsl:variable> | ||
372 | <xsl:value-of select="$outputPath"/>/$(ASSEMBLY): $(srcdir)/$(ASSEMBLY).response $(RESOURCES) $(SOURCES) $(BINARY_LIBS) <xsl:call-template name="substring-after-last-mod"><xsl:with-param name="input" select="$keyFile" /><xsl:with-param name="substr" select="'/'" /></xsl:call-template> | ||
373 | <xsl:if test="$docFile!=''">mkdir -p doc <xsl:text disable-output-escaping="yes">&&</xsl:text> </xsl:if>mkdir -p <xsl:value-of select="$outputPath" /> <xsl:text disable-output-escaping="yes">&&</xsl:text> $(CSC) /out:$@ \ | ||
374 | /target:<xsl:value-of select="$lcType" /> \<xsl:if test="$embeddedFiles!=''"> | ||
375 | $(addprefix /resource:$(srcdir)/, $(RESOURCES)) \</xsl:if><xsl:if test="$pkgLibs!=''"> | ||
376 | $(addprefix /pkg:, $(PACKAGES)) \</xsl:if><xsl:if test="$systemLibs!=''"> | ||
377 | $(addprefix /r:, $(SYSTEM_LIBS)) \</xsl:if><xsl:if test="$binaryLibs!=''"> | ||
378 | $(addprefix /r:$(srcdir)/, $(BINARY_LIBS)) \</xsl:if> | ||
379 | @$(srcdir)/$(ASSEMBLY).response \<xsl:if test="$docFile!=''"> | ||
380 | /doc:doc/<xsl:value-of select="$docFile" /> \</xsl:if><xsl:if test="$keyFile!=''"> | ||
381 | /keyfile:$(srcdir)/<xsl:call-template name="substring-after-last-mod"><xsl:with-param name="input" select="$keyFile" /><xsl:with-param name="substr" select="'/'" /></xsl:call-template> \</xsl:if><xsl:if test="dnpb:Options/dnpb:AllowUnsafe/text()='true'"> | ||
382 | /unsafe \</xsl:if><xsl:text disable-output-escaping="yes"> | ||
383 | && rm -f $(ASSEMBLY) \ | ||
384 | && ln $@ $(ASSEMBLY)</xsl:text> | ||
385 | |||
386 | CLEANFILES+=<xsl:value-of select="$outputPath"/>/$(ASSEMBLY) | ||
387 | |||
388 | <!-- if this project config has a KeyFile --> | ||
389 | <xsl:if test="$keyFile!=''">EXTRA_DIST+=<xsl:call-template name="substring-after-last-mod"><xsl:with-param name="input" select="$keyFile" /><xsl:with-param name="substr" select="'/'" /></xsl:call-template></xsl:if> | ||
390 | |||
391 | <xsl:value-of select="@name" />: <xsl:value-of select="$outputPath"/>/$(ASSEMBLY)<xsl:text disable-output-escaping="yes"> | ||
392 | rm -f $(ASSEMBLY) \ | ||
393 | &&</xsl:text> ln <xsl:value-of select="$outputPath"/>/$(ASSEMBLY) $(ASSEMBLY) | ||
394 | <!-- If the project is a library, create library-specific targets --> | ||
395 | <xsl:if test="//dnpb:Solution[@name=$solutionName]/dnpb:Project[@name=$projectName]/@type='Library'"> | ||
396 | <xsl:choose> | ||
397 | <!-- | ||
398 | If the project has a keyfile, make a gac install/uninstall target | ||
399 | --> | ||
400 | <xsl:when test="dnpb:Options/dnpb:KeyFile/text()!=''"> | ||
401 | <xsl:value-of select="@name" />_install-data-local: <xsl:value-of select="$outputPath"/>/$(ASSEMBLY) | ||
402 | echo "$(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS)"; \ | ||
403 | $(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS) || exit 1; | ||
404 | |||
405 | <xsl:value-of select="@name" />_uninstall-local: | ||
406 | if [`gacutil -l <xsl:value-of select="$projectName" /> | grep "Number" | awk -F= '{print $$2}'` -gt "0" ] ; \ | ||
407 | then \ | ||
408 | echo "$(GACUTIL) /u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS)"; \ | ||
409 | $(GACUTIL) /u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS) || exit 1; \ | ||
410 | fi | ||
411 | </xsl:when> | ||
412 | <!-- | ||
413 | If there is no keyfile for the project, define a filesystem | ||
414 | install target | ||
415 | --> | ||
416 | <xsl:otherwise> | ||
417 | noinst_<xsl:value-of select="@name" />_<xsl:value-of select="translate($lcProjectName, '.', '_')" />dir = $(prefix)/lib/mono/<xsl:value-of select="$projectName" /> | ||
418 | noinst_<xsl:value-of select="@name" />_<xsl:value-of select="translate($lcProjectName, '.', '_')" />_DATA = <xsl:value-of select="$outputPath"/>/$(ASSEMBLY) | ||
419 | </xsl:otherwise> | ||
420 | </xsl:choose> | ||
421 | </xsl:if> | ||
422 | </xsl:for-each> | ||
423 | |||
424 | <xsl:variable name="defaultConfig"><xsl:value-of select="//dnpb:Solution[@name=$solutionName]/dnpb:Project[@name=$projectName]/dnpb:Configuration/@name" /></xsl:variable> | ||
425 | $(ASSEMBLY): <xsl:value-of select="$defaultConfig" /> | ||
426 | |||
427 | <xsl:text disable-output-escaping="yes"> | ||
428 | $(srcdir)/$(ASSEMBLY).response: $(srcdir)/Makefile | ||
429 | echo "$(addprefix $(srcdir)/, $(SOURCES))" > $@ | ||
430 | </xsl:text> | ||
431 | |||
432 | all: $(ASSEMBLY) | ||
433 | |||
434 | # rule to compile .resx files to .resources | ||
435 | %.resources: %.resx | ||
436 | $(RESGEN) /useSourcePath /compile $(@:.resources=.resx) | ||
437 | |||
438 | <xsl:if test="@type='Library'"> | ||
439 | <!-- if the default config has a KeyFile --> | ||
440 | <xsl:choose> | ||
441 | <xsl:when test="//dnpb:Solution[@name=$solutionName]/dnpb:Project[@name=$projectName]/dnpb:Configuration[@name=$defaultConfig]/dnpb:Options/dnpb:KeyFile/text()!=''"> | ||
442 | install-data-local: <xsl:value-of select="$defaultConfig" />_install-data-local | ||
443 | |||
444 | uninstall-local: <xsl:value-of select="$defaultConfig" />_uninstall-local | ||
445 | </xsl:when> | ||
446 | <!-- | ||
447 | If the default config does not have a KeyFile, don't really do | ||
448 | anything | ||
449 | --> | ||
450 | <xsl:otherwise> | ||
451 | #<xsl:value-of select="translate($lcProjectName, '.', '_')" />dir+=$(noinst_<xsl:value-of select="$defaultConfig" />_<xsl:value-of select="translate($lcProjectName, '.', '_')" />dir) | ||
452 | #<xsl:value-of select="translate($lcProjectName, '.', '_')" />_DATA+=$(noinst_<xsl:value-of select="$defaultConfig" />_<xsl:value-of select="translate($lcProjectName, '.', '_')" />_DATA) | ||
453 | </xsl:otherwise> | ||
454 | </xsl:choose> | ||
455 | </xsl:if> | ||
456 | </xsl:for-each> | ||
457 | </xsl:template> | ||
458 | |||
459 | <xsl:template name="substring-after-last" xml:space="default"> | ||
460 | <xsl:param name="input" /> | ||
461 | <xsl:param name="substr" /> | ||
462 | |||
463 | <!-- Extract the string which comes after the first occurence --> | ||
464 | <xsl:variable name="temp" select="substring-after($input,$substr)" /> | ||
465 | |||
466 | <xsl:choose> | ||
467 | <!-- If it still contains the search string then recursively process --> | ||
468 | <xsl:when test="$substr and contains($temp,$substr)"> | ||
469 | <xsl:call-template name="substring-after-last"> | ||
470 | <xsl:with-param name="input" select="$temp" /> | ||
471 | <xsl:with-param name="substr" select="$substr" /> | ||
472 | </xsl:call-template> | ||
473 | </xsl:when> | ||
474 | <xsl:otherwise> | ||
475 | <xsl:value-of select="$temp" /> | ||
476 | </xsl:otherwise> | ||
477 | </xsl:choose> | ||
478 | </xsl:template> | ||
479 | |||
480 | <xsl:template name="substring-after-last-mod" xml:space="default"> | ||
481 | <xsl:param name="input" /> | ||
482 | <xsl:param name="substr" /> | ||
483 | |||
484 | <xsl:choose> | ||
485 | <xsl:when test="contains($input,$substr)"> | ||
486 | <xsl:call-template name="substring-after-last"> | ||
487 | <xsl:with-param name="input" select="$input" /> | ||
488 | <xsl:with-param name="substr" select="$substr" /> | ||
489 | </xsl:call-template> | ||
490 | </xsl:when> | ||
491 | <xsl:otherwise> | ||
492 | <xsl:value-of select="$input" /> | ||
493 | </xsl:otherwise> | ||
494 | </xsl:choose> | ||
495 | </xsl:template> | ||
496 | </xsl:stylesheet> | ||
497 | </ProjectMakefileAm> | ||
498 | |||
499 | <ProjectPcIn> | ||
500 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
501 | xmlns:dnpb="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" | ||
502 | exclude-result-prefixes="dnpb" | ||
503 | xml:space="preserve" | ||
504 | > | ||
505 | <!-- Removes the xml version header in the generated file --> | ||
506 | <xsl:output method="text"/> | ||
507 | <xsl:param name="projectName" /> | ||
508 | <xsl:param name="solutionName" /> | ||
509 | <xsl:variable name="lcProjectName"><xsl:value-of select="translate($projectName, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/></xsl:variable> | ||
510 | <xsl:template match="/"><xsl:for-each select="//dnpb:Solution[@name=$solutionName]/dnpb:Project[@name=$projectName]">prefix=@prefix@ | ||
511 | exec_prefix=${prefix} | ||
512 | libdir=${exec_prefix}/lib/mono/@PROJECT_NAME@ | ||
513 | |||
514 | Name: <xsl:value-of select="@name" /> | ||
515 | Description: <xsl:value-of select="Description/text()" /> | ||
516 | Version: @PROJECT_VERSION@ | ||
517 | Requires:<xsl:for-each select="Reference"><xsl:if test="@localCopy=false"><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@name" /></xsl:if></xsl:for-each> | ||
518 | Libs: -r:${libdir}/@PROJECT_NAME@.dll | ||
519 | |||
520 | </xsl:for-each> | ||
521 | |||
522 | </xsl:template> | ||
523 | </xsl:stylesheet> | ||
524 | </ProjectPcIn> | ||
525 | |||
526 | <SolutionAutogenSh> | ||
527 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
528 | xmlns:dnpb="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" | ||
529 | exclude-result-prefixes="dnpb" | ||
530 | > | ||
531 | <xsl:param name="solutionName" /> | ||
532 | <xsl:template match="/"><xsl:text disable-output-escaping="yes">#!/bin/sh | ||
533 | # Run this to generate all the initial makefiles, etc. | ||
534 | # Ripped off from Mono, which ripped off from GNOME macros version | ||
535 | |||
536 | DIE=0 | ||
537 | |||
538 | srcdir=`dirname $0` | ||
539 | test -z "$srcdir" && srcdir=. | ||
540 | |||
541 | if [ -n "$MONO_PATH" ]; then | ||
542 | # from -> /mono/lib:/another/mono/lib | ||
543 | # to -> /mono /another/mono | ||
544 | for i in `echo ${MONO_PATH} | tr ":" " "`; do | ||
545 | i=`dirname ${i}` | ||
546 | if [ -n "{i}" -a -d "${i}/share/aclocal" ]; then | ||
547 | ACLOCAL_FLAGS="-I ${i}/share/aclocal $ACLOCAL_FLAGS" | ||
548 | fi | ||
549 | if [ -n "{i}" -a -d "${i}/bin" ]; then | ||
550 | PATH="${i}/bin:$PATH" | ||
551 | fi | ||
552 | done | ||
553 | export PATH | ||
554 | fi | ||
555 | |||
556 | (autoconf --version) < /dev/null > /dev/null 2>&1 || { | ||
557 | echo | ||
558 | echo "**Error**: You must have \`autoconf' installed to compile Mono." | ||
559 | echo "Download the appropriate package for your distribution," | ||
560 | echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" | ||
561 | DIE=1 | ||
562 | } | ||
563 | |||
564 | if [ -z "$LIBTOOL" ]; then | ||
565 | LIBTOOL=`which glibtool 2>/dev/null` | ||
566 | if [ ! -x "$LIBTOOL" ]; then | ||
567 | LIBTOOL=`which libtool` | ||
568 | fi | ||
569 | fi | ||
570 | |||
571 | (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && { | ||
572 | ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || { | ||
573 | echo | ||
574 | echo "**Error**: You must have \`libtool' installed to compile Mono." | ||
575 | echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz" | ||
576 | echo "(or a newer version if it is available)" | ||
577 | DIE=1 | ||
578 | } | ||
579 | } | ||
580 | |||
581 | grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && { | ||
582 | grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \ | ||
583 | (gettext --version) < /dev/null > /dev/null 2>&1 || { | ||
584 | echo | ||
585 | echo "**Error**: You must have \`gettext' installed to compile Mono." | ||
586 | echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz" | ||
587 | echo "(or a newer version if it is available)" | ||
588 | DIE=1 | ||
589 | } | ||
590 | } | ||
591 | |||
592 | (automake --version) < /dev/null > /dev/null 2>&1 || { | ||
593 | echo | ||
594 | echo "**Error**: You must have \`automake' installed to compile Mono." | ||
595 | echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" | ||
596 | echo "(or a newer version if it is available)" | ||
597 | DIE=1 | ||
598 | NO_AUTOMAKE=yes | ||
599 | } | ||
600 | |||
601 | |||
602 | # if no automake, don't bother testing for aclocal | ||
603 | test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { | ||
604 | echo | ||
605 | echo "**Error**: Missing \`aclocal'. The version of \`automake'" | ||
606 | echo "installed doesn't appear recent enough." | ||
607 | echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" | ||
608 | echo "(or a newer version if it is available)" | ||
609 | DIE=1 | ||
610 | } | ||
611 | |||
612 | if test "$DIE" -eq 1; then | ||
613 | exit 1 | ||
614 | fi | ||
615 | |||
616 | if test -z "$*"; then | ||
617 | echo "**Warning**: I am going to run \`configure' with no arguments." | ||
618 | echo "If you wish to pass any to it, please specify them on the" | ||
619 | echo \`$0\'" command line." | ||
620 | echo | ||
621 | fi | ||
622 | |||
623 | case $CC in | ||
624 | xlc ) | ||
625 | am_opt=--include-deps;; | ||
626 | esac | ||
627 | |||
628 | |||
629 | if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then | ||
630 | if test -z "$NO_LIBTOOLIZE" ; then | ||
631 | echo "Running libtoolize..." | ||
632 | ${LIBTOOL}ize --force --copy | ||
633 | fi | ||
634 | fi | ||
635 | |||
636 | echo "Running aclocal $ACLOCAL_FLAGS ..." | ||
637 | aclocal $ACLOCAL_FLAGS || { | ||
638 | echo | ||
639 | echo "**Error**: aclocal failed. This may mean that you have not" | ||
640 | echo "installed all of the packages you need, or you may need to" | ||
641 | echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\"" | ||
642 | echo "for the prefix where you installed the packages whose" | ||
643 | echo "macros were not found" | ||
644 | exit 1 | ||
645 | } | ||
646 | |||
647 | if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then | ||
648 | echo "Running autoheader..." | ||
649 | autoheader || { echo "**Error**: autoheader failed."; exit 1; } | ||
650 | fi | ||
651 | |||
652 | echo "Running automake --gnu $am_opt ..." | ||
653 | automake --add-missing --gnu $am_opt || | ||
654 | { echo "**Error**: automake failed."; exit 1; } | ||
655 | echo "Running autoconf ..." | ||
656 | autoconf || { echo "**Error**: autoconf failed."; exit 1; } | ||
657 | </xsl:text> | ||
658 | <xsl:for-each select="/dnpb:Prebuild/dnpb:Solution[@name=$solutionName]/dnpb:Project"> | ||
659 | echo Running <xsl:value-of select="@name" />/autogen.sh ... | ||
660 | (cd $srcdir/<xsl:value-of select="@name" /> ; NOCONFIGURE=1 /bin/sh ./autogen.sh "$@") | ||
661 | echo Done running <xsl:value-of select="@name" />/autogen.sh ... | ||
662 | </xsl:for-each> | ||
663 | <xsl:text disable-output-escaping="yes"> | ||
664 | conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c | ||
665 | |||
666 | if test x$NOCONFIGURE = x; then | ||
667 | echo Running $srcdir/configure $conf_flags "$@" ... | ||
668 | $srcdir/configure $conf_flags "$@" \ | ||
669 | && echo Now type \`make\' to compile $PKG_NAME || exit 1 | ||
670 | else | ||
671 | echo Skipping configure process. | ||
672 | fi | ||
673 | </xsl:text> | ||
674 | </xsl:template> | ||
675 | </xsl:stylesheet> | ||
676 | </SolutionAutogenSh> | ||
677 | |||
678 | <SolutionConfigureAc> | ||
679 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
680 | xmlns:dnpb="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" | ||
681 | exclude-result-prefixes="dnpb" | ||
682 | xml:space="preserve" | ||
683 | > | ||
684 | <!-- Removes the xml version header in the generated file --> | ||
685 | <xsl:output method="text"/> | ||
686 | <xsl:param name="solutionName" /> | ||
687 | <xsl:template match="/" | ||
688 | >AC_INIT([<xsl:value-of select="$solutionName" />]-solution,[<xsl:value-of select="/dnpb:Prebuild/dnpb:Solution[@name=$solutionName]/@version" />]) | ||
689 | AC_CONFIG_AUX_DIR(.) | ||
690 | AM_INIT_AUTOMAKE([1.9 tar-ustar foreign]) | ||
691 | EXTRA_DIST="install-sh missing" | ||
692 | SOLUTION_NAME=<xsl:value-of select="$solutionName" /> | ||
693 | SOLUTION_VERSION=$VERSION | ||
694 | SOLUTION_DESCRIPTION="<xsl:value-of select="/dnpb:Prebuild/dnpb:Solution[@name=$solutionName]/dnpb:Description" />" | ||
695 | AC_SUBST(DESCRIPTION) | ||
696 | |||
697 | AM_MAINTAINER_MODE | ||
698 | |||
699 | dnl AC_PROG_INTLTOOL([0.25]) | ||
700 | |||
701 | AC_PROG_INSTALL | ||
702 | |||
703 | AC_MSG_CHECKING([whether we're building from an RCS]) | ||
704 | if test -f "$srcdir/.cvs_version" ; then | ||
705 | from_rcs=cvs | ||
706 | else | ||
707 | if test -f "$srcdir/.svn/entries" ; then | ||
708 | from_rcs=svn | ||
709 | else | ||
710 | from_rcs=no | ||
711 | fi | ||
712 | fi | ||
713 | |||
714 | AC_MSG_RESULT($from_rcs) | ||
715 | |||
716 | CONFIG="Release" | ||
717 | AC_SUBST(CONFIG) | ||
718 | <!-- TODO: Ensure that these SUBDIRS are processed in dependency order --> | ||
719 | AC_CONFIG_SUBDIRS(<xsl:for-each select="/dnpb:Prebuild/dnpb:Solution[@name=$solutionName]/dnpb:Project"><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@name" /> | ||
720 | </xsl:for-each>) | ||
721 | <xsl:text disable-output-escaping="yes"> | ||
722 | |||
723 | AC_OUTPUT([ | ||
724 | Makefile | ||
725 | ]) | ||
726 | |||
727 | echo "===" | ||
728 | echo "" | ||
729 | echo "Solution configuration summary" | ||
730 | echo "" | ||
731 | echo " * Solution Name: $SOLUTION_NAME" | ||
732 | echo " * Version: $SOLUTION_VERSION" | ||
733 | echo " * Packages:"</xsl:text> | ||
734 | <xsl:for-each select="/dnpb:Prebuild/dnpb:Solution[@name=$solutionName]/dnpb:Project">echo " - <xsl:value-of select="@name" />" | ||
735 | </xsl:for-each><xsl:text disable-output-escaping="yes">echo "" | ||
736 | echo "===" | ||
737 | </xsl:text> | ||
738 | </xsl:template> | ||
739 | </xsl:stylesheet> | ||
740 | </SolutionConfigureAc> | ||
741 | |||
742 | <SolutionMakefileAm> | ||
743 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
744 | xmlns:dnpb="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" | ||
745 | exclude-result-prefixes="dnpb" | ||
746 | xml:space="preserve" | ||
747 | > | ||
748 | <xsl:param name="solutionName" /> | ||
749 | <xsl:template match="/">SUBDIRS =<xsl:for-each select="//dnpb:Solution[@name=$solutionName]/dnpb:Project"><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@name" /></xsl:for-each> | ||
750 | </xsl:template> | ||
751 | </xsl:stylesheet> | ||
752 | </SolutionMakefileAm> | ||
753 | <ProjectWrapperScriptIn> | ||
754 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
755 | xmlns:dnpb="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" | ||
756 | exclude-result-prefixes="dnpb" | ||
757 | xml:space="preserve" | ||
758 | > | ||
759 | <!-- Removes the xml version header in the generated file --> | ||
760 | <xsl:output method="text"/> | ||
761 | <xsl:param name="projectName" /> | ||
762 | <xsl:param name="assemblyName" /> | ||
763 | <xsl:param name="solutionName" /> | ||
764 | <xsl:param name="monoPath" /> | ||
765 | <xsl:variable name="lcProjectName"><xsl:value-of select="translate($projectName, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/></xsl:variable> | ||
766 | <xsl:template match="/"><xsl:for-each select="//dnpb:Solution[@name=$solutionName]/dnpb:Project[@name=$projectName]">#! /bin/sh | ||
767 | |||
768 | PACKAGE=<xsl:value-of select="$assemblyName" /> | ||
769 | prefix=@prefix@ | ||
770 | exec_prefix=@exec_prefix@ | ||
771 | |||
772 | # %%$@%$# why oh why isn't it $sharedir/<xsl:value-of select="$lcProjectName" /> | ||
773 | # Day changed to 30 Mar 2007 | ||
774 | # ... | ||
775 | # 07:50 < cj> why are we installing .exe assemblies to $prefix/lib/$package/ and | ||
776 | # not $prefix/share/$package ? | ||
777 | # 07:50 < jonp> momentum. | ||
778 | # 07:50 < jonp> and it's hard to say that a .exe isn't platform specific | ||
779 | # 07:50 < jonp> as it can still contain DllImport's which make platform | ||
780 | # assumptions | ||
781 | |||
782 | packagedir=$prefix/lib/<xsl:value-of select="$lcProjectName" /> | ||
783 | export MONO_PATH=$MONO_PATH<xsl:value-of select="$monoPath" /> | ||
784 | |||
785 | exec @RUNTIME@ $packagedir/$PACKAGE.exe "$@" | ||
786 | </xsl:for-each> | ||
787 | </xsl:template> | ||
788 | </xsl:stylesheet> | ||
789 | </ProjectWrapperScriptIn> | ||
790 | </Autotools> | ||
diff --git a/Prebuild/src/data/dnpb-1.0.xsd b/Prebuild/src/data/dnpb-1.0.xsd deleted file mode 100644 index b9e0e4e..0000000 --- a/Prebuild/src/data/dnpb-1.0.xsd +++ /dev/null | |||
@@ -1,183 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <xs:schema elementFormDefault="qualified" | ||
3 | xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
4 | targetNamespace="http://dnpb.sourceforge.net/schemas/dnpb-1.0.xsd" | ||
5 | xmlns="http://dnpb.sourceforge.net/schemas/dnpb-1.0.xsd" | ||
6 | > | ||
7 | <xs:annotation> | ||
8 | <xs:documentation> | ||
9 | Copyright (c) 2004 Matthew Holmes (kerion@houston.rr.com) | ||
10 | |||
11 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
12 | provided that the following conditions are met: | ||
13 | |||
14 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
15 | and the following disclaimer. | ||
16 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
17 | and the following disclaimer in the documentation and/or other materials provided with the | ||
18 | distribution. | ||
19 | * The name of the author may not be used to endorse or promote products derived from this software | ||
20 | without specific prior written permission. | ||
21 | |||
22 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
23 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
24 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
26 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
27 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
28 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
29 | </xs:documentation> | ||
30 | </xs:annotation> | ||
31 | |||
32 | <xs:element name="DNPreBuild"> | ||
33 | <xs:complexType> | ||
34 | <xs:sequence> | ||
35 | <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> | ||
36 | <xs:element ref="Solution" minOccurs="1" maxOccurs="unbounded" /> | ||
37 | </xs:sequence> | ||
38 | |||
39 | <xs:attribute name="version" use="required" /> | ||
40 | </xs:complexType> | ||
41 | </xs:element> | ||
42 | |||
43 | <xs:element name="Process" type="xs:string" /> | ||
44 | |||
45 | <xs:element name="Solution"> | ||
46 | <xs:complexType> | ||
47 | <xs:sequence> | ||
48 | <xs:element ref="Options" minOccurs="0" /> | ||
49 | <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" /> | ||
50 | <xs:element ref="Files" minOccurs="0" /> | ||
51 | <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" /> | ||
52 | </xs:sequence> | ||
53 | |||
54 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
55 | <xs:attribute name="path" type="xs:string" default="" /> | ||
56 | </xs:complexType> | ||
57 | </xs:element> | ||
58 | |||
59 | <xs:element name="Project"> | ||
60 | <xs:complexType> | ||
61 | <xs:sequence> | ||
62 | <xs:element name="Reference" maxOccurs="unbounded"> | ||
63 | <xs:complexType> | ||
64 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
65 | <xs:attribute name="path" type="xs:string" /> | ||
66 | <xs:attribute name="localCopy" type="xs:boolean" /> | ||
67 | <xs:attribute name="version" type="xs:string" /> | ||
68 | </xs:complexType> | ||
69 | </xs:element> | ||
70 | |||
71 | <xs:element ref="Files" /> | ||
72 | </xs:sequence> | ||
73 | |||
74 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
75 | <xs:attribute name="path" type="xs:string" default="" /> | ||
76 | |||
77 | <xs:attribute name="language" default="C#"> | ||
78 | <xs:simpleType> | ||
79 | <xs:restriction base="xs:string"> | ||
80 | <xs:enumeration value="C#" /> | ||
81 | <xs:enumeration value="VB.NET" /> | ||
82 | </xs:restriction> | ||
83 | </xs:simpleType> | ||
84 | </xs:attribute> | ||
85 | |||
86 | <xs:attribute name="type" default="Exe"> | ||
87 | <xs:simpleType> | ||
88 | <xs:restriction base="xs:string"> | ||
89 | <xs:enumeration value="Exe" /> | ||
90 | <xs:enumeration value="WinExe" /> | ||
91 | <xs:enumeration value="Library" /> | ||
92 | </xs:restriction> | ||
93 | </xs:simpleType> | ||
94 | </xs:attribute> | ||
95 | |||
96 | <xs:attribute name="runtime" default="Microsoft"> | ||
97 | <xs:simpleType> | ||
98 | <xs:restriction base="xs:string"> | ||
99 | <xs:enumeration value="Microsoft" /> | ||
100 | <xs:enumeration value="Mono" /> | ||
101 | </xs:restriction> | ||
102 | </xs:simpleType> | ||
103 | </xs:attribute> | ||
104 | |||
105 | <xs:attribute name="startupObject" type="xs:string" default="" /> | ||
106 | </xs:complexType> | ||
107 | </xs:element> | ||
108 | |||
109 | <xs:element name="Configuration"> | ||
110 | <xs:complexType> | ||
111 | <xs:all> | ||
112 | <xs:element ref="Options" minOccurs="0" /> | ||
113 | </xs:all> | ||
114 | |||
115 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
116 | </xs:complexType> | ||
117 | </xs:element> | ||
118 | |||
119 | <xs:element name="Options"> | ||
120 | <xs:complexType> | ||
121 | <xs:sequence> | ||
122 | <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" /> | ||
123 | <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" /> | ||
124 | <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" /> | ||
125 | <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" /> | ||
126 | <xs:element name="WarningLevel" minOccurs="0"> | ||
127 | <xs:simpleType> | ||
128 | <xs:restriction base="xs:integer"> | ||
129 | <xs:minInclusive value="0" /> | ||
130 | <xs:maxInclusive value="4"/> | ||
131 | </xs:restriction> | ||
132 | </xs:simpleType> | ||
133 | </xs:element> | ||
134 | <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" /> | ||
135 | <xs:element name="SupressWarnings" type="xs:string" minOccurs="0" /> | ||
136 | <xs:element name="OutputPath" type="xs:string" minOccurs="0" /> | ||
137 | <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" /> | ||
138 | <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" /> | ||
139 | <xs:element name="RegisterCOMInterop" type="xs:boolean" minOccurs="0" /> | ||
140 | <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" /> | ||
141 | <xs:element name="BaseAddress" type="xs:string" minOccurs="0" /> | ||
142 | <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" /> | ||
143 | <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" /> | ||
144 | <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> | ||
145 | </xs:sequence> | ||
146 | </xs:complexType> | ||
147 | </xs:element> | ||
148 | |||
149 | <xs:element name="Files"> | ||
150 | <xs:complexType> | ||
151 | <xs:sequence> | ||
152 | <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" /> | ||
153 | <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" /> | ||
154 | </xs:sequence> | ||
155 | </xs:complexType> | ||
156 | </xs:element> | ||
157 | |||
158 | <xs:element name="File"> | ||
159 | <xs:complexType> | ||
160 | <xs:simpleContent> | ||
161 | <xs:extension base="xs:string"> | ||
162 | <xs:attribute name="buildAction" default="Compile"> | ||
163 | <xs:simpleType> | ||
164 | <xs:restriction base="xs:string"> | ||
165 | <xs:enumeration value="Compile" /> | ||
166 | <xs:enumeration value="Content" /> | ||
167 | <xs:enumeration value="EmbeddedResource" /> | ||
168 | </xs:restriction> | ||
169 | </xs:simpleType> | ||
170 | </xs:attribute> | ||
171 | </xs:extension> | ||
172 | </xs:simpleContent> | ||
173 | </xs:complexType> | ||
174 | </xs:element> | ||
175 | |||
176 | <xs:element name="Match"> | ||
177 | <xs:complexType> | ||
178 | <xs:attribute name="path" type="xs:string" use="required" /> | ||
179 | <xs:attribute name="pattern" type="xs:string" use="required" /> | ||
180 | <xs:attribute name="recurse" type="xs:boolean" default="false" /> | ||
181 | </xs:complexType> | ||
182 | </xs:element> | ||
183 | </xs:schema> \ No newline at end of file | ||
diff --git a/Prebuild/src/data/dnpb-1.1.xsd b/Prebuild/src/data/dnpb-1.1.xsd deleted file mode 100644 index 2c065a3..0000000 --- a/Prebuild/src/data/dnpb-1.1.xsd +++ /dev/null | |||
@@ -1,184 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <xs:schema elementFormDefault="qualified" | ||
3 | xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
4 | targetNamespace="http://dnpb.sourceforge.net/schemas/dnpb-1.1.xsd" | ||
5 | xmlns="http://dnpb.sourceforge.net/schemas/dnpb-1.1.xsd" | ||
6 | > | ||
7 | <xs:annotation> | ||
8 | <xs:documentation> | ||
9 | Copyright (c) 2004 Matthew Holmes (kerion@houston.rr.com) | ||
10 | |||
11 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
12 | provided that the following conditions are met: | ||
13 | |||
14 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
15 | and the following disclaimer. | ||
16 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
17 | and the following disclaimer in the documentation and/or other materials provided with the | ||
18 | distribution. | ||
19 | * The name of the author may not be used to endorse or promote products derived from this software | ||
20 | without specific prior written permission. | ||
21 | |||
22 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
23 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
24 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
26 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
27 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
28 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
29 | </xs:documentation> | ||
30 | </xs:annotation> | ||
31 | |||
32 | <xs:element name="DNPreBuild"> | ||
33 | <xs:complexType> | ||
34 | <xs:sequence> | ||
35 | <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> | ||
36 | <xs:element ref="Solution" minOccurs="1" maxOccurs="unbounded" /> | ||
37 | </xs:sequence> | ||
38 | |||
39 | <xs:attribute name="version" use="required" /> | ||
40 | </xs:complexType> | ||
41 | </xs:element> | ||
42 | |||
43 | <xs:element name="Process" type="xs:string" /> | ||
44 | |||
45 | <xs:element name="Solution"> | ||
46 | <xs:complexType> | ||
47 | <xs:sequence> | ||
48 | <xs:element ref="Options" minOccurs="0" /> | ||
49 | <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" /> | ||
50 | <xs:element ref="Files" minOccurs="0" /> | ||
51 | <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" /> | ||
52 | </xs:sequence> | ||
53 | |||
54 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
55 | <xs:attribute name="path" type="xs:string" default="" /> | ||
56 | </xs:complexType> | ||
57 | </xs:element> | ||
58 | |||
59 | <xs:element name="Project"> | ||
60 | <xs:complexType> | ||
61 | <xs:sequence> | ||
62 | <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> | ||
63 | |||
64 | <xs:element name="Reference" maxOccurs="unbounded"> | ||
65 | <xs:complexType> | ||
66 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
67 | <xs:attribute name="path" type="xs:string" /> | ||
68 | <xs:attribute name="localCopy" type="xs:boolean" /> | ||
69 | <xs:attribute name="version" type="xs:string" /> | ||
70 | </xs:complexType> | ||
71 | </xs:element> | ||
72 | |||
73 | <xs:element ref="Files" /> | ||
74 | </xs:sequence> | ||
75 | |||
76 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
77 | <xs:attribute name="path" type="xs:string" default="" /> | ||
78 | |||
79 | <xs:attribute name="language" default="C#"> | ||
80 | <xs:simpleType> | ||
81 | <xs:restriction base="xs:string"> | ||
82 | <xs:enumeration value="C#" /> | ||
83 | <xs:enumeration value="VB.NET" /> | ||
84 | </xs:restriction> | ||
85 | </xs:simpleType> | ||
86 | </xs:attribute> | ||
87 | |||
88 | <xs:attribute name="type" default="Exe"> | ||
89 | <xs:simpleType> | ||
90 | <xs:restriction base="xs:string"> | ||
91 | <xs:enumeration value="Exe" /> | ||
92 | <xs:enumeration value="WinExe" /> | ||
93 | <xs:enumeration value="Library" /> | ||
94 | </xs:restriction> | ||
95 | </xs:simpleType> | ||
96 | </xs:attribute> | ||
97 | |||
98 | <xs:attribute name="runtime" default="Microsoft"> | ||
99 | <xs:simpleType> | ||
100 | <xs:restriction base="xs:string"> | ||
101 | <xs:enumeration value="Microsoft" /> | ||
102 | <xs:enumeration value="Mono" /> | ||
103 | </xs:restriction> | ||
104 | </xs:simpleType> | ||
105 | </xs:attribute> | ||
106 | |||
107 | <xs:attribute name="startupObject" type="xs:string" default="" /> | ||
108 | </xs:complexType> | ||
109 | </xs:element> | ||
110 | |||
111 | <xs:element name="Configuration"> | ||
112 | <xs:complexType> | ||
113 | <xs:all> | ||
114 | <xs:element ref="Options" minOccurs="0" /> | ||
115 | </xs:all> | ||
116 | |||
117 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
118 | </xs:complexType> | ||
119 | </xs:element> | ||
120 | |||
121 | <xs:element name="Options"> | ||
122 | <xs:complexType> | ||
123 | <xs:sequence> | ||
124 | <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" /> | ||
125 | <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" /> | ||
126 | <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" /> | ||
127 | <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" /> | ||
128 | <xs:element name="WarningLevel" minOccurs="0"> | ||
129 | <xs:simpleType> | ||
130 | <xs:restriction base="xs:integer"> | ||
131 | <xs:minInclusive value="0" /> | ||
132 | <xs:maxInclusive value="4"/> | ||
133 | </xs:restriction> | ||
134 | </xs:simpleType> | ||
135 | </xs:element> | ||
136 | <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" /> | ||
137 | <xs:element name="SupressWarnings" type="xs:string" minOccurs="0" /> | ||
138 | <xs:element name="OutputPath" type="xs:string" minOccurs="0" /> | ||
139 | <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" /> | ||
140 | <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" /> | ||
141 | <xs:element name="RegisterCOMInterop" type="xs:boolean" minOccurs="0" /> | ||
142 | <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" /> | ||
143 | <xs:element name="BaseAddress" type="xs:string" minOccurs="0" /> | ||
144 | <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" /> | ||
145 | <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" /> | ||
146 | </xs:sequence> | ||
147 | </xs:complexType> | ||
148 | </xs:element> | ||
149 | |||
150 | <xs:element name="Files"> | ||
151 | <xs:complexType> | ||
152 | <xs:sequence> | ||
153 | <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" /> | ||
154 | <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" /> | ||
155 | </xs:sequence> | ||
156 | </xs:complexType> | ||
157 | </xs:element> | ||
158 | |||
159 | <xs:element name="File"> | ||
160 | <xs:complexType> | ||
161 | <xs:simpleContent> | ||
162 | <xs:extension base="xs:string"> | ||
163 | <xs:attribute name="buildAction" default="Compile"> | ||
164 | <xs:simpleType> | ||
165 | <xs:restriction base="xs:string"> | ||
166 | <xs:enumeration value="Compile" /> | ||
167 | <xs:enumeration value="Content" /> | ||
168 | <xs:enumeration value="EmbeddedResource" /> | ||
169 | </xs:restriction> | ||
170 | </xs:simpleType> | ||
171 | </xs:attribute> | ||
172 | </xs:extension> | ||
173 | </xs:simpleContent> | ||
174 | </xs:complexType> | ||
175 | </xs:element> | ||
176 | |||
177 | <xs:element name="Match"> | ||
178 | <xs:complexType> | ||
179 | <xs:attribute name="path" type="xs:string" use="required" /> | ||
180 | <xs:attribute name="pattern" type="xs:string" use="required" /> | ||
181 | <xs:attribute name="recurse" type="xs:boolean" default="false" /> | ||
182 | </xs:complexType> | ||
183 | </xs:element> | ||
184 | </xs:schema> \ No newline at end of file | ||
diff --git a/Prebuild/src/data/dnpb-1.2.xsd b/Prebuild/src/data/dnpb-1.2.xsd deleted file mode 100644 index d694ab4..0000000 --- a/Prebuild/src/data/dnpb-1.2.xsd +++ /dev/null | |||
@@ -1,198 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <xs:schema elementFormDefault="qualified" | ||
3 | xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
4 | targetNamespace="http://dnpb.sourceforge.net/schemas/dnpb-1.2.xsd" | ||
5 | xmlns="http://dnpb.sourceforge.net/schemas/dnpb-1.2.xsd" | ||
6 | > | ||
7 | <xs:annotation> | ||
8 | <xs:documentation> | ||
9 | Copyright (c) 2004 Matthew Holmes (calefaction _at_ houston _._ rr _._ com) | ||
10 | |||
11 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
12 | provided that the following conditions are met: | ||
13 | |||
14 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
15 | and the following disclaimer. | ||
16 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
17 | and the following disclaimer in the documentation and/or other materials provided with the | ||
18 | distribution. | ||
19 | * The name of the author may not be used to endorse or promote products derived from this software | ||
20 | without specific prior written permission. | ||
21 | |||
22 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
23 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
24 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
26 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
27 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
28 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
29 | </xs:documentation> | ||
30 | </xs:annotation> | ||
31 | |||
32 | <xs:element name="DNPreBuild"> | ||
33 | <xs:complexType> | ||
34 | <xs:sequence> | ||
35 | <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> | ||
36 | <xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" /> | ||
37 | </xs:sequence> | ||
38 | |||
39 | <xs:attribute name="version" use="required" /> | ||
40 | </xs:complexType> | ||
41 | </xs:element> | ||
42 | |||
43 | <xs:element name="Process" type="xs:string" /> | ||
44 | |||
45 | <xs:element name="Solution"> | ||
46 | <xs:complexType> | ||
47 | <xs:sequence> | ||
48 | <xs:element ref="Options" minOccurs="0" /> | ||
49 | <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" /> | ||
50 | <xs:element ref="Files" minOccurs="0" /> | ||
51 | <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" /> | ||
52 | </xs:sequence> | ||
53 | |||
54 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
55 | <xs:attribute name="path" type="xs:string" default="" /> | ||
56 | </xs:complexType> | ||
57 | </xs:element> | ||
58 | |||
59 | <xs:element name="Project"> | ||
60 | <xs:complexType> | ||
61 | <xs:sequence> | ||
62 | <xs:element ref="Configuration" minOccurs="0" maxOccurs="unbounded" /> | ||
63 | |||
64 | <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> | ||
65 | |||
66 | <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded"> | ||
67 | <xs:complexType> | ||
68 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
69 | <xs:attribute name="path" type="xs:string" /> | ||
70 | <xs:attribute name="localCopy" type="xs:boolean" /> | ||
71 | <xs:attribute name="version" type="xs:string" /> | ||
72 | </xs:complexType> | ||
73 | </xs:element> | ||
74 | |||
75 | <xs:element ref="Files" /> | ||
76 | </xs:sequence> | ||
77 | |||
78 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
79 | <xs:attribute name="path" type="xs:string" default="" /> | ||
80 | |||
81 | <xs:attribute name="language" default="C#"> | ||
82 | <xs:simpleType> | ||
83 | <xs:restriction base="xs:string"> | ||
84 | <xs:enumeration value="C#" /> | ||
85 | <xs:enumeration value="VB.NET" /> | ||
86 | </xs:restriction> | ||
87 | </xs:simpleType> | ||
88 | </xs:attribute> | ||
89 | |||
90 | <xs:attribute name="type" default="Exe"> | ||
91 | <xs:simpleType> | ||
92 | <xs:restriction base="xs:string"> | ||
93 | <xs:enumeration value="Exe" /> | ||
94 | <xs:enumeration value="WinExe" /> | ||
95 | <xs:enumeration value="Library" /> | ||
96 | </xs:restriction> | ||
97 | </xs:simpleType> | ||
98 | </xs:attribute> | ||
99 | |||
100 | <xs:attribute name="runtime" default="Microsoft"> | ||
101 | <xs:simpleType> | ||
102 | <xs:restriction base="xs:string"> | ||
103 | <xs:enumeration value="Microsoft" /> | ||
104 | <xs:enumeration value="Mono" /> | ||
105 | </xs:restriction> | ||
106 | </xs:simpleType> | ||
107 | </xs:attribute> | ||
108 | |||
109 | <xs:attribute name="startupObject" type="xs:string" default="" /> | ||
110 | <xs:attribute name="rootNamespace" type="xs:string" /> | ||
111 | <xs:attribute name="assemblyName" type="xs:string" /> | ||
112 | </xs:complexType> | ||
113 | </xs:element> | ||
114 | |||
115 | <xs:element name="Configuration"> | ||
116 | <xs:complexType> | ||
117 | <xs:all> | ||
118 | <xs:element ref="Options" minOccurs="0" /> | ||
119 | </xs:all> | ||
120 | |||
121 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
122 | </xs:complexType> | ||
123 | </xs:element> | ||
124 | |||
125 | <xs:element name="Options"> | ||
126 | <xs:complexType> | ||
127 | <xs:all> | ||
128 | <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" /> | ||
129 | <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" /> | ||
130 | <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" /> | ||
131 | <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" /> | ||
132 | <xs:element name="WarningLevel" minOccurs="0"> | ||
133 | <xs:simpleType> | ||
134 | <xs:restriction base="xs:integer"> | ||
135 | <xs:minInclusive value="0" /> | ||
136 | <xs:maxInclusive value="4"/> | ||
137 | </xs:restriction> | ||
138 | </xs:simpleType> | ||
139 | </xs:element> | ||
140 | <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" /> | ||
141 | <xs:element name="SupressWarnings" type="xs:string" minOccurs="0" /> | ||
142 | <xs:element name="OutputPath" type="xs:string" minOccurs="0" /> | ||
143 | <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" /> | ||
144 | <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" /> | ||
145 | <xs:element name="RegisterCOMInterop" type="xs:boolean" minOccurs="0" /> | ||
146 | <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" /> | ||
147 | <xs:element name="BaseAddress" type="xs:string" minOccurs="0" /> | ||
148 | <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" /> | ||
149 | <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" /> | ||
150 | </xs:all> | ||
151 | </xs:complexType> | ||
152 | </xs:element> | ||
153 | |||
154 | <xs:element name="Files"> | ||
155 | <xs:complexType> | ||
156 | <xs:sequence> | ||
157 | <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" /> | ||
158 | <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" /> | ||
159 | </xs:sequence> | ||
160 | </xs:complexType> | ||
161 | </xs:element> | ||
162 | |||
163 | <xs:element name="File"> | ||
164 | <xs:complexType> | ||
165 | <xs:simpleContent> | ||
166 | <xs:extension base="xs:string"> | ||
167 | <xs:attribute name="buildAction" default="Compile"> | ||
168 | <xs:simpleType> | ||
169 | <xs:restriction base="xs:string"> | ||
170 | <xs:enumeration value="Compile" /> | ||
171 | <xs:enumeration value="Content" /> | ||
172 | <xs:enumeration value="EmbeddedResource" /> | ||
173 | </xs:restriction> | ||
174 | </xs:simpleType> | ||
175 | </xs:attribute> | ||
176 | </xs:extension> | ||
177 | </xs:simpleContent> | ||
178 | </xs:complexType> | ||
179 | </xs:element> | ||
180 | |||
181 | <xs:element name="Match"> | ||
182 | <xs:complexType> | ||
183 | <xs:attribute name="path" type="xs:string" use="required" /> | ||
184 | <xs:attribute name="pattern" type="xs:string" use="required" /> | ||
185 | <xs:attribute name="recurse" type="xs:boolean" default="false" /> | ||
186 | <xs:attribute name="useRegex" type="xs:boolean" default="false" /> | ||
187 | <xs:attribute name="buildAction" default="Compile"> | ||
188 | <xs:simpleType> | ||
189 | <xs:restriction base="xs:string"> | ||
190 | <xs:enumeration value="Compile" /> | ||
191 | <xs:enumeration value="Content" /> | ||
192 | <xs:enumeration value="EmbeddedResource" /> | ||
193 | </xs:restriction> | ||
194 | </xs:simpleType> | ||
195 | </xs:attribute> | ||
196 | </xs:complexType> | ||
197 | </xs:element> | ||
198 | </xs:schema> \ No newline at end of file | ||
diff --git a/Prebuild/src/data/dnpb-1.3.xsd b/Prebuild/src/data/dnpb-1.3.xsd deleted file mode 100644 index 8f31a54..0000000 --- a/Prebuild/src/data/dnpb-1.3.xsd +++ /dev/null | |||
@@ -1,206 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <xs:schema elementFormDefault="qualified" | ||
3 | xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
4 | targetNamespace="http://dnpb.sourceforge.net/schemas/dnpb-1.3.xsd" | ||
5 | xmlns="http://dnpb.sourceforge.net/schemas/dnpb-1.3.xsd" | ||
6 | > | ||
7 | <xs:annotation> | ||
8 | <xs:documentation> | ||
9 | Copyright (c) 2004-2005 Matthew Holmes (calefaction at houston . rr . com), Dan Moorehead (dan05a at gmail . com) | ||
10 | |||
11 | .NET Pre-Build is an XML-driven pre-build tool allowing developers to | ||
12 | easily generate project or make files for major IDE's and .NET | ||
13 | development tools including: Visual Studio 2003, Visual Studio 2002, | ||
14 | SharpDevelop, MonoDevelop, and NAnt. | ||
15 | |||
16 | BSD License: | ||
17 | |||
18 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
19 | provided that the following conditions are met: | ||
20 | |||
21 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
22 | and the following disclaimer. | ||
23 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
24 | and the following disclaimer in the documentation and/or other materials provided with the | ||
25 | distribution. | ||
26 | * The name of the author may not be used to endorse or promote products derived from this software | ||
27 | without specific prior written permission. | ||
28 | |||
29 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
30 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
31 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
32 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
33 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
34 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
36 | </xs:documentation> | ||
37 | </xs:annotation> | ||
38 | |||
39 | <xs:element name="DNPreBuild"> | ||
40 | <xs:complexType> | ||
41 | <xs:sequence> | ||
42 | <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> | ||
43 | <xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" /> | ||
44 | </xs:sequence> | ||
45 | |||
46 | <xs:attribute name="version" use="required" /> | ||
47 | </xs:complexType> | ||
48 | </xs:element> | ||
49 | |||
50 | <xs:element name="Process" type="xs:string" /> | ||
51 | |||
52 | <xs:element name="Solution"> | ||
53 | <xs:complexType> | ||
54 | <xs:sequence> | ||
55 | <xs:element ref="Options" minOccurs="0" /> | ||
56 | <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" /> | ||
57 | <xs:element ref="Files" minOccurs="0" /> | ||
58 | <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" /> | ||
59 | </xs:sequence> | ||
60 | |||
61 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
62 | <xs:attribute name="path" type="xs:string" default="" /> | ||
63 | </xs:complexType> | ||
64 | </xs:element> | ||
65 | |||
66 | <xs:element name="Project"> | ||
67 | <xs:complexType> | ||
68 | <xs:sequence> | ||
69 | <xs:element ref="Configuration" minOccurs="0" maxOccurs="unbounded" /> | ||
70 | |||
71 | <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> | ||
72 | |||
73 | <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded"> | ||
74 | <xs:complexType> | ||
75 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
76 | <xs:attribute name="path" type="xs:string" /> | ||
77 | <xs:attribute name="localCopy" type="xs:boolean" /> | ||
78 | <xs:attribute name="version" type="xs:string" /> | ||
79 | </xs:complexType> | ||
80 | </xs:element> | ||
81 | |||
82 | <xs:element ref="Files" /> | ||
83 | </xs:sequence> | ||
84 | |||
85 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
86 | <xs:attribute name="path" type="xs:string" default="" /> | ||
87 | <xs:attribute name="icon" type="xs:string" default="" /> | ||
88 | |||
89 | <xs:attribute name="language" default="C#"> | ||
90 | <xs:simpleType> | ||
91 | <xs:restriction base="xs:string"> | ||
92 | <xs:enumeration value="C#" /> | ||
93 | <xs:enumeration value="VB.NET" /> | ||
94 | </xs:restriction> | ||
95 | </xs:simpleType> | ||
96 | </xs:attribute> | ||
97 | |||
98 | <xs:attribute name="type" default="Exe"> | ||
99 | <xs:simpleType> | ||
100 | <xs:restriction base="xs:string"> | ||
101 | <xs:enumeration value="Exe" /> | ||
102 | <xs:enumeration value="WinExe" /> | ||
103 | <xs:enumeration value="Library" /> | ||
104 | </xs:restriction> | ||
105 | </xs:simpleType> | ||
106 | </xs:attribute> | ||
107 | |||
108 | <xs:attribute name="runtime" default="Microsoft"> | ||
109 | <xs:simpleType> | ||
110 | <xs:restriction base="xs:string"> | ||
111 | <xs:enumeration value="Microsoft" /> | ||
112 | <xs:enumeration value="Mono" /> | ||
113 | </xs:restriction> | ||
114 | </xs:simpleType> | ||
115 | </xs:attribute> | ||
116 | |||
117 | <xs:attribute name="startupObject" type="xs:string" default="" /> | ||
118 | <xs:attribute name="rootNamespace" type="xs:string" /> | ||
119 | <xs:attribute name="assemblyName" type="xs:string" /> | ||
120 | </xs:complexType> | ||
121 | </xs:element> | ||
122 | |||
123 | <xs:element name="Configuration"> | ||
124 | <xs:complexType> | ||
125 | <xs:all> | ||
126 | <xs:element ref="Options" minOccurs="0" /> | ||
127 | </xs:all> | ||
128 | |||
129 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
130 | </xs:complexType> | ||
131 | </xs:element> | ||
132 | |||
133 | <xs:element name="Options"> | ||
134 | <xs:complexType> | ||
135 | <xs:all> | ||
136 | <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" /> | ||
137 | <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" /> | ||
138 | <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" /> | ||
139 | <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" /> | ||
140 | <xs:element name="WarningLevel" minOccurs="0"> | ||
141 | <xs:simpleType> | ||
142 | <xs:restriction base="xs:integer"> | ||
143 | <xs:minInclusive value="0" /> | ||
144 | <xs:maxInclusive value="4"/> | ||
145 | </xs:restriction> | ||
146 | </xs:simpleType> | ||
147 | </xs:element> | ||
148 | <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" /> | ||
149 | <xs:element name="SupressWarnings" type="xs:string" minOccurs="0" /> | ||
150 | <xs:element name="OutputPath" type="xs:string" minOccurs="0" /> | ||
151 | <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" /> | ||
152 | <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" /> | ||
153 | <xs:element name="RegisterCOMInterop" type="xs:boolean" minOccurs="0" /> | ||
154 | <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" /> | ||
155 | <xs:element name="BaseAddress" type="xs:string" minOccurs="0" /> | ||
156 | <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" /> | ||
157 | <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" /> | ||
158 | </xs:all> | ||
159 | </xs:complexType> | ||
160 | </xs:element> | ||
161 | |||
162 | <xs:element name="Files"> | ||
163 | <xs:complexType> | ||
164 | <xs:sequence> | ||
165 | <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" /> | ||
166 | <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" /> | ||
167 | </xs:sequence> | ||
168 | </xs:complexType> | ||
169 | </xs:element> | ||
170 | |||
171 | <xs:element name="File"> | ||
172 | <xs:complexType> | ||
173 | <xs:simpleContent> | ||
174 | <xs:extension base="xs:string"> | ||
175 | <xs:attribute name="buildAction" default="Compile"> | ||
176 | <xs:simpleType> | ||
177 | <xs:restriction base="xs:string"> | ||
178 | <xs:enumeration value="Compile" /> | ||
179 | <xs:enumeration value="Content" /> | ||
180 | <xs:enumeration value="EmbeddedResource" /> | ||
181 | </xs:restriction> | ||
182 | </xs:simpleType> | ||
183 | </xs:attribute> | ||
184 | </xs:extension> | ||
185 | </xs:simpleContent> | ||
186 | </xs:complexType> | ||
187 | </xs:element> | ||
188 | |||
189 | <xs:element name="Match"> | ||
190 | <xs:complexType> | ||
191 | <xs:attribute name="path" type="xs:string" /> | ||
192 | <xs:attribute name="pattern" type="xs:string" use="required" /> | ||
193 | <xs:attribute name="recurse" type="xs:boolean" default="false" /> | ||
194 | <xs:attribute name="useRegex" type="xs:boolean" default="false" /> | ||
195 | <xs:attribute name="buildAction" default="Compile"> | ||
196 | <xs:simpleType> | ||
197 | <xs:restriction base="xs:string"> | ||
198 | <xs:enumeration value="Compile" /> | ||
199 | <xs:enumeration value="Content" /> | ||
200 | <xs:enumeration value="EmbeddedResource" /> | ||
201 | </xs:restriction> | ||
202 | </xs:simpleType> | ||
203 | </xs:attribute> | ||
204 | </xs:complexType> | ||
205 | </xs:element> | ||
206 | </xs:schema> \ No newline at end of file | ||
diff --git a/Prebuild/src/data/dnpb-1.4.xsd b/Prebuild/src/data/dnpb-1.4.xsd deleted file mode 100644 index 1da50fc..0000000 --- a/Prebuild/src/data/dnpb-1.4.xsd +++ /dev/null | |||
@@ -1,212 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <xs:schema elementFormDefault="qualified" | ||
3 | xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
4 | targetNamespace="http://dnpb.sourceforge.net/schemas/dnpb-1.4.xsd" | ||
5 | xmlns="http://dnpb.sourceforge.net/schemas/dnpb-1.4.xsd" | ||
6 | > | ||
7 | <xs:annotation> | ||
8 | <xs:documentation> | ||
9 | Copyright (c) 2004-2005 Matthew Holmes (calefaction at houston . rr . com), Dan Moorehead (dan05a at gmail . com) | ||
10 | |||
11 | .NET Prebuild is a cross-platform XML-driven pre-build tool which | ||
12 | allows developers to easily generate project or make files for major | ||
13 | IDE's and .NET development tools including: Visual Studio .NET 2002 and | ||
14 | 2003, SharpDevelop, MonoDevelop, and NAnt. | ||
15 | |||
16 | BSD License: | ||
17 | |||
18 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
19 | provided that the following conditions are met: | ||
20 | |||
21 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
22 | and the following disclaimer. | ||
23 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
24 | and the following disclaimer in the documentation and/or other materials provided with the | ||
25 | distribution. | ||
26 | * The name of the author may not be used to endorse or promote products derived from this software | ||
27 | without specific prior written permission. | ||
28 | |||
29 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
30 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
31 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
32 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
33 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
34 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
36 | </xs:documentation> | ||
37 | </xs:annotation> | ||
38 | |||
39 | <xs:element name="DNPreBuild"> | ||
40 | <xs:complexType> | ||
41 | <xs:sequence> | ||
42 | <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> | ||
43 | <xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" /> | ||
44 | </xs:sequence> | ||
45 | |||
46 | <xs:attribute name="version" /> | ||
47 | <xs:attribute name="checkOsVars" /> | ||
48 | </xs:complexType> | ||
49 | </xs:element> | ||
50 | |||
51 | <xs:element name="Process" type="xs:string" /> | ||
52 | |||
53 | <xs:element name="Solution"> | ||
54 | <xs:complexType> | ||
55 | <xs:sequence> | ||
56 | <xs:element ref="Options" minOccurs="0" /> | ||
57 | <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" /> | ||
58 | <xs:element ref="Files" minOccurs="0" /> | ||
59 | <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" /> | ||
60 | </xs:sequence> | ||
61 | |||
62 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
63 | <xs:attribute name="activeConfig" type="xs:string" default="Debug" /> | ||
64 | <xs:attribute name="path" type="xs:string" default="" /> | ||
65 | </xs:complexType> | ||
66 | </xs:element> | ||
67 | |||
68 | <xs:element name="Project"> | ||
69 | <xs:complexType> | ||
70 | <xs:sequence> | ||
71 | <xs:element ref="Configuration" minOccurs="0" maxOccurs="unbounded" /> | ||
72 | |||
73 | <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> | ||
74 | |||
75 | <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded"> | ||
76 | <xs:complexType> | ||
77 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
78 | <xs:attribute name="path" type="xs:string" /> | ||
79 | <xs:attribute name="localCopy" type="xs:boolean" /> | ||
80 | <xs:attribute name="version" type="xs:string" /> | ||
81 | </xs:complexType> | ||
82 | </xs:element> | ||
83 | |||
84 | <xs:element ref="Files" /> | ||
85 | </xs:sequence> | ||
86 | |||
87 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
88 | <xs:attribute name="path" type="xs:string" default="" /> | ||
89 | <xs:attribute name="icon" type="xs:string" default="" /> | ||
90 | |||
91 | <xs:attribute name="language" default="C#"> | ||
92 | <xs:simpleType> | ||
93 | <xs:restriction base="xs:string"> | ||
94 | <xs:enumeration value="C#" /> | ||
95 | <xs:enumeration value="VB.NET" /> | ||
96 | </xs:restriction> | ||
97 | </xs:simpleType> | ||
98 | </xs:attribute> | ||
99 | |||
100 | <xs:attribute name="type" default="Exe"> | ||
101 | <xs:simpleType> | ||
102 | <xs:restriction base="xs:string"> | ||
103 | <xs:enumeration value="Exe" /> | ||
104 | <xs:enumeration value="WinExe" /> | ||
105 | <xs:enumeration value="Library" /> | ||
106 | </xs:restriction> | ||
107 | </xs:simpleType> | ||
108 | </xs:attribute> | ||
109 | |||
110 | <xs:attribute name="runtime" default="Microsoft"> | ||
111 | <xs:simpleType> | ||
112 | <xs:restriction base="xs:string"> | ||
113 | <xs:enumeration value="Microsoft" /> | ||
114 | <xs:enumeration value="Mono" /> | ||
115 | </xs:restriction> | ||
116 | </xs:simpleType> | ||
117 | </xs:attribute> | ||
118 | |||
119 | <xs:attribute name="startupObject" type="xs:string" default="" /> | ||
120 | <xs:attribute name="rootNamespace" type="xs:string" /> | ||
121 | <xs:attribute name="assemblyName" type="xs:string" /> | ||
122 | </xs:complexType> | ||
123 | </xs:element> | ||
124 | |||
125 | <xs:element name="Configuration"> | ||
126 | <xs:complexType> | ||
127 | <xs:sequence> | ||
128 | <xs:element ref="Options" minOccurs="0" /> | ||
129 | </xs:sequence> | ||
130 | |||
131 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
132 | </xs:complexType> | ||
133 | </xs:element> | ||
134 | |||
135 | <xs:element name="Options"> | ||
136 | <xs:complexType> | ||
137 | <xs:all> | ||
138 | <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" /> | ||
139 | <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" /> | ||
140 | <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" /> | ||
141 | <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" /> | ||
142 | <xs:element name="WarningLevel" minOccurs="0"> | ||
143 | <xs:simpleType> | ||
144 | <xs:restriction base="xs:integer"> | ||
145 | <xs:minInclusive value="0" /> | ||
146 | <xs:maxInclusive value="4"/> | ||
147 | </xs:restriction> | ||
148 | </xs:simpleType> | ||
149 | </xs:element> | ||
150 | <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" /> | ||
151 | <xs:element name="SupressWarnings" type="xs:string" minOccurs="0" /> | ||
152 | <xs:element name="OutputPath" type="xs:string" minOccurs="0" /> | ||
153 | <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" /> | ||
154 | <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" /> | ||
155 | <xs:element name="RegisterCOMInterop" type="xs:boolean" minOccurs="0" /> | ||
156 | <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" /> | ||
157 | <xs:element name="BaseAddress" type="xs:string" minOccurs="0" /> | ||
158 | <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" /> | ||
159 | <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" /> | ||
160 | </xs:all> | ||
161 | </xs:complexType> | ||
162 | </xs:element> | ||
163 | |||
164 | <xs:element name="Files"> | ||
165 | <xs:complexType> | ||
166 | <xs:sequence> | ||
167 | <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" /> | ||
168 | <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" /> | ||
169 | </xs:sequence> | ||
170 | </xs:complexType> | ||
171 | </xs:element> | ||
172 | |||
173 | <xs:element name="File"> | ||
174 | <xs:complexType> | ||
175 | <xs:simpleContent> | ||
176 | <xs:extension base="xs:string"> | ||
177 | <xs:attribute name="buildAction" default="Compile"> | ||
178 | <xs:simpleType> | ||
179 | <xs:restriction base="xs:string"> | ||
180 | <xs:enumeration value="None" /> | ||
181 | <xs:enumeration value="Compile" /> | ||
182 | <xs:enumeration value="Content" /> | ||
183 | <xs:enumeration value="EmbeddedResource" /> | ||
184 | </xs:restriction> | ||
185 | </xs:simpleType> | ||
186 | </xs:attribute> | ||
187 | </xs:extension> | ||
188 | </xs:simpleContent> | ||
189 | </xs:complexType> | ||
190 | </xs:element> | ||
191 | |||
192 | <xs:element name="Match"> | ||
193 | <xs:complexType> | ||
194 | <xs:attribute name="path" type="xs:string" /> | ||
195 | <xs:attribute name="pattern" type="xs:string" use="required" /> | ||
196 | <xs:attribute name="recurse" type="xs:boolean" default="false" /> | ||
197 | <xs:attribute name="useRegex" type="xs:boolean" default="false" /> | ||
198 | <xs:attribute name="buildAction" default="Compile"> | ||
199 | <xs:simpleType> | ||
200 | <xs:restriction base="xs:string"> | ||
201 | <xs:enumeration value="None" /> | ||
202 | <xs:enumeration value="Compile" /> | ||
203 | <xs:enumeration value="Content" /> | ||
204 | <xs:enumeration value="EmbeddedResource" /> | ||
205 | </xs:restriction> | ||
206 | </xs:simpleType> | ||
207 | </xs:attribute> | ||
208 | </xs:complexType> | ||
209 | </xs:element> | ||
210 | </xs:schema> | ||
211 | |||
212 | |||
diff --git a/Prebuild/src/data/dnpb-1.5.xsd b/Prebuild/src/data/dnpb-1.5.xsd deleted file mode 100644 index e2b21f0..0000000 --- a/Prebuild/src/data/dnpb-1.5.xsd +++ /dev/null | |||
@@ -1,215 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <xs:schema elementFormDefault="qualified" | ||
3 | xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
4 | targetNamespace="http://dnpb.sourceforge.net/schemas/dnpb-1.5.xsd" | ||
5 | xmlns="http://dnpb.sourceforge.net/schemas/dnpb-1.5.xsd" | ||
6 | > | ||
7 | <xs:annotation> | ||
8 | <xs:documentation> | ||
9 | Copyright (c) 2004-2005 Matthew Holmes (calefaction at houston . rr . com), Dan Moorehead (dan05a at gmail . com) | ||
10 | |||
11 | .NET Prebuild is a cross-platform XML-driven pre-build tool which | ||
12 | allows developers to easily generate project or make files for major | ||
13 | IDE's and .NET development tools including: Visual Studio .NET 2002 and | ||
14 | 2003, SharpDevelop, MonoDevelop, and NAnt. | ||
15 | |||
16 | BSD License: | ||
17 | |||
18 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
19 | provided that the following conditions are met: | ||
20 | |||
21 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
22 | and the following disclaimer. | ||
23 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
24 | and the following disclaimer in the documentation and/or other materials provided with the | ||
25 | distribution. | ||
26 | * The name of the author may not be used to endorse or promote products derived from this software | ||
27 | without specific prior written permission. | ||
28 | |||
29 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
30 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
31 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
32 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
33 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
34 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
36 | </xs:documentation> | ||
37 | </xs:annotation> | ||
38 | |||
39 | <xs:element name="DNPreBuild"> | ||
40 | <xs:complexType> | ||
41 | <xs:sequence> | ||
42 | <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> | ||
43 | <xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" /> | ||
44 | </xs:sequence> | ||
45 | |||
46 | <xs:attribute name="version" /> | ||
47 | <xs:attribute name="checkOsVars" /> | ||
48 | </xs:complexType> | ||
49 | </xs:element> | ||
50 | |||
51 | <xs:element name="Process" type="xs:string" /> | ||
52 | |||
53 | <xs:element name="Solution"> | ||
54 | <xs:complexType> | ||
55 | <xs:sequence> | ||
56 | <xs:element ref="Options" minOccurs="0" /> | ||
57 | <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" /> | ||
58 | <xs:element ref="Files" minOccurs="0" /> | ||
59 | <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" /> | ||
60 | </xs:sequence> | ||
61 | |||
62 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
63 | <xs:attribute name="activeConfig" type="xs:string" default="Debug" /> | ||
64 | <xs:attribute name="path" type="xs:string" default="" /> | ||
65 | </xs:complexType> | ||
66 | </xs:element> | ||
67 | |||
68 | <xs:element name="Project"> | ||
69 | <xs:complexType> | ||
70 | <xs:sequence> | ||
71 | <xs:element ref="Configuration" minOccurs="0" maxOccurs="unbounded" /> | ||
72 | |||
73 | <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> | ||
74 | |||
75 | <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded"> | ||
76 | <xs:complexType> | ||
77 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
78 | <xs:attribute name="path" type="xs:string" /> | ||
79 | <xs:attribute name="localCopy" type="xs:boolean" /> | ||
80 | <xs:attribute name="version" type="xs:string" /> | ||
81 | </xs:complexType> | ||
82 | </xs:element> | ||
83 | |||
84 | <xs:element ref="Files" /> | ||
85 | </xs:sequence> | ||
86 | |||
87 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
88 | <xs:attribute name="filterGroups" type="xs:string" default="" /> | ||
89 | <xs:attribute name="path" type="xs:string" default="" /> | ||
90 | <xs:attribute name="icon" type="xs:string" default="" /> | ||
91 | |||
92 | <xs:attribute name="language" default="C#"> | ||
93 | <xs:simpleType> | ||
94 | <xs:restriction base="xs:string"> | ||
95 | <xs:enumeration value="C#" /> | ||
96 | <xs:enumeration value="VB.NET" /> | ||
97 | </xs:restriction> | ||
98 | </xs:simpleType> | ||
99 | </xs:attribute> | ||
100 | |||
101 | <xs:attribute name="type" default="Exe"> | ||
102 | <xs:simpleType> | ||
103 | <xs:restriction base="xs:string"> | ||
104 | <xs:enumeration value="Exe" /> | ||
105 | <xs:enumeration value="WinExe" /> | ||
106 | <xs:enumeration value="Library" /> | ||
107 | </xs:restriction> | ||
108 | </xs:simpleType> | ||
109 | </xs:attribute> | ||
110 | |||
111 | <xs:attribute name="runtime" default="Microsoft"> | ||
112 | <xs:simpleType> | ||
113 | <xs:restriction base="xs:string"> | ||
114 | <xs:enumeration value="Microsoft" /> | ||
115 | <xs:enumeration value="Mono" /> | ||
116 | </xs:restriction> | ||
117 | </xs:simpleType> | ||
118 | </xs:attribute> | ||
119 | |||
120 | <xs:attribute name="startupObject" type="xs:string" default="" /> | ||
121 | <xs:attribute name="rootNamespace" type="xs:string" /> | ||
122 | <xs:attribute name="assemblyName" type="xs:string" /> | ||
123 | </xs:complexType> | ||
124 | </xs:element> | ||
125 | |||
126 | <xs:element name="Configuration"> | ||
127 | <xs:complexType> | ||
128 | <xs:sequence> | ||
129 | <xs:element ref="Options" minOccurs="0" /> | ||
130 | </xs:sequence> | ||
131 | |||
132 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
133 | </xs:complexType> | ||
134 | </xs:element> | ||
135 | |||
136 | <xs:element name="Options"> | ||
137 | <xs:complexType> | ||
138 | <xs:all> | ||
139 | <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" /> | ||
140 | <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" /> | ||
141 | <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" /> | ||
142 | <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" /> | ||
143 | <xs:element name="WarningLevel" minOccurs="0"> | ||
144 | <xs:simpleType> | ||
145 | <xs:restriction base="xs:integer"> | ||
146 | <xs:minInclusive value="0" /> | ||
147 | <xs:maxInclusive value="4"/> | ||
148 | </xs:restriction> | ||
149 | </xs:simpleType> | ||
150 | </xs:element> | ||
151 | <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" /> | ||
152 | <xs:element name="SupressWarnings" type="xs:string" minOccurs="0" /> | ||
153 | <xs:element name="OutputPath" type="xs:string" minOccurs="0" /> | ||
154 | <xs:element name="GenerateXmlDocFile" type="xs:boolean" minOccurs="0" /> | ||
155 | <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" /> | ||
156 | <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" /> | ||
157 | <xs:element name="RegisterCOMInterop" type="xs:boolean" minOccurs="0" /> | ||
158 | <xs:element name="RemoveIntegerChecks" type="xs:boolean" minOccurs="0" /> | ||
159 | <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" /> | ||
160 | <xs:element name="BaseAddress" type="xs:string" minOccurs="0" /> | ||
161 | <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" /> | ||
162 | <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" /> | ||
163 | </xs:all> | ||
164 | </xs:complexType> | ||
165 | </xs:element> | ||
166 | |||
167 | <xs:element name="Files"> | ||
168 | <xs:complexType> | ||
169 | <xs:sequence> | ||
170 | <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" /> | ||
171 | <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" /> | ||
172 | </xs:sequence> | ||
173 | </xs:complexType> | ||
174 | </xs:element> | ||
175 | |||
176 | <xs:element name="File"> | ||
177 | <xs:complexType> | ||
178 | <xs:simpleContent> | ||
179 | <xs:extension base="xs:string"> | ||
180 | <xs:attribute name="buildAction" default="Compile"> | ||
181 | <xs:simpleType> | ||
182 | <xs:restriction base="xs:string"> | ||
183 | <xs:enumeration value="None" /> | ||
184 | <xs:enumeration value="Compile" /> | ||
185 | <xs:enumeration value="Content" /> | ||
186 | <xs:enumeration value="EmbeddedResource" /> | ||
187 | </xs:restriction> | ||
188 | </xs:simpleType> | ||
189 | </xs:attribute> | ||
190 | </xs:extension> | ||
191 | </xs:simpleContent> | ||
192 | </xs:complexType> | ||
193 | </xs:element> | ||
194 | |||
195 | <xs:element name="Match"> | ||
196 | <xs:complexType> | ||
197 | <xs:attribute name="path" type="xs:string" /> | ||
198 | <xs:attribute name="pattern" type="xs:string" use="required" /> | ||
199 | <xs:attribute name="recurse" type="xs:boolean" default="false" /> | ||
200 | <xs:attribute name="useRegex" type="xs:boolean" default="false" /> | ||
201 | <xs:attribute name="buildAction" default="Compile"> | ||
202 | <xs:simpleType> | ||
203 | <xs:restriction base="xs:string"> | ||
204 | <xs:enumeration value="None" /> | ||
205 | <xs:enumeration value="Compile" /> | ||
206 | <xs:enumeration value="Content" /> | ||
207 | <xs:enumeration value="EmbeddedResource" /> | ||
208 | </xs:restriction> | ||
209 | </xs:simpleType> | ||
210 | </xs:attribute> | ||
211 | </xs:complexType> | ||
212 | </xs:element> | ||
213 | </xs:schema> | ||
214 | |||
215 | |||
diff --git a/Prebuild/src/data/prebuild-1.6.xsd b/Prebuild/src/data/prebuild-1.6.xsd deleted file mode 100644 index 57ebd2e..0000000 --- a/Prebuild/src/data/prebuild-1.6.xsd +++ /dev/null | |||
@@ -1,231 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd" | ||
3 | xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd"> | ||
4 | <xs:annotation> | ||
5 | <xs:documentation> | ||
6 | Copyright (c) 2004-2005 Matthew Holmes (calefaction at houston . rr . com), Dan Moorehead (dan05a at gmail . com) | ||
7 | |||
8 | .NET Prebuild is a cross-platform XML-driven pre-build tool which | ||
9 | allows developers to easily generate project or make files for major | ||
10 | IDE's and .NET development tools including: Visual Studio .NET 2002 and | ||
11 | 2003, SharpDevelop, MonoDevelop, and NAnt. | ||
12 | |||
13 | BSD License: | ||
14 | |||
15 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
16 | provided that the following conditions are met: | ||
17 | |||
18 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
19 | and the following disclaimer. | ||
20 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
21 | and the following disclaimer in the documentation and/or other materials provided with the | ||
22 | distribution. | ||
23 | * The name of the author may not be used to endorse or promote products derived from this software | ||
24 | without specific prior written permission. | ||
25 | |||
26 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
27 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
28 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
29 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
30 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
31 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
32 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
33 | </xs:documentation> | ||
34 | </xs:annotation> | ||
35 | <xs:element name="Prebuild"> | ||
36 | <xs:complexType> | ||
37 | <xs:sequence> | ||
38 | <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> | ||
39 | <xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" /> | ||
40 | </xs:sequence> | ||
41 | <xs:attribute name="version" /> | ||
42 | <xs:attribute name="checkOsVars" /> | ||
43 | </xs:complexType> | ||
44 | </xs:element> | ||
45 | <xs:element name="Process" type="xs:string" /> | ||
46 | <xs:element name="Solution"> | ||
47 | <xs:complexType> | ||
48 | <xs:sequence> | ||
49 | <xs:element ref="Options" minOccurs="0" /> | ||
50 | <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" /> | ||
51 | <xs:element ref="Files" minOccurs="0" /> | ||
52 | <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" /> | ||
53 | </xs:sequence> | ||
54 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
55 | <xs:attribute name="activeConfig" type="xs:string" default="Debug" /> | ||
56 | <xs:attribute name="path" type="xs:string" default="" /> | ||
57 | </xs:complexType> | ||
58 | </xs:element> | ||
59 | <xs:element name="Project"> | ||
60 | <xs:complexType> | ||
61 | <xs:sequence> | ||
62 | <xs:element ref="Configuration" minOccurs="0" maxOccurs="unbounded" /> | ||
63 | <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> | ||
64 | <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded"> | ||
65 | <xs:complexType> | ||
66 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
67 | <xs:attribute name="path" type="xs:string" /> | ||
68 | <xs:attribute name="localCopy" type="xs:boolean" /> | ||
69 | <xs:attribute name="version" type="xs:string" /> | ||
70 | </xs:complexType> | ||
71 | </xs:element> | ||
72 | <xs:element ref="Files" /> | ||
73 | </xs:sequence> | ||
74 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
75 | <xs:attribute name="filterGroups" type="xs:string" default="" /> | ||
76 | <xs:attribute name="path" type="xs:string" default="" /> | ||
77 | <xs:attribute name="icon" type="xs:string" default="" /> | ||
78 | <xs:attribute name="language" default="C#"> | ||
79 | <xs:simpleType> | ||
80 | <xs:restriction base="xs:string"> | ||
81 | <xs:enumeration value="C#" /> | ||
82 | <xs:enumeration value="VB.NET" /> | ||
83 | </xs:restriction> | ||
84 | </xs:simpleType> | ||
85 | </xs:attribute> | ||
86 | <xs:attribute name="type" default="Exe"> | ||
87 | <xs:simpleType> | ||
88 | <xs:restriction base="xs:string"> | ||
89 | <xs:enumeration value="Exe" /> | ||
90 | <xs:enumeration value="WinExe" /> | ||
91 | <xs:enumeration value="Library" /> | ||
92 | </xs:restriction> | ||
93 | </xs:simpleType> | ||
94 | </xs:attribute> | ||
95 | <xs:attribute name="runtime" default="Microsoft"> | ||
96 | <xs:simpleType> | ||
97 | <xs:restriction base="xs:string"> | ||
98 | <xs:enumeration value="Microsoft" /> | ||
99 | <xs:enumeration value="Mono" /> | ||
100 | </xs:restriction> | ||
101 | </xs:simpleType> | ||
102 | </xs:attribute> | ||
103 | <xs:attribute name="startupObject" type="xs:string" default="" /> | ||
104 | <xs:attribute name="rootNamespace" type="xs:string" /> | ||
105 | <xs:attribute name="assemblyName" type="xs:string" /> | ||
106 | </xs:complexType> | ||
107 | </xs:element> | ||
108 | <xs:element name="Configuration"> | ||
109 | <xs:complexType> | ||
110 | <xs:sequence> | ||
111 | <xs:element ref="Options" minOccurs="0" /> | ||
112 | </xs:sequence> | ||
113 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
114 | </xs:complexType> | ||
115 | </xs:element> | ||
116 | <xs:element name="Options"> | ||
117 | <xs:complexType> | ||
118 | <xs:all> | ||
119 | <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" /> | ||
120 | <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" /> | ||
121 | <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" /> | ||
122 | <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" /> | ||
123 | <xs:element name="PreBuildEvent" type="xs:string" minOccurs="0" /> | ||
124 | <xs:element name="PostBuildEvent" type="xs:string" minOccurs="0" /> | ||
125 | <xs:element name="RunPostBuildEvent" minOccurs="0" default="OnBuildSuccess"> | ||
126 | <xs:simpleType> | ||
127 | <xs:restriction base="xs:string"> | ||
128 | <xs:enumeration value="OnBuildSuccess" /> | ||
129 | <xs:enumeration value="Always" /> | ||
130 | <xs:enumeration value="OnOutputUpdated" /> | ||
131 | </xs:restriction> | ||
132 | </xs:simpleType> | ||
133 | </xs:element> | ||
134 | <xs:element name="RunScript" type="xs:string" minOccurs="0" /> | ||
135 | <xs:element name="PreBuildEventArgs" type="xs:string" minOccurs="0" /> | ||
136 | <xs:element name="PostBuildEventArgs" type="xs:string" minOccurs="0" /> | ||
137 | <xs:element name="WarningLevel" minOccurs="0"> | ||
138 | <xs:simpleType> | ||
139 | <xs:restriction base="xs:integer"> | ||
140 | <xs:minInclusive value="0" /> | ||
141 | <xs:maxInclusive value="4" /> | ||
142 | </xs:restriction> | ||
143 | </xs:simpleType> | ||
144 | </xs:element> | ||
145 | <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" /> | ||
146 | <xs:element name="SuppressWarnings" type="xs:string" minOccurs="0" /> | ||
147 | <xs:element name="OutputPath" type="xs:string" minOccurs="0" /> | ||
148 | <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" /> | ||
149 | <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" /> | ||
150 | <xs:element name="RegisterComInterop" type="xs:boolean" minOccurs="0" /> | ||
151 | <xs:element name="RemoveIntegerChecks" type="xs:boolean" minOccurs="0" /> | ||
152 | <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" /> | ||
153 | <xs:element name="BaseAddress" type="xs:string" minOccurs="0" /> | ||
154 | <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" /> | ||
155 | <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" /> | ||
156 | </xs:all> | ||
157 | </xs:complexType> | ||
158 | </xs:element> | ||
159 | <xs:element name="Files"> | ||
160 | <xs:complexType> | ||
161 | <xs:sequence> | ||
162 | <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" /> | ||
163 | <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" /> | ||
164 | </xs:sequence> | ||
165 | </xs:complexType> | ||
166 | </xs:element> | ||
167 | <xs:element name="File"> | ||
168 | <xs:complexType> | ||
169 | <xs:simpleContent> | ||
170 | <xs:extension base="xs:string"> | ||
171 | <xs:attribute name="buildAction" default="Compile"> | ||
172 | <xs:simpleType> | ||
173 | <xs:restriction base="xs:string"> | ||
174 | <xs:enumeration value="None" /> | ||
175 | <xs:enumeration value="Compile" /> | ||
176 | <xs:enumeration value="Content" /> | ||
177 | <xs:enumeration value="EmbeddedResource" /> | ||
178 | </xs:restriction> | ||
179 | </xs:simpleType> | ||
180 | </xs:attribute> | ||
181 | <xs:attribute name="subType" default="Code"> | ||
182 | <xs:simpleType> | ||
183 | <xs:restriction base="xs:string"> | ||
184 | <xs:enumeration value="Code" /> | ||
185 | <xs:enumeration value="Component" /> | ||
186 | <xs:enumeration value="Form" /> | ||
187 | <xs:enumeration value="UserControl" /> | ||
188 | </xs:restriction> | ||
189 | </xs:simpleType> | ||
190 | </xs:attribute> | ||
191 | </xs:extension> | ||
192 | </xs:simpleContent> | ||
193 | </xs:complexType> | ||
194 | </xs:element> | ||
195 | <xs:element name="Match"> | ||
196 | <xs:complexType> | ||
197 | <xs:sequence> | ||
198 | <xs:element ref="Exclude" minOccurs="0" /> | ||
199 | </xs:sequence> | ||
200 | <xs:attribute name="path" type="xs:string" /> | ||
201 | <xs:attribute name="pattern" type="xs:string" use="required" /> | ||
202 | <xs:attribute name="recurse" type="xs:boolean" default="false" /> | ||
203 | <xs:attribute name="useRegex" type="xs:boolean" default="false" /> | ||
204 | <xs:attribute name="buildAction" default="Compile"> | ||
205 | <xs:simpleType> | ||
206 | <xs:restriction base="xs:string"> | ||
207 | <xs:enumeration value="None" /> | ||
208 | <xs:enumeration value="Compile" /> | ||
209 | <xs:enumeration value="Content" /> | ||
210 | <xs:enumeration value="EmbeddedResource" /> | ||
211 | </xs:restriction> | ||
212 | </xs:simpleType> | ||
213 | </xs:attribute> | ||
214 | <xs:attribute name="subType" default="Code"> | ||
215 | <xs:simpleType> | ||
216 | <xs:restriction base="xs:string"> | ||
217 | <xs:enumeration value="Code" /> | ||
218 | <xs:enumeration value="Component" /> | ||
219 | <xs:enumeration value="Form" /> | ||
220 | <xs:enumeration value="UserControl" /> | ||
221 | </xs:restriction> | ||
222 | </xs:simpleType> | ||
223 | </xs:attribute> | ||
224 | </xs:complexType> | ||
225 | </xs:element> | ||
226 | <xs:element name="Exclude"> | ||
227 | <xs:complexType> | ||
228 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
229 | </xs:complexType> | ||
230 | </xs:element> | ||
231 | </xs:schema> | ||
diff --git a/Prebuild/src/data/prebuild-1.7.xsd b/Prebuild/src/data/prebuild-1.7.xsd deleted file mode 100644 index c3f8d6b..0000000 --- a/Prebuild/src/data/prebuild-1.7.xsd +++ /dev/null | |||
@@ -1,331 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd"> | ||
3 | <xs:annotation> | ||
4 | <xs:documentation> | ||
5 | Copyright (c) 2004-2007 | ||
6 | Matthew Holmes (calefaction at houston . rr . com), | ||
7 | Dan Moorehead (dan05a at gmail . com), | ||
8 | David Hudson (jendave at yahoo dot com), | ||
9 | C.J. Adams-Collier (cjac at colliertech dot com) | ||
10 | |||
11 | .NET Prebuild is a cross-platform XML-driven pre-build tool which | ||
12 | allows developers to easily generate project or make files for major | ||
13 | IDE's and .NET development tools including: Visual Studio .NET 2002, | ||
14 | 2003, and 2005, SharpDevelop, MonoDevelop, NAnt, Xcode and the GNU Autotools. | ||
15 | |||
16 | BSD License: | ||
17 | |||
18 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
19 | provided that the following conditions are met: | ||
20 | |||
21 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
22 | and the following disclaimer. | ||
23 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
24 | and the following disclaimer in the documentation and/or other materials provided with the | ||
25 | distribution. | ||
26 | * The name of the author may not be used to endorse or promote products derived from this software | ||
27 | without specific prior written permission. | ||
28 | |||
29 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
30 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
31 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
32 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
33 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
34 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
36 | </xs:documentation> | ||
37 | </xs:annotation> | ||
38 | |||
39 | <xs:element name="Prebuild"> | ||
40 | <xs:complexType> | ||
41 | <xs:sequence> | ||
42 | <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> | ||
43 | <xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" /> | ||
44 | </xs:sequence> | ||
45 | <xs:attribute name="version" /> | ||
46 | <xs:attribute name="checkOsVars" /> | ||
47 | </xs:complexType> | ||
48 | </xs:element> | ||
49 | |||
50 | <xs:element name="Process" type="xs:string" /> | ||
51 | |||
52 | <xs:element name="Solution"> | ||
53 | <xs:complexType> | ||
54 | <xs:sequence> | ||
55 | <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" /> | ||
56 | <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> | ||
57 | <xs:element ref="Options" minOccurs="0" /> | ||
58 | <xs:element ref="Files" minOccurs="0" /> | ||
59 | <xs:element ref="Project" minOccurs="0" maxOccurs="unbounded" /> | ||
60 | <xs:element ref="DatabaseProject" minOccurs="0" maxOccurs="unbounded" /> | ||
61 | <xs:element ref="EmbeddedSolution" minOccurs="0" maxOccurs="unbounded" /> | ||
62 | </xs:sequence> | ||
63 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
64 | <xs:attribute name="activeConfig" type="xs:string" default="Debug" /> | ||
65 | <xs:attribute name="path" type="xs:string" default="" /> | ||
66 | <xs:attribute name="version" type="xs:string" default="1.0.0" /> | ||
67 | </xs:complexType> | ||
68 | </xs:element> | ||
69 | |||
70 | <xs:element name="EmbeddedSolution"> | ||
71 | <xs:complexType> | ||
72 | <xs:sequence> | ||
73 | <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> | ||
74 | <xs:element ref="Files" minOccurs="0" /> | ||
75 | <xs:element ref="Project" minOccurs="0" maxOccurs="unbounded" /> | ||
76 | <xs:element ref="DatabaseProject" minOccurs="0" maxOccurs="unbounded" /> | ||
77 | <xs:element ref="EmbeddedSolution" minOccurs="0" maxOccurs="unbounded" /> | ||
78 | </xs:sequence> | ||
79 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
80 | <xs:attribute name="activeConfig" type="xs:string" default="Debug" /> | ||
81 | <xs:attribute name="path" type="xs:string" default="" /> | ||
82 | <xs:attribute name="version" type="xs:string" default="1.0.0" /> | ||
83 | </xs:complexType> | ||
84 | </xs:element> | ||
85 | |||
86 | <xs:element name="DatabaseProject"> | ||
87 | <xs:complexType> | ||
88 | <xs:sequence> | ||
89 | <xs:element name="Author" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> | ||
90 | <xs:element ref="DatabaseReference" minOccurs="0" maxOccurs="unbounded" /> | ||
91 | </xs:sequence> | ||
92 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
93 | <xs:attribute name="path" type="xs:string" /> | ||
94 | </xs:complexType> | ||
95 | </xs:element> | ||
96 | |||
97 | <xs:element name="DatabaseReference"> | ||
98 | <xs:complexType> | ||
99 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
100 | <xs:attribute name="providerId" type="xs:string" /> | ||
101 | <xs:attribute name="providerName" type="xs:string" /> | ||
102 | <xs:attribute name="connectionString" type="xs:string" use="required" /> | ||
103 | </xs:complexType> | ||
104 | </xs:element> | ||
105 | |||
106 | <xs:element name="Project"> | ||
107 | <xs:complexType> | ||
108 | <xs:sequence> | ||
109 | <xs:element name="Author" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> | ||
110 | <xs:element name="Description" type="xs:string" minOccurs="0" maxOccurs="1" /> | ||
111 | <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" /> | ||
112 | <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> | ||
113 | <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded"> | ||
114 | <xs:complexType> | ||
115 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
116 | <xs:attribute name="path" type="xs:string" /> | ||
117 | <xs:attribute name="localCopy" type="xs:boolean" /> | ||
118 | <xs:attribute name="version" type="xs:string" /> | ||
119 | </xs:complexType> | ||
120 | </xs:element> | ||
121 | <xs:element ref="Files" /> | ||
122 | </xs:sequence> | ||
123 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
124 | <xs:attribute name="designerFolder" type="xs:string" default="" /> | ||
125 | <xs:attribute name="filterGroups" type="xs:string" default="" /> | ||
126 | <xs:attribute name="path" type="xs:string" default="" /> | ||
127 | <xs:attribute name="icon" type="xs:string" default="" /> | ||
128 | <xs:attribute name="configFile" type="xs:string" default="" /> | ||
129 | <xs:attribute name="version" type="xs:string" default="1.0.0" /> | ||
130 | <xs:attribute name="guid" type="xs:string"/> | ||
131 | <xs:attribute name="language" default="C#"> | ||
132 | <xs:simpleType> | ||
133 | <xs:restriction base="xs:string"> | ||
134 | <xs:enumeration value="C#" /> | ||
135 | <xs:enumeration value="VB.NET" /> | ||
136 | </xs:restriction> | ||
137 | </xs:simpleType> | ||
138 | </xs:attribute> | ||
139 | <xs:attribute name="type" default="Exe"> | ||
140 | <xs:simpleType> | ||
141 | <xs:restriction base="xs:string"> | ||
142 | <xs:enumeration value="Exe" /> | ||
143 | <xs:enumeration value="WinExe" /> | ||
144 | <xs:enumeration value="Library" /> | ||
145 | <xs:enumeration value="Web" /> | ||
146 | </xs:restriction> | ||
147 | </xs:simpleType> | ||
148 | </xs:attribute> | ||
149 | <xs:attribute name="runtime" default="Microsoft"> | ||
150 | <xs:simpleType> | ||
151 | <xs:restriction base="xs:string"> | ||
152 | <xs:enumeration value="Microsoft" /> | ||
153 | <xs:enumeration value="Mono" /> | ||
154 | </xs:restriction> | ||
155 | </xs:simpleType> | ||
156 | </xs:attribute> | ||
157 | <xs:attribute name="frameworkVersion" default="v2_0"> | ||
158 | <xs:simpleType> | ||
159 | <xs:restriction base="xs:string"> | ||
160 | <xs:enumeration value="v2_0" /> | ||
161 | <xs:enumeration value="v3_0" /> | ||
162 | <xs:enumeration value="v3_5" /> | ||
163 | </xs:restriction> | ||
164 | </xs:simpleType> | ||
165 | </xs:attribute> | ||
166 | <xs:attribute name="startupObject" type="xs:string" default="" /> | ||
167 | <xs:attribute name="rootNamespace" type="xs:string" /> | ||
168 | <xs:attribute name="debugStartParameters" type="xs:string" /> | ||
169 | <xs:attribute name="assemblyName" type="xs:string" /> | ||
170 | <xs:attribute name="generateAssemblyInfoFile" type="xs:boolean" default="false" /> | ||
171 | </xs:complexType> | ||
172 | </xs:element> | ||
173 | |||
174 | <xs:element name="Configuration"> | ||
175 | <xs:complexType> | ||
176 | <xs:sequence> | ||
177 | <xs:element ref="Options" minOccurs="0" /> | ||
178 | </xs:sequence> | ||
179 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
180 | </xs:complexType> | ||
181 | </xs:element> | ||
182 | <xs:element name="Options"> | ||
183 | <xs:complexType> | ||
184 | <xs:all> | ||
185 | <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" /> | ||
186 | <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" /> | ||
187 | <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" /> | ||
188 | <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" /> | ||
189 | <xs:element name="PreBuildEvent" type="xs:string" minOccurs="0" /> | ||
190 | <xs:element name="PostBuildEvent" type="xs:string" minOccurs="0" /> | ||
191 | <xs:element name="RunPostBuildEvent" minOccurs="0" default="OnBuildSuccess"> | ||
192 | <xs:simpleType> | ||
193 | <xs:restriction base="xs:string"> | ||
194 | <xs:enumeration value="OnBuildSuccess" /> | ||
195 | <xs:enumeration value="Always" /> | ||
196 | <xs:enumeration value="OnOutputUpdated" /> | ||
197 | </xs:restriction> | ||
198 | </xs:simpleType> | ||
199 | </xs:element> | ||
200 | <xs:element name="RunScript" type="xs:string" minOccurs="0" /> | ||
201 | <xs:element name="PreBuildEventArgs" type="xs:string" minOccurs="0" /> | ||
202 | <xs:element name="PostBuildEventArgs" type="xs:string" minOccurs="0" /> | ||
203 | <xs:element name="WarningLevel" minOccurs="0"> | ||
204 | <xs:simpleType> | ||
205 | <xs:restriction base="xs:integer"> | ||
206 | <xs:minInclusive value="0" /> | ||
207 | <xs:maxInclusive value="4" /> | ||
208 | </xs:restriction> | ||
209 | </xs:simpleType> | ||
210 | </xs:element> | ||
211 | <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" /> | ||
212 | <xs:element name="SuppressWarnings" type="xs:string" minOccurs="0" /> | ||
213 | <xs:element name="OutputPath" type="xs:string" minOccurs="0" /> | ||
214 | <xs:element name="GenerateDocumentation" type="xs:boolean" minOccurs="0" /> | ||
215 | <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" /> | ||
216 | <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" /> | ||
217 | <xs:element name="RegisterComInterop" type="xs:boolean" minOccurs="0" /> | ||
218 | <xs:element name="RemoveIntegerChecks" type="xs:boolean" minOccurs="0" /> | ||
219 | <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" /> | ||
220 | <xs:element name="BaseAddress" type="xs:string" minOccurs="0" /> | ||
221 | <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" /> | ||
222 | <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" /> | ||
223 | <xs:element name="KeyFile" type="xs:string" minOccurs="0" /> | ||
224 | </xs:all> | ||
225 | </xs:complexType> | ||
226 | </xs:element> | ||
227 | <xs:element name="Files"> | ||
228 | <xs:complexType> | ||
229 | <xs:sequence> | ||
230 | <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" /> | ||
231 | <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" /> | ||
232 | </xs:sequence> | ||
233 | </xs:complexType> | ||
234 | </xs:element> | ||
235 | <xs:element name="File"> | ||
236 | <xs:complexType> | ||
237 | <xs:simpleContent> | ||
238 | <xs:extension base="xs:string"> | ||
239 | <xs:attribute name="resourceName" type="xs:string" default="" /> | ||
240 | <xs:attribute name="buildAction" default="Compile"> | ||
241 | <xs:simpleType> | ||
242 | <xs:restriction base="xs:string"> | ||
243 | <xs:enumeration value="None" /> | ||
244 | <xs:enumeration value="Compile" /> | ||
245 | <xs:enumeration value="Content" /> | ||
246 | <xs:enumeration value="EmbeddedResource" /> | ||
247 | </xs:restriction> | ||
248 | </xs:simpleType> | ||
249 | </xs:attribute> | ||
250 | <xs:attribute name="subType" default="Code"> | ||
251 | <xs:simpleType> | ||
252 | <xs:restriction base="xs:string"> | ||
253 | <xs:enumeration value="Code" /> | ||
254 | <xs:enumeration value="CodeBehind" /> | ||
255 | <xs:enumeration value="Component" /> | ||
256 | <xs:enumeration value="Form" /> | ||
257 | <xs:enumeration value="Settings" /> | ||
258 | <xs:enumeration value="UserControl" /> | ||
259 | </xs:restriction> | ||
260 | </xs:simpleType> | ||
261 | </xs:attribute> | ||
262 | <xs:attribute name="link" type="xs:boolean" /> | ||
263 | <xs:attribute name="copyToOutput" default="Never"> | ||
264 | <xs:simpleType> | ||
265 | <xs:restriction base="xs:string"> | ||
266 | <xs:enumeration value="Never" /> | ||
267 | <xs:enumeration value="Always" /> | ||
268 | <xs:enumeration value="PreserveNewest" /> | ||
269 | </xs:restriction> | ||
270 | </xs:simpleType> | ||
271 | </xs:attribute> | ||
272 | <xs:attribute name="preservePath" type="xs:boolean" /> | ||
273 | <xs:attribute name="linkPath" type="xs:string" /> | ||
274 | </xs:extension> | ||
275 | </xs:simpleContent> | ||
276 | </xs:complexType> | ||
277 | </xs:element> | ||
278 | <xs:element name="Match"> | ||
279 | <xs:complexType> | ||
280 | <xs:sequence> | ||
281 | <xs:element ref="Exclude" minOccurs="0" maxOccurs="unbounded" /> | ||
282 | </xs:sequence> | ||
283 | <xs:attribute name="path" type="xs:string" /> | ||
284 | <xs:attribute name="pattern" type="xs:string" use="required" /> | ||
285 | <xs:attribute name="recurse" type="xs:boolean" default="false" /> | ||
286 | <xs:attribute name="useRegex" type="xs:boolean" default="false" /> | ||
287 | <xs:attribute name="buildAction" default="Compile"> | ||
288 | <xs:simpleType> | ||
289 | <xs:restriction base="xs:string"> | ||
290 | <xs:enumeration value="None" /> | ||
291 | <xs:enumeration value="Compile" /> | ||
292 | <xs:enumeration value="Content" /> | ||
293 | <xs:enumeration value="EmbeddedResource" /> | ||
294 | </xs:restriction> | ||
295 | </xs:simpleType> | ||
296 | </xs:attribute> | ||
297 | <xs:attribute name="resourceName" type="xs:string" default="" /> | ||
298 | <xs:attribute name="subType" default="Code"> | ||
299 | <xs:simpleType> | ||
300 | <xs:restriction base="xs:string"> | ||
301 | <xs:enumeration value="Code" /> | ||
302 | <xs:enumeration value="CodeBehind" /> | ||
303 | <xs:enumeration value="Component" /> | ||
304 | <xs:enumeration value="Designer" /> | ||
305 | <xs:enumeration value="Form" /> | ||
306 | <xs:enumeration value="Settings" /> | ||
307 | <xs:enumeration value="UserControl" /> | ||
308 | </xs:restriction> | ||
309 | </xs:simpleType> | ||
310 | </xs:attribute> | ||
311 | <xs:attribute name="link" type="xs:boolean" /> | ||
312 | <xs:attribute name="copyToOutput" default="Never"> | ||
313 | <xs:simpleType> | ||
314 | <xs:restriction base="xs:string"> | ||
315 | <xs:enumeration value="Never" /> | ||
316 | <xs:enumeration value="Always" /> | ||
317 | <xs:enumeration value="PreserveNewest" /> | ||
318 | </xs:restriction> | ||
319 | </xs:simpleType> | ||
320 | </xs:attribute> | ||
321 | <xs:attribute name="preservePath" type="xs:boolean" /> | ||
322 | <xs:attribute name="linkPath" type="xs:string" /> | ||
323 | </xs:complexType> | ||
324 | </xs:element> | ||
325 | <xs:element name="Exclude"> | ||
326 | <xs:complexType> | ||
327 | <xs:attribute name="name" type="xs:string" /> | ||
328 | <xs:attribute name="pattern" type="xs:string" /> | ||
329 | </xs:complexType> | ||
330 | </xs:element> | ||
331 | </xs:schema> | ||
diff --git a/Prebuild/tests/Makefile b/Prebuild/tests/Makefile deleted file mode 100644 index 4a8ddf4..0000000 --- a/Prebuild/tests/Makefile +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | # | ||
2 | # Executable | ||
3 | # | ||
4 | |||
5 | # Executables | ||
6 | PREBUILD = mono ../src/bin/Release/prebuild.exe /target makefile | ||
7 | |||
8 | # Files | ||
9 | PREBUILDS = $(wildcard *.prebuild) | ||
10 | RESULTS = $(PREBUILDS:prebuild=results) | ||
11 | TESTS = $(PREBUILDS:prebuild=test) | ||
12 | |||
13 | all: $(TESTS) | ||
14 | |||
15 | clean: | ||
16 | rm -f *~ *.log | ||
17 | rm -f $(RESULTS) | ||
18 | |||
19 | %.test: %.prebuild | ||
20 | $(PREBUILD) /log $*.log /file $*.prebuild /ppi $*.results >& /dev/null | ||
21 | if ! cmp $*.expected $*.results; then \ | ||
22 | echo $*.prebuild failed; \ | ||
23 | false; \ | ||
24 | fi | ||
diff --git a/Prebuild/tests/README.txt b/Prebuild/tests/README.txt deleted file mode 100644 index 2c2de3b..0000000 --- a/Prebuild/tests/README.txt +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | There are some tests that are run via a Makfile in this | ||
2 | directory. They haven't been included in any form of unit tests, but | ||
3 | they are there to help test the functionality in some what. Simply | ||
4 | build prebuild (so there is a src/bin/Release/prebuild.exe) and type | ||
5 | `make` in this directory. Everything should pass without errors. | ||
diff --git a/Prebuild/tests/include-001.expected b/Prebuild/tests/include-001.expected deleted file mode 100644 index 26374b5..0000000 --- a/Prebuild/tests/include-001.expected +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | <Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" version="1.7"> | ||
2 | <Solution name="include-001" version="1.2.3"> | ||
3 | <Configuration name="Debug"> | ||
4 | <Options> | ||
5 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
6 | <OptimizeCode>false</OptimizeCode> | ||
7 | <OutputPath>bin/Debug</OutputPath> | ||
8 | <DebugInformation>true</DebugInformation> | ||
9 | </Options> | ||
10 | </Configuration> | ||
11 | <Configuration name="Release"> | ||
12 | <Options> | ||
13 | <CompilerDefines>TRACE</CompilerDefines> | ||
14 | <OutputPath>bin/Release</OutputPath> | ||
15 | <OptimizeCode>true</OptimizeCode> | ||
16 | <DebugInformation>false</DebugInformation> | ||
17 | </Options> | ||
18 | </Configuration> | ||
19 | <Project name="Prebuild" path="src" language="C#" assemblyName="include-001" type="Exe" version="1.2.3" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd"> | ||
20 | <Configuration name="Debug"> | ||
21 | <Options> | ||
22 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
23 | <OptimizeCode>false</OptimizeCode> | ||
24 | <OutputPath>bin/Debug</OutputPath> | ||
25 | <DebugInformation>true</DebugInformation> | ||
26 | <KeyFile>Prebuild.snk</KeyFile> | ||
27 | <SuppressWarnings>1595</SuppressWarnings> | ||
28 | </Options> | ||
29 | </Configuration> | ||
30 | <Configuration name="Release"> | ||
31 | <Options> | ||
32 | <CompilerDefines>TRACE</CompilerDefines> | ||
33 | <OutputPath>bin/Release</OutputPath> | ||
34 | <OptimizeCode>true</OptimizeCode> | ||
35 | <DebugInformation>false</DebugInformation> | ||
36 | <KeyFile>Prebuild.snk</KeyFile> | ||
37 | <SuppressWarnings>1595</SuppressWarnings> | ||
38 | </Options> | ||
39 | </Configuration> | ||
40 | <Reference name="System" /> | ||
41 | <Files> | ||
42 | <Match pattern="*.cs" recurse="true" /> | ||
43 | </Files> | ||
44 | </Project> | ||
45 | </Solution> | ||
46 | </Prebuild> | ||
diff --git a/Prebuild/tests/include-001.include b/Prebuild/tests/include-001.include deleted file mode 100644 index 7f75962..0000000 --- a/Prebuild/tests/include-001.include +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | <Project name="Prebuild" | ||
2 | path="src" | ||
3 | language="C#" | ||
4 | assemblyName="include-001" | ||
5 | type="Exe" | ||
6 | version="1.2.3" | ||
7 | xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" | ||
8 | > | ||
9 | <Configuration name="Debug"> | ||
10 | <Options> | ||
11 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
12 | <OptimizeCode>false</OptimizeCode> | ||
13 | <OutputPath>bin/Debug</OutputPath> | ||
14 | <DebugInformation>true</DebugInformation> | ||
15 | <KeyFile>Prebuild.snk</KeyFile> | ||
16 | <SuppressWarnings>1595</SuppressWarnings> | ||
17 | </Options> | ||
18 | </Configuration> | ||
19 | <Configuration name="Release"> | ||
20 | <Options> | ||
21 | <CompilerDefines>TRACE</CompilerDefines> | ||
22 | <OutputPath>bin/Release</OutputPath> | ||
23 | <OptimizeCode>true</OptimizeCode> | ||
24 | <DebugInformation>false</DebugInformation> | ||
25 | <KeyFile>Prebuild.snk</KeyFile> | ||
26 | <SuppressWarnings>1595</SuppressWarnings> | ||
27 | </Options> | ||
28 | </Configuration> | ||
29 | <Reference name="System" /> | ||
30 | <Files> | ||
31 | <Match pattern="*.cs" recurse="true"/> | ||
32 | </Files> | ||
33 | </Project> | ||
diff --git a/Prebuild/tests/include-001.prebuild b/Prebuild/tests/include-001.prebuild deleted file mode 100644 index 8047008..0000000 --- a/Prebuild/tests/include-001.prebuild +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" version="1.7"> | ||
3 | <Solution name="include-001" version="1.2.3"> | ||
4 | <Configuration name="Debug"> | ||
5 | <Options> | ||
6 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
7 | <OptimizeCode>false</OptimizeCode> | ||
8 | <OutputPath>bin/Debug</OutputPath> | ||
9 | <DebugInformation>true</DebugInformation> | ||
10 | </Options> | ||
11 | </Configuration> | ||
12 | <Configuration name="Release"> | ||
13 | <Options> | ||
14 | <CompilerDefines>TRACE</CompilerDefines> | ||
15 | <OutputPath>bin/Release</OutputPath> | ||
16 | <OptimizeCode>true</OptimizeCode> | ||
17 | <DebugInformation>false</DebugInformation> | ||
18 | </Options> | ||
19 | </Configuration> | ||
20 | <?include file="include-001.include"?> | ||
21 | </Solution> | ||
22 | </Prebuild> | ||
diff --git a/Prebuild/tests/include-002-2.include b/Prebuild/tests/include-002-2.include deleted file mode 100644 index 661b7f3..0000000 --- a/Prebuild/tests/include-002-2.include +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | <Configuration name="Debug" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd"> | ||
2 | <Options> | ||
3 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
4 | <OptimizeCode>false</OptimizeCode> | ||
5 | <OutputPath>bin/Debug</OutputPath> | ||
6 | <DebugInformation>true</DebugInformation> | ||
7 | </Options> | ||
8 | </Configuration> | ||
diff --git a/Prebuild/tests/include-002.expected b/Prebuild/tests/include-002.expected deleted file mode 100644 index 9849658..0000000 --- a/Prebuild/tests/include-002.expected +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | <Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" version="1.7"> | ||
2 | <Solution name="include-002" version="1.2.3"> | ||
3 | <Configuration name="Debug" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd"> | ||
4 | <Options> | ||
5 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
6 | <OptimizeCode>false</OptimizeCode> | ||
7 | <OutputPath>bin/Debug</OutputPath> | ||
8 | <DebugInformation>true</DebugInformation> | ||
9 | </Options> | ||
10 | </Configuration> | ||
11 | <Project name="Prebuild" path="src" language="C#" assemblyName="include-001" type="Exe" version="1.2.3" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd"> | ||
12 | <Configuration name="Debug" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd"> | ||
13 | <Options> | ||
14 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
15 | <OptimizeCode>false</OptimizeCode> | ||
16 | <OutputPath>bin/Debug</OutputPath> | ||
17 | <DebugInformation>true</DebugInformation> | ||
18 | </Options> | ||
19 | </Configuration> | ||
20 | <Reference name="System" /> | ||
21 | <Files> | ||
22 | <Match pattern="*.cs" recurse="true" /> | ||
23 | </Files> | ||
24 | </Project> | ||
25 | </Solution> | ||
26 | </Prebuild> | ||
diff --git a/Prebuild/tests/include-002.include b/Prebuild/tests/include-002.include deleted file mode 100644 index 64f4058..0000000 --- a/Prebuild/tests/include-002.include +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | <Project name="Prebuild" | ||
2 | path="src" | ||
3 | language="C#" | ||
4 | assemblyName="include-001" | ||
5 | type="Exe" | ||
6 | version="1.2.3" | ||
7 | xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" | ||
8 | > | ||
9 | <?include file="include-002-2.include"?> | ||
10 | <Reference name="System" /> | ||
11 | <Files> | ||
12 | <Match pattern="*.cs" recurse="true"/> | ||
13 | </Files> | ||
14 | </Project> | ||
diff --git a/Prebuild/tests/include-002.prebuild b/Prebuild/tests/include-002.prebuild deleted file mode 100644 index 9e85f20..0000000 --- a/Prebuild/tests/include-002.prebuild +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" version="1.7"> | ||
3 | <Solution name="include-002" version="1.2.3"> | ||
4 | <?include file="include-002-2.include"?> | ||
5 | <?include file="include-002.include"?> | ||
6 | </Solution> | ||
7 | </Prebuild> | ||
diff --git a/bin/Prebuild.exe b/bin/Prebuild.exe index eb4c224..ad84b98 100755 --- a/bin/Prebuild.exe +++ b/bin/Prebuild.exe | |||
Binary files differ | |||
diff --git a/prebuild.xml b/prebuild.xml index fdd024a..7dec8ba 100644 --- a/prebuild.xml +++ b/prebuild.xml | |||
@@ -1,6 +1,6 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | 1 | <?xml version="1.0" ?> |
2 | <Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" version="1.7"> | 2 | <Prebuild version="1.7" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd"> |
3 | <Solution name="OpenSim" activeConfig="Debug" path="./" version="0.5.0-$Rev$"> | 3 | <Solution activeConfig="Debug" name="OpenSim" path="./" version="0.5.0-$Rev$"> |
4 | <Configuration name="Debug"> | 4 | <Configuration name="Debug"> |
5 | <Options> | 5 | <Options> |
6 | <CompilerDefines>TRACE;DEBUG</CompilerDefines> | 6 | <CompilerDefines>TRACE;DEBUG</CompilerDefines> |
@@ -9,7 +9,7 @@ | |||
9 | <AllowUnsafe>false</AllowUnsafe> | 9 | <AllowUnsafe>false</AllowUnsafe> |
10 | <WarningLevel>4</WarningLevel> | 10 | <WarningLevel>4</WarningLevel> |
11 | <WarningsAsErrors>false</WarningsAsErrors> | 11 | <WarningsAsErrors>false</WarningsAsErrors> |
12 | <SuppressWarnings></SuppressWarnings> | 12 | <SuppressWarnings/> |
13 | <OutputPath>bin</OutputPath> | 13 | <OutputPath>bin</OutputPath> |
14 | <DebugInformation>true</DebugInformation> | 14 | <DebugInformation>true</DebugInformation> |
15 | <IncrementalBuild>true</IncrementalBuild> | 15 | <IncrementalBuild>true</IncrementalBuild> |
@@ -24,7 +24,7 @@ | |||
24 | <AllowUnsafe>false</AllowUnsafe> | 24 | <AllowUnsafe>false</AllowUnsafe> |
25 | <WarningLevel>4</WarningLevel> | 25 | <WarningLevel>4</WarningLevel> |
26 | <WarningsAsErrors>false</WarningsAsErrors> | 26 | <WarningsAsErrors>false</WarningsAsErrors> |
27 | <SuppressWarnings></SuppressWarnings> | 27 | <SuppressWarnings/> |
28 | <OutputPath>bin</OutputPath> | 28 | <OutputPath>bin</OutputPath> |
29 | <DebugInformation>false</DebugInformation> | 29 | <DebugInformation>false</DebugInformation> |
30 | <IncrementalBuild>true</IncrementalBuild> | 30 | <IncrementalBuild>true</IncrementalBuild> |
@@ -71,23 +71,23 @@ | |||
71 | <Reference name="System"/> | 71 | <Reference name="System"/> |
72 | <Reference name="System.Xml"/> | 72 | <Reference name="System.Xml"/> |
73 | <Reference name="System.Web"/> | 73 | <Reference name="System.Web"/> |
74 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 74 | <Reference name="OpenMetaverse.StructuredData" path="../../../../bin/"/> |
75 | <Reference name="OpenMetaverseTypes.dll"/> | 75 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
76 | <Reference name="XMLRPC.dll"/> | 76 | <Reference name="XMLRPC" path="../../../../bin/"/> |
77 | <Reference name="log4net.dll"/> | 77 | <Reference name="log4net" path="../../../../bin/"/> |
78 | <Reference name="HttpServer_OpenSim.dll"/> | 78 | <Reference name="HttpServer_OpenSim" path="../../../../bin/"/> |
79 | 79 | ||
80 | <Files> | 80 | <Files> |
81 | <Match pattern="*.cs" recurse="true"> | 81 | <Match pattern="*.cs" recurse="true"> |
82 | <Exclude pattern="Tests" /> | 82 | <Exclude pattern="Tests"/> |
83 | 83 | ||
84 | <!-- on temporary suspension --> | 84 | <!-- on temporary suspension --> |
85 | <Exclude pattern="OSHttpHandler\.cs" /> | 85 | <Exclude pattern="OSHttpHandler\.cs"/> |
86 | <Exclude pattern="OSHttpHttpHandler\.cs" /> | 86 | <Exclude pattern="OSHttpHttpHandler\.cs"/> |
87 | <Exclude pattern="OSHttpRequestPump\.cs" /> | 87 | <Exclude pattern="OSHttpRequestPump\.cs"/> |
88 | <Exclude pattern="OSHttpRequestQueue\.cs" /> | 88 | <Exclude pattern="OSHttpRequestQueue\.cs"/> |
89 | <Exclude pattern="OSHttpServer.*\.cs" /> | 89 | <Exclude pattern="OSHttpServer.*\.cs"/> |
90 | <Exclude pattern="OSHttpXmlRpcHandler.*\.cs" /> | 90 | <Exclude pattern="OSHttpXmlRpcHandler.*\.cs"/> |
91 | </Match> | 91 | </Match> |
92 | </Files> | 92 | </Files> |
93 | </Project> | 93 | </Project> |
@@ -108,10 +108,10 @@ | |||
108 | <Reference name="System"/> | 108 | <Reference name="System"/> |
109 | <Reference name="System.Xml"/> | 109 | <Reference name="System.Xml"/> |
110 | <Reference name="System.Web"/> | 110 | <Reference name="System.Web"/> |
111 | <Reference name="log4net.dll"/> | 111 | <Reference name="log4net" path="../../../bin/"/> |
112 | <Reference name="Nini.dll"/> | 112 | <Reference name="Nini" path="../../../bin/"/> |
113 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 113 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
114 | <Reference name="OpenMetaverseTypes.dll"/> | 114 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
115 | <Files> | 115 | <Files> |
116 | <Match pattern="*.cs" recurse="true"/> | 116 | <Match pattern="*.cs" recurse="true"/> |
117 | </Files> | 117 | </Files> |
@@ -158,17 +158,17 @@ | |||
158 | <Reference name="System.Data"/> | 158 | <Reference name="System.Data"/> |
159 | <Reference name="System.Drawing"/> | 159 | <Reference name="System.Drawing"/> |
160 | <Reference name="System.Web"/> | 160 | <Reference name="System.Web"/> |
161 | <Reference name="BclExtras35.dll"/> | 161 | <Reference name="BclExtras35" path="../../bin/"/> |
162 | <Reference name="OpenMetaverseTypes.dll"/> | 162 | <Reference name="OpenMetaverseTypes" path="../../bin/"/> |
163 | <Reference name="OpenMetaverse.dll"/> | 163 | <Reference name="OpenMetaverse" path="../../bin/"/> |
164 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 164 | <Reference name="OpenMetaverse.StructuredData" path="../../bin/"/> |
165 | <Reference name="XMLRPC.dll"/> | 165 | <Reference name="XMLRPC" path="../../bin/"/> |
166 | <Reference name="OpenSim.Framework.Console"/> | 166 | <Reference name="OpenSim.Framework.Console"/> |
167 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 167 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
168 | <Reference name="Nini.dll" /> | 168 | <Reference name="Nini" path="../../bin/"/> |
169 | <Reference name="log4net.dll"/> | 169 | <Reference name="log4net" path="../../bin/"/> |
170 | <Reference name="Mono.Addins.dll" /> | 170 | <Reference name="Mono.Addins" path="../../bin/"/> |
171 | <Reference name="SmartThreadPool" /> | 171 | <Reference name="SmartThreadPool"/> |
172 | <Files> | 172 | <Files> |
173 | <Match pattern="*.cs" recurse="false"/> | 173 | <Match pattern="*.cs" recurse="false"/> |
174 | <Match path="Client" pattern="*.cs" recurse="true"/> | 174 | <Match path="Client" pattern="*.cs" recurse="true"/> |
@@ -190,9 +190,9 @@ | |||
190 | <ReferencePath>../../../bin/</ReferencePath> | 190 | <ReferencePath>../../../bin/</ReferencePath> |
191 | <Reference name="System"/> | 191 | <Reference name="System"/> |
192 | <Reference name="System.Xml"/> | 192 | <Reference name="System.Xml"/> |
193 | <Reference name="log4net.dll"/> | 193 | <Reference name="log4net" path="../../../bin/"/> |
194 | <Reference name="OpenMetaverse.dll" /> | 194 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
195 | <Reference name="OpenMetaverseTypes.dll"/> | 195 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
196 | <Reference name="OpenSim.Framework"/> | 196 | <Reference name="OpenSim.Framework"/> |
197 | 197 | ||
198 | <Files> | 198 | <Files> |
@@ -216,9 +216,9 @@ | |||
216 | 216 | ||
217 | <ReferencePath>../../../bin/</ReferencePath> | 217 | <ReferencePath>../../../bin/</ReferencePath> |
218 | <Reference name="System"/> | 218 | <Reference name="System"/> |
219 | <Reference name="OpenMetaverseTypes.dll"/> | 219 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
220 | <Reference name="OpenMetaverse.dll"/> | 220 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
221 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 221 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
222 | <Reference name="OpenSim.Framework"/> | 222 | <Reference name="OpenSim.Framework"/> |
223 | 223 | ||
224 | <Files> | 224 | <Files> |
@@ -242,16 +242,16 @@ | |||
242 | <Reference name="System"/> | 242 | <Reference name="System"/> |
243 | <Reference name="System.Xml"/> | 243 | <Reference name="System.Xml"/> |
244 | <Reference name="System.Data"/> | 244 | <Reference name="System.Data"/> |
245 | <Reference name="XMLRPC.dll"/> | 245 | <Reference name="XMLRPC" path="../../bin/"/> |
246 | <Reference name="OpenMetaverse.dll"/> | 246 | <Reference name="OpenMetaverse" path="../../bin/"/> |
247 | <Reference name="OpenMetaverseTypes.dll"/> | 247 | <Reference name="OpenMetaverseTypes" path="../../bin/"/> |
248 | <Reference name="OpenSim.Framework"/> | 248 | <Reference name="OpenSim.Framework"/> |
249 | <Reference name="log4net.dll"/> | 249 | <Reference name="log4net" path="../../bin/"/> |
250 | <Reference name="Mono.Addins.dll" /> | 250 | <Reference name="Mono.Addins" path="../../bin/"/> |
251 | <Files> | 251 | <Files> |
252 | <Match pattern="*.cs" recurse="false"/> | 252 | <Match pattern="*.cs" recurse="false"/> |
253 | <Match pattern="Properties/*.cs" recurse="false"/> | 253 | <Match pattern="Properties/*.cs" recurse="false"/> |
254 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 254 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
255 | </Files> | 255 | </Files> |
256 | </Project> | 256 | </Project> |
257 | 257 | ||
@@ -270,8 +270,8 @@ | |||
270 | <ReferencePath>../../../../bin/</ReferencePath> | 270 | <ReferencePath>../../../../bin/</ReferencePath> |
271 | <Reference name="System"/> | 271 | <Reference name="System"/> |
272 | <Reference name="System.Xml"/> | 272 | <Reference name="System.Xml"/> |
273 | <Reference name="OpenMetaverseTypes.dll"/> | 273 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
274 | <Reference name="XMLRPC.dll"/> | 274 | <Reference name="XMLRPC" path="../../../../bin/"/> |
275 | <Reference name="OpenSim.Framework"/> | 275 | <Reference name="OpenSim.Framework"/> |
276 | <Reference name="OpenSim.Framework.Console"/> | 276 | <Reference name="OpenSim.Framework.Console"/> |
277 | <Reference name="OpenSim.Data"/> | 277 | <Reference name="OpenSim.Data"/> |
@@ -295,13 +295,13 @@ | |||
295 | <ReferencePath>../../../../bin/</ReferencePath> | 295 | <ReferencePath>../../../../bin/</ReferencePath> |
296 | <Reference name="System"/> | 296 | <Reference name="System"/> |
297 | <Reference name="System.Xml"/> | 297 | <Reference name="System.Xml"/> |
298 | <Reference name="OpenMetaverseTypes.dll"/> | 298 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
299 | <Reference name="XMLRPC.dll"/> | 299 | <Reference name="XMLRPC" path="../../../../bin/"/> |
300 | <Reference name="OpenSim.Framework"/> | 300 | <Reference name="OpenSim.Framework"/> |
301 | <Reference name="OpenSim.Framework.Console"/> | 301 | <Reference name="OpenSim.Framework.Console"/> |
302 | <Reference name="OpenSim.Framework.Configuration.XML"/> | 302 | <Reference name="OpenSim.Framework.Configuration.XML"/> |
303 | <Reference name="OpenSim.Data"/> | 303 | <Reference name="OpenSim.Data"/> |
304 | <Reference name="log4net.dll"/> | 304 | <Reference name="log4net" path="../../../../bin/"/> |
305 | <Files> | 305 | <Files> |
306 | <Match pattern="*.cs" recurse="true"/> | 306 | <Match pattern="*.cs" recurse="true"/> |
307 | </Files> | 307 | </Files> |
@@ -324,9 +324,9 @@ | |||
324 | <Reference name="System.Xml"/> | 324 | <Reference name="System.Xml"/> |
325 | <Reference name="OpenSim.Framework.Console"/> | 325 | <Reference name="OpenSim.Framework.Console"/> |
326 | <Reference name="OpenSim.Framework"/> | 326 | <Reference name="OpenSim.Framework"/> |
327 | <Reference name="OpenMetaverseTypes.dll"/> | 327 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
328 | <Reference name="Nini.dll" /> | 328 | <Reference name="Nini" path="../../../../bin/"/> |
329 | <Reference name="log4net.dll"/> | 329 | <Reference name="log4net" path="../../../../bin/"/> |
330 | <Files> | 330 | <Files> |
331 | <Match pattern="*.cs" recurse="true"/> | 331 | <Match pattern="*.cs" recurse="true"/> |
332 | </Files> | 332 | </Files> |
@@ -347,12 +347,12 @@ | |||
347 | <ReferencePath>../../../../bin/</ReferencePath> | 347 | <ReferencePath>../../../../bin/</ReferencePath> |
348 | <Reference name="System"/> | 348 | <Reference name="System"/> |
349 | <Reference name="System.Xml"/> | 349 | <Reference name="System.Xml"/> |
350 | <Reference name="OpenMetaverseTypes.dll"/> | 350 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
351 | <Reference name="XMLRPC.dll"/> | 351 | <Reference name="XMLRPC" path="../../../../bin/"/> |
352 | <Reference name="OpenSim.Framework"/> | 352 | <Reference name="OpenSim.Framework"/> |
353 | <Reference name="OpenSim.Framework.Console"/> | 353 | <Reference name="OpenSim.Framework.Console"/> |
354 | <Reference name="Nini.dll" /> | 354 | <Reference name="Nini" path="../../../../bin/"/> |
355 | <Reference name="log4net.dll"/> | 355 | <Reference name="log4net" path="../../../../bin/"/> |
356 | <Files> | 356 | <Files> |
357 | <Match pattern="*.cs" recurse="true"/> | 357 | <Match pattern="*.cs" recurse="true"/> |
358 | </Files> | 358 | </Files> |
@@ -373,11 +373,11 @@ | |||
373 | <ReferencePath>../../../../bin/</ReferencePath> | 373 | <ReferencePath>../../../../bin/</ReferencePath> |
374 | <Reference name="System"/> | 374 | <Reference name="System"/> |
375 | <Reference name="System.Xml"/> | 375 | <Reference name="System.Xml"/> |
376 | <Reference name="OpenMetaverseTypes.dll"/> | 376 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
377 | <Reference name="XMLRPC.dll"/> | 377 | <Reference name="XMLRPC" path="../../../../bin/"/> |
378 | <Reference name="OpenSim.Framework"/> | 378 | <Reference name="OpenSim.Framework"/> |
379 | <Reference name="OpenSim.Framework.Console"/> | 379 | <Reference name="OpenSim.Framework.Console"/> |
380 | <Reference name="Nini.dll" /> | 380 | <Reference name="Nini" path="../../../../bin/"/> |
381 | <Files> | 381 | <Files> |
382 | <Match pattern="*.cs" recurse="true"/> | 382 | <Match pattern="*.cs" recurse="true"/> |
383 | </Files> | 383 | </Files> |
@@ -403,11 +403,11 @@ | |||
403 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 403 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
404 | <Reference name="OpenSim.Framework.Console"/> | 404 | <Reference name="OpenSim.Framework.Console"/> |
405 | <Reference name="OpenSim.Framework.Statistics"/> | 405 | <Reference name="OpenSim.Framework.Statistics"/> |
406 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 406 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
407 | <Reference name="OpenMetaverseTypes.dll"/> | 407 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
408 | <Reference name="XMLRPC.dll"/> | 408 | <Reference name="XMLRPC" path="../../../bin/"/> |
409 | <Reference name="log4net.dll"/> | 409 | <Reference name="log4net" path="../../../bin/"/> |
410 | <Reference name="HttpServer_OpenSim.dll"/> | 410 | <Reference name="HttpServer_OpenSim" path="../../../bin/"/> |
411 | 411 | ||
412 | <Files> | 412 | <Files> |
413 | <Match pattern="*.cs" recurse="false"> | 413 | <Match pattern="*.cs" recurse="false"> |
@@ -429,13 +429,13 @@ | |||
429 | 429 | ||
430 | <ReferencePath>../../../../bin/</ReferencePath> | 430 | <ReferencePath>../../../../bin/</ReferencePath> |
431 | <Reference name="System"/> | 431 | <Reference name="System"/> |
432 | <Reference name="System.Xml" /> | 432 | <Reference name="System.Xml"/> |
433 | <Reference name="OpenMetaverseTypes.dll"/> | 433 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
434 | <Reference name="OpenSim.Framework"/> | 434 | <Reference name="OpenSim.Framework"/> |
435 | <Reference name="OpenSim.Framework.Console"/> | 435 | <Reference name="OpenSim.Framework.Console"/> |
436 | <Reference name="nunit.framework.dll" /> | 436 | <Reference name="nunit.framework" path="../../../../bin/"/> |
437 | <Reference name="Nini.dll" /> | 437 | <Reference name="Nini" path="../../../../bin/"/> |
438 | <Reference name="log4net.dll"/> | 438 | <Reference name="log4net" path="../../../../bin/"/> |
439 | 439 | ||
440 | <Files> | 440 | <Files> |
441 | <Match pattern="*.cs" recurse="false"/> | 441 | <Match pattern="*.cs" recurse="false"/> |
@@ -457,8 +457,8 @@ | |||
457 | 457 | ||
458 | <ReferencePath>../../../../bin/</ReferencePath> | 458 | <ReferencePath>../../../../bin/</ReferencePath> |
459 | <Reference name="System"/> | 459 | <Reference name="System"/> |
460 | <Reference name="OpenMetaverseTypes.dll"/> | 460 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
461 | <Reference name="Nini.dll" /> | 461 | <Reference name="Nini" path="../../../../bin/"/> |
462 | <Reference name="OpenSim.Framework"/> | 462 | <Reference name="OpenSim.Framework"/> |
463 | <Reference name="OpenSim.Region.Physics.Manager"/> | 463 | <Reference name="OpenSim.Region.Physics.Manager"/> |
464 | <Files> | 464 | <Files> |
@@ -480,8 +480,8 @@ | |||
480 | 480 | ||
481 | <ReferencePath>../../../../bin/</ReferencePath> | 481 | <ReferencePath>../../../../bin/</ReferencePath> |
482 | <Reference name="System"/> | 482 | <Reference name="System"/> |
483 | <Reference name="OpenMetaverseTypes.dll"/> | 483 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
484 | <Reference name="Nini.dll" /> | 484 | <Reference name="Nini" path="../../../../bin/"/> |
485 | <Reference name="OpenSim.Framework"/> | 485 | <Reference name="OpenSim.Framework"/> |
486 | <Reference name="OpenSim.Region.Physics.Manager"/> | 486 | <Reference name="OpenSim.Region.Physics.Manager"/> |
487 | <Files> | 487 | <Files> |
@@ -503,12 +503,12 @@ | |||
503 | 503 | ||
504 | <ReferencePath>../../../../bin/</ReferencePath> | 504 | <ReferencePath>../../../../bin/</ReferencePath> |
505 | <Reference name="System"/> | 505 | <Reference name="System"/> |
506 | <Reference name="OpenMetaverseTypes.dll"/> | 506 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
507 | <Reference name="Nini.dll" /> | 507 | <Reference name="Nini" path="../../../../bin/"/> |
508 | <Reference name="PhysX_Wrapper_Dotnet.dll"/> | 508 | <Reference name="PhysX_Wrapper_Dotnet" path="../../../../bin/"/> |
509 | <Reference name="OpenSim.Framework"/> | 509 | <Reference name="OpenSim.Framework"/> |
510 | <Reference name="OpenSim.Region.Physics.Manager"/> | 510 | <Reference name="OpenSim.Region.Physics.Manager"/> |
511 | <Reference name="log4net.dll"/> | 511 | <Reference name="log4net" path="../../../../bin/"/> |
512 | <Files> | 512 | <Files> |
513 | <Match pattern="*.cs" recurse="true"/> | 513 | <Match pattern="*.cs" recurse="true"/> |
514 | </Files> | 514 | </Files> |
@@ -529,13 +529,13 @@ | |||
529 | <ReferencePath>../../../../bin/</ReferencePath> | 529 | <ReferencePath>../../../../bin/</ReferencePath> |
530 | <Reference name="System"/> | 530 | <Reference name="System"/> |
531 | <Reference name="System.Core"/> | 531 | <Reference name="System.Core"/> |
532 | <Reference name="OpenMetaverseTypes.dll"/> | 532 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
533 | <Reference name="Nini.dll" /> | 533 | <Reference name="Nini" path="../../../../bin/"/> |
534 | <Reference name="OpenSim.Framework"/> | 534 | <Reference name="OpenSim.Framework"/> |
535 | <Reference name="OpenSim.Framework.Console"/> | 535 | <Reference name="OpenSim.Framework.Console"/> |
536 | <Reference name="OpenSim.Region.Physics.Manager"/> | 536 | <Reference name="OpenSim.Region.Physics.Manager"/> |
537 | <Reference name="Ode.NET.dll" /> | 537 | <Reference name="Ode.NET" path="../../../../bin/"/> |
538 | <Reference name="log4net.dll"/> | 538 | <Reference name="log4net" path="../../../../bin/"/> |
539 | 539 | ||
540 | <Files> | 540 | <Files> |
541 | <Match pattern="*.cs" recurse="true"> | 541 | <Match pattern="*.cs" recurse="true"> |
@@ -558,14 +558,14 @@ | |||
558 | 558 | ||
559 | <ReferencePath>../../../../bin/</ReferencePath> | 559 | <ReferencePath>../../../../bin/</ReferencePath> |
560 | <Reference name="System"/> | 560 | <Reference name="System"/> |
561 | <Reference name="OpenMetaverseTypes.dll"/> | 561 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
562 | <Reference name="Nini.dll" /> | 562 | <Reference name="Nini" path="../../../../bin/"/> |
563 | <Reference name="OpenSim.Framework"/> | 563 | <Reference name="OpenSim.Framework"/> |
564 | <Reference name="OpenSim.Framework.Console"/> | 564 | <Reference name="OpenSim.Framework.Console"/> |
565 | <Reference name="OpenSim.Region.Physics.Manager"/> | 565 | <Reference name="OpenSim.Region.Physics.Manager"/> |
566 | <Reference name="MonoXnaCompactMaths.dll"/> | 566 | <Reference name="MonoXnaCompactMaths" path="../../../../bin/"/> |
567 | <Reference name="Modified.XnaDevRu.BulletX.dll" /> | 567 | <Reference name="Modified.XnaDevRu.BulletX" path="../../../../bin/"/> |
568 | <Reference name="log4net.dll"/> | 568 | <Reference name="log4net" path="../../../../bin/"/> |
569 | 569 | ||
570 | <Files> | 570 | <Files> |
571 | <Match pattern="*.cs" recurse="true"/> | 571 | <Match pattern="*.cs" recurse="true"/> |
@@ -587,14 +587,14 @@ | |||
587 | <ReferencePath>../../../../bin/</ReferencePath> | 587 | <ReferencePath>../../../../bin/</ReferencePath> |
588 | <Reference name="System"/> | 588 | <Reference name="System"/> |
589 | <Reference name="System.Drawing"/> | 589 | <Reference name="System.Drawing"/> |
590 | <Reference name="CSJ2K.dll"/> | 590 | <Reference name="CSJ2K" path="../../../../bin/"/> |
591 | <Reference name="OpenMetaverseTypes.dll"/> | 591 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
592 | <Reference name="OpenMetaverse.dll"/> | 592 | <Reference name="OpenMetaverse" path="../../../../bin/"/> |
593 | <Reference name="Nini.dll" /> | 593 | <Reference name="Nini" path="../../../../bin/"/> |
594 | <Reference name="OpenSim.Framework"/> | 594 | <Reference name="OpenSim.Framework"/> |
595 | <Reference name="OpenSim.Framework.Console"/> | 595 | <Reference name="OpenSim.Framework.Console"/> |
596 | <Reference name="OpenSim.Region.Physics.Manager"/> | 596 | <Reference name="OpenSim.Region.Physics.Manager"/> |
597 | <Reference name="log4net.dll"/> | 597 | <Reference name="log4net" path="../../../../bin/"/> |
598 | 598 | ||
599 | <Files> | 599 | <Files> |
600 | <Match pattern="*.cs" recurse="true"/> | 600 | <Match pattern="*.cs" recurse="true"/> |
@@ -615,14 +615,14 @@ | |||
615 | 615 | ||
616 | <ReferencePath>../../../../bin/</ReferencePath> | 616 | <ReferencePath>../../../../bin/</ReferencePath> |
617 | <Reference name="System"/> | 617 | <Reference name="System"/> |
618 | <Reference name="OpenMetaverseTypes.dll"/> | 618 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
619 | <Reference name="Nini.dll" /> | 619 | <Reference name="Nini" path="../../../../bin/"/> |
620 | <Reference name="OpenSim.Framework"/> | 620 | <Reference name="OpenSim.Framework"/> |
621 | <Reference name="OpenSim.Framework.Console"/> | 621 | <Reference name="OpenSim.Framework.Console"/> |
622 | <Reference name="OpenSim.Region.Physics.Manager"/> | 622 | <Reference name="OpenSim.Region.Physics.Manager"/> |
623 | <Reference name="BulletDotNET.dll" /> | 623 | <Reference name="BulletDotNET" path="../../../../bin/"/> |
624 | <Reference name="nunit.framework.dll" /> | 624 | <Reference name="nunit.framework" path="../../../../bin/"/> |
625 | <Reference name="log4net.dll"/> | 625 | <Reference name="log4net" path="../../../../bin/"/> |
626 | 626 | ||
627 | <Files> | 627 | <Files> |
628 | <Match pattern="*.cs" recurse="true"/> | 628 | <Match pattern="*.cs" recurse="true"/> |
@@ -643,14 +643,14 @@ | |||
643 | 643 | ||
644 | <ReferencePath>../../../bin/</ReferencePath> | 644 | <ReferencePath>../../../bin/</ReferencePath> |
645 | <Reference name="System"/> | 645 | <Reference name="System"/> |
646 | <Reference name="OpenMetaverseTypes.dll"/> | 646 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
647 | <Reference name="OpenMetaverse.dll"/> | 647 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
648 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 648 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
649 | <Reference name="OpenSim.Framework"/> | 649 | <Reference name="OpenSim.Framework"/> |
650 | <Reference name="OpenSim.Framework.Console"/> | 650 | <Reference name="OpenSim.Framework.Console"/> |
651 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 651 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
652 | <Reference name="Nini.dll" /> | 652 | <Reference name="Nini" path="../../../bin/"/> |
653 | <Reference name="log4net.dll"/> | 653 | <Reference name="log4net" path="../../../bin/"/> |
654 | 654 | ||
655 | <Files> | 655 | <Files> |
656 | <Match pattern="*.cs" recurse="true"/> | 656 | <Match pattern="*.cs" recurse="true"/> |
@@ -679,16 +679,16 @@ | |||
679 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 679 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
680 | <Reference name="OpenSim.Framework.Statistics"/> | 680 | <Reference name="OpenSim.Framework.Statistics"/> |
681 | <Reference name="OpenSim.Services.Interfaces"/> | 681 | <Reference name="OpenSim.Services.Interfaces"/> |
682 | <Reference name="OpenMetaverseTypes.dll"/> | 682 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
683 | <!-- FIXME: The OpenMetaverse.dll reference can be dropped when the TransferRequestPacket reference is removed from the code --> | 683 | <!-- FIXME: The OpenMetaverse.dll reference can be dropped when the TransferRequestPacket reference is removed from the code --> |
684 | <Reference name="Nini.dll" /> | 684 | <Reference name="Nini" path="../../../bin/"/> |
685 | <Reference name="log4net.dll"/> | 685 | <Reference name="log4net" path="../../../bin/"/> |
686 | 686 | ||
687 | <Files> | 687 | <Files> |
688 | <Match pattern="*.cs" recurse="true"> | 688 | <Match pattern="*.cs" recurse="true"> |
689 | <Exclude name="Tests" pattern="Tests"/> | 689 | <Exclude name="Tests" pattern="Tests"/> |
690 | </Match> | 690 | </Match> |
691 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 691 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
692 | </Files> | 692 | </Files> |
693 | </Project> | 693 | </Project> |
694 | 694 | ||
@@ -710,26 +710,26 @@ | |||
710 | <Reference name="System.Web"/> | 710 | <Reference name="System.Web"/> |
711 | <Reference name="OpenSim.Framework"/> | 711 | <Reference name="OpenSim.Framework"/> |
712 | <Reference name="OpenSim.Framework.AssetLoader.Filesystem"/> | 712 | <Reference name="OpenSim.Framework.AssetLoader.Filesystem"/> |
713 | <Reference name="OpenSim.Data" /> | 713 | <Reference name="OpenSim.Data"/> |
714 | <Reference name="OpenSim.Framework.Capabilities"/> | 714 | <Reference name="OpenSim.Framework.Capabilities"/> |
715 | <Reference name="OpenSim.Framework.Servers"/> | 715 | <Reference name="OpenSim.Framework.Servers"/> |
716 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 716 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
717 | <Reference name="OpenSim.Framework.Console"/> | 717 | <Reference name="OpenSim.Framework.Console"/> |
718 | <Reference name="OpenSim.Framework.Statistics"/> | 718 | <Reference name="OpenSim.Framework.Statistics"/> |
719 | <Reference name="OpenSim.Services.Interfaces"/> | 719 | <Reference name="OpenSim.Services.Interfaces"/> |
720 | <Reference name="OpenMetaverseTypes.dll"/> | 720 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
721 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 721 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
722 | <!-- FIXME: The OpenMetaverse.dll reference can be dropped when the TransferRequestPacket reference is removed from the code --> | 722 | <!-- FIXME: The OpenMetaverse.dll reference can be dropped when the TransferRequestPacket reference is removed from the code --> |
723 | <Reference name="OpenMetaverse.dll"/> | 723 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
724 | <Reference name="Nini.dll" /> | 724 | <Reference name="Nini" path="../../../bin/"/> |
725 | <Reference name="XMLRPC.dll"/> | 725 | <Reference name="XMLRPC" path="../../../bin/"/> |
726 | <Reference name="log4net.dll"/> | 726 | <Reference name="log4net" path="../../../bin/"/> |
727 | 727 | ||
728 | <Files> | 728 | <Files> |
729 | <Match pattern="*.cs" recurse="true"> | 729 | <Match pattern="*.cs" recurse="true"> |
730 | <Exclude name="Tests" pattern="Tests"/> | 730 | <Exclude name="Tests" pattern="Tests"/> |
731 | </Match> | 731 | </Match> |
732 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 732 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
733 | </Files> | 733 | </Files> |
734 | </Project> | 734 | </Project> |
735 | 735 | ||
@@ -752,14 +752,14 @@ | |||
752 | <Reference name="System.Xml"/> | 752 | <Reference name="System.Xml"/> |
753 | <Reference name="System.Drawing"/> | 753 | <Reference name="System.Drawing"/> |
754 | <Reference name="System.Web"/> | 754 | <Reference name="System.Web"/> |
755 | <Reference name="OpenMetaverseTypes.dll"/> | 755 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
756 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 756 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
757 | <Reference name="OpenMetaverse.dll"/> | 757 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
758 | <Reference name="OpenSim.Services.Interfaces"/> | 758 | <Reference name="OpenSim.Services.Interfaces"/> |
759 | <Reference name="OpenSim.Framework"/> | 759 | <Reference name="OpenSim.Framework"/> |
760 | <Reference name="OpenSim.Framework.Capabilities"/> | 760 | <Reference name="OpenSim.Framework.Capabilities"/> |
761 | <Reference name="OpenSim.Framework.Communications"/> | 761 | <Reference name="OpenSim.Framework.Communications"/> |
762 | <Reference name="OpenSim.Data" /> | 762 | <Reference name="OpenSim.Data"/> |
763 | <Reference name="OpenSim.Framework.Console"/> | 763 | <Reference name="OpenSim.Framework.Console"/> |
764 | <Reference name="OpenSim.Framework.Servers"/> | 764 | <Reference name="OpenSim.Framework.Servers"/> |
765 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 765 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
@@ -767,16 +767,16 @@ | |||
767 | <Reference name="OpenSim.Region.Physics.Manager"/> | 767 | <Reference name="OpenSim.Region.Physics.Manager"/> |
768 | 768 | ||
769 | <!-- For scripting in funny languages by default --> | 769 | <!-- For scripting in funny languages by default --> |
770 | <Reference name="XMLRPC.dll"/> | 770 | <Reference name="XMLRPC" path="../../../bin/"/> |
771 | <Reference name="OpenSim.Framework.Communications"/> | 771 | <Reference name="OpenSim.Framework.Communications"/> |
772 | <Reference name="Nini.dll" /> | 772 | <Reference name="Nini" path="../../../bin/"/> |
773 | <Reference name="log4net.dll"/> | 773 | <Reference name="log4net" path="../../../bin/"/> |
774 | <Reference name="DotNetOpenMail.dll"/> | 774 | <Reference name="DotNetOpenMail" path="../../../bin/"/> |
775 | <Reference name="Mono.Addins.dll"/> | 775 | <Reference name="Mono.Addins" path="../../../bin/"/> |
776 | 776 | ||
777 | <Files> | 777 | <Files> |
778 | <Match pattern="*.cs" recurse="true"> | 778 | <Match pattern="*.cs" recurse="true"> |
779 | <Exclude name="Tests" pattern="Tests" /> | 779 | <Exclude name="Tests" pattern="Tests"/> |
780 | </Match> | 780 | </Match> |
781 | </Files> | 781 | </Files> |
782 | </Project> | 782 | </Project> |
@@ -802,13 +802,13 @@ | |||
802 | <Reference name="System"/> | 802 | <Reference name="System"/> |
803 | <Reference name="System.Xml"/> | 803 | <Reference name="System.Xml"/> |
804 | <Reference name="System.Web"/> | 804 | <Reference name="System.Web"/> |
805 | <Reference name="OpenMetaverseTypes.dll"/> | 805 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
806 | <Reference name="OpenMetaverse.dll"/> | 806 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
807 | <Reference name="OpenSim.Framework"/> | 807 | <Reference name="OpenSim.Framework"/> |
808 | <Reference name="OpenSim.Framework.Console"/> | 808 | <Reference name="OpenSim.Framework.Console"/> |
809 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 809 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
810 | <Reference name="Nini.dll" /> | 810 | <Reference name="Nini" path="../../../bin/"/> |
811 | <Reference name="log4net.dll"/> | 811 | <Reference name="log4net" path="../../../bin/"/> |
812 | 812 | ||
813 | <Files> | 813 | <Files> |
814 | <Match pattern="*.cs" recurse="true"/> | 814 | <Match pattern="*.cs" recurse="true"/> |
@@ -829,13 +829,13 @@ | |||
829 | 829 | ||
830 | <ReferencePath>../../../bin/</ReferencePath> | 830 | <ReferencePath>../../../bin/</ReferencePath> |
831 | <Reference name="System"/> | 831 | <Reference name="System"/> |
832 | <Reference name="OpenMetaverseTypes.dll"/> | 832 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
833 | <Reference name="OpenMetaverse.dll"/> | 833 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
834 | <Reference name="OpenSim.Framework"/> | 834 | <Reference name="OpenSim.Framework"/> |
835 | <Reference name="OpenSim.Framework.Console"/> | 835 | <Reference name="OpenSim.Framework.Console"/> |
836 | <Reference name="OpenSim.Services.Interfaces"/> | 836 | <Reference name="OpenSim.Services.Interfaces"/> |
837 | <Reference name="Nini.dll" /> | 837 | <Reference name="Nini" path="../../../bin/"/> |
838 | <Reference name="log4net.dll"/> | 838 | <Reference name="log4net" path="../../../bin/"/> |
839 | 839 | ||
840 | <Files> | 840 | <Files> |
841 | <Match pattern="*.cs" recurse="true"/> | 841 | <Match pattern="*.cs" recurse="true"/> |
@@ -857,16 +857,16 @@ | |||
857 | <ReferencePath>../../../bin/</ReferencePath> | 857 | <ReferencePath>../../../bin/</ReferencePath> |
858 | <Reference name="System"/> | 858 | <Reference name="System"/> |
859 | <Reference name="System.Web"/> | 859 | <Reference name="System.Web"/> |
860 | <Reference name="OpenMetaverseTypes.dll"/> | 860 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
861 | <Reference name="OpenMetaverse.dll"/> | 861 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
862 | <Reference name="OpenSim.Framework"/> | 862 | <Reference name="OpenSim.Framework"/> |
863 | <Reference name="OpenSim.Framework.Console"/> | 863 | <Reference name="OpenSim.Framework.Console"/> |
864 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 864 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
865 | <Reference name="OpenSim.Services.Interfaces"/> | 865 | <Reference name="OpenSim.Services.Interfaces"/> |
866 | <Reference name="OpenSim.Services.Base"/> | 866 | <Reference name="OpenSim.Services.Base"/> |
867 | <Reference name="OpenSim.Data"/> | 867 | <Reference name="OpenSim.Data"/> |
868 | <Reference name="Nini.dll" /> | 868 | <Reference name="Nini" path="../../../bin/"/> |
869 | <Reference name="log4net.dll"/> | 869 | <Reference name="log4net" path="../../../bin/"/> |
870 | 870 | ||
871 | <Files> | 871 | <Files> |
872 | <Match pattern="*.cs" recurse="true"/> | 872 | <Match pattern="*.cs" recurse="true"/> |
@@ -888,16 +888,16 @@ | |||
888 | <ReferencePath>../../../bin/</ReferencePath> | 888 | <ReferencePath>../../../bin/</ReferencePath> |
889 | <Reference name="System"/> | 889 | <Reference name="System"/> |
890 | <Reference name="System.Web"/> | 890 | <Reference name="System.Web"/> |
891 | <Reference name="OpenMetaverseTypes.dll"/> | 891 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
892 | <Reference name="OpenMetaverse.dll"/> | 892 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
893 | <Reference name="OpenSim.Framework"/> | 893 | <Reference name="OpenSim.Framework"/> |
894 | <Reference name="OpenSim.Framework.Console"/> | 894 | <Reference name="OpenSim.Framework.Console"/> |
895 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 895 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
896 | <Reference name="OpenSim.Services.Interfaces"/> | 896 | <Reference name="OpenSim.Services.Interfaces"/> |
897 | <Reference name="OpenSim.Services.Base"/> | 897 | <Reference name="OpenSim.Services.Base"/> |
898 | <Reference name="OpenSim.Data"/> | 898 | <Reference name="OpenSim.Data"/> |
899 | <Reference name="Nini.dll" /> | 899 | <Reference name="Nini" path="../../../bin/"/> |
900 | <Reference name="log4net.dll"/> | 900 | <Reference name="log4net" path="../../../bin/"/> |
901 | 901 | ||
902 | <Files> | 902 | <Files> |
903 | <Match pattern="*.cs" recurse="true"/> | 903 | <Match pattern="*.cs" recurse="true"/> |
@@ -918,11 +918,12 @@ | |||
918 | 918 | ||
919 | <ReferencePath>../../../bin/</ReferencePath> | 919 | <ReferencePath>../../../bin/</ReferencePath> |
920 | <Reference name="System"/> | 920 | <Reference name="System"/> |
921 | <Reference name="System.Core"/> | ||
921 | <Reference name="System.Xml"/> | 922 | <Reference name="System.Xml"/> |
922 | <Reference name="System.Drawing"/> | 923 | <Reference name="System.Drawing"/> |
923 | <Reference name="OpenMetaverseTypes.dll"/> | 924 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
924 | <Reference name="OpenMetaverse.dll"/> | 925 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
925 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 926 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
926 | <Reference name="OpenSim.Services.Interfaces"/> | 927 | <Reference name="OpenSim.Services.Interfaces"/> |
927 | <Reference name="OpenSim.Framework"/> | 928 | <Reference name="OpenSim.Framework"/> |
928 | <Reference name="OpenSim.Framework.Communications"/> | 929 | <Reference name="OpenSim.Framework.Communications"/> |
@@ -930,10 +931,10 @@ | |||
930 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 931 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
931 | <Reference name="OpenSim.Region.Framework"/> | 932 | <Reference name="OpenSim.Region.Framework"/> |
932 | <Reference name="OpenSim.Server.Base"/> | 933 | <Reference name="OpenSim.Server.Base"/> |
933 | <Reference name="Mono.Addins" /> | 934 | <Reference name="Mono.Addins" path="../../../bin/"/> |
934 | <Reference name="Nini.dll" /> | 935 | <Reference name="Nini" path="../../../bin/"/> |
935 | <Reference name="log4net.dll"/> | 936 | <Reference name="log4net" path="../../../bin/"/> |
936 | <Reference name="XMLRPC.dll" /> | 937 | <Reference name="XMLRPC" path="../../../bin/"/> |
937 | 938 | ||
938 | <Files> | 939 | <Files> |
939 | <Match pattern="*.cs" recurse="true"/> | 940 | <Match pattern="*.cs" recurse="true"/> |
@@ -954,8 +955,8 @@ | |||
954 | 955 | ||
955 | <ReferencePath>../../../bin/</ReferencePath> | 956 | <ReferencePath>../../../bin/</ReferencePath> |
956 | <Reference name="System"/> | 957 | <Reference name="System"/> |
957 | <Reference name="OpenMetaverseTypes.dll"/> | 958 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
958 | <Reference name="OpenMetaverse.dll"/> | 959 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
959 | <Reference name="OpenSim.Framework"/> | 960 | <Reference name="OpenSim.Framework"/> |
960 | <Reference name="OpenSim.Framework.Console"/> | 961 | <Reference name="OpenSim.Framework.Console"/> |
961 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 962 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
@@ -963,8 +964,8 @@ | |||
963 | <Reference name="OpenSim.Services.Base"/> | 964 | <Reference name="OpenSim.Services.Base"/> |
964 | <Reference name="OpenSim.Services.Connectors"/> | 965 | <Reference name="OpenSim.Services.Connectors"/> |
965 | <Reference name="OpenSim.Data"/> | 966 | <Reference name="OpenSim.Data"/> |
966 | <Reference name="Nini.dll" /> | 967 | <Reference name="Nini" path="../../../bin/"/> |
967 | <Reference name="log4net.dll"/> | 968 | <Reference name="log4net" path="../../../bin/"/> |
968 | 969 | ||
969 | <Files> | 970 | <Files> |
970 | <Match pattern="*.cs" recurse="true"/> | 971 | <Match pattern="*.cs" recurse="true"/> |
@@ -985,8 +986,8 @@ | |||
985 | 986 | ||
986 | <ReferencePath>../../../bin/</ReferencePath> | 987 | <ReferencePath>../../../bin/</ReferencePath> |
987 | <Reference name="System"/> | 988 | <Reference name="System"/> |
988 | <Reference name="OpenMetaverseTypes.dll"/> | 989 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
989 | <Reference name="OpenMetaverse.dll"/> | 990 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
990 | <Reference name="OpenSim.Framework"/> | 991 | <Reference name="OpenSim.Framework"/> |
991 | <Reference name="OpenSim.Framework.Console"/> | 992 | <Reference name="OpenSim.Framework.Console"/> |
992 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 993 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
@@ -994,8 +995,8 @@ | |||
994 | <Reference name="OpenSim.Services.Base"/> | 995 | <Reference name="OpenSim.Services.Base"/> |
995 | <Reference name="OpenSim.Services.Connectors"/> | 996 | <Reference name="OpenSim.Services.Connectors"/> |
996 | <Reference name="OpenSim.Data"/> | 997 | <Reference name="OpenSim.Data"/> |
997 | <Reference name="Nini.dll" /> | 998 | <Reference name="Nini" path="../../../bin/"/> |
998 | <Reference name="log4net.dll"/> | 999 | <Reference name="log4net" path="../../../bin/"/> |
999 | 1000 | ||
1000 | <Files> | 1001 | <Files> |
1001 | <Match pattern="*.cs" recurse="true"/> | 1002 | <Match pattern="*.cs" recurse="true"/> |
@@ -1016,8 +1017,8 @@ | |||
1016 | 1017 | ||
1017 | <ReferencePath>../../../bin/</ReferencePath> | 1018 | <ReferencePath>../../../bin/</ReferencePath> |
1018 | <Reference name="System"/> | 1019 | <Reference name="System"/> |
1019 | <Reference name="OpenMetaverseTypes.dll"/> | 1020 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1020 | <Reference name="OpenMetaverse.dll"/> | 1021 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1021 | <Reference name="OpenSim.Framework"/> | 1022 | <Reference name="OpenSim.Framework"/> |
1022 | <Reference name="OpenSim.Framework.Console"/> | 1023 | <Reference name="OpenSim.Framework.Console"/> |
1023 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1024 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
@@ -1025,8 +1026,8 @@ | |||
1025 | <Reference name="OpenSim.Services.Base"/> | 1026 | <Reference name="OpenSim.Services.Base"/> |
1026 | <Reference name="OpenSim.Services.Connectors"/> | 1027 | <Reference name="OpenSim.Services.Connectors"/> |
1027 | <Reference name="OpenSim.Data"/> | 1028 | <Reference name="OpenSim.Data"/> |
1028 | <Reference name="Nini.dll" /> | 1029 | <Reference name="Nini" path="../../../bin/"/> |
1029 | <Reference name="log4net.dll"/> | 1030 | <Reference name="log4net" path="../../../bin/"/> |
1030 | 1031 | ||
1031 | <Files> | 1032 | <Files> |
1032 | <Match pattern="*.cs" recurse="true"/> | 1033 | <Match pattern="*.cs" recurse="true"/> |
@@ -1047,8 +1048,8 @@ | |||
1047 | 1048 | ||
1048 | <ReferencePath>../../../bin/</ReferencePath> | 1049 | <ReferencePath>../../../bin/</ReferencePath> |
1049 | <Reference name="System"/> | 1050 | <Reference name="System"/> |
1050 | <Reference name="OpenMetaverseTypes.dll"/> | 1051 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1051 | <Reference name="OpenMetaverse.dll"/> | 1052 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1052 | <Reference name="OpenSim.Framework"/> | 1053 | <Reference name="OpenSim.Framework"/> |
1053 | <Reference name="OpenSim.Framework.Console"/> | 1054 | <Reference name="OpenSim.Framework.Console"/> |
1054 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1055 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
@@ -1056,8 +1057,8 @@ | |||
1056 | <Reference name="OpenSim.Services.Base"/> | 1057 | <Reference name="OpenSim.Services.Base"/> |
1057 | <Reference name="OpenSim.Services.Connectors"/> | 1058 | <Reference name="OpenSim.Services.Connectors"/> |
1058 | <Reference name="OpenSim.Data"/> | 1059 | <Reference name="OpenSim.Data"/> |
1059 | <Reference name="Nini.dll" /> | 1060 | <Reference name="Nini" path="../../../bin/"/> |
1060 | <Reference name="log4net.dll"/> | 1061 | <Reference name="log4net" path="../../../bin/"/> |
1061 | 1062 | ||
1062 | <Files> | 1063 | <Files> |
1063 | <Match pattern="*.cs" recurse="true"/> | 1064 | <Match pattern="*.cs" recurse="true"/> |
@@ -1079,8 +1080,8 @@ | |||
1079 | <ReferencePath>../../../bin/</ReferencePath> | 1080 | <ReferencePath>../../../bin/</ReferencePath> |
1080 | <Reference name="System"/> | 1081 | <Reference name="System"/> |
1081 | <Reference name="System.Xml"/> | 1082 | <Reference name="System.Xml"/> |
1082 | <Reference name="OpenMetaverseTypes.dll"/> | 1083 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1083 | <Reference name="OpenMetaverse.dll"/> | 1084 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1084 | <Reference name="OpenSim.Framework"/> | 1085 | <Reference name="OpenSim.Framework"/> |
1085 | <Reference name="OpenSim.Framework.Console"/> | 1086 | <Reference name="OpenSim.Framework.Console"/> |
1086 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1087 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
@@ -1089,8 +1090,8 @@ | |||
1089 | <Reference name="OpenSim.Services.Connectors"/> | 1090 | <Reference name="OpenSim.Services.Connectors"/> |
1090 | <Reference name="OpenSim.Data"/> | 1091 | <Reference name="OpenSim.Data"/> |
1091 | <Reference name="OpenSim.Server.Base"/> | 1092 | <Reference name="OpenSim.Server.Base"/> |
1092 | <Reference name="Nini.dll" /> | 1093 | <Reference name="Nini" path="../../../bin/"/> |
1093 | <Reference name="log4net.dll"/> | 1094 | <Reference name="log4net" path="../../../bin/"/> |
1094 | 1095 | ||
1095 | <Files> | 1096 | <Files> |
1096 | <Match pattern="*.cs" recurse="true"/> | 1097 | <Match pattern="*.cs" recurse="true"/> |
@@ -1111,8 +1112,8 @@ | |||
1111 | 1112 | ||
1112 | <ReferencePath>../../../bin/</ReferencePath> | 1113 | <ReferencePath>../../../bin/</ReferencePath> |
1113 | <Reference name="System"/> | 1114 | <Reference name="System"/> |
1114 | <Reference name="OpenMetaverseTypes.dll"/> | 1115 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1115 | <Reference name="OpenMetaverse.dll"/> | 1116 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1116 | <Reference name="OpenSim.Framework"/> | 1117 | <Reference name="OpenSim.Framework"/> |
1117 | <Reference name="OpenSim.Framework.Console"/> | 1118 | <Reference name="OpenSim.Framework.Console"/> |
1118 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1119 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
@@ -1120,8 +1121,8 @@ | |||
1120 | <Reference name="OpenSim.Services.Base"/> | 1121 | <Reference name="OpenSim.Services.Base"/> |
1121 | <Reference name="OpenSim.Services.Connectors"/> | 1122 | <Reference name="OpenSim.Services.Connectors"/> |
1122 | <Reference name="OpenSim.Data"/> | 1123 | <Reference name="OpenSim.Data"/> |
1123 | <Reference name="Nini.dll" /> | 1124 | <Reference name="Nini" path="../../../bin/"/> |
1124 | <Reference name="log4net.dll"/> | 1125 | <Reference name="log4net" path="../../../bin/"/> |
1125 | 1126 | ||
1126 | <Files> | 1127 | <Files> |
1127 | <Match pattern="*.cs" recurse="true"/> | 1128 | <Match pattern="*.cs" recurse="true"/> |
@@ -1142,8 +1143,8 @@ | |||
1142 | 1143 | ||
1143 | <ReferencePath>../../../bin/</ReferencePath> | 1144 | <ReferencePath>../../../bin/</ReferencePath> |
1144 | <Reference name="System"/> | 1145 | <Reference name="System"/> |
1145 | <Reference name="OpenMetaverseTypes.dll"/> | 1146 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1146 | <Reference name="OpenMetaverse.dll"/> | 1147 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1147 | <Reference name="OpenSim.Framework"/> | 1148 | <Reference name="OpenSim.Framework"/> |
1148 | <Reference name="OpenSim.Framework.Console"/> | 1149 | <Reference name="OpenSim.Framework.Console"/> |
1149 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1150 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
@@ -1151,8 +1152,8 @@ | |||
1151 | <Reference name="OpenSim.Services.Base"/> | 1152 | <Reference name="OpenSim.Services.Base"/> |
1152 | <Reference name="OpenSim.Services.Connectors"/> | 1153 | <Reference name="OpenSim.Services.Connectors"/> |
1153 | <Reference name="OpenSim.Data"/> | 1154 | <Reference name="OpenSim.Data"/> |
1154 | <Reference name="Nini.dll" /> | 1155 | <Reference name="Nini" path="../../../bin/"/> |
1155 | <Reference name="log4net.dll"/> | 1156 | <Reference name="log4net" path="../../../bin/"/> |
1156 | 1157 | ||
1157 | <Files> | 1158 | <Files> |
1158 | <Match pattern="*.cs" recurse="true"/> | 1159 | <Match pattern="*.cs" recurse="true"/> |
@@ -1174,8 +1175,8 @@ | |||
1174 | <ReferencePath>../../../bin/</ReferencePath> | 1175 | <ReferencePath>../../../bin/</ReferencePath> |
1175 | <Reference name="System"/> | 1176 | <Reference name="System"/> |
1176 | <Reference name="System.Xml"/> | 1177 | <Reference name="System.Xml"/> |
1177 | <Reference name="OpenMetaverseTypes.dll"/> | 1178 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1178 | <Reference name="OpenMetaverse.dll"/> | 1179 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1179 | <Reference name="OpenSim.Framework"/> | 1180 | <Reference name="OpenSim.Framework"/> |
1180 | <Reference name="OpenSim.Framework.Capabilities"/> | 1181 | <Reference name="OpenSim.Framework.Capabilities"/> |
1181 | <Reference name="OpenSim.Framework.Console"/> | 1182 | <Reference name="OpenSim.Framework.Console"/> |
@@ -1184,8 +1185,8 @@ | |||
1184 | <Reference name="OpenSim.Services.Base"/> | 1185 | <Reference name="OpenSim.Services.Base"/> |
1185 | <Reference name="OpenSim.Services.Connectors"/> | 1186 | <Reference name="OpenSim.Services.Connectors"/> |
1186 | <Reference name="OpenSim.Data"/> | 1187 | <Reference name="OpenSim.Data"/> |
1187 | <Reference name="Nini.dll" /> | 1188 | <Reference name="Nini" path="../../../bin/"/> |
1188 | <Reference name="log4net.dll"/> | 1189 | <Reference name="log4net" path="../../../bin/"/> |
1189 | 1190 | ||
1190 | <Files> | 1191 | <Files> |
1191 | <Match pattern="*.cs" recurse="true"/> | 1192 | <Match pattern="*.cs" recurse="true"/> |
@@ -1215,11 +1216,11 @@ | |||
1215 | <Reference name="OpenSim.Services.Connectors"/> | 1216 | <Reference name="OpenSim.Services.Connectors"/> |
1216 | <Reference name="OpenSim.Services.Base"/> | 1217 | <Reference name="OpenSim.Services.Base"/> |
1217 | <Reference name="OpenSim.Server.Base"/> | 1218 | <Reference name="OpenSim.Server.Base"/> |
1218 | <Reference name="OpenMetaverseTypes.dll"/> | 1219 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1219 | <Reference name="OpenMetaverse.dll"/> | 1220 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1220 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 1221 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
1221 | <Reference name="Nini.dll" /> | 1222 | <Reference name="Nini" path="../../../bin/"/> |
1222 | <Reference name="log4net.dll"/> | 1223 | <Reference name="log4net" path="../../../bin/"/> |
1223 | 1224 | ||
1224 | <Files> | 1225 | <Files> |
1225 | <Match pattern="*.cs" recurse="true"/> | 1226 | <Match pattern="*.cs" recurse="true"/> |
@@ -1241,8 +1242,8 @@ | |||
1241 | <ReferencePath>../../../bin/</ReferencePath> | 1242 | <ReferencePath>../../../bin/</ReferencePath> |
1242 | <Reference name="System"/> | 1243 | <Reference name="System"/> |
1243 | <Reference name="System.Xml"/> | 1244 | <Reference name="System.Xml"/> |
1244 | <Reference name="OpenMetaverseTypes.dll"/> | 1245 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1245 | <Reference name="OpenMetaverse.dll"/> | 1246 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1246 | <Reference name="OpenSim.Framework"/> | 1247 | <Reference name="OpenSim.Framework"/> |
1247 | <Reference name="OpenSim.Framework.Console"/> | 1248 | <Reference name="OpenSim.Framework.Console"/> |
1248 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1249 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
@@ -1251,8 +1252,8 @@ | |||
1251 | <Reference name="OpenSim.Services.Connectors"/> | 1252 | <Reference name="OpenSim.Services.Connectors"/> |
1252 | <Reference name="OpenSim.Data"/> | 1253 | <Reference name="OpenSim.Data"/> |
1253 | <Reference name="OpenSim.Server.Base"/> | 1254 | <Reference name="OpenSim.Server.Base"/> |
1254 | <Reference name="Nini.dll" /> | 1255 | <Reference name="Nini" path="../../../bin/"/> |
1255 | <Reference name="log4net.dll"/> | 1256 | <Reference name="log4net" path="../../../bin/"/> |
1256 | 1257 | ||
1257 | <Files> | 1258 | <Files> |
1258 | <Match pattern="*.cs" recurse="true"/> | 1259 | <Match pattern="*.cs" recurse="true"/> |
@@ -1276,23 +1277,23 @@ | |||
1276 | <Reference name="System"/> | 1277 | <Reference name="System"/> |
1277 | <Reference name="System.Xml"/> | 1278 | <Reference name="System.Xml"/> |
1278 | <Reference name="System.Web"/> | 1279 | <Reference name="System.Web"/> |
1279 | <Reference name="OpenMetaverseTypes.dll"/> | 1280 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1280 | <Reference name="OpenMetaverse.dll"/> | 1281 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1281 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 1282 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
1282 | <Reference name="OpenSim.Framework"/> | 1283 | <Reference name="OpenSim.Framework"/> |
1283 | <Reference name="OpenSim.Framework.Console"/> | 1284 | <Reference name="OpenSim.Framework.Console"/> |
1284 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1285 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
1285 | <Reference name="OpenSim.Server.Base"/> | 1286 | <Reference name="OpenSim.Server.Base"/> |
1286 | <Reference name="OpenSim.Services.Base" /> | 1287 | <Reference name="OpenSim.Services.Base"/> |
1287 | <Reference name="OpenSim.Services.Interfaces"/> | 1288 | <Reference name="OpenSim.Services.Interfaces"/> |
1288 | <Reference name="XMLRPC.dll" /> | 1289 | <Reference name="XMLRPC" path="../../../bin/"/> |
1289 | <Reference name="Nini.dll" /> | 1290 | <Reference name="Nini" path="../../../bin/"/> |
1290 | <Reference name="log4net.dll"/> | 1291 | <Reference name="log4net" path="../../../bin/"/> |
1291 | <Reference name="DotNetOpenId.dll"/> | 1292 | <Reference name="DotNetOpenId" path="../../../bin/"/> |
1292 | 1293 | ||
1293 | <Files> | 1294 | <Files> |
1294 | <Match pattern="*.cs" recurse="true"> | 1295 | <Match pattern="*.cs" recurse="true"> |
1295 | <Exclude pattern="Tests" /> | 1296 | <Exclude pattern="Tests"/> |
1296 | </Match> | 1297 | </Match> |
1297 | </Files> | 1298 | </Files> |
1298 | </Project> | 1299 | </Project> |
@@ -1313,20 +1314,20 @@ | |||
1313 | <ReferencePath>../../bin/</ReferencePath> | 1314 | <ReferencePath>../../bin/</ReferencePath> |
1314 | <Reference name="System"/> | 1315 | <Reference name="System"/> |
1315 | <Reference name="System.Xml"/> | 1316 | <Reference name="System.Xml"/> |
1316 | <Reference name="OpenMetaverseTypes.dll"/> | 1317 | <Reference name="OpenMetaverseTypes" path="../../bin/"/> |
1317 | <Reference name="OpenMetaverse.dll"/> | 1318 | <Reference name="OpenMetaverse" path="../../bin/"/> |
1318 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 1319 | <Reference name="OpenMetaverse.StructuredData" path="../../bin/"/> |
1319 | <Reference name="OpenSim.Framework"/> | 1320 | <Reference name="OpenSim.Framework"/> |
1320 | <Reference name="OpenSim.Framework.Console"/> | 1321 | <Reference name="OpenSim.Framework.Console"/> |
1321 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1322 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
1322 | <Reference name="OpenSim.Server.Base"/> | 1323 | <Reference name="OpenSim.Server.Base"/> |
1323 | <Reference name="OpenSim.Server.Handlers"/> | 1324 | <Reference name="OpenSim.Server.Handlers"/> |
1324 | <Reference name="Nini.dll" /> | 1325 | <Reference name="Nini" path="../../bin/"/> |
1325 | <Reference name="log4net.dll"/> | 1326 | <Reference name="log4net" path="../../bin/"/> |
1326 | 1327 | ||
1327 | <Files> | 1328 | <Files> |
1328 | <Match pattern="*.cs" recurse="false"> | 1329 | <Match pattern="*.cs" recurse="false"> |
1329 | <Exclude pattern="Tests" /> | 1330 | <Exclude pattern="Tests"/> |
1330 | </Match> | 1331 | </Match> |
1331 | </Files> | 1332 | </Files> |
1332 | </Project> | 1333 | </Project> |
@@ -1346,19 +1347,19 @@ | |||
1346 | <ReferencePath>../../bin/</ReferencePath> | 1347 | <ReferencePath>../../bin/</ReferencePath> |
1347 | <Reference name="System"/> | 1348 | <Reference name="System"/> |
1348 | <Reference name="System.Xml"/> | 1349 | <Reference name="System.Xml"/> |
1349 | <Reference name="OpenMetaverseTypes.dll"/> | 1350 | <Reference name="OpenMetaverseTypes" path="../../bin/"/> |
1350 | <Reference name="OpenMetaverse.dll"/> | 1351 | <Reference name="OpenMetaverse" path="../../bin/"/> |
1351 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 1352 | <Reference name="OpenMetaverse.StructuredData" path="../../bin/"/> |
1352 | <Reference name="OpenSim.Framework"/> | 1353 | <Reference name="OpenSim.Framework"/> |
1353 | <Reference name="OpenSim.Framework.Console"/> | 1354 | <Reference name="OpenSim.Framework.Console"/> |
1354 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1355 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
1355 | <Reference name="OpenSim.Server.Base"/> | 1356 | <Reference name="OpenSim.Server.Base"/> |
1356 | <Reference name="Nini.dll" /> | 1357 | <Reference name="Nini" path="../../bin/"/> |
1357 | <Reference name="log4net.dll"/> | 1358 | <Reference name="log4net" path="../../bin/"/> |
1358 | 1359 | ||
1359 | <Files> | 1360 | <Files> |
1360 | <Match pattern="*.cs" recurse="false"> | 1361 | <Match pattern="*.cs" recurse="false"> |
1361 | <Exclude pattern="Tests" /> | 1362 | <Exclude pattern="Tests"/> |
1362 | </Match> | 1363 | </Match> |
1363 | </Files> | 1364 | </Files> |
1364 | </Project> | 1365 | </Project> |
@@ -1381,21 +1382,21 @@ | |||
1381 | <Reference name="System.Xml"/> | 1382 | <Reference name="System.Xml"/> |
1382 | <Reference name="System.Drawing"/> | 1383 | <Reference name="System.Drawing"/> |
1383 | <Reference name="System.Web"/> | 1384 | <Reference name="System.Web"/> |
1384 | <Reference name="NDesk.Options"/> | 1385 | <Reference name="NDesk.Options" path="../../../bin/"/> |
1385 | <Reference name="OpenMetaverseTypes.dll"/> | 1386 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1386 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 1387 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
1387 | <Reference name="OpenMetaverse.dll"/> | 1388 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1388 | <Reference name="CSJ2K.dll"/> | 1389 | <Reference name="CSJ2K" path="../../../bin/"/> |
1389 | <Reference name="OpenSim.Framework"/> | 1390 | <Reference name="OpenSim.Framework"/> |
1390 | <Reference name="OpenSim.Framework.Capabilities"/> | 1391 | <Reference name="OpenSim.Framework.Capabilities"/> |
1391 | <Reference name="OpenSim.Framework.Communications"/> | 1392 | <Reference name="OpenSim.Framework.Communications"/> |
1392 | <Reference name="OpenSim.Data" /> | 1393 | <Reference name="OpenSim.Data"/> |
1393 | <Reference name="OpenSim.Region.Framework" /> | 1394 | <Reference name="OpenSim.Region.Framework"/> |
1394 | <Reference name="OpenSim.Server.Base" /> | 1395 | <Reference name="OpenSim.Server.Base"/> |
1395 | <Reference name="OpenSim.Server.Handlers" /> | 1396 | <Reference name="OpenSim.Server.Handlers"/> |
1396 | <Reference name="OpenSim.Services.Connectors" /> | 1397 | <Reference name="OpenSim.Services.Connectors"/> |
1397 | <Reference name="OpenSim.Services.Base" /> | 1398 | <Reference name="OpenSim.Services.Base"/> |
1398 | <Reference name="OpenSim.Services.Interfaces" /> | 1399 | <Reference name="OpenSim.Services.Interfaces"/> |
1399 | <Reference name="OpenSim.Framework.Serialization"/> | 1400 | <Reference name="OpenSim.Framework.Serialization"/> |
1400 | <Reference name="OpenSim.Framework.Console"/> | 1401 | <Reference name="OpenSim.Framework.Console"/> |
1401 | <Reference name="OpenSim.Framework.Servers"/> | 1402 | <Reference name="OpenSim.Framework.Servers"/> |
@@ -1403,24 +1404,24 @@ | |||
1403 | <Reference name="OpenSim.Framework.Statistics"/> | 1404 | <Reference name="OpenSim.Framework.Statistics"/> |
1404 | <Reference name="OpenSim.Region.Physics.Manager"/> | 1405 | <Reference name="OpenSim.Region.Physics.Manager"/> |
1405 | 1406 | ||
1406 | <Reference name="GlynnTucker.Cache.dll"/> | 1407 | <Reference name="GlynnTucker.Cache" path="../../../bin/"/> |
1407 | 1408 | ||
1408 | <!-- For scripting in funny languages by default --> | 1409 | <!-- For scripting in funny languages by default --> |
1409 | <Reference name="XMLRPC.dll"/> | 1410 | <Reference name="XMLRPC" path="../../../bin/"/> |
1410 | <Reference name="OpenSim.Framework.Communications"/> | 1411 | <Reference name="OpenSim.Framework.Communications"/> |
1411 | <Reference name="Nini.dll" /> | 1412 | <Reference name="Nini" path="../../../bin/"/> |
1412 | <Reference name="log4net.dll"/> | 1413 | <Reference name="log4net" path="../../../bin/"/> |
1413 | <Reference name="DotNetOpenMail.dll"/> | 1414 | <Reference name="DotNetOpenMail" path="../../../bin/"/> |
1414 | 1415 | ||
1415 | <!-- To allow regions to have mono addins --> | 1416 | <!-- To allow regions to have mono addins --> |
1416 | <Reference name="Mono.Addins.dll" /> | 1417 | <Reference name="Mono.Addins" path="../../../bin/"/> |
1417 | 1418 | ||
1418 | <Files> | 1419 | <Files> |
1419 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 1420 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
1420 | <Match pattern="*.cs" recurse="true"> | 1421 | <Match pattern="*.cs" recurse="true"> |
1421 | <Exclude name="Tests" pattern="Tests" /> | 1422 | <Exclude name="Tests" pattern="Tests"/> |
1422 | </Match> | 1423 | </Match> |
1423 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 1424 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
1424 | </Files> | 1425 | </Files> |
1425 | </Project> | 1426 | </Project> |
1426 | 1427 | ||
@@ -1441,40 +1442,40 @@ | |||
1441 | <Reference name="System.Xml"/> | 1442 | <Reference name="System.Xml"/> |
1442 | <Reference name="System.Drawing"/> | 1443 | <Reference name="System.Drawing"/> |
1443 | <Reference name="System.Web"/> | 1444 | <Reference name="System.Web"/> |
1444 | <Reference name="OpenMetaverseTypes.dll"/> | 1445 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1445 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 1446 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
1446 | <Reference name="OpenMetaverse.dll"/> | 1447 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1447 | <Reference name="PumaCode.SvnDotNet.dll"/> | 1448 | <Reference name="PumaCode.SvnDotNet" path="../../../bin/"/> |
1448 | <Reference name="OpenSim.Framework"/> | 1449 | <Reference name="OpenSim.Framework"/> |
1449 | <Reference name="OpenSim.Framework.Communications"/> | 1450 | <Reference name="OpenSim.Framework.Communications"/> |
1450 | <Reference name="OpenSim.Data" /> | 1451 | <Reference name="OpenSim.Data"/> |
1451 | <Reference name="OpenSim.Region.Framework" /> | 1452 | <Reference name="OpenSim.Region.Framework"/> |
1452 | <Reference name="OpenSim.Region.CoreModules" /> | 1453 | <Reference name="OpenSim.Region.CoreModules"/> |
1453 | <Reference name="OpenSim.Framework.Capabilities"/> | 1454 | <Reference name="OpenSim.Framework.Capabilities"/> |
1454 | <Reference name="OpenSim.Framework.Console"/> | 1455 | <Reference name="OpenSim.Framework.Console"/> |
1455 | <Reference name="OpenSim.Framework.Servers"/> | 1456 | <Reference name="OpenSim.Framework.Servers"/> |
1456 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1457 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
1457 | <Reference name="OpenSim.Framework.Statistics"/> | 1458 | <Reference name="OpenSim.Framework.Statistics"/> |
1458 | <Reference name="OpenSim.Region.Physics.Manager"/> | 1459 | <Reference name="OpenSim.Region.Physics.Manager"/> |
1459 | <Reference name="OpenSim.Server.Base" /> | 1460 | <Reference name="OpenSim.Server.Base"/> |
1460 | <Reference name="OpenSim.Server.Handlers" /> | 1461 | <Reference name="OpenSim.Server.Handlers"/> |
1461 | <Reference name="OpenSim.Services.Connectors" /> | 1462 | <Reference name="OpenSim.Services.Connectors"/> |
1462 | <Reference name="OpenSim.Services.Base" /> | 1463 | <Reference name="OpenSim.Services.Base"/> |
1463 | <Reference name="OpenSim.Services.Interfaces" /> | 1464 | <Reference name="OpenSim.Services.Interfaces"/> |
1464 | <Reference name="Mono.Addins.dll" /> | 1465 | <Reference name="Mono.Addins" path="../../../bin/"/> |
1465 | 1466 | ||
1466 | <!-- For scripting in funny languages by default --> | 1467 | <!-- For scripting in funny languages by default --> |
1467 | <Reference name="XMLRPC.dll"/> | 1468 | <Reference name="XMLRPC" path="../../../bin/"/> |
1468 | <Reference name="OpenSim.Framework.Communications"/> | 1469 | <Reference name="OpenSim.Framework.Communications"/> |
1469 | <Reference name="Nini.dll" /> | 1470 | <Reference name="Nini" path="../../../bin/"/> |
1470 | <Reference name="log4net.dll"/> | 1471 | <Reference name="log4net" path="../../../bin/"/> |
1471 | <Reference name="DotNetOpenMail.dll"/> | 1472 | <Reference name="DotNetOpenMail" path="../../../bin/"/> |
1472 | 1473 | ||
1473 | <Files> | 1474 | <Files> |
1474 | <Match pattern="*.cs" recurse="true"> | 1475 | <Match pattern="*.cs" recurse="true"> |
1475 | <Exclude name="Tests" pattern="Tests" /> | 1476 | <Exclude name="Tests" pattern="Tests"/> |
1476 | </Match> | 1477 | </Match> |
1477 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 1478 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
1478 | </Files> | 1479 | </Files> |
1479 | </Project> | 1480 | </Project> |
1480 | 1481 | ||
@@ -1493,26 +1494,26 @@ | |||
1493 | <ReferencePath>../../../bin/</ReferencePath> | 1494 | <ReferencePath>../../../bin/</ReferencePath> |
1494 | <Reference name="System"/> | 1495 | <Reference name="System"/> |
1495 | <Reference name="System.Xml"/> | 1496 | <Reference name="System.Xml"/> |
1496 | <Reference name="OpenMetaverseTypes.dll"/> | 1497 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1497 | <Reference name="OpenMetaverse.dll"/> | 1498 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1498 | <Reference name="OpenSim.Framework"/> | 1499 | <Reference name="OpenSim.Framework"/> |
1499 | <Reference name="OpenSim.Framework.Communications"/> | 1500 | <Reference name="OpenSim.Framework.Communications"/> |
1500 | <Reference name="OpenSim.Region.Framework" /> | 1501 | <Reference name="OpenSim.Region.Framework"/> |
1501 | <Reference name="OpenSim.Server.Base" /> | 1502 | <Reference name="OpenSim.Server.Base"/> |
1502 | <Reference name="OpenSim.Server.Handlers" /> | 1503 | <Reference name="OpenSim.Server.Handlers"/> |
1503 | <Reference name="OpenSim.Framework.Console"/> | 1504 | <Reference name="OpenSim.Framework.Console"/> |
1504 | <Reference name="OpenSim.Region.Physics.Manager"/> | 1505 | <Reference name="OpenSim.Region.Physics.Manager"/> |
1505 | <Reference name="OpenSim.Framework.Communications"/> | 1506 | <Reference name="OpenSim.Framework.Communications"/> |
1506 | <Reference name="OpenSim.Region.CoreModules" /> | 1507 | <Reference name="OpenSim.Region.CoreModules"/> |
1507 | <Reference name="Nini.dll" /> | 1508 | <Reference name="Nini" path="../../../bin/"/> |
1508 | <Reference name="log4net.dll"/> | 1509 | <Reference name="log4net" path="../../../bin/"/> |
1509 | 1510 | ||
1510 | <!-- To allow regions to have mono addins --> | 1511 | <!-- To allow regions to have mono addins --> |
1511 | <Reference name="Mono.Addins.dll" /> | 1512 | <Reference name="Mono.Addins" path="../../../bin/"/> |
1512 | 1513 | ||
1513 | <Files> | 1514 | <Files> |
1514 | <Match pattern="*.cs" recurse="true" /> | 1515 | <Match pattern="*.cs" recurse="true"/> |
1515 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 1516 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
1516 | </Files> | 1517 | </Files> |
1517 | </Project> | 1518 | </Project> |
1518 | 1519 | ||
@@ -1531,7 +1532,7 @@ | |||
1531 | <ReferencePath>../../../bin/</ReferencePath> | 1532 | <ReferencePath>../../../bin/</ReferencePath> |
1532 | <Reference name="System"/> | 1533 | <Reference name="System"/> |
1533 | <Reference name="System.Xml"/> | 1534 | <Reference name="System.Xml"/> |
1534 | <Reference name="OpenMetaverseTypes.dll"/> | 1535 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1535 | <Reference name="OpenSim.Region.Framework"/> | 1536 | <Reference name="OpenSim.Region.Framework"/> |
1536 | <Reference name="OpenSim.Framework"/> | 1537 | <Reference name="OpenSim.Framework"/> |
1537 | <Reference name="OpenSim.Data"/> | 1538 | <Reference name="OpenSim.Data"/> |
@@ -1542,9 +1543,9 @@ | |||
1542 | <Reference name="OpenSim.Framework.Statistics"/> | 1543 | <Reference name="OpenSim.Framework.Statistics"/> |
1543 | <Reference name="OpenSim.Region.Physics.Manager"/> | 1544 | <Reference name="OpenSim.Region.Physics.Manager"/> |
1544 | <Reference name="OpenSim.Region.CoreModules"/> | 1545 | <Reference name="OpenSim.Region.CoreModules"/> |
1545 | <Reference name="XMLRPC.dll"/> | 1546 | <Reference name="XMLRPC" path="../../../bin/"/> |
1546 | <Reference name="Nini.dll" /> | 1547 | <Reference name="Nini" path="../../../bin/"/> |
1547 | <Reference name="log4net.dll"/> | 1548 | <Reference name="log4net" path="../../../bin/"/> |
1548 | 1549 | ||
1549 | <Files> | 1550 | <Files> |
1550 | <Match pattern="*.cs" recurse="false"/> | 1551 | <Match pattern="*.cs" recurse="false"/> |
@@ -1568,9 +1569,9 @@ | |||
1568 | <Reference name="System"/> | 1569 | <Reference name="System"/> |
1569 | <Reference name="System.Core"/> | 1570 | <Reference name="System.Core"/> |
1570 | <Reference name="System.Xml"/> | 1571 | <Reference name="System.Xml"/> |
1571 | <Reference name="OpenMetaverseTypes.dll"/> | 1572 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
1572 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 1573 | <Reference name="OpenMetaverse.StructuredData" path="../../../../bin/"/> |
1573 | <Reference name="OpenMetaverse.dll"/> | 1574 | <Reference name="OpenMetaverse" path="../../../../bin/"/> |
1574 | <Reference name="OpenSim.Region.Framework"/> | 1575 | <Reference name="OpenSim.Region.Framework"/> |
1575 | <Reference name="OpenSim.Framework"/> | 1576 | <Reference name="OpenSim.Framework"/> |
1576 | <Reference name="OpenSim.Data"/> | 1577 | <Reference name="OpenSim.Data"/> |
@@ -1581,12 +1582,12 @@ | |||
1581 | <Reference name="OpenSim.Region.ClientStack"/> | 1582 | <Reference name="OpenSim.Region.ClientStack"/> |
1582 | <Reference name="OpenSim.Region.Physics.Manager"/> | 1583 | <Reference name="OpenSim.Region.Physics.Manager"/> |
1583 | <Reference name="OpenSim.Services.Interfaces"/> | 1584 | <Reference name="OpenSim.Services.Interfaces"/> |
1584 | <Reference name="BclExtras35.dll"/> | 1585 | <Reference name="BclExtras35" path="../../../../bin/"/> |
1585 | <Reference name="XMLRPC.dll"/> | 1586 | <Reference name="XMLRPC" path="../../../../bin/"/> |
1586 | <Reference name="Nini.dll" /> | 1587 | <Reference name="Nini" path="../../../../bin/"/> |
1587 | <Reference name="log4net.dll"/> | 1588 | <Reference name="log4net" path="../../../../bin/"/> |
1588 | <Reference name="C5.dll" /> | 1589 | <Reference name="C5" path="../../../../bin/"/> |
1589 | <Reference name="Nini.dll" /> | 1590 | <Reference name="Nini" path="../../../../bin/"/> |
1590 | 1591 | ||
1591 | <Files> | 1592 | <Files> |
1592 | <Match pattern="*.cs" recurse="false"/> | 1593 | <Match pattern="*.cs" recurse="false"/> |
@@ -1610,11 +1611,11 @@ | |||
1610 | <Reference name="System"/> | 1611 | <Reference name="System"/> |
1611 | <Reference name="System.Xml"/> | 1612 | <Reference name="System.Xml"/> |
1612 | <Reference name="OpenSim.Data"/> | 1613 | <Reference name="OpenSim.Data"/> |
1613 | <Reference name="OpenMetaverseTypes.dll"/> | 1614 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1614 | <Reference name="OpenSim.Framework"/> | 1615 | <Reference name="OpenSim.Framework"/> |
1615 | <Reference name="OpenSim.Region.Framework"/> | 1616 | <Reference name="OpenSim.Region.Framework"/> |
1616 | <Reference name="OpenSim.Framework.Console"/> | 1617 | <Reference name="OpenSim.Framework.Console"/> |
1617 | <Reference name="log4net.dll"/> | 1618 | <Reference name="log4net" path="../../../bin/"/> |
1618 | 1619 | ||
1619 | <Files> | 1620 | <Files> |
1620 | <Match pattern="*.cs" recurse="true"/> | 1621 | <Match pattern="*.cs" recurse="true"/> |
@@ -1637,10 +1638,10 @@ | |||
1637 | <ReferencePath>../../../bin/</ReferencePath> | 1638 | <ReferencePath>../../../bin/</ReferencePath> |
1638 | <Reference name="System"/> | 1639 | <Reference name="System"/> |
1639 | <Reference name="System.Xml"/> | 1640 | <Reference name="System.Xml"/> |
1640 | <Reference name="Mono.Addins.dll" /> | 1641 | <Reference name="Mono.Addins" path="../../../bin/"/> |
1641 | <Reference name="OpenMetaverseTypes.dll"/> | 1642 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1642 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 1643 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
1643 | <Reference name="OpenMetaverse.dll"/> | 1644 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1644 | <Reference name="OpenSim.Framework"/> | 1645 | <Reference name="OpenSim.Framework"/> |
1645 | <Reference name="OpenSim.Data"/> | 1646 | <Reference name="OpenSim.Data"/> |
1646 | <Reference name="OpenSim.Framework.Console"/> | 1647 | <Reference name="OpenSim.Framework.Console"/> |
@@ -1652,9 +1653,9 @@ | |||
1652 | <Reference name="OpenSim.Region.CoreModules"/> | 1653 | <Reference name="OpenSim.Region.CoreModules"/> |
1653 | <Reference name="OpenSim.Region.ClientStack"/> | 1654 | <Reference name="OpenSim.Region.ClientStack"/> |
1654 | <Reference name="OpenSim.Framework.Communications"/> | 1655 | <Reference name="OpenSim.Framework.Communications"/> |
1655 | <Reference name="XMLRPC.dll"/> | 1656 | <Reference name="XMLRPC" path="../../../bin/"/> |
1656 | <Reference name="Nini.dll" /> | 1657 | <Reference name="Nini" path="../../../bin/"/> |
1657 | <Reference name="log4net.dll"/> | 1658 | <Reference name="log4net" path="../../../bin/"/> |
1658 | 1659 | ||
1659 | <Files> | 1660 | <Files> |
1660 | <Match pattern="*.cs" recurse="true"/> | 1661 | <Match pattern="*.cs" recurse="true"/> |
@@ -1674,11 +1675,11 @@ | |||
1674 | </Configuration> | 1675 | </Configuration> |
1675 | 1676 | ||
1676 | <ReferencePath>../../../bin/</ReferencePath> | 1677 | <ReferencePath>../../../bin/</ReferencePath> |
1677 | <Reference name="Mono.Addins.dll" /> | 1678 | <Reference name="Mono.Addins" path="../../../bin/"/> |
1678 | <Reference name="System"/> | 1679 | <Reference name="System"/> |
1679 | <Reference name="System.Xml"/> | 1680 | <Reference name="System.Xml"/> |
1680 | <Reference name="OpenMetaverseTypes.dll" /> | 1681 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1681 | <Reference name="Nini.dll" /> | 1682 | <Reference name="Nini" path="../../../bin/"/> |
1682 | <Reference name="OpenSim"/> | 1683 | <Reference name="OpenSim"/> |
1683 | <Reference name="OpenSim.Region.ClientStack"/> | 1684 | <Reference name="OpenSim.Region.ClientStack"/> |
1684 | <Reference name="OpenSim.Region.CoreModules"/> | 1685 | <Reference name="OpenSim.Region.CoreModules"/> |
@@ -1688,11 +1689,11 @@ | |||
1688 | <Reference name="OpenSim.Framework.RegionLoader.Filesystem"/> | 1689 | <Reference name="OpenSim.Framework.RegionLoader.Filesystem"/> |
1689 | <Reference name="OpenSim.Framework.RegionLoader.Web"/> | 1690 | <Reference name="OpenSim.Framework.RegionLoader.Web"/> |
1690 | <Reference name="OpenSim.Framework.Servers"/> | 1691 | <Reference name="OpenSim.Framework.Servers"/> |
1691 | <Reference name="log4net.dll"/> | 1692 | <Reference name="log4net" path="../../../bin/"/> |
1692 | 1693 | ||
1693 | <Files> | 1694 | <Files> |
1694 | <Match pattern="*.cs" recurse="true"/> | 1695 | <Match pattern="*.cs" recurse="true"/> |
1695 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 1696 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
1696 | </Files> | 1697 | </Files> |
1697 | </Project> | 1698 | </Project> |
1698 | 1699 | ||
@@ -1709,8 +1710,8 @@ | |||
1709 | </Configuration> | 1710 | </Configuration> |
1710 | 1711 | ||
1711 | <ReferencePath>../../../bin/</ReferencePath> | 1712 | <ReferencePath>../../../bin/</ReferencePath> |
1712 | <Reference name="Mono.Addins.dll" /> | 1713 | <Reference name="Mono.Addins" path="../../../bin/"/> |
1713 | <Reference name="Nini.dll" /> | 1714 | <Reference name="Nini" path="../../../bin/"/> |
1714 | <Reference name="OpenSim"/> | 1715 | <Reference name="OpenSim"/> |
1715 | <Reference name="OpenSim.Framework"/> | 1716 | <Reference name="OpenSim.Framework"/> |
1716 | <Reference name="OpenSim.Framework.Servers"/> | 1717 | <Reference name="OpenSim.Framework.Servers"/> |
@@ -1718,11 +1719,11 @@ | |||
1718 | <Reference name="OpenSim.Region.ClientStack"/> | 1719 | <Reference name="OpenSim.Region.ClientStack"/> |
1719 | <Reference name="System"/> | 1720 | <Reference name="System"/> |
1720 | <Reference name="System.Xml"/> | 1721 | <Reference name="System.Xml"/> |
1721 | <Reference name="log4net.dll"/> | 1722 | <Reference name="log4net" path="../../../bin/"/> |
1722 | 1723 | ||
1723 | <Files> | 1724 | <Files> |
1724 | <Match pattern="*.cs" recurse="true"/> | 1725 | <Match pattern="*.cs" recurse="true"/> |
1725 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 1726 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
1726 | </Files> | 1727 | </Files> |
1727 | </Project> | 1728 | </Project> |
1728 | 1729 | ||
@@ -1739,14 +1740,14 @@ | |||
1739 | </Configuration> | 1740 | </Configuration> |
1740 | 1741 | ||
1741 | <ReferencePath>../../../bin/</ReferencePath> | 1742 | <ReferencePath>../../../bin/</ReferencePath> |
1742 | <Reference name="Mono.Addins.dll" /> | 1743 | <Reference name="Mono.Addins" path="../../../bin/"/> |
1743 | <Reference name="System"/> | 1744 | <Reference name="System"/> |
1744 | <Reference name="System.Xml"/> | 1745 | <Reference name="System.Xml"/> |
1745 | <Reference name="OpenMetaverse.dll" /> | 1746 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1746 | <Reference name="OpenMetaverseTypes.dll" /> | 1747 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1747 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 1748 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
1748 | <Reference name="Nini.dll" /> | 1749 | <Reference name="Nini" path="../../../bin/"/> |
1749 | <Reference name="XMLRPC.dll" /> | 1750 | <Reference name="XMLRPC" path="../../../bin/"/> |
1750 | <Reference name="OpenSim"/> | 1751 | <Reference name="OpenSim"/> |
1751 | <Reference name="OpenSim.Region.ClientStack"/> | 1752 | <Reference name="OpenSim.Region.ClientStack"/> |
1752 | <Reference name="OpenSim.Region.Framework"/> | 1753 | <Reference name="OpenSim.Region.Framework"/> |
@@ -1757,17 +1758,16 @@ | |||
1757 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1758 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
1758 | <Reference name="OpenSim.Framework.Console"/> | 1759 | <Reference name="OpenSim.Framework.Console"/> |
1759 | <Reference name="OpenSim.Services.Interfaces"/> | 1760 | <Reference name="OpenSim.Services.Interfaces"/> |
1760 | <Reference name="log4net.dll"/> | 1761 | <Reference name="log4net" path="../../../bin/"/> |
1761 | 1762 | ||
1762 | <Files> | 1763 | <Files> |
1763 | <Match pattern="*.cs" recurse="true"/> | 1764 | <Match pattern="*.cs" recurse="true"/> |
1764 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 1765 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
1765 | </Files> | 1766 | </Files> |
1766 | </Project> | 1767 | </Project> |
1767 | 1768 | ||
1768 | <!-- REST plugins --> | 1769 | <!-- REST plugins --> |
1769 | <Project frameworkVersion="v3_5" name="OpenSim.ApplicationPlugins.Rest" | 1770 | <Project frameworkVersion="v3_5" name="OpenSim.ApplicationPlugins.Rest" path="OpenSim/ApplicationPlugins/Rest" type="Library"> |
1770 | path="OpenSim/ApplicationPlugins/Rest" type="Library"> | ||
1771 | <Configuration name="Debug"> | 1771 | <Configuration name="Debug"> |
1772 | <Options> | 1772 | <Options> |
1773 | <OutputPath>../../../bin/</OutputPath> | 1773 | <OutputPath>../../../bin/</OutputPath> |
@@ -1780,12 +1780,12 @@ | |||
1780 | </Configuration> | 1780 | </Configuration> |
1781 | 1781 | ||
1782 | <ReferencePath>../../../bin/</ReferencePath> | 1782 | <ReferencePath>../../../bin/</ReferencePath> |
1783 | <Reference name="Mono.Addins.dll" /> | 1783 | <Reference name="Mono.Addins" path="../../../bin/"/> |
1784 | <Reference name="System"/> | 1784 | <Reference name="System"/> |
1785 | <Reference name="System.Xml"/> | 1785 | <Reference name="System.Xml"/> |
1786 | <Reference name="OpenMetaverseTypes.dll" /> | 1786 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1787 | <Reference name="Nini.dll" /> | 1787 | <Reference name="Nini" path="../../../bin/"/> |
1788 | <Reference name="XMLRPC.dll" /> | 1788 | <Reference name="XMLRPC" path="../../../bin/"/> |
1789 | <Reference name="OpenSim"/> | 1789 | <Reference name="OpenSim"/> |
1790 | <Reference name="OpenSim.Region.ClientStack"/> | 1790 | <Reference name="OpenSim.Region.ClientStack"/> |
1791 | <Reference name="OpenSim.Region.Framework"/> | 1791 | <Reference name="OpenSim.Region.Framework"/> |
@@ -1795,15 +1795,14 @@ | |||
1795 | <Reference name="OpenSim.Framework.Servers"/> | 1795 | <Reference name="OpenSim.Framework.Servers"/> |
1796 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1796 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
1797 | <Reference name="OpenSim.Framework.Console"/> | 1797 | <Reference name="OpenSim.Framework.Console"/> |
1798 | <Reference name="log4net.dll"/> | 1798 | <Reference name="log4net" path="../../../bin/"/> |
1799 | 1799 | ||
1800 | <Files> | 1800 | <Files> |
1801 | <Match pattern="*.cs" recurse="false"/> | 1801 | <Match pattern="*.cs" recurse="false"/> |
1802 | </Files> | 1802 | </Files> |
1803 | </Project> | 1803 | </Project> |
1804 | 1804 | ||
1805 | <Project frameworkVersion="v3_5" name="OpenSim.ApplicationPlugins.Rest.Regions" | 1805 | <Project frameworkVersion="v3_5" name="OpenSim.ApplicationPlugins.Rest.Regions" path="OpenSim/ApplicationPlugins/Rest/Regions" type="Library"> |
1806 | path="OpenSim/ApplicationPlugins/Rest/Regions" type="Library"> | ||
1807 | <Configuration name="Debug"> | 1806 | <Configuration name="Debug"> |
1808 | <Options> | 1807 | <Options> |
1809 | <OutputPath>../../../../bin/</OutputPath> | 1808 | <OutputPath>../../../../bin/</OutputPath> |
@@ -1816,12 +1815,12 @@ | |||
1816 | </Configuration> | 1815 | </Configuration> |
1817 | 1816 | ||
1818 | <ReferencePath>../../../../bin/</ReferencePath> | 1817 | <ReferencePath>../../../../bin/</ReferencePath> |
1819 | <Reference name="Mono.Addins.dll" /> | 1818 | <Reference name="Mono.Addins" path="../../../../bin/"/> |
1820 | <Reference name="System"/> | 1819 | <Reference name="System"/> |
1821 | <Reference name="System.Xml"/> | 1820 | <Reference name="System.Xml"/> |
1822 | <Reference name="OpenMetaverseTypes.dll" /> | 1821 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
1823 | <Reference name="Nini.dll" /> | 1822 | <Reference name="Nini" path="../../../../bin/"/> |
1824 | <Reference name="XMLRPC.dll" /> | 1823 | <Reference name="XMLRPC" path="../../../../bin/"/> |
1825 | <Reference name="OpenSim"/> | 1824 | <Reference name="OpenSim"/> |
1826 | <Reference name="OpenSim.Region.Framework"/> | 1825 | <Reference name="OpenSim.Region.Framework"/> |
1827 | <Reference name="OpenSim.Region.ClientStack"/> | 1826 | <Reference name="OpenSim.Region.ClientStack"/> |
@@ -1832,16 +1831,15 @@ | |||
1832 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1831 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
1833 | <Reference name="OpenSim.Framework.Console"/> | 1832 | <Reference name="OpenSim.Framework.Console"/> |
1834 | <Reference name="OpenSim.ApplicationPlugins.Rest"/> | 1833 | <Reference name="OpenSim.ApplicationPlugins.Rest"/> |
1835 | <Reference name="log4net.dll"/> | 1834 | <Reference name="log4net" path="../../../../bin/"/> |
1836 | 1835 | ||
1837 | <Files> | 1836 | <Files> |
1838 | <Match pattern="*.cs" recurse="true"/> | 1837 | <Match pattern="*.cs" recurse="true"/> |
1839 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 1838 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
1840 | </Files> | 1839 | </Files> |
1841 | </Project> | 1840 | </Project> |
1842 | 1841 | ||
1843 | <Project frameworkVersion="v3_5" name="OpenSim.ApplicationPlugins.Rest.Inventory" | 1842 | <Project frameworkVersion="v3_5" name="OpenSim.ApplicationPlugins.Rest.Inventory" path="OpenSim/ApplicationPlugins/Rest/Inventory" type="Library"> |
1844 | path="OpenSim/ApplicationPlugins/Rest/Inventory" type="Library"> | ||
1845 | <Configuration name="Debug"> | 1843 | <Configuration name="Debug"> |
1846 | <Options> | 1844 | <Options> |
1847 | <OutputPath>../../../../bin/</OutputPath> | 1845 | <OutputPath>../../../../bin/</OutputPath> |
@@ -1854,14 +1852,14 @@ | |||
1854 | </Configuration> | 1852 | </Configuration> |
1855 | 1853 | ||
1856 | <ReferencePath>../../../../bin/</ReferencePath> | 1854 | <ReferencePath>../../../../bin/</ReferencePath> |
1857 | <Reference name="Mono.Addins.dll" /> | 1855 | <Reference name="Mono.Addins" path="../../../../bin/"/> |
1858 | <Reference name="System"/> | 1856 | <Reference name="System"/> |
1859 | <Reference name="System.Xml"/> | 1857 | <Reference name="System.Xml"/> |
1860 | <Reference name="System.Drawing"/> | 1858 | <Reference name="System.Drawing"/> |
1861 | <Reference name="OpenMetaverseTypes.dll"/> | 1859 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
1862 | <Reference name="OpenMetaverse.dll"/> | 1860 | <Reference name="OpenMetaverse" path="../../../../bin/"/> |
1863 | <Reference name="Nini.dll" /> | 1861 | <Reference name="Nini" path="../../../../bin/"/> |
1864 | <Reference name="XMLRPC.dll" /> | 1862 | <Reference name="XMLRPC" path="../../../../bin/"/> |
1865 | <Reference name="OpenSim"/> | 1863 | <Reference name="OpenSim"/> |
1866 | <Reference name="OpenSim.Region.Framework"/> | 1864 | <Reference name="OpenSim.Region.Framework"/> |
1867 | <Reference name="OpenSim.Region.ClientStack"/> | 1865 | <Reference name="OpenSim.Region.ClientStack"/> |
@@ -1873,11 +1871,11 @@ | |||
1873 | <Reference name="OpenSim.Framework.Console"/> | 1871 | <Reference name="OpenSim.Framework.Console"/> |
1874 | <Reference name="OpenSim.Services.Interfaces"/> | 1872 | <Reference name="OpenSim.Services.Interfaces"/> |
1875 | <Reference name="OpenSim.ApplicationPlugins.Rest"/> | 1873 | <Reference name="OpenSim.ApplicationPlugins.Rest"/> |
1876 | <Reference name="log4net.dll"/> | 1874 | <Reference name="log4net" path="../../../../bin/"/> |
1877 | 1875 | ||
1878 | <Files> | 1876 | <Files> |
1879 | <Match pattern="*.cs" recurse="true"/> | 1877 | <Match pattern="*.cs" recurse="true"/> |
1880 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 1878 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
1881 | </Files> | 1879 | </Files> |
1882 | </Project> | 1880 | </Project> |
1883 | 1881 | ||
@@ -1910,11 +1908,11 @@ | |||
1910 | <Reference name="OpenSim.Region.Framework"/> | 1908 | <Reference name="OpenSim.Region.Framework"/> |
1911 | <Reference name="OpenSim.Region.CoreModules"/> | 1909 | <Reference name="OpenSim.Region.CoreModules"/> |
1912 | <Reference name="OpenSim.Services.Interfaces"/> | 1910 | <Reference name="OpenSim.Services.Interfaces"/> |
1913 | <Reference name="OpenMetaverseTypes.dll"/> | 1911 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1914 | <Reference name="OpenMetaverse.dll"/> | 1912 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1915 | <Reference name="Nini.dll" /> | 1913 | <Reference name="Nini" path="../../../bin/"/> |
1916 | <Reference name="Mono.Addins" /> | 1914 | <Reference name="Mono.Addins"/> |
1917 | <Reference name="log4net.dll" /> | 1915 | <Reference name="log4net" path="../../../bin/"/> |
1918 | <Files> | 1916 | <Files> |
1919 | <Match pattern="*.cs" recurse="true"/> | 1917 | <Match pattern="*.cs" recurse="true"/> |
1920 | </Files> | 1918 | </Files> |
@@ -1934,13 +1932,13 @@ | |||
1934 | 1932 | ||
1935 | <ReferencePath>../../../../bin/</ReferencePath> | 1933 | <ReferencePath>../../../../bin/</ReferencePath> |
1936 | 1934 | ||
1937 | <Reference name="OpenMetaverseTypes.dll"/> | 1935 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
1938 | <Reference name="OpenMetaverse.dll"/> | 1936 | <Reference name="OpenMetaverse" path="../../../../bin/"/> |
1939 | <Reference name="System"/> | 1937 | <Reference name="System"/> |
1940 | <Reference name="OpenSim.Framework"/> | 1938 | <Reference name="OpenSim.Framework"/> |
1941 | <Reference name="OpenSim.Region.Framework"/> | 1939 | <Reference name="OpenSim.Region.Framework"/> |
1942 | <Reference name="Nini.dll" /> | 1940 | <Reference name="Nini" path="../../../../bin/"/> |
1943 | <Reference name="log4net.dll"/> | 1941 | <Reference name="log4net" path="../../../../bin/"/> |
1944 | <Files> | 1942 | <Files> |
1945 | <Match pattern="*.cs" recurse="true"/> | 1943 | <Match pattern="*.cs" recurse="true"/> |
1946 | </Files> | 1944 | </Files> |
@@ -1962,17 +1960,17 @@ | |||
1962 | 1960 | ||
1963 | <ReferencePath>../../../bin/</ReferencePath> | 1961 | <ReferencePath>../../../bin/</ReferencePath> |
1964 | 1962 | ||
1965 | <Reference name="OpenMetaverseTypes.dll"/> | 1963 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1966 | <Reference name="OpenMetaverse.dll"/> | 1964 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1967 | <Reference name="System"/> | 1965 | <Reference name="System"/> |
1968 | <Reference name="OpenSim.Framework"/> | 1966 | <Reference name="OpenSim.Framework"/> |
1969 | <Reference name="OpenSim.Region.Framework"/> | 1967 | <Reference name="OpenSim.Region.Framework"/> |
1970 | <Reference name="OpenSim.Framework.Communications"/> | 1968 | <Reference name="OpenSim.Framework.Communications"/> |
1971 | <Reference name="OpenSim.Services.Interfaces"/> | 1969 | <Reference name="OpenSim.Services.Interfaces"/> |
1972 | <Reference name="Nini.dll" /> | 1970 | <Reference name="Nini" path="../../../bin/"/> |
1973 | <Reference name="log4net.dll"/> | 1971 | <Reference name="log4net" path="../../../bin/"/> |
1974 | <Reference name="protobuf-net"/> | 1972 | <Reference name="protobuf-net"/> |
1975 | <Reference name="MXP.dll"/> | 1973 | <Reference name="MXP" path="../../../bin/"/> |
1976 | <Reference name="Mono.Addins"/> | 1974 | <Reference name="Mono.Addins"/> |
1977 | <Files> | 1975 | <Files> |
1978 | <Match pattern="*.cs" recurse="true"/> | 1976 | <Match pattern="*.cs" recurse="true"/> |
@@ -1994,8 +1992,8 @@ | |||
1994 | 1992 | ||
1995 | <ReferencePath>../../../bin/</ReferencePath> | 1993 | <ReferencePath>../../../bin/</ReferencePath> |
1996 | 1994 | ||
1997 | <Reference name="OpenMetaverseTypes.dll"/> | 1995 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1998 | <Reference name="OpenMetaverse.dll"/> | 1996 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1999 | <Reference name="System"/> | 1997 | <Reference name="System"/> |
2000 | <Reference name="System.Drawing"/> | 1998 | <Reference name="System.Drawing"/> |
2001 | <Reference name="OpenSim.Framework"/> | 1999 | <Reference name="OpenSim.Framework"/> |
@@ -2004,9 +2002,9 @@ | |||
2004 | <Reference name="OpenSim.Region.Framework"/> | 2002 | <Reference name="OpenSim.Region.Framework"/> |
2005 | <Reference name="OpenSim.Framework.Communications"/> | 2003 | <Reference name="OpenSim.Framework.Communications"/> |
2006 | <Reference name="OpenSim.Services.Interfaces"/> | 2004 | <Reference name="OpenSim.Services.Interfaces"/> |
2007 | <Reference name="Nini.dll" /> | 2005 | <Reference name="Nini" path="../../../bin/"/> |
2008 | <Reference name="log4net.dll"/> | 2006 | <Reference name="log4net" path="../../../bin/"/> |
2009 | <Reference name="Google.ProtocolBuffers.dll"/> | 2007 | <Reference name="Google.ProtocolBuffers" path="../../../bin/"/> |
2010 | <Files> | 2008 | <Files> |
2011 | <Match pattern="*.cs" recurse="true"/> | 2009 | <Match pattern="*.cs" recurse="true"/> |
2012 | </Files> | 2010 | </Files> |
@@ -2026,8 +2024,8 @@ | |||
2026 | 2024 | ||
2027 | <ReferencePath>../../../bin/</ReferencePath> | 2025 | <ReferencePath>../../../bin/</ReferencePath> |
2028 | 2026 | ||
2029 | <Reference name="OpenMetaverseTypes.dll"/> | 2027 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2030 | <Reference name="OpenMetaverse.dll"/> | 2028 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2031 | <Reference name="System"/> | 2029 | <Reference name="System"/> |
2032 | <Reference name="System.Drawing"/> | 2030 | <Reference name="System.Drawing"/> |
2033 | <Reference name="OpenSim.Framework"/> | 2031 | <Reference name="OpenSim.Framework"/> |
@@ -2036,8 +2034,8 @@ | |||
2036 | <Reference name="OpenSim.Region.Framework"/> | 2034 | <Reference name="OpenSim.Region.Framework"/> |
2037 | <Reference name="OpenSim.Framework.Communications"/> | 2035 | <Reference name="OpenSim.Framework.Communications"/> |
2038 | <Reference name="OpenSim.Services.Interfaces"/> | 2036 | <Reference name="OpenSim.Services.Interfaces"/> |
2039 | <Reference name="Nini.dll" /> | 2037 | <Reference name="Nini" path="../../../bin/"/> |
2040 | <Reference name="log4net.dll"/> | 2038 | <Reference name="log4net" path="../../../bin/"/> |
2041 | <Files> | 2039 | <Files> |
2042 | <Match pattern="*.cs" recurse="true"/> | 2040 | <Match pattern="*.cs" recurse="true"/> |
2043 | </Files> | 2041 | </Files> |
@@ -2057,26 +2055,26 @@ | |||
2057 | 2055 | ||
2058 | <ReferencePath>../../../bin/</ReferencePath> | 2056 | <ReferencePath>../../../bin/</ReferencePath> |
2059 | 2057 | ||
2060 | <Reference name="OpenMetaverseTypes.dll"/> | 2058 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2061 | <Reference name="OpenMetaverse.dll"/> | 2059 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2062 | <Reference name="System"/> | 2060 | <Reference name="System"/> |
2063 | <Reference name="OpenSim.Framework"/> | 2061 | <Reference name="OpenSim.Framework"/> |
2064 | <Reference name="OpenSim.Region.Framework"/> | 2062 | <Reference name="OpenSim.Region.Framework"/> |
2065 | <Reference name="OpenSim.Framework.Communications"/> | 2063 | <Reference name="OpenSim.Framework.Communications"/> |
2066 | <Reference name="Nini.dll" /> | 2064 | <Reference name="Nini" path="../../../bin/"/> |
2067 | <Reference name="log4net.dll"/> | 2065 | <Reference name="log4net" path="../../../bin/"/> |
2068 | <Reference name="OpenSim.Framework.Capabilities"/> | 2066 | <Reference name="OpenSim.Framework.Capabilities"/> |
2069 | <Reference name="OpenSim.Framework.Servers"/> | 2067 | <Reference name="OpenSim.Framework.Servers"/> |
2070 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 2068 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
2071 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 2069 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
2072 | <Reference name="OpenSim.Region.ClientStack"/> | 2070 | <Reference name="OpenSim.Region.ClientStack"/> |
2073 | <Reference name="OpenSim.Region.ClientStack.LindenUDP"/> | 2071 | <Reference name="OpenSim.Region.ClientStack.LindenUDP"/> |
2074 | <Reference name="OpenSim.Services.Interfaces"/> | 2072 | <Reference name="OpenSim.Services.Interfaces"/> |
2075 | <Reference name="XMLRPC.dll"/> | 2073 | <Reference name="XMLRPC" path="../../../bin/"/> |
2076 | <Reference name="OpenSim.Region.Framework"/> | 2074 | <Reference name="OpenSim.Region.Framework"/> |
2077 | <Files> | 2075 | <Files> |
2078 | <Match pattern="*.cs" recurse="true"/> | 2076 | <Match pattern="*.cs" recurse="true"/> |
2079 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 2077 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
2080 | </Files> | 2078 | </Files> |
2081 | </Project> | 2079 | </Project> |
2082 | 2080 | ||
@@ -2102,21 +2100,21 @@ | |||
2102 | <Reference name="System.Drawing"/> | 2100 | <Reference name="System.Drawing"/> |
2103 | <Reference name="OpenSim.Framework"/> | 2101 | <Reference name="OpenSim.Framework"/> |
2104 | <Reference name="OpenSim.Data"/> | 2102 | <Reference name="OpenSim.Data"/> |
2105 | <Reference name="OpenMetaverseTypes.dll"/> | 2103 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2106 | <Reference name="OpenMetaverse.dll"/> | 2104 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2107 | <Reference name="MySql.Data.dll"/> | 2105 | <Reference name="MySql.Data" path="../../../bin/"/> |
2108 | <Reference name="OpenSim.Framework.Console"/> | 2106 | <Reference name="OpenSim.Framework.Console"/> |
2109 | <Reference name="OpenSim.Region.Framework"/> | 2107 | <Reference name="OpenSim.Region.Framework"/> |
2110 | <Reference name="log4net.dll"/> | 2108 | <Reference name="log4net" path="../../../bin/"/> |
2111 | <Reference name="Mono.Addins.dll" /> | 2109 | <Reference name="Mono.Addins" path="../../../bin/"/> |
2112 | 2110 | ||
2113 | <Files> | 2111 | <Files> |
2114 | <Match pattern="*.cs" recurse="true" > | 2112 | <Match pattern="*.cs" recurse="true"> |
2115 | <Exclude name="Tests" pattern="Tests" /> | 2113 | <Exclude name="Tests" pattern="Tests"/> |
2116 | </Match> | 2114 | </Match> |
2117 | <Match path="Resources" pattern="*.sql" buildAction="EmbeddedResource"/> | 2115 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.sql"/> |
2118 | <Match path="Resources" pattern="*.migrations" buildAction="EmbeddedResource"/> | 2116 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.migrations"/> |
2119 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 2117 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
2120 | </Files> | 2118 | </Files> |
2121 | </Project> | 2119 | </Project> |
2122 | 2120 | ||
@@ -2141,16 +2139,16 @@ | |||
2141 | <Reference name="OpenSim.Data"/> | 2139 | <Reference name="OpenSim.Data"/> |
2142 | <Reference name="OpenSim.Region.Framework"/> | 2140 | <Reference name="OpenSim.Region.Framework"/> |
2143 | <Reference name="OpenSim.Framework.Console"/> | 2141 | <Reference name="OpenSim.Framework.Console"/> |
2144 | <Reference name="OpenMetaverseTypes.dll"/> | 2142 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2145 | <Reference name="OpenMetaverse.dll"/> | 2143 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2146 | <Reference name="log4net.dll"/> | 2144 | <Reference name="log4net" path="../../../bin/"/> |
2147 | <Reference name="Mono.Addins.dll" /> | 2145 | <Reference name="Mono.Addins" path="../../../bin/"/> |
2148 | 2146 | ||
2149 | <Files> | 2147 | <Files> |
2150 | <Match pattern="*.cs" recurse="true"/> | 2148 | <Match pattern="*.cs" recurse="true"/> |
2151 | <Match path="Resources" pattern="*.sql" buildAction="EmbeddedResource"/> | 2149 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.sql"/> |
2152 | <Match path="Resources" pattern="*.migrations" buildAction="EmbeddedResource"/> | 2150 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.migrations"/> |
2153 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 2151 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
2154 | </Files> | 2152 | </Files> |
2155 | </Project> | 2153 | </Project> |
2156 | 2154 | ||
@@ -2170,25 +2168,25 @@ | |||
2170 | <Reference name="System"/> | 2168 | <Reference name="System"/> |
2171 | <Reference name="System.Xml"/> | 2169 | <Reference name="System.Xml"/> |
2172 | <Reference name="System.Data"/> | 2170 | <Reference name="System.Data"/> |
2173 | <Reference name="System.Data.SQLite.dll"/> | 2171 | <Reference name="System.Data.SQLite" path="../../../bin/"/> |
2174 | <Reference name="OpenSim.Data"/> | 2172 | <Reference name="OpenSim.Data"/> |
2175 | <Reference name="System.Drawing"/> | 2173 | <Reference name="System.Drawing"/> |
2176 | <Reference name="OpenSim.Framework"/> | 2174 | <Reference name="OpenSim.Framework"/> |
2177 | <Reference name="OpenSim.Framework.Console"/> | 2175 | <Reference name="OpenSim.Framework.Console"/> |
2178 | <Reference name="OpenSim.Region.Framework"/> | 2176 | <Reference name="OpenSim.Region.Framework"/> |
2179 | <Reference name="OpenMetaverseTypes.dll"/> | 2177 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2180 | <Reference name="OpenMetaverse.dll"/> | 2178 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2181 | <Reference name="Mono.Data.SqliteClient"/> | 2179 | <Reference name="Mono.Data.SqliteClient"/> |
2182 | <Reference name="Mono.Addins.dll" /> | 2180 | <Reference name="Mono.Addins" path="../../../bin/"/> |
2183 | <Reference name="log4net.dll"/> | 2181 | <Reference name="log4net" path="../../../bin/"/> |
2184 | 2182 | ||
2185 | <Files> | 2183 | <Files> |
2186 | <Match pattern="*.cs" recurse="true" > | 2184 | <Match pattern="*.cs" recurse="true"> |
2187 | <Exclude name="Tests" pattern="Tests" /> | 2185 | <Exclude name="Tests" pattern="Tests"/> |
2188 | </Match> | 2186 | </Match> |
2189 | <Match path="Resources" pattern="*.sql" buildAction="EmbeddedResource"/> | 2187 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.sql"/> |
2190 | <Match path="Resources" pattern="*.migrations" buildAction="EmbeddedResource"/> | 2188 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.migrations"/> |
2191 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 2189 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
2192 | </Files> | 2190 | </Files> |
2193 | </Project> | 2191 | </Project> |
2194 | 2192 | ||
@@ -2213,20 +2211,20 @@ | |||
2213 | <Reference name="OpenSim.Framework"/> | 2211 | <Reference name="OpenSim.Framework"/> |
2214 | <Reference name="OpenSim.Framework.Console"/> | 2212 | <Reference name="OpenSim.Framework.Console"/> |
2215 | <Reference name="OpenSim.Region.Framework"/> | 2213 | <Reference name="OpenSim.Region.Framework"/> |
2216 | <Reference name="OpenMetaverseTypes.dll"/> | 2214 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2217 | <Reference name="OpenMetaverse.dll"/> | 2215 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2218 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 2216 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
2219 | <Reference name="Mono.Data.Sqlite"/> | 2217 | <Reference name="Mono.Data.Sqlite"/> |
2220 | <Reference name="Mono.Addins.dll" /> | 2218 | <Reference name="Mono.Addins" path="../../../bin/"/> |
2221 | <Reference name="log4net.dll"/> | 2219 | <Reference name="log4net" path="../../../bin/"/> |
2222 | 2220 | ||
2223 | <Files> | 2221 | <Files> |
2224 | <Match pattern="*.cs" recurse="true" > | 2222 | <Match pattern="*.cs" recurse="true"> |
2225 | <Exclude name="Tests" pattern="Tests" /> | 2223 | <Exclude name="Tests" pattern="Tests"/> |
2226 | </Match> | 2224 | </Match> |
2227 | <Match path="Resources" pattern="*.sql" buildAction="EmbeddedResource"/> | 2225 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.sql"/> |
2228 | <Match path="Resources" pattern="*.migrations" buildAction="EmbeddedResource"/> | 2226 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.migrations"/> |
2229 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 2227 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
2230 | </Files> | 2228 | </Files> |
2231 | </Project> | 2229 | </Project> |
2232 | 2230 | ||
@@ -2249,18 +2247,18 @@ | |||
2249 | <Reference name="System.Net"/> | 2247 | <Reference name="System.Net"/> |
2250 | <Reference name="System.Web"/> | 2248 | <Reference name="System.Web"/> |
2251 | <Reference name="System.Xml"/> | 2249 | <Reference name="System.Xml"/> |
2252 | <Reference name="OpenMetaverseTypes.dll"/> | 2250 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
2253 | <Reference name="OpenSim" /> | 2251 | <Reference name="OpenSim"/> |
2254 | <Reference name="OpenSim.Framework"/> | 2252 | <Reference name="OpenSim.Framework"/> |
2255 | <Reference name="OpenSim.Framework.Communications"/> | 2253 | <Reference name="OpenSim.Framework.Communications"/> |
2256 | <Reference name="OpenSim.Region.Framework" /> | 2254 | <Reference name="OpenSim.Region.Framework"/> |
2257 | <Reference name="OpenSim.Region.CoreModules" /> | 2255 | <Reference name="OpenSim.Region.CoreModules"/> |
2258 | <Reference name="OpenSim.Framework.Console"/> | 2256 | <Reference name="OpenSim.Framework.Console"/> |
2259 | <Reference name="OpenSim.Services.Interfaces"/> | 2257 | <Reference name="OpenSim.Services.Interfaces"/> |
2260 | <Reference name="Nini.dll" /> | 2258 | <Reference name="Nini" path="../../../../bin/"/> |
2261 | <Reference name="RAIL.dll"/> | 2259 | <Reference name="RAIL" path="../../../../bin/"/> |
2262 | <Reference name="Nini.dll" /> | 2260 | <Reference name="Nini" path="../../../../bin/"/> |
2263 | <Reference name="log4net.dll"/> | 2261 | <Reference name="log4net" path="../../../../bin/"/> |
2264 | <Reference name="SmartThreadPool"/> | 2262 | <Reference name="SmartThreadPool"/> |
2265 | 2263 | ||
2266 | <Files> | 2264 | <Files> |
@@ -2287,18 +2285,18 @@ | |||
2287 | <Reference name="System.Data"/> | 2285 | <Reference name="System.Data"/> |
2288 | <Reference name="System.Web"/> | 2286 | <Reference name="System.Web"/> |
2289 | <Reference name="System.Xml"/> | 2287 | <Reference name="System.Xml"/> |
2290 | <Reference name="OpenMetaverseTypes.dll"/> | 2288 | <Reference name="OpenMetaverseTypes" path="../../../../../../bin/"/> |
2291 | <Reference name="OpenSim" /> | 2289 | <Reference name="OpenSim"/> |
2292 | <Reference name="OpenSim.Framework"/> | 2290 | <Reference name="OpenSim.Framework"/> |
2293 | <Reference name="OpenSim.Framework.Communications"/> | 2291 | <Reference name="OpenSim.Framework.Communications"/> |
2294 | <Reference name="OpenSim.Region.Framework" /> | 2292 | <Reference name="OpenSim.Region.Framework"/> |
2295 | <Reference name="OpenSim.Region.CoreModules" /> | 2293 | <Reference name="OpenSim.Region.CoreModules"/> |
2296 | <Reference name="OpenSim.Framework.Console"/> | 2294 | <Reference name="OpenSim.Framework.Console"/> |
2297 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> | 2295 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> |
2298 | <Reference name="Nini.dll" /> | 2296 | <Reference name="Nini" path="../../../../../../bin/"/> |
2299 | <Reference name="RAIL.dll"/> | 2297 | <Reference name="RAIL" path="../../../../../../bin/"/> |
2300 | <Reference name="Nini.dll" /> | 2298 | <Reference name="Nini" path="../../../../../../bin/"/> |
2301 | <Reference name="log4net.dll"/> | 2299 | <Reference name="log4net" path="../../../../../../bin/"/> |
2302 | 2300 | ||
2303 | <Files> | 2301 | <Files> |
2304 | <Match pattern="*.cs" recurse="false"/> | 2302 | <Match pattern="*.cs" recurse="false"/> |
@@ -2322,17 +2320,17 @@ | |||
2322 | <Reference name="System.Data"/> | 2320 | <Reference name="System.Data"/> |
2323 | <Reference name="System.Web"/> | 2321 | <Reference name="System.Web"/> |
2324 | <Reference name="System.Xml"/> | 2322 | <Reference name="System.Xml"/> |
2325 | <Reference name="OpenMetaverseTypes.dll"/> | 2323 | <Reference name="OpenMetaverseTypes" path="../../../../../../../bin/"/> |
2326 | <Reference name="OpenSim" /> | 2324 | <Reference name="OpenSim"/> |
2327 | <Reference name="OpenSim.Framework"/> | 2325 | <Reference name="OpenSim.Framework"/> |
2328 | <Reference name="OpenSim.Framework.Communications"/> | 2326 | <Reference name="OpenSim.Framework.Communications"/> |
2329 | <Reference name="OpenSim.Region.CoreModules" /> | 2327 | <Reference name="OpenSim.Region.CoreModules"/> |
2330 | <Reference name="OpenSim.Framework.Console"/> | 2328 | <Reference name="OpenSim.Framework.Console"/> |
2331 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> | 2329 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> |
2332 | <Reference name="Nini.dll" /> | 2330 | <Reference name="Nini" path="../../../../../../../bin/"/> |
2333 | <Reference name="RAIL.dll"/> | 2331 | <Reference name="RAIL" path="../../../../../../../bin/"/> |
2334 | <Reference name="Nini.dll" /> | 2332 | <Reference name="Nini" path="../../../../../../../bin/"/> |
2335 | <Reference name="log4net.dll"/> | 2333 | <Reference name="log4net" path="../../../../../../../bin/"/> |
2336 | 2334 | ||
2337 | <Files> | 2335 | <Files> |
2338 | <Match pattern="*.cs" recurse="false"/> | 2336 | <Match pattern="*.cs" recurse="false"/> |
@@ -2356,22 +2354,22 @@ | |||
2356 | <Reference name="System.Data"/> | 2354 | <Reference name="System.Data"/> |
2357 | <Reference name="System.Web"/> | 2355 | <Reference name="System.Web"/> |
2358 | <Reference name="System.Xml"/> | 2356 | <Reference name="System.Xml"/> |
2359 | <Reference name="OpenMetaverseTypes.dll"/> | 2357 | <Reference name="OpenMetaverseTypes" path="../../../../../../bin/"/> |
2360 | <Reference name="OpenMetaverse.dll"/> | 2358 | <Reference name="OpenMetaverse" path="../../../../../../bin/"/> |
2361 | <Reference name="OpenSim" /> | 2359 | <Reference name="OpenSim"/> |
2362 | <Reference name="OpenSim.Framework"/> | 2360 | <Reference name="OpenSim.Framework"/> |
2363 | <Reference name="OpenSim.Framework.Communications"/> | 2361 | <Reference name="OpenSim.Framework.Communications"/> |
2364 | <Reference name="OpenSim.Region.Framework" /> | 2362 | <Reference name="OpenSim.Region.Framework"/> |
2365 | <Reference name="OpenSim.Region.CoreModules" /> | 2363 | <Reference name="OpenSim.Region.CoreModules"/> |
2366 | <Reference name="OpenSim.Region.Physics.Manager" /> | 2364 | <Reference name="OpenSim.Region.Physics.Manager"/> |
2367 | <Reference name="OpenSim.Framework.Console"/> | 2365 | <Reference name="OpenSim.Framework.Console"/> |
2368 | <Reference name="OpenSim.Services.Interfaces"/> | 2366 | <Reference name="OpenSim.Services.Interfaces"/> |
2369 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> | 2367 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> |
2370 | <Reference name="OpenSim.Region.ScriptEngine.Shared.Api.Runtime"/> | 2368 | <Reference name="OpenSim.Region.ScriptEngine.Shared.Api.Runtime"/> |
2371 | <Reference name="Nini.dll" /> | 2369 | <Reference name="Nini" path="../../../../../../bin/"/> |
2372 | <Reference name="RAIL.dll"/> | 2370 | <Reference name="RAIL" path="../../../../../../bin/"/> |
2373 | <Reference name="Nini.dll" /> | 2371 | <Reference name="Nini" path="../../../../../../bin/"/> |
2374 | <Reference name="log4net.dll"/> | 2372 | <Reference name="log4net" path="../../../../../../bin/"/> |
2375 | 2373 | ||
2376 | <Files> | 2374 | <Files> |
2377 | <Match pattern="*.cs" recurse="true"/> | 2375 | <Match pattern="*.cs" recurse="true"/> |
@@ -2392,20 +2390,20 @@ | |||
2392 | 2390 | ||
2393 | <ReferencePath>../../../../../bin/</ReferencePath> | 2391 | <ReferencePath>../../../../../bin/</ReferencePath> |
2394 | <Reference name="System"/> | 2392 | <Reference name="System"/> |
2395 | <Reference name="OpenSim.Framework" /> | 2393 | <Reference name="OpenSim.Framework"/> |
2396 | <Reference name="OpenSim.Region.Framework" /> | 2394 | <Reference name="OpenSim.Region.Framework"/> |
2397 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> | 2395 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> |
2398 | <Reference name="OpenSim.Region.ScriptEngine.Shared.YieldProlog"/> | 2396 | <Reference name="OpenSim.Region.ScriptEngine.Shared.YieldProlog"/> |
2399 | <Reference name="OpenSim.Region.CoreModules" /> | 2397 | <Reference name="OpenSim.Region.CoreModules"/> |
2400 | <Reference name="OpenMetaverseTypes.dll"/> | 2398 | <Reference name="OpenMetaverseTypes" path="../../../../../bin/"/> |
2401 | <Reference name="Nini.dll" /> | 2399 | <Reference name="Nini" path="../../../../../bin/"/> |
2402 | <Reference name="RAIL.dll"/> | 2400 | <Reference name="RAIL" path="../../../../../bin/"/> |
2403 | <Reference name="log4net.dll"/> | 2401 | <Reference name="log4net" path="../../../../../bin/"/> |
2404 | <Reference name="Tools.dll"/> | 2402 | <Reference name="Tools" path="../../../../../bin/"/> |
2405 | 2403 | ||
2406 | <Files> | 2404 | <Files> |
2407 | <Match pattern="*.cs" recurse="true"> | 2405 | <Match pattern="*.cs" recurse="true"> |
2408 | <Exclude name="Tests" pattern="Tests" /> | 2406 | <Exclude name="Tests" pattern="Tests"/> |
2409 | </Match> | 2407 | </Match> |
2410 | </Files> | 2408 | </Files> |
2411 | </Project> | 2409 | </Project> |
@@ -2427,22 +2425,22 @@ | |||
2427 | <Reference name="System.Data"/> | 2425 | <Reference name="System.Data"/> |
2428 | <Reference name="System.Web"/> | 2426 | <Reference name="System.Web"/> |
2429 | <Reference name="System.Xml"/> | 2427 | <Reference name="System.Xml"/> |
2430 | <Reference name="OpenMetaverseTypes.dll"/> | 2428 | <Reference name="OpenMetaverseTypes" path="../../../../../bin/"/> |
2431 | <Reference name="OpenSim" /> | 2429 | <Reference name="OpenSim"/> |
2432 | <Reference name="OpenSim.Framework"/> | 2430 | <Reference name="OpenSim.Framework"/> |
2433 | <Reference name="OpenSim.Framework.Communications"/> | 2431 | <Reference name="OpenSim.Framework.Communications"/> |
2434 | <Reference name="OpenSim.Region.Framework" /> | 2432 | <Reference name="OpenSim.Region.Framework"/> |
2435 | <Reference name="OpenSim.Region.CoreModules" /> | 2433 | <Reference name="OpenSim.Region.CoreModules"/> |
2436 | <Reference name="OpenSim.Framework.Console"/> | 2434 | <Reference name="OpenSim.Framework.Console"/> |
2437 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> | 2435 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> |
2438 | <Reference name="OpenSim.Region.ScriptEngine.Shared.CodeTools"/> | 2436 | <Reference name="OpenSim.Region.ScriptEngine.Shared.CodeTools"/> |
2439 | <Reference name="OpenSim.Region.ScriptEngine.Shared.Api"/> | 2437 | <Reference name="OpenSim.Region.ScriptEngine.Shared.Api"/> |
2440 | <Reference name="OpenSim.Region.ScriptEngine.Shared.Api.Runtime"/> | 2438 | <Reference name="OpenSim.Region.ScriptEngine.Shared.Api.Runtime"/> |
2441 | <Reference name="SmartThreadPool"/> | 2439 | <Reference name="SmartThreadPool"/> |
2442 | <Reference name="Axiom.MathLib.dll"/> | 2440 | <Reference name="Axiom.MathLib" path="../../../../../bin/"/> |
2443 | <Reference name="Nini.dll" /> | 2441 | <Reference name="Nini" path="../../../../../bin/"/> |
2444 | <Reference name="RAIL.dll"/> | 2442 | <Reference name="RAIL" path="../../../../../bin/"/> |
2445 | <Reference name="log4net.dll"/> | 2443 | <Reference name="log4net" path="../../../../../bin/"/> |
2446 | 2444 | ||
2447 | <Files> | 2445 | <Files> |
2448 | <Match pattern="*.cs" recurse="true"/> | 2446 | <Match pattern="*.cs" recurse="true"/> |
@@ -2466,27 +2464,27 @@ | |||
2466 | <Reference name="System.Data"/> | 2464 | <Reference name="System.Data"/> |
2467 | <Reference name="System.Web"/> | 2465 | <Reference name="System.Web"/> |
2468 | <Reference name="System.Xml"/> | 2466 | <Reference name="System.Xml"/> |
2469 | <Reference name="OpenMetaverseTypes.dll"/> | 2467 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
2470 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 2468 | <Reference name="OpenMetaverse.StructuredData" path="../../../../bin/"/> |
2471 | <Reference name="OpenSim" /> | 2469 | <Reference name="OpenSim"/> |
2472 | <Reference name="OpenSim.Framework"/> | 2470 | <Reference name="OpenSim.Framework"/> |
2473 | <Reference name="OpenSim.Framework.Communications"/> | 2471 | <Reference name="OpenSim.Framework.Communications"/> |
2474 | <Reference name="OpenSim.Region.Framework" /> | 2472 | <Reference name="OpenSim.Region.Framework"/> |
2475 | <Reference name="OpenSim.Region.CoreModules" /> | 2473 | <Reference name="OpenSim.Region.CoreModules"/> |
2476 | <Reference name="OpenSim.Framework.Console"/> | 2474 | <Reference name="OpenSim.Framework.Console"/> |
2477 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> | 2475 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> |
2478 | <Reference name="OpenSim.Region.ScriptEngine.Shared.CodeTools"/> | 2476 | <Reference name="OpenSim.Region.ScriptEngine.Shared.CodeTools"/> |
2479 | <Reference name="OpenSim.Region.ScriptEngine.Shared.Instance"/> | 2477 | <Reference name="OpenSim.Region.ScriptEngine.Shared.Instance"/> |
2480 | <Reference name="OpenSim.Region.ScriptEngine.Shared.Api"/> | 2478 | <Reference name="OpenSim.Region.ScriptEngine.Shared.Api"/> |
2481 | <Reference name="SmartThreadPool"/> | 2479 | <Reference name="SmartThreadPool"/> |
2482 | <Reference name="Nini.dll" /> | 2480 | <Reference name="Nini" path="../../../../bin/"/> |
2483 | <Reference name="RAIL.dll"/> | 2481 | <Reference name="RAIL" path="../../../../bin/"/> |
2484 | <Reference name="log4net.dll"/> | 2482 | <Reference name="log4net" path="../../../../bin/"/> |
2485 | 2483 | ||
2486 | <Files> | 2484 | <Files> |
2487 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 2485 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
2488 | <Match pattern="*.cs" recurse="true"> | 2486 | <Match pattern="*.cs" recurse="true"> |
2489 | <Exclude name="Tests" pattern="Tests" /> | 2487 | <Exclude name="Tests" pattern="Tests"/> |
2490 | </Match> | 2488 | </Match> |
2491 | </Files> | 2489 | </Files> |
2492 | </Project> | 2490 | </Project> |
@@ -2511,13 +2509,13 @@ | |||
2511 | <Reference name="System.Drawing"/> | 2509 | <Reference name="System.Drawing"/> |
2512 | <Reference name="System.Runtime.Remoting"/> | 2510 | <Reference name="System.Runtime.Remoting"/> |
2513 | <Reference name="System.Web"/> | 2511 | <Reference name="System.Web"/> |
2514 | <Reference name="OpenMetaverseTypes.dll"/> | 2512 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2515 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 2513 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
2516 | <Reference name="OpenMetaverse.dll"/> | 2514 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2517 | <Reference name="OpenSim.Framework"/> | 2515 | <Reference name="OpenSim.Framework"/> |
2518 | <Reference name="OpenSim.Data" /> | 2516 | <Reference name="OpenSim.Data"/> |
2519 | <Reference name="OpenSim.Region.Framework" /> | 2517 | <Reference name="OpenSim.Region.Framework"/> |
2520 | <Reference name="OpenSim.Region.CoreModules" /> | 2518 | <Reference name="OpenSim.Region.CoreModules"/> |
2521 | <Reference name="OpenSim.Framework.Console"/> | 2519 | <Reference name="OpenSim.Framework.Console"/> |
2522 | <Reference name="OpenSim.Framework.Servers"/> | 2520 | <Reference name="OpenSim.Framework.Servers"/> |
2523 | <Reference name="OpenSim.Framework.Capabilities"/> | 2521 | <Reference name="OpenSim.Framework.Capabilities"/> |
@@ -2528,15 +2526,15 @@ | |||
2528 | <Reference name="Mono.Addins"/> | 2526 | <Reference name="Mono.Addins"/> |
2529 | 2527 | ||
2530 | <!-- For scripting in funny languages by default --> | 2528 | <!-- For scripting in funny languages by default --> |
2531 | <Reference name="XMLRPC.dll"/> | 2529 | <Reference name="XMLRPC" path="../../../bin/"/> |
2532 | <Reference name="OpenSim.Framework.Communications"/> | 2530 | <Reference name="OpenSim.Framework.Communications"/> |
2533 | <Reference name="Nini.dll" /> | 2531 | <Reference name="Nini" path="../../../bin/"/> |
2534 | <Reference name="log4net.dll"/> | 2532 | <Reference name="log4net" path="../../../bin/"/> |
2535 | <Reference name="DotNetOpenMail.dll"/> | 2533 | <Reference name="DotNetOpenMail" path="../../../bin/"/> |
2536 | 2534 | ||
2537 | <Files> | 2535 | <Files> |
2538 | <Match pattern="*.cs" recurse="true"> | 2536 | <Match pattern="*.cs" recurse="true"> |
2539 | <Exclude name="Tests" pattern="Tests" /> | 2537 | <Exclude name="Tests" pattern="Tests"/> |
2540 | </Match> | 2538 | </Match> |
2541 | </Files> | 2539 | </Files> |
2542 | </Project> | 2540 | </Project> |
@@ -2557,12 +2555,12 @@ | |||
2557 | 2555 | ||
2558 | <ReferencePath>../../../bin/</ReferencePath> | 2556 | <ReferencePath>../../../bin/</ReferencePath> |
2559 | <Reference name="System"/> | 2557 | <Reference name="System"/> |
2560 | <Reference name="OpenMetaverseTypes.dll"/> | 2558 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2561 | <Reference name="OpenMetaverse.dll"/> | 2559 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2562 | <Reference name="OpenSim.Framework"/> | 2560 | <Reference name="OpenSim.Framework"/> |
2563 | <Reference name="OpenSim.Framework.Console"/> | 2561 | <Reference name="OpenSim.Framework.Console"/> |
2564 | <Reference name="Nini.dll" /> | 2562 | <Reference name="Nini" path="../../../bin/"/> |
2565 | <Reference name="log4net.dll"/> | 2563 | <Reference name="log4net" path="../../../bin/"/> |
2566 | 2564 | ||
2567 | <Files> | 2565 | <Files> |
2568 | <Match pattern="*.cs" recurse="true"/> | 2566 | <Match pattern="*.cs" recurse="true"/> |
@@ -2583,13 +2581,13 @@ | |||
2583 | 2581 | ||
2584 | <ReferencePath>../../../bin/</ReferencePath> | 2582 | <ReferencePath>../../../bin/</ReferencePath> |
2585 | <Reference name="System"/> | 2583 | <Reference name="System"/> |
2586 | <Reference name="OpenMetaverseTypes.dll"/> | 2584 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2587 | <Reference name="OpenMetaverse.dll"/> | 2585 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2588 | <Reference name="OpenSim.Framework"/> | 2586 | <Reference name="OpenSim.Framework"/> |
2589 | <Reference name="OpenSim.Framework.Console"/> | 2587 | <Reference name="OpenSim.Framework.Console"/> |
2590 | <Reference name="OpenSim.Region.ScriptEngine.Shared.CodeTools"/> | 2588 | <Reference name="OpenSim.Region.ScriptEngine.Shared.CodeTools"/> |
2591 | <Reference name="Nini.dll" /> | 2589 | <Reference name="Nini" path="../../../bin/"/> |
2592 | <Reference name="log4net.dll"/> | 2590 | <Reference name="log4net" path="../../../bin/"/> |
2593 | 2591 | ||
2594 | <Files> | 2592 | <Files> |
2595 | <Match pattern="*.cs" recurse="true"/> | 2593 | <Match pattern="*.cs" recurse="true"/> |
@@ -2611,8 +2609,8 @@ | |||
2611 | <ReferencePath>../../../bin/</ReferencePath> | 2609 | <ReferencePath>../../../bin/</ReferencePath> |
2612 | <Reference name="System"/> | 2610 | <Reference name="System"/> |
2613 | <Reference name="System.Xml"/> | 2611 | <Reference name="System.Xml"/> |
2614 | <Reference name="Nini.dll"/> | 2612 | <Reference name="Nini" path="../../../bin/"/> |
2615 | <Reference name="log4net.dll"/> | 2613 | <Reference name="log4net" path="../../../bin/"/> |
2616 | 2614 | ||
2617 | <Files> | 2615 | <Files> |
2618 | <Match pattern="*.cs" recurse="true"/> | 2616 | <Match pattern="*.cs" recurse="true"/> |
@@ -2634,13 +2632,13 @@ | |||
2634 | 2632 | ||
2635 | <ReferencePath>../../bin/</ReferencePath> | 2633 | <ReferencePath>../../bin/</ReferencePath> |
2636 | <Reference name="System"/> | 2634 | <Reference name="System"/> |
2637 | <Reference name="OpenMetaverseTypes.dll"/> | 2635 | <Reference name="OpenMetaverseTypes" path="../../bin/"/> |
2638 | <Reference name="OpenMetaverse.dll"/> | 2636 | <Reference name="OpenMetaverse" path="../../bin/"/> |
2639 | <Reference name="OpenSim.Framework"/> | 2637 | <Reference name="OpenSim.Framework"/> |
2640 | <Reference name="OpenSim.Framework.Console"/> | 2638 | <Reference name="OpenSim.Framework.Console"/> |
2641 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 2639 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
2642 | <Reference name="Nini.dll" /> | 2640 | <Reference name="Nini" path="../../bin/"/> |
2643 | <Reference name="log4net.dll"/> | 2641 | <Reference name="log4net" path="../../bin/"/> |
2644 | 2642 | ||
2645 | <Files> | 2643 | <Files> |
2646 | <Match pattern="*.cs" recurse="true"/> | 2644 | <Match pattern="*.cs" recurse="true"/> |
@@ -2662,13 +2660,13 @@ | |||
2662 | 2660 | ||
2663 | <ReferencePath>../../../../bin/</ReferencePath> | 2661 | <ReferencePath>../../../../bin/</ReferencePath> |
2664 | <Reference name="System"/> | 2662 | <Reference name="System"/> |
2665 | <Reference name="OpenMetaverseTypes.dll"/> | 2663 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
2666 | <Reference name="OpenMetaverse.dll"/> | 2664 | <Reference name="OpenMetaverse" path="../../../../bin/"/> |
2667 | <Reference name="OpenSim.Framework"/> | 2665 | <Reference name="OpenSim.Framework"/> |
2668 | <Reference name="OpenSim.Services.Interfaces" /> | 2666 | <Reference name="OpenSim.Services.Interfaces"/> |
2669 | <Reference name="OpenSim.Services.Connectors" /> | 2667 | <Reference name="OpenSim.Services.Connectors"/> |
2670 | <Reference name="Nini.dll" /> | 2668 | <Reference name="Nini" path="../../../../bin/"/> |
2671 | <Reference name="log4net.dll"/> | 2669 | <Reference name="log4net" path="../../../../bin/"/> |
2672 | 2670 | ||
2673 | <Files> | 2671 | <Files> |
2674 | <Match pattern="*.cs" recurse="true"/> | 2672 | <Match pattern="*.cs" recurse="true"/> |
@@ -2689,13 +2687,13 @@ | |||
2689 | 2687 | ||
2690 | <ReferencePath>../../../../bin/</ReferencePath> | 2688 | <ReferencePath>../../../../bin/</ReferencePath> |
2691 | <Reference name="System"/> | 2689 | <Reference name="System"/> |
2692 | <Reference name="OpenMetaverseTypes.dll"/> | 2690 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
2693 | <Reference name="OpenMetaverse.dll"/> | 2691 | <Reference name="OpenMetaverse" path="../../../../bin/"/> |
2694 | <Reference name="OpenSim.Framework"/> | 2692 | <Reference name="OpenSim.Framework"/> |
2695 | <Reference name="OpenSim.Services.Interfaces" /> | 2693 | <Reference name="OpenSim.Services.Interfaces"/> |
2696 | <Reference name="OpenSim.Services.Connectors" /> | 2694 | <Reference name="OpenSim.Services.Connectors"/> |
2697 | <Reference name="Nini.dll" /> | 2695 | <Reference name="Nini" path="../../../../bin/"/> |
2698 | <Reference name="log4net.dll"/> | 2696 | <Reference name="log4net" path="../../../../bin/"/> |
2699 | 2697 | ||
2700 | <Files> | 2698 | <Files> |
2701 | <Match pattern="*.cs" recurse="true"/> | 2699 | <Match pattern="*.cs" recurse="true"/> |
@@ -2716,13 +2714,13 @@ | |||
2716 | 2714 | ||
2717 | <ReferencePath>../../../../bin/</ReferencePath> | 2715 | <ReferencePath>../../../../bin/</ReferencePath> |
2718 | <Reference name="System"/> | 2716 | <Reference name="System"/> |
2719 | <Reference name="OpenMetaverseTypes.dll"/> | 2717 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
2720 | <Reference name="OpenMetaverse.dll"/> | 2718 | <Reference name="OpenMetaverse" path="../../../../bin/"/> |
2721 | <Reference name="OpenSim.Framework"/> | 2719 | <Reference name="OpenSim.Framework"/> |
2722 | <Reference name="OpenSim.Services.Interfaces" /> | 2720 | <Reference name="OpenSim.Services.Interfaces"/> |
2723 | <Reference name="OpenSim.Services.Connectors" /> | 2721 | <Reference name="OpenSim.Services.Connectors"/> |
2724 | <Reference name="Nini.dll" /> | 2722 | <Reference name="Nini" path="../../../../bin/"/> |
2725 | <Reference name="log4net.dll"/> | 2723 | <Reference name="log4net" path="../../../../bin/"/> |
2726 | 2724 | ||
2727 | <Files> | 2725 | <Files> |
2728 | <Match pattern="*.cs" recurse="true"/> | 2726 | <Match pattern="*.cs" recurse="true"/> |
@@ -2748,11 +2746,11 @@ | |||
2748 | <Reference name="System.Drawing"/> | 2746 | <Reference name="System.Drawing"/> |
2749 | <Reference name="System.Xml"/> | 2747 | <Reference name="System.Xml"/> |
2750 | <Reference name="System.Data"/> | 2748 | <Reference name="System.Data"/> |
2751 | <Reference name="log4net.dll"/> | 2749 | <Reference name="log4net" path="../../../bin/"/> |
2752 | <Reference name="Nini.dll" /> | 2750 | <Reference name="Nini" path="../../../bin/"/> |
2753 | <Reference name="nunit.framework.dll" /> | 2751 | <Reference name="nunit.framework" path="../../../bin/"/> |
2754 | <Reference name="OpenMetaverse.dll"/> | 2752 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2755 | <Reference name="OpenMetaverseTypes.dll"/> | 2753 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2756 | <Reference name="OpenSim.Framework"/> | 2754 | <Reference name="OpenSim.Framework"/> |
2757 | <Reference name="OpenSim.Framework.Communications"/> | 2755 | <Reference name="OpenSim.Framework.Communications"/> |
2758 | <Reference name="OpenSim.Framework.Console"/> | 2756 | <Reference name="OpenSim.Framework.Console"/> |
@@ -2784,9 +2782,9 @@ | |||
2784 | 2782 | ||
2785 | <ReferencePath>../../bin/</ReferencePath> | 2783 | <ReferencePath>../../bin/</ReferencePath> |
2786 | <Reference name="OpenSim.Framework"/> | 2784 | <Reference name="OpenSim.Framework"/> |
2787 | <Reference name="Nini.dll" /> | 2785 | <Reference name="Nini" path="../../bin/"/> |
2788 | <Reference name="nunit.framework.dll" /> | 2786 | <Reference name="nunit.framework" path="../../bin/"/> |
2789 | <Reference name="OpenSim" /> | 2787 | <Reference name="OpenSim"/> |
2790 | <Files> | 2788 | <Files> |
2791 | <Match pattern="*.cs" recurse="false"/> | 2789 | <Match pattern="*.cs" recurse="false"/> |
2792 | </Files> | 2790 | </Files> |
@@ -2810,27 +2808,27 @@ | |||
2810 | <Reference name="System.Core"/> | 2808 | <Reference name="System.Core"/> |
2811 | <Reference name="System.Drawing"/> | 2809 | <Reference name="System.Drawing"/> |
2812 | <Reference name="System.Data"/> | 2810 | <Reference name="System.Data"/> |
2813 | <Reference name="OpenMetaverse.dll"/> | 2811 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2814 | <Reference name="OpenMetaverseTypes.dll"/> | 2812 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2815 | <Reference name="OpenSim.Framework"/> | 2813 | <Reference name="OpenSim.Framework"/> |
2816 | <Reference name="OpenSim.Data"/> | 2814 | <Reference name="OpenSim.Data"/> |
2817 | <Reference name="OpenSim.Region.Framework"/> | 2815 | <Reference name="OpenSim.Region.Framework"/> |
2818 | <Reference name="OpenSim.Region.CoreModules"/> | 2816 | <Reference name="OpenSim.Region.CoreModules"/> |
2819 | <Reference name="OpenSim.Tests.Common"/> | 2817 | <Reference name="OpenSim.Tests.Common"/> |
2820 | <Reference name="log4net.dll"/> | 2818 | <Reference name="log4net" path="../../../bin/"/> |
2821 | <Reference name="Mono.Addins.dll" /> | 2819 | <Reference name="Mono.Addins" path="../../../bin/"/> |
2822 | <Reference name="nunit.framework.dll" /> | 2820 | <Reference name="nunit.framework" path="../../../bin/"/> |
2823 | <Reference name="Nini.dll" /> | 2821 | <Reference name="Nini" path="../../../bin/"/> |
2824 | 2822 | ||
2825 | <Reference name="OpenSim.Data.MySQL"/> | 2823 | <Reference name="OpenSim.Data.MySQL"/> |
2826 | <Reference name="OpenSim.Data.MSSQL"/> | 2824 | <Reference name="OpenSim.Data.MSSQL"/> |
2827 | <Reference name="OpenSim.Data.SQLite"/> | 2825 | <Reference name="OpenSim.Data.SQLite"/> |
2828 | 2826 | ||
2829 | <Reference name="MySql.Data.dll"/> | 2827 | <Reference name="MySql.Data" path="../../../bin/"/> |
2830 | <Reference name="Mono.Data.Sqlite.dll"/> | 2828 | <Reference name="Mono.Data.Sqlite" path="../../../bin/"/> |
2831 | <Files> | 2829 | <Files> |
2832 | <Match pattern="*.cs" recurse="true"/> | 2830 | <Match pattern="*.cs" recurse="true"/> |
2833 | <Match path="Resources" pattern="*.ini" buildAction="EmbeddedResource"/> | 2831 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.ini"/> |
2834 | </Files> | 2832 | </Files> |
2835 | </Project> | 2833 | </Project> |
2836 | 2834 | ||
@@ -2851,16 +2849,16 @@ | |||
2851 | <Reference name="System"/> | 2849 | <Reference name="System"/> |
2852 | <Reference name="System.Xml"/> | 2850 | <Reference name="System.Xml"/> |
2853 | <Reference name="System.Data"/> | 2851 | <Reference name="System.Data"/> |
2854 | <Reference name="OpenMetaverse.dll"/> | 2852 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2855 | <Reference name="OpenMetaverseTypes.dll"/> | 2853 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2856 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 2854 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
2857 | <Reference name="XMLRPC.dll"/> | 2855 | <Reference name="XMLRPC" path="../../../bin/"/> |
2858 | <Reference name="OpenSim.Framework.Console"/> | 2856 | <Reference name="OpenSim.Framework.Console"/> |
2859 | <Reference name="OpenSim.Framework"/> | 2857 | <Reference name="OpenSim.Framework"/> |
2860 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 2858 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
2861 | <Reference name="OpenSim.Tests.Common"/> | 2859 | <Reference name="OpenSim.Tests.Common"/> |
2862 | <Reference name="Nini.dll" /> | 2860 | <Reference name="Nini" path="../../../bin/"/> |
2863 | <Reference name="nunit.framework.dll" /> | 2861 | <Reference name="nunit.framework" path="../../../bin/"/> |
2864 | <Files> | 2862 | <Files> |
2865 | <Match pattern="*.cs" recurse="false"/> | 2863 | <Match pattern="*.cs" recurse="false"/> |
2866 | </Files> | 2864 | </Files> |
@@ -2880,16 +2878,16 @@ | |||
2880 | 2878 | ||
2881 | <ReferencePath>../../../../bin/</ReferencePath> | 2879 | <ReferencePath>../../../../bin/</ReferencePath> |
2882 | <Reference name="System"/> | 2880 | <Reference name="System"/> |
2883 | <Reference name="OpenMetaverse.dll"/> | 2881 | <Reference name="OpenMetaverse" path="../../../../bin/"/> |
2884 | <Reference name="OpenMetaverseTypes.dll"/> | 2882 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
2885 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 2883 | <Reference name="OpenMetaverse.StructuredData" path="../../../../bin/"/> |
2886 | <Reference name="OpenSim.Data"/> | 2884 | <Reference name="OpenSim.Data"/> |
2887 | <Reference name="OpenSim.Services.Interfaces"/> | 2885 | <Reference name="OpenSim.Services.Interfaces"/> |
2888 | <Reference name="OpenSim.Tests.Common"/> | 2886 | <Reference name="OpenSim.Tests.Common"/> |
2889 | <Reference name="OpenSim.Framework"/> | 2887 | <Reference name="OpenSim.Framework"/> |
2890 | <Reference name="OpenSim.Framework.Serialization"/> | 2888 | <Reference name="OpenSim.Framework.Serialization"/> |
2891 | <Reference name="log4net.dll"/> | 2889 | <Reference name="log4net" path="../../../../bin/"/> |
2892 | <Reference name="nunit.framework.dll" /> | 2890 | <Reference name="nunit.framework" path="../../../../bin/"/> |
2893 | 2891 | ||
2894 | <Files> | 2892 | <Files> |
2895 | <Match pattern="*.cs" recurse="true"> | 2893 | <Match pattern="*.cs" recurse="true"> |
@@ -2917,9 +2915,9 @@ | |||
2917 | <Reference name="OpenSim.Framework"/> | 2915 | <Reference name="OpenSim.Framework"/> |
2918 | <Reference name="OpenSim.Framework.Servers"/> | 2916 | <Reference name="OpenSim.Framework.Servers"/> |
2919 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 2917 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
2920 | <Reference name="log4net.dll"/> | 2918 | <Reference name="log4net" path="../../../../bin/"/> |
2921 | <Reference name="HttpServer_OpenSim.dll"/> | 2919 | <Reference name="HttpServer_OpenSim" path="../../../../bin/"/> |
2922 | <Reference name="nunit.framework.dll" /> | 2920 | <Reference name="nunit.framework" path="../../../../bin/"/> |
2923 | 2921 | ||
2924 | <Files> | 2922 | <Files> |
2925 | <Match pattern="*.cs" recurse="true"> | 2923 | <Match pattern="*.cs" recurse="true"> |
@@ -2944,8 +2942,8 @@ | |||
2944 | <Reference name="System.Core"/> | 2942 | <Reference name="System.Core"/> |
2945 | <Reference name="System.Xml"/> | 2943 | <Reference name="System.Xml"/> |
2946 | <Reference name="System.Drawing"/> | 2944 | <Reference name="System.Drawing"/> |
2947 | <Reference name="OpenMetaverseTypes.dll"/> | 2945 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2948 | <Reference name="OpenMetaverse.dll"/> | 2946 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2949 | <Reference name="OpenSim.Data"/> | 2947 | <Reference name="OpenSim.Data"/> |
2950 | <Reference name="OpenSim.Framework"/> | 2948 | <Reference name="OpenSim.Framework"/> |
2951 | <Reference name="OpenSim.Framework.Serialization"/> | 2949 | <Reference name="OpenSim.Framework.Serialization"/> |
@@ -2961,15 +2959,15 @@ | |||
2961 | 2959 | ||
2962 | <!-- Unit tests --> | 2960 | <!-- Unit tests --> |
2963 | <Reference name="OpenSim.Tests.Common"/> | 2961 | <Reference name="OpenSim.Tests.Common"/> |
2964 | <Reference name="Nini.dll"/> | 2962 | <Reference name="Nini" path="../../../bin/"/> |
2965 | <Reference name="nunit.framework.dll"/> | 2963 | <Reference name="nunit.framework" path="../../../bin/"/> |
2966 | 2964 | ||
2967 | <!-- For scripting in funny languages by default --> | 2965 | <!-- For scripting in funny languages by default --> |
2968 | <Reference name="XMLRPC.dll"/> | 2966 | <Reference name="XMLRPC" path="../../../bin/"/> |
2969 | <Reference name="OpenSim.Framework.Communications"/> | 2967 | <Reference name="OpenSim.Framework.Communications"/> |
2970 | <Reference name="Nini.dll" /> | 2968 | <Reference name="Nini" path="../../../bin/"/> |
2971 | <Reference name="log4net.dll"/> | 2969 | <Reference name="log4net" path="../../../bin/"/> |
2972 | <Reference name="DotNetOpenMail.dll"/> | 2970 | <Reference name="DotNetOpenMail" path="../../../bin/"/> |
2973 | 2971 | ||
2974 | <!-- | 2972 | <!-- |
2975 | TODO: this is kind of lame, we basically build a duplicate | 2973 | TODO: this is kind of lame, we basically build a duplicate |
@@ -2979,14 +2977,14 @@ | |||
2979 | --> | 2977 | --> |
2980 | <Files> | 2978 | <Files> |
2981 | <!-- SADLY the way this works means you need to keep adding these paths --> | 2979 | <!-- SADLY the way this works means you need to keep adding these paths --> |
2982 | <Match path="Agent/TextureSender/Tests" pattern="*.cs" recurse="true" /> | 2980 | <Match path="Agent/TextureSender/Tests" pattern="*.cs" recurse="true"/> |
2983 | <Match path="Avatar/Inventory/Archiver/Tests" pattern="*.cs" recurse="true" /> | 2981 | <Match path="Avatar/Inventory/Archiver/Tests" pattern="*.cs" recurse="true"/> |
2984 | <Match path="World/Archiver/Tests" pattern="*.cs" recurse="true" /> | 2982 | <Match path="World/Archiver/Tests" pattern="*.cs" recurse="true"/> |
2985 | <Match path="World/Archiver/Tests/Resources" pattern="*" buildAction="EmbeddedResource"/> | 2983 | <Match buildAction="EmbeddedResource" path="World/Archiver/Tests/Resources" pattern="*"/> |
2986 | <Match path="World/Serialiser/Tests" pattern="*.cs" recurse="true" /> | 2984 | <Match path="World/Serialiser/Tests" pattern="*.cs" recurse="true"/> |
2987 | <Match path="World/Terrain/Tests" pattern="*.cs" recurse="true" /> | 2985 | <Match path="World/Terrain/Tests" pattern="*.cs" recurse="true"/> |
2988 | <Match path="ServiceConnectorsOut/Grid/Tests" pattern="*.cs" recurse="true" /> | 2986 | <Match path="ServiceConnectorsOut/Grid/Tests" pattern="*.cs" recurse="true"/> |
2989 | <Match path="ServiceConnectorsOut/Presence/Tests" pattern="*.cs" recurse="true" /> | 2987 | <Match path="ServiceConnectorsOut/Presence/Tests" pattern="*.cs" recurse="true"/> |
2990 | </Files> | 2988 | </Files> |
2991 | </Project> | 2989 | </Project> |
2992 | 2990 | ||
@@ -3007,8 +3005,8 @@ | |||
3007 | <Reference name="System.Xml"/> | 3005 | <Reference name="System.Xml"/> |
3008 | <Reference name="System.Drawing"/> | 3006 | <Reference name="System.Drawing"/> |
3009 | <Reference name="System.Runtime.Remoting"/> | 3007 | <Reference name="System.Runtime.Remoting"/> |
3010 | <Reference name="OpenMetaverseTypes.dll"/> | 3008 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
3011 | <Reference name="OpenMetaverse.dll"/> | 3009 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
3012 | <Reference name="OpenSim.Data"/> | 3010 | <Reference name="OpenSim.Data"/> |
3013 | <Reference name="OpenSim.Framework"/> | 3011 | <Reference name="OpenSim.Framework"/> |
3014 | <Reference name="OpenSim.Framework.Communications"/> | 3012 | <Reference name="OpenSim.Framework.Communications"/> |
@@ -3024,15 +3022,15 @@ | |||
3024 | <!-- Unit tests --> | 3022 | <!-- Unit tests --> |
3025 | <!-- <Reference name="OpenSim.Tests.Common"/> --> | 3023 | <!-- <Reference name="OpenSim.Tests.Common"/> --> |
3026 | <Reference name="OpenSim.Tests.Common"/> | 3024 | <Reference name="OpenSim.Tests.Common"/> |
3027 | <Reference name="Nini.dll"/> | 3025 | <Reference name="Nini" path="../../../bin/"/> |
3028 | <Reference name="nunit.framework.dll"/> | 3026 | <Reference name="nunit.framework" path="../../../bin/"/> |
3029 | 3027 | ||
3030 | <!-- For scripting in funny languages by default --> | 3028 | <!-- For scripting in funny languages by default --> |
3031 | <Reference name="XMLRPC.dll"/> | 3029 | <Reference name="XMLRPC" path="../../../bin/"/> |
3032 | <Reference name="OpenSim.Framework.Communications"/> | 3030 | <Reference name="OpenSim.Framework.Communications"/> |
3033 | <Reference name="Nini.dll" /> | 3031 | <Reference name="Nini" path="../../../bin/"/> |
3034 | <Reference name="log4net.dll"/> | 3032 | <Reference name="log4net" path="../../../bin/"/> |
3035 | <Reference name="DotNetOpenMail.dll"/> | 3033 | <Reference name="DotNetOpenMail" path="../../../bin/"/> |
3036 | 3034 | ||
3037 | <!-- | 3035 | <!-- |
3038 | TODO: this is kind of lame, we basically build a duplicate | 3036 | TODO: this is kind of lame, we basically build a duplicate |
@@ -3042,7 +3040,7 @@ | |||
3042 | --> | 3040 | --> |
3043 | <Files> | 3041 | <Files> |
3044 | <!-- SADLY the way this works means you need to keep adding these paths --> | 3042 | <!-- SADLY the way this works means you need to keep adding these paths --> |
3045 | <Match path="Scenes/Tests" pattern="*.cs" recurse="false" /> | 3043 | <Match path="Scenes/Tests" pattern="*.cs" recurse="false"/> |
3046 | </Files> | 3044 | </Files> |
3047 | </Project> | 3045 | </Project> |
3048 | 3046 | ||
@@ -3062,11 +3060,11 @@ | |||
3062 | <ReferencePath>../../../../../bin/</ReferencePath> | 3060 | <ReferencePath>../../../../../bin/</ReferencePath> |
3063 | <Reference name="System"/> | 3061 | <Reference name="System"/> |
3064 | <Reference name="System.Xml"/> | 3062 | <Reference name="System.Xml"/> |
3065 | <Reference name="log4net.dll"/> | 3063 | <Reference name="log4net"/> |
3066 | <Reference name="Nini.dll" /> | 3064 | <Reference name="Nini" /> |
3067 | <Reference name="nunit.framework.dll" /> | 3065 | <Reference name="nunit.framework" /> |
3068 | <Reference name="OpenMetaverse.dll"/> | 3066 | <Reference name="OpenMetaverse"/> |
3069 | <Reference name="OpenMetaverseTypes.dll"/> | 3067 | <Reference name="OpenMetaverseTypes"/> |
3070 | <Reference name="OpenSim.Framework"/> | 3068 | <Reference name="OpenSim.Framework"/> |
3071 | <Reference name="OpenSim.Framework.Communications"/> | 3069 | <Reference name="OpenSim.Framework.Communications"/> |
3072 | <Reference name="OpenSim.Framework.Statistics"/> | 3070 | <Reference name="OpenSim.Framework.Statistics"/> |
@@ -3103,12 +3101,12 @@ | |||
3103 | <Reference name="OpenSim.Region.ScriptEngine.Shared.Api"/> | 3101 | <Reference name="OpenSim.Region.ScriptEngine.Shared.Api"/> |
3104 | <Reference name="OpenSim.Region.ScriptEngine.XEngine"/> | 3102 | <Reference name="OpenSim.Region.ScriptEngine.XEngine"/> |
3105 | <Reference name="OpenSim.Tests.Common"/> | 3103 | <Reference name="OpenSim.Tests.Common"/> |
3106 | <Reference name="nunit.framework.dll" /> | 3104 | <Reference name="nunit.framework" path="../../../bin/"/> |
3107 | <Reference name="Nini.dll" /> | 3105 | <Reference name="Nini" path="../../../bin/"/> |
3108 | <Reference name="OpenMetaverseTypes.dll"/> | 3106 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
3109 | <Reference name="OpenSim.Region.ScriptEngine.Shared.CodeTools"/> | 3107 | <Reference name="OpenSim.Region.ScriptEngine.Shared.CodeTools"/> |
3110 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> | 3108 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> |
3111 | <Reference name="Tools.dll" /> | 3109 | <Reference name="Tools" path="../../../bin/"/> |
3112 | 3110 | ||
3113 | <!-- | 3111 | <!-- |
3114 | TODO: this is kind of lame, we basically build a duplicate | 3112 | TODO: this is kind of lame, we basically build a duplicate |
@@ -3118,9 +3116,9 @@ | |||
3118 | --> | 3116 | --> |
3119 | <Files> | 3117 | <Files> |
3120 | <!-- SADLY the way this works means you need to keep adding these paths --> | 3118 | <!-- SADLY the way this works means you need to keep adding these paths --> |
3121 | <Match path="Shared/Tests" pattern="*.cs" recurse="true" /> | 3119 | <Match path="Shared/Tests" pattern="*.cs" recurse="true"/> |
3122 | <Match path="Shared/CodeTools/Tests" pattern="*.cs" recurse="true" /> | 3120 | <Match path="Shared/CodeTools/Tests" pattern="*.cs" recurse="true"/> |
3123 | <Match path="XEngine/Tests" pattern="*.cs" recurse="true" /> | 3121 | <Match path="XEngine/Tests" pattern="*.cs" recurse="true"/> |
3124 | </Files> | 3122 | </Files> |
3125 | </Project> | 3123 | </Project> |
3126 | 3124 | ||
@@ -3143,14 +3141,14 @@ | |||
3143 | <ReferencePath>../../../../bin/</ReferencePath> | 3141 | <ReferencePath>../../../../bin/</ReferencePath> |
3144 | <Reference name="System"/> | 3142 | <Reference name="System"/> |
3145 | <Reference name="System.Core"/> | 3143 | <Reference name="System.Core"/> |
3146 | <Reference name="OpenMetaverseTypes.dll"/> | 3144 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
3147 | <Reference name="Nini.dll" /> | 3145 | <Reference name="Nini" path="../../../../bin/"/> |
3148 | <Reference name="OpenSim.Framework"/> | 3146 | <Reference name="OpenSim.Framework"/> |
3149 | <Reference name="OpenSim.Framework.Console"/> | 3147 | <Reference name="OpenSim.Framework.Console"/> |
3150 | <Reference name="OpenSim.Region.Physics.Manager"/> | 3148 | <Reference name="OpenSim.Region.Physics.Manager"/> |
3151 | <Reference name="Ode.NET.dll" /> | 3149 | <Reference name="Ode.NET" path="../../../../bin/"/> |
3152 | <Reference name="nunit.framework.dll" /> | 3150 | <Reference name="nunit.framework" path="../../../../bin/"/> |
3153 | <Reference name="log4net.dll"/> | 3151 | <Reference name="log4net" path="../../../../bin/"/> |
3154 | 3152 | ||
3155 | <Files> | 3153 | <Files> |
3156 | <Match pattern="*.cs" recurse="true"/> | 3154 | <Match pattern="*.cs" recurse="true"/> |
@@ -3161,58 +3159,4 @@ | |||
3161 | 3159 | ||
3162 | </Solution> | 3160 | </Solution> |
3163 | 3161 | ||
3164 | <!-- Prebuild tool --> | ||
3165 | <Solution name="Prebuild" path="Prebuild/" > | ||
3166 | <Configuration name="Debug"> | ||
3167 | <Options> | ||
3168 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
3169 | <OptimizeCode>false</OptimizeCode> | ||
3170 | <OutputPath>bin/Debug</OutputPath> | ||
3171 | <DebugInformation>true</DebugInformation> | ||
3172 | <SuppressWarnings>1595</SuppressWarnings> | ||
3173 | </Options> | ||
3174 | </Configuration> | ||
3175 | <Configuration name="Release"> | ||
3176 | <Options> | ||
3177 | <CompilerDefines>TRACE</CompilerDefines> | ||
3178 | <OutputPath>bin/Release</OutputPath> | ||
3179 | <OptimizeCode>true</OptimizeCode> | ||
3180 | <DebugInformation>false</DebugInformation> | ||
3181 | <SuppressWarnings>1595</SuppressWarnings> | ||
3182 | </Options> | ||
3183 | </Configuration> | ||
3184 | |||
3185 | <Project frameworkVersion="v3_5" name="Prebuild" path="src/" language="C#" assemblyName="Prebuild" icon="App.ico" type="Exe" rootNamespace="Prebuild" startupObject="Prebuild.Prebuild"> | ||
3186 | <Configuration name="Debug"> | ||
3187 | <Options> | ||
3188 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
3189 | <OptimizeCode>false</OptimizeCode> | ||
3190 | <OutputPath>..\..\bin\</OutputPath> | ||
3191 | <DebugInformation>true</DebugInformation> | ||
3192 | <KeyFile>Prebuild.snk</KeyFile> | ||
3193 | <SuppressWarnings>1595</SuppressWarnings> | ||
3194 | </Options> | ||
3195 | </Configuration> | ||
3196 | <Configuration name="Release"> | ||
3197 | <Options> | ||
3198 | <CompilerDefines>TRACE</CompilerDefines> | ||
3199 | <OutputPath>..\..\bin\</OutputPath> | ||
3200 | <OptimizeCode>true</OptimizeCode> | ||
3201 | <DebugInformation>false</DebugInformation> | ||
3202 | <KeyFile>Prebuild.snk</KeyFile> | ||
3203 | <SuppressWarnings>1595</SuppressWarnings> | ||
3204 | </Options> | ||
3205 | </Configuration> | ||
3206 | <ReferencePath>../../bin/</ReferencePath> | ||
3207 | <Reference name="System.EnterpriseServices" /> | ||
3208 | <Reference name="System.Xml" /> | ||
3209 | <Reference name="System" /> | ||
3210 | <Files> | ||
3211 | <Match pattern="App.ico" buildAction="EmbeddedResource"/> | ||
3212 | <Match path="data" pattern="prebuild-1.7.xsd" buildAction="EmbeddedResource"/> | ||
3213 | <Match pattern="*.cs" recurse="true"/> | ||
3214 | </Files> | ||
3215 | </Project> | ||
3216 | |||
3217 | </Solution> | ||
3218 | </Prebuild> | 3162 | </Prebuild> |
diff --git a/runprebuild.sh b/runprebuild.sh index 3e1417a..b3b5c9d 100755 --- a/runprebuild.sh +++ b/runprebuild.sh | |||
@@ -1,7 +1,4 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | mono bin/Prebuild.exe /target nant | 3 | mono bin/Prebuild.exe /target nant |
4 | # needed until we break up OpenSim.exe | ||
5 | perl -pi -e 's{OpenSim.dll}{OpenSim.exe}' OpenSim/ApplicationPlugins/LoadRegions/OpenSim.ApplicationPlugins.LoadRegions.dll.build | ||
6 | mono bin/Prebuild.exe /target monodev | ||
7 | mono bin/Prebuild.exe /target vs2008 | 4 | mono bin/Prebuild.exe /target vs2008 |