]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/topdocs/INSTALL.yo
2faf016ea83c71182c1da70932f25f3b05606919
[lilypond.git] / Documentation / topdocs / INSTALL.yo
1 article(INSTALL - compiling and installing GNU LilyPond)(HWN & JCN)()
2
3 sect(ABSTRACT)
4
5 This document explains what you need to install LilyPond, and what you
6 should do.  If you are going to compile and install LilyPond often,
7 e.g. when doing development, you might want to check out the 
8 file(buildscripts/set-lily.sh) script.  It sets some environment 
9 variables and symlinks, which comes in handly when you have to compile 
10 LilyPond more often.  
11
12 sect(PREREQUISITES)
13
14 For compilation you need:
15
16 itemize(
17 it()A GNU system: GNU LilyPond is known to run on these GNU systems: Linux
18     (PPC, intel), FreeBSD, AIX, NeXTStep, IRIX, Digital Unix and
19 Solaris.
20
21 it()Lots of disk space: LilyPond takes between 50 and 100 mb to
22 compile if you use debugging information.  If you are short on
23 disk-space run configure with code(--disable-debugging).
24
25 Although we recommend to use Unix, LilyPond is known to run on Windows
26 NT/95/98 as well.  See Section ref(w32).
27
28 it() EGCS 1.1 or newer.
29 it() Python 1.5 (Strictly speaking, you shouldn't need Python for 
30    compiling and installing, but you'll need it to regenerate the font
31    tables, e.g.). 
32 it() GUILE 1.3 (no, GUILE 1.2 won't work), check out lurl(http://www.gnu.org/software/guile/guile.html).
33 )
34
35 sect(RUNNING)
36
37 GNU LilyPond does use a lot of resources. For operation you need the
38 following:
39
40 itemize(
41 it()TeX
42 it()A PostScript printer and/or viewer (such as Ghostscript) is strongly
43     recommended.  Xdvi will show all embedded PostScript too if you have
44     Ghostscript installed.
45 it() GUILE 1.3 (no, GUILE 1.2 won't work), check out lurl(http://www.gnu.org/programs/guile.html)
46 )
47
48
49 For running LilyPond successfully you have to help TeX and MetaFont
50 find various files.  The recommended way of doing so is adjusting the
51 environment variables in the start-up scripts of your shell.  An
52 example is given here for the Bourne shell:
53 verb(export MFINPUTS="/usr/local/share/lilypond/mf:"
54 export TEXINPUTS="/usr/local/share/lilypond/tex:"
55 )
56 The empty path component
57 represents TeX() and MetaFont's default search paths.  Scripts with
58 the proper paths for the bourne and C-shell respectively are generated in
59 file(buildscripts/out/lilypond-profile) and
60 file(buildscripts/out/lilypond-login) during compilation.
61
62
63 sect(RECOMMENDED)
64
65 Although not strictly necessary, these are recommended to have.
66
67 itemize(
68 it()GNU make. 
69 Check out lurl(ftp://ftp.gnu.org)
70 or any mirror of this site.
71 it()Flex (version 2.5.4 or newer). 
72 Check out lurl(ftp://ftp.gnu.org)
73 or any mirror of this site.
74 it()Bison (version 1.25 or newer).
75 Check out lurl(ftp://ftp.gnu.org)
76 or any mirror of this site.
77 it() GUILE 1.3 (no, GUILE 1.2 won't work),      check out lurl(http://www.gnu.org/programs/guile.html)
78
79
80 it()Python (version 1.5 or newer).  Check out
81 lurl(ftp://ftp.python.org) or lurl(ftp://ftp.cwi.nl/pub/python).
82
83 it()Yodl.  All documentation will be in Yodl. (1.30.17)
84 lurl(ftp://ftp.lilypond.org/pub/yodl)
85     lurl(http://www.cs.uu.nl/~hanwen/yodl)
86 it()Texinfo. (version 3.12 or newer)
87
88 it()GNU find
89 Check out lurl(ftp://ftp.gnu.org)
90 or any mirror of this site.
91
92 it()The geometry package for LaTeX is needed to use ly2dvi.  
93     Available at 
94 lurl(ftp://ftp.ctan.org/tex-archive/macros/latex/contrib/supported/geometry)
95 or at mirror site lurl(ftp://ftp.dante.de)
96
97 it() A fast computer: a full page of music typically takes 1 minute on my
98     486/133, using the bf(--enable-checking) compile.
99 )
100
101 sect(WEBSITE)
102
103 If you want to auto-generate Lily's website, you'll need some additional
104 conversion tools.
105
106 itemize(
107 it()xpmtoppm (from the Portable Bitmap Utilities) (For RedHat Linux
108              users: it is included within the package libgr-progs).
109 it()Bib2html lurl(http://pertsserver.cs.uiuc.edu/~hull/bib2html.)
110     Which, in turn depends on man2html for proper installation.
111 man2html can be had from lurl(http://askdonald.ask.uni-karlsruhe.de/hppd/hpux/Networking/WWW/Man2html-1.05).
112
113     TeTeX users should not forget to rerun texhash.
114 )
115
116 Building the website requires pnmtopng.  The version of file(pnmtopng)
117 that is distributed with RedHat 5.1 contains a bug (pnmtopng is
118 dynamically linked to the wrong version of libpng).  Recompile it from
119 source, and make sure that the pnmtopng binary is linked statically to
120 the libpng that is included in libgr.
121
122 verb( tar xzf libgr-2.0.13.tar.gz
123       make
124       cd png
125       rm libpng.so*
126       make pnmtopng
127 )
128
129 You can then install the new pnmtopng into /usr/local/bin/
130
131 sect(CONFIGURING and COMPILING)
132
133 to install GNU LilyPond, simply type:
134 verb(
135         gunzip -c lilypond-x.y.z | tar xf -
136         cd lilypond-x.y.z
137         configure               # fill in your standard prefix with --prefix
138         make
139         make install
140 )
141
142 This will install a number of files, something close to:
143 verb(
144         /usr/local/man/man1/mi2mu.1
145         /usr/local/man/man1/convert-mudela.1
146         /usr/local/man/man1/mudela-book.1
147         /usr/local/man/man1/lilypond.1
148         /usr/local/bin/lilypond
149         /usr/local/bin/mi2mu
150         /usr/local/share/lilypond/*
151         /usr/local/share/locale/{it,nl}/LC_MESSAGES/lilypond.mo
152 )
153
154
155 The above assumes that you are root and have the GNU development
156 tools, and your make is GNU make.  If this is not the case, you can
157 adjust your environment variables to your taste:
158
159 verb(
160         export CPPFLAGS="-I /home/me/my_include -DWEIRD_FOOBAR" 
161         configure
162 )
163
164 code(CPPFLAGS) are the preprocessor flags. 
165
166 The configure script is Cygnus configure, and it will accept
167 bf(--help). If you are not root, you will probably have to make it
168 with a different bf(--prefix) option.  Our favourite location is
169
170 verb(
171         configure --prefix=$HOME/usr
172 )
173
174 In this case, you will have to set up MFINPUTS, and TEXINPUTS accordingly.
175
176 Since GNU LilyPond currently is beta, you are advised to also use
177
178 verb(
179         --enable-debugging
180         --enable-checking
181 )
182
183 Options to configure include:
184
185 description(
186 dit(bf(--enable-printing))
187     Enable debugging print routines (lilypond bf(-D) option)
188 dit(bf(--enable-optimise))
189     Set maximum optimisation: compile with bf(-O2).  This can be
190 unreliable on some compiler/platform combinations (eg, DEC Alpha and PPC)
191 dit(bf(--enable-profiling))
192     Compile with support for profiling.
193 dit(bf(--enable-config))
194     Output to a different configuration file.  Needed for multi-platform
195     builds
196 )
197
198 All options are documented in the file(configure) help
199 The option bf(--enable-optimise) is recommended for Real Life usage.
200
201 If you do
202
203 verb(
204         make all
205 )
206
207 everything will be compiled, but nothing will be installed.  The
208 resulting binaries can be found in the subdirectories file(out/) (which
209 contain all files generated during compilation).
210
211 sect(CONFIGURING FOR MULTIPLE PLATFORMS)
212
213 If you want to compile LilyPond with different configuration settings,
214 then, you can use the bf(--enable-config) option.  Example: suppose I
215 want to build with and   without profiling.  Then I'd use the
216 following for the normal build, 
217
218 verb(
219       configure --prefix=~ --disable-optimise --enable-checking
220       make
221       make install
222      )
223
224 and for the profiling version, I specify a different configuration.
225
226 verb(
227       configure --prefix=~ --enable-profiling --enable-config=optprof --enable-optimise --disable-checking
228       make config=optprof
229       make config=optprof install
230 )
231
232
233 sect(INSTALLING)
234
235 If you have done a successful code(make), then a simple
236
237 verb(
238         make install
239 )
240
241 should do the trick.
242
243 If you are doing an upgrade, please remember to remove obsolete
244 file(.pk) and file(.tfm) files of the fonts.  A script has been
245 provided to do the work for you, see file(bin/clean-fonts.sh).
246
247 nsect(CAVEATS)
248
249 itemize(
250 it()The -O2 option  triggers  bugs on various platforms (PowerPC, Alpha).
251     If you experience problems, you  should first try  turning off this.
252 )
253
254 nsect(EXAMPLE)
255
256 This is what I type in my xterm:
257
258 verb(
259         lilypond someinput.ly
260         tex someinput.tex
261         xdvi someinput&
262 )
263
264 This is what the output looks like over here:
265
266 verb(
267         GNU LilyPond 0.0.78 #4/FlowerLib 1.1.24 #0
268         Parsing ... [/home/hw/share/lilypond/init//
269                 <..etc..>
270                 init//performer.ly]]][input/kortjakje.ly]
271         Creating elements ...[8][16][24][25]
272         Preprocessing elements... 
273         Calculating column positions ... [14][25]
274         Postprocessing elements...
275         TeX output to someinput.tex ...
276         Creating MIDI elements ...MIDI output to someinput.midi ...
277
278
279         hw:~/musix/spacer$ xdvi someinput&
280         [1] 855
281 )
282
283 Check out the input files, some of them have comments
284 Please refer to the man page for more information.
285
286 sect(REDHAT LINUX)
287
288 RedHat Linux users can compile an RPM. A spec file is in
289 file(make/out/lilypond.spec), it is distributed along with the
290 sources.
291
292 You can make the rpm by issuing
293 verb(
294         rpm -tb lilypond-x.y.z.tar.gz
295         rpm -i /usr/src/redhat/RPMS/i386/lilypond-x.y.z
296 )
297
298
299 sect(DEBIAN GNU/LINUX)
300
301 A Debian package is also available; contact Anthony Fok
302 email(foka@debian.org).  The build scripts are in the subdirectory
303 file(debian/).
304
305
306 sect(WINDOWS NT/95)
307 label(w32)
308
309
310 Separate instructions on building for W32 are avaible
311 url(in the file README-W32.yo)(../../DOEXPAND(outdir)/README-W32.html).
312
313 sect(AUTHORS)
314
315 nemail(Han-Wen Nienhuys)(hanwen@cs.uu.nl)
316
317 nemail(Jan Nieuwenhuizen)(janneke@gnu.org)
318
319
320 Have fun!