]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.147.jcn1
authorJan Nieuwenhuizen <janneke@gnu.org>
Wed, 11 Apr 2001 23:19:22 +0000 (01:19 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Wed, 11 Apr 2001 23:19:22 +0000 (01:19 +0200)
1.3.147.jcn1
============

* Fixed windows documentation.

* Filled in tutorial section on windows.

* Ly2dvi: don't use posix file utilities if we have python >= 1.5.2.

* Included additional cygwin login and wrapper scripts.

* Added cygwin path conversion to file-path.cc, to get output in cwd.
After upgrading cross compilation environment to cygwin-1.1.8-2, it
seems that these are no longer necessary; disabled by default.

1.3.147
=======

25 files changed:
CHANGES
Documentation/index.texi
Documentation/topdocs/WINDOWS.texi
Documentation/user/tutorial.itely
Documentation/windows/GNUmakefile
Documentation/windows/babysit.texi [new file with mode: 0644]
Documentation/windows/cygwin-installer.patch
Documentation/windows/gv.sh
Documentation/windows/lily-python.sh [new file with mode: 0644]
Documentation/windows/lily-tex.sh [new file with mode: 0644]
Documentation/windows/lily-wins.texi [new file with mode: 0644]
Documentation/windows/lilypond-profile.z.sh [new file with mode: 0644]
Documentation/windows/ly2dvi-wrapper.sh [new file with mode: 0644]
Documentation/windows/ly2dvi.sh
VERSION
flower/file-path.cc
lily/include/main.hh
lily/include/scm-option.hh [new file with mode: 0644]
lily/main.cc
lily/midi-item.cc
lily/midi-stream.cc
lily/scheme-option.cc
lily/scm-option.cc [new file with mode: 0644]
scripts/ly2dvi.py
scripts/update-lily.py

diff --git a/CHANGES b/CHANGES
index 0eefa79a9943d5ab1da98d955bc26cfec758447b..72920d20de555cc497340c08fc5687c897646d29 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,21 @@
+1.3.147.jcn1
+============
+
+* Fixed windows documentation.
+
+* Filled in tutorial section on windows.
+
+* Ly2dvi: don't use posix file utilities if we have python >= 1.5.2.
+
+* Included additional cygwin login and wrapper scripts.
+
+* Added cygwin path conversion to file-path.cc, to get output in cwd.
+After upgrading cross compilation environment to cygwin-1.1.8-2, it
+seems that these are no longer necessary; disabled by default.
+
+1.3.147
+=======
+
 1.3.146.jcn4
 ============
 
index 2b895d9379e357f782fdec0c2de94c9bfaa0f5ce..ae488127bed5e07b52daeaf5365693cfc01ba629 100644 (file)
@@ -75,7 +75,6 @@ by computer}.
 
 
 @itemize @bullet
-@item @uref{README-W32.html,Compiling and running on Windows32}
 @item @uref{../misc/out-www/CHANGES-0.0.html, Change logs from 0.0 till 0.1 }
 @item @uref{../misc/out-www/CHANGES-0.1.html, Change logs from 0.1 till 1.0 }
 @item @uref{../misc/out-www/CHANGES-1.0.html, Change logs from 1.0 till 1.1 }
@@ -90,6 +89,7 @@ changes)}
 @item @uref{../misc/out-www/ANNOUNCE-1.2.html, Announcement of 1.2 (includes summary of changes)}
 @item @uref{../misc/out-www/AIMS.html, Why LilyPond?}
 @item @uref{../misc/out-www/interview.html, Answers} to the Brave GNU world standard questions.
+@item @uref{../windows/out-www/lily-wins.html, Lily Wins}
 @end itemize
 
 
