DbLinq and Mono 2.4: Working Together? - mono

Hopefully this is a silly question and there's really a simple solution somewhere out there but...
Has anybody successfully gotten DbLinq to play nicely with Mono 2.4 on Mac OS X 10.5?
I've got my SQLite database ready but for the life of me, I can't find sqlmetal to generate my objects.
I'm guessing I might have to download a previous version of Mono that included sqlmetal, build and install it, and then just use the code generated from that version on Mono 2.4...but I'm hoping to avoid it at all costs.

I'd avoid using DBLinq for production code... many of Linq-To-SQL's features aren't implemented, and walking through the source code shows a low level of maturity... many of the methods are not implemented or marked as "unterminated".
...you've been warned!

Using the pre-compiled binary in this case just doesn't work.
To get a properly generated DbLinq data layer, you have to use the sqlmetal tool included with Mono (but, apparently, not with the pre-compiled binaries for OS X). You have to pull down the Mono trunk (along with all the dependencies) and build Mono from the source.
Once you build and install Mono from source, you should have the sqlmetal tool. Once you generate your code, it's as easy as including the generated *.cs file and importing Mono.Data.Sqlite.

Mono 2.6 will include for the first time a preview of DbLinq with Mono. You can take it out for a spin today if you install DbLinq on your own side-by-side with your current Mono setup.

Related

Using WebKitGTK+ on Centos 5.8?

I'm trying to build an embedded simple web browser for an embedded device and I've decided to use WebKit / WebKitGTK+. However, our device uses a Linux environment somewhat based on CentOS 5.8. I haven't been able to find any RPMS or mention of support for WebKit / WebKitGTK+ for CentOS 5.8 while doing several web searches.
Does anybody know if it's possible to build an older version of WebKitGTK+ such as 1.2.6-2.el6_0 which works well on CentOS 6.3? Are any RPMS available for CentOS 5.8?
The goal here is to be able to run a relatively current, at least 1.2.6 version of WebKitGTk on CentOS 5.8
Note: I was able to sort everything out. Just took a long time compiling all of the dependencies in the correct order with the correct options. I was able to get WebKitGTK 1.6.0 running on Centos 5.8.
You shouldn't have any problems building an old version of webkit if you can install the older versions of libraries that it requires.
If you have older or newer versions of GTK+ etc installed than the old version of webkit requires it may need quite a bit of porting to compile.
I'm not aware of any RPMs that meet your requirements
Depending on the compilation options you should be able to compile the dependencies in an isolated directory. With each library you typically use the --prefix option to specify the destination. Then when compiling something that depends on that library, you typically have an option to specify where to look for that library - something like --with-libraryname=/path/to/library. You want to check ./configure --help of each thing you're compiling to get the correct options.
It'll be quite a bit of work, but you should be able to compile everything you need into an isolated directory without replacing anything on the system. I would highly recommend you avoid doing this in root to ensure you have the right options.

Simple.Data can be safely used in mono today?

Some questions about Simple.Data and Mono:
Can I safely choose Simple.Data for a new project using Mono today?
There is the intention to maintain Mono compatibility in future versions?
The features are the same as the version for Windows?
Some testimony from someone who has already used in Mono?
Many thanks!
There will be a new official Mono build soon as part of the RC process. For now you should be able to clone the GitHub repo (http://github.com/markrendle/Simple.Data) and build the latest version.
Mono support is a requirement of the project, and will continue in all future versions.
Everything that works on Windows and MS.NET should work on Mono on OSX and Linux. If you find that something does not work, that is a bug and should be reported at http://github.com/markrendle/Simple.Data/Issues .
I have not personally got any projects using Simple.Data on Mono, so I can't offer a real testimony, but there are ~700 tests which all pass using Mono 2.10 on Mac OSX against a SQL Server DB.

Light Mono Installation

The mono installation provided at mono-project.com comes packed with several libraries, such as gkt, making the installation quite large (~280MB or so).
Is there any way to provide users with an installation of "just" the mono environment? I am targeting Windows, MacOSX and Linux.
You might be looking for mkbundle which merges your application, the libraries it uses and the Mono runtime into a single executable image. See under "Bundles" in that page.
If you do this though, it may mean that you are distributing LGPL code with all that this implies.
If you are distributing your app for Mac OS X, there is also MonoMacPackager which offers more advanced support for this. I think they have done a bunch of work in the linker to really minimize the amount of Mono that you have to include. It will actually remove unused code from assemblies that you reference.

how to build g++

I'm currently trying to get g++ working, and looking at http://gcc.gnu.org/install/build.html, I can't seem to find where it says how "to perform a 3-stage bootstrap of the compiler". Where would I find this information?
(I'm on a mac, in case that matters.)
After running configure, you do make bootstrap
You cannot bootstrap GCC without an already-functioning compiler on your platform:
From the prerequisites page:
ISO C90 compiler
Necessary to bootstrap GCC, although versions of GCC prior to 3.4 also allow bootstrapping with a traditional (K&R) C compiler.
And to preempt your next question, you also need a functioning compiler (usually GCC) in order to build Clang+LLVM.
It might be possible to do what you're trying so hard to do, by cross-compiling GCC from some other platform (see this section of the documentation). But I imagine this is not for the feint of heart, and you'd be far, far better off simply updating your copy of Mac OS X to the latest version with Xcode support.
From that link:
For a native build, the default configuration is to perform a 3-stage bootstrap of the compiler when `make' is invoked.
It seems to me that if your configuration isn't tweaked, it should do it out of the box. Just type make.
More specifically, you have to download the source code, and follow the instructions in that whole tutorial in order to build.
A side note - I am finding it hard to believe that there is no easy way to get GCC on an OSX box without having the installation media. That sounds really annoying :)
Edit:
If you are simply trying to write C++ on OSX, you could install one of many other IDEs. If you are lucky, they may come with their own compiler. Here is a list of alternatives to XCode:
http://alternativeto.net/desktop/xcode/?profile=mac&platform=mac

Run NUnit on Mono?

Does anyone know if you can run NUnit on Mono? The reason I ask is because on the download page it says:
For some releases, we provide a zipped package for use under Mono.
However, the only release that actually has a separate mono release (judging by its label that says "mono:" and then shows the .zip) is the ancient 2.2. NUnit's most recent version is 2.4.8 so I would really rather not use that old of a version.
Can you use the recent version of NUnit on Mono? If not, is there anything I could do to get it to work? What exactly makes something Mono runnable?
Mono 2.4 will ship with NUnit 2.4.8, and has been in use by the Mono project for their tests for several months, so it should work pretty well.
Mono 2.4 preview: http://mono.ximian.com/monobuild/preview/download-preview/
To answer any other "Will x run on mono..." they've produced a tool called the Mono Migation Analyser.
It can be found here and will show you what methods (if any) mono is missing to run your application.