Hi,

 

I put together a small "how to" get Eclipse building using NAnt on mono
and was wondering if anyone would find it useful on the wiki?  It is
really a very simple example and just shows how to set NAnt up to run as
an external build tool.  I have included the text below.

 

Cheers,

 

 

Clayton

 

 

I use NAnt with eclipse (on Linux that is) and just configure Eclipse to
use that to build.  Assuming that you are familiar with nant and that
this might be something you want to try the setup would look like the
following (on Eclipse v 2.1.1 on Linux): 
     0) Download and build NAnt for Linux (see http://nant.sf.net
<http://nant.sf.net> ) 
 
     1) create a batch file that will run NAnt; it should look similar
to the following (I usually name this all lower case nant with no
extension): 
     /path/to/mono/mono /path/to/nant/NAnt.exe 
 
     - make this executable if you are on Linux (not a Linux expert but
I use chmod a+x and then the filename) 
 
     2) In eclipse select the menu options: 
     Run --> External Tools --> External Tools... 
 
     3) Click the "New" button 
     4) Set the location to reflect the location of your nant wrapper  
     5) Set the working directory to the location where nant can find
your build file.   
     a) Optionally you should be able to specify the build file location
with something like:  
     -buildfile:/path/to/buildfile on the command line 
     b) Optionally you should also be able to specify the default
framework to use to build the project (configured in the NAnt.exe.config
file) with something like: 
     -defaultframework:mono-1.0   
 
      
 
You could also create a driver file to switch platforms that might look
something like the following: 
<untested> 
     1) create 2 batch files (either use .bat or .sh, make them
executable on Linux) 
     - nant-mono.bat 
     - nant-net.bat 
 2) put the following line in each batch file 
     nant -defaultframework:mono-1.0
-buildfile:${path.and.buildfile.location} 
     nant -defaultframework:net-1.0
-buildfile:${path.and.buildfile.location} 
 3) set-up eclipse to call one or the other 
</untested>



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to