Here are the patches needed to apply to the .NET tasks to bring them up to
date with the beta 2 release of the .NET framework

changes
 -removed 'owner' attribute from ILASM (it just prints a warning and is
stripped from the docs)
 -changed the referenced dlls to the beta-2 set
 -added some options to csc:
    fullpaths
    win32res
    noconfig
    utf8output

Fullpaths is good; with that jedit auto picks up on CSC errors from ant
builds invoked inside it; the others are reasonably unimportant. noconfig is
odd -by default the compiler reads in a default file "csc.rsp" which can
predefine system behaviour -first from the local directory and also from the
compiler directory. noconfig="true" means dont do that. I'm leaving
'noconfig' off by default, though there is a lot to be said for setting it
true. Having your build depend on the settings of files outside your SCM
tree is always a bit dubious.

And of course I updated the documents. Test wise, I've tested it on my own
projects; the changes from beta-1 to beta-2 cause trouble but the build
still works.

I think that this patch should go in to the 1.4 ant release as it is a
fairly minor set of changes to a very non core package, which does benefit
anyone using ant to build and deploy .net apps.

-Steve
cvs diff -u dotnet.html (in directory 
D:\Java\Apps\jakarta-ant\docs\manual\OptionalTasks)
Index: dotnet.html
===================================================================
RCS file: /home/cvspublic/jakarta-ant/docs/manual/OptionalTasks/dotnet.html,v
retrieving revision 1.3
diff -u -r1.3 dotnet.html
--- dotnet.html 2001/03/04 13:35:49     1.3
+++ dotnet.html 2001/08/07 05:01:41
@@ -6,7 +6,6 @@
 
 <body bgcolor="#ffffff">
 <h1>.NET classes for Ant</h1>
-<p>By Steve Loughran; [EMAIL PROTECTED]</p>
 
 <h2>Vision</h2>
 <p>
@@ -54,7 +53,6 @@
 <li>Type Library Exporter (TlbExp.exe) .dll -&gt; .tlb</li>
 <li>TlbImp.exe Type Library Importer </li>
 <li>RegAsm.exe Assembly Registration Tool .dll -&gt; .reg | registration</li>
-<li>WebServiceUtil -SOAP proxy import, SDL generation tool</li>
 </ol>
 
 <h2>Ant Wrapper for net tasks</h2>
@@ -97,7 +95,7 @@
 To use the net tasks one needs
 <ul>
 
-<li> A Win2K box (or any other platform which supports the .net build 
tools)</li>
+<li> A Windows box (or any other platform which supports the .net build 
tools)</li>
 
 <li> JavaVM - Java1.1 or later; Java1.3 recommended.</li>
 
@@ -118,6 +116,15 @@
 <hr>
 <h2> Change Log </h2>
 
+<h4>Version 0.4</h4>
+This is the beta-2 revision of the tasks. 
+<ol>
+<li>ILASM: pulled the owner attribute, added keyfile for giving binaries a 
strong name
+(MD5 hash of the checksum)
+<li>CSC: added win32res , noConfig, utf8output, fullpaths
+<li>CSC: 
+</ol>
+ 
 <h4>Version 0.3</h4>
 
 The changes here reflect Beta-1 of the dotnet SDK and experience of use in 
@@ -245,6 +252,11 @@
     <td valign="top">&quot;true&quot;(default) or &quot;false&quot;</td>
     </tr>
   <tr>
+    <td valign="top">fullpaths</td>
+    <td valign="top">print the full path of files on on errors</td>
+  </tr>
+    
+  <tr>
     <td valign="top">includes</td>
     <td valign="top">comma separated list of patterns of files that must be
       included. All files are included when omitted.</td>
@@ -275,6 +287,13 @@
     <td valign="top">&quot;com.example.project.entrypoint&quot;</td>
     </tr>
 <tr>
+    <td valign="top">noConfig</td>
+    <td valign="top">a flag which tells the compiler not
+    to read in the compiler settings files 'csc.rsp' in its
+    bin directory and then the local directory</td>
+    <td valign="top">&quot;true&quot; or &quot;false&quot;(default)</td>
+    </tr>
+<tr>
     <td valign="top">optimize</td>
     <td valign="top">optimisation flag</td>
     <td valign="top">&quot;true&quot; or &quot;false&quot;(default)</td>
@@ -308,7 +327,12 @@
     </tr>
 <tr>
     <td valign="top">unsafe</td>
