1 \input texinfo @c -*-texinfo-*-
2 @setfilename README-W32.info
3 @settitle LilyPond on W32
8 @chapter LilyPond on W32
10 FIXME: remove yodl refs.
12 [FIXME: THIS DOCUMENTED IS OUTDATED]
14 No, there's no reason to be concered, Lily should work in
15 Windows-NT(/95/98?) too. The setup may not be easy or smooth. This
16 document will help you getting started.
21 If you have the Cygnus gnu-windows32 port of the GNU utils, LilyPond
22 will work in Windows-NT (/95/98?).
24 We still recommend you use Unix. In particular, use GNU/Linux: We've
25 been there, and we've seen it happen several times. It is @strong{much}
26 easier and quicker to install RedHat Linux and LilyPond than to
27 obtain, compile and install all the necessary tools to compile and run
30 ``Ok, thanks for the suggestions. I can't run Linux or I don't want
31 to run Unix. What can I expect?''
34 @item LilyPond development is moving quite fast, and all developers use Unix.
35 Newly added features may require some attention to get them to work.
36 @item LilyPond depends on a number of other packages that usually are
37 available on Unix boxes, but are not installed by default on Windows.
41 LilyPond will now install/extract in a unix-like tree:
45 usr/[local/]share/lilypond/*
51 Lily runs in a the unix-like Cygnus gnu-windows environment;
52 hopefully Cygnus will adopt the @file{/usr/[local/]} tree too.
55 If you really don't want usr/ in your root directory, but rather scatter
56 your programs and packages all over your harddisk, do something like:
61 unzip ../lilypond-0.1.77.exe.zip
65 and add @file{lilypond/usr/bin} to your @file{PATH} and
66 @file{lilypond/usr/share/lilypond} to your @file{LILYINCLUDE}.
69 If you've received a binary release of LilyPond (@file{.exe.zip}),
70 you may skip the following sections.
73 It can be done! Occasionally, the Cygnus b19.1 cross compiler and
74 utilities under GNU/Linux are used to make the binary @file{.exe.zip}
75 releases (some makefile hacking was needed to build this stuff). Jeffrey
76 Reed tries to keep-up with LilyPond development, and is doing quite
77 well. His latest release is available on
78 @uref{http://home.austin.rr.com/jbr/jeff/lilypond/}.
81 I have heard of such tools that think they're probably much smarter than the
82 packager and thus decide for themselves that they don't need to unpack certain
83 files (e.g., empty directories such as bin/out).
85 To unpack the lilypond sources, you should do something like: @example
87 tar zxf releases/lilypond-x.y.z.tar.gz
92 If you're familiar with the GNU/Cygnus development package, you may skip
98 /start/settings/control-panel/system/environment/system-variables:
99 GCC_EXEC_PREFIX=/Cygnus/b19/H-i386-cygwin32/lib/gcc-lib/
104 You want to run bash, while building Lily:
112 The install instructions mention something like:
121 Now for a small UNIX lesson: The current working directory (cwd) is
122 by default not in your PATH, like it is under DOS (for security reasons).
123 Check this by looking at the output of:
130 The cwd looks like @code{'::'} or @code{':.'}. If it's not there, you may
131 add the cwd to your path:
138 or you must use './' when issuing a command in th cwd, try:
146 My point of reference comes from 15 odd years working with a variety
147 of @code{UNIX} platforms. I am relatively new to Windows-NT and, even
148 though I am a card carrying @code{UNIX} bigot, I am excited about the
149 NT OS. My goals for lilypond are to give back to the Free Software
150 Foundation a little of what they have given me over the years and to
151 contribute to the lilypond project by supporting a Windows-NT port. I
152 hope that someday we can distribute and run lilypond on the NT OS in a
153 much more native fashion.
157 @item Building lilypond on Windows-NT
158 @item Maintaining lilypond on Windows-NT
159 @item Running lilypond on Windows-NT
164 Currently as stated above lilypond is primarily a @code{UNIX} thing.
165 The Windows-NT port is based on the @code{UNIX} environment provided by
166 @uref{http://www.cygnus.com,Cygnus}. Therefore the first step is to
167 download and install the Cygnus development kit:
169 @uref{http://www.cygnus.com/misc/gnu-win32/}
171 Please follow the documentation Cygnus has on there web site for
172 downloading and installing. The important part is that you down load
173 the entire development kit. I believe it is @file{full.exe}. The
174 installation will ask you where you want to install it. I will refer
175 to Cygnus installation directory as @file{/gnuwin32/cygwin-b20}. There
176 should be a @file{README} file that contains installation instructions.
177 After the installation is complete you should have a @emph{Cygnus}
178 shortcut in your @emph{Program} section of your @emph{Start Menu}. This
179 shortcut is your door to the @code{UNIX} world and I will refer to the
180 resulting window as a @file{bash} shell.
182 The shortcut points to @file{/gnuwin32/cygwin-b20/cygnus.bat}. The
183 following is my @file{cygnus.bat} file.
188 rem default environment
190 rem GNU cygnus installation
194 SET LOCAL_ROOT=d:\gnuwin32
195 SET LOCAL_FS=d:/gnuwin32
196 SET LOCAL_DIR=d:/gnuwin32/cygwin-b20
197 SET CYGROOT=%LOCAL_ROOT%\cygwin-b20
198 SET CYGFS=%LOCAL_FS%/cygwin-b20
199 SET TCL_LIBRARY=%CYGROOT%\share\tcl8.0
201 rem This was not in the original but is needed by lots of packages
203 SET BISON_SIMPLE=%CYGFS%/share/bison.simple
206 rem I place the cygnus stuff in front of /WINNT
209 SET PATH=d:\bin;%LOCAL_ROOT%\bin;%CYGROOT%\H-i586-cygwin32\bin;%PATH%
210 SET MANPATH=%LOCAL_ROOT%\man;%LOCAL_ROOT%\cygwin-b20\full-man\man
211 SET INFOPATH=%LOCAL_FS%/cygwin-b20/full-man/info;%LOCAL_FS%/cygwin-b20/info;%LOCAL_DIR%/info
213 rem General tools not included with Cygnus Development Kit
217 SET PATH=%PATH%;%LOCAL_ROOT%\cvs-1.9.28\bin
218 SET INFOPATH=%INFOPATH%;%LOCAL_FS%/cvs-1.9.28/info
219 SET MANPATH=%MANPATH%;%LOCAL_ROOT%\cvs-1.9.28\man
223 SET PATH=%PATH%;%LOCAL_ROOT%\emacs-19.34\bin
224 SET INFOPATH=%INFOPATH%;%LOCAL_FS%/emacs-19.34/info
228 SET VIM=%LOCAL_ROOT%\vim-4.6\doc
229 SET PATH=%PATH%;%LOCAL_ROOT%\vim-4.6
233 SET PATH=%PATH%;%LOCAL_ROOT%\texmf\miktex\bin
237 SET PATH=%PATH%;%LOCAL_ROOT%\a2ps-4.10\bin
238 SET INFOPATH=%INFOPATH%;%LOCAL_FS%/a2ps-4.10/info
239 SET MANPATH=%MANPATH%;%LOCAL_ROOT%\a2ps-4.10\man
243 SET PATH=%PATH%;\Program Files\Python
256 Please look over this carefully. Be careful with the forward and
257 backward slash notations. The paths specified were done for good
258 reasons. Maybe someday we will all be using @code{UNC}. Note the
259 @code{BISON} entry and the @code{PATH} ordering in particular. Also note
260 that the generic @file{cygnus.bat} you will be looking at does not
261 include alot of the packages listed. We will be installing some of
264 The installation also suggests that you create a directory @file{/bin}
265 and copy @file{/gnuwin32/cygwin-b20/H-i586-cygwin32/bin/sh.exe} to
266 @file{/bin}. The @file{sh.exe} shell provided by Cygnus is a descendant
267 of the @file{ash} shell. The @file{sh.exe} shell has improved greatly
268 and is much faster than the @file{bash} shell for script invocations.
269 So this is my recommendation for post installation steps. From a
274 @item @code{mkdir bin}
276 @item @code{cp /gnuwin32/cygwin-b20/H-i586-cygwin32/bin/sh.exe sh.exe}
277 @item @code{cp /gnuwin32/cygwin-b20/H-i586-cygwin32/bin/bash.exe bash.exe}
279 @item @code{mkdir /tmp}
280 @item @code{chmod a+rwx tmp}
281 @item @code{mkdir /etc}
283 @item @code{mkpasswd -l > passwd}
284 @item @code{mkgroup -l > group}
288 There is also some discussion of how you want to @emph{mount} the Cygnus
289 development kit. @emph{mount} is a @code{UNIX} term that refers to the
290 mechanism used to provide a disk resource to the filesystem. Cygnus
291 supplies a mechinism for @emph{mounting} a filesystem as a @code{DOS} like
292 resource or a @code{UNIX} like resource. Among other things this
293 attempts to deal with the text file carriage return line feed on
294 @code{DOS} versus the line feed on @code{UNIX} and the issue that @code{DOS}
295 has two file types, text and binary. Where @code{UNIX} deals with a
296 single streams type. My opinion on this matter currently is to use
297 binary mounts only. This can be accomplished by:
300 @item From a bash shell, umount /
304 If you have other disks that you intend to use for data generated by
305 cygnus tools you will have to mount those devices with the @emph{-b}
309 @uref{http://www.xraylith.wisc.edu/~khan/software/gnu-win32/egcs.html}
311 Cygnus now distributes the ecgs compiler with cygwin-b20.
314 @uref{http://www.gnu.org/order/ftp.html}
316 Considering the origin of the major contributors of lilypond, this is a
317 must. However before we actually do a @strong{GNU} build we have to
318 discuss some caveats of the Windows-NT OS in particular the naming of
319 executable files. @code{Windows-NT} uses a .exe extension where @code{UNIX}
320 does not use an extension. This causes a problem during the
321 installation portion of a @strong{GNU} build. The following script can be
322 used to help alleviate this problem.
328 realinstall=/gnuwin32/cygwin-b20/H-i586-cygwin32/bin/install.exe
336 *) if [ -f $1.exe ]; then
350 I place this in script @file{~/bin}. The LilyPond configure, build,
351 and install process handles this with it's own install script. In
352 addition there are patches to the cygnus install command that also
353 deals with this problem. Having said that, here is how one
354 might build the @emph{gettext} package.
357 @item download the package from one of the ftp sites.
358 @item From a bash shell, cd ~/usr/src.
359 @item tar zxf gettext-0.10.tar.gz
360 @item cd gettext-0.10
361 @item ./configure --prefix=$CYGFS/H-i586-cygwin32
367 @uref{http://www.gnu.org/order/ftp.html}
369 Following the instructions for @emph{gettext} package to download, build,
370 and install the @emph{groff} package.
373 @uref{http://www.python.org}
375 Python is the scripting language of choice for a lilypond build.
376 There is a native @code{Windows-NT} self extracting binary distribution
377 available. I recommend installing Python in a directory that does
378 @strong{not} have spaces. And then place it in the bash shell path by
379 editing $CYGFS/cygnus.bat.
382 @uref{http://www.cpan.org}
384 I believe perl is used in some legacy scripts to date. There is a
385 native @code{Windows-NT} self extracting binary distribution available.
386 I recommend installing Perl in a directory that does @strong{not} have
387 spaces. And then place it in the bash shell path by editing
390 The development methodology of @emph{LilyPond} relies on a the following
405 @item releases/ Downloaded and generated releases live here. For
406 example @file{lilypond-1.1.17.tar.gz}.
408 @item patches/ Downloaded and generated patches live here. For
409 example @file{lilypond-1.1.17.diff.gz}.
411 @item test/ This directory is used to generate releases and patches.
415 I strongly recommend using this file structure to build @emph{yodl} and
419 @item download the package from
420 @uref{http://www.xs4all.nl/~jantien/yodl/} to
421 @file{$HOME/usr/src/releases}.
422 @item From a bash shell, cd @file{$HOME/usr/src}.
423 @item tar zxf releases/yodl-@emph{<version>}.tar.gz
424 @item cd yodl-@emph{<version>}
425 @item ./configure --prefix=/gnuwin32/yodl-@emph{<version>} --srcdir=.
426 Since @emph{yodl} is under development I choose to install it in a
427 version rooted directory. This allows me to test newly released
428 versions without losing a known working version.
432 @item place it in the bash shell path by editing $CYGFS/cygnus.bat.
437 SET PATH=%PATH%;%LOCAL_ROOT%\yodl-1.31.7\bin
446 GUILE, GNU's Ubiquitous Intelligent Language for Extension, is a
447 library that implements the Scheme language plus various convenient
448 facilities. It's designed so that you can link it into an application
449 or utility to make it extensible. GNU's plan is to link this library
450 into all GNU programs that call for extensibility.
453 @item download guile-1.3 patch from
454 @uref{http://home.austin.rr.com/jbr/jeff/lilypond/guile.patch} and save it
455 to @file{/tmp/guile.patch}.
456 @item download guile-1.3 from one of GNU's ftp sites.
457 @item From a bash shell, tar zxf guile-1.3.tar.gz
459 @item patch -p2 < /tmp/guile.patch
460 @item LD=/gnuwin32/cygwin-b20/H-i586-cygwin32/bin/ld \ @*
461 ./configure --prefix=$CYGFS/H-i586-cygwin32
462 @item make sure bin_PROGRAMS macro in libguile/Makefile does @emph{not} have the
463 .exe extension during the build
465 @item make sure bin_PROGRAMS in libguile/Makefile @emph{does} have the
466 .exe extension during the install. Yuck.
472 @item download the package from
473 @uref{http://www.cs.uu.nl/people/hanwen/lilypond/} to
474 @file{$HOME/usr/src/releases}.
475 @item From a bash shell, cd @file{$HOME/usr/src}.
476 @item tar zxf releases/lilypond-@emph{<version>}.tar.gz
477 @item cd lilypond-@emph{<version>}
478 @item ./configure --prefix=/gnuwin32/lilypond-@emph{<version>} \ @*
480 Since @emph{lilypond} is under development I choose to install it in a
481 version rooted directory. This allows me to test newly released
482 versions without losing a known working version.
485 @item place it in the bash shell path by editing $CYGFS/cygnus.bat.
490 SET PATH=%PATH%;%LOCAL_ROOT%\lilypond-1.1.17\bin
498 If you have built @emph{lilypond} on @code{Windows-NT} using the directory
499 and the process described
500 in section FIXME, then you are ready to maintain
501 @emph{lilypond}. It can not be that easy!? Well, there is one caveat.
502 Currently to use the @file{stepmake/bin/release.py} and
503 @file{stepmake/bin/package-diff.py} scripts you need to obtain/build a
504 version of @emph{python} that was built with @strong{Cygnus} development kit.
505 The process I used is as follows:
508 @item obtain python source from @uref{http://www.python.org}
509 @item tar zxf /tmp/python-@emph{<version>}.tar.gz
510 @item cd python-@emph{<version>}
511 @item configure --prefix=/gnuwin32/Python-@emph{<version>}
512 @item edit toplevel @file{Makefile} @code{EXE} macro so it reads @code{EXE=.exe}
515 @item place it in the bash shell path by editing $CYGFS/cygnus.bat.
520 SET PATH=%PATH%;%LOCAL_ROOT%\python-1.5.1\bin
527 I choose to build @emph{lilypond} with the standard @code{Windows-NT}
528 @emph{python} and use the @strong{Cygnus} version for using the release
529 scripts. This way I can make sure the @code{Windows-NT} @emph{python}
530 version is able to build @emph{lilypond}. Currently there are several
531 issues with the release scripts. Using @code{os.link} and
532 @code{os.system(set -x;...)} are to name a few.
534 To generate a new release and patch you must use the directory
536 instructions found in @file{PATCH.txt}. Editing
537 @file{Documentation/AUTHORS.yo}, @file{VERSION}, and @file{NEWS} is also
538 required. When my edits are complete and tested I:
541 @item Edit @file{config.make} and change @emph{python} path to the
542 @strong{Cygnus} version: @code{PYTHON=/gnuwin32/Python-1.5.1/bin/python}.
546 The new release is placed in @file{releases} directory and the patch is
547 placed in the @file{patches} directory. I email the new patch to
548 @email{gnu-music-discuss@@gnu.org}. More than one patch a day can be
552 @item cd $HOME/usr/src
553 @item tar zxf releases/lilypond-@emph{<version>}.@emph{<patchlevel>}
554 @item use your normal configure
556 @item Change @file{VERSION} to increment @emph{<patchlevel>}
557 @item Change @file{NEWS}
562 We are now distributing a formated binary distribution for
563 Windows-NT. Please refer to
564 @uref{http://home.austin.rr.com/jbr/jeff/lilypond/} for current news,
565 download, installation, and running information.
567 Jeffrey B. Reed @email{daboys@@austin.rr.com}
569 @section RUNNING LILYPOND -- by Dominique Cretel
571 You may want to refer to section FIXME, for more current
572 information about downloading, installing, and running the Windows-NT
576 @item First, I have download tha 0.1.64 version of LilyPond music software.
578 @item Then I extract it in a temp directory, and I move the directory
579 "lilypond-0.1.64" to the root directory of my D drive.
581 @item I go to the D:\Lilypond-0.1.64\tex directory to modify the
582 lilyponddefs.tex file (lines 75 and 84), and comment all
583 cmbx15 ans cmbx14, and replace them by cmbx12.
585 @item build a command file like this:
586 Note: I use MiKTeX to process the tex file generated.
593 set path=%path%;d:\lilypond-%ver%\bin
594 lilypond -I d:\lilypond-%ver%\init %1
597 set path=c:\texmf\miktex\bin;%path%
598 set TEXINPUTS=%TEXINPUTS%;d:\lilypond-%ver%\tex
599 set MFINPUTS=%MFINPUTS%;d:\lilypond-%ver%\mf
606 set path=%path%;d:\gstools\gsview
612 @item execute lilypond by doing:
623 You'll better have to put the SET commands lines in a separate command
624 file to avoid consumming each time environnment ressources.
627 Dominique Cretel @email{dominique.cretel@@cfwb.be}
629 @section PROBLEMS AND ANWSWERS
631 This is all to confusing. I have:
633 @item downloaded @file{/tmp/lilypond-0.1.78.tar.gz}
642 tar zxf /tmp/lilypond-0.1.78.tar.gz
648 ./configure --prefix=/users/jeff/lilypond-0.1.78 \--enable-tex-prefix=/users/jeff/lilypond-0.1.78/texmf \--enable-tex-dir=/users/jeff/lilypond-0.1.78/texmf/tex \--enable-mf-dir=/users/jeff/lilypond-0.1.78/texmf/mf
666 I did have a problem with lilypond.info. And I will look into this
667 further. After mending lilypond.info issue, it compiled and install
670 I have 64 Meg of physical memory and 64 Meg of swap. Actually I need
671 to increase the swap space. If a memory problem is occuring it most
672 likely is during the link process of lilypond. There is a boat load
675 Jan the mount -b stuff is confussing to me. I have the entire system
676 mounted _without_ -b and only use -b on certain paths for programs
677 that create binary files that do not use O_BINARY open option. By the
678 way the midi file open is one of these cases, I need to look into
679 that. I have had no problems with this methodology.
682 The windows multiroot filesystem is an utterly broken concept. Please
683 do everything on one (urg) drive, C:.
688 > creating cache ./config.cache
690 > creating config.make
692 > cd: lstat /d failed
696 Ok, this looks like another stupid windows problem.
697 You're working on 'drive D:', right?
699 I can think of some solutions, but i don't know if they work;
700 i just had to do some work in windows some time ago. If you
701 have problems with this, please ask @email{gnu-win32@@cygnus.com}.
702 I'll start with the simplest:
704 @item do everything on drive C:, or
705 @item explicitely mount drive d:, work from there:
710 cd /mnt/d/lilypond-x.y.z/
714 @item make d:/ the root of cygnus, in cmd.exe/command.exe do:
725 > - First I have installed Python (for win32) "Pyth151.exe" and "Configure
727 > don't find it. I had to put it in the path for configure find it?
730 Yes, of course. It should be possible to have different versions of tools
731 installed (e.g. perl 4 and perl 5). The best way to tell people (or tools
732 like configure) which one to use is to put it in the path?
734 Another small unix lesson: Where under dos each program installs itself
735 into a nice directory
742 under unix, installation is handled centrally. Executables go in
743 @file{/usr/bin} (or @file{/usr/local/bin}), and are always in your path.
748 > 4. make -C lily don't work. I get an error (see below). I get several
749 > object files in the ./lily/out directory (34 files: 17 *.dep, 16 *.o,
752 > include/engraver-group.hh:35: virtual memory exhausted
753 > make: *** [out/bar-grav.o] Error 1
759 Ok, so everything works now, there's only some error with one of the
760 source files. Lets see which one (and now the cc's now why they're
763 It looks like you've run out of memory. You should compile without
764 optimisation, gcc/egcs need a lot of memory for optimising.
765 Reconfigure without optimisation:
768 configure --disable-optimise
772 or edit @file{config.make}:
775 ## USER_CXXFLAGS = -g # -O no optimise!
780 There are some other things to look at: how much RAM do you have
781 (please say something > 8Mb :-)? Although it might be an egcs bug,
782 you should have a look at the size of your swap file.
783 For an US version of windows, you should find it here:
786 /start/settings/control-panel/system/performance/virtual-memory
790 you see, amongst others, these entries:
793 paging file size for selected drive:
799 total paging file size for all drives
801 currently allocated: xx
815 @item maximum-size >= 128 Mb
816 @item urrently-allocated + space-available >= 128 Mb