Building MonoDevelop from source on the Mac is straightforward when the latest Mono SDK package is 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, so this page explains the Mac build process in more detail.
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"
NOTE: Please ensure that you have the very latest Mono MDK.
Check out MD, configure using the Mac profile:
git clone git://github.com/mono/monodevelop.git pushd monodevelop ./configure --profile=mac make make run
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.
IMPORTANT: Do not install MonoDevelop into the install prefix. MonoDevelop will pick up libraries from the prefix automatically. If you configured with a non-default prefix, then when you build an app bundle, the entire prefix will be merged into the app bundle.
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.
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
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/
When building MonoDevelop using MonoDevelop, be sure to select the Mac configuration, as this will enable building only the addins that work on Mac.
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.
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.
Install the latest Mono MDK (2.10.6 at the time of writing) and git. Then run the following commands
export PATH="/Library/Frameworks/Mono.framework/Versions/Current/bin:$PATH" export ACLOCAL_FLAGS="-I /Library/Frameworks/Mono.framework/Versions/Current/share/aclocal" git clone git://github.com/mono/monodevelop.git cd monodevelop ./configure --profile=mac make cd main/build/MacOSX && make MonoDevelop.app && open MonoDevelop.app
To update, run the following commands in the monodevelop directory:
git pull make cd main/build/MacOSX && make MonoDevelop.app && open MonoDevelop.app
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
export PKG_CONFIG_PATH=/Library/Frameworks/Mono.framework/Home/lib/pkgconfig:/opt/local/lib/pkgconfig
Other than that it worked like a charm. Thanks!