[Mono-devel-list] HOWTO - Build mono, mcs, and gtk-sharp on windows

Daniel Morgan danielmorgan at verizon.net
Sat Feb 28 12:19:15 EST 2004


Could someone add this as a web page on www.go-mono.com somewhere please?
  -----Original Message-----
  From: mono-devel-list-admin at lists.ximian.com
[mailto:mono-devel-list-admin at lists.ximian.com]On Behalf Of Josh Gerdes
  Sent: Friday, February 27, 2004 3:07 PM
  To: gtk-sharp-list-request at lists.ximian.com;
mono-devel-list at lists.ximian.com
  Subject: [Mono-devel-list] HOWTO - Build mono, mcs, and gtk-sharp on
windows


  ======================================================

  Building mono, mcs, and gtk-sharp from CVS for windows

  by Josh Gerdes

  ======================================================



  I decided to write this guide to help those like myself who would like to
be able to build mono, mcs, and gtk-sharp on a windows platform.  I have
gathered information from various sources and I would like to thank the
following for their posts and information:



  Giovanni Zito

  Bernie Solomon

  Daniel Morgan





  Setting up the Environment and Dependencies

  ===========================================



  1) Install the .NET SDK V1.1 from msdn.microsoft.com/downloads. I've put
this step here simply because previous instructions states to install it.
I'm don't know if and why this step is required. By the way, if you have
Microsoft Visual Studio .NET 2003 installed on your system then you can skip
this step.



  2) Install the latest cygwin setup (about 30MB). Start choosing the
default installation if you are not sure what packages you need. You'll can
always get the other missing packages later, if mono configure script will
require them. Be sure to get libiconv (not just libiconv2!).  I installed
everything just to be safe.



  3) Download and install the gtk+ dependencies to /usr/local:




http://prdownloads.sourceforge.net/gtk-win/GTK-Runtime-Environment-2.2.4.1.e
xe


http://prdownloads.sourceforge.net/gtk-win/GTK-Development-Environment-2.2.4
.1.exe



  Note: The Runtime installer will delete the destination installation
directory before installing so it must be installed first.  This is optional
if you do not want to compile gtk-sharp.



  4) Download and install the following dependencies packages and extract to
/usr/local:



  http://www.go-mono.com/archive/pkgconfig-0.11-20020310.zip

  http://www.go-mono.com/archive/glib-2.0.4-20020703.zip

  http://www.go-mono.com/archive/glib-dev-2.0.4-20020703.zip

  http://www.go-mono.com/archive/libiconv-1.7.zip

  http://www.go-mono.com/archive/libiconv-dev-1.7-20020101.zip

  http://www.go-mono.com/archive/libintl-0.10.40-20020101.zip

  http://www.go-mono.com/archive/libgc-dev.zip

  http://www.go-mono.com/archive/icu-2.6.1-Win32_msvc7.zip



  5) Open a cygwin prompt and edit your profile "~/.bashrc" by adding the
following:



  #Environment Variables for Mono

  export PATH="/usr/local/bin:/usr/local/lib:$PATH"

  export ACLOCAL_FLAGS="-I /usr/share/aclocal"

  export CPPFLAGS="$CPPFLAGS -I /usr/local/include"

  export LDFLAGS="$LDFLAGS -L /usr/local/lib"

  export CC="gcc -mno-cygwin"

  export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"

  export LD_LIBRARY_PATH="/usr/local/lib"

  export MONO_PATH="/usr/local/lib:$MONO_PATH"

  export MONO_CFG_PATH="/usr/local/etc:$MONO_CFG_PATH"



  #Environment variables for Mono CVS access

  export CVSROOT=:pserver:anonymous at anoncvs.go-mono.com:/mono

  export CVS_RSH=ssh



  #Environment variables for .NET if not already in your Windows PATH

  export PATH="$PATH:/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v1.1.4322"

  export PATH="$PATH:/cygdrive/c/Program Files/Microsoft.NET/SDK/v1.1/Bin"



  6) Create the following script, name it icu-config and copy it to
