quinta-feira, abril 06, 2006

Howto: Mono, SharpDevelop and Firebird on Windows

I took some time to make these 3 wonderfull things work together, but as I'm a nice guy, I'll save you the trouble and teach step by step how to make them work together.


Mono:

We can start installing mono, this is very easy, just download the installer from Here and install it.

After that you need to add the the mono install on the Windows Path.

To do that, right click on My Computer -> Properties -> Advanced -> Environment Vars, chose PATH on the list on the bottom and click on Edit.

You need to add mono´s bin folder, for example if you installed mono on: C:\Program Files\Mono, the path Would be: C:\Program Files\Mono\bin.

After doing this we need to set up another environment var, Click in New and Add this var:

MONO_EXTERNAL_ENCODINGS

Set it to this value:

default_locale

Now your mono is alive and kicking (At least it should be), now we are going to install the Firebird ADO.NET provider.


Firebird ADO.NET Provider:

Download Nant extract it to wherever you want and add the bin folder to the windows path, the same way you added the firebird bin folder.

Download and install Nunit 2.2

Download the Firebird 1.7 ADO.NET Provider Souce code

Extract the source code and execute the build.bat file that is located on the build/win32/ado.net folder of the source code you just extracted.

If everything is fine you should now have a FirebirdSql.Data.Firebird.dll, place this file wherever you want, you will need to use it on SharpDevelop.


SharpDevelop

To install SharpDevelop, just download the install from Here.

After installing it, to compile things on mono you need just to set the compiler, to do it, open up a new project, then click on the menu: Project -> Project Options -> Compiling, on then target Framework chose Mono 2.0.

To use firebird in your project, you need to add a reference to it, to do so, right click on References -> Add Mono Reference -> .NET Assembly Navigator -> Browse, and select your FirebirdSQl.Data.Firebird.dll.

Thats all you need to start making .NET Applications with Mono and Firebird using SharpDevelop.

3 comentários:

Anônimo disse...

Why do you build .NET provider from sources? Firebird .NET provider is the part of Mono.

sapo disse...

It is, but it didnt work on windows (at least when i tried) it just worked after i built from source.

IG disse...

You can download the provider binary Installer from firebirdsql.org instead of compiling the sources.