Installing mono From Trunk (.Net 4.0 Support)

Got a program that plays well with SABnzbd? Share it here!
Post Reply
markus101
Release Testers
Release Testers
Posts: 406
Joined: August 13th, 2008, 2:51 am

Installing mono From Trunk (.Net 4.0 Support)

Post by markus101 »

Hi all,

I was recently working on getting SABSync to work on Linux, but as I've moved to the .Net 4.0 framework a little more effort than simply booting up Ubuntu and running it was required. So here are the steps I followed to get it up and running, paths are related to my system, so you may need to make changes for it to work on your system.

All commands are run through Terminal, in case that wasn't obvious on Ubuntu 10.04 this was under: Applications -> Accessories -> Terminal

First and foremost, to compile mono from the svn source you need at least mono 2.4 installed, check by running:

Code: Select all

mono --version
If you're running a version lower than 2.4 you will need to update (Ubuntu 10.04 shipped with 2.4.4, though 2.6.x is available)

My username for Ubuntu was "user" and I put everything in the Downloads folder, but you can place it anywhere you wish (or substitute your username in place of "user"):

Code: Select all

/home/user/Downloads
Download the required tools to compile mono from source (command should be on a single line):

Code: Select all

sudo apt-get install build-essential automake libtool gettext mono-devel mono-1.0-devel subversion libpng-dev libtiff-dev libgif-dev libjpeg-dev libexif-dev autoconf automake bison flex libcairo2-dev libpango1.0-dev
Create a new folder for the mono source:

Code: Select all

mkdir /home/user/Downloads/monosvn
Change Directory (cd) into the monosvn folder:

Code: Select all

cd /home/user/Downloads/monosvn
Use svn to download the files (this will take a few mins):

Code: Select all

svn co svn://anonsvn.mono-project.com/source/trunk/mcs 
svn co svn://anonsvn.mono-project.com/source/trunk/mono 
svn co svn://anonsvn.mono-project.com/source/trunk/gtk-sharp
svn co http://anonsvn.mono-project.com/source/trunk/libgdiplus
Determine what --prefix should be equal to, first cd to the root of your system and then you will use find to find a folder specific to mono:

Code: Select all

cd /
find -name compat-1.0
In my case the result is: /usr/lib/mon/compat-1.0 so my prefix is /usr (everything preceeding /lib)
The example from the mono site is: /usr/local

Change Directory (cd) to the mono folder from your svn check out:

Code: Select all

cd mono
Configure mono (with support for 4.0):

Code: Select all

./autogen.sh --with-profile4=yes --prefix=/usr
Once configured you need to run make (this will take a long time, depending on your system):

Code: Select all

make
Now you need to install mono:

Code: Select all

sudo make install
Now you can run SABSync or any other .Net application requiring v4.0 of the .Net Framework!

Specific to SABSync:

I have SABSync.exe on my system located at:

Code: Select all

/home/user/Downloads/SABSync
So I cd to the directory like so:

Code: Select all

cd /home/user/Downloads/SABSync
And run it by:

Code: Select all

mono ./SABSync.exe
I also used chmod SABSync.exe to have Execute priviledges:

Code: Select all

chmod +x SABSync.exe
And now can run it from /home/user/Downloads/SABSync:

Code: Select all

./SABSync.exe
Or from anywhere on my system by Symlinking SABSync and RSS.NET.dll to directories in the path variable:

Code: Select all

ln -s /home/user/Downloads/SABSync/SABSync.exe /usr/bin
ln -s /home/user/Downloads/SABSync/RSS.NET.dll /usr/lib
So now I can run SABSync.exe from any folder by simply running:

Code: Select all

SABSync.exe

I hope this helps someone, please let me know if I can help in some way, by no means am I great with Linux, but I do manage.

Happy Downloading,

Markus
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
Post Reply