]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.5.0.jcn1
authorJan Nieuwenhuizen <janneke@gnu.org>
Fri, 29 Jun 2001 13:19:19 +0000 (15:19 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Fri, 29 Jun 2001 13:19:19 +0000 (15:19 +0200)
1.5.0.jcn1
==========

* Added feature to ly2dvi to find feta pfa font files used in a
postscript file to make printing of direct postscript a bit easier:

    lilypond -fps input/trip.ly
    cat $(ly2dvi -f trip.ps) trip.ps | lpr

* Reincluded 1.4.3.jcn2.

* Website fixes.

* Ly2dvi now leaves .tex and .latex output if latex fails, and cleans
the temp dir if anything fails.

* Fixes for windows scripts.

CHANGES
Documentation/topdocs/INSTALL.texi
Documentation/windows/lily-gs.sh
Documentation/windows/lily-miktex.sh
Documentation/windows/zlily-profile.sh
VERSION
lily/beam.cc
scm/tex.scm
scripts/ly2dvi.py

diff --git a/CHANGES b/CHANGES
index 6fe737d18570866922269712b22a5c85ffc37468..8d267e71ae777edf24f8cdb9afb1e7b1cc54b019 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,21 @@
+1.5.0.jcn1
+==========
+
+* Added feature to ly2dvi to find feta pfa font files used in a
+postscript file to make printing of direct postscript a bit easier:
+
+    lilypond -fps input/trip.ly
+    cat $(ly2dvi -f trip.ps) trip.ps | lpr
+
+* Reincluded 1.4.3.jcn2.
+
+* Website fixes.
+
+* Ly2dvi now leaves .tex and .latex output if latex fails, and cleans
+the temp dir if anything fails.
+
+* Fixes for windows scripts.
+
 1.5.0
 =====
 
index 59f14e5688f8fa5133fa0a409c23919ebe1477d7..c9926959fc10b927d21dc6ad36974ac44857552b 100644 (file)
@@ -499,8 +499,9 @@ Bugs that are not fault of LilyPond are documented here.
 
 Flex (2.5.4a-11) in unstable does not produce g++-3.0 compliant C++
 code.  To compile LilyPond with gcc-3.0 you may do:
+
 @example
-        CC=gcc-3.0 CXX=g++-3.0 ./configure
+        CC=gcc-3.0 CXX=g++-3.0 ./configure --enable-config=gcc-3.0
         make conf=gcc-3.0 -C lily out-gcc-3.0/lexer.cc
         patch -p1 < lexer-gcc-3.0.patch
         make conf=gcc-3.0 -C lily
index 3a559ca47c649d54cab98248eeb8c49949e0844c..5ae3acbad1c26922d034d67de55cb9e7ec160b86 100644 (file)
@@ -3,7 +3,7 @@
 
 
 gs550="/usr/windows/gstools/gs5.50"
-gs650="/usr/windows/gs/gs6.50"
+gs650="/usr/windows/gs/gs6.50/bin"
 
 gsview26="/usr/windows/gstools/gsview"
 gsview36="/usr/windows/Ghostgum/GSview"
index c2c1480dd89aecf4b5ccb62e0f1c4371a7d2bdf2..eb14f1679100e07155fd26a205ec84f86d3d067f 100644 (file)
@@ -10,7 +10,7 @@ reg="$(regtool -q get 'HKLM\Software\MiK\MiKTeX\CurrentVersion\MiKTeX\Install Ro
 b="$(cygpath -u ""$reg"")"
 
 # Where we installed it
-c=texmf="/usr/windows/MiKTeX"
+c="/usr/windows/MiKTeX"
 
 for i in "$a" "$b" "$c"; do
        if [ -d "$i" ]; then
index 23832a5574dca7950d7eb06fc3e1d9539102fdd1..214219902f0a0e9a6c66ca297d98a595379c0466 100644 (file)
@@ -22,6 +22,9 @@ WINDOWS_MFINPUTS="$(cygpath -apw ""$POSIX_MFINPUTS"")"
 export POSIX_TEXINPUTS POSIX_TFMFONTS POSIX_TFMFONTS
 export WINDOWS_TEXINPUTS WINDOWS_TFMFONTS WINDOWS_MFINPUTS
 
+GS_FONTPATH="$WINDOWS_GS_FONTPATH"
+GS_LIB="$WINDOWS_GS_LIB"
+
 PATH="/usr/lilypond/bin:$PATH"
 PATH="@prefix@/bin:$PATH"
 
diff --git a/VERSION b/VERSION
index b76131dbcc4a5fb95ab17ab0b8dd0bd63adb10c7..a05c82245b5557ec2014c02162a41edc0ffefeb8 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=5
 PATCH_LEVEL=0
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=jcn1
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 2f314fa422b4e2bad640ae5ea1bae309ab7d7505..80866325146b3537eff9fbda1e91fcf18f5bb50a 100644 (file)
@@ -825,7 +825,7 @@ Beam::stem_beams (Grob*me,Item *here, Item *next, Item *prev,
       if (lhalfs)              // generates warnings if not
        a =  Lookup::beam (dydx, w + stem_w, thick);
       a.translate (Offset (-w, -w * dydx));
-      //a.translate_axis (stem_w/2, X_AXIS);
+      a.translate_axis (-stem_w/2, X_AXIS);
       for (int j = 0; j  < lhalfs; j++)
        {
          Molecule b (a);
index c002a22b3f3dea5eb4445d47818e04e3a851167f..fb5b8df7dbbebd5e092382bc3a4c267f5d3fc80c 100644 (file)
     "}\\vss}\\interscoreline\n")
   (define (stop-last-line)
     "}\\vss}")
-  (define (xfilledbox breapth width depth height) 
-    (string-append 
-     "\\kern" (number->dim (- breapth))
-     "\\vrule width " (number->dim (+ breapth width))
-     "depth " (number->dim depth)
-     "height " (number->dim height) " "))
-
+  
   (define (filledbox breapth width depth height) 
     (embedded-ps
      (string-append (numbers->string (list breapth width depth height))
index 5ac6d69667a601007bb24da29345591c73fe3f6c..1e9a7329b32ac968d6c4c6cea4085434977d5a8a 100644 (file)
@@ -65,6 +65,7 @@ import shutil
 import __main__
 import operator
 import tempfile
+import traceback
 
 datadir = '@datadir@'
 sys.path.append (datadir + '/python')
@@ -353,6 +354,7 @@ option_definitions = [
        ('', '', 'no-lily', _ ("don't run LilyPond")),
        ('', 'm', 'no-paper', _ ("produce MIDI output only")),
        (_ ("FILE"), 'o', 'output', _ ("write ouput to FILE")),
+       (_ ("FILE"), 'f', 'find-pfa', _ ("find pfa fonts used in FILE")),
        # why capital P?
        ('', 'P', 'postscript', _ ("generate PostScript output")),
        (_ ("KEY=VAL"), 's', 'set', _ ("change global setting KEY to VAL")),
@@ -622,11 +624,39 @@ def generate_dependency_file (depfile, outname):
        df.write ('\n')
        df.close ();
 
+def find_file_in_path (path, name):
+       for d in string.split (path, os.pathsep):
+               if name in os.listdir (d):
+                       return os.path.join (d, name)
+
+# Added as functionality to ly2dvi, because ly2dvi may well need to do this
+# in future too.
+PS = '%!PS-Adobe'
+def find_pfa_fonts (name):
+       s = open (name).read ()
+       if s[:len (PS)] != PS:
+               # no ps header?
+               errorport.write (_( "error: ") + _ ("not a PostScript file: `%s\'" % name))
+               errorport.write ('\n')
+               sys.exit (1)
+       here = 0
+       m = re.match ('.*?/(feta[-a-z0-9]+) +findfont', s[here:], re.DOTALL)
+       pfa = []
+       while m:
+               here = m.end (1)
+               pfa.append (m.group (1))
+               m = re.match ('.*?/(feta[-a-z0-9]+) +findfont', s[here:], re.DOTALL)
+       return pfa
+
+       
 (sh, long) = getopt_args (__main__.option_definitions)
 try:
        (options, files) = getopt.getopt(sys.argv[1:], sh, long)
-except getopt.error, s: 
-       errorport.write ("\nerror: getopt says `%s\'\n\n" % s)
+except getopt.error, s:
+       errorport.write ('\n')
+       errorport.write (_( "error: ") + _ ("getopt says: `%s\'" % s))
+       errorport.write ('\n')
+       errorport.write ('\n')
        help ()
        sys.exit (2)
        
@@ -639,6 +669,13 @@ for opt in options:
        elif o == '--help' or o == '-h':
                help ()
                sys.exit (0)
+       elif o == '--find-pfa' or o == '-f':
+               fonts = map (lambda x: x + '.pfa', find_pfa_fonts (a))
+               files = map (lambda x:
+                            find_file_in_path (os.environ['GS_FONTPATH'], x),
+                            fonts)
+               print string.join (files, ' ')
+               sys.exit (0)
        elif o == '--include' or o == '-I':
                include_path.append (a)
        elif o == '--postscript' or o == '-P':
@@ -702,8 +739,10 @@ include_path = map (abspath, include_path)
 
 original_output = output_name
 
+
 if files and files[0] != '-':
 
+       # Ugh, maybe make a setup () function
        files = map (lambda x: strip_extension (x, '.ly'), files)
 
        (outdir, outbase) = ('','')
@@ -738,40 +777,44 @@ if files and files[0] != '-':
 
        os.chdir (tmpdir)
        
-       extra = extra_init
-       
        if lily_p:
-##             try:
+               try:
                        run_lilypond (files, outbase, dep_prefix)
-## #           except:
-##                     # TODO: friendly message about LilyPond setup/failing?
-##                     #
-##                     # TODO: lilypond should fail with different
-##                     # error codes for:
-##                     #   - guile setup/startup failure
-##                     #   - font setup failure
-##                     #   - init.ly setup failure
-##                     #   - parse error in .ly
-##                     #   - unexpected: assert/core dump
-## #                   targets = {}
+               except:
+                       # TODO: friendly message about LilyPond setup/failing?
+                       #
+                       # TODO: lilypond should fail with different
+                       # error codes for:
+                       #   - guile setup/startup failure
+                       #   - font setup failure
+                       #   - init.ly setup failure
+                       #   - parse error in .ly
+                       #   - unexpected: assert/core dump
+                       targets = {}
+                       traceback.print_exc ()
 
        if targets.has_key ('DVI') or targets.has_key ('PS'):
-#              try:
-                       run_latex (files, outbase, extra)
+               try:
+                       run_latex (files, outbase, extra_init)
                        # unless: add --tex, or --latex?
                        del targets['TEX']
                        del targets['LATEX']
-#              except Foobar:
-#                      # TODO: friendly message about TeX/LaTeX setup,
-#                      # trying to run tex/latex by hand
-#                      if targets.has_key ('DVI'):
-#                              del targets['DVI']
-#                      if targets.has_key ('PS'):
-#                              del targets['PS']
-
-       # TODO: does dvips ever fail?
+               except:
+                       # TODO: friendly message about TeX/LaTeX setup,
+                       # trying to run tex/latex by hand
+                       if targets.has_key ('DVI'):
+                               del targets['DVI']
+                       if targets.has_key ('PS'):
+                               del targets['PS']
+                       traceback.print_exc ()
+
        if targets.has_key ('PS'):
-               run_dvips (outbase, extra)
+               try:
+                       run_dvips (outbase, extra_init)
+               except: 
+                       if targets.has_key ('PS'):
+                               del targets['PS']
+                       traceback.print_exc ()
 
        # add DEP to targets?
        if track_dependencies_p:
@@ -780,6 +823,7 @@ if files and files[0] != '-':
                if os.path.isfile (depfile):
                        progress (_ ("dependencies output to `%s'...") % depfile)
 
+       # Hmm, if this were a function, we could call it the except: clauses
        for i in targets.keys ():
                ext = string.lower (i)
                cp_to_dir ('.*\.%s$' % ext, outdir)
@@ -799,7 +843,7 @@ if files and files[0] != '-':
        cleanup_temp ()
        
 else:
-       # FIXME
+       # FIXME: read from stdin when files[0] = '-'
        help ()
        errorport.write ("ly2dvi: " + _ ("error: ") + _ ("no files specified on command line.") + '\n')
        sys.exit (2)