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