[Mono-list] How to distribute Mono application
Jonathan Pryor
jonpryor at vt.edu
Fri Apr 22 17:36:55 EDT 2011
On Apr 16, 2011, at 4:38 AM, zealkaiser wrote:
> Similarly, If we distribute the application developed with mono, does the
> user need to have .Net framework or he/she should have same mono framework.
Maybe. :-)
See below.
> Is there any redistribution package for mono including just the run-time and
> the basic libraries i.e excluding c# compiler.
No, but it's fairly straight forward to create such a package for bundling purposes if you need to.
> How can I make my application portable, i.e the user don't have to install
> the mono but the mono libraries are with my application it self similarly to
> unity 3d. Unity 3d uses mono but it does not require us to install mono
> separately to run game built with it.
There are basically two ways to go for bundling purposes:
1. Distribute ~all of Mono
2. Distribute a mkbundled app.
In both cases you need to know the target ABI: there's no way to create a single program that will run on Linux, OSX, and Windows, though you could provide Mono's for all three (plus relevant CPU architectures).
For the "Distribute ~all of Mono" case, the use case would be a Windows "run-from-CD" style deployment: you would just copy the Mono runtime (mono, libmono.dll, GAC, etc.) onto your CD along with the app you want to install, then use a AUTORUN.INI file which will launch the app bundled on the CD with the mono bundled on the CD. The basic pattern here scales reasonably well -- just manually copy the mono, native libraries, and required assemblies onto some deployable media and use e.g. a script to actually launch the app with the bundled mono.
The "mkbundled app" approach involves using mkbundle(1) to bundle all necessary assemblies into a single file (optionally including the runtime), so that you only need to distribute a single file (plus any required native libraries) to run your app.
Be forewarned, though, that for public distributions you will need to follow the LGPL.
- Jon
More information about the Mono-list
mailing list