[Mono-dev] How to combine Mono with Application Binaries for redistribution

Stefanos Apostolopoulos stapostol at gmail.com
Thu Feb 16 10:01:38 UTC 2012

2012/2/15 MobileAppDevMan <mobileapp.experis at gmail.com>

> I developed an applicaiton using MonoDevelop. It runs fine from the
> machine I
> developed on Chrome (OpenSUSE 11.4)  with the related Mono products. I need
> my application to work on CentOS. I want to build a tar.gz or something
> similar that I can distribute to CentOS. Is there anyway to compile Mono
> with the source code I've developed to work within a self contained world.
> The only way my app would work on other Linux distro's is if they compile
> Mono from Source. Or is there another way to develop an application using
> Mono where you can package it to work on other Linux distros ?
Is this a closed-source app? In that case, your best bet is to create a C++
launcher that embeds the mono runtime and loads your Mono application.

The code is trivial, read the "embedding Mono" documentation and copy the
related sample verbatim. You will end up with a native binary (you'll need
two versions for x86 and amd64), the Mono runtime .so, your application
binaries and the huge Mono base class library (BCL). What you need to do is
determine the subset of the Mono BCL you are using and either copy that or
merge it into your application via a linker (the first is a safer bet).
Once you have all necessary components, it's just a matter of bundling them
into an installer for every distro you wish to support.

All this sounds painful, but it's not all that much. It took me a day to
figure everything out and create my installers, so it's ok.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20120216/b059a44a/attachment.html>

More information about the Mono-devel-list mailing list