[Mono-list] [PATCH] running NAnt-0.6 on linux
Artur Karazniewicz
karaznie@acn.waw.pl
Wed, 01 Jan 2003 14:13:14 +0100
This is a multi-part message in MIME format.
--------------090009080203000607080508
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Hello,
Here is a patch allows use NAnt-0.6 (mono/mcs/nant) on linux with mono.
I tested it with mono class library and looks like it works. But there
is little one problem - looks like mono's XML parser does not like
XML node naming "win32icon" - I dont why - sorry System.Xml is too
huge to analyze for me. But since mcs hasn't win32icon switch (??)
I've moved this parametre from CompilerBase.cs Task (which is base class
form CscTask and McsTask) to CscTask.cs - so now You can't
use win32icon parameter in NAnt mcs tasks. Maybe developers of
System.Xml should look why this statement
XmlNode.SelectSingleNode( "@win32icon" ) fails with XML parser
exception.
regards,
Artur.
--------------090009080203000607080508
Content-Type: text/plain;
name="NAnt.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="NAnt.diff"
? NAnt.diff
? src/NAnt.diff
Index: src/NAnt.exe
===================================================================
RCS file: /mono/mcs/nant/src/NAnt.exe,v
retrieving revision 1.1
diff -r1.1 NAnt.exe
Binary files /tmp/cvslIxnEa and NAnt.exe differ
Index: src/Task.cs
===================================================================
RCS file: /mono/mcs/nant/src/Task.cs,v
retrieving revision 1.1
diff -r1.1 Task.cs
157c157
< ValidatorAttribute[] validators = (ValidatorAttribute[]) Attribute.GetCustomAttributes(fieldInfo, typeof(ValidatorAttribute));
---
> Attribute[] validators = Attribute.GetCustomAttributes(fieldInfo, typeof(ValidatorAttribute));
159c159
< string errorMessage = validator.Validate(fieldInfo.GetValue(this));
---
> string errorMessage = ((ValidatorAttribute)validator).Validate(fieldInfo.GetValue(this));
Index: src/Tasks/CompilerBase.cs
===================================================================
RCS file: /mono/mcs/nant/src/Tasks/CompilerBase.cs,v
retrieving revision 1.2
diff -r1.2 CompilerBase.cs
46,48d45
< [TaskAttribute("win32icon")]
< string _win32icon = null;
<
65d61
< public string Win32Icon { get { return _win32icon; } }
144,146d139
< }
< if (Win32Icon != null) {
< WriteOption(writer, "win32icon", Win32Icon);
Index: src/Tasks/CscTask.cs
===================================================================
RCS file: /mono/mcs/nant/src/Tasks/CscTask.cs,v
retrieving revision 1.2
diff -r1.2 CscTask.cs
32a33,38
> [TaskAttribute("win32icon")]
> string _win32icon = null;
>
> public string Win32Icon { get { return _win32icon; } }
>
>
37c43,46
< }
---
> }
> if (Win32Icon != null) {
> WriteOption(writer, "win32icon", Win32Icon);
> }
--------------090009080203000607080508--