diff options
author | John Hurliman | 2010-09-11 18:26:59 -0700 |
---|---|---|
committer | John Hurliman | 2010-09-11 18:26:59 -0700 |
commit | a9acc6730d4dc33b81da567778cac32517b2068c (patch) | |
tree | 4b95d80aa4f0495deef625f2e4c01c317cbb2544 /Prebuild/src/Core/Nodes | |
parent | Prevent child agents from being blacklisted in the kill record. (diff) | |
download | opensim-SC-a9acc6730d4dc33b81da567778cac32517b2068c.zip opensim-SC-a9acc6730d4dc33b81da567778cac32517b2068c.tar.gz opensim-SC-a9acc6730d4dc33b81da567778cac32517b2068c.tar.bz2 opensim-SC-a9acc6730d4dc33b81da567778cac32517b2068c.tar.xz |
Removing .svn directories under Prebuild/ from source control
Diffstat (limited to 'Prebuild/src/Core/Nodes')
34 files changed, 0 insertions, 4703 deletions
diff --git a/Prebuild/src/Core/Nodes/.svn/all-wcprops b/Prebuild/src/Core/Nodes/.svn/all-wcprops deleted file mode 100644 index 6565f05..0000000 --- a/Prebuild/src/Core/Nodes/.svn/all-wcprops +++ /dev/null | |||
@@ -1,119 +0,0 @@ | |||
1 | K 25 | ||
2 | svn:wc:ra_dav:version-url | ||
3 | V 56 | ||
4 | /svnroot/dnpb/!svn/ver/321/trunk/Prebuild/src/Core/Nodes | ||
5 | END | ||
6 | CleanFilesNode.cs | ||
7 | K 25 | ||
8 | svn:wc:ra_dav:version-url | ||
9 | V 74 | ||
10 | /svnroot/dnpb/!svn/ver/307/trunk/Prebuild/src/Core/Nodes/CleanFilesNode.cs | ||
11 | END | ||
12 | ProjectNode.cs | ||
13 | K 25 | ||
14 | svn:wc:ra_dav:version-url | ||
15 | V 71 | ||
16 | /svnroot/dnpb/!svn/ver/319/trunk/Prebuild/src/Core/Nodes/ProjectNode.cs | ||
17 | END | ||
18 | ConfigurationNode.cs | ||
19 | K 25 | ||
20 | svn:wc:ra_dav:version-url | ||
21 | V 77 | ||
22 | /svnroot/dnpb/!svn/ver/316/trunk/Prebuild/src/Core/Nodes/ConfigurationNode.cs | ||
23 | END | ||
24 | DataNode.cs | ||
25 | K 25 | ||
26 | svn:wc:ra_dav:version-url | ||
27 | V 68 | ||
28 | /svnroot/dnpb/!svn/ver/321/trunk/Prebuild/src/Core/Nodes/DataNode.cs | ||
29 | END | ||
30 | ReferencePathNode.cs | ||
31 | K 25 | ||
32 | svn:wc:ra_dav:version-url | ||
33 | V 77 | ||
34 | /svnroot/dnpb/!svn/ver/307/trunk/Prebuild/src/Core/Nodes/ReferencePathNode.cs | ||
35 | END | ||
36 | SolutionNode.cs | ||
37 | K 25 | ||
38 | svn:wc:ra_dav:version-url | ||
39 | V 72 | ||
40 | /svnroot/dnpb/!svn/ver/315/trunk/Prebuild/src/Core/Nodes/SolutionNode.cs | ||
41 | END | ||
42 | ProcessNode.cs | ||
43 | K 25 | ||
44 | svn:wc:ra_dav:version-url | ||
45 | V 71 | ||
46 | /svnroot/dnpb/!svn/ver/307/trunk/Prebuild/src/Core/Nodes/ProcessNode.cs | ||
47 | END | ||
48 | FileNode.cs | ||
49 | K 25 | ||
50 | svn:wc:ra_dav:version-url | ||
51 | V 68 | ||
52 | /svnroot/dnpb/!svn/ver/316/trunk/Prebuild/src/Core/Nodes/FileNode.cs | ||
53 | END | ||
54 | DescriptionNode.cs | ||
55 | K 25 | ||
56 | svn:wc:ra_dav:version-url | ||
57 | V 75 | ||
58 | /svnroot/dnpb/!svn/ver/307/trunk/Prebuild/src/Core/Nodes/DescriptionNode.cs | ||
59 | END | ||
60 | DatabaseReferenceNode.cs | ||
61 | K 25 | ||
62 | svn:wc:ra_dav:version-url | ||
63 | V 81 | ||
64 | /svnroot/dnpb/!svn/ver/295/trunk/Prebuild/src/Core/Nodes/DatabaseReferenceNode.cs | ||
65 | END | ||
66 | ConfigurationNodeCollection.cs | ||
67 | K 25 | ||
68 | svn:wc:ra_dav:version-url | ||
69 | V 87 | ||
70 | /svnroot/dnpb/!svn/ver/315/trunk/Prebuild/src/Core/Nodes/ConfigurationNodeCollection.cs | ||
71 | END | ||
72 | CleanupNode.cs | ||
73 | K 25 | ||
74 | svn:wc:ra_dav:version-url | ||
75 | V 71 | ||
76 | /svnroot/dnpb/!svn/ver/307/trunk/Prebuild/src/Core/Nodes/CleanupNode.cs | ||
77 | END | ||
78 | ExcludeNode.cs | ||
79 | K 25 | ||
80 | svn:wc:ra_dav:version-url | ||
81 | V 71 | ||
82 | /svnroot/dnpb/!svn/ver/295/trunk/Prebuild/src/Core/Nodes/ExcludeNode.cs | ||
83 | END | ||
84 | OptionsNode.cs | ||
85 | K 25 | ||
86 | svn:wc:ra_dav:version-url | ||
87 | V 71 | ||
88 | /svnroot/dnpb/!svn/ver/315/trunk/Prebuild/src/Core/Nodes/OptionsNode.cs | ||
89 | END | ||
90 | DatabaseProjectNode.cs | ||
91 | K 25 | ||
92 | svn:wc:ra_dav:version-url | ||
93 | V 79 | ||
94 | /svnroot/dnpb/!svn/ver/307/trunk/Prebuild/src/Core/Nodes/DatabaseProjectNode.cs | ||
95 | END | ||
96 | MatchNode.cs | ||
97 | K 25 | ||
98 | svn:wc:ra_dav:version-url | ||
99 | V 69 | ||
100 | /svnroot/dnpb/!svn/ver/318/trunk/Prebuild/src/Core/Nodes/MatchNode.cs | ||
101 | END | ||
102 | ReferenceNode.cs | ||
103 | K 25 | ||
104 | svn:wc:ra_dav:version-url | ||
105 | V 73 | ||
106 | /svnroot/dnpb/!svn/ver/295/trunk/Prebuild/src/Core/Nodes/ReferenceNode.cs | ||
107 | END | ||
108 | FilesNode.cs | ||
109 | K 25 | ||
110 | svn:wc:ra_dav:version-url | ||
111 | V 69 | ||
112 | /svnroot/dnpb/!svn/ver/307/trunk/Prebuild/src/Core/Nodes/FilesNode.cs | ||
113 | END | ||
114 | AuthorNode.cs | ||
115 | K 25 | ||
116 | svn:wc:ra_dav:version-url | ||
117 | V 70 | ||
118 | /svnroot/dnpb/!svn/ver/307/trunk/Prebuild/src/Core/Nodes/AuthorNode.cs | ||
119 | END | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/dir-prop-base b/Prebuild/src/Core/Nodes/.svn/dir-prop-base deleted file mode 100644 index a1989a0..0000000 --- a/Prebuild/src/Core/Nodes/.svn/dir-prop-base +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | K 10 | ||
2 | svn:ignore | ||
3 | V 5 | ||
4 | *.swp | ||
5 | END | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/entries b/Prebuild/src/Core/Nodes/.svn/entries deleted file mode 100644 index b60f190..0000000 --- a/Prebuild/src/Core/Nodes/.svn/entries +++ /dev/null | |||
@@ -1,674 +0,0 @@ | |||
1 | 10 | ||
2 | |||
3 | dir | ||
4 | 323 | ||
5 | https://dnpb.svn.sourceforge.net/svnroot/dnpb/trunk/Prebuild/src/Core/Nodes | ||
6 | https://dnpb.svn.sourceforge.net/svnroot/dnpb | ||
7 | |||
8 | |||
9 | |||
10 | 2010-08-12T16:58:08.825470Z | ||
11 | 321 | ||
12 | jhurliman | ||
13 | has-props | ||
14 | |||
15 | |||
16 | |||
17 | |||
18 | |||
19 | |||
20 | |||
21 | |||
22 | |||
23 | |||
24 | |||
25 | |||
26 | |||
27 | 3355ff64-970d-0410-bbe8-d0fbd18be4fb | ||
28 | |||
29 | CleanFilesNode.cs | ||
30 | file | ||
31 | |||
32 | |||
33 | |||
34 | |||
35 | 2010-09-10T22:51:44.000000Z | ||
36 | c798b3c4167ec1a3815ddae93a552427 | ||
37 | 2009-04-15T01:28:16.827957Z | ||
38 | 307 | ||
39 | kunnis | ||
40 | |||
41 | |||
42 | |||
43 | |||
44 | |||
45 | |||
46 | |||
47 | |||
48 | |||
49 | |||
50 | |||
51 | |||
52 | |||
53 | |||
54 | |||
55 | |||
56 | |||
57 | |||
58 | |||
59 | |||
60 | |||
61 | 2666 | ||
62 | |||
63 | ProjectNode.cs | ||
64 | file | ||
65 | |||
66 | |||
67 | |||
68 | |||
69 | 2010-09-10T22:51:44.000000Z | ||
70 | be9ade7048917117783a06508fa4d378 | ||
71 | 2010-05-09T23:19:49.063286Z | ||
72 | 319 | ||
73 | jhurliman | ||
74 | has-props | ||
75 | |||
76 | |||
77 | |||
78 | |||
79 | |||
80 | |||
81 | |||
82 | |||
83 | |||
84 | |||
85 | |||
86 | |||
87 | |||
88 | |||
89 | |||
90 | |||
91 | |||
92 | |||
93 | |||
94 | |||
95 | 13444 | ||
96 | |||
97 | ConfigurationNode.cs | ||
98 | file | ||
99 | |||
100 | |||
101 | |||
102 | |||
103 | 2010-09-10T22:51:44.000000Z | ||
104 | e42a548bfaba22cf94dbb203b2b28352 | ||
105 | 2010-05-08T05:43:01.449559Z | ||
106 | 316 | ||
107 | jhurliman | ||
108 | has-props | ||
109 | |||
110 | |||
111 | |||
112 | |||
113 | |||
114 | |||
115 | |||
116 | |||
117 | |||
118 | |||
119 | |||
120 | |||
121 | |||
122 | |||
123 | |||
124 | |||
125 | |||
126 | |||
127 | |||
128 | |||
129 | 5222 | ||
130 | |||
131 | DataNode.cs | ||
132 | file | ||
133 | |||
134 | |||
135 | |||
136 | |||
137 | 2010-09-10T22:51:44.000000Z | ||
138 | 39b1d83bff018fce9f616ae2e6f1be82 | ||
139 | 2010-08-12T16:58:08.825470Z | ||
140 | 321 | ||
141 | jhurliman | ||
142 | has-props | ||
143 | |||
144 | |||
145 | |||
146 | |||
147 | |||
148 | |||
149 | |||
150 | |||
151 | |||
152 | |||
153 | |||
154 | |||
155 | |||
156 | |||
157 | |||
158 | |||
159 | |||
160 | |||
161 | |||
162 | |||
163 | 3294 | ||
164 | |||
165 | ReferencePathNode.cs | ||
166 | file | ||
167 | |||
168 | |||
169 | |||
170 | |||
171 | 2010-09-10T22:51:44.000000Z | ||
172 | 409c91bafff2572218a6cdefcc6ec48c | ||
173 | 2009-04-15T01:28:16.827957Z | ||
174 | 307 | ||
175 | kunnis | ||
176 | has-props | ||
177 | |||
178 | |||
179 | |||
180 | |||
181 | |||
182 | |||
183 | |||
184 | |||
185 | |||
186 | |||
187 | |||
188 | |||
189 | |||
190 | |||
191 | |||
192 | |||
193 | |||
194 | |||
195 | |||
196 | |||
197 | 2677 | ||
198 | |||
199 | SolutionNode.cs | ||
200 | file | ||
201 | |||
202 | |||
203 | |||
204 | |||
205 | 2010-09-10T22:51:44.000000Z | ||
206 | 79bdf34c92682dc5ba8b5db15aaa95d6 | ||
207 | 2009-06-06T19:47:31.451428Z | ||
208 | 315 | ||
209 | dmoonfire | ||
210 | has-props | ||
211 | |||
212 | |||
213 | |||
214 | |||
215 | |||
216 | |||
217 | |||
218 | |||
219 | |||
220 | |||
221 | |||
222 | |||
223 | |||
224 | |||
225 | |||
226 | |||
227 | |||
228 | |||
229 | |||
230 | |||
231 | 9720 | ||
232 | |||
233 | ProcessNode.cs | ||
234 | file | ||
235 | |||
236 | |||
237 | |||
238 | |||
239 | 2010-09-10T22:51:44.000000Z | ||
240 | 1816314797ef66235c58938b33ea2b3b | ||
241 | 2009-04-15T01:28:16.827957Z | ||
242 | 307 | ||
243 | kunnis | ||
244 | has-props | ||
245 | |||
246 | |||
247 | |||
248 | |||
249 | |||
250 | |||
251 | |||
252 | |||
253 | |||
254 | |||
255 | |||
256 | |||
257 | |||
258 | |||
259 | |||
260 | |||
261 | |||
262 | |||
263 | |||
264 | |||
265 | 2900 | ||
266 | |||
267 | FileNode.cs | ||
268 | file | ||
269 | |||
270 | |||
271 | |||
272 | |||
273 | 2010-09-10T22:51:44.000000Z | ||
274 | 43f98599da19618be6c6ed74f36fceae | ||
275 | 2010-05-08T05:43:01.449559Z | ||
276 | 316 | ||
277 | jhurliman | ||
278 | has-props | ||
279 | |||
280 | |||
281 | |||
282 | |||
283 | |||
284 | |||
285 | |||
286 | |||
287 | |||
288 | |||
289 | |||
290 | |||
291 | |||
292 | |||
293 | |||
294 | |||
295 | |||
296 | |||
297 | |||
298 | |||
299 | 6043 | ||
300 | |||
301 | DescriptionNode.cs | ||
302 | file | ||
303 | |||
304 | |||
305 | |||
306 | |||
307 | 2010-09-10T22:51:44.000000Z | ||
308 | 3f8a8b8cc4b3a94b94109276ad2222d3 | ||
309 | 2009-04-15T01:28:16.827957Z | ||
310 | 307 | ||
311 | kunnis | ||
312 | |||
313 | |||
314 | |||
315 | |||
316 | |||
317 | |||
318 | |||
319 | |||
320 | |||
321 | |||
322 | |||
323 | |||
324 | |||
325 | |||
326 | |||
327 | |||
328 | |||
329 | |||
330 | |||
331 | |||
332 | |||
333 | 2493 | ||
334 | |||
335 | DatabaseReferenceNode.cs | ||
336 | file | ||
337 | |||
338 | |||
339 | |||
340 | |||
341 | 2010-09-10T22:51:44.000000Z | ||
342 | 4104ed953ae9105ac6498ce7882ed8ee | ||
343 | 2009-02-19T06:47:52.218324Z | ||
344 | 295 | ||
345 | kunnis | ||
346 | |||
347 | |||
348 | |||
349 | |||
350 | |||
351 | |||
352 | |||
353 | |||
354 | |||
355 | |||
356 | |||
357 | |||
358 | |||
359 | |||
360 | |||
361 | |||
362 | |||
363 | |||
364 | |||
365 | |||
366 | |||
367 | 2390 | ||
368 | |||
369 | ConfigurationNodeCollection.cs | ||
370 | file | ||
371 | |||
372 | |||
373 | |||
374 | |||
375 | 2010-09-10T22:51:44.000000Z | ||
376 | 8620885fc85bdc06288acf6b8f58b3ff | ||
377 | 2009-06-06T19:47:31.451428Z | ||
378 | 315 | ||
379 | dmoonfire | ||
380 | |||
381 | |||
382 | |||
383 | |||
384 | |||
385 | |||
386 | |||
387 | |||
388 | |||
389 | |||
390 | |||
391 | |||
392 | |||
393 | |||
394 | |||
395 | |||
396 | |||
397 | |||
398 | |||
399 | |||
400 | |||
401 | 2406 | ||
402 | |||
403 | CleanupNode.cs | ||
404 | file | ||
405 | |||
406 | |||
407 | |||
408 | |||
409 | 2010-09-10T22:51:44.000000Z | ||
410 | 198fb1e15cd545655978686277e39d96 | ||
411 | 2009-04-15T01:28:16.827957Z | ||
412 | 307 | ||
413 | kunnis | ||
414 | |||
415 | |||
416 | |||
417 | |||
418 | |||
419 | |||
420 | |||
421 | |||
422 | |||
423 | |||
424 | |||
425 | |||
426 | |||
427 | |||
428 | |||
429 | |||
430 | |||
431 | |||
432 | |||
433 | |||
434 | |||
435 | 2689 | ||
436 | |||
437 | ExcludeNode.cs | ||
438 | file | ||
439 | |||
440 | |||
441 | |||
442 | |||
443 | 2010-09-10T22:51:44.000000Z | ||
444 | 810fc73f537028052471239c72f41c11 | ||
445 | 2009-02-19T06:47:52.218324Z | ||
446 | 295 | ||
447 | kunnis | ||
448 | has-props | ||
449 | |||
450 | |||
451 | |||
452 | |||
453 | |||
454 | |||
455 | |||
456 | |||
457 | |||
458 | |||
459 | |||
460 | |||
461 | |||
462 | |||
463 | |||
464 | |||
465 | |||
466 | |||
467 | |||
468 | |||
469 | 2608 | ||
470 | |||
471 | OptionsNode.cs | ||
472 | file | ||
473 | |||
474 | |||
475 | |||
476 | |||
477 | 2010-09-10T22:51:44.000000Z | ||
478 | 691dd5f7e7ce2a06814cdcae611fc40e | ||
479 | 2009-06-06T19:47:31.451428Z | ||
480 | 315 | ||
481 | dmoonfire | ||
482 | has-props | ||
483 | |||
484 | |||
485 | |||
486 | |||
487 | |||
488 | |||
489 | |||
490 | |||
491 | |||
492 | |||
493 | |||
494 | |||
495 | |||
496 | |||
497 | |||
498 | |||
499 | |||
500 | |||
501 | |||
502 | |||
503 | 10949 | ||
504 | |||
505 | DatabaseProjectNode.cs | ||
506 | file | ||
507 | |||
508 | |||
509 | |||
510 | |||
511 | 2010-09-10T22:51:44.000000Z | ||
512 | 18995e6577e6bb3622fe41f5bfe01b48 | ||
513 | 2009-04-15T01:28:16.827957Z | ||
514 | 307 | ||
515 | kunnis | ||
516 | |||
517 | |||
518 | |||
519 | |||
520 | |||
521 | |||
522 | |||
523 | |||
524 | |||
525 | |||
526 | |||
527 | |||
528 | |||
529 | |||
530 | |||
531 | |||
532 | |||
533 | |||
534 | |||
535 | |||
536 | |||
537 | 2476 | ||
538 | |||
539 | MatchNode.cs | ||
540 | file | ||
541 | |||
542 | |||
543 | |||
544 | |||
545 | 2010-09-10T22:51:44.000000Z | ||
546 | 3344ef3bdb7db2006eb987a80128cd06 | ||
547 | 2010-05-09T08:21:52.307305Z | ||
548 | 318 | ||
549 | jhurliman | ||
550 | has-props | ||
551 | |||
552 | |||
553 | |||
554 | |||
555 | |||
556 | |||
557 | |||
558 | |||
559 | |||
560 | |||
561 | |||
562 | |||
563 | |||
564 | |||
565 | |||
566 | |||
567 | |||
568 | |||
569 | |||
570 | |||
571 | 10846 | ||
572 | |||
573 | ReferenceNode.cs | ||
574 | file | ||
575 | |||
576 | |||
577 | |||
578 | |||
579 | 2010-09-10T22:51:44.000000Z | ||
580 | 18d76c27d53a4d54f16f57a855a21916 | ||
581 | 2009-02-19T06:47:52.218324Z | ||
582 | 295 | ||
583 | kunnis | ||
584 | has-props | ||
585 | |||
586 | |||
587 | |||
588 | |||
589 | |||
590 | |||
591 | |||
592 | |||
593 | |||
594 | |||
595 | |||
596 | |||
597 | |||
598 | |||
599 | |||
600 | |||
601 | |||
602 | |||
603 | |||
604 | |||
605 | 3705 | ||
606 | |||
607 | FilesNode.cs | ||
608 | file | ||
609 | |||
610 | |||
611 | |||
612 | |||
613 | 2010-09-10T22:51:44.000000Z | ||
614 | e6ddefd5fff49958f77b5ef96f06c09e | ||
615 | 2009-04-15T01:28:16.827957Z | ||
616 | 307 | ||
617 | kunnis | ||
618 | has-props | ||
619 | |||
620 | |||
621 | |||
622 | |||
623 | |||
624 | |||
625 | |||
626 | |||
627 | |||
628 | |||
629 | |||
630 | |||
631 | |||
632 | |||
633 | |||
634 | |||
635 | |||
636 | |||
637 | |||
638 | |||
639 | 6036 | ||
640 | |||
641 | AuthorNode.cs | ||
642 | file | ||
643 | |||
644 | |||
645 | |||
646 | |||
647 | 2010-09-10T22:51:44.000000Z | ||
648 | 07607d8988fc1236ab8bef5fc12f8cd5 | ||
649 | 2009-04-15T01:28:16.827957Z | ||
650 | 307 | ||
651 | kunnis | ||
652 | |||
653 | |||
654 | |||
655 | |||
656 | |||
657 | |||
658 | |||
659 | |||
660 | |||
661 | |||
662 | |||
663 | |||
664 | |||
665 | |||
666 | |||
667 | |||
668 | |||
669 | |||
670 | |||
671 | |||
672 | |||
673 | 2425 | ||
674 | |||
diff --git a/Prebuild/src/Core/Nodes/.svn/prop-base/ConfigurationNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/prop-base/ConfigurationNode.cs.svn-base deleted file mode 100644 index 7b57b30..0000000 --- a/Prebuild/src/Core/Nodes/.svn/prop-base/ConfigurationNode.cs.svn-base +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | K 13 | ||
2 | svn:eol-style | ||
3 | V 6 | ||
4 | native | ||
5 | K 12 | ||
6 | svn:keywords | ||
7 | V 23 | ||
8 | Author Date Id Revision | ||
9 | END | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/prop-base/DataNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/prop-base/DataNode.cs.svn-base deleted file mode 100644 index 7b57b30..0000000 --- a/Prebuild/src/Core/Nodes/.svn/prop-base/DataNode.cs.svn-base +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | K 13 | ||
2 | svn:eol-style | ||
3 | V 6 | ||
4 | native | ||
5 | K 12 | ||
6 | svn:keywords | ||
7 | V 23 | ||
8 | Author Date Id Revision | ||
9 | END | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/prop-base/ExcludeNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/prop-base/ExcludeNode.cs.svn-base deleted file mode 100644 index 7b57b30..0000000 --- a/Prebuild/src/Core/Nodes/.svn/prop-base/ExcludeNode.cs.svn-base +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | K 13 | ||
2 | svn:eol-style | ||
3 | V 6 | ||
4 | native | ||
5 | K 12 | ||
6 | svn:keywords | ||
7 | V 23 | ||
8 | Author Date Id Revision | ||
9 | END | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/prop-base/FileNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/prop-base/FileNode.cs.svn-base deleted file mode 100644 index 7b57b30..0000000 --- a/Prebuild/src/Core/Nodes/.svn/prop-base/FileNode.cs.svn-base +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | K 13 | ||
2 | svn:eol-style | ||
3 | V 6 | ||
4 | native | ||
5 | K 12 | ||
6 | svn:keywords | ||
7 | V 23 | ||
8 | Author Date Id Revision | ||
9 | END | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/prop-base/FilesNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/prop-base/FilesNode.cs.svn-base deleted file mode 100644 index 7b57b30..0000000 --- a/Prebuild/src/Core/Nodes/.svn/prop-base/FilesNode.cs.svn-base +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | K 13 | ||
2 | svn:eol-style | ||
3 | V 6 | ||
4 | native | ||
5 | K 12 | ||
6 | svn:keywords | ||
7 | V 23 | ||
8 | Author Date Id Revision | ||
9 | END | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/prop-base/MatchNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/prop-base/MatchNode.cs.svn-base deleted file mode 100644 index 7b57b30..0000000 --- a/Prebuild/src/Core/Nodes/.svn/prop-base/MatchNode.cs.svn-base +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | K 13 | ||
2 | svn:eol-style | ||
3 | V 6 | ||
4 | native | ||
5 | K 12 | ||
6 | svn:keywords | ||
7 | V 23 | ||
8 | Author Date Id Revision | ||
9 | END | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/prop-base/OptionsNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/prop-base/OptionsNode.cs.svn-base deleted file mode 100644 index 7b57b30..0000000 --- a/Prebuild/src/Core/Nodes/.svn/prop-base/OptionsNode.cs.svn-base +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | K 13 | ||
2 | svn:eol-style | ||
3 | V 6 | ||
4 | native | ||
5 | K 12 | ||
6 | svn:keywords | ||
7 | V 23 | ||
8 | Author Date Id Revision | ||
9 | END | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/prop-base/ProcessNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/prop-base/ProcessNode.cs.svn-base deleted file mode 100644 index 7b57b30..0000000 --- a/Prebuild/src/Core/Nodes/.svn/prop-base/ProcessNode.cs.svn-base +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | K 13 | ||
2 | svn:eol-style | ||
3 | V 6 | ||
4 | native | ||
5 | K 12 | ||
6 | svn:keywords | ||
7 | V 23 | ||
8 | Author Date Id Revision | ||
9 | END | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/prop-base/ProjectNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/prop-base/ProjectNode.cs.svn-base deleted file mode 100644 index 7b57b30..0000000 --- a/Prebuild/src/Core/Nodes/.svn/prop-base/ProjectNode.cs.svn-base +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | K 13 | ||
2 | svn:eol-style | ||
3 | V 6 | ||
4 | native | ||
5 | K 12 | ||
6 | svn:keywords | ||
7 | V 23 | ||
8 | Author Date Id Revision | ||
9 | END | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/prop-base/ReferenceNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/prop-base/ReferenceNode.cs.svn-base deleted file mode 100644 index 7b57b30..0000000 --- a/Prebuild/src/Core/Nodes/.svn/prop-base/ReferenceNode.cs.svn-base +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | K 13 | ||
2 | svn:eol-style | ||
3 | V 6 | ||
4 | native | ||
5 | K 12 | ||
6 | svn:keywords | ||
7 | V 23 | ||
8 | Author Date Id Revision | ||
9 | END | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/prop-base/ReferencePathNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/prop-base/ReferencePathNode.cs.svn-base deleted file mode 100644 index 7b57b30..0000000 --- a/Prebuild/src/Core/Nodes/.svn/prop-base/ReferencePathNode.cs.svn-base +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | K 13 | ||
2 | svn:eol-style | ||
3 | V 6 | ||
4 | native | ||
5 | K 12 | ||
6 | svn:keywords | ||
7 | V 23 | ||
8 | Author Date Id Revision | ||
9 | END | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/prop-base/SolutionNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/prop-base/SolutionNode.cs.svn-base deleted file mode 100644 index 7b57b30..0000000 --- a/Prebuild/src/Core/Nodes/.svn/prop-base/SolutionNode.cs.svn-base +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | K 13 | ||
2 | svn:eol-style | ||
3 | V 6 | ||
4 | native | ||
5 | K 12 | ||
6 | svn:keywords | ||
7 | V 23 | ||
8 | Author Date Id Revision | ||
9 | END | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/text-base/AuthorNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/text-base/AuthorNode.cs.svn-base deleted file mode 100644 index 4c415bb..0000000 --- a/Prebuild/src/Core/Nodes/.svn/text-base/AuthorNode.cs.svn-base +++ /dev/null | |||
@@ -1,87 +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.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("Author")] | ||
39 | public class AuthorNode : DataNode | ||
40 | { | ||
41 | #region Fields | ||
42 | |||
43 | private string m_Signature; | ||
44 | |||
45 | #endregion | ||
46 | |||
47 | #region Properties | ||
48 | |||
49 | /// <summary> | ||
50 | /// Gets the signature. | ||
51 | /// </summary> | ||
52 | /// <value>The signature.</value> | ||
53 | public string Signature | ||
54 | { | ||
55 | get | ||
56 | { | ||
57 | return m_Signature; | ||
58 | } | ||
59 | } | ||
60 | |||
61 | #endregion | ||
62 | |||
63 | #region Public Methods | ||
64 | |||
65 | /// <summary> | ||
66 | /// Parses the specified node. | ||
67 | /// </summary> | ||
68 | /// <param name="node">The node.</param> | ||
69 | public override void Parse(XmlNode node) | ||
70 | { | ||
71 | if( node == null ) | ||
72 | { | ||
73 | throw new ArgumentNullException("node"); | ||
74 | } | ||
75 | |||
76 | m_Signature = Helper.InterpolateForEnvironmentVariables(node.InnerText); | ||
77 | if(m_Signature == null) | ||
78 | { | ||
79 | m_Signature = ""; | ||
80 | } | ||
81 | |||
82 | m_Signature = m_Signature.Trim(); | ||
83 | } | ||
84 | |||
85 | #endregion | ||
86 | } | ||
87 | } | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/text-base/CleanFilesNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/text-base/CleanFilesNode.cs.svn-base deleted file mode 100644 index 71405f9..0000000 --- a/Prebuild/src/Core/Nodes/.svn/text-base/CleanFilesNode.cs.svn-base +++ /dev/null | |||
@@ -1,80 +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.Generic; | ||
28 | using System.Xml; | ||
29 | |||
30 | using Prebuild.Core.Attributes; | ||
31 | using Prebuild.Core.Interfaces; | ||
32 | using Prebuild.Core.Utilities; | ||
33 | |||
34 | namespace Prebuild.Core.Nodes | ||
35 | { | ||
36 | [DataNode("CleanFiles")] | ||
37 | public class CleanFilesNode : DataNode | ||
38 | { | ||
39 | #region Fields | ||
40 | |||
41 | private string m_Pattern; | ||
42 | |||
43 | #endregion | ||
44 | |||
45 | #region Properties | ||
46 | |||
47 | /// <summary> | ||
48 | /// Gets the signature. | ||
49 | /// </summary> | ||
50 | /// <value>The signature.</value> | ||
51 | public string Pattern | ||
52 | { | ||
53 | get | ||
54 | { | ||
55 | return m_Pattern; | ||
56 | } | ||
57 | } | ||
58 | |||
59 | #endregion | ||
60 | |||
61 | #region Public Methods | ||
62 | |||
63 | /// <summary> | ||
64 | /// Parses the specified node. | ||
65 | /// </summary> | ||
66 | /// <param name="node">The node.</param> | ||
67 | public override void Parse(XmlNode node) | ||
68 | { | ||
69 | if (node == null) | ||
70 | { | ||
71 | throw new ArgumentNullException("node"); | ||
72 | } | ||
73 | |||
74 | m_Pattern = Helper.AttributeValue(node, "pattern", String.Empty); ; | ||
75 | m_Pattern = m_Pattern.Trim(); | ||
76 | } | ||
77 | |||
78 | #endregion | ||
79 | } | ||
80 | } \ No newline at end of file | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/text-base/CleanupNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/text-base/CleanupNode.cs.svn-base deleted file mode 100644 index b8131b0..0000000 --- a/Prebuild/src/Core/Nodes/.svn/text-base/CleanupNode.cs.svn-base +++ /dev/null | |||
@@ -1,85 +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.Generic; | ||
28 | using System.Xml; | ||
29 | |||
30 | using Prebuild.Core.Attributes; | ||
31 | using Prebuild.Core.Interfaces; | ||
32 | |||
33 | namespace Prebuild.Core.Nodes | ||
34 | { | ||
35 | [DataNode("Cleanup")] | ||
36 | public class CleanupNode : DataNode | ||
37 | { | ||
38 | #region Fields | ||
39 | |||
40 | private List<CleanFilesNode> m_CleanFiles = new List<CleanFilesNode>(); | ||
41 | |||
42 | #endregion | ||
43 | |||
44 | #region Properties | ||
45 | |||
46 | /// <summary> | ||
47 | /// Gets the signature. | ||
48 | /// </summary> | ||
49 | /// <value>The signature.</value> | ||
50 | public List<CleanFilesNode> CleanFiles | ||
51 | { | ||
52 | get | ||
53 | { | ||
54 | return m_CleanFiles; | ||
55 | } | ||
56 | } | ||
57 | |||
58 | #endregion | ||
59 | |||
60 | #region Public Methods | ||
61 | |||
62 | /// <summary> | ||
63 | /// Parses the specified node. | ||
64 | /// </summary> | ||
65 | /// <param name="node">The node.</param> | ||
66 | public override void Parse(XmlNode node) | ||
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 | if (dataNode is CleanFilesNode) | ||
77 | { | ||
78 | m_CleanFiles.Add((CleanFilesNode)dataNode); | ||
79 | } | ||
80 | } | ||
81 | } | ||
82 | |||
83 | #endregion | ||
84 | } | ||
85 | } \ No newline at end of file | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/text-base/ConfigurationNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/text-base/ConfigurationNode.cs.svn-base deleted file mode 100644 index cd2f740..0000000 --- a/Prebuild/src/Core/Nodes/.svn/text-base/ConfigurationNode.cs.svn-base +++ /dev/null | |||
@@ -1,225 +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 string m_Platform = "AnyCPU"; | ||
45 | private OptionsNode m_Options; | ||
46 | |||
47 | #endregion | ||
48 | |||
49 | #region Constructors | ||
50 | |||
51 | /// <summary> | ||
52 | /// Initializes a new instance of the <see cref="ConfigurationNode"/> class. | ||
53 | /// </summary> | ||
54 | public ConfigurationNode() | ||
55 | { | ||
56 | m_Options = new OptionsNode(); | ||
57 | } | ||
58 | |||
59 | #endregion | ||
60 | |||
61 | #region Properties | ||
62 | |||
63 | /// <summary> | ||
64 | /// Gets or sets the parent. | ||
65 | /// </summary> | ||
66 | /// <value>The parent.</value> | ||
67 | public override IDataNode Parent | ||
68 | { | ||
69 | get | ||
70 | { | ||
71 | return base.Parent; | ||
72 | } | ||
73 | set | ||
74 | { | ||
75 | base.Parent = value; | ||
76 | if(base.Parent is SolutionNode) | ||
77 | { | ||
78 | SolutionNode node = (SolutionNode)base.Parent; | ||
79 | if(node != null && node.Options != null) | ||
80 | { | ||
81 | node.Options.CopyTo(m_Options); | ||
82 | } | ||
83 | } | ||
84 | } | ||
85 | } | ||
86 | |||
87 | /// <summary> | ||
88 | /// Identifies the platform for this specific configuration. | ||
89 | /// </summary> | ||
90 | public string Platform | ||
91 | { | ||
92 | get | ||
93 | { | ||
94 | return m_Platform; | ||
95 | } | ||
96 | set | ||
97 | { | ||
98 | switch ((value + "").ToLower()) | ||
99 | { | ||
100 | case "x86": | ||
101 | case "x64": | ||
102 | m_Platform = value; | ||
103 | break; | ||
104 | case "itanium": | ||
105 | m_Platform = "Itanium"; | ||
106 | break; | ||
107 | default: | ||
108 | m_Platform = "AnyCPU"; | ||
109 | break; | ||
110 | } | ||
111 | } | ||
112 | } | ||
113 | |||
114 | /// <summary> | ||
115 | /// Gets the name. | ||
116 | /// </summary> | ||
117 | /// <value>The name.</value> | ||
118 | public string Name | ||
119 | { | ||
120 | get | ||
121 | { | ||
122 | return m_Name; | ||
123 | } | ||
124 | } | ||
125 | |||
126 | /// <summary> | ||
127 | /// Gets the name and platform for the configuration. | ||
128 | /// </summary> | ||
129 | /// <value>The name and platform.</value> | ||
130 | public string NameAndPlatform | ||
131 | { | ||
132 | get | ||
133 | { | ||
134 | string platform = m_Platform; | ||
135 | if (platform == "AnyCPU") | ||
136 | platform = "Any CPU"; | ||
137 | |||
138 | return String.Format("{0}|{1}", m_Name, platform); | ||
139 | } | ||
140 | } | ||
141 | |||
142 | /// <summary> | ||
143 | /// Gets or sets the options. | ||
144 | /// </summary> | ||
145 | /// <value>The options.</value> | ||
146 | public OptionsNode Options | ||
147 | { | ||
148 | get | ||
149 | { | ||
150 | return m_Options; | ||
151 | } | ||
152 | set | ||
153 | { | ||
154 | m_Options = value; | ||
155 | } | ||
156 | } | ||
157 | |||
158 | #endregion | ||
159 | |||
160 | #region Public Methods | ||
161 | |||
162 | /// <summary> | ||
163 | /// Parses the specified node. | ||
164 | /// </summary> | ||
165 | /// <param name="node">The node.</param> | ||
166 | public override void Parse(XmlNode node) | ||
167 | { | ||
168 | m_Name = Helper.AttributeValue(node, "name", m_Name); | ||
169 | Platform = Helper.AttributeValue(node, "platform", m_Platform); | ||
170 | |||
171 | if (node == null) | ||
172 | { | ||
173 | throw new ArgumentNullException("node"); | ||
174 | } | ||
175 | foreach(XmlNode child in node.ChildNodes) | ||
176 | { | ||
177 | IDataNode dataNode = Kernel.Instance.ParseNode(child, this); | ||
178 | if(dataNode is OptionsNode) | ||
179 | { | ||
180 | ((OptionsNode)dataNode).CopyTo(m_Options); | ||
181 | } | ||
182 | } | ||
183 | } | ||
184 | |||
185 | /// <summary> | ||
186 | /// Copies to. | ||
187 | /// </summary> | ||
188 | /// <param name="conf">The conf.</param> | ||
189 | public void CopyTo(ConfigurationNode conf) | ||
190 | { | ||
191 | m_Options.CopyTo(conf.m_Options); | ||
192 | } | ||
193 | |||
194 | #endregion | ||
195 | |||
196 | #region ICloneable Members | ||
197 | |||
198 | /// <summary> | ||
199 | /// Creates a new object that is a copy of the current instance. | ||
200 | /// </summary> | ||
201 | /// <returns> | ||
202 | /// A new object that is a copy of this instance. | ||
203 | /// </returns> | ||
204 | public object Clone() | ||
205 | { | ||
206 | ConfigurationNode ret = new ConfigurationNode(); | ||
207 | ret.m_Name = m_Name; | ||
208 | ret.m_Platform = m_Platform; | ||
209 | m_Options.CopyTo(ret.m_Options); | ||
210 | return ret; | ||
211 | } | ||
212 | |||
213 | #endregion | ||
214 | |||
215 | #region IComparable Members | ||
216 | |||
217 | public int CompareTo(object obj) | ||
218 | { | ||
219 | ConfigurationNode that = (ConfigurationNode) obj; | ||
220 | return this.m_Name.CompareTo(that.m_Name); | ||
221 | } | ||
222 | |||
223 | #endregion | ||
224 | } | ||
225 | } | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/text-base/ConfigurationNodeCollection.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/text-base/ConfigurationNodeCollection.cs.svn-base deleted file mode 100644 index 1c38d9e..0000000 --- a/Prebuild/src/Core/Nodes/.svn/text-base/ConfigurationNodeCollection.cs.svn-base +++ /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.Collections.Generic; | ||
27 | |||
28 | namespace Prebuild.Core.Nodes | ||
29 | { | ||
30 | /// <summary> | ||
31 | /// Implements a specialized list of configuration nodes which allows for lookup via | ||
32 | /// configuration name and platform. | ||
33 | /// </summary> | ||
34 | public class ConfigurationNodeCollection : List<ConfigurationNode> | ||
35 | { | ||
36 | #region Properties | ||
37 | |||
38 | public ConfigurationNode this[string nameAndPlatform] | ||
39 | { | ||
40 | get | ||
41 | { | ||
42 | foreach (ConfigurationNode configurationNode in this) | ||
43 | { | ||
44 | if (configurationNode.NameAndPlatform == nameAndPlatform) | ||
45 | { | ||
46 | return configurationNode; | ||
47 | } | ||
48 | } | ||
49 | |||
50 | return null; | ||
51 | } | ||
52 | |||
53 | set | ||
54 | { | ||
55 | // See if the node | ||
56 | ConfigurationNode configurationNode = this[nameAndPlatform]; | ||
57 | |||
58 | if (configurationNode != null) | ||
59 | { | ||
60 | this[IndexOf(configurationNode)] = value; | ||
61 | } | ||
62 | else | ||
63 | { | ||
64 | Add(value); | ||
65 | } | ||
66 | } | ||
67 | } | ||
68 | |||
69 | #endregion | ||
70 | } | ||
71 | } | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/text-base/DataNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/text-base/DataNode.cs.svn-base deleted file mode 100644 index 318b13c..0000000 --- a/Prebuild/src/Core/Nodes/.svn/text-base/DataNode.cs.svn-base +++ /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(type)) | ||
108 | { | ||
109 | return SubType.CodeBehind; | ||
110 | } | ||
111 | } | ||
112 | } | ||
113 | return SubType.Code; | ||
114 | } | ||
115 | #endregion | ||
116 | } | ||
117 | } | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/text-base/DatabaseProjectNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/text-base/DatabaseProjectNode.cs.svn-base deleted file mode 100644 index 278ecd8..0000000 --- a/Prebuild/src/Core/Nodes/.svn/text-base/DatabaseProjectNode.cs.svn-base +++ /dev/null | |||
@@ -1,93 +0,0 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using System.Xml; | ||
5 | |||
6 | using Prebuild.Core.Attributes; | ||
7 | using Prebuild.Core.Interfaces; | ||
8 | using Prebuild.Core.Utilities; | ||
9 | |||
10 | namespace Prebuild.Core.Nodes | ||
11 | { | ||
12 | [DataNode("DatabaseProject")] | ||
13 | public class DatabaseProjectNode : DataNode | ||
14 | { | ||
15 | string name; | ||
16 | string path; | ||
17 | string fullpath; | ||
18 | Guid guid = Guid.NewGuid(); | ||
19 | readonly List<AuthorNode> authors = new List<AuthorNode>(); | ||
20 | readonly List<DatabaseReferenceNode> references = new List<DatabaseReferenceNode>(); | ||
21 | |||
22 | public Guid Guid | ||
23 | { | ||
24 | get { return guid; } | ||
25 | } | ||
26 | |||
27 | public string Name | ||
28 | { | ||
29 | get { return name; } | ||
30 | } | ||
31 | |||
32 | public string Path | ||
33 | { | ||
34 | get { return path; } | ||
35 | } | ||
36 | |||
37 | public string FullPath | ||
38 | { | ||
39 | get { return fullpath; } | ||
40 | } | ||
41 | |||
42 | public IEnumerable<DatabaseReferenceNode> References | ||
43 | { | ||
44 | get { return references; } | ||
45 | } | ||
46 | |||
47 | public override void Parse(XmlNode node) | ||
48 | { | ||
49 | name = Helper.AttributeValue(node, "name", name); | ||
50 | path = Helper.AttributeValue(node, "path", name); | ||
51 | |||
52 | try | ||
53 | { | ||
54 | fullpath = Helper.ResolvePath(path); | ||
55 | } | ||
56 | catch | ||
57 | { | ||
58 | throw new WarningException("Could not resolve Solution path: {0}", path); | ||
59 | } | ||
60 | |||
61 | Kernel.Instance.CurrentWorkingDirectory.Push(); | ||
62 | |||
63 | try | ||
64 | { | ||
65 | Helper.SetCurrentDir(fullpath); | ||
66 | |||
67 | if (node == null) | ||
68 | { | ||
69 | throw new ArgumentNullException("node"); | ||
70 | } | ||
71 | |||
72 | foreach (XmlNode child in node.ChildNodes) | ||
73 | { | ||
74 | IDataNode dataNode = Kernel.Instance.ParseNode(child, this); | ||
75 | |||
76 | if (dataNode == null) | ||
77 | continue; | ||
78 | |||
79 | if (dataNode is AuthorNode) | ||
80 | authors.Add((AuthorNode)dataNode); | ||
81 | else if (dataNode is DatabaseReferenceNode) | ||
82 | references.Add((DatabaseReferenceNode)dataNode); | ||
83 | } | ||
84 | } | ||
85 | finally | ||
86 | { | ||
87 | Kernel.Instance.CurrentWorkingDirectory.Pop(); | ||
88 | } | ||
89 | |||
90 | base.Parse(node); | ||
91 | } | ||
92 | } | ||
93 | } | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/text-base/DatabaseReferenceNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/text-base/DatabaseReferenceNode.cs.svn-base deleted file mode 100644 index 845db24..0000000 --- a/Prebuild/src/Core/Nodes/.svn/text-base/DatabaseReferenceNode.cs.svn-base +++ /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/.svn/text-base/DescriptionNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/text-base/DescriptionNode.cs.svn-base deleted file mode 100644 index d1293a0..0000000 --- a/Prebuild/src/Core/Nodes/.svn/text-base/DescriptionNode.cs.svn-base +++ /dev/null | |||
@@ -1,87 +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.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 | /// The object representing the /Prebuild/Solution/Project/Description element | ||
37 | /// </summary> | ||
38 | [DataNode("Description")] | ||
39 | public class DescriptionNode : DataNode | ||
40 | { | ||
41 | #region Fields | ||
42 | |||
43 | private string m_Value; | ||
44 | |||
45 | #endregion | ||
46 | |||
47 | #region Properties | ||
48 | |||
49 | /// <summary> | ||
50 | /// Gets the description Value. | ||
51 | /// </summary> | ||
52 | /// <value>The description Value.</value> | ||
53 | public string Value | ||
54 | { | ||
55 | get | ||
56 | { | ||
57 | return m_Value; | ||
58 | } | ||
59 | } | ||
60 | |||
61 | #endregion | ||
62 | |||
63 | #region Public Methods | ||
64 | |||
65 | /// <summary> | ||
66 | /// Parses the specified node. | ||
67 | /// </summary> | ||
68 | /// <param name="node">The node.</param> | ||
69 | public override void Parse(XmlNode node) | ||
70 | { | ||
71 | if( node == null ) | ||
72 | { | ||
73 | throw new ArgumentNullException("node"); | ||
74 | } | ||
75 | |||
76 | m_Value = Helper.InterpolateForEnvironmentVariables(node.InnerText); | ||
77 | if(m_Value == null) | ||
78 | { | ||
79 | m_Value = ""; | ||
80 | } | ||
81 | |||
82 | m_Value = m_Value.Trim(); | ||
83 | } | ||
84 | |||
85 | #endregion | ||
86 | } | ||
87 | } | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/text-base/ExcludeNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/text-base/ExcludeNode.cs.svn-base deleted file mode 100644 index 7f04cba..0000000 --- a/Prebuild/src/Core/Nodes/.svn/text-base/ExcludeNode.cs.svn-base +++ /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/.svn/text-base/FileNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/text-base/FileNode.cs.svn-base deleted file mode 100644 index 01cea1e..0000000 --- a/Prebuild/src/Core/Nodes/.svn/text-base/FileNode.cs.svn-base +++ /dev/null | |||
@@ -1,285 +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 | /// <summary> | ||
59 | /// | ||
60 | /// </summary> | ||
61 | ApplicationDefinition, | ||
62 | /// <summary> | ||
63 | /// | ||
64 | /// </summary> | ||
65 | Page | ||
66 | } | ||
67 | |||
68 | /// <summary> | ||
69 | /// | ||
70 | /// </summary> | ||
71 | public enum SubType | ||
72 | { | ||
73 | /// <summary> | ||
74 | /// | ||
75 | /// </summary> | ||
76 | Code, | ||
77 | /// <summary> | ||
78 | /// | ||
79 | /// </summary> | ||
80 | Component, | ||
81 | /// <summary> | ||
82 | /// | ||
83 | /// </summary> | ||
84 | Designer, | ||
85 | /// <summary> | ||
86 | /// | ||
87 | /// </summary> | ||
88 | Form, | ||
89 | /// <summary> | ||
90 | /// | ||
91 | /// </summary> | ||
92 | Settings, | ||
93 | /// <summary> | ||
94 | /// | ||
95 | /// </summary> | ||
96 | UserControl, | ||
97 | /// <summary> | ||
98 | /// | ||
99 | /// </summary> | ||
100 | CodeBehind, | ||
101 | } | ||
102 | |||
103 | public enum CopyToOutput | ||
104 | { | ||
105 | Never, | ||
106 | Always, | ||
107 | PreserveNewest | ||
108 | } | ||
109 | |||
110 | /// <summary> | ||
111 | /// | ||
112 | /// </summary> | ||
113 | [DataNode("File")] | ||
114 | public class FileNode : DataNode | ||
115 | { | ||
116 | #region Fields | ||
117 | |||
118 | private string m_Path; | ||
119 | private string m_ResourceName = ""; | ||
120 | private BuildAction? m_BuildAction; | ||
121 | private bool m_Valid; | ||
122 | private SubType? m_SubType; | ||
123 | private CopyToOutput m_CopyToOutput = CopyToOutput.Never; | ||
124 | private bool m_Link = false; | ||
125 | private string m_LinkPath = string.Empty; | ||
126 | private bool m_PreservePath = false; | ||
127 | |||
128 | |||
129 | #endregion | ||
130 | |||
131 | #region Properties | ||
132 | |||
133 | /// <summary> | ||
134 | /// | ||
135 | /// </summary> | ||
136 | public string Path | ||
137 | { | ||
138 | get | ||
139 | { | ||
140 | return m_Path; | ||
141 | } | ||
142 | } | ||
143 | |||
144 | /// <summary> | ||
145 | /// | ||
146 | /// </summary> | ||
147 | public string ResourceName | ||
148 | { | ||
149 | get | ||
150 | { | ||
151 | return m_ResourceName; | ||
152 | } | ||
153 | } | ||
154 | |||
155 | /// <summary> | ||
156 | /// | ||
157 | /// </summary> | ||
158 | public BuildAction BuildAction | ||
159 | { | ||
160 | get | ||
161 | { | ||
162 | if (m_BuildAction != null) | ||
163 | return m_BuildAction.Value; | ||
164 | else | ||
165 | return GetBuildActionByFileName(this.Path); | ||
166 | |||
167 | } | ||
168 | } | ||
169 | |||
170 | public CopyToOutput CopyToOutput | ||
171 | { | ||
172 | get | ||
173 | { | ||
174 | return this.m_CopyToOutput; | ||
175 | } | ||
176 | } | ||
177 | |||
178 | public bool IsLink | ||
179 | { | ||
180 | get | ||
181 | { | ||
182 | return this.m_Link; | ||
183 | } | ||
184 | } | ||
185 | |||
186 | public string LinkPath | ||
187 | { | ||
188 | get | ||
189 | { | ||
190 | return this.m_LinkPath; | ||
191 | } | ||
192 | } | ||
193 | /// <summary> | ||
194 | /// | ||
195 | /// </summary> | ||
196 | public SubType SubType | ||
197 | { | ||
198 | get | ||
199 | { | ||
200 | if (m_SubType != null) | ||
201 | return m_SubType.Value; | ||
202 | else | ||
203 | return GetSubTypeByFileName(this.Path); | ||
204 | } | ||
205 | } | ||
206 | |||
207 | /// <summary> | ||
208 | /// | ||
209 | /// </summary> | ||
210 | public bool IsValid | ||
211 | { | ||
212 | get | ||
213 | { | ||
214 | return m_Valid; | ||
215 | } | ||
216 | } | ||
217 | |||
218 | /// <summary> | ||
219 | /// | ||
220 | /// </summary> | ||
221 | /// <param name="file"></param> | ||
222 | /// <returns></returns> | ||
223 | public bool PreservePath | ||
224 | { | ||
225 | get | ||
226 | { | ||
227 | return m_PreservePath; | ||
228 | } | ||
229 | } | ||
230 | |||
231 | #endregion | ||
232 | |||
233 | #region Public Methods | ||
234 | |||
235 | /// <summary> | ||
236 | /// | ||
237 | /// </summary> | ||
238 | /// <param name="node"></param> | ||
239 | public override void Parse(XmlNode node) | ||
240 | { | ||
241 | string buildAction = Helper.AttributeValue(node, "buildAction", String.Empty); | ||
242 | if (buildAction != string.Empty) | ||
243 | m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction), buildAction); | ||
244 | string subType = Helper.AttributeValue(node, "subType", string.Empty); | ||
245 | if (subType != String.Empty) | ||
246 | m_SubType = (SubType)Enum.Parse(typeof(SubType), subType); | ||
247 | |||
248 | m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString()); | ||
249 | this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString)); | ||
250 | if ( this.m_Link == true ) | ||
251 | { | ||
252 | this.m_LinkPath = Helper.AttributeValue( node, "linkPath", string.Empty ); | ||
253 | } | ||
254 | this.m_CopyToOutput = (CopyToOutput) Enum.Parse(typeof(CopyToOutput), Helper.AttributeValue(node, "copyToOutput", this.m_CopyToOutput.ToString())); | ||
255 | this.m_PreservePath = bool.Parse( Helper.AttributeValue( node, "preservePath", bool.FalseString ) ); | ||
256 | |||
257 | if( node == null ) | ||
258 | { | ||
259 | throw new ArgumentNullException("node"); | ||
260 | } | ||
261 | |||
262 | m_Path = Helper.InterpolateForEnvironmentVariables(node.InnerText); | ||
263 | if(m_Path == null) | ||
264 | { | ||
265 | m_Path = ""; | ||
266 | } | ||
267 | |||
268 | m_Path = m_Path.Trim(); | ||
269 | m_Valid = true; | ||
270 | if(!File.Exists(m_Path)) | ||
271 | { | ||
272 | m_Valid = false; | ||
273 | Kernel.Instance.Log.Write(LogType.Warning, "File does not exist: {0}", m_Path); | ||
274 | } | ||
275 | |||
276 | if (System.IO.Path.GetExtension(m_Path) == ".settings") | ||
277 | { | ||
278 | m_SubType = SubType.Settings; | ||
279 | m_BuildAction = BuildAction.None; | ||
280 | } | ||
281 | } | ||
282 | |||
283 | #endregion | ||
284 | } | ||
285 | } | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/text-base/FilesNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/text-base/FilesNode.cs.svn-base deleted file mode 100644 index 23a716c..0000000 --- a/Prebuild/src/Core/Nodes/.svn/text-base/FilesNode.cs.svn-base +++ /dev/null | |||
@@ -1,204 +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.Xml; | ||
29 | |||
30 | using Prebuild.Core.Attributes; | ||
31 | using Prebuild.Core.Interfaces; | ||
32 | using System.IO; | ||
33 | |||
34 | namespace Prebuild.Core.Nodes | ||
35 | { | ||
36 | /// <summary> | ||
37 | /// | ||
38 | /// </summary> | ||
39 | [DataNode("Files")] | ||
40 | public class FilesNode : DataNode | ||
41 | { | ||
42 | #region Fields | ||
43 | |||
44 | private readonly List<string> m_Files = new List<string>(); | ||
45 | private readonly Dictionary<string,BuildAction> m_BuildActions = new Dictionary<string, BuildAction>(); | ||
46 | private readonly Dictionary<string, SubType> m_SubTypes = new Dictionary<string, SubType>(); | ||
47 | private readonly Dictionary<string, string> m_ResourceNames = new Dictionary<string, string>(); | ||
48 | private readonly Dictionary<string, CopyToOutput> m_CopyToOutputs = new Dictionary<string, CopyToOutput>(); | ||
49 | private readonly Dictionary<string, bool> m_Links = new Dictionary<string, bool>(); | ||
50 | private readonly Dictionary<string, string> m_LinkPaths = new Dictionary<string, string>(); | ||
51 | private readonly Dictionary<string, bool> m_PreservePaths = new Dictionary<string, bool>(); | ||
52 | |||
53 | #endregion | ||
54 | |||
55 | #region Properties | ||
56 | |||
57 | public int Count | ||
58 | { | ||
59 | get | ||
60 | { | ||
61 | return m_Files.Count; | ||
62 | } | ||
63 | } | ||
64 | |||
65 | #endregion | ||
66 | |||
67 | #region Public Methods | ||
68 | |||
69 | public BuildAction GetBuildAction(string file) | ||
70 | { | ||
71 | if(!m_BuildActions.ContainsKey(file)) | ||
72 | { | ||
73 | return BuildAction.Compile; | ||
74 | } | ||
75 | |||
76 | return m_BuildActions[file]; | ||
77 | } | ||
78 | |||
79 | public CopyToOutput GetCopyToOutput(string file) | ||
80 | { | ||
81 | if (!m_CopyToOutputs.ContainsKey(file)) | ||
82 | { | ||
83 | return CopyToOutput.Never; | ||
84 | } | ||
85 | return m_CopyToOutputs[file]; | ||
86 | } | ||
87 | |||
88 | public bool GetIsLink(string file) | ||
89 | { | ||
90 | if (!m_Links.ContainsKey(file)) | ||
91 | { | ||
92 | return false; | ||
93 | } | ||
94 | return m_Links[file]; | ||
95 | } | ||
96 | |||
97 | public bool Contains(string file) | ||
98 | { | ||
99 | return m_Files.Contains(file); | ||
100 | } | ||
101 | |||
102 | public string GetLinkPath( string file ) | ||
103 | { | ||
104 | if ( !m_LinkPaths.ContainsKey( file ) ) | ||
105 | { | ||
106 | return string.Empty; | ||
107 | } | ||
108 | return m_LinkPaths[ file ]; | ||
109 | } | ||
110 | |||
111 | public SubType GetSubType(string file) | ||
112 | { | ||
113 | if(!m_SubTypes.ContainsKey(file)) | ||
114 | { | ||
115 | return SubType.Code; | ||
116 | } | ||
117 | |||
118 | return m_SubTypes[file]; | ||
119 | } | ||
120 | |||
121 | public string GetResourceName(string file) | ||
122 | { | ||
123 | if(!m_ResourceNames.ContainsKey(file)) | ||
124 | { | ||
125 | return string.Empty; | ||
126 | } | ||
127 | |||
128 | return m_ResourceNames[file]; | ||
129 | } | ||
130 | |||
131 | public bool GetPreservePath( string file ) | ||
132 | { | ||
133 | if ( !m_PreservePaths.ContainsKey( file ) ) | ||
134 | { | ||
135 | return false; | ||
136 | } | ||
137 | |||
138 | return m_PreservePaths[ file ]; | ||
139 | } | ||
140 | |||
141 | public override void Parse(XmlNode node) | ||
142 | { | ||
143 | if( node == null ) | ||
144 | { | ||
145 | throw new ArgumentNullException("node"); | ||
146 | } | ||
147 | foreach(XmlNode child in node.ChildNodes) | ||
148 | { | ||
149 | IDataNode dataNode = Kernel.Instance.ParseNode(child, this); | ||
150 | if(dataNode is FileNode) | ||
151 | { | ||
152 | FileNode fileNode = (FileNode)dataNode; | ||
153 | if(fileNode.IsValid) | ||
154 | { | ||
155 | if (!m_Files.Contains(fileNode.Path)) | ||
156 | { | ||
157 | m_Files.Add(fileNode.Path); | ||
158 | m_BuildActions[fileNode.Path] = fileNode.BuildAction; | ||
159 | m_SubTypes[fileNode.Path] = fileNode.SubType; | ||
160 | m_ResourceNames[fileNode.Path] = fileNode.ResourceName; | ||
161 | m_PreservePaths[ fileNode.Path ] = fileNode.PreservePath; | ||
162 | m_Links[ fileNode.Path ] = fileNode.IsLink; | ||
163 | m_LinkPaths[ fileNode.Path ] = fileNode.LinkPath; | ||
164 | m_CopyToOutputs[ fileNode.Path ] = fileNode.CopyToOutput; | ||
165 | |||
166 | } | ||
167 | } | ||
168 | } | ||
169 | else if(dataNode is MatchNode) | ||
170 | { | ||
171 | foreach(string file in ((MatchNode)dataNode).Files) | ||
172 | { | ||
173 | MatchNode matchNode = (MatchNode)dataNode; | ||
174 | if (!m_Files.Contains(file)) | ||
175 | { | ||
176 | m_Files.Add(file); | ||
177 | if (matchNode.BuildAction == null) | ||
178 | m_BuildActions[file] = GetBuildActionByFileName(file); | ||
179 | else | ||
180 | m_BuildActions[file] = matchNode.BuildAction.Value; | ||
181 | m_SubTypes[file] = matchNode.SubType == null ? GetSubTypeByFileName(file) : matchNode.SubType.Value; | ||
182 | m_ResourceNames[ file ] = matchNode.ResourceName; | ||
183 | m_PreservePaths[ file ] = matchNode.PreservePath; | ||
184 | m_Links[ file ] = matchNode.IsLink; | ||
185 | m_LinkPaths[ file ] = matchNode.LinkPath; | ||
186 | m_CopyToOutputs[ file ] = matchNode.CopyToOutput; | ||
187 | |||
188 | } | ||
189 | } | ||
190 | } | ||
191 | } | ||
192 | } | ||
193 | |||
194 | // TODO: Check in to why StringCollection's enumerator doesn't implement | ||
195 | // IEnumerator? | ||
196 | public IEnumerator<string> GetEnumerator() | ||
197 | { | ||
198 | return m_Files.GetEnumerator(); | ||
199 | } | ||
200 | |||
201 | #endregion | ||
202 | |||
203 | } | ||
204 | } | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/text-base/MatchNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/text-base/MatchNode.cs.svn-base deleted file mode 100644 index 9735265..0000000 --- a/Prebuild/src/Core/Nodes/.svn/text-base/MatchNode.cs.svn-base +++ /dev/null | |||
@@ -1,367 +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.IO; | ||
29 | using System.Text.RegularExpressions; | ||
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("Match")] | ||
42 | public class MatchNode : DataNode | ||
43 | { | ||
44 | #region Fields | ||
45 | |||
46 | private readonly List<string> m_Files = new List<string>(); | ||
47 | private Regex m_Regex; | ||
48 | private BuildAction? m_BuildAction; | ||
49 | private SubType? m_SubType; | ||
50 | string m_ResourceName = ""; | ||
51 | private CopyToOutput m_CopyToOutput; | ||
52 | private bool m_Link; | ||
53 | private string m_LinkPath; | ||
54 | private bool m_PreservePath; | ||
55 | private readonly List<ExcludeNode> m_Exclusions = new List<ExcludeNode>(); | ||
56 | |||
57 | #endregion | ||
58 | |||
59 | #region Properties | ||
60 | |||
61 | /// <summary> | ||
62 | /// | ||
63 | /// </summary> | ||
64 | public IEnumerable<string> Files | ||
65 | { | ||
66 | get | ||
67 | { | ||
68 | return m_Files; | ||
69 | } | ||
70 | } | ||
71 | |||
72 | /// <summary> | ||
73 | /// | ||
74 | /// </summary> | ||
75 | public BuildAction? BuildAction | ||
76 | { | ||
77 | get | ||
78 | { | ||
79 | return m_BuildAction; | ||
80 | } | ||
81 | } | ||
82 | |||
83 | /// <summary> | ||
84 | /// | ||
85 | /// </summary> | ||
86 | public SubType? SubType | ||
87 | { | ||
88 | get | ||
89 | { | ||
90 | return m_SubType; | ||
91 | } | ||
92 | } | ||
93 | |||
94 | public CopyToOutput CopyToOutput | ||
95 | { | ||
96 | get | ||
97 | { | ||
98 | return m_CopyToOutput; | ||
99 | } | ||
100 | } | ||
101 | |||
102 | public bool IsLink | ||
103 | { | ||
104 | get | ||
105 | { | ||
106 | return m_Link; | ||
107 | } | ||
108 | } | ||
109 | |||
110 | public string LinkPath | ||
111 | { | ||
112 | get | ||
113 | { | ||
114 | return m_LinkPath; | ||
115 | } | ||
116 | } | ||
117 | /// <summary> | ||
118 | /// | ||
119 | /// </summary> | ||
120 | public string ResourceName | ||
121 | { | ||
122 | get | ||
123 | { | ||
124 | return m_ResourceName; | ||
125 | } | ||
126 | } | ||
127 | |||
128 | public bool PreservePath | ||
129 | { | ||
130 | get | ||
131 | { | ||
132 | return m_PreservePath; | ||
133 | } | ||
134 | } | ||
135 | |||
136 | #endregion | ||
137 | |||
138 | #region Private Methods | ||
139 | |||
140 | /// <summary> | ||
141 | /// Recurses the directories. | ||
142 | /// </summary> | ||
143 | /// <param name="path">The path.</param> | ||
144 | /// <param name="pattern">The pattern.</param> | ||
145 | /// <param name="recurse">if set to <c>true</c> [recurse].</param> | ||
146 | /// <param name="useRegex">if set to <c>true</c> [use regex].</param> | ||
147 | private void RecurseDirectories(string path, string pattern, bool recurse, bool useRegex, List<ExcludeNode> exclusions) | ||
148 | { | ||
149 | Match match; | ||
150 | try | ||
151 | { | ||
152 | string[] files; | ||
153 | |||
154 | Boolean excludeFile; | ||
155 | if(!useRegex) | ||
156 | { | ||
157 | try | ||
158 | { | ||
159 | files = Directory.GetFiles(path, pattern); | ||
160 | } | ||
161 | catch (IOException) | ||
162 | { | ||
163 | // swallow weird IOException error when running in a virtual box | ||
164 | // guest OS on a network share when the host OS is not Windows. | ||
165 | // This seems to happen on network shares | ||
166 | // when no files match, and may be related to this report: | ||
167 | // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=254546 | ||
168 | |||
169 | files = null; | ||
170 | } | ||
171 | |||
172 | if(files != null) | ||
173 | { | ||
174 | foreach (string file in files) | ||
175 | { | ||
176 | excludeFile = false; | ||
177 | string fileTemp; | ||
178 | if (file.Substring(0,2) == "./" || file.Substring(0,2) == ".\\") | ||
179 | { | ||
180 | fileTemp = file.Substring(2); | ||
181 | } | ||
182 | else | ||
183 | { | ||
184 | fileTemp = file; | ||
185 | } | ||
186 | |||
187 | // Check all excludions and set flag if there are any hits. | ||
188 | foreach ( ExcludeNode exclude in exclusions ) | ||
189 | { | ||
190 | Regex exRegEx = new Regex( exclude.Pattern ); | ||
191 | match = exRegEx.Match( file ); | ||
192 | excludeFile |= match.Success; | ||
193 | } | ||
194 | |||
195 | if ( !excludeFile ) | ||
196 | { | ||
197 | m_Files.Add( fileTemp ); | ||
198 | } | ||
199 | |||
200 | } | ||
201 | } | ||
202 | |||
203 | // don't call return here, because we may need to recursively search directories below | ||
204 | // this one, even if no matches were found in this directory. | ||
205 | } | ||
206 | else | ||
207 | { | ||
208 | try | ||
209 | { | ||
210 | files = Directory.GetFiles(path); | ||
211 | } | ||
212 | catch (IOException) | ||
213 | { | ||
214 | // swallow weird IOException error when running in a virtual box | ||
215 | // guest OS on a network share. | ||
216 | files = null; | ||
217 | } | ||
218 | |||
219 | if (files != null) | ||
220 | { | ||
221 | foreach (string file in files) | ||
222 | { | ||
223 | excludeFile = false; | ||
224 | |||
225 | match = m_Regex.Match(file); | ||
226 | if (match.Success) | ||
227 | { | ||
228 | // Check all excludions and set flag if there are any hits. | ||
229 | foreach (ExcludeNode exclude in exclusions) | ||
230 | { | ||
231 | Regex exRegEx = new Regex(exclude.Pattern); | ||
232 | match = exRegEx.Match(file); | ||
233 | excludeFile |= !match.Success; | ||
234 | } | ||
235 | |||
236 | if (!excludeFile) | ||
237 | { | ||
238 | m_Files.Add(file); | ||
239 | } | ||
240 | } | ||
241 | } | ||
242 | } | ||
243 | } | ||
244 | |||
245 | if(recurse) | ||
246 | { | ||
247 | string[] dirs = Directory.GetDirectories(path); | ||
248 | if(dirs != null && dirs.Length > 0) | ||
249 | { | ||
250 | foreach (string str in dirs) | ||
251 | { | ||
252 | // hack to skip subversion folders. Not having this can cause | ||
253 | // a significant performance hit when running on a network drive. | ||
254 | if (str.EndsWith(".svn")) | ||
255 | continue; | ||
256 | |||
257 | RecurseDirectories(Helper.NormalizePath(str), pattern, recurse, useRegex, exclusions); | ||
258 | } | ||
259 | } | ||
260 | } | ||
261 | } | ||
262 | catch(DirectoryNotFoundException) | ||
263 | { | ||
264 | return; | ||
265 | } | ||
266 | catch(ArgumentException) | ||
267 | { | ||
268 | return; | ||
269 | } | ||
270 | } | ||
271 | |||
272 | #endregion | ||
273 | |||
274 | #region Public Methods | ||
275 | |||
276 | /// <summary> | ||
277 | /// | ||
278 | /// </summary> | ||
279 | /// <param name="node"></param> | ||
280 | public override void Parse(XmlNode node) | ||
281 | { | ||
282 | if( node == null ) | ||
283 | { | ||
284 | throw new ArgumentNullException("node"); | ||
285 | } | ||
286 | string path = Helper.AttributeValue(node, "path", "."); | ||
287 | string pattern = Helper.AttributeValue(node, "pattern", "*"); | ||
288 | bool recurse = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "recurse", "false")); | ||
289 | bool useRegex = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "useRegex", "false")); | ||
290 | string buildAction = Helper.AttributeValue(node, "buildAction", String.Empty); | ||
291 | if (buildAction != string.Empty) | ||
292 | m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction), buildAction); | ||
293 | |||
294 | //TODO: Figure out where the subtype node is being assigned | ||
295 | //string subType = Helper.AttributeValue(node, "subType", string.Empty); | ||
296 | //if (subType != String.Empty) | ||
297 | // m_SubType = (SubType)Enum.Parse(typeof(SubType), subType); | ||
298 | m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName); | ||
299 | m_CopyToOutput = (CopyToOutput) Enum.Parse(typeof(CopyToOutput), Helper.AttributeValue(node, "copyToOutput", m_CopyToOutput.ToString())); | ||
300 | m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString)); | ||
301 | if ( m_Link ) | ||
302 | { | ||
303 | m_LinkPath = Helper.AttributeValue( node, "linkPath", string.Empty ); | ||
304 | } | ||
305 | m_PreservePath = bool.Parse( Helper.AttributeValue( node, "preservePath", bool.FalseString ) ); | ||
306 | |||
307 | |||
308 | if(path != null && path.Length == 0) | ||
309 | { | ||
310 | path = ".";//use current directory | ||
311 | } | ||
312 | //throw new WarningException("Match must have a 'path' attribute"); | ||
313 | |||
314 | if(pattern == null) | ||
315 | { | ||
316 | throw new WarningException("Match must have a 'pattern' attribute"); | ||
317 | } | ||
318 | |||
319 | path = Helper.NormalizePath(path); | ||
320 | if(!Directory.Exists(path)) | ||
321 | { | ||
322 | throw new WarningException("Match path does not exist: {0}", path); | ||
323 | } | ||
324 | |||
325 | try | ||
326 | { | ||
327 | if(useRegex) | ||
328 | { | ||
329 | m_Regex = new Regex(pattern); | ||
330 | } | ||
331 | } | ||
332 | catch(ArgumentException ex) | ||
333 | { | ||
334 | throw new WarningException("Could not compile regex pattern: {0}", ex.Message); | ||
335 | } | ||
336 | |||
337 | |||
338 | foreach(XmlNode child in node.ChildNodes) | ||
339 | { | ||
340 | IDataNode dataNode = Kernel.Instance.ParseNode(child, this); | ||
341 | if(dataNode is ExcludeNode) | ||
342 | { | ||
343 | ExcludeNode excludeNode = (ExcludeNode)dataNode; | ||
344 | m_Exclusions.Add( excludeNode ); | ||
345 | } | ||
346 | } | ||
347 | |||
348 | RecurseDirectories( path, pattern, recurse, useRegex, m_Exclusions ); | ||
349 | |||
350 | if (m_Files.Count < 1) | ||
351 | { | ||
352 | // Include the project name when the match node returns no matches to provide extra | ||
353 | // debug info. | ||
354 | ProjectNode project = Parent.Parent as ProjectNode; | ||
355 | string projectName = ""; | ||
356 | |||
357 | if (project != null) | ||
358 | projectName = " in project " + project.AssemblyName; | ||
359 | |||
360 | throw new WarningException("Match" + projectName + " returned no files: {0}{1}", Helper.EndPath(path), pattern); | ||
361 | } | ||
362 | m_Regex = null; | ||
363 | } | ||
364 | |||
365 | #endregion | ||
366 | } | ||
367 | } | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/text-base/OptionsNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/text-base/OptionsNode.cs.svn-base deleted file mode 100644 index 577de71..0000000 --- a/Prebuild/src/Core/Nodes/.svn/text-base/OptionsNode.cs.svn-base +++ /dev/null | |||
@@ -1,634 +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.Reflection; | ||
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("Options")] | ||
41 | public class OptionsNode : DataNode | ||
42 | { | ||
43 | #region Fields | ||
44 | |||
45 | private static readonly Dictionary<string,FieldInfo> m_OptionFields = new Dictionary<string, FieldInfo>(); | ||
46 | |||
47 | [OptionNode("CompilerDefines")] | ||
48 | private string m_CompilerDefines = ""; | ||
49 | |||
50 | /// <summary> | ||
51 | /// | ||
52 | /// </summary> | ||
53 | public string CompilerDefines | ||
54 | { | ||
55 | get | ||
56 | { | ||
57 | return m_CompilerDefines; | ||
58 | } | ||
59 | set | ||
60 | { | ||
61 | m_CompilerDefines = value; | ||
62 | } | ||
63 | } | ||
64 | |||
65 | [OptionNode("OptimizeCode")] | ||
66 | private bool m_OptimizeCode; | ||
67 | |||
68 | /// <summary> | ||
69 | /// | ||
70 | /// </summary> | ||
71 | public bool OptimizeCode | ||
72 | { | ||
73 | get | ||
74 | { | ||
75 | return m_OptimizeCode; | ||
76 | } | ||
77 | set | ||
78 | { | ||
79 | m_OptimizeCode = value; | ||
80 | } | ||
81 | } | ||
82 | |||
83 | [OptionNode("CheckUnderflowOverflow")] | ||
84 | private bool m_CheckUnderflowOverflow; | ||
85 | |||
86 | /// <summary> | ||
87 | /// | ||
88 | /// </summary> | ||
89 | public bool CheckUnderflowOverflow | ||
90 | { | ||
91 | get | ||
92 | { | ||
93 | return m_CheckUnderflowOverflow; | ||
94 | } | ||
95 | set | ||
96 | { | ||
97 | m_CheckUnderflowOverflow = value; | ||
98 | } | ||
99 | } | ||
100 | |||
101 | [OptionNode("AllowUnsafe")] | ||
102 | private bool m_AllowUnsafe; | ||
103 | |||
104 | /// <summary> | ||
105 | /// | ||
106 | /// </summary> | ||
107 | public bool AllowUnsafe | ||
108 | { | ||
109 | get | ||
110 | { | ||
111 | return m_AllowUnsafe; | ||
112 | } | ||
113 | set | ||
114 | { | ||
115 | m_AllowUnsafe = value; | ||
116 | } | ||
117 | } | ||
118 | |||
119 | [OptionNode("PreBuildEvent")] | ||
120 | private string m_PreBuildEvent; | ||
121 | |||
122 | /// <summary> | ||
123 | /// | ||
124 | /// </summary> | ||
125 | public string PreBuildEvent | ||
126 | { | ||
127 | get | ||
128 | { | ||
129 | return m_PreBuildEvent; | ||
130 | } | ||
131 | set | ||
132 | { | ||
133 | m_PreBuildEvent = value; | ||
134 | } | ||
135 | } | ||
136 | |||
137 | [OptionNode("PostBuildEvent")] | ||
138 | private string m_PostBuildEvent; | ||
139 | |||
140 | /// <summary> | ||
141 | /// | ||
142 | /// </summary> | ||
143 | public string PostBuildEvent | ||
144 | { | ||
145 | get | ||
146 | { | ||
147 | return m_PostBuildEvent; | ||
148 | } | ||
149 | set | ||
150 | { | ||
151 | m_PostBuildEvent = value; | ||
152 | } | ||
153 | } | ||
154 | |||
155 | [OptionNode("PreBuildEventArgs")] | ||
156 | private string m_PreBuildEventArgs; | ||
157 | |||
158 | /// <summary> | ||
159 | /// | ||
160 | /// </summary> | ||
161 | public string PreBuildEventArgs | ||
162 | { | ||
163 | get | ||
164 | { | ||
165 | return m_PreBuildEventArgs; | ||
166 | } | ||
167 | set | ||
168 | { | ||
169 | m_PreBuildEventArgs = value; | ||
170 | } | ||
171 | } | ||
172 | |||
173 | [OptionNode("PostBuildEventArgs")] | ||
174 | private string m_PostBuildEventArgs; | ||
175 | |||
176 | /// <summary> | ||
177 | /// | ||
178 | /// </summary> | ||
179 | public string PostBuildEventArgs | ||
180 | { | ||
181 | get | ||
182 | { | ||
183 | return m_PostBuildEventArgs; | ||
184 | } | ||
185 | set | ||
186 | { | ||
187 | m_PostBuildEventArgs = value; | ||
188 | } | ||
189 | } | ||
190 | |||
191 | [OptionNode("RunPostBuildEvent")] | ||
192 | private string m_RunPostBuildEvent; | ||
193 | |||
194 | /// <summary> | ||
195 | /// | ||
196 | /// </summary> | ||
197 | public string RunPostBuildEvent | ||
198 | { | ||
199 | get | ||
200 | { | ||
201 | return m_RunPostBuildEvent; | ||
202 | } | ||
203 | set | ||
204 | { | ||
205 | m_RunPostBuildEvent = value; | ||
206 | } | ||
207 | } | ||
208 | |||
209 | [OptionNode("RunScript")] | ||
210 | private string m_RunScript; | ||
211 | |||
212 | /// <summary> | ||
213 | /// | ||
214 | /// </summary> | ||
215 | public string RunScript | ||
216 | { | ||
217 | get | ||
218 | { | ||
219 | return m_RunScript; | ||
220 | } | ||
221 | set | ||
222 | { | ||
223 | m_RunScript = value; | ||
224 | } | ||
225 | } | ||
226 | |||
227 | [OptionNode("WarningLevel")] | ||
228 | private int m_WarningLevel = 4; | ||
229 | |||
230 | /// <summary> | ||
231 | /// | ||
232 | /// </summary> | ||
233 | public int WarningLevel | ||
234 | { | ||
235 | get | ||
236 | { | ||
237 | return m_WarningLevel; | ||
238 | } | ||
239 | set | ||
240 | { | ||
241 | m_WarningLevel = value; | ||
242 | } | ||
243 | } | ||
244 | |||
245 | [OptionNode("WarningsAsErrors")] | ||
246 | private bool m_WarningsAsErrors; | ||
247 | |||
248 | /// <summary> | ||
249 | /// | ||
250 | /// </summary> | ||
251 | public bool WarningsAsErrors | ||
252 | { | ||
253 | get | ||
254 | { | ||
255 | return m_WarningsAsErrors; | ||
256 | } | ||
257 | set | ||
258 | { | ||
259 | m_WarningsAsErrors = value; | ||
260 | } | ||
261 | } | ||
262 | |||
263 | [OptionNode("SuppressWarnings")] | ||
264 | private string m_SuppressWarnings = ""; | ||
265 | |||
266 | /// <summary> | ||
267 | /// | ||
268 | /// </summary> | ||
269 | public string SuppressWarnings | ||
270 | { | ||
271 | get | ||
272 | { | ||
273 | return m_SuppressWarnings; | ||
274 | } | ||
275 | set | ||
276 | { | ||
277 | m_SuppressWarnings = value; | ||
278 | } | ||
279 | } | ||
280 | |||
281 | [OptionNode("OutputPath")] | ||
282 | private string m_OutputPath = "bin/"; | ||
283 | |||
284 | /// <summary> | ||
285 | /// | ||
286 | /// </summary> | ||
287 | public string OutputPath | ||
288 | { | ||
289 | get | ||
290 | { | ||
291 | return m_OutputPath; | ||
292 | } | ||
293 | set | ||
294 | { | ||
295 | m_OutputPath = value; | ||
296 | } | ||
297 | } | ||
298 | |||
299 | [OptionNode("GenerateDocumentation")] | ||
300 | private bool m_GenerateDocumentation; | ||
301 | |||
302 | /// <summary> | ||
303 | /// | ||
304 | /// </summary> | ||
305 | public bool GenerateDocumentation | ||
306 | { | ||
307 | get | ||
308 | { | ||
309 | return m_GenerateDocumentation; | ||
310 | } | ||
311 | set | ||
312 | { | ||
313 | m_GenerateDocumentation = value; | ||
314 | } | ||
315 | } | ||
316 | |||
317 | [OptionNode("GenerateXmlDocFile")] | ||
318 | private bool m_GenerateXmlDocFile; | ||
319 | |||
320 | /// <summary> | ||
321 | /// | ||
322 | /// </summary> | ||
323 | public bool GenerateXmlDocFile | ||
324 | { | ||
325 | get | ||
326 | { | ||
327 | return m_GenerateXmlDocFile; | ||
328 | } | ||
329 | set | ||
330 | { | ||
331 | m_GenerateXmlDocFile = value; | ||
332 | } | ||
333 | } | ||
334 | |||
335 | [OptionNode("XmlDocFile")] | ||
336 | private string m_XmlDocFile = ""; | ||
337 | |||
338 | /// <summary> | ||
339 | /// | ||
340 | /// </summary> | ||
341 | public string XmlDocFile | ||
342 | { | ||
343 | get | ||
344 | { | ||
345 | return m_XmlDocFile; | ||
346 | } | ||
347 | set | ||
348 | { | ||
349 | m_XmlDocFile = value; | ||
350 | } | ||
351 | } | ||
352 | |||
353 | [OptionNode("KeyFile")] | ||
354 | private string m_KeyFile = ""; | ||
355 | |||
356 | /// <summary> | ||
357 | /// | ||
358 | /// </summary> | ||
359 | public string KeyFile | ||
360 | { | ||
361 | get | ||
362 | { | ||
363 | return m_KeyFile; | ||
364 | } | ||
365 | set | ||
366 | { | ||
367 | m_KeyFile = value; | ||
368 | } | ||
369 | } | ||
370 | |||
371 | [OptionNode("DebugInformation")] | ||
372 | private bool m_DebugInformation; | ||
373 | |||
374 | /// <summary> | ||
375 | /// | ||
376 | /// </summary> | ||
377 | public bool DebugInformation | ||
378 | { | ||
379 | get | ||
380 | { | ||
381 | return m_DebugInformation; | ||
382 | } | ||
383 | set | ||
384 | { | ||
385 | m_DebugInformation = value; | ||
386 | } | ||
387 | } | ||
388 | |||
389 | [OptionNode("RegisterComInterop")] | ||
390 | private bool m_RegisterComInterop; | ||
391 | |||
392 | /// <summary> | ||
393 | /// | ||
394 | /// </summary> | ||
395 | public bool RegisterComInterop | ||
396 | { | ||
397 | get | ||
398 | { | ||
399 | return m_RegisterComInterop; | ||
400 | } | ||
401 | set | ||
402 | { | ||
403 | m_RegisterComInterop = value; | ||
404 | } | ||
405 | } | ||
406 | |||
407 | [OptionNode("RemoveIntegerChecks")] | ||
408 | private bool m_RemoveIntegerChecks; | ||
409 | |||
410 | /// <summary> | ||
411 | /// | ||
412 | /// </summary> | ||
413 | public bool RemoveIntegerChecks | ||
414 | { | ||
415 | get | ||
416 | { | ||
417 | return m_RemoveIntegerChecks; | ||
418 | } | ||
419 | set | ||
420 | { | ||
421 | m_RemoveIntegerChecks = value; | ||
422 | } | ||
423 | } | ||
424 | |||
425 | [OptionNode("IncrementalBuild")] | ||
426 | private bool m_IncrementalBuild; | ||
427 | |||
428 | /// <summary> | ||
429 | /// | ||
430 | /// </summary> | ||
431 | public bool IncrementalBuild | ||
432 | { | ||
433 | get | ||
434 | { | ||
435 | return m_IncrementalBuild; | ||
436 | } | ||
437 | set | ||
438 | { | ||
439 | m_IncrementalBuild = value; | ||
440 | } | ||
441 | } | ||
442 | |||
443 | [OptionNode("BaseAddress")] | ||
444 | private string m_BaseAddress = "285212672"; | ||
445 | |||
446 | /// <summary> | ||
447 | /// | ||
448 | /// </summary> | ||
449 | public string BaseAddress | ||
450 | { | ||
451 | get | ||
452 | { | ||
453 | return m_BaseAddress; | ||
454 | } | ||
455 | set | ||
456 | { | ||
457 | m_BaseAddress = value; | ||
458 | } | ||
459 | } | ||
460 | |||
461 | [OptionNode("FileAlignment")] | ||
462 | private int m_FileAlignment = 4096; | ||
463 | |||
464 | /// <summary> | ||
465 | /// | ||
466 | /// </summary> | ||
467 | public int FileAlignment | ||
468 | { | ||
469 | get | ||
470 | { | ||
471 | return m_FileAlignment; | ||
472 | } | ||
473 | set | ||
474 | { | ||
475 | m_FileAlignment = value; | ||
476 | } | ||
477 | } | ||
478 | |||
479 | [OptionNode("NoStdLib")] | ||
480 | private bool m_NoStdLib; | ||
481 | |||
482 | /// <summary> | ||
483 | /// | ||
484 | /// </summary> | ||
485 | public bool NoStdLib | ||
486 | { | ||
487 | get | ||
488 | { | ||
489 | return m_NoStdLib; | ||
490 | } | ||
491 | set | ||
492 | { | ||
493 | m_NoStdLib = value; | ||
494 | } | ||
495 | } | ||
496 | |||
497 | private readonly List<string> m_FieldsDefined = new List<string>(); | ||
498 | |||
499 | #endregion | ||
500 | |||
501 | #region Constructors | ||
502 | |||
503 | /// <summary> | ||
504 | /// Initializes the <see cref="OptionsNode"/> class. | ||
505 | /// </summary> | ||
506 | static OptionsNode() | ||
507 | { | ||
508 | Type t = typeof(OptionsNode); | ||
509 | |||
510 | foreach(FieldInfo f in t.GetFields(BindingFlags.NonPublic | BindingFlags.Instance)) | ||
511 | { | ||
512 | object[] attrs = f.GetCustomAttributes(typeof(OptionNodeAttribute), false); | ||
513 | if(attrs == null || attrs.Length < 1) | ||
514 | { | ||
515 | continue; | ||
516 | } | ||
517 | |||
518 | OptionNodeAttribute ona = (OptionNodeAttribute)attrs[0]; | ||
519 | m_OptionFields[ona.NodeName] = f; | ||
520 | } | ||
521 | } | ||
522 | |||
523 | #endregion | ||
524 | |||
525 | #region Properties | ||
526 | |||
527 | /// <summary> | ||
528 | /// Gets the <see cref="Object"/> at the specified index. | ||
529 | /// </summary> | ||
530 | /// <value></value> | ||
531 | public object this[string index] | ||
532 | { | ||
533 | get | ||
534 | { | ||
535 | if(!m_OptionFields.ContainsKey(index)) | ||
536 | { | ||
537 | return null; | ||
538 | } | ||
539 | |||
540 | FieldInfo f = m_OptionFields[index]; | ||
541 | return f.GetValue(this); | ||
542 | } | ||
543 | } | ||
544 | |||
545 | /// <summary> | ||
546 | /// Gets the <see cref="Object"/> at the specified index. | ||
547 | /// </summary> | ||
548 | /// <value></value> | ||
549 | public object this[string index, object defaultValue] | ||
550 | { | ||
551 | get | ||
552 | { | ||
553 | object valueObject = this[index]; | ||
554 | if(valueObject != null && valueObject is string && ((string)valueObject).Length == 0) | ||
555 | { | ||
556 | return defaultValue; | ||
557 | } | ||
558 | return valueObject; | ||
559 | } | ||
560 | } | ||
561 | |||
562 | |||
563 | #endregion | ||
564 | |||
565 | #region Private Methods | ||
566 | |||
567 | private void FlagDefined(string name) | ||
568 | { | ||
569 | if(!m_FieldsDefined.Contains(name)) | ||
570 | { | ||
571 | m_FieldsDefined.Add(name); | ||
572 | } | ||
573 | } | ||
574 | |||
575 | private void SetOption(string nodeName, string val) | ||
576 | { | ||
577 | lock(m_OptionFields) | ||
578 | { | ||
579 | if(!m_OptionFields.ContainsKey(nodeName)) | ||
580 | { | ||
581 | return; | ||
582 | } | ||
583 | |||
584 | FieldInfo f = m_OptionFields[nodeName]; | ||
585 | f.SetValue(this, Helper.TranslateValue(f.FieldType, val)); | ||
586 | FlagDefined(f.Name); | ||
587 | } | ||
588 | } | ||
589 | |||
590 | #endregion | ||
591 | |||
592 | #region Public Methods | ||
593 | |||
594 | /// <summary> | ||
595 | /// Parses the specified node. | ||
596 | /// </summary> | ||
597 | /// <param name="node">The node.</param> | ||
598 | public override void Parse(XmlNode node) | ||
599 | { | ||
600 | if( node == null ) | ||
601 | { | ||
602 | throw new ArgumentNullException("node"); | ||
603 | } | ||
604 | |||
605 | foreach(XmlNode child in node.ChildNodes) | ||
606 | { | ||
607 | SetOption(child.Name, Helper.InterpolateForEnvironmentVariables(child.InnerText)); | ||
608 | } | ||
609 | } | ||
610 | |||
611 | /// <summary> | ||
612 | /// Copies to. | ||
613 | /// </summary> | ||
614 | /// <param name="opt">The opt.</param> | ||
615 | public void CopyTo(OptionsNode opt) | ||
616 | { | ||
617 | if(opt == null) | ||
618 | { | ||
619 | return; | ||
620 | } | ||
621 | |||
622 | foreach(FieldInfo f in m_OptionFields.Values) | ||
623 | { | ||
624 | if(m_FieldsDefined.Contains(f.Name)) | ||
625 | { | ||
626 | f.SetValue(opt, f.GetValue(this)); | ||
627 | opt.m_FieldsDefined.Add(f.Name); | ||
628 | } | ||
629 | } | ||
630 | } | ||
631 | |||
632 | #endregion | ||
633 | } | ||
634 | } | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/text-base/ProcessNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/text-base/ProcessNode.cs.svn-base deleted file mode 100644 index 8ca8e49..0000000 --- a/Prebuild/src/Core/Nodes/.svn/text-base/ProcessNode.cs.svn-base +++ /dev/null | |||
@@ -1,108 +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("Process")] | ||
39 | public class ProcessNode : DataNode | ||
40 | { | ||
41 | #region Fields | ||
42 | |||
43 | private string m_Path; | ||
44 | private bool m_IsValid = true; | ||
45 | |||
46 | #endregion | ||
47 | |||
48 | #region Properties | ||
49 | |||
50 | /// <summary> | ||
51 | /// Gets the path. | ||
52 | /// </summary> | ||
53 | /// <value>The path.</value> | ||
54 | public string Path | ||
55 | { | ||
56 | get | ||
57 | { | ||
58 | return m_Path; | ||
59 | } | ||
60 | } | ||
61 | |||
62 | /// <summary> | ||
63 | /// Gets a value indicating whether this instance is valid. | ||
64 | /// </summary> | ||
65 | /// <value><c>true</c> if this instance is valid; otherwise, <c>false</c>.</value> | ||
66 | public bool IsValid | ||
67 | { | ||
68 | get | ||
69 | { | ||
70 | return m_IsValid; | ||
71 | } | ||
72 | } | ||
73 | |||
74 | #endregion | ||
75 | |||
76 | #region Public Methods | ||
77 | |||
78 | /// <summary> | ||
79 | /// Parses the specified node. | ||
80 | /// </summary> | ||
81 | /// <param name="node">The node.</param> | ||
82 | public override void Parse(XmlNode node) | ||
83 | { | ||
84 | if( node == null ) | ||
85 | { | ||
86 | throw new ArgumentNullException("node"); | ||
87 | } | ||
88 | |||
89 | m_Path = Helper.InterpolateForEnvironmentVariables(node.InnerText); | ||
90 | if(m_Path == null) | ||
91 | { | ||
92 | m_Path = ""; | ||
93 | } | ||
94 | |||
95 | try | ||
96 | { | ||
97 | m_Path = Helper.ResolvePath(m_Path); | ||
98 | } | ||
99 | catch(ArgumentException) | ||
100 | { | ||
101 | Kernel.Instance.Log.Write(LogType.Warning, "Could not find prebuild file for processing: {0}", m_Path); | ||
102 | m_IsValid = false; | ||
103 | } | ||
104 | } | ||
105 | |||
106 | #endregion | ||
107 | } | ||
108 | } | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/text-base/ProjectNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/text-base/ProjectNode.cs.svn-base deleted file mode 100644 index fb92b32..0000000 --- a/Prebuild/src/Core/Nodes/.svn/text-base/ProjectNode.cs.svn-base +++ /dev/null | |||
@@ -1,579 +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.IO; | ||
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 | /// A set of values that the Project's type can be | ||
39 | /// </summary> | ||
40 | public enum ProjectType | ||
41 | { | ||
42 | /// <summary> | ||
43 | /// The project is a console executable | ||
44 | /// </summary> | ||
45 | Exe, | ||
46 | /// <summary> | ||
47 | /// The project is a windows executable | ||
48 | /// </summary> | ||
49 | WinExe, | ||
50 | /// <summary> | ||
51 | /// The project is a library | ||
52 | /// </summary> | ||
53 | Library, | ||
54 | /// <summary> | ||
55 | /// The project is a website | ||
56 | /// </summary> | ||
57 | Web, | ||
58 | } | ||
59 | |||
60 | /// <summary> | ||
61 | /// | ||
62 | /// </summary> | ||
63 | public enum ClrRuntime | ||
64 | { | ||
65 | /// <summary> | ||
66 | /// | ||
67 | /// </summary> | ||
68 | Microsoft, | ||
69 | /// <summary> | ||
70 | /// | ||
71 | /// </summary> | ||
72 | Mono | ||
73 | } | ||
74 | /// <summary> | ||
75 | /// The version of the .NET framework to use (Required for VS2008) | ||
76 | /// <remarks>We don't need .NET 1.1 in here, it'll default when using vs2003.</remarks> | ||
77 | /// </summary> | ||
78 | public enum FrameworkVersion | ||
79 | { | ||
80 | /// <summary> | ||
81 | /// .NET 2.0 | ||
82 | /// </summary> | ||
83 | v2_0, | ||
84 | /// <summary> | ||
85 | /// .NET 3.0 | ||
86 | /// </summary> | ||
87 | v3_0, | ||
88 | /// <summary> | ||
89 | /// .NET 3.5 | ||
90 | /// </summary> | ||
91 | v3_5, | ||
92 | /// <summary> | ||
93 | /// .NET 4.0 | ||
94 | /// </summary> | ||
95 | v4_0, | ||
96 | } | ||
97 | /// <summary> | ||
98 | /// The Node object representing /Prebuild/Solution/Project elements | ||
99 | /// </summary> | ||
100 | [DataNode("Project")] | ||
101 | public class ProjectNode : DataNode, IComparable | ||
102 | { | ||
103 | #region Fields | ||
104 | |||
105 | private string m_Name = "unknown"; | ||
106 | private string m_Path = ""; | ||
107 | private string m_FullPath = ""; | ||
108 | private string m_AssemblyName; | ||
109 | private string m_AppIcon = ""; | ||
110 | private string m_ConfigFile = ""; | ||
111 | private string m_DesignerFolder = ""; | ||
112 | private string m_Language = "C#"; | ||
113 | private ProjectType m_Type = ProjectType.Exe; | ||
114 | private ClrRuntime m_Runtime = ClrRuntime.Microsoft; | ||
115 | private FrameworkVersion m_Framework = FrameworkVersion.v2_0; | ||
116 | private string m_StartupObject = ""; | ||
117 | private string m_RootNamespace; | ||
118 | private string m_FilterGroups = ""; | ||
119 | private string m_Version = ""; | ||
120 | private Guid m_Guid; | ||
121 | private string m_DebugStartParameters; | ||
122 | |||
123 | private readonly Dictionary<string, ConfigurationNode> m_Configurations = new Dictionary<string, ConfigurationNode>(); | ||
124 | private readonly List<ReferencePathNode> m_ReferencePaths = new List<ReferencePathNode>(); | ||
125 | private readonly List<ReferenceNode> m_References = new List<ReferenceNode>(); | ||
126 | private readonly List<AuthorNode> m_Authors = new List<AuthorNode>(); | ||
127 | private FilesNode m_Files; | ||
128 | |||
129 | #endregion | ||
130 | |||
131 | #region Properties | ||
132 | |||
133 | /// <summary> | ||
134 | /// Gets the name. | ||
135 | /// </summary> | ||
136 | /// <value>The name.</value> | ||
137 | public string Name | ||
138 | { | ||
139 | get | ||
140 | { | ||
141 | return m_Name; | ||
142 | } | ||
143 | } | ||
144 | /// <summary> | ||
145 | /// The version of the .NET Framework to compile under | ||
146 | /// </summary> | ||
147 | public FrameworkVersion FrameworkVersion | ||
148 | { | ||
149 | get | ||
150 | { | ||
151 | return m_Framework; | ||
152 | } | ||
153 | } | ||
154 | /// <summary> | ||
155 | /// Gets the path. | ||
156 | /// </summary> | ||
157 | /// <value>The path.</value> | ||
158 | public string Path | ||
159 | { | ||
160 | get | ||
161 | { | ||
162 | return m_Path; | ||
163 | } | ||
164 | } | ||
165 | |||
166 | /// <summary> | ||
167 | /// Gets the filter groups. | ||
168 | /// </summary> | ||
169 | /// <value>The filter groups.</value> | ||
170 | public string FilterGroups | ||
171 | { | ||
172 | get | ||
173 | { | ||
174 | return m_FilterGroups; | ||
175 | } | ||
176 | } | ||
177 | |||
178 | /// <summary> | ||
179 | /// Gets the project's version | ||
180 | /// </summary> | ||
181 | /// <value>The project's version.</value> | ||
182 | public string Version | ||
183 | { | ||
184 | get | ||
185 | { | ||
186 | return m_Version; | ||
187 | } | ||
188 | } | ||
189 | |||
190 | /// <summary> | ||
191 | /// Gets the full path. | ||
192 | /// </summary> | ||
193 | /// <value>The full path.</value> | ||
194 | public string FullPath | ||
195 | { | ||
196 | get | ||
197 | { | ||
198 | return m_FullPath; | ||
199 | } | ||
200 | } | ||
201 | |||
202 | /// <summary> | ||
203 | /// Gets the name of the assembly. | ||
204 | /// </summary> | ||
205 | /// <value>The name of the assembly.</value> | ||
206 | public string AssemblyName | ||
207 | { | ||
208 | get | ||
209 | { | ||
210 | return m_AssemblyName; | ||
211 | } | ||
212 | } | ||
213 | |||
214 | /// <summary> | ||
215 | /// Gets the app icon. | ||
216 | /// </summary> | ||
217 | /// <value>The app icon.</value> | ||
218 | public string AppIcon | ||
219 | { | ||
220 | get | ||
221 | { | ||
222 | return m_AppIcon; | ||
223 | } | ||
224 | } | ||
225 | |||
226 | /// <summary> | ||
227 | /// Gets the app icon. | ||
228 | /// </summary> | ||
229 | /// <value>The app icon.</value> | ||
230 | public string ConfigFile | ||
231 | { | ||
232 | get | ||
233 | { | ||
234 | return m_ConfigFile; | ||
235 | } | ||
236 | } | ||
237 | |||
238 | /// <summary> | ||
239 | /// | ||
240 | /// </summary> | ||
241 | public string DesignerFolder | ||
242 | { | ||
243 | get | ||
244 | { | ||
245 | return m_DesignerFolder; | ||
246 | } | ||
247 | } | ||
248 | |||
249 | /// <summary> | ||
250 | /// Gets the language. | ||
251 | /// </summary> | ||
252 | /// <value>The language.</value> | ||
253 | public string Language | ||
254 | { | ||
255 | get | ||
256 | { | ||
257 | return m_Language; | ||
258 | } | ||
259 | } | ||
260 | |||
261 | /// <summary> | ||
262 | /// Gets the type. | ||
263 | /// </summary> | ||
264 | /// <value>The type.</value> | ||
265 | public ProjectType Type | ||
266 | { | ||
267 | get | ||
268 | { | ||
269 | return m_Type; | ||
270 | } | ||
271 | } | ||
272 | |||
273 | /// <summary> | ||
274 | /// Gets the runtime. | ||
275 | /// </summary> | ||
276 | /// <value>The runtime.</value> | ||
277 | public ClrRuntime Runtime | ||
278 | { | ||
279 | get | ||
280 | { | ||
281 | return m_Runtime; | ||
282 | } | ||
283 | } | ||
284 | |||
285 | private bool m_GenerateAssemblyInfoFile; | ||
286 | |||
287 | /// <summary> | ||
288 | /// | ||
289 | /// </summary> | ||
290 | public bool GenerateAssemblyInfoFile | ||
291 | { | ||
292 | get | ||
293 | { | ||
294 | return m_GenerateAssemblyInfoFile; | ||
295 | } | ||
296 | set | ||
297 | { | ||
298 | m_GenerateAssemblyInfoFile = value; | ||
299 | } | ||
300 | } | ||
301 | |||
302 | /// <summary> | ||
303 | /// Gets the startup object. | ||
304 | /// </summary> | ||
305 | /// <value>The startup object.</value> | ||
306 | public string StartupObject | ||
307 | { | ||
308 | get | ||
309 | { | ||
310 | return m_StartupObject; | ||
311 | } | ||
312 | } | ||
313 | |||
314 | /// <summary> | ||
315 | /// Gets the root namespace. | ||
316 | /// </summary> | ||
317 | /// <value>The root namespace.</value> | ||
318 | public string RootNamespace | ||
319 | { | ||
320 | get | ||
321 | { | ||
322 | return m_RootNamespace; | ||
323 | } | ||
324 | } | ||
325 | |||
326 | /// <summary> | ||
327 | /// Gets the configurations. | ||
328 | /// </summary> | ||
329 | /// <value>The configurations.</value> | ||
330 | public List<ConfigurationNode> Configurations | ||
331 | { | ||
332 | get | ||
333 | { | ||
334 | List<ConfigurationNode> tmp = new List<ConfigurationNode>(ConfigurationsTable.Values); | ||
335 | tmp.Sort(); | ||
336 | return tmp; | ||
337 | } | ||
338 | } | ||
339 | |||
340 | /// <summary> | ||
341 | /// Gets the configurations table. | ||
342 | /// </summary> | ||
343 | /// <value>The configurations table.</value> | ||
344 | public Dictionary<string, ConfigurationNode> ConfigurationsTable | ||
345 | { | ||
346 | get | ||
347 | { | ||
348 | return m_Configurations; | ||
349 | } | ||
350 | } | ||
351 | |||
352 | /// <summary> | ||
353 | /// Gets the reference paths. | ||
354 | /// </summary> | ||
355 | /// <value>The reference paths.</value> | ||
356 | public List<ReferencePathNode> ReferencePaths | ||
357 | { | ||
358 | get | ||
359 | { | ||
360 | List<ReferencePathNode> tmp = new List<ReferencePathNode>(m_ReferencePaths); | ||
361 | tmp.Sort(); | ||
362 | return tmp; | ||
363 | } | ||
364 | } | ||
365 | |||
366 | /// <summary> | ||
367 | /// Gets the references. | ||
368 | /// </summary> | ||
369 | /// <value>The references.</value> | ||
370 | public List<ReferenceNode> References | ||
371 | { | ||
372 | get | ||
373 | { | ||
374 | List<ReferenceNode> tmp = new List<ReferenceNode>(m_References); | ||
375 | tmp.Sort(); | ||
376 | return tmp; | ||
377 | } | ||
378 | } | ||
379 | |||
380 | /// <summary> | ||
381 | /// Gets the Authors list. | ||
382 | /// </summary> | ||
383 | /// <value>The list of the project's authors.</value> | ||
384 | public List<AuthorNode> Authors | ||
385 | { | ||
386 | get | ||
387 | { | ||
388 | return m_Authors; | ||
389 | } | ||
390 | } | ||
391 | |||
392 | /// <summary> | ||
393 | /// Gets the files. | ||
394 | /// </summary> | ||
395 | /// <value>The files.</value> | ||
396 | public FilesNode Files | ||
397 | { | ||
398 | get | ||
399 | { | ||
400 | return m_Files; | ||
401 | } | ||
402 | } | ||
403 | |||
404 | /// <summary> | ||
405 | /// Gets or sets the parent. | ||
406 | /// </summary> | ||
407 | /// <value>The parent.</value> | ||
408 | public override IDataNode Parent | ||
409 | { | ||
410 | get | ||
411 | { | ||
412 | return base.Parent; | ||
413 | } | ||
414 | set | ||
415 | { | ||
416 | base.Parent = value; | ||
417 | if(base.Parent is SolutionNode && m_Configurations.Count < 1) | ||
418 | { | ||
419 | SolutionNode parent = (SolutionNode)base.Parent; | ||
420 | foreach(ConfigurationNode conf in parent.Configurations) | ||
421 | { | ||
422 | m_Configurations[conf.NameAndPlatform] = (ConfigurationNode) conf.Clone(); | ||
423 | } | ||
424 | } | ||
425 | } | ||
426 | } | ||
427 | |||
428 | /// <summary> | ||
429 | /// Gets the GUID. | ||
430 | /// </summary> | ||
431 | /// <value>The GUID.</value> | ||
432 | public Guid Guid | ||
433 | { | ||
434 | get | ||
435 | { | ||
436 | return m_Guid; | ||
437 | } | ||
438 | } | ||
439 | |||
440 | public string DebugStartParameters | ||
441 | { | ||
442 | get | ||
443 | { | ||
444 | return m_DebugStartParameters; | ||
445 | } | ||
446 | } | ||
447 | |||
448 | #endregion | ||
449 | |||
450 | #region Private Methods | ||
451 | |||
452 | private void HandleConfiguration(ConfigurationNode conf) | ||
453 | { | ||
454 | if(String.Compare(conf.Name, "all", true) == 0) //apply changes to all, this may not always be applied first, | ||
455 | //so it *may* override changes to the same properties for configurations defines at the project level | ||
456 | { | ||
457 | foreach(ConfigurationNode confNode in m_Configurations.Values) | ||
458 | { | ||
459 | conf.CopyTo(confNode);//update the config templates defines at the project level with the overrides | ||
460 | } | ||
461 | } | ||
462 | if(m_Configurations.ContainsKey(conf.NameAndPlatform)) | ||
463 | { | ||
464 | ConfigurationNode parentConf = m_Configurations[conf.NameAndPlatform]; | ||
465 | conf.CopyTo(parentConf);//update the config templates defines at the project level with the overrides | ||
466 | } | ||
467 | else | ||
468 | { | ||
469 | m_Configurations[conf.NameAndPlatform] = conf; | ||
470 | } | ||
471 | } | ||
472 | |||
473 | #endregion | ||
474 | |||
475 | #region Public Methods | ||
476 | |||
477 | /// <summary> | ||
478 | /// Parses the specified node. | ||
479 | /// </summary> | ||
480 | /// <param name="node">The node.</param> | ||
481 | public override void Parse(XmlNode node) | ||
482 | { | ||
483 | m_Name = Helper.AttributeValue(node, "name", m_Name); | ||
484 | m_Path = Helper.AttributeValue(node, "path", m_Path); | ||
485 | m_FilterGroups = Helper.AttributeValue(node, "filterGroups", m_FilterGroups); | ||
486 | m_Version = Helper.AttributeValue(node, "version", m_Version); | ||
487 | m_AppIcon = Helper.AttributeValue(node, "icon", m_AppIcon); | ||
488 | m_ConfigFile = Helper.AttributeValue(node, "configFile", m_ConfigFile); | ||
489 | m_DesignerFolder = Helper.AttributeValue(node, "designerFolder", m_DesignerFolder); | ||
490 | m_AssemblyName = Helper.AttributeValue(node, "assemblyName", m_AssemblyName); | ||
491 | m_Language = Helper.AttributeValue(node, "language", m_Language); | ||
492 | m_Type = (ProjectType)Helper.EnumAttributeValue(node, "type", typeof(ProjectType), m_Type); | ||
493 | m_Runtime = (ClrRuntime)Helper.EnumAttributeValue(node, "runtime", typeof(ClrRuntime), m_Runtime); | ||
494 | m_Framework = (FrameworkVersion)Helper.EnumAttributeValue(node, "frameworkVersion", typeof(FrameworkVersion), m_Framework); | ||
495 | m_StartupObject = Helper.AttributeValue(node, "startupObject", m_StartupObject); | ||
496 | m_RootNamespace = Helper.AttributeValue(node, "rootNamespace", m_RootNamespace); | ||
497 | |||
498 | int hash = m_Name.GetHashCode(); | ||
499 | Guid guidByHash = new Guid(hash, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); | ||
500 | string guid = Helper.AttributeValue(node, "guid", guidByHash.ToString()); | ||
501 | m_Guid = new Guid(guid); | ||
502 | |||
503 | m_GenerateAssemblyInfoFile = Helper.ParseBoolean(node, "generateAssemblyInfoFile", false); | ||
504 | m_DebugStartParameters = Helper.AttributeValue(node, "debugStartParameters", string.Empty); | ||
505 | |||
506 | if(string.IsNullOrEmpty(m_AssemblyName)) | ||
507 | { | ||
508 | m_AssemblyName = m_Name; | ||
509 | } | ||
510 | |||
511 | if(string.IsNullOrEmpty(m_RootNamespace)) | ||
512 | { | ||
513 | m_RootNamespace = m_Name; | ||
514 | } | ||
515 | |||
516 | m_FullPath = m_Path; | ||
517 | try | ||
518 | { | ||
519 | m_FullPath = Helper.ResolvePath(m_FullPath); | ||
520 | } | ||
521 | catch | ||
522 | { | ||
523 | throw new WarningException("Could not resolve Solution path: {0}", m_Path); | ||
524 | } | ||
525 | |||
526 | Kernel.Instance.CurrentWorkingDirectory.Push(); | ||
527 | try | ||
528 | { | ||
529 | Helper.SetCurrentDir(m_FullPath); | ||
530 | |||
531 | if( node == null ) | ||
532 | { | ||
533 | throw new ArgumentNullException("node"); | ||
534 | } | ||
535 | |||
536 | foreach(XmlNode child in node.ChildNodes) | ||
537 | { | ||
538 | IDataNode dataNode = Kernel.Instance.ParseNode(child, this); | ||
539 | if(dataNode is ConfigurationNode) | ||
540 | { | ||
541 | HandleConfiguration((ConfigurationNode)dataNode); | ||
542 | } | ||
543 | else if(dataNode is ReferencePathNode) | ||
544 | { | ||
545 | m_ReferencePaths.Add((ReferencePathNode)dataNode); | ||
546 | } | ||
547 | else if(dataNode is ReferenceNode) | ||
548 | { | ||
549 | m_References.Add((ReferenceNode)dataNode); | ||
550 | } | ||
551 | else if(dataNode is AuthorNode) | ||
552 | { | ||
553 | m_Authors.Add((AuthorNode)dataNode); | ||
554 | } | ||
555 | else if(dataNode is FilesNode) | ||
556 | { | ||
557 | m_Files = (FilesNode)dataNode; | ||
558 | } | ||
559 | } | ||
560 | } | ||
561 | finally | ||
562 | { | ||
563 | Kernel.Instance.CurrentWorkingDirectory.Pop(); | ||
564 | } | ||
565 | } | ||
566 | |||
567 | #endregion | ||
568 | |||
569 | #region IComparable Members | ||
570 | |||
571 | public int CompareTo(object obj) | ||
572 | { | ||
573 | ProjectNode that = (ProjectNode)obj; | ||
574 | return m_Name.CompareTo(that.m_Name); | ||
575 | } | ||
576 | |||
577 | #endregion | ||
578 | } | ||
579 | } | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/text-base/ReferenceNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/text-base/ReferenceNode.cs.svn-base deleted file mode 100644 index 9c5d1a3..0000000 --- a/Prebuild/src/Core/Nodes/.svn/text-base/ReferenceNode.cs.svn-base +++ /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/.svn/text-base/ReferencePathNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/text-base/ReferencePathNode.cs.svn-base deleted file mode 100644 index 7331cd7..0000000 --- a/Prebuild/src/Core/Nodes/.svn/text-base/ReferencePathNode.cs.svn-base +++ /dev/null | |||
@@ -1,97 +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("ReferencePath")] | ||
39 | public class ReferencePathNode : DataNode, IComparable | ||
40 | { | ||
41 | #region Fields | ||
42 | |||
43 | private string m_Path; | ||
44 | |||
45 | #endregion | ||
46 | |||
47 | #region Properties | ||
48 | |||
49 | /// <summary> | ||
50 | /// Gets the path. | ||
51 | /// </summary> | ||
52 | /// <value>The path.</value> | ||
53 | public string Path | ||
54 | { | ||
55 | get | ||
56 | { | ||
57 | return m_Path; | ||
58 | } | ||
59 | } | ||
60 | |||
61 | #endregion | ||
62 | |||
63 | #region Public Methods | ||
64 | |||
65 | /// <summary> | ||
66 | /// Parses the specified node. | ||
67 | /// </summary> | ||
68 | /// <param name="node">The node.</param> | ||
69 | public override void Parse(XmlNode node) | ||
70 | { | ||
71 | if( node == null ) | ||
72 | { | ||
73 | throw new ArgumentNullException("node"); | ||
74 | } | ||
75 | |||
76 | m_Path = Helper.InterpolateForEnvironmentVariables(node.InnerText); | ||
77 | if(m_Path == null) | ||
78 | { | ||
79 | m_Path = ""; | ||
80 | } | ||
81 | |||
82 | m_Path = m_Path.Trim(); | ||
83 | } | ||
84 | |||
85 | #endregion | ||
86 | |||
87 | #region IComparable Members | ||
88 | |||
89 | public int CompareTo(object obj) | ||
90 | { | ||
91 | ReferencePathNode that = (ReferencePathNode)obj; | ||
92 | return this.m_Path.CompareTo(that.m_Path); | ||
93 | } | ||
94 | |||
95 | #endregion | ||
96 | } | ||
97 | } | ||
diff --git a/Prebuild/src/Core/Nodes/.svn/text-base/SolutionNode.cs.svn-base b/Prebuild/src/Core/Nodes/.svn/text-base/SolutionNode.cs.svn-base deleted file mode 100644 index 10c0223..0000000 --- a/Prebuild/src/Core/Nodes/.svn/text-base/SolutionNode.cs.svn-base +++ /dev/null | |||
@@ -1,382 +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.Diagnostics; | ||
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("Solution")] | ||
41 | [DataNode("EmbeddedSolution")] | ||
42 | [DebuggerDisplay("{Name}")] | ||
43 | public class SolutionNode : DataNode | ||
44 | { | ||
45 | #region Fields | ||
46 | |||
47 | private Guid m_Guid = Guid.NewGuid(); | ||
48 | private string m_Name = "unknown"; | ||
49 | private string m_Path = ""; | ||
50 | private string m_FullPath = ""; | ||
51 | private string m_ActiveConfig; | ||
52 | private string m_Version = "1.0.0"; | ||
53 | |||
54 | private OptionsNode m_Options; | ||
55 | private FilesNode m_Files; | ||
56 | private readonly ConfigurationNodeCollection m_Configurations = new ConfigurationNodeCollection(); | ||
57 | private readonly Dictionary<string, ProjectNode> m_Projects = new Dictionary<string, ProjectNode>(); | ||
58 | private readonly Dictionary<string, DatabaseProjectNode> m_DatabaseProjects = new Dictionary<string, DatabaseProjectNode>(); | ||
59 | private readonly List<ProjectNode> m_ProjectsOrder = new List<ProjectNode>(); | ||
60 | private readonly Dictionary<string, SolutionNode> m_Solutions = new Dictionary<string, SolutionNode>(); | ||
61 | private CleanupNode m_Cleanup; | ||
62 | |||
63 | #endregion | ||
64 | |||
65 | #region Properties | ||
66 | public override IDataNode Parent | ||
67 | { | ||
68 | get | ||
69 | { | ||
70 | return base.Parent; | ||
71 | } | ||
72 | set | ||
73 | { | ||
74 | if (value is SolutionNode) | ||
75 | { | ||
76 | SolutionNode solution = (SolutionNode)value; | ||
77 | foreach (ConfigurationNode conf in solution.Configurations) | ||
78 | { | ||
79 | m_Configurations[conf.Name] = (ConfigurationNode) conf.Clone(); | ||
80 | } | ||
81 | } | ||
82 | |||
83 | base.Parent = value; | ||
84 | } | ||
85 | } | ||
86 | |||
87 | public CleanupNode Cleanup | ||
88 | { | ||
89 | get | ||
90 | { | ||
91 | return m_Cleanup; | ||
92 | } | ||
93 | set | ||
94 | { | ||
95 | m_Cleanup = value; | ||
96 | } | ||
97 | } | ||
98 | |||
99 | public Guid Guid | ||
100 | { | ||
101 | get | ||
102 | { | ||
103 | return m_Guid; | ||
104 | } | ||
105 | set | ||
106 | { | ||
107 | m_Guid = value; | ||
108 | } | ||
109 | } | ||
110 | /// <summary> | ||
111 | /// Gets or sets the active config. | ||
112 | /// </summary> | ||
113 | /// <value>The active config.</value> | ||
114 | public string ActiveConfig | ||
115 | { | ||
116 | get | ||
117 | { | ||
118 | return m_ActiveConfig; | ||
119 | } | ||
120 | set | ||
121 | { | ||
122 | m_ActiveConfig = value; | ||
123 | } | ||
124 | } | ||
125 | |||
126 | /// <summary> | ||
127 | /// Gets the name. | ||
128 | /// </summary> | ||
129 | /// <value>The name.</value> | ||
130 | public string Name | ||
131 | { | ||
132 | get | ||
133 | { | ||
134 | return m_Name; | ||
135 | } | ||
136 | } | ||
137 | |||
138 | /// <summary> | ||
139 | /// Gets the path. | ||
140 | /// </summary> | ||
141 | /// <value>The path.</value> | ||
142 | public string Path | ||
143 | { | ||
144 | get | ||
145 | { | ||
146 | return m_Path; | ||
147 | } | ||
148 | } | ||
149 | |||
150 | /// <summary> | ||
151 | /// Gets the full path. | ||
152 | /// </summary> | ||
153 | /// <value>The full path.</value> | ||
154 | public string FullPath | ||
155 | { | ||
156 | get | ||
157 | { | ||
158 | return m_FullPath; | ||
159 | } | ||
160 | } | ||
161 | |||
162 | /// <summary> | ||
163 | /// Gets the version. | ||
164 | /// </summary> | ||
165 | /// <value>The version.</value> | ||
166 | public string Version | ||
167 | { | ||
168 | get | ||
169 | { | ||
170 | return m_Version; | ||
171 | } | ||
172 | } | ||
173 | |||
174 | /// <summary> | ||
175 | /// Gets the options. | ||
176 | /// </summary> | ||
177 | /// <value>The options.</value> | ||
178 | public OptionsNode Options | ||
179 | { | ||
180 | get | ||
181 | { | ||
182 | return m_Options; | ||
183 | } | ||
184 | } | ||
185 | |||
186 | /// <summary> | ||
187 | /// Gets the files. | ||
188 | /// </summary> | ||
189 | /// <value>The files.</value> | ||
190 | public FilesNode Files | ||
191 | { | ||
192 | get | ||
193 | { | ||
194 | return m_Files; | ||
195 | } | ||
196 | } | ||
197 | |||
198 | /// <summary> | ||
199 | /// Gets the configurations. | ||
200 | /// </summary> | ||
201 | /// <value>The configurations.</value> | ||
202 | public ConfigurationNodeCollection Configurations | ||
203 | { | ||
204 | get | ||
205 | { | ||
206 | ConfigurationNodeCollection tmp = new ConfigurationNodeCollection(); | ||
207 | tmp.AddRange(ConfigurationsTable); | ||
208 | return tmp; | ||
209 | } | ||
210 | } | ||
211 | |||
212 | /// <summary> | ||
213 | /// Gets the configurations table. | ||
214 | /// </summary> | ||
215 | /// <value>The configurations table.</value> | ||
216 | public ConfigurationNodeCollection ConfigurationsTable | ||
217 | { | ||
218 | get | ||
219 | { | ||
220 | return m_Configurations; | ||
221 | } | ||
222 | } | ||
223 | /// <summary> | ||
224 | /// Gets the database projects. | ||
225 | /// </summary> | ||
226 | public ICollection<DatabaseProjectNode> DatabaseProjects | ||
227 | { | ||
228 | get | ||
229 | { | ||
230 | return m_DatabaseProjects.Values; | ||
231 | } | ||
232 | } | ||
233 | /// <summary> | ||
234 | /// Gets the nested solutions. | ||
235 | /// </summary> | ||
236 | public ICollection<SolutionNode> Solutions | ||
237 | { | ||
238 | get | ||
239 | { | ||
240 | return m_Solutions.Values; | ||
241 | } | ||
242 | } | ||
243 | /// <summary> | ||
244 | /// Gets the nested solutions hash table. | ||
245 | /// </summary> | ||
246 | public Dictionary<string, SolutionNode> SolutionsTable | ||
247 | { | ||
248 | get | ||
249 | { | ||
250 | return m_Solutions; | ||
251 | } | ||
252 | } | ||
253 | /// <summary> | ||
254 | /// Gets the projects. | ||
255 | /// </summary> | ||
256 | /// <value>The projects.</value> | ||
257 | public ICollection<ProjectNode> Projects | ||
258 | { | ||
259 | get | ||
260 | { | ||
261 | List<ProjectNode> tmp = new List<ProjectNode>(m_Projects.Values); | ||
262 | tmp.Sort(); | ||
263 | return tmp; | ||
264 | } | ||
265 | } | ||
266 | |||
267 | /// <summary> | ||
268 | /// Gets the projects table. | ||
269 | /// </summary> | ||
270 | /// <value>The projects table.</value> | ||
271 | public Dictionary<string, ProjectNode> ProjectsTable | ||
272 | { | ||
273 | get | ||
274 | { | ||
275 | return m_Projects; | ||
276 | } | ||
277 | } | ||
278 | |||
279 | /// <summary> | ||
280 | /// Gets the projects table. | ||
281 | /// </summary> | ||
282 | /// <value>The projects table.</value> | ||
283 | public List<ProjectNode> ProjectsTableOrder | ||
284 | { | ||
285 | get | ||
286 | { | ||
287 | return m_ProjectsOrder; | ||
288 | } | ||
289 | } | ||
290 | |||
291 | #endregion | ||
292 | |||
293 | #region Public Methods | ||
294 | |||
295 | /// <summary> | ||
296 | /// Parses the specified node. | ||
297 | /// </summary> | ||
298 | /// <param name="node">The node.</param> | ||
299 | public override void Parse(XmlNode node) | ||
300 | { | ||
301 | m_Name = Helper.AttributeValue(node, "name", m_Name); | ||
302 | m_ActiveConfig = Helper.AttributeValue(node, "activeConfig", m_ActiveConfig); | ||
303 | m_Path = Helper.AttributeValue(node, "path", m_Path); | ||
304 | m_Version = Helper.AttributeValue(node, "version", m_Version); | ||
305 | |||
306 | m_FullPath = m_Path; | ||
307 | try | ||
308 | { | ||
309 | m_FullPath = Helper.ResolvePath(m_FullPath); | ||
310 | } | ||
311 | catch | ||
312 | { | ||
313 | throw new WarningException("Could not resolve solution path: {0}", m_Path); | ||
314 | } | ||
315 | |||
316 | Kernel.Instance.CurrentWorkingDirectory.Push(); | ||
317 | try | ||
318 | { | ||
319 | Helper.SetCurrentDir(m_FullPath); | ||
320 | |||
321 | if( node == null ) | ||
322 | { | ||
323 | throw new ArgumentNullException("node"); | ||
324 | } | ||
325 | |||
326 | foreach(XmlNode child in node.ChildNodes) | ||
327 | { | ||
328 | IDataNode dataNode = Kernel.Instance.ParseNode(child, this); | ||
329 | if(dataNode is OptionsNode) | ||
330 | { | ||
331 | m_Options = (OptionsNode)dataNode; | ||
332 | } | ||
333 | else if(dataNode is FilesNode) | ||
334 | { | ||
335 | m_Files = (FilesNode)dataNode; | ||
336 | } | ||
337 | else if(dataNode is ConfigurationNode) | ||
338 | { | ||
339 | ConfigurationNode configurationNode = (ConfigurationNode) dataNode; | ||
340 | m_Configurations[configurationNode.NameAndPlatform] = configurationNode; | ||
341 | |||
342 | // If the active configuration is null, then we populate it. | ||
343 | if (ActiveConfig == null) | ||
344 | { | ||
345 | ActiveConfig = configurationNode.Name; | ||
346 | } | ||
347 | } | ||
348 | else if(dataNode is ProjectNode) | ||
349 | { | ||
350 | m_Projects[((ProjectNode)dataNode).Name] = (ProjectNode) dataNode; | ||
351 | m_ProjectsOrder.Add((ProjectNode)dataNode); | ||
352 | } | ||
353 | else if(dataNode is SolutionNode) | ||
354 | { | ||
355 | m_Solutions[((SolutionNode)dataNode).Name] = (SolutionNode) dataNode; | ||
356 | } | ||
357 | else if (dataNode is ProcessNode) | ||
358 | { | ||
359 | ProcessNode p = (ProcessNode)dataNode; | ||
360 | Kernel.Instance.ProcessFile(p, this); | ||
361 | } | ||
362 | else if (dataNode is DatabaseProjectNode) | ||
363 | { | ||
364 | m_DatabaseProjects[((DatabaseProjectNode)dataNode).Name] = (DatabaseProjectNode) dataNode; | ||
365 | } | ||
366 | else if(dataNode is CleanupNode) | ||
367 | { | ||
368 | if(m_Cleanup != null) | ||
369 | throw new WarningException("There can only be one Cleanup node."); | ||
370 | m_Cleanup = (CleanupNode)dataNode; | ||
371 | } | ||
372 | } | ||
373 | } | ||
374 | finally | ||
375 | { | ||
376 | Kernel.Instance.CurrentWorkingDirectory.Pop(); | ||
377 | } | ||
378 | } | ||
379 | |||
380 | #endregion | ||
381 | } | ||
382 | } | ||