/usr/local/bin.



  #/bin/sh



  ICU_ROOT=/usr/local/icu

  case $1

  in

  --cppflags)

      echo "-I$ICU_ROOT/include"

      ;;

  --ldflags)

      echo "-L$ICU_ROOT/lib -licuuc -licuin"

      ;;

  --version)

      grep '\<U_ICU_VERSION\>' $ICU_ROOT/include/unicode/uversion.h | sed -e
's/.*"\(.*\)".*/\1/'

      ;;

  esac



  7) Change the script permissions by running "chmod u+x
/usr/local/bin/icu-config".



  8) Restart your cygwin environment





  Downloading latest CVS

  ======================



  1) Create a directory to store the source files in your home directory
("mkdir ~/src")



  2) Go to the newly created directory ("cd src")



  3) Login to CVS by running "cvs login" you will be asked for a password
which can be left blank



  4) Download the source



              To get the source for the first time run the following:



                          cvs -z3 co mcs mono gtk-sharp



              After that you can just update the source by running the
following:



                          cvs -z3 update -dP mcs mono gtk-sharp





  Building mono

  =============



  You are now ready to buld mono by running the following commands:



  $ cd ~src/mono

  $ ./configure --with-gc=boehm CPPFLAGS=-I/usr/local/include
LDFLAGS=-L/usr/local/lib

  $ make

  $ make install



  Note: at the time of creating these instructions the CVS had some issues
so I used mono 0.30.1 source instead





  Building mcs

  =============



  You are now ready to buld mcs by running the following commands:



  $ cd ~/src/mcs

  $ make

  $ make install





  Building gtk-sharp

  =============



  1) Download and install the libglade lib package to /usr/local/:



  http://prdownloads.sourceforge.net/gladewin32/libglade-2.0.1-lib.zip



  2) Download the libglade bin package and copy libglade-2.0-0.dll to
/usr/local/lib:



  http://prdownloads.sourceforge.net/gladewin32/libglade-2.0.1-bin.zip



  3) Edit /usr/local/lib/pkgconfig/libglade-2.0.pc and set the prefix
(prefix=/usr/local)



  4) Download and rename libxml2.dll to libxml-2.0.dll and copy to
/usr/local/lib:



  http://prdownloads.sourceforge.net/gnuwin32/libxml2-2.4.12-bin.zip



  5) Create the following script, name it libxml-2.0.pc and copy it to
/usr/local/lib/pkgconfig.



  prefix=/usr/local

  exec_prefix=${prefix}

  libdir=${exec_prefix}/lib



  Name: Libxml2

  Description: a XML parser

  Version: 2.4.12

  Libs: -L${libdir} -llibxml-2.0



  6) Edit makefile.win32 located in your gtk-sharp (~/src/gtk-sharp) and
change the following path to point to the correct Microsoft .NET Framework
(I had v1.1 installed so it had the incorrect path initially).



  CSC=$(ROOT)/microsoft.net/framework/v1.1.4322/csc.exe /d:WIN32



  7) You are now ready to buld gtk-sharp by running the following commands:



  $ cd ~/src/gtk-sharp

  $ make -f makefile.win32



  8) Copy the newly created dlls to /usr/local/lib:



  /atk/atk-sharp.dll

  /gdk/gdk-sharp.dll

  /glade/glade-sharp.dll

  /glib/glib-sharp.dll

  /glue/gtksharpglue.dll

  /gtk/gtk-sharp.dll

  /pango/pango-sharp.dll





  Congratulations!  You should now have compiled mono, mcs, and gtk-sharp
successfully and have a working version of all of them located in
/usr/local.  Please note that these projects are constantly changing and
might not always build and these instructions most likely will need to
eventually be updated.  At least there is a starting point now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040228/686b31cc/attachment.html 


More information about the Mono-devel-list mailing list