Building mono from source

From LSDevLinux
Revision as of 17:07, 14 May 2009 by Mayhewn (talk | contribs) (Get, patch, build, install mono: Include note about binfmt)

Jump to: navigation, search

Dependencies

$ sudo apt-get install bison mono-devel

Get, patch, build, install mono

Unpack this tarball in a directory somewhere and run ./checkout-and-build.sh. This will also install mono into /usr/local.

To ensure the use of this version of mono when you run applications, put /usr/local/bin into your PATH or (better) use /usr/local/bin/mono application.exe whenever you run an application. Note that the binfmt system that allows you to execute interpreted programs without specifying the interpreter on the command line (eg by typing just TE.exe) will still use /usr/bin/mono unless you reconfigure it.

Running this script twice will not re-download all the mono source code, but it will reinstall mono.

Note: the script uses the “sparse checkout” feature of Subversion to create a single top-level directory that can be updated with a single svn up, eg when updating to a new revision. You can add further directories using svn up directory, eg svn up monodevelop. However, you will need to specify the revision number explicitly with -rnumber if you want this directory to be compatible with the existing directories. You can find out the revision number of your existing directories using svn info.