Building MonoDevelop on OS X

From $1
Table of contents

Building MonoDevelop from source on the Mac is straightforward when the latest Mono framework package and the Mono C SDK package are installed. In general, the instructions in Development:Getting Started can be applied directly to building MD on OS X. However, there are a few caveats.

Building using Makefiles

Building

Before running the configure script, point aclocal at a directory containing the pkgconfig M4 macro  (pkg.m4), e.g.

export ACLOCAL_FLAGS="-I /Library/Frameworks/Mono.framework/Versions/Current/share/aclocal"

and ensure that the Mono framework comes first in your PATH so you do not end up accidentally using conflicting versions of utilities from packages such as MacPorts:

export PATH="/Library/Frameworks/Mono.framework/Versions/Current/bin:$PATH"

Then configure using the mac profile

./configure --profile=mac

and make should work as expected.

NOTE: DO NOT use configure --select on Mac - the Mac profile passes adds required arguments to the configuration of main.  Instead edit profiles/mac manually to add any additional modules.

Building extras

To include additional addins from extras in the build, instead of using the Mac profile, use configure --select to select addins. This will write the default profile. Next, replace the line in profiles/default that begins with "main"  with the one from profiles/mac, then run configure again using the default profile.

Running

In order to use make run to run MD, add the GTK+ libraries' path to the Mac dynamic loader path:

export DYLD_FALLBACK_LIBRARY_PATH=/Library/Frameworks/Mono.framework/Versions/Current/lib:/lib:/usr/lib

Building the App package

To build the app package, navigate to the OS X build directory:

cd main/build/MacOSX

From here, build the MonoDevelop.app or a zipped version using make MonoDevelop.app or make MonoDevelop.app.zip respectively. You can then build the .dmg using the ./make-dmg-bundle.sh script. To include addins from extras, manually copy their build directories into the MonoDevelop.app directory, e.g.

cp -r ../../../extras/MonoDevelop.AspNet.Mvc/build/* MonoDevelop.app/Contents/MacOS/lib/monodevelop/AddIns/MonoDevelop.AspNet.Mvc/

Building using MonoDevelop

When building MonoDevelop using MonoDevelop, be sure to select the Mac configuration, as this will enable building only the addins that work on Mac.

Main

Building main is straightforward. Open main/Main.sln, select the mac configuration, and run the Build command. Note that running MonoDevelop from within MD will currently only work if you export DYLD_FALLBACK_LIBRARY_PATH as described above.

Extras

Loading the full MonoDevelop.mdw workspace and building the addin solutions from extras will only work if the Makefiles' configure script has been run. Even then, not all of them will build correctly. Until this is resolved, use the makefiles to build extras.

Tag page

Files (0)

 
Viewing 1 of 1 comments: view all
I had to set PKG_CONFIG_PATH before configure would work:

export PKG_CONFIG_PATH=/Library/Frameworks/Mono.framework/Home/lib/pkgconfig:/opt/local/lib/pkgconfig

Other than that it worked like a charm. Thanks!
Posted 13:07, 8 Oct 2009
Viewing 1 of 1 comments: view all
You must login to post a comment.
Page last modified 20:34, 7 Jun 2010 by M.j.hutchinson