-    <td valign="top">enable unsafe code</td>
+    <td valign="top">enable the <b>unsafe</b> keyword</td>
+    <td valign="top">&quot;true&quot; or &quot;false&quot;(default)</td>
+    </tr>
+<tr>
+    <td valign="top">utf8output</td>
+    <td valign="top">require all compiler output to be in utf-8 format</td>
     <td valign="top">&quot;true&quot; or &quot;false&quot;(default)</td>
     </tr>
 <tr>
@@ -322,6 +346,12 @@
     <td valign="top">filename of icon to include</td>
        <td valign="top">&quot;res/myicon.ico&quot;</td>
    </tr>
+<tr>
+    <td valign="top">win32res</td>
+    <td valign="top">filename of a win32 resource (.RES)file to include
+    This is not a .NET resource, but it what windows is used to.</td>
+       <td valign="top">&quot;res/myapp.res&quot;</td>
+   </tr>
 
 </table>
 <p>
@@ -344,7 +374,7 @@
 <hr>
 <h2> Task: ilasm </h2>
 <p>Task to assemble .net 'Intermediate Language' files.
-The task will only work on win2K until other platforms support csc.exe or 
+The task will only work on windows until other platforms support csc.exe or 
 an equivalent. ilasm.exe must be on the execute path too.
 </p>
 <p>
@@ -399,7 +429,8 @@
   <tr>
     <td valign="top">extraOptions</td>
     <td valign="top">Any extra options which aren't explicitly 
-               supported by the ilasm task </td>
+               supported by the ilasm task, primarily because they
+                arent really documented: use ilasm /? to see them</td>
        <td></td>
   </tr>
   
@@ -408,6 +439,11 @@
     <td valign="top">Should a failed compile halt the build?</td>
     <td valign="top">&quot;true&quot;(default)</td>
     </tr>
+<tr>
+    <td valign="top">fullpaths</td>
+    <td valign="top">Should error text provide the full path to files</td>
+    <td valign="top">&quot;true&quot;(default)</td>
+    </tr>    
   <tr>
     <td valign="top">includes</td>
     <td valign="top">comma separated list of patterns of files that must be
@@ -418,6 +454,12 @@
     <td valign="top">the name of a file. Each line of this file is
       taken to be an include pattern</td>
   </tr>
+  <tr>
+    <td valign="top">keyfile</td>
+    <td valign="top">the name of a file containing a private key, with which
+      the assembly output is checksumed and then MD5 signed 
+      to have a <i>strong name</i></td>
+  </tr>
 <tr>
     <td valign="top">listing</td>
     <td valign="top">Produce a listing (off by default). Listings go to the
@@ -428,11 +470,6 @@
     <td valign="top">outputFile</td>
     <td valign="top">filename of output</td>
     <td valign="top">&quot;example.exe&quot;</td>
-    </tr>
-<tr>
-    <td valign="top">owner</td>
-    <td valign="top">restrict disassembly by setting the 'owner' string</td>
-    <td valign="top">&quot;secret&quot;</td>
     </tr>
 <tr>
     <td valign="top">resourceFile</td>

*****CVS exited normally with code 1*****


Attachment: ilasm-patch.java
Description: Binary data

Index: CSharp.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java,v
retrieving revision 1.6
diff -u -r1.6 CSharp.java
--- CSharp.java 2001/07/07 13:51:12     1.6
+++ CSharp.java 2001/08/07 04:35:25
@@ -222,9 +222,10 @@
     }   
     
     /** 
+     * Fix C# reference inclusion. 
      * C# is really dumb in how it handles inclusion. You have to list
      * every 'assembly' -read DLL that is imported. So already you are
-     * making a platform assumption -shared libraries have a .dll extension
+     * making a platform assumption -shared libraries have a .dll;"+ extension
      * and the poor developer has to know every library which is included
      * why the compiler cant find classes on the path or in a directory,
      * is a mystery.
@@ -236,27 +237,43 @@
      * Casing is chosen to match that of the file system <i>exactly</i>
      * so may work on a unix box too. 
      */
