README 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. This is Mono.
  2. 1. Installation
  3. 2. Using Mono
  4. 3. Directory Roadmap
  5. 1. Compilation and Installation
  6. ===============================
  7. a. Build Requirements
  8. ---------------------
  9. To build Mono, you will need the following components:
  10. * pkg-config
  11. Available from: http://www.freedesktop.org/Software/pkgconfig
  12. * glib 2.0
  13. Available from: http://www.gtk.org/
  14. Optional dependencies:
  15. * ICU library
  16. http://oss.software.ibm.com/icu/index.html
  17. You will need this one to get complete support for the international
  18. features of the .NET Framework.
  19. * Cairo and libgdiplus
  20. If you want to get support for System.Drawing, you will need to get
  21. both Libgdiplus and Cairo.
  22. b. Building the Software
  23. ------------------------
  24. If you obtained this package as an officially released tarball,
  25. this is very simple, use configure and make:
  26. ./configure --prefix=/usr/local
  27. make
  28. make install
  29. Mono supports a JIT engine on x86, SPARC and PowerPC systems.
  30. The various commands that ship with Mono default to the JIT engine
  31. on x86 and SPARC, to turn it on for PPC systems, use the --with-jit=yes
  32. command line option to configure.
  33. MacOS X Users: you will need to download the latest Boehm GC
  34. Alpha release for garbage collection to work properly.
  35. If you obtained this as a snapshot, you will need an existing
  36. Mono installation. To upgrade your installation, unpack both
  37. mono and mcs:
  38. tar xzf mcs-XXXX.tar.gz
  39. tar xzf mono-XXXX.tar.gz
  40. mv mono-XXX mono
  41. mv mcs-XXX mcs
  42. cd mono
  43. ./autogen.sh --prefix=/usr/local
  44. make bootstrap
  45. c. Building the software from CVS
  46. ---------------------------------
  47. If you are building the software from CVS, make sure that you
  48. have up-to-date mcs and mono sources:
  49. cvs co mono mcs
  50. Then, go into the mono directory, and configure:
  51. cd mono
  52. ./autogen.sh --prefix=/usr/local
  53. Depending on whether you have an existing Mono installation or
  54. not, you can try the following:
  55. i. If you have an existing Mono installation
  56. -----------------------------------------
  57. First verify that you have a working installation:
  58. echo 'class X { static void Main () { System.Console.Write("OK");}}' > x.cs
  59. Compile:
  60. mcs x.cs
  61. And run:
  62. mono x.exe
  63. If you get the output `OK' and no errors, and you have mono
  64. version 0.31 or later, continue. Otherwise, you can try option
  65. (ii) below.
  66. You are ready to start your CVS upgrade. Compile with
  67. make bootstrap
  68. This will automatically go into the mcs/ tree and build the
  69. binaries there, and copy them into the appropriate
  70. sub-directories of mono/runtime/.
  71. Now, go to step (iii) below.
  72. ii. If you don't have a working Mono installation
  73. ---------------------------------------------
  74. If you don't have a working Mono installation, an obvious choice
  75. is to install the latest released packages of 'mono' for your
  76. distribution and go back to step (i).
  77. You can also try a slightly more risky approach that should work
  78. almost all the time.
  79. This works by first getting the latest version of the 'monolite'
  80. distribution, which contains just enough to run the 'mcs'
  81. compiler. You do this by
  82. make get-monolite-latest
  83. This should place a monolite-latest.tar.gz in the parent
  84. directory of the 'mono' source tree. You can then run:
  85. make monolite-bootstrap
  86. This will automatically gunzip and untar the tarball, place the
  87. files appropriately, and then complete the bootstrap.
  88. iii. Testing and Installation
  89. ------------------------
  90. You can run the mono and mcs testsuites with the command:
  91. make -k bootstrap-check
  92. Expect to find several testsuite failures, especially in the
  93. mcs/ tree. As a sanity check, you can compare the failures you
  94. got with
  95. http://go-mono.com/tests/displayTestResults.php
  96. You can now install it:
  97. make install
  98. Failure to follow these steps will result in a broken installation.
  99. iv. Other useful "bootstrap"-like facilities
  100. ----------------------------------------
  101. If you have a CVS snapshot that you keep updating periodically,
  102. and/or do your development in, you may try using a couple of
  103. specialty make targets that may be slightly faster than a
  104. "make bootstrap".
  105. You can try a two-stage bootstrap with:
  106. make faststrap
  107. This assumes that you have already run a "make bootstrap" on the
  108. tree before.
  109. If you want to avoid waiting even for that, you can try the
  110. riskier one-stage build:
  111. make fasterstrap
  112. This should be attempted only if you're sure that the sources of
  113. the mcs compiler itself and the sources of the libraries used by
  114. it have not been changed.
  115. 2. Using Mono
  116. =============
  117. Once you have installed the software, you can run a few programs:
  118. * runtime engine
  119. mono program.exe
  120. or
  121. mint program.exe
  122. * C# compiler
  123. mcs program.cs
  124. * CIL Disassembler
  125. monodis program.exe
  126. See the man pages for mono(1), mint(1), monodis(1) and mcs(2)
  127. for further details.
  128. 3. Directory Roadmap
  129. ====================
  130. doc/
  131. Contains the web site contents.
  132. docs/
  133. Technical documents about the Mono runtime.
  134. data/
  135. Configuration files installed as part of the Mono runtime.
  136. mono/
  137. The core of the Mono Runtime.
  138. metadata/
  139. The object system and metadata reader.
  140. jit/
  141. The Just in Time Compiler.
  142. dis/
  143. CIL executable Disassembler
  144. cli/
  145. Common code for the JIT and the interpreter.
  146. io-layer/
  147. The I/O layer and system abstraction for
  148. emulating the .NET IO model.
  149. cil/
  150. Common Intermediate Representation, XML
  151. definition of the CIL bytecodes.
  152. interp/
  153. Interpreter for CLI executables.
  154. arch/
  155. Architecture specific portions.
  156. man/
  157. Manual pages for the various Mono commands and programs.
  158. scripts/
  159. Scripts used to invoke Mono and the corresponding program.
  160. runtime/
  161. A directory holding a pre-compiled version of the Mono
  162. runtime.