From b2dcf7e4c141bcc73782719bfd7f32a21e489fbe Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Thu, 19 Apr 2001 11:50:53 +0200 Subject: [PATCH] patch::: 1.3.149.jcn1 1.3.149.jcn1 ============ * Windows installer stuff: the ``It shouldn't be hard -- but do need some sleep'' release. Think of it: /shouldn't/ is *exactly* why GNU/Linux exists, and why we advise to run LilyPond on Linux -- UMSDOS if you must. You may consider our part of the job done. Any more of this sad and sorry stuff will drive me to drink. It makes you realise again how much fun using Linux actually is. We'll take patches from now on, from people that have a stronger stomach. Good night. - Ly2dvi: run commands from sh (so that tex wrappers be used). - Added cygwin man,less and windows gs, gsview, miktex, python to lilypond installer repository. Moved profile.d setup functionality to postinstall. - Added tex and latex wrappers. - Wrappers for all python scripts. * Removed RMAIL header from german-chords.ly + fixes (Rune). 1.3.149 ======= --- CHANGES | 29 +++++++ Documentation/topdocs/WINDOWS.texi | 25 +++++- Documentation/windows/GNUmakefile | 94 ++++++++++++++++++++- Documentation/windows/fix-suffixes.sh | 32 +++++++ Documentation/windows/latex-wrapper.sh | 8 ++ Documentation/windows/lily-gs.sh | 31 +++++++ Documentation/windows/lily-miktex.sh | 22 +++++ Documentation/windows/lily-python.sh | 21 ++++- Documentation/windows/lily-tex.sh | 23 ----- Documentation/windows/lilypond-profile.z.sh | 43 ---------- Documentation/windows/ly2dvi-wrapper.sh | 13 --- Documentation/windows/post-gs.sh | 54 ++++++++++++ Documentation/windows/post-lily.sh | 8 ++ Documentation/windows/post-miktex.sh | 30 +++++++ Documentation/windows/post-python.sh | 41 +++++++++ Documentation/windows/python-wrapper.sh | 13 +++ Documentation/windows/registry.in | 60 +++++++++++++ Documentation/windows/tex-wrapper.sh | 10 +++ Documentation/windows/zlily-profile.sh | 31 +++++++ VERSION | 2 +- ly/german-chords.ly | 47 ----------- make/substitute.make | 1 + scm/chord-name.scm | 5 +- scripts/ly2dvi.py | 7 +- 24 files changed, 510 insertions(+), 140 deletions(-) create mode 100644 Documentation/windows/fix-suffixes.sh create mode 100644 Documentation/windows/latex-wrapper.sh create mode 100644 Documentation/windows/lily-gs.sh create mode 100644 Documentation/windows/lily-miktex.sh create mode 100644 Documentation/windows/post-gs.sh create mode 100644 Documentation/windows/post-lily.sh create mode 100644 Documentation/windows/post-miktex.sh create mode 100644 Documentation/windows/post-python.sh create mode 100644 Documentation/windows/python-wrapper.sh create mode 100644 Documentation/windows/registry.in create mode 100644 Documentation/windows/tex-wrapper.sh create mode 100644 Documentation/windows/zlily-profile.sh diff --git a/CHANGES b/CHANGES index 54da3bce7e..6ef74cf32f 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,32 @@ +1.3.149.jcn1 +============ + +* Windows installer stuff: the ``It shouldn't be hard -- but do need + some sleep'' release. + + Think of it: /shouldn't/ is *exactly* why GNU/Linux exists, and + why we advise to run LilyPond on Linux -- UMSDOS if you must. + + You may consider our part of the job done. Any more of this + sad and sorry stuff will drive me to drink. It makes you realise + again how much fun using Linux actually is. + + We'll take patches from now on, from people that have a stronger + stomach. Good night. + + - Ly2dvi: run commands from sh (so that tex wrappers be used). + + - Added cygwin man,less and windows gs, gsview, miktex, python to + lilypond installer repository. Moved profile.d setup functionality to + postinstall. + - Added tex and latex wrappers. + - Wrappers for all python scripts. + +* Removed RMAIL header from german-chords.ly + fixes (Rune). + +1.3.149 +======= + 1.3.148.jcn3 ============ diff --git a/Documentation/topdocs/WINDOWS.texi b/Documentation/topdocs/WINDOWS.texi index f3eff2dbfa..57807d2488 100644 --- a/Documentation/topdocs/WINDOWS.texi +++ b/Documentation/topdocs/WINDOWS.texi @@ -31,6 +31,7 @@ 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 @table @code @@ -59,7 +60,7 @@ compilation scripts}. @section Windows running requirements -GNU LilyPond does use a lot of resources. For operation you need the +GNU LilyPond does use a lot of resources. For operation you need the following software @table @code @@ -91,8 +92,7 @@ specials. You get annoying @emph{Register Now|Cancel} popups, though. 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}. +,here} for GhostScript, or visit the @uref{http://www.cs.wisc.edu/~ghost/,Ghostscript, Ghostview and GSview site}. @end table @@ -106,7 +106,6 @@ Python > 1.5.2 has ugly licensing issues, so we only used and tested 1.5.2. @end table - @section Windows running setup If you're lucky, after running @file{setup.exe} you're all set up. @@ -186,6 +185,24 @@ This one you should get a single page document with some text in each corner. ] + +emacs + +http://cygwin.com/ml/cygwin/2000-08/msg01049.html +http://www.cs.unc.edu/~juliano/my_emacs_files/cygwin32-mount.el +http://cygwin.com/ml/cygwin/2000-02/msg00109.html +http://sources.redhat.com/ml/cygwin/2001-01/msg00878/cygwin32-mount.el + + ;; setup Bash shell + (setq exec-path (cons "C:/cygwin/bin" exec-path)) + (setenv "PATH" (concat "C:\\cygwin\\bin;" (getenv "PATH"))) + (setq process-coding-system-alist '(("bash" . undecided-unix))) + (setq w32-quote-process-args ?\") + (setq shell-file-name "bash") + (setenv "SHELL" shell-file-name) + (setq explicit-shell-file-name shell-file-name) + (add-hook 'comint-output-filter-functions 'comint-strip-ctrl-m) + @end ignore diff --git a/Documentation/windows/GNUmakefile b/Documentation/windows/GNUmakefile index 8351c3d69e..ab7e00e733 100644 --- a/Documentation/windows/GNUmakefile +++ b/Documentation/windows/GNUmakefile @@ -3,7 +3,7 @@ depth=../.. EXTRA_DIST_FILES = LilyPond.ico $(wildcard *.sh *.patch) -STEPMAKE_TEMPLATES=documentation texinfo +STEPMAKE_TEMPLATES=documentation texinfo install install-out include $(depth)/make/stepmake.make @@ -11,3 +11,95 @@ default: local-doc local-WWW: +# For cygwin builds only +target=$(shell gcc -dumpmachine) +ifeq ($(target),i686-pc-cygwin) + +POST_INSTALLS=$(wildcard post-*.sh) +OUT_POST_INSTALLS=$(POST_INSTALLS:%=$(outdir)/%) + +# lily-*: rename to '-profile' or so +PROFILES=$(wildcard *lily-*.sh) lilypond-profile.sh +OUT_PROFILES=$(PROFILES:%=$(outdir)/%) + +##as2text.scm +PYTHON_WRAPPERS=\ + abc2ly\ + convert-ly\ + etf2ly\ + lilypond-book\ + ly2dvi\ + mup2ly\ + musedata2ly\ + pmx2ly\ + update-lily\ +# + +OUT_PYTHON_WRAPPERS=$(PYTHON_WRAPPERS:%=$(outdir)/%) + +TEX_WRAPPERS=tex latex +OUT_TEX_WRAPPERS=$(TEX_WRAPPERS:%=$(outdir)/%) + +# profiles +$(outdir)/%.sh: %.sh + cat $< | sed $(sed-atvariables) > $@ + chmod 755 $@ + +# Urg +$(outdir)/lilypond-profile.sh: $(outdir)/../$(depth)/buildscripts/out/lilypond-profile + cp $< $@ + chmod 755 $@ + +# python wrappers +$(outdir)/%: python-wrapper.sh + cat $< | sed $(sed-atvariables) -e "s!@name@!$(*F)!g" > $@ + chmod 755 $@ + +# tex wrappers +#$(outdir)/%: %-wrapper.sh +# cat $< | sed $(sed-atvariables) -e "s!@name@!$(*F)!g" > $@ +# chmod 755 $@ + +$(outdir)/tex: tex-wrapper.sh + cat $< | sed $(sed-atvariables) -e "s!@name@!tex!g" > $@ + chmod 755 $@ + +$(outdir)/latex: latex-wrapper.sh + cat $< | sed $(sed-atvariables) -e "s!@name@!latex!g" > $@ + chmod 755 $@ + +default: $(OUT_PYTHON_WRAPPERS) $(OUT_TEX_WRAPPERS) $(OUT_POST_INSTALLS) $(OUT_PROFILES) + +# urg: change suffixes before overwriting python scripts + +INSTALLATION_OUT_SUFFIXES=1 2 3 4 + +# URG. +# By popular demand, +# LilyPond on windows is configured with --prefix=/usr/lilypond-x.y.x +# The cygwin profile.d dir, however, is in /etc + +INSTALLATION_DIR=$(shell dirname $(shell dirname $(prefix)))/etc/postinstall +INSTALLATION_FILES=$(OUT_POST_INSTALLS) + +INSTALLATION_OUT_DIR1=$(shell dirname $(shell dirname $(prefix)))/etc/profile.d +INSTALLATION_OUT_FILES1=$(OUT_PROFILES) + +INSTALLATION_OUT_DIR2=$(prefix)/wrappers +INSTALLATION_OUT_FILES2=$(OUT_PYTHON_WRAPPERS) $(OUT_TEX_WRAPPERS) + +INSTALLATION_OUT_DIR3=$(datadir)/tex +INSTALLATION_OUT_FILES3=$(shell kpsewhich geometry.sty) + +INSTALLATION_OUT_DIR4=$(datadir)/tfm +INSTALLATION_OUT_FILES4=$(shell kpsewhich cmr10.tfm) + +else + +local-install: + @echo skipping + +local-install-outfiles: + @echo skipping + +endif diff --git a/Documentation/windows/fix-suffixes.sh b/Documentation/windows/fix-suffixes.sh new file mode 100644 index 0000000000..0f8792a552 --- /dev/null +++ b/Documentation/windows/fix-suffixes.sh @@ -0,0 +1,32 @@ +#!/bin/bash +## duh, rename executables, +## for people that use a dumb shell instead of bash + +if [ $# -le 0 ]; then + echo "Usage: fix-suffixes [FILE]..." + exit 2 +fi + +echo `basename $0` + +function fix_extension () +{ + path=$1 + ext=$2 + expr="$3" + dir=`dirname $path` + file=`basename $path` + base=`basename $file $ext` + if [ $base$ext != $file ]; then + type="`file $path`" + if expr "$type" : "$expr"; then + mv -f $path $dir/$base$ext + fi + fi +} + +for i in `/bin/ls -d1 $*`; do + fix_extension $i .exe '.*Windows.*\(executable\).*' + fix_extension $i .py '.*\(python\).*' +done + diff --git a/Documentation/windows/latex-wrapper.sh b/Documentation/windows/latex-wrapper.sh new file mode 100644 index 0000000000..67b805c54c --- /dev/null +++ b/Documentation/windows/latex-wrapper.sh @@ -0,0 +1,8 @@ +#!@SHELL@ +# @name@.sh -- @name@ wrapper for Windows + +MFINPUTS="$WINDOWS_MFINPUTS" +TEXINPUTS="$WINDOWS_TEXINPUTS" +TFMFONTS="$WINDOWS_TFMFONTS" + +@name@ "$*" diff --git a/Documentation/windows/lily-gs.sh b/Documentation/windows/lily-gs.sh new file mode 100644 index 0000000000..3a559ca47c --- /dev/null +++ b/Documentation/windows/lily-gs.sh @@ -0,0 +1,31 @@ +#!@SHELL@ +# /etc/profile.d/lily-gs.sh -- Check for GhostScript and GSView + + +gs550="/usr/windows/gstools/gs5.50" +gs650="/usr/windows/gs/gs6.50" + +gsview26="/usr/windows/gstools/gsview" +gsview36="/usr/windows/Ghostgum/GSview" + +# Maybe read registry, but that may be hairy? +# +# $ regtool get \\HKLM\\Software\\CLASSES\\psfile\\shell\\open\\command\\ +# "C:\GSTOOLS\GSVIEW\gsview32.exe" "%1" + + +if [ -e "$gs550/gswin32.exe" ]; then + PATH="$gs550:$PATH" +fi + +if [ -e "$gs650/gswin32.exe" ]; then + PATH="$gs650:$PATH" +fi + +if [ -e "$gsview26/gsview32.exe" ]; then + PATH="$gsview26:$PATH" +fi + +if [ -e "$gsview36/gsview32.exe" ]; then + PATH="$gsview36:$PATH" +fi diff --git a/Documentation/windows/lily-miktex.sh b/Documentation/windows/lily-miktex.sh new file mode 100644 index 0000000000..c2c1480dd8 --- /dev/null +++ b/Documentation/windows/lily-miktex.sh @@ -0,0 +1,22 @@ +#!@SHELL@ +# /etc/profile.d/lily-miktex.sh -- Check for MiKTeX + + +# Educated guess in case we have no regtool +a="//c/Program Files/MiKTeX" + +# Registry entry +reg="$(regtool -q get 'HKLM\Software\MiK\MiKTeX\CurrentVersion\MiKTeX\Install Root\')" +b="$(cygpath -u ""$reg"")" + +# Where we installed it +c=texmf="/usr/windows/MiKTeX" + +for i in "$a" "$b" "$c"; do + if [ -d "$i" ]; then + texmf="$i" + fi +done + +PATH="$texmf/miktex/bin:$PATH" + diff --git a/Documentation/windows/lily-python.sh b/Documentation/windows/lily-python.sh index c8f71313c6..fdefba7d4b 100644 --- a/Documentation/windows/lily-python.sh +++ b/Documentation/windows/lily-python.sh @@ -1,3 +1,20 @@ -#!/bin/bash +#!@SHELL@ +# /etc/profile.d/post-python.sh -- Check for Python -PATH="//c/Program Files/Python:$PATH" +# Educated guess in case we have no regtool +a="//c/Program Files/Python" + +# Registry entry +reg="$(regtool -q get 'HKLM\Software\Python\PythonCore\1.5\InstallPath\')" +b="$(cygpath -u ""$reg"")" + +# Where we installed it +c="/usr/windows/Python" + +for i in "$a" "$b" "$c"; do + if [ -d "$i" ]; then + python="$i" + fi +done + +PATH="$python:$PATH" diff --git a/Documentation/windows/lily-tex.sh b/Documentation/windows/lily-tex.sh index d2caa6c22b..e69de29bb2 100644 --- a/Documentation/windows/lily-tex.sh +++ b/Documentation/windows/lily-tex.sh @@ -1,23 +0,0 @@ -#!/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/lilypond-profile.z.sh b/Documentation/windows/lilypond-profile.z.sh index 444c94c8ba..e69de29bb2 100644 --- a/Documentation/windows/lilypond-profile.z.sh +++ b/Documentation/windows/lilypond-profile.z.sh @@ -1,43 +0,0 @@ -#!/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 index 1a8a71013d..e69de29bb2 100644 --- a/Documentation/windows/ly2dvi-wrapper.sh +++ b/Documentation/windows/ly2dvi-wrapper.sh @@ -1,13 +0,0 @@ -#!/bin/bash -# ly2dvi.sh -- ly2dvi wrapper for Windows - -if echo | python - >/dev/null 2>&1; then - echo -else - cat </dev/null 2>&1; then + echo +else + cat <; Fri, 13 Apr 2001 13:33:43 +0200 -X-XS4ALL-To: -Received: from pop.xs4all.nl - by localhost with POP3 (fetchmail-5.1.2) - for fred@localhost (single-drop); Fri, 13 Apr 2001 13:33:44 +0200 (CEST) -Received: from smtp5.xs4all.nl (smtp5.xs4all.nl [194.109.6.49]) - by maildrop7.xs4all.nl (8.11.1/8.11.1) with ESMTP id f3DBWCd93235 - for ; Fri, 13 Apr 2001 13:32:12 +0200 (CEST) - (envelope-from rz@daimi.au.dk) -Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164]) - by smtp5.xs4all.nl (8.9.3/8.9.3) with ESMTP id NAA10302 - for ; Fri, 13 Apr 2001 13:31:04 +0200 (CEST) -Received: from nightcrawler.daimi.au.dk ([130.225.18.95]) - by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian)) - id 14o1n2-0008Pp-00 - for ; Fri, 13 Apr 2001 07:31:00 -0400 -Received: from daimi.au.dk (localhost [127.0.0.1]) - by nightcrawler.daimi.au.dk (8.11.2/8.11.2) with ESMTP id f3DBUwX31324 - for ; Fri, 13 Apr 2001 13:30:58 +0200 -Sender: rz@daimi.au.dk -Message-ID: <3AD6E372.640DEE61@daimi.au.dk> -Date: Fri, 13 Apr 2001 13:30:58 +0200 -From: Rune Zedeler -X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.16-3 i686) -X-Accept-Language: en -MIME-Version: 1.0 -To: Jan Nieuwenhuizen -Subject: german-chords -Content-Type: multipart/mixed; - boundary="------------69CC07F348020448DD291CA8" -X-UIDL: 987161532.maildrop7.93237 - -*** EOOH *** \version "1.3.148" % german-chords.ly: @@ -84,5 +39,3 @@ X-UIDL: 987161532.maildrop7.93237 ) ) ) - - \ No newline at end of file diff --git a/make/substitute.make b/make/substitute.make index daae40c8fe..59ca7541a2 100644 --- a/make/substitute.make +++ b/make/substitute.make @@ -16,6 +16,7 @@ ATVARIABLES = \ package\ PATHSEP\ PERL\ + prefix\ program_prefix\ program_suffix\ PYTHON\ diff --git a/scm/chord-name.scm b/scm/chord-name.scm index 1e409e4bc7..75d3253501 100644 --- a/scm/chord-name.scm +++ b/scm/chord-name.scm @@ -64,7 +64,7 @@ (define simple-super ;; duh, no docstrings for ;; "No real superscript, just raised and small" - '((raise . 1) (font-relative-size . -1))) + '((raise . 1) (font-relative-size . -2))) (define (accidental->textp acc pos) (if (= acc 0) @@ -73,8 +73,7 @@ (list pos (string-append "accidentals-" (number->string acc)))))) (define (accidental->text acc) (accidental->textp acc 'columns)) -(define (accidental->text-super acc) - (accidental->textp acc '((raise . 0.6) (font-relative-size . -1)))) +(define (accidental->text-super acc) (accidental->textp acc 'simple-super)) (define (accidental->text-sub acc) (accidental->textp acc 'sub)) (define (pitch->note-name pitch) diff --git a/scripts/ly2dvi.py b/scripts/ly2dvi.py index 26f7bd2635..1b9a948292 100644 --- a/scripts/ly2dvi.py +++ b/scripts/ly2dvi.py @@ -279,6 +279,8 @@ def system (cmd, ignore_error = 0): Exit status of CMD """ + if ( os.name != 'posix' ): + cmd = "sh -c \'%s\'" % cmd if verbose_p: progress (_ ("Invoking `%s\'") % cmd) st = os.system (cmd) >> 8 @@ -563,7 +565,7 @@ None if ( os.name == 'posix' ): cmd = 'latex \\\\nonstopmode \\\\input %s' % latex_fn else: - cmd = 'latex \\nonstopmode \\input %s' % latex_fn + cmd = 'latex \\\\\\\\nonstopmode \\\\\\\\input %s' % latex_fn if not verbose_p: progress ( _("Running %s...") % 'LaTeX') @@ -592,8 +594,7 @@ None. if not verbose_p: progress ( _("Running %s...") % 'dvips') - if os.name == 'posix': - cmd = cmd + ' 1> /dev/null 2> /dev/null' + cmd = cmd + ' 1> /dev/null 2> /dev/null' system (cmd) -- 2.39.2