-    protected static final String DEFAULT_REFERENCE_LIST
-        ="System.dll;System.Drawing.dll;System.Data.dll;"+
-         "System.Diagnostics.dll;"+
-         "System.DirectoryServices.dll;"+
-         "System.IO.dll;"+
-         "System.Management.dll;"+
-         "System.Messaging.dll;"+
-         "System.Net.dll;"+
-         "System.Runtime.Remoting.dll;"+
-         "System.Runtime.Serialization.Formatters.Soap.dll;"+
-         "System.Security.dll;"+
-         "System.ServiceProcess.dll;"+
-         "System.Text.RegularExpressions.dll;"+
-         "System.Timers.dll;"+
-         "System.Web.dll;"+
-         "System.Web.Services.dll;"+
-         "System.WinForms.dll;"+
-         "System.XML.dll;"+
-         "System.XML.Serialization.dll;"+
-         "Microsoft.ComServices.dll;";
-    
+
+    protected static final String DEFAULT_REFERENCE_LIST=
+            "Accessibility.dll;"+
+            "cscompmgd.dll;"+
+            "CustomMarshalers.dll;"+
+            "IEExecRemote.dll;"+
+            "IEHost.dll;"+
+            "IIEHost.dll;"+
+            "ISymWrapper.dll;"+
+            "Microsoft.JScript.dll;"+
+            "Microsoft.VisualBasic.dll;"+
+            "Microsoft.VisualC.dll;"+
+            "Microsoft.Vsa.dll;"+
+            "Mscorcfg.dll;"+
+            "RegCode.dll;"+
+            "System.Configuration.Install.dll;"+
+            "System.Data.dll;"+
+            "System.Design.dll;"+
+            "System.DirectoryServices.dll;"+
+            "System.EnterpriseServices.dll;"+
+            "System.dll;"+
+            "System.Drawing.Design.dll;"+
+            "System.Drawing.dll;"+
+            "System.Management.dll;"+
+            "System.Messaging.dll;"+
+            "System.Runtime.Remoting.dll;"+
+            "System.Runtime.Serialization.Formatters.Soap.dll;"+
+            "System.Security.dll;"+
+            "System.ServiceProcess.dll;"+
+            "System.Web.dll;"+
+            "System.Web.RegularExpressions.dll;"+
+            "System.Web.Services.dll;"+
+            "System.Windows.Forms.dll;"+
+            "System.XML.dll;";
+
+
+         
     /** 
      * get default reference list
      * @return null or a string of references.
@@ -608,7 +625,68 @@
         else
             return null;
     }
+    /** icon for incorporation into apps
+     */     
+    protected File _win32res;  
+    
+    /**
+     * Set the win32 icon 
+     * @param fileName path to the file. Can be relative, absolute, whatever.
+     */
+    public void setWin32Res(File fileName) {
+        _win32res = fileName;
+    }
     
+    /**
+     *  get the argument or null for no argument needed 
+     *
+     * @return    The Win32Icon Parameter to CSC 
+     */
+    protected String getWin32ResParameter() {
+        if (_win32res!=null)
+            return "/win32res:"+_win32res.toString();
+        else
+            return null;
+    }    
+    
+    /** 
+     * utf out flag
+     */
+     
+    protected boolean _utf8output=false;
+    
+    /**
+     * enable generation of utf8 output from the compiler. 
+     */
+    public void setUtf8Output(boolean enabled) {
+        _utf8output=enabled;
+    }
+    
+    protected String getUtf8OutpuParameter() {
+        return _utf8output?"/utf8output":null;
+    }
+    
+    protected boolean _noconfig=false;
+    
+    protected void setNoConfig(boolean enabled) {
+        _noconfig=enabled;
+    }
+    
+    protected String getNoConfigParameter() {
+        return _noconfig?"/noconfig":null;
+    }
+    
+    // /fullpaths
+    protected boolean _fullpaths=false;
+    
+    public void setFullPaths(boolean enabled) {
+        _fullpaths=enabled;
+    }
+    
+    protected String getFullPathsParameter() {
+        return _fullpaths?"/fullpaths":null;
+    }
+    
     /** defines list
     * something like 'RELEASE;WIN32;NO_SANITY_CHECKS;;SOMETHING_ELSE'
     */
@@ -720,6 +798,7 @@
         _additionalModules=null;
         _includeDefaultReferences=true;
         _extraOptions=null;
+        _fullpaths=true;
     }
     
     /**
@@ -760,8 +839,12 @@
         command.addArgument(getOutputFileParameter());   
         command.addArgument(getIncludeDefaultReferencesParameter());
         command.addArgument(getDefaultReferenceParameter());
+        command.addArgument(getWin32ResParameter());
+        command.addArgument(getUtf8OutpuParameter());
+        command.addArgument(getNoConfigParameter());
+        command.addArgument(getFullPathsParameter());
         command.addArgument(getExtraOptionsParameter());
-    
+        
         //get dependencies list. 
         DirectoryScanner scanner = super.getDirectoryScanner(_srcDir);
         String[] dependencies = scanner.getIncludedFiles();




Reply via email to