index 1a17d08fe6a17f57ba86b02b40231f0bbbee2ec7..f4629b1893790864961a12403bda21713afe2984 100644 (file)
@@ -22,12 +22,14 @@ You need the following packages to compile Lilypond on Windows.
 @table @code
 @item The GNU + Cygnus tools, 1.1.7 or newer.
 Check out the @uref{http://sources.redhat.com/cygwin,Cygwin webpage}.
-@item GUILE 1.4, or newer.
-Check out the @uref{http://www.gnu.org/software/guile.html,GUILE webpage}
-@end table
-
 You can get the latest version of the GNU + Cygnus tools from cygnus
 @uref{http://sources.redhat.com/cygwin/mirrors.html,mirror site}.
+Install everything, including tetex.
+@item GUILE 1.4, or newer.
+Check out the @uref{http://www.gnu.org/software/guile.html,GUILE
+webpage}.  You may need the patch @file{guile-1.4-gnu-windows.patch}
+included in LilyPond's source distribution.
+@end table
 
 @section Windows precompiled binaries
 
@@ -39,8 +41,10 @@ LilyPond on Windows}.
 
 This will install the minimal set of cygwin tools needed to run
 LilyPond.  If you already have cygwin installed, don't worry: nothing
-will be installed twice.
-
+will be installed twice.  To expand on this minimal set, click
+@uref{http://sources.redhat.com/cygwin/setup.exe,here},
+or visit a Cygwin
+@uref{http://sources.redhat.com/cygwin/mirrors.html,mirror site}.
 @end table
 
 Note that none of the developers uses Windows, of course.  In fact, we
@@ -50,7 +54,7 @@ users trying to compile LilyPond themselves.
 
 These binaries are cross compiled for Windows on a GNU/Linux box.  You
 may want to check out the
-@uref{http://appel.lilypond.org/lilypond/gnu-windows/cross.tar.gz,cross
+@uref{http://appel.lilypond.org/lilypond/gnu-windows/cross-1.1.8.tar.gz,cross
 compilation scripts}.
 
 @section Windows running requirements
@@ -62,11 +66,29 @@ following software
 @item GUILE
 Included in binary installation.
 @item TeX
-A full TeX installation.  See /usr/share/doc/tetex-beta for details.
-@item GSView
-Click  @uref{ftp://ftp.cs.wisc.edu/ghost/ghostgum/gsv36w32.exe,here} to
-install GSView (GhostView for Windows), or visit
+A full TeX installation.
+Click
+@uref{http://prdownloads.sourceforge.net/miktex/miktex-2.0-lvl-1.zip,here}
+to install basic MiKTeX commands, 
+or visit @uref{http://www.miktex.org,www.miktex.org}.
+@c See @file{/usr/doc/cygwin/tetex-beta-20001218.README} for details.
+@item PostScript tools
+@table @code
+@item GSView-2.6, or
+Click  @uref{ftp://ftp.cs.wisc.edu/ghost/ghostgum/gsv26w32.exe,here} to
+install GSView-2.6 (GhostView for Windows), or visit
+@uref{ftp://ftp.cs.wisc.edu/ghost/ghostgum,ftp.cs.wisc.edu}.
+
+@item GSView-3.6 and GhostScript-6.50
+Click @uref{ftp://ftp.cs.wisc.edu/ghost/ghostgum/gsv36w32.exe,here} for
+GSview and 
+Click @uref{ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/AFPL/gs650/gs650w32.exe
+,here} for GhostScript.
 @uref{ftp://ftp.cs.wisc.edu/ghost/ghostgum,ftp.cs.wisc.edu}.
+or visit the
+@uref{http://www.cs.wisc.edu/~ghost/,Ghostscript, Ghostview and GSview site}.
+@end table
+
 @item Python
 Click @uref{http://www.python.org/ftp/python/win32/py152.exe,here} to
 install Python-1.5.2, or visit @uref{http://www.python.org,www.python.org}.
index 944fdb91425f36fb9feb41fb3fc0f0f173973578..bc3a3475d23331ac4c73cb912712e70243104c40 100644 (file)
@@ -111,6 +111,8 @@ To view the @code{test.dvi} output, run Xdvi (you may omit the
 xdvi test
 @end example
 
+@c FIXME: should we say anything on xdvi-gs interaction?
+
 You should see the following in  a window next to some buttons.
 @lilypond
 \score {
@@ -134,13 +136,94 @@ GhostScript's website at @uref{http://www.ghostscript.com}.
 @cindex PostScript
 @cindex .ps
 
+
 @unnumberedsubsec Windows
 
-@strong{[TODO]}
 
-* setting of env vars (TFMFONTS,MFINPUTS,TEXINPUTS)
+On windows, you open a LilyPond shell, and then you invoke ly2dvi
+compile your lilypond source file, just like on Unix:
+
+@example
+ly2dvi -P test
+@end example
+
+You will see the following on your screen:
+
+@c FIXME: leave this out, just refer to unix section?
+@c FIXME: commands run in dos shell: we can't redirect output
+@example
+GNU LilyPond 1.3.147
+Now processing: `C:\cygwin\home\tim\ly\test.ly'
+Parsing...
+Interpreting music...[1]
+Preprocessing elements...
+Calculating column positions... [2]
+paper output to test.tex...
+
+This is TeX, Version 3.14159 (MiKTeX 2)
+LaTeX2e <2000/06/01>
+Babel <v3.6Z> and hyphenation patterns for english, french, german, ngerman, du
+mylang, nohyphenation, loaded.
+
+(test.latex (C:\Program Files\MiKTeX\tex\latex\base\article.cls
+Document Class: article 2000/05/19 v1.4b Standard LaTeX document class
+(C:\Program Files\MiKTeX\tex\latex\base\size10.clo))
+(C:\cygwin\usr\lilypond-1.3.147\share\lilypond\tex\geometry.sty
+(C:\Program Files\MiKTeX\tex\latex\graphics\keyval.sty))
+(C:\Program Files\MiKTeX\tex\latex\base\inputenc.sty
+(C:\Program Files\MiKTeX\tex\latex\base\latin1.def))
+(C:\cygwin\usr\lilypond-1.3.147\share\lilypond\tex\titledefs.tex)
+No file test.aux.
+(test.tex
+(C:\cygwin\usr\lilypond-1.3.147\share\lilypond\tex\lilyponddefs.tex
+(C:\cygwin\usr\lilypond-1.3.147\share\lilypond\tex\lilypond-latex.tex
+LaTeX definitions)
+(C:\cygwin\usr\lilypond-1.3.147\share\lilypond\tex\feta20.tex)
+(C:\cygwin\usr\lilypond-1.3.147\share\lilypond\tex\lily-ps-defs.tex)
+[footer empty]
+(C:\cygwin\usr\lilypond-1.3.147\share\lilypond\tex\fetdefs.tex)))
+Overfull \hbox (15.0pt too wide) in paragraph at lines 22--26
+[] $[]$ 
+[1] (test.aux) )
+(see the transcript file for additional information)
+Output written on test.dvi (1 page, 4292 bytes).
+Transcript written on test.log.
+This is dvips(k) 5.86 Copyright 1999 Radical Eye Software (www.radicaleye.com)
+' TeX output 2001.04.12:0033' -> test.ps
+<texc.pro><special.pro>. [1]
+Running LilyPond...
+Analyzing test.tex...
+Running LaTeX...
+Running dvips...
+PS output to test.ps...
+DVI output to test.dvi...
+@end example
+
+To view the @code{test.dvi} output, run Yap
+
+@example
+yap test
+@end example
+
+You should see the following in a window
+@lilypond
+\score {
+  \notes { c'4 e' g' }
+} 
+@end lilypond
+
+@c FIXME: talk about newer Yap versions, proper gs installation?
+When you're satisfied with the result, you can print from within Yap
+(File/Print).  Note that Yap may not display embedded PostScript symbols
+such as beams and slurs.  Don't worry, they'll be printed anyway.
+
+You can also print the PostScript file directly from the
+command line using GSview:
+
+@example
+gsview32 /s test.ps
+@end example
 
-* dvi viewer doesn't display postscript
 
 
 @node The first tune
index 9e7b37ea23ed9eadcfe9abd4db03cad82ccecc0c..8351c3d69eecaa3b9ab44baf2699c7da98aa0b3e 100644 (file)
@@ -3,8 +3,11 @@ depth=../..
 
 EXTRA_DIST_FILES = LilyPond.ico $(wildcard *.sh *.patch)
 
-STEPMAKE_TEMPLATES=documentation
+STEPMAKE_TEMPLATES=documentation texinfo
 
 include $(depth)/make/stepmake.make 
 
-default:
+default: local-doc
+
+local-WWW:
+
diff --git a/Documentation/windows/babysit.texi b/Documentation/windows/babysit.texi
new file mode 100644 (file)
index 0000000..ae9279a
--- /dev/null
@@ -0,0 +1,44 @@
+\input texinfo @c -*-texinfo-*-
+@setfilename babysit.info
+@settitle Babysit Windows Install Wizard
+
+@node Top
+@top
+
+@chapter Babysit Windows Install Wizard
+
+@example
+www.lilypond.org
+  :Windows Unstable(1)
+  :setup.exe(2)
+Netscape 
+  Unknown file type
+    :Save file(3)
+Save as
+  :Drop-down(4) :Select Desktop(5)
+Save as
+  :Save(6)
+Save as 
+  C:\WINDOWS\Desktop\setup.exe already exist
+  Do you want to replace it? :Yes(7)
+Desktop
+  :setup.exe(8) :setup.exe(9)
+GNU LilyPond Setup
+  Setup.exe version 2.40 :Next(10)
+  :X(11) Install from internet :Next(12)
+  Local Package Directory
+    :Browse(13) :C:\tmp(14) :Ok(15) :Next(16)
+  Select install root directory
+    C:/cygwin :Next(17)
+  :X Direct internet connection(18) :Next(19)
+  Select Download Site
+    :http://appel.lilypond.org(20) :Next(21)
+  Select Packages to install (all) :Next(22)
+  :X Create Desktop() Icon
+  :X Add to Start Menu(23) :Next(24)
+  Installation Complete :Ok(25)
+Desktop
+  :GNU LilyPond(26):GNU LilyPond(27)
+@end example
+
+@bye
index a1cc83c86bc768682d30d0b0b3f0098f66f0411b..551e99db3722d0ea049120945f8382617bba5321 100644 (file)
@@ -1,17 +1,19 @@
-Binary files ../cinstall/LilyPond.ico and ./LilyPond.ico differ
+Only in .: LilyPond.ico
 diff -urN ../cinstall/Makefile.in ./Makefile.in
 --- ../cinstall/Makefile.in    Thu Feb  8 05:55:22 2001
-+++ ./Makefile.in      Sun Apr  8 19:54:54 2001
-@@ -130,11 +130,15 @@
++++ ./Makefile.in      Tue Apr 10 19:20:14 2001
+@@ -130,11 +130,16 @@
        @chmod a-x $@
  
  clean:
 -      rm -f *.o *.rc $(PROGS)
+-      $(MAKE) -C zlib clean
 +      rm -f *.o $(PROGS)
-       $(MAKE) -C zlib clean
++      $(MAKE) -C zlib $@
  
  realclean: clean
        rm -f  Makefile config.cache
++      rm -f *.d
 +      rm -f inilex.c iniparse.c iniparse.h version.c config.log config.status *.d 
 +
 +
@@ -21,20 +23,19 @@ diff -urN ../cinstall/Makefile.in ./Makefile.in
        $(SHELL) $(updir1)/mkinstalldirs $(bindir) $(etcdir)
 diff -urN ../cinstall/desktop.cc ./desktop.cc
 --- ../cinstall/desktop.cc     Sat Nov 11 05:55:16 2000
-+++ ./desktop.cc       Sun Apr  8 21:52:48 2001
-@@ -85,6 +85,11 @@
++++ ./desktop.cc       Tue Apr 10 19:15:01 2001
+@@ -79,9 +79,7 @@
+   "done",
+   "",
+   "export MAKE_MODE=unix",
+-  "export PS1='\\[\\033]0;\\w\\007",
+-  "\\033[32m\\]\\u@\\h \\[\\033[33m\\w\\033[0m\\]",
+-  "$ '",
++  "export PS1='\\[\\033]0;\\w\\007\\033[32m\\]\\u@\\h \\[\\033[33m\\w\\033[0m\\]$ '",
    "",
    "cd \"$HOME\"",
    "",
-+  "PATH=\"/usr/lilypond/bin:$PATH\"",
-+  "if [ ! -e \"/usr/lilypond\" ]; then",
-+  "  ln -s `tail -1 /usr/lilypond-*` /usr/lilypond",
-+  "fi",
-+  "",
-   "test -f ./.bashrc && . ./.bashrc",
-   0
- };
-@@ -197,6 +202,30 @@
+@@ -197,6 +195,30 @@
  }
  
  static void
@@ -65,7 +66,7 @@ diff -urN ../cinstall/desktop.cc ./desktop.cc
  make_etc_profile ()
  {
    char *fname = concat (root_dir, "/etc/profile", 0);
-@@ -299,11 +328,11 @@
+@@ -299,11 +321,11 @@
  }
  
  static void
@@ -80,7 +81,7 @@ diff -urN ../cinstall/desktop.cc ./desktop.cc
    if (rsrc == NULL)
      {
        fatal ("FindResource failed");
-@@ -323,7 +352,7 @@
+@@ -323,7 +345,7 @@
  static void
  do_desktop_setup()
  {
@@ -89,7 +90,7 @@ diff -urN ../cinstall/desktop.cc ./desktop.cc
  
    make_cygwin_bat ();
    make_etc_profile ();
-@@ -335,6 +364,17 @@
+@@ -335,6 +357,17 @@
  
    if (root_desktop) {
      desktop_icon ("Cygwin", batname);
@@ -350,3 +351,4 @@ diff -urN ../cinstall/resource.h ./resource.h
  #define IDC_SOURCE_DOWNLOAD             1000
  #define IDC_SOURCE_NETINST              1001
  #define IDC_SOURCE_CWD                  1002
+Common subdirectories: ../cinstall/zlib and ./zlib
index 8346a38e8e3ae56dd3a44ee2b485d35cb5a786a9..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,9 +0,0 @@
-#!/bin/bash
-if echo | gsview32 -; then
-       cat <<EOF
-GSView not found.  Install gsview from 
-http://cm.bell-labs.com/who/wim/ghost/gsv26550.exe
-Make sure gsview32.exe in in your $PATH
-EOF
-fi
-gsview32 `cygpath -w $1`
diff --git a/Documentation/windows/lily-python.sh b/Documentation/windows/lily-python.sh
new file mode 100644 (file)
index 0000000..c8f7131
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+PATH="//c/Program Files/Python:$PATH"
diff --git a/Documentation/windows/lily-tex.sh b/Documentation/windows/lily-tex.sh
new file mode 100644 (file)
index 0000000..d2caa6c
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/bash
+# /etc/profile.d/lily-tex.sh -- Check for TeX or try to setup MiKTeX
+
+texmf='//c/Program Files/MiKTeX'
+texmf_bin='//c/Program Files/MiKTeX/miktex'
+
+if [ ! -e /usr/share/texmf ]; then
+       echo /usr/share/texmf not found
+       if [ -e "$texmf" ]; then
+               ln -s "$texmf" /usr/share/texmf
+               echo MiKTeX found: linked to "$texmf"
+       else
+               echo setup /usr/share/texmf yourself
+       fi
+fi
+if type -p tex; then
+       echo no TeX in PATH
+       if [ -e "$texmf_bin" ]; then
+               echo MiKTeX found: added "$texmf_bin" to PATH
+               PATH=`cygpath -u "$texmf/miktex"`:"$PATH"
+       fi
+fi
+
diff --git a/Documentation/windows/lily-wins.texi b/Documentation/windows/lily-wins.texi
new file mode 100644 (file)
index 0000000..f2409eb
--- /dev/null
@@ -0,0 +1,70 @@
+\input texinfo @c -*-texinfo-*-
+@setfilename lily-wins.info
+@settitle LilyPond for Windows.
+
+@node Top
+@top
+
+@chapter Lily Wins on Windows
+
+
+@subsubsection ---FOR-IMMEDIATE-RELEASE---
+
+
+Until now, installing LilyPond on Windows was
+@uref{http://mail.gnu.org/pipermail/help-gnu-music/2001-April/000620.html,
+almost} a dull process that could easily be @uref{
+ftp://appel.lilypond.org/pub/gnu-windows/cygwin-1.1.7/bin/tar/lily-install-0.6-i686-cygwin.bin.tar.gz,
+automated} and scripted.
+
+That kind of scary automating is no longer necessary!  With the upcoming
+@uref{
+http://mail.gnu.org/pipermail/info-gnu-music/2001-April/000060.html,
+LilyPond-1.4} release, we have innovated agressively, by copying and
+@uref{
+http://appel.lilypond.org/lilypond/gnu-windows/cygwin-installer.patch,
+mutilating } @uref{http://sources.redhat.com/cygwin,Cygwin}'s
+@uref{http://sources.redhat.com/cygwin/setup.exe, Windows installer}.
+
+We proudly present our @emph{Gourmet install de luxe}: we offer at least
+@uref{babysit.html, 27 totally unnecessary clicks}, before you can
+actually run LilyPond.  This includes a nice and warm welcome click:
+@example
+GNU LilyPond Setup
+
+   Version x.y
+   (C) Red Hat and us
+
+       [N]ext->
+@end example
+and of course, the maybe even more hollow message that tells us there's
+nothing to be told, really:
+@example
+GNU LilyPond Setup
+
+   Installation completed.
+
+       [O]k
+@end example
+Yes, that's right.  Farewell nightly upgrades.  Even a click at the
+@emph{very end} is required, so that you actually feel very useful
+babysitting the whole process.  How about that, eh?
+
+No, it's no longer needed to @uref{http://www.gnu.org/software/wget,
+download}
+@uref{http://appel.lilypond.org/gnu-windows/tar/lilypond/lilypond-1.3.147-1.tar.gz,tarballs}
+or move @uref{http://www.gnu.org/software/guile, all sorts of files}
+@uref{http://www.mail-archive.com/gnu-music-discuss@@gnu.org/msg04380.html,
+around} after automagically @uref{http://www.winzip.com,unpacking} and
+@uref{http://mail.gnu.org/pipermail/gnu-music-discuss/2000-October/000517.html,
+flattening} the @uref{http://www.lilypond.org,LilyPond} tarball.
+
+
+No
+@uref{http://appel.lilypond.org/lilypond/gnu-windows/tar/lilypond/md5.sum,
+difficult checksums} or signatures.  Enjoy and feel the thrill when
+running @uref{http://appel.lilypond.org/lilypond/gnu-windows/setup.exe,
+untrusted binaries} with adminstrator rights, on your painfully
+firewalled intranet.
+
+@bye
diff --git a/Documentation/windows/lilypond-profile.z.sh b/Documentation/windows/lilypond-profile.z.sh
new file mode 100644 (file)
index 0000000..444c94c
--- /dev/null
@@ -0,0 +1,43 @@
+#!/bin/bash
+# /etc/profile.d/lilypond-profile.z.sh  -- profile additions for Windows
+# run after lilypond-profile.sh
+
+POSIX_GS_LIB="$(cygpath -apu $GS_LIB)"
+WINDOWS_GS_LIB="$(cygpath -apw $POSIX_GS_LIB)"
+
+POSIX_GS_FONTPATH="$(cygpath -apu $GS_FONTPATH)"
+WINDOWS_GS_FONTPATH="$(cygpath -apw $POSIX_GS_FONTPATH)"
+
+POSIX_TEXINPUTS="$(cygpath -apu $TEXINPUTS)"
+WINDOWS_TEXINPUTS="$(cygpath -apw $POSIX_TEXINPUTS)"
+
+POSIX_TFMFONTS="$(cygpath -apu $TFMFONTS)"
+WINDOWS_TFMFONTS="$(cygpath -apw $POSIX_TFMFONTS)"
+
+POSIX_MFINPUTS="$(cygpath -apu $MFINPUTS)"
+WINDOWS_MFINPUTS="$(cygpath -apw $POSIX_MFINPUTS)"
+
+# we assume running dos-based TeX, ie, MiKTeX
+# maybe move to /etc/profile.d/lily-tex.sh
+TEXINPUTS="$WINDOWS_TEXINPUTS"
+# TFMFONTS="$WINDOWS_TFMFONTS"
+
+rm -f /usr/lilypond
+# ugh
+# ln -s /usr/lilypond-@TOPLEVEL_VERSION@ /usr/lilypond
+lily=$(ls -utrd1 /usr/lilypond-* | tail -1)
+ln -s $lily /usr/lilypond
+
+PATH="/usr/lilypond/bin:$PATH"
+PATH="$lily/bin:$PATH"
+
+# gsv-2.7-gs-5.50
+PATH="//c/gstools/gsview://c/gstools/gs:$PATH"
+
+# gsv-3.6-gs-6.50
+PATH="//c/Ghostgum/gsview://c/gstools/gs:$PATH"
+
+# python-1.5.2
+PATH="//c/Program Files/Python:$PATH"
+PATH="//c/Program Files/MiKTeX/miktex:$PATH"
+
diff --git a/Documentation/windows/ly2dvi-wrapper.sh b/Documentation/windows/ly2dvi-wrapper.sh
new file mode 100644 (file)
index 0000000..1a8a710
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+# ly2dvi.sh -- ly2dvi wrapper for Windows
+
+if echo | python - >/dev/null 2>&1; then
+       echo
+else
+       cat <<EOF
+Python not found.  Install python-1.5.2 from www.python.org.
+Make sure python.exe in in your PATH
+EOF
+       exit 1
+fi
+python $(cygpath -w /usr/lilypond/bin/ly2dvi.py) $*
index 8d0f4f22f232414c8d467851a3ad2c4f137a48d5..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,8 +0,0 @@
-#!/bin/bash
-if echo | python -; then
-       cat <<EOF
-Python not found.  Install python-1.5.2 from www.python.org.
-Make sure python.exe in in your $PATH
-EOF
-fi
-python `cygpath -w /usr/lilypond/bin/ly2dvi.py` $*
diff --git a/VERSION b/VERSION
index 3b1525cd12d34dc8b7be1fab1f6fd9f6b1f69bbf..e765c5c6f49c8f5c3bc7d8572515a36a711a9eae 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=147
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=jcn1
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index b7ea0370d8357c1a88b0ee5ab4c268bf63c74a5d..dd2a5d74d2abe0a7ccdeb0c92e7161fb26f709a4 100644 (file)
@@ -5,11 +5,19 @@
 #include "config.h"
 #include <stdio.h>
 #include <errno.h>
+#include <limits.h>
 
 #if HAVE_SYS_STAT_H 
 #include <sys/stat.h>
 #endif
 
+#ifdef __CYGWIN__
+#include <sys/cygwin.h>
+
+// URGURG
+#include "../lily/include/scm-option.hh"
+#endif
+
 #include "file-path.hh"
 
 
 #define EXTSEP '.'
 #endif
 
+
+
+#ifdef __CYGWIN__
+static String
+dos_to_posix (String path)
+{
+  char buf[PATH_MAX];
+  char *filename = path.copy_ch_p ();
+  /* urg, wtf? char const* argument gets modified! */
+  cygwin_conv_to_posix_path (filename, buf);
+  delete filename;
+  return buf;
+}
+
+static String
+dos_to_posix_list (String path)
+{
+  char *filename = path.copy_ch_p ();
+  int len = cygwin_win32_to_posix_path_list_buf_size (filename);
+  if (len < PATH_MAX)
+    len = PATH_MAX;
+  char *buf = new char[len];
+  /* urg, wtf? char const* argument gets modified! */
+  cygwin_win32_to_posix_path_list (filename, buf);
+  delete filename;
+  
+  String ret = buf;
+  delete buf;
+  return ret;
+}
+#endif /* __CYGWIN__ */
+
 /* Join components to full path. */
 String
 Path::str () const
@@ -52,6 +92,13 @@ Path::str () const
 Path
 split_path (String path)
 {
+#ifdef __CYGWIN__
+  /* All system functions would work, even if we don't convert to
+     posix path, but we'd think that \foe\bar\baz.ly is in the cwd.  */
+  if (testing_level_global & 1)
+    path = dos_to_posix (path);
+#endif
+
   Path p;
   int i = path.index_i (ROOTSEP);
   if (i >= 0)
@@ -81,6 +128,11 @@ split_path (String path)
 void
 File_path::parse_path (String p)
 {
+#ifdef __CYGWIN__
+  if (testing_level_global & 4)
+    p = dos_to_posix_list (p);
+#endif
+
   int l;
   
   while ((l = p.length_i ()) )
@@ -162,13 +214,18 @@ File_path::try_add (String s)
     return false;
   fclose (f);
     
-  push (s);
+  add (s);
   return true;
 }
 
 void
 File_path::add (String s)
 {
+#ifdef __CYGWIN__
+  if (testing_level_global & 2)
+    s = dos_to_posix (s);
+#endif
+
   push (s);
 }
 
index a3287237f598785dc9f8aa61e5ffdef7bffd3e12..bf3e931892387c6772dc13058376f5858830932f 100644 (file)
@@ -25,7 +25,6 @@ extern void set_inclusion_names (Array<String>);
 extern bool dependency_global_b;
 extern String dependency_prefix_global;
 extern Array<String> dump_header_fieldnames_global;
-extern bool midi_debug_global_b;
 extern bool no_paper_global_b;
 extern String output_format_global;
 extern String output_name_global;
diff --git a/lily/include/scm-option.hh b/lily/include/scm-option.hh
new file mode 100644 (file)
index 0000000..3fe5a74
--- /dev/null
@@ -0,0 +1,15 @@
+/*
+  scm-option.hh -- declare Scheme options
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  2001 Jan Nieuwenhuizen <janneke@gnu.org>
+*/
+#ifndef SCM_OPTION_HH
+#define SCM_OPTION_HH
+
+/* options */
+extern bool midi_debug_global_b;
+extern int testing_level_global;
+
+#endif /* SCM_OPTION_HH */
index fe1d00cef8ab7d2e04304ae5d4012441895ca614..513054c763f8a4fa61bfd2c3776038d24a419a23 100644 (file)
@@ -101,20 +101,18 @@ static Getopt_long *oparser_p_static = 0;
        follow regular localisation guidelines).
  */
 static Long_option_init options_static[] = {
+  {_i ("EXPR"), "evaluate", 'e',_i ("evalute EXPR as Scheme after .scm init is read")},
   /* another bug in option parser: --output=foe is taken as an abbreviation
      for --output-format */
-  //  {_i ("EXT"), "output-format", 'f',  _i ("use output format EXT (scm, ps, tex or as)")},
-  
   {_i ("EXT"), "format", 'f',  _i ("use output format EXT (scm, ps, tex or as)")},
   {0, "help", 'h',  _i ("this help")},
   {_i ("FIELD"), "header", 'H',  _i ("write header field to BASENAME.FIELD")},
   {_i ("DIR"), "include", 'I',  _i ("add DIR to search path")},
   {_i ("FILE"), "init", 'i',  _i ("use FILE as init file")},
   {0, "dependencies", 'M',  _i ("write Makefile dependencies for every input file")},
-  {_i ("DIR"), "dep-prefix", 'P',  _i ("prepend DIR to dependencies")},
-  {_i ("EXPR"), "evaluate", 'e',_i ("evalute EXPR as Scheme after .scm init is read")},
   {0, "no-paper", 'm',  _i ("produce MIDI output only")},
   {_i ("FILE"), "output", 'o',  _i ("write output to FILE")},
+  {_i ("DIR"), "dep-prefix", 'P',  _i ("prepend DIR to dependencies")},
   {0, "safe", 's',  _i ("inhibit file output naming and exporting")},
   {0, "version", 'v',  _i ("print version number")},
   {0, "verbose", 'V', _i ("verbose")},
index fb3d1eb5e6d429940e126d63aba334f95e1f0f9a..80d3e6e6bc4348595ddea27b0629a7214eaa66c2 100644 (file)
@@ -15,6 +15,7 @@
 #include "midi-stream.hh"
 #include "audio-item.hh"
 #include "duration.hh"
+#include "scm-option.hh"
 
 #include "killing-cons.tcc"
 
index 359d83183419c1a4ba10752fc30fb7baecb35d0b..a2e4d7d5d76a5bf7fa5428628e42c2d28a6dd6c6 100644 (file)
@@ -15,6 +15,7 @@
 #include "midi-item.hh"
 #include "midi-stream.hh"
 #include "debug.hh"
+#include "scm-option.hh"
 
 Midi_stream::Midi_stream (String filename)
 {
index 16b2a9d83055d2606597cc9c4a1645aa96ab9ab2..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,78 +0,0 @@
-/*   
-  scheme-option.cc --  implement option setting from Scheme
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#include "lily-guile.hh"
-
-/*
-  TODO: mooie onschuldige test, en koel om allerleide dingen te kunnen zetten,
-  maar is dit nou wel handig voor gebruikert?
-
-  -X, of -fps is hendiger dan
-
-          -e "(set-lily-option 'midi-debug #t)'
-
-  [niet voor niets tiepo in 139 announs..]
-
-*/
-/* Write midi as formatted ascii stream? */
-bool midi_debug_global_b;
-
-
-/*
-
-  Todo: print help text.
-
-
-  other interesting stuff to add:
-
-@item -T,--no-timestamps
-don't timestamp the output
-
-@item -t,--test
-Switch on any experimental features.  Not for general public use.
-
- */
-
-SCM
-set_lily_option (SCM var, SCM val)
-{
-  if (var == ly_symbol2scm ("midi-debug"))
-    {
-      midi_debug_global_b = to_boolean (val);
-    }
-  else if (var == ly_symbol2scm ("find-old-relative"))
-    {
-      /*
-       Seems to have been broken for some time!
-       
-       @item  -Q,--find-old-relative
-       show all changes needed to convert a file to  relative octave syntax.
-
-
-       
-      */
-
-      ;
-      
-    }
-
-  return SCM_UNSPECIFIED;
-}
-
-
-static void
-init_functions ()
-{
-  scm_make_gsubr ("set-lily-option", 2, 0, 0, (Scheme_function_unknown)set_lily_option);
-}
-
-
-ADD_SCM_INIT_FUNC (init_functions_sopt, init_functions);
-
-
diff --git a/lily/scm-option.cc b/lily/scm-option.cc
new file mode 100644 (file)
index 0000000..666f08c
--- /dev/null
@@ -0,0 +1,99 @@
+/*   
+  scm-option.cc --  implement option setting from Scheme
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#include <iostream.h>
+#include "string.hh"
+#include "lily-guile.hh"
+#include "scm-option.hh"
+
+/*
+  TODO: mooie onschuldige test, en koel om allerleide dingen te kunnen zetten,
+  maar is dit nou wel handig voor gebruikert?
+
+  -X, of -fps is hendiger dan
+
+          -e "(set-lily-option 'midi-debug #t)'
+
+  [niet voor niets tiepo in 139 announs..]
+
+*/
+
+
+/* Write midi as formatted ascii stream? */
+bool midi_debug_global_b;
+/* General purpose testing flag */
+int testing_level_global;
+
+
+/*
+
+  TODO: verzin iets tegen optie code bloot
+
+
+  other interesting stuff to add:
+
+@item -T,--no-timestamps
+don't timestamp the output
+
+@item -t,--test
+Switch on any experimental features.  Not for general public use.
+
+ */
+
+SCM
+set_lily_option (SCM var, SCM val)
+{
+  if (var == ly_symbol2scm ("help"))
+    {
+      cout << '\n';
+      cout << _ ("Scheme options:");
+      cout << "help"; 
+      cout << "midi-debug (boolean)"; 
+      cout << "testing-level (int)"; 
+      cout << '\n';
+      exit (0);
+    }
+  else if (var == ly_symbol2scm ("midi-debug"))
+    {
+      midi_debug_global_b = to_boolean (val);
+    }
+  else if (var == ly_symbol2scm ("testing-level"))
+    {
+     testing_level_global = gh_scm2int (val); 
+    }
+  else if (var == ly_symbol2scm ("find-old-relative"))
+    {
+      /*
+       Seems to have been broken for some time!
+       
+       @item  -Q,--find-old-relative
+       show all changes needed to convert a file to  relative octave syntax.
+
+
+       
+      */
+
+      ;
+      
+    }
+
+  return SCM_UNSPECIFIED;
+}
+
+
+static void
+init_functions ()
+{
+  scm_make_gsubr ("set-lily-option", 2, 0, 0, (Scheme_function_unknown)set_lily_option);
+}
+
+
+ADD_SCM_INIT_FUNC (init_functions_sopt, init_functions);
+
+
index 4a67ce26e6aa132637ed234604cef61376a676be..56a0450df1c4f31b3ead5f1637cefa34ca0b568b 100644 (file)
@@ -45,8 +45,6 @@ TODO:
 
   * multiple \score blocks?
   
-  * windows-sans-cygwin compatibility?  rm -rf, cp file... dir
-  
 '''
 
 
@@ -56,6 +54,7 @@ import string
 import re
 import getopt
 import sys
+import shutil
 import __main__
 import operator
 import tempfile
@@ -111,9 +110,6 @@ targets = {
 track_dependencies_p = 0
 dependency_files = []
 
-# be verbose?
-verbose_p = 0
-
 
 # lily_py.py -- options and stuff
 # 
@@ -169,17 +165,19 @@ Distributed under terms of the GNU General Public License. It comes with
 NO WARRANTY.'''))
        sys.stdout.write ('\n')
 
+if ( os.name == 'posix' ):
+       errorport=sys.stderr
+else:
+       errorport=sys.stdout
+
 def progress (s):
-       sys.stderr.write (s + '\n')
+       errorport.write (s + '\n')
 
 def warning (s):
-       sys.stderr.write (_ ("warning: ") + s)
-       sys.stderr.write ('\n')
-       
+       progress (_ ("warning: ") + s)
                
 def error (s):
-       sys.stderr.write (_ ("error: ") + s)
-       sys.stderr.write ('\n')
+       progress (_ ("error: ") + s)
        raise _ ("Exiting ... ")
 
 def getopt_args (opts):
@@ -279,7 +277,7 @@ def cleanup_temp ():
        if not keep_temp_dir_p:
                if verbose_p:
                        progress (_ ("Cleaning %s...") % temp_dir)
-               system ('rm -rf %s' % temp_dir)
+               shutil.rmtree (temp_dir)
 
 
 def set_setting (dict, key, val):
@@ -321,9 +319,11 @@ option_definitions = [
 
 def run_lilypond (files, outbase, dep_prefix):
        opts = '--output=%s.tex' % outbase
-       opts = opts + ' ' + string.join (map (lambda x : '-I ' + x, include_path))
+       opts = opts + ' ' + string.join (map (lambda x : '-I ' + x,
+                                             include_path))
        if paper_p:
-               opts = opts + ' ' + string.join (map (lambda x : '-H ' + x, fields))
+               opts = opts + ' ' + string.join (map (lambda x : '-H ' + x,
+                                                     fields))
        else:
                opts = opts + ' --no-paper'
                
@@ -500,7 +500,7 @@ def global_latex_definition (tfiles, extra):
                first = 0
 
        s = s + r'''
-% I don't see why we want to clobber the footer here
+% I do not see why we want to clobber the footer here
 \vfill\hfill\parbox{\textwidth}{\mbox{}\makelilypondtagline}
 %\makeatletter
 %\renewcommand{\@oddfoot}{\parbox{\textwidth}{\mbox{}\makelilypondtagline}}%
@@ -518,7 +518,10 @@ def run_latex (files, outbase, extra):
        f.write (s)
        f.close ()
 
-       cmd = 'latex \\\\nonstopmode \\\\input %s' % outbase + '.latex'
+        if ( os.name == 'posix' ):
+               cmd = 'latex \\\\nonstopmode \\\\input %s' % outbase + '.latex'
+       else:
+               cmd = 'latex \\nonstopmode \\input %s' % outbase + '.latex'
        if not verbose_p:
                progress ( _("Running %s...") % 'LaTeX')
                cmd = cmd + ' 1> /dev/null 2> /dev/null'
@@ -529,16 +532,17 @@ def run_dvips (outbase, extra):
 
        opts = ''
        if extra['papersize']:
-               opts = opts + ' -t %s' % extra['papersize'][0]
+               opts = opts + ' -t%s' % extra['papersize'][0]
 
        if extra['orientation'] and extra['orientation'][0] == 'landscape':
-               opts = opts + ' -t landscape'
+               opts = opts + ' -tlandscape'
 
-       cmd = 'dvips %s -o %s %s' % (opts, outbase + '.ps', outbase + '.dvi')
+       cmd = 'dvips %s -o%s %s' % (opts, outbase + '.ps', outbase + '.dvi')
        
        if not verbose_p:
                progress ( _("Running %s...") % 'dvips')
-               cmd = cmd + ' 2> /dev/null'
+               if os.name == 'posix':
+                       cmd = cmd + ' 1> /dev/null 2> /dev/null'
                
        system (cmd)
 
@@ -606,12 +610,35 @@ for opt in options:
                        warranty ()
                sys.exit (0)
 
+
+def cp_to_dir (pattern, dir):
+       "Copy files matching re PATTERN from cwd to DIR"
+       # Duh.  Python style portable: cp *.EXT OUTDIR
+       # system ('cp *.%s %s' % (ext, outdir), 1)
+       files = filter (lambda x, p=pattern: re.match (p, x), os.listdir ('.'))
+       map (lambda x, d=dir: shutil.copy2 (x, os.path.join (d, x)), files)
+
+# Python < 1.5.2 compatibility
+#
 # On most platforms, this is equivalent to
 #`normpath(join(os.getcwd()), PATH)'.  *Added in Python version 1.5.2*
-def compat_abspath (path):
-       return os.path.normpath (os.path.join (os.getcwd (), path))
+if os.path.__dict__.has_key ('abspath'):
+       abspath = os.path.abspath
+else:
+       def abspath (path):
+               return os.path.normpath (os.path.join (os.getcwd (), path))
+
+if os.__dict__.has_key ('makedirs'):
+       makedirs = os.makedirs
+else:
+       def makedirs (dir, mode=0777):
+               system ('mkdir -p %s' % dir)
+
+def mkdir_p (dir, mode=0777):
+       if not os.path.isdir (dir):
+               makedirs (dir, mode)
 
-include_path = map (compat_abspath, include_path)
+include_path = map (abspath, include_path)
 
 original_output = output
 
@@ -625,7 +652,7 @@ if files and files[0] != '-':
        for i in ('.dvi', '.latex', '.ly', '.ps', '.tex'):
                output = strip_extension (output, i)
 
-       files = map (compat_abspath, files) 
+       files = map (abspath, files) 
 
        if os.path.dirname (output) != '.':
                dep_prefix = os.path.dirname (output)
@@ -633,7 +660,7 @@ if files and files[0] != '-':
                dep_prefix = 0
 
        reldir = os.path.dirname (output)
-       (outdir, outbase) = os.path.split (compat_abspath (output))
+       (outdir, outbase) = os.path.split (abspath (output))
        
        setup_environment ()
        setup_temp ()
@@ -674,7 +701,7 @@ if files and files[0] != '-':
                run_dvips (outbase, extra)
 
        if outdir != '.' and (track_dependencies_p or targets.keys ()):
-               system ('mkdir -p %s' % outdir)
+               mkdir_p (outdir, 0777)
 
        # add DEP to targets?
        if track_dependencies_p:
@@ -685,8 +712,7 @@ if files and files[0] != '-':
 
        for i in targets.keys ():
                ext = string.lower (i)
-               if re.match ('.*[.]%s' % ext, string.join (os.listdir ('.'))):
-                       system ('cp *.%s %s' % (ext, outdir))
+               cp_to_dir ('.*\.%s$' % ext, outdir)
                outname = outbase + '.' + string.lower (i)
                abs = os.path.join (outdir, outname)
                if reldir != '.':
@@ -702,7 +728,7 @@ if files and files[0] != '-':
 else:
        # FIXME
        help ()
-       sys.stderr.write ('\n')
+       progress ('\n')
        try:
                error (_ ("no FILEs specified, can't invoke as filter"))
        except:
index 97e4b58d36cd4ae20f8a86b8d22b33303d1a8473..49b6c8170eb066bd3e51ca801938c5ce8f0a4504 100644 (file)
@@ -415,7 +415,7 @@ if 1:
        latest = find_latest (url)
 
        if os.path.isdir ('%s/%s' % (build_root, latest)):
-               progress (_ ("latest is %s") % latest)
+               progress (_ ("latest is: %s") % latest)
                progress (_ ("relax, %s is up to date" % package_name))
                sys.exit (0)