Alright! You asked for it, so here it is! Here’s a bash script that will download, compile and install MonoDevelop. I can’t say it’s a perfect solution, but it does work and it’s relatively clean. The main difference between this install and platform packages is that it will install to a prefix using the parallel environment recommendations. So launching it requires a little environment setup, which the script will provide for you. Otherwise, it should work just the same.
First of all, I should mention in big, giant font: "RUN THIS AT YOUR OWN RISK." I highly recommend getting familiar with the build process before trying this out. These scripts are only meant to be a tool to help you out. They're not intended to be an end all solution for installing these packages. Feel free to modify the scripts to make them work for you. Also, if you're just interested in installing stable Mono 2.10 w/ MonoDevelop 2.4 on Ubuntu, checkout the Badgerports; they've already packaged this thing up. It's a 1000x easier to do.
Steps to Install
- Install Mono 2.10.
- Install MonoDevelop
- Use the launcher script to run MonoDevelop.
In Detail – Installing Mono
This install, will install the latest Mono 2.10.1 to the prefix directory /opt/mono-2.10.
NOTE: If you’ve already installed 2.10, you can skip this step or you can change the PREFIX value in the beginning of the script to install to a different location.
mkdir mono-2.10 cd mono-2.10 wget --no-check-certificate https://github.com/nathanb/iws-snippets/raw/master/mono-install-scripts/ubuntu/install_mono-2.10.sh chmod 755 install_mono-2.10.sh ./install_mono-2.10.sh
mkdir mono-2.10 cd mono-2.10 wget --no-check-certificate https://github.com/nathanb/iws-snippets/raw/master/mono-install-scripts/fedora/install_mono-2.10.sh chmod 755 install_mono-2.10.sh ./install_mono-2.10.sh
This new script will stop if anything goes wrong. If you have a problem, usually the error or message will display a few lines above the prompt. You Windows folks, can press Shift-PageUp to scroll the screen up and see more information. Usually errors are caused by missing development packages on the system, missing environment settings or some incompatibility. Google will come in very handy for most of these.
NOTE: I did notice a problem during the "make install" of xsp. However, the mod-mono-server programs did install fine. For now, ignore this and continue.
If all is well, you should be able to enter:
And you should get a display of Mono 2.10.1
Mono JIT compiler version 2.10.1 (tarball Tue Mar 8 15:01:43 CST 2011) Copyright (C) 2002-2011 Novell, Inc and Contributors. www.mono-project.com TLS: __thread SIGSEGV: altstack Notifications: epoll Architecture: x86 Disabled: none Misc: softdebug LLVM: supported, not enabled. GC: Included Boehm (with typed GC and Parallel Mark)
Installing MonoDevelop 2.4.2
NOTE: If you want to try the beta 2.6 version, skip the 2.4 install and go straight to the next one.
Now the fun part. Download and run another script to install the tools. If you’re installing to a different prefix, make sure you set the correct one at the beginning of the script before you run it. The script will install the sources found on the MonoDevelop download page.
wget --no-check-certificate https://github.com/nathanb/iws-snippets/raw/master/mono-install-scripts/ubuntu/install_monodevelop-2.4.2.sh chmod 755 install_monodevelop-2.4.2.sh ./install_monodevelop-2.4.2.sh
wget --no-check-certificate https://github.com/nathanb/iws-snippets/raw/master/mono-install-scripts/fedora/install_monodevelop-2.4.2.sh chmod 755 install_monodevelop-2.4.2.sh ./install_monodevelop-2.4.2.sh
After it installs, run the monodevelop-launcher.sh file generated in the same directory containing the install scripts and you’ll be good to go.
Installing MonoDevelop Beta 2.6 Instead
This script is totally experimental and will install to the SAME location as the 2.4 version unless you change the prefix.
wget --no-check-certificate https://github.com/nathanb/iws-snippets/raw/master/mono-install-scripts/ubuntu/install_monodevelop-2.5.90.sh chmod 755 install_monodevelop-2.5.90.sh ./install_monodevelop-2.5.90.sh
wget --no-check-certificate https://github.com/nathanb/iws-snippets/raw/master/mono-install-scripts/fedora/install_monodevelop-2.5.90.sh chmod 755 install_monodevelop-2.5.90.sh ./install_monodevelop-2.5.90.sh
How it works – A little bit of VooDoo
So I’ve been experimenting with a new bash script that will install MonoDevelop on Ubuntu for awhile now, but I always ran into an issue with the current source packages that caused gnome-sharp not to build. That throws a wrench in a script when you want all the packages to build all at once. The problem in gnome-sharp was a broken test that used an old reference no longer packaged with the current version. So it required a little manual care before you could build it. Glancing at the discussion here, I decided to roll a real simple C# application that would automatically comment those lines out for me.
But how do you deploy such a creature with just a bash script? Well… here’s the voodoo. I removed all the whitespace from the C# code I wrote and embedded it as a bash string. Then I echo/piped it to a text file, compiled it and used it within the bash script. You’ll notice if you watch the system while you’re installing it, that it creates a program called “comment-lines.exe”. (Feel free to use it). The bash script will auto-remove it when the install succeeds, but you can comment out the cleanup line and re-use it. You can also fine the original source for the program here.
So that’s it! I hope these scripts help you out. They may seem a little more frustrating than the old ones since they actually stop when some thing isn’t working, but hopefully it’s all for the better. Let me know how they work for you.