Getting Started

From libopenmetaverse - libomv - Developer Wiki

Jump to: navigation, search

Contents

libopenmv runs on top of the .NET runtime. Therefore, the only dependency it requires to run is .NET (in Windows) or Mono (in Linux, Unix or Mac OS X).

However, you may desire to compile libopenmv yourself. Compiling from source requires a Subversion (svn) client to acquire the code and Mono or Visual Studio/Visual C# Express to compile. More detailed instructions for different operating systems may be found below.

Specific information may be found in the libopenmv documentation. Additionally, it may be useful to consult the source code of a specific application.

Finally, if you have any questions or would like to chat with members of the libopenmv community, feel free to join us on IRC in the #libomv-dev channel on Freenode.

Linux/OSX

Installing Mono

Follow the instructions on http://www.mono-project.com/ to install Mono on your platform. It is recommended to use the most recent version of Mono, and libopenmv may not run with versions prior to Mono 2.4.

You will also need to install nant from nant-0.86-beta1-src.tar.gz. Please note that many distributions bundle nant 0.85, and building libomv with it will not work.

Getting libopenmv

  • Download the libopenmv source from Subversion by opening a terminal and typing:
$ svn co http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk/
For a stable release use the following:
 $ svn http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/tags/0.9.0/
Change '0.9.0' to the current release version.
  • Compile libopenmv by returning to your terminal and typing:
$ cd trunk
$ sh runprebuild.sh nant

Common Build error:

The current runtime framework 'mono-2.0' is not correctly configured in the NAnt configuration file.
Unable to locate 'mono' module using pkg-config. Download the Mono development packages from http://www.mono-project.com/downloads/.
This is probably due to missing glib2-devel packages, you can confirm this with
$ pkg-config --modversion mono

Common Build error:

The type or namespace name `Windows' does not exist in the namespace `System'. Are you missing an assembly reference?
This is probably due to missing package libmono-winforms2.0-cil

Common build error:

[: 12: xnant: unexpected operator
[: 17: xnant: unexpected operator
[: 28: xnant: unexpected operator

This may mean that the shell script did not fully complete, you must run nant manually:

$ nant

How to launch the programs in libopenmv

libopenmv is written in C#, using .Net/Mono. This means that it is not possible to simply execute the tools independently from the command line as you would with a regular Linux application.

However, assuming you compiled libopenmv yourself, you already have everything that is needed to run the tools from the command line. (If you wish to use the graphical tools, you must install X11.)

  • In your command prompt, type:
$ mono whicheverprogram.exe

Windows

libopenmv is written in C# using Microsoft .NET. Most recent installations of Windows include the .NET runtime and all dependencies necessary to use libopenmv. Therefore, to use libopenmv, you may simply download a set of pre-built binaries from Builds and launch a given application from the Command Prompt. If you desire to build libopenmv yourself, you may follow the instructions below.

How to compile libopenmv

Packages

Instructions

  1. Download Microsoft Visual C# Express Edition and install it.
  2. Download TortoiseSVN and install it.
  3. Create a folder named dev in C:\ (or in the root directory of some other hard drive).
  4. In the dev folder, create a folder named libopenmv.
  5. Right click the libopenmv folder, select SVN Checkout… from the context menu.
  6. In the field for "URL of Repository", put http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/tags/0.9.0/ Repleace 0.9.0 with the current release number. For the development branch use http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk/
  7. Click the OK button. Make certain the box labeled Omit Externals is unchecked
  8. Files should start getting downloaded. When “Completed” appears, click OK.
  9. Now look inside the libopenmv folder and its subfolders for files ending in .bat
  10. For Visual Studio 2010: Double click the runprebuild2010.bat file
  11. open the solution OpenMetaverse.sln from within Visual Studio
  12. From the Build Menu choose Build Solution (or press the F6 Key)

The library, example applications and tools will be in the bin directory