- Download and install a recent Mono from http://mono-project.com/Downloads. Install it in C:\mono (instead of C:\Program Files\Mono) in order to avoid problems with whitespace in path during build). This mono will be used to compile mono from source. It will also provide a set of other native libraries required for the build.
- Install Cygwin (I would recommend in C:\cygwin to same problems mentioned above) with the following packages in addition to the default ones:
autoconf
automake
bison
gcc-mingw
gcc-mingw-g++
libtool
pkg-config
subversion
make
- Downgrade make because version 3.81 installed by Cygwin introduces a bug which causes the mono build to fail. Replace C:\cygwin\bin\make.exe with the one from here: make 3.80
- Prepare the build environment by setting the paths so that all the dependancy libs and scripts will be used from the official setup.
export MONO_LOCATION=/cygdrive/c/mono
export PATH=${PATH}:${MONO_LOCATION}/bin
export ACLOCAL_FLAGS="-I ${MONO_LOCATION}/share/aclocal"
export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:${MONO_LOCATION}/lib/pkgconfig
mkdir -p /mono/svn
mkdir /mono/build
- Checkout Mono’s source from svn and compile.
cd /mono/svn
svn co svn://anonsvn.mono-project.com/source/trunk/mono
svn co svn://anonsvn.mono-project.com/source/trunk/mcs
cd mono
./autogen.sh --prefix=/mono/build
make
make install
- Copy the freshly compiled files from C:\cygwin\mono\build to C:\mono and replace all existing. DONE!