Add
[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.4
21
22                   Available from: http://www.gtk.org/
23
24         On Itanium, you must obtain libunwind:
25
26                 http://www.hpl.hp.com/research/linux/libunwind/download.php4
27
28         On Solaris, make sure that you used GNU tar to unpack this package, as
29         Solaris tar will not unpack this correctly, and you will get strange errors.
30
31         On Solaris, make sure that you use the GNU toolchain to build the software.
32
33         Optional dependencies:
34
35                 * libgdiplus
36
37                   If you want to get support for System.Drawing, you will need to get
38                   Libgdiplus.
39
40     b. Building the Software
41     ------------------------
42         
43         If you obtained this package as an officially released tarball,
44         this is very simple, use configure and make:
45
46                 ./configure --prefix=/usr/local
47                 make
48                 make install
49
50         Mono supports a JIT engine on x86, SPARC, SPARCv9, S/390, AMD64 and PowerPC systems.
51
52         If you obtained this as a snapshot, you will need an existing
53         Mono installation.  To upgrade your installation, unpack both
54         mono and mcs:
55
56                 tar xzf mcs-XXXX.tar.gz
57                 tar xzf mono-XXXX.tar.gz
58                 mv mono-XXX mono
59                 mv mcs-XXX mcs
60                 cd mono
61                 ./autogen.sh --prefix=/usr/local
62                 make
63
64     c. Building the software from SVN
65     ---------------------------------
66
67         If you are building the software from SVN, make sure that you
68         have up-to-date mcs and mono sources:
69
70                 svn co svn+ssh://USER@mono-cvs.ximian.com/source/trunk/mono
71                 svn co svn+ssh://USER@mono-cvs.ximian.com/source/trunk/mcs
72
73         Then, go into the mono directory, and configure:
74
75                 cd mono
76                 ./autogen.sh --prefix=/usr/local
77                 make
78
79         This will automatically go into the mcs/ tree and build the
80         binaries there.
81
82         This assumes that you have a working mono installation, and that
83         there's a C# compiler named 'mcs', and a corresponding IL
84         runtime called 'mono'.  You can use two make variables
85         EXTERNAL_MCS and EXTERNAL_RUNTIME to override these.  e.g., you
86         can say
87
88           make EXTERNAL_MCS=/foo/bar/mcs EXTERNAL_RUNTIME=/somewhere/else/mono
89         
90         If you don't have a working Mono installation
91         ---------------------------------------------
92
93         If you don't have a working Mono installation, an obvious choice
94         is to install the latest released packages of 'mono' for your
95         distribution and try from the beginning.
96
97         You can also try a slightly more risky approach that should work
98         almost all the time.  
99
100         This works by first getting the latest version of the 'monolite'
101         distribution, which contains just enough to run the 'mcs'
102         compiler.  You do this with:
103
104                 make get-monolite-latest
105
106         This will download and automatically gunzip and untar the
107         tarball, and place the files appropriately so that you can then
108         just run:
109
110                 make
111
112         To ensure that you're using the 'monolite' distribution, you can
113         also try passing EXTERNAL_MCS=false on the make command-line.
114
115         Testing and Installation
116          ------------------------
117
118         You can run (part of) the mono and mcs testsuites with the command:
119
120                 make check
121
122         All tests should pass.  
123
124         If you want more extensive tests, including those that test the
125         class libraries, you need to re-run 'configure' with the
126         '--enable-nunit-tests' flag, and try
127
128                 make -k check
129
130         Expect to find a few testsuite failures.  As a sanity check, you
131         can compare the failures you got with
132
133                 http://go-mono.com/tests/displayTestResults.php
134
135         You can now install mono with:
136
137                 make install
138
139         Failure to follow these steps may result in a broken installation. 
140
141 2. Using Mono
142 =============
143
144         Once you have installed the software, you can run a few programs:
145
146         * runtime engine
147
148                 mono program.exe
149
150         * C# compiler
151
152                 mcs program.cs
153
154         * CIL Disassembler
155
156                 monodis program.exe
157
158         See the man pages for mono(1), mint(1), monodis(1) and mcs(2)
159         for further details.
160
161 3. Directory Roadmap
162 ====================
163
164         docs/
165                 Technical documents about the Mono runtime.
166
167         data/
168                 Configuration files installed as part of the Mono runtime.
169
170         mono/
171                 The core of the Mono Runtime.
172
173                 metadata/
174                         The object system and metadata reader.
175
176                 jit/
177                         The Just in Time Compiler.
178
179                 dis/
180                         CIL executable Disassembler
181
182                 cli/
183                         Common code for the JIT and the interpreter.
184
185                 io-layer/
186                         The I/O layer and system abstraction for 
187                         emulating the .NET IO model.
188
189                 cil/
190                         Common Intermediate Representation, XML
191                         definition of the CIL bytecodes.
192
193                 interp/
194                         Interpreter for CLI executables.
195
196                 arch/
197                         Architecture specific portions.
198
199         man/
200
201                 Manual pages for the various Mono commands and programs.
202
203         scripts/
204
205                 Scripts used to invoke Mono and the corresponding program.
206
207         runtime/
208
209                 A directory that contains the Makefiles that link the
210                 mono/ and mcs/ build systems.
211