0

Installing the Environment: Part 2

Posted by Erik Gaius,aka [ K i r E ] on Tuesday, March 24, 2009, 3:28 PM in ,
Here's how I installed my whole Application Development Environment for Dot Net Applications from a clean formatted Hard Drive. Take note that the whole thing took about half a day (not including the ISO & update downloads) but of course results may vary. I'm not telling you to reformat your PC~ Just take what you need and leave the rest.

ADE4dotNet Installation Roadmap:
Part 1 ~ Ubuntu 8.10 & ndiswrapper
Part 2 ~ Mono 2.2 & Mono-Develop
Part 3 ~ Hello Worldz!

Let's get this parteh started!
~+~+~+~

Ok kids, Part 2~! We're going to install Mono 2.2 & Mono-Develop 1.9.3 from source files. Why not from the repositories? Because when you're developing applications, you probably wouldn't want to upgrade your framework because that might complicate things.

Ok, so~ Let's start with Mono 2.2

1.) Open a terminal (Application~Accessories~Terminal, in Ubuntu)
2.) Type the code below then enter your system password to get temporary 'Root' powers.
$ sudo bash
Note: 4Linux Newbs~ you don't actually write the dollar sign before the commands, it just signifies the 'command prompt' of the terminal.

3.) Get the dependencies needed by Mono 2.2 to run. If you're using Ubuntu 8.10, then this will be minor updates since Mono 1.9 is already installed.Type the commands below, then press Y (for yes) if prompted. The default repositories should be fine.
# apt-get install build-essential swig autoconf gawk mono-common binfmt-support bison pkg-config libglib2.0-dev
Note: 4Linux Newbs~ yeah, it's a sharp now which signifies that you have root powers cuz' of the earlier command.

4.) After a few minutes, the updates will be done, and you'll be back at the sharp prompt. This time you're going to need a dependency that's not in the normal repositories (yet) because its still unstable. Type the next line into the terminal
# wget http://ftp.novell.com/pub/mono/sources/libgdiplus/libgdiplus-2.2.tar.bz2
It's 1.9 MB, so the download should be fairly short. This is the library needed to support System.Drawing, and to unzip & compile: type in the next lines
# tar xaf libgdiplus-2.2.tar.bz2
# cd libgdiplus-2.2
# ./configure
# make
# make install
# cd
This might take a while, but be patient. There's still quite a low chance of hiccups during this part.. I haven't encountered any thus far. Take note that after installing the package, I added a 'cd' at the bottom to get back to the home folder, but it's not really necessary.

5.) Ok, Next~ It's time to install mono itself. Just like the last library, Mono 2.2 is also unstable, meaning it is still not on the repositories (it will be soon though, come Ubuntu 9.04 on April). So, first get the source files, then just like the library above, unzip then compile. All of the code you need is below~:
# wget http://ftp.novell.com/pub/mono/sources/mono/mono-2.2.tar.bz2
# tar xaf mono-2.2.tar.bz2
# cd mono-2.2
# ./configure
# make
# make install
# ln -s /usr/local/bin/mono /usr/bin/cli
# cd
This WILL take a while. The download alone is 23MB, and installing a whole new framework may very well take 10 to 15 mins, so just leave it alone 4 a while. It's safe to browse the net or watch a move in another workspace though, as long as you don't crash the whole O/S ^^ Got a minor hiccup though~ The download stopped at 59%. So I just hit ctrl+Z to stop the command, used the 'rm' command to remove the incomplete files before executing the wget commands again..

Also you may notice the 2nd to the last line above, the ln. That stands for link, which allows you to execute mono applications directly through the shell.

6.) After that's a-Ok, Mono should be correctly installed to your system. Type the command below to confirm
# mono --version
Mono JIT Compiler 2.2 should be a part of the output. But here's a more surefire way to check if you've done the instructions above correctly:
# echo 'class X { static void Main () { System.Console.Write("My first mono app worked!\n");} }' > example.cs
# mcs example.cs
# mono example.exe
should output: My first mono app worked! in the console. If you copy this executable to other platforms, it should still run (as long as mono is installed there~).

It seems that I've reached my word count limit ~.~ I'll continue this tutorial a bit later as Part 2.5: Mono-Develop ^^ Sorry~! For comments, suggestions and questions, click the post-it note at the right side of this post's title! Stay tuned, see ya soon! ^^

0 Comments

Post a Comment

Copyright © Gains & Hart Co. 2009 .Net.ph All rights reserved. Theme by Laptop Geek. | Bloggerized by FalconHive.