1 \input texinfo @c -*-texinfo-*-
2 @setfilename compiling.info
3 @settitle Compiling LilyPond on Windows
6 <!--- @@WEB-TITLE@@=Windows Compilation --->
9 @section Obtaining LilyPond
11 You can get the latest version of LilyPond at
12 @uref{ftp://ftp.lilypond.org/pub/LilyPond/,
13 ftp://ftp.lilypond.org/pub/LilyPond/}.
15 @section Windows build requirements
16 You need the following packages to compile Lilypond on Windows.
19 @item The GNU + Cygnus tools, 1.3.6 or newer.
20 Check out the @uref{http://sources.redhat.com/cygwin,Cygwin webpage}.
21 You can get the latest version of the GNU + Cygnus tools from cygnus
22 @uref{http://sources.redhat.com/cygwin/mirrors.html,mirror site}.
23 Install everything, including tetex and texmf.
24 @item GUILE 1.4, or newer.
25 Check out the @uref{http://www.gnu.org/software/guile.html,GUILE
26 webpage}. You may need the patch @file{guile-1.4-gnu-windows.patch}
27 included in LilyPond's source distribution.
30 @subsection Cross compiling
32 These binaries are cross compiled for Windows on a GNU/Linux box. You
33 may want to check out the
34 @uref{http://www.lilypond.org/gnu-windows/cygwin-cross.tar.gz,cross
37 @subsection Compiling on Windows
39 Compiling on Windows should be possible, but how should we now? If you
40 have any experiences you want to share, please do so at
41 @uref{http://lilypond.org/wiki?CompilingOnWindows,Compiling on Windows}.
42 Or write to one of the mailing lists.
44 @section Windows installation specifics
46 Installing LilyPond on Windows is similar to a unix installation, but
47 needs a number of extra tricks. All code for these tricks can be found
48 in the source package directory @file{Documentation/windows}.
51 @item @var{guile-1.4-gnu-windows.patch}
52 You may (Cygwin gets better every day) need this patch to compile GUILE.
53 @item @var{cygwin-installer.patch}
54 Apply this patch to the @file{setup} directory of
55 @file{cygwin-apps/setup}, to get the LilyPond installer.
57 Compiling @file{setup.exe} has been complicated a bit with the
58 introduction of the bzip2 feature. Here's how I did it:
63 mkdir cygwin-20020218 && cd cygwin-20020218
64 export CVSROOT=:pserver:anoncvs@@anoncvs.cygnus.com:/cvs/src
67 cvs -z3 co -D20020218 winsup
68 cd src/winsup/cinstall
69 patch < $HOME/usr/src/lilypond/Documentation/windows/cygwin-installer.patch
70 (cd ../bz2lib; ./configure; make)
72 CYGWIN=$HOME/usr/src/cygwin/cygwin-1.3.6
73 cp $HOME/usr/src/lilypond/Documentation/windows/LilyPond.ico .
74 make w32api_lib=$CYGWIN/usr/lib/w32api \
75 CXX="g++ -L$CYGWIN/usr/lib/mingw"
76 cp -pv setup.exe $CYGWIN/dist/cygwin-1.3.6/new-setup.exe
77 strip $CYGWIN/dist/cygwin-1.3.6/new-setup.exe
82 CYGWIN=$HOME/usr/src/cygwin/cygwin-1.3.10 # where your cygwin lives
84 wget ftp://ftp.sf.net/pub/sourceforge/mingw/gcc-2.95.3-20010828.tar.gz
85 wget ftp://ftp.sf.net/pub/sourceforge/mingw/w32api-1.4.tar.gz
88 tar xzf ../../gcc-2.95.3-20010828.tar.gz
89 tar xzf ../../w32api-1.4.tar.gz
91 rm -f linux-x-cygwin/usr/lib/mingw
92 ln -s ../../../usr/mingw/lib linux-x-cygwin/usr/lib/mingw
93 rm -f linux-x-cygwin/usr/include/mingw
94 ln -s ../../../usr/mingw/include linux-x-cygwin/usr/include/mingw
95 cp usr/lib/mingw/crt2.o linux-x-cygwin/usr/lib/mingw
98 export CVSROOT=:pserver:anoncvs@@anoncvs.cygnus.com:/cvs/cygwin-apps
101 cvs -z3 -r setup-200206 setup
103 patch < $HOME/cvs/lilypond/Documentation/windows/cygwin-installer.patch
104 cp $HOME/cvs/lilypond/Documentation/windows/LilyPond.ico .
105 CPPFLAGS="-I$CYGWIN/usr/include/mingw \
106 -I$CYGWIN/usr/mingw/mingw32/include \
107 -I$CYGWIN/usr/mingw/include/g++-3" \
108 CFLAGS='-mno-cygwin' \
109 CXXFLAGS='-mno-cygwin' \
110 LDFLAGS="-L$CYGWIN/usr/lib/mingw \
111 -L$CYGWIN/usr/mingw/lib/gcc-lib/mingw32/2.95.3-6/" \
112 ./configure --host=i686-pc-mingw32 \
113 --disable-shared --enable-dependencies --enable-maintainer-mode
114 make WINDRES="windres --include-dir $CYGWIN/usr/include/w32api"
115 cp -pv setup.exe $CYGWIN/dist/cygwin-1.3.10/new-setup.exe
116 strip $CYGWIN/dist/cygwin-1.3.10/new-setup.exe
119 @item @var{--prefix=/usr/lilypond-x.y.x}
120 The standard binary installation installs LilyPond into its own prefix.
121 We think it's silly, but do this is on special request of Windows users.
122 @item @file{fix-suffixes.sh}
123 Add @file{.exe} to binary executables.
124 @item @file{/etc/postinstall/}
125 A post installation script that updates a symlink.
126 @item @file{/etc/profile.d/}
127 A number of login profile scripts set environment vars, every time you
128 start the LilyPond/Cygwin shell (or Bash, for that matter).
131 These scripts and tricks are known to work, but may be incomplete. If
132 you find a bug, please send us your fix.
134 Windows users have indicated that a DOS style login (as supposed to the
135 LilyPond/Cygwin shell), would be useful. We don't enjoy DOS scripting,
136 and think users should try the bash shell, which is better suited for
137 typing in commands. It really helps a lot and pays off to read some
138 introduction to this Bash shell. However, if you have written useful
139 DOS login scripts, please send us your code.