assembly-bundle 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. HOWTO bundle assemblies inside the mono runtime.
  2. Paolo Molaro ([email protected])
  3. * Intent
  4. Bundling assemblies inside the mono runtime may be useful for a number
  5. of reasons:
  6. * creating a standalone complete runtime that can be more easily
  7. distributed
  8. * having an application run against a known set of assemblies
  9. that has been tested
  10. Of course, there are drawbacks, too: if there has been fixes
  11. to the assemblies, replacing them means recompiling the
  12. runtime as well and if there are other mono apps, unless they
  13. use the same mono binary, there will be less opportunities for
  14. the operating system to optimize memory usage. So use this
  15. feature only when really needed.
  16. * Creating the Bundle
  17. To bundle a set of assemblies, you need to create a file that
  18. lists the assembly names and the relative files. Empty lines
  19. and lines starting with # are ignored:
  20. == cut cut ==
  21. # Sample bundle template
  22. mscorlib: /path/to/mscorlib/assembly.dll
  23. myapp: /path/to/myapp.exe
  24. == cut cut ==
  25. Next you need to build the mono runtime using a special configure option:
  26. ./configure --with-bundle=/path/to/bundle/template
  27. The path to the template should be an absolute path.
  28. The script metadata/make-bundle.pl will take the specifie
  29. assemblies and embed them inside the runtime where the loading
  30. routines can find them before searching for them on disk.
  31. * Open Issues
  32. There are still two issues to solve:
  33. * config files: sometimes they are needed but they are
  34. not yet bundled inside the library ()
  35. * building with the included libgc makes it not
  36. possible to build a mono binary statically linked to
  37. libmono: this needs to be fixed to make bundles
  38. really useful.