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 No, there's no reason to be concered, Lily should work in
13 Windows-NT(/95/98?) too. The setup may not be easy or smooth. This
14 document will help you getting started.
19 If you have the Cygnus gnu-windows32 port of the GNU utils, LilyPond
20 will work in Windows-NT (/95/98?).
22 We still recommend you use Unix. In particular, use GNU/Linux: We've
23 been there, and we've seen it happen several times. It is @strong{much}
24 easier and quicker to install RedHat Linux and LilyPond than to
25 obtain, compile and install all the necessary tools to compile and run
28 ``Ok, thanks for the suggestions. I can't run Linux or I don't want
29 to run Unix. What can I expect?''
32 @item LilyPond development is moving quite fast, and all developers use Unix.
33 Newly added features may require some attention to get them to work.
34 @item LilyPond depends on a number of other packages that usually are
35 available on Unix boxes, but are not installed by default on Windows.
39 LilyPond will now install/extract in a unix-like tree:
43 usr/[local/]share/lilypond/*
49 Lily runs in a the unix-like Cygnus gnu-windows environment;
50 hopefully Cygnus will adopt the @file{/usr/[local/]} tree too.
53 If you really don't want usr/ in your root directory, but rather scatter
54 your programs and packages all over your harddisk, do something like:
59 unzip ../lilypond-0.1.77.exe.zip
63 and add @file{lilypond/usr/bin} to your @file{PATH} and
64 @file{lilypond/usr/share/lilypond} to your @file{LILYINCLUDE}.
67 If you've received a binary release of LilyPond (@file{.exe.zip}),
68 you may skip the following sections.
71 It can be done! Occasionally, the Cygnus b19.1 cross compiler and
72 utilities under GNU/Linux are used to make the binary @file{.exe.zip}
73 releases (some makefile hacking was needed to build this stuff). Jeffrey
74 Reed tries to keep-up with LilyPond development, and is doing quite
75 well. His latest release is available on
76 @uref{http://home.austin.rr.com/jbr/jeff/lilypond/}.
79 I have heard of such tools that think they're probably much smarter than the
80 packager and thus decide for themselves that they don't need to unpack certain
81 files (e.g., empty directories such as bin/out).
83 To unpack the lilypond sources, you should do something like: @example
85 tar zxf releases/lilypond-x.y.z.tar.gz
90 If you're familiar with the GNU/Cygnus development package, you may skip
96 /start/settings/control-panel/system/environment/system-variables:
97 GCC_EXEC_PREFIX=/Cygnus/b19/H-i386-cygwin32/lib/gcc-lib/
102 You want to run bash, while building Lily:
110 The install instructions mention something like:
119 Now for a small UNIX lesson: The current working directory (cwd) is
120 by default not in your PATH, like it is under DOS (for security reasons).
121 Check this by looking at the output of:
128 The cwd looks like @code{'::'} or @code{':.'}. If it's not there, you may
129 add the cwd to your path:
136 or you must use './' when issuing a command in th cwd, try:
144 My point of reference comes from 15 odd years working with a variety
145 of @code{UNIX} platforms. I am relatively new to Windows-NT and, even
146 though I am a card carrying @code{UNIX} bigot, I am excited about the
147 NT OS. My goals for lilypond are to give back to the Free Software
148 Foundation a little of what they have given me over the years and to
149 contribute to the lilypond project by supporting a Windows-NT port. I
150 hope that someday we can distribute and run lilypond on the NT OS in a
151 much more native fashion.
155 @item Building lilypond on Windows-NT
156 @item Maintaining lilypond on Windows-NT
157 @item Running lilypond on Windows-NT
162 Currently as stated above lilypond is primarily a @code{UNIX} thing.
163 The Windows-NT port is based on the @code{UNIX} environment provided by
164 @uref{http://www.cygnus.com,Cygnus}. Therefore the first step is to
165 download and install the Cygnus development kit:
167 @uref{http://www.cygnus.com/misc/gnu-win32/}
169 Please follow the documentation Cygnus has on there web site for
170 downloading and installing. The important part is that you down load
171 the entire development kit. I believe it is @file{full.exe}. The
172 installation will ask you where you want to install it. I will refer
173 to Cygnus installation directory as @file{/gnuwin32/cygwin-b20}. There
174 should be a @file{README} file that contains installation instructions.
175 After the installation is complete you should have a @emph{Cygnus}
176 shortcut in your @emph{Program} section of your @emph{Start Menu}. This
177 shortcut is your door to the @code{UNIX} world and I will refer to the
178 resulting window as a @file{bash} shell.
180 The shortcut points to @file{/gnuwin32/cygwin-b20/cygnus.bat}. The
181 following is my @file{cygnus.bat} file.
186 rem default environment
188 rem GNU cygnus installation
192 SET LOCAL_ROOT=d:\gnuwin32
193 SET LOCAL_FS=d:/gnuwin32
194 SET LOCAL_DIR=d:/gnuwin32/cygwin-b20
195 SET CYGROOT=%LOCAL_ROOT%\cygwin-b20
196 SET CYGFS=%LOCAL_FS%/cygwin-b20
197 SET TCL_LIBRARY=%CYGROOT%\share\tcl8.0
199 rem This was not in the original but is needed by lots of packages
201 SET BISON_SIMPLE=%CYGFS%/share/bison.simple
204 rem I place the cygnus stuff in front of /WINNT
207 SET PATH=d:\bin;%LOCAL_ROOT%\bin;%CYGROOT%\H-i586-cygwin32\bin;%PATH%
208 SET MANPATH=%LOCAL_ROOT%\man;%LOCAL_ROOT%\cygwin-b20\full-man\man
209 SET INFOPATH=%LOCAL_FS%/cygwin-b20/full-man/info;%LOCAL_FS%/cygwin-b20/info;%LOCAL_DIR%/info
211 rem General tools not included with Cygnus Development Kit
215 SET PATH=%PATH%;%LOCAL_ROOT%\cvs-1.9.28\bin
216 SET INFOPATH=%INFOPATH%;%LOCAL_FS%/cvs-1.9.28/info
217 SET MANPATH=%MANPATH%;%LOCAL_ROOT%\cvs-1.9.28\man
221 SET PATH=%PATH%;%LOCAL_ROOT%\emacs-19.34\bin
222 SET INFOPATH=%INFOPATH%;%LOCAL_FS%/emacs-19.34/info
226 SET VIM=%LOCAL_ROOT%\vim-4.6\doc
227 SET PATH=%PATH%;%LOCAL_ROOT%\vim-4.6
231 SET PATH=%PATH%;%LOCAL_ROOT%\texmf\miktex\bin
235 SET PATH=%PATH%;%LOCAL_ROOT%\a2ps-4.10\bin
236 SET INFOPATH=%INFOPATH%;%LOCAL_FS%/a2ps-4.10/info
237 SET MANPATH=%MANPATH%;%LOCAL_ROOT%\a2ps-4.10\man
241 SET PATH=%PATH%;\Program Files\Python
254 Please look over this carefully. Be careful with the forward and
255 backward slash notations. The paths specified were done for good
256 reasons. Maybe someday we will all be using @code{UNC}. Note the
257 @code{BISON} entry and the @code{PATH} ordering in particular. Also note
258 that the generic @file{cygnus.bat} you will be looking at does not
259 include alot of the packages listed. We will be installing some of
262 The installation also suggests that you create a directory @file{/bin}
263 and copy @file{/gnuwin32/cygwin-b20/H-i586-cygwin32/bin/sh.exe} to
264 @file{/bin}. The @file{sh.exe} shell provided by Cygnus is a descendant
265 of the @file{ash} shell. The @file{sh.exe} shell has improved greatly
266 and is much faster than the @file{bash} shell for script invocations.
267 So this is my recommendation for post installation steps. From a
272 @item @code{mkdir bin}
274 @item @code{cp /gnuwin32/cygwin-b20/H-i586-cygwin32/bin/sh.exe sh.exe}
275 @item @code{cp /gnuwin32/cygwin-b20/H-i586-cygwin32/bin/bash.exe bash.exe}
277 @item @code{mkdir /tmp}
278 @item @code{chmod a+rwx tmp}
279 @item @code{mkdir /etc}
281 @item @code{mkpasswd -l > passwd}
282 @item @code{mkgroup -l > group}
286 There is also some discussion of how you want to @emph{mount} the Cygnus
287 development kit. @emph{mount} is a @code{UNIX} term that refers to the
288 mechanism used to provide a disk resource to the filesystem. Cygnus
289 supplies a mechinism for @emph{mounting} a filesystem as a @code{DOS} like
290 resource or a @code{UNIX} like resource. Among other things this
291 attempts to deal with the text file carriage return line feed on
292 @code{DOS} versus the line feed on @code{UNIX} and the issue that @code{DOS}
293 has two file types, text and binary. Where @code{UNIX} deals with a
294 single streams type. My opinion on this matter currently is to use
295 binary mounts only. This can be accomplished by:
298 @item From a bash shell, umount /
302 If you have other disks that you intend to use for data generated by
303 cygnus tools you will have to mount those devices with the @emph{-b}
307 @uref{http://www.xraylith.wisc.edu/~khan/software/gnu-win32/egcs.html}
309 Cygnus now distributes the ecgs compiler with cygwin-b20.
312 @uref{http://www.gnu.org/order/ftp.html}
314 Considering the origin of the major contributors of lilypond, this is a
315 must. However before we actually do a @strong{GNU} build we have to
316 discuss some caveats of the Windows-NT OS in particular the naming of
317 executable files. @code{Windows-NT} uses a .exe extension where @code{UNIX}
318 does not use an extension. This causes a problem during the
319 installation portion of a @strong{GNU} build. The following script can be
320 used to help alleviate this problem.
326 realinstall=/gnuwin32/cygwin-b20/H-i586-cygwin32/bin/install.exe
334 *) if [ -f $1.exe ]; then
348 I place this in script @file{~/bin}. The LilyPond configure, build,
349 and install process handles this with it's own install script. In
350 addition there are patches to the cygnus install command that also
351 deals with this problem. Having said that, here is how one
352 might build the @emph{gettext} package.
355 @item download the package from one of the ftp sites.
356 @item From a bash shell, cd ~/usr/src.
357 @item tar zxf gettext-0.10.tar.gz
358 @item cd gettext-0.10
359 @item ./configure --prefix=$CYGFS/H-i586-cygwin32
365 @uref{http://www.gnu.org/order/ftp.html}
367 Following the instructions for @emph{gettext} package to download, build,
368 and install the @emph{groff} package.
371 @uref{http://www.python.org}
373 Python is the scripting language of choice for a lilypond build.
374 There is a native @code{Windows-NT} self extracting binary distribution
375 available. I recommend installing Python in a directory that does
376 @strong{not} have spaces. And then place it in the bash shell path by
377 editing $CYGFS/cygnus.bat.
380 @uref{http://www.cpan.org}
382 I believe perl is used in some legacy scripts to date. There is a
383 native @code{Windows-NT} self extracting binary distribution available.
384 I recommend installing Perl in a directory that does @strong{not} have
385 spaces. And then place it in the bash shell path by editing
388 The development methodology of @emph{LilyPond} relies on a the following
403 @item releases/ Downloaded and generated releases live here. For
404 example @file{lilypond-1.1.17.tar.gz}.
406 @item patches/ Downloaded and generated patches live here. For
407 example @file{lilypond-1.1.17.diff.gz}.
409 @item test/ This directory is used to generate releases and patches.
413 I strongly recommend using this file structure to build @emph{yodl} and
417 @item download the package from
418 @uref{http://www.xs4all.nl/~jantien/yodl/} to
419 @file{$HOME/usr/src/releases}.
420 @item From a bash shell, cd @file{$HOME/usr/src}.
421 @item tar zxf releases/yodl-@emph{<version>}.tar.gz
422 @item cd yodl-@emph{<version>}
423 @item ./configure --prefix=/gnuwin32/yodl-@emph{<version>} --srcdir=.
424 Since @emph{yodl} is under development I choose to install it in a
425 version rooted directory. This allows me to test newly released
426 versions without losing a known working version.
430 @item place it in the bash shell path by editing $CYGFS/cygnus.bat.
435 SET PATH=%PATH%;%LOCAL_ROOT%\yodl-1.31.7\bin
444 GUILE, GNU's Ubiquitous Intelligent Language for Extension, is a
445 library that implements the Scheme language plus various convenient
446 facilities. It's designed so that you can link it into an application
447 or utility to make it extensible. GNU's plan is to link this library
448 into all GNU programs that call for extensibility.
451 @item download guile-1.3 patch from
452 @uref{http://home.austin.rr.com/jbr/jeff/lilypond/guile.patch} and save it
453 to @file{/tmp/guile.patch}.
454 @item download guile-1.3 from one of GNU's ftp sites.
455 @item From a bash shell, tar zxf guile-1.3.tar.gz
457 @item patch -p2 < /tmp/guile.patch
458 @item LD=/gnuwin32/cygwin-b20/H-i586-cygwin32/bin/ld \ @*
459 ./configure --prefix=$CYGFS/H-i586-cygwin32
460 @item make sure bin_PROGRAMS macro in libguile/Makefile does @emph{not} have the
461 .exe extension during the build
463 @item make sure bin_PROGRAMS in libguile/Makefile @emph{does} have the
464 .exe extension during the install. Yuck.
470 @item download the package from
471 @uref{http://www.cs.uu.nl/people/hanwen/lilypond/} to
472 @file{$HOME/usr/src/releases}.
473 @item From a bash shell, cd @file{$HOME/usr/src}.
474 @item tar zxf releases/lilypond-@emph{<version>}.tar.gz
475 @item cd lilypond-@emph{<version>}
476 @item ./configure --prefix=/gnuwin32/lilypond-@emph{<version>} \ @*
478 Since @emph{lilypond} is under development I choose to install it in a
479 version rooted directory. This allows me to test newly released
480 versions without losing a known working version.
483 @item place it in the bash shell path by editing $CYGFS/cygnus.bat.
488 SET PATH=%PATH%;%LOCAL_ROOT%\lilypond-1.1.17\bin
496 If you have built @emph{lilypond} on @code{Windows-NT} using the directory
497 and the process described
498 in section FIXME, then you are ready to maintain
499 @emph{lilypond}. It can not be that easy!? Well, there is one caveat.
500 Currently to use the @file{stepmake/bin/release.py} and
501 @file{stepmake/bin/package-diff.py} scripts you need to obtain/build a
502 version of @emph{python} that was built with @strong{Cygnus} development kit.
503 The process I used is as follows:
506 @item obtain python source from @uref{http://www.python.org}
507 @item tar zxf /tmp/python-@emph{<version>}.tar.gz
508 @item cd python-@emph{<version>}
509 @item configure --prefix=/gnuwin32/Python-@emph{<version>}
510 @item edit toplevel @file{Makefile} @code{EXE} macro so it reads @code{EXE=.exe}
513 @item place it in the bash shell path by editing $CYGFS/cygnus.bat.
518 SET PATH=%PATH%;%LOCAL_ROOT%\python-1.5.1\bin
525 I choose to build @emph{lilypond} with the standard @code{Windows-NT}
526 @emph{python} and use the @strong{Cygnus} version for using the release
527 scripts. This way I can make sure the @code{Windows-NT} @emph{python}
528 version is able to build @emph{lilypond}. Currently there are several
529 issues with the release scripts. Using @code{os.link} and
530 @code{os.system(set -x;...)} are to name a few.
532 To generate a new release and patch you must use the directory
534 instructions found in @file{PATCH.txt}. Editing
535 @file{Documentation/AUTHORS.yo}, @file{VERSION}, and @file{NEWS} is also
536 required. When my edits are complete and tested I:
539 @item Edit @file{config.make} and change @emph{python} path to the
540 @strong{Cygnus} version: @code{PYTHON=/gnuwin32/Python-1.5.1/bin/python}.
544 The new release is placed in @file{releases} directory and the patch is
545 placed in the @file{patches} directory. I email the new patch to
546 @email{gnu-music-discuss@@gnu.org}. More than one patch a day can be
550 @item cd $HOME/usr/src
551 @item tar zxf releases/lilypond-@emph{<version>}.@emph{<patchlevel>}
552 @item use your normal configure
554 @item Change @file{VERSION} to increment @emph{<patchlevel>}
555 @item Change @file{NEWS}
560 We are now distributing a formated binary distribution for
561 Windows-NT. Please refer to
562 @uref{http://home.austin.rr.com/jbr/jeff/lilypond/} for current news,
563 download, installation, and running information.
565 Jeffrey B. Reed @email{daboys@@austin.rr.com}
567 @section RUNNING LILYPOND -- by Dominique Cretel
569 You may want to refer to section FIXME, for more current
570 information about downloading, installing, and running the Windows-NT
574 @item First, I have download tha 0.1.64 version of LilyPond music software.
576 @item Then I extract it in a temp directory, and I move the directory
577 "lilypond-0.1.64" to the root directory of my D drive.
579 @item I go to the D:\Lilypond-0.1.64\tex directory to modify the
580 lilyponddefs.tex file (lines 75 and 84), and comment all
581 cmbx15 ans cmbx14, and replace them by cmbx12.
583 @item build a command file like this:
584 Note: I use MiKTeX to process the tex file generated.
591 set path=%path%;d:\lilypond-%ver%\bin
592 lilypond -I d:\lilypond-%ver%\init %1
595 set path=c:\texmf\miktex\bin;%path%
596 set TEXINPUTS=%TEXINPUTS%;d:\lilypond-%ver%\tex
597 set MFINPUTS=%MFINPUTS%;d:\lilypond-%ver%\mf
604 set path=%path%;d:\gstools\gsview
610 @item execute lilypond by doing:
621 You'll better have to put the SET commands lines in a separate command
622 file to avoid consumming each time environnment ressources.
625 Dominique Cretel @email{dominique.cretel@@cfwb.be}
627 @section PROBLEMS AND ANWSWERS
629 This is all to confusing. I have:
631 @item downloaded @file{/tmp/lilypond-0.1.78.tar.gz}
640 tar zxf /tmp/lilypond-0.1.78.tar.gz
646 ./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
664 I did have a problem with lilypond.info. And I will look into this
665 further. After mending lilypond.info issue, it compiled and install
668 I have 64 Meg of physical memory and 64 Meg of swap. Actually I need
669 to increase the swap space. If a memory problem is occuring it most
670 likely is during the link process of lilypond. There is a boat load
673 Jan the mount -b stuff is confussing to me. I have the entire system
674 mounted _without_ -b and only use -b on certain paths for programs
675 that create binary files that do not use O_BINARY open option. By the
676 way the midi file open is one of these cases, I need to look into
677 that. I have had no problems with this methodology.
680 The windows multiroot filesystem is an utterly broken concept. Please
681 do everything on one (urg) drive, C:.
686 > creating cache ./config.cache
688 > creating config.make
690 > cd: lstat /d failed
694 Ok, this looks like another stupid windows problem.
695 You're working on 'drive D:', right?
697 I can think of some solutions, but i don't know if they work;
698 i just had to do some work in windows some time ago. If you
699 have problems with this, please ask @email{gnu-win32@@cygnus.com}.
700 I'll start with the simplest:
702 @item do everything on drive C:, or
703 @item explicitely mount drive d:, work from there:
708 cd /mnt/d/lilypond-x.y.z/
712 @item make d:/ the root of cygnus, in cmd.exe/command.exe do:
723 > - First I have installed Python (for win32) "Pyth151.exe" and "Configure
725 > don't find it. I had to put it in the path for configure find it?
728 Yes, of course. It should be possible to have different versions of tools
729 installed (e.g. perl 4 and perl 5). The best way to tell people (or tools
730 like configure) which one to use is to put it in the path?
732 Another small unix lesson: Where under dos each program installs itself
733 into a nice directory
740 under unix, installation is handled centrally. Executables go in
741 @file{/usr/bin} (or @file{/usr/local/bin}), and are always in your path.
746 > 4. make -C lily don't work. I get an error (see below). I get several
747 > object files in the ./lily/out directory (34 files: 17 *.dep, 16 *.o,
750 > include/engraver-group.hh:35: virtual memory exhausted
751 > make: *** [out/bar-grav.o] Error 1
757 Ok, so everything works now, there's only some error with one of the
758 source files. Lets see which one (and now the cc's now why they're
761 It looks like you've run out of memory. You should compile without
762 optimisation, gcc/egcs need a lot of memory for optimising.
763 Reconfigure without optimisation:
766 configure --disable-optimise
770 or edit @file{config.make}:
773 ## USER_CXXFLAGS = -g # -O no optimise!
778 There are some other things to look at: how much RAM do you have
779 (please say something > 8Mb :-)? Although it might be an egcs bug,
780 you should have a look at the size of your swap file.
781 For an US version of windows, you should find it here:
784 /start/settings/control-panel/system/performance/virtual-memory
788 you see, amongst others, these entries:
791 paging file size for selected drive:
797 total paging file size for all drives
799 currently allocated: xx
813 @item maximum-size >= 128 Mb
814 @item urrently-allocated + space-available >= 128 Mb