> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> McKenna, Simon (RGH)
> Sent: maandag 21 maart 2005 3:21
> To: '[email protected]'
> Subject: [Nant-users] NAnt on Mono on Linux
> 
> Greetings,
> 
> I've been working on a project subverting NAnt for Subversion 
> administration.   One of the goals is cross-platform use, so
> i've been trying to get NAnt running on Mono on Linux (it's
> running fine under Windows on both .NET and Mono runtimes)
> 
> The first problem under Linux was a bug in Mono <= v1.1.4,
> which Gert reported and has been fixed (#71416) and disappears
> when building Mono from the latest SVN sources.  
> 
> The second problem was the installation instructions for Nant
> using the binaries rather than building from source...it seems
> to be missing information for Linux users.
> 
> For a Linux build from source, the 'install' target in NAnt.build 
> creates a 'nant' wrapper script in /usr/local/bin, which calls:
> exec mono /usr/local/nant/bin/NAnt.exe ... but there is no
> mention of this in the docs for the binary release, so I can't
> see how step 5. (nant -help) will ever work unless you've first
> built and installed from source?
> 
> Attached is a patch for the docs which I believe resolves it.

I committed a modified version of your patch to cvs. Thanks !

> 
> Third problem: after building and installing latest source for 
> both NAnt and Mono in Linux, NAnt seems happy and most of my
> project is working.  However, any call to a <script> task is
> crashing...as it seems to want to use the mono-2.0 framework?
> 
> Part of error message:
> 
> Framework 'mono-2.0' is invalid and has not been loaded :
> Framework assembly directory '/usr/local/lib/mono/2.0' does not exist.
> 
> Any clues?   Forcing mono-1.0 via -t: switch didn't resolve it,
> does the <script> task require mono-2.0?  If so, how?

Are you indeed running NAnt on Mono SVN HEAD ?  Do you actually have the
Mono 2.0 profile installed ?

There used to be an issue in Mono SVN HEAD, in which it always considered
the 2.0 profile to be available. 

But :

- This issue should be fixed now (bug #62913), although I haven't verified
it yet.

- That issue would have resulted in a failure when starting NAnt, not when
you execute the <script> task

I'll try to reproduce your problem this evening.

Gert
Title: Installation


Installation

NAnt is available in either a source or binary distribution. The binary distribution is all you need to use NAnt to build your projects, including creating your own custom tasks, types and functions.

If you are upgrading NAnt from a previous version, you must never install over the top of your previous installation. Delete or rename the existing installation directory before installing the new version of NAnt.

Installing from binaries

  1. Download the binary distribution archive. Either nant-bin.zip or nant-bin.tar.gz will work, the contents of each archive are the same.
  2. Remove any previous versions of NAnt you may have installed.
  3. Extract the contents of the archive to the location you wish to install NAnt (eg: C:\Program Files\NAnt in windows, or /usr/local/nant in Linux)
  4. Depending on your environment, create a wrapper script to run NAnt:

    Run NAnt using Microsoft.NET

    • Create a file called nant.bat in a directory that is included in the PATH system environment variable. (eg. C:\WINDOWS).
    • Add the following to nant.bat:
      @echo off
      "C:\Program Files\NAnt\bin\NAnt.exe" %*
                              

    Run NAnt using Mono

    • Windows

      • Create a file called nant.bat in a directory that is included in the PATH system environment variable. (eg. C:\WINDOWS).
      • Add the following to nant.bat:
        @echo off
        mono "C:\Program Files\NAnt\bin\NAnt.exe" %*
                                        
    • Linux / Cygwin

      • Create a file called nant in a suitable location in your filesystem (eg. /usr/local/bin).
      • Add the following to nant:
        #!/bin/sh
        exec mono /usr/local/nant/bin/NAnt.exe "$@"
                                
      • Ensure nant has permission to execute, eg:
        chmod a+x /usr/local/bin/nant
                                
  5. Open a new command prompt (shell) and type nant -help. If successful, you should see a usage message displaying available command line options.
  6. (optional) Download and install NAnt-contrib or other third party extensions to NAnt.

Installing from source

  1. Download the source distribution archive. Either nant-src.zip or nant-src.tar.gz will work, the contents of each archive are the same.
  2. Remove any previous versions of NAnt you may have installed.
  3. Extract the contents of the archive to a temporary location. This should not be the location you wish to install NAnt to.
  4. Open a command prompt and change into the folder you extracted the archive to.
  5. Depending on your environment, build the NAnt distribution:

    Install NAnt using Microsoft .NET

    • GNU Make

      make install MONO= MCS=csc prefix=installation-path

      eg. make install MONO= MCS=csc prefix="C:\Program Files"

    • NMake

      nmake -f Makefile.nmake install prefix=installation-path

      eg. nmake -f Makefile.nmake install prefix="C:\Program Files"

    Install NAnt using Mono

    • GNU Make

      make install prefix=installation-path

      eg. make install prefix="C:\Program Files"

    • NMake

      nmake -f Makefile.nmake install MONO=mono CSC=mcs prefix=installation-path

      eg. nmake -f Makefile.nmake install MONO=mono CSC=mcs prefix=/usr/local/

    This will first build a bootstrap version of NAnt, and then use that to build and install the full version to installation-path/NAnt.

  6. Follow the instructions as for a binary release from step 5.

Reply via email to