[Mono-list] embedding mono runtime
jonpryor at vt.edu
Wed Feb 17 14:43:26 EST 2010
On Sat, 2010-02-06 at 03:11 -0800, stobi wrote:
> With great interest I read the article on how to Embedding Mono !
> Cause I'm new to Mono I'm not sure if this means what I think !
> Can I embed the mono runtime into my application exe so that I do not have
> distribute the mono runtime ?
Maybe. You can dynamically link your app against
libmono.so/libmono.dll, in which case you would still need to distribute
the mono runtime.
Alternatively, you could statically link mono into your app, but since
libmono is distributed under the LGPL this is inadvisable. See the LGPL
for details (and commercial licenses are available).
I believe that you would still need to distribute Mono's assemblies,
though e.g. mkbundle2(1) could be used to minimize this requirement.
(Note: I have no idea if mkbundle2 and embedding can be made to work
> Otherwise is it able to deploy the mono runtime by "just copying some exes
> dlls into a directory" ?
Yes. It just requires that you set some environment variables before
running so that Mono's files can be found (e.g. setting LD_LIBRARY_PATH
on Linux, %PATH% on Windows).
> Does this anybody already on windows platform ? Perhaps you can
> send my some hints or instructions how to do that on the windows platform ?
This has been done; see http://www.novell.com/products/mono/
(specifically the "Success & Awards" section).
Using Mono for "run-from-CD"-style programs on Windows has also been
discussed (see the archives). It generally requires copying your
program and Mono's files onto the CD, then writing a .ini file for the
CD which launches the Mono present on the CD and passes your program to
Mono. Should be a ~trivial operation for anyone familiar with the
necessary .ini file incantations...
More information about the Mono-list