2004-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.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                 cvs co mono mcs
75
76         Then, go into the mono directory, and configure:
77
78                 cd mono
79                 ./autogen.sh --prefix=/usr/local
80
81         Depending on whether you have an existing Mono installation or
82         not, you can try the following:
83
84         i.   If you have an existing Mono installation
85              -----------------------------------------
86
87         First verify that you have a working installation:
88
89                 echo 'class X { static void Main () { System.Console.Write("OK");}}' > x.cs
90
91         Compile:
92
93                 mcs x.cs
94
95         And run:
96
97                 mono x.exe
98
99         If you get the output `OK' and no errors, and you have mono
100         version 0.31 or later, continue.  Otherwise, you can try option
101         (ii) below.
102
103         You are ready to start your CVS upgrade.  Compile with
104
105                 make bootstrap
106
107         This will automatically go into the mcs/ tree and build the
108         binaries there, and copy them into the appropriate
109         sub-directories of  mono/runtime/.
110
111         Now, go to step (iii) below.
112
113         ii.  If you don't have a working Mono installation
114              ---------------------------------------------
115
116         If you don't have a working Mono installation, an obvious choice
117         is to install the latest released packages of 'mono' for your
118         distribution and go back to step (i).
119
120         You can also try a slightly more risky approach that should work
121         almost all the time.  
122
123         This works by first getting the latest version of the 'monolite'
124         distribution, which contains just enough to run the 'mcs'
125         compiler.  You do this by
126
127                 make get-monolite-latest
128
129         This should place a monolite-latest.tar.gz in the parent
130         directory of the 'mono' source tree.  You can then run:
131
132                 make monolite-bootstrap
133
134         This will automatically gunzip and untar the tarball, place the
135         files appropriately, and then complete the bootstrap.
136
137         iii. Testing and Installation
138              ------------------------
139
140         You can run the mono and mcs testsuites with the command:
141
142                 make -k bootstrap-check
143
144         Expect to find several testsuite failures, especially in the
145         mcs/ tree.  As a sanity check, you can compare the failures you
146         got with
147
148                 http://go-mono.com/tests/displayTestResults.php
149
150         You can now install it:
151
152                 make install
153
154         Failure to follow these steps will result in a broken installation. 
155
156         iv.  Other useful "bootstrap"-like facilities
157              ----------------------------------------
158
159         If you have a CVS snapshot that you keep updating periodically,
160         and/or do your development in, you may try using a couple of
161         specialty make targets that may be slightly faster than a
162         "make bootstrap".
163
164         You can try a two-stage bootstrap with:
165
166                 make faststrap
167
168         This assumes that you have already run a "make bootstrap" on the
169         tree before.
170
171         If you want to avoid waiting even for that, you can try the
172         riskier one-stage build:
173
174                 make fasterstrap
175
176         This should be attempted only if you're sure that the sources of
177         the mcs compiler itself and the sources of the libraries used by
178         it have not been changed.
179
180 2. Using Mono
181 =============
182
183         Once you have installed the software, you can run a few programs:
184
185         * runtime engine
186
187                 mono program.exe
188           or
189                 mint program.exe
190
191         * C# compiler
192
193                 mcs program.cs
194
195         * CIL Disassembler
196
197                 monodis program.exe
198
199         See the man pages for mono(1), mint(1), monodis(1) and mcs(2)
200         for further details.
201
202 3. Directory Roadmap
203 ====================
204
205         doc/
206                 Contains the web site contents.
207
208         docs/
209                 Technical documents about the Mono runtime.
210
211         data/
212                 Configuration files installed as part of the Mono runtime.
213
214         mono/
215                 The core of the Mono Runtime.
216
217                 metadata/
218                         The object system and metadata reader.
219
220                 jit/
221                         The Just in Time Compiler.
222
223                 dis/
224                         CIL executable Disassembler
225
226                 cli/
227                         Common code for the JIT and the interpreter.
228
229                 io-layer/
230                         The I/O layer and system abstraction for 
231                         emulating the .NET IO model.
232
233                 cil/
234                         Common Intermediate Representation, XML
235                         definition of the CIL bytecodes.
236
237                 interp/
238                         Interpreter for CLI executables.
239
240                 arch/
241                         Architecture specific portions.
242
243         man/
244
245                 Manual pages for the various Mono commands and programs.
246
247         scripts/
248
249                 Scripts used to invoke Mono and the corresponding program.
250
251         runtime/
252
253                 A directory holding a pre-compiled version of the Mono
254                 runtime.
255
256