[Opensim-users] Running OpenSim on a Nokia N900 Smartphone

Teravus Ovares teravus at gmail.com
Sun Oct 10 14:53:12 UTC 2010


This may not be a good solution....  but it's something for you to try
----------------------------------
Hey there

Since I have not had much response to my CSharpSqlite query in June, I
went ahead and committed the CSharpSqlite binary as well as my custom
ADO.NET <http://ado.net/> wrapper for CSharpSqlite.   The source for them is
OpenSimLibs/trunk/managed.

Commit Hash: acd5bbdb71682131be386b7a5ce190
4622b0ee70
ViewGit:
http://opensimulator.org/viewgit/?a=commit&p=opensim&h=acd5bbdb71682131be386b7a5ce1904622b0ee70

For those of you who do not know what CSharpSqlite is, I suggest you
read: http://code.google.com/p/csharp-sqlite/
Summary:   It's an independent implementation of the SQLite library
written in C#.   There are no native libraries associated with it.
This has the advantage of having it work, out of the box in most
configurations.  (32bit/64bit/Win/Linux/Mac/more?).
Benchmarks: http://code.google.com/p/csharp-sqlite/wiki/Benchmarks

A couple of things that I've learned about it during the process of
getting it to work.

1. The SQLite database files that CSharpSqlite makes are not byte per
byte compatible.   Mono.Data.Sqlite and other native SQLite tools can
read databases created with CSharpSqlite but CSharpSqlite asserts on
databases created with Mono.Data.Sqlite

2. When running under CSharpSqlite, OpenSimulator will crash on the
first load.    Subsequent attempts to load OpenSimulator and it'll be
fine.

The ADO.NET <http://ado.net/> wrapper that I wrote for CSharpSqlite is code
compatible
with Mono.Data.Sqlite. That means that either can be used simply by
changing the using statement at the top of each of the SQLite*.cs
files  The same code that works for Mono.Data.Sqlite will also work on
CSharpSqlite because the inner namespaces are exactly the same.

To save on code maintenance, I implemented CSharpSqlite as the
compilation conditional CSharpSqlite in the OpenSim.Data.Sqlite
project.

#if CSharpSqlite
   using Community.CsharpSqlite.Sqlite;
#else
   using Mono.Data.Sqlite;
#endif

CSharpSqlite is easy to define in Microsoft Visual Studio but it's
slightly tougher for just plain Mono.

In Visual Studio, you right click the OpenSim.Data.Sqlite project in
the Solution Explorer.  Click Properties from the context menu.  Then
go to the Build Tab.  You'll see a box labeled 'Condition compilation
symbols' that's empty.   Simply enter CSharpSqlite into that box, save
the project and compile.

Apparently in Mono you use the -d:CSharpSqlite parameter when you
compile OpenSim.Data.Sqlite.     MonoDevelop may make this process
easier but I have no basis to work from.

Hopefully this helps people deal with issues relating to the use of SQLite

Regards

Teravus



On Sun, Oct 10, 2010 at 10:15 AM, Aldon Hynes
<Aldon.Hynes at orient-lodge.com>wrote:

> > From: Justin Clark-Casey
> > On 08/10/10 19:04, Aldon Hynes wrote:
> > > Okay, I realize this is probably pushing the envelope a little bit, but
> > > I've made a little bit of progress in running OpenSim on a Nokia N900
> > > smartphone.
> > > The Nokia N900 is a linux based phone. There is limited Mono support on
> > > it, so I thought I would see if I could run OpenSim on it.
> > > I actually got pretty far, but it seems to be failing when I get to the
> > > Loading Region's modules (old style) section.
> > > I get an error saying Could not load types fo [MySql.Data ... ]
> > > I don't believe that the Mono on the N900 supports MySql. On the other
> > > hand, I'm using sqlite3 for my database, so I'm wondering why I'm
> > > getting the MySql.Data error and if there is some configuration I can
> do
> > > to get around this.
> >
> > It looks like this is a consequence of our module loading system.
> >  If you move or remove OpenSim.Data.Tests.dll then
> > OpenSim may start correctly without the MySQL library (it does on
> > my local master).  For some reason, module loading is
> > loading OpenSim.Data.Tests.dll and then trying to resolve the
> > MySQL libraries that it references further on.
>
> I removed OpenSim.Data.Tests.dll from the opensim/bin directory.  Still
> getting the same error.
>
> I wondered if maybe it was some other Test dll, so I moved all of the files
> with *Test* out of the opensim/bin directory, and still got the same error.
>
> So, is there something else I can do to get around the MySQL problem?
> I tried using SQLLiteLegacyStandalone.ini and I seemed to get further, but
> it gave me an error about failing to load plugin
> OpenSim.Data.IXInventoryData  I tried tweaking SQLLiteLegacyStandalone.ini
> but without any luck.
>
> Also, when I am running an OpenSim region, do I need the test files?
> Especially if I'm trying to run a pared down version on a mobile device?
>
> Aldon
>
> >
> > I discovered this by first removing Data.MySQL.dll and then
> > working back along the chain of resolution problems it
> > complained about.
> >
> > > For more details, check my blog post
> > > Building Virtual Worlds on the #N900
> > > http://www.orient-lodge.com/node/4281
> > > Aldon
>
> _______________________________________________
> Opensim-users mailing list
> Opensim-users at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-users/attachments/20101010/168672d5/attachment.html>


More information about the Opensim-users mailing list