CVSROOT:        /cvsroot/lilypond
Module name:    lilypond
Branch:         
Changes by:     Jan Nieuwenhuizen <[EMAIL PROTECTED]>   05/06/10 08:19:20

Modified files:
        scm            : ps-to-png.scm backend-library.scm 
        .              : VERSION ChangeLog 

Log message:
        * scm/backend-library.scm (postscript->pdf):
        * scm/ps-to-png.scm (make-ps-images): Do not use gs -q switch in
        verbose mode.  Search for several names of gs executable.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/ps-to-png.scm.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/backend-library.scm.diff?tr1=1.34&tr2=1.35&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/VERSION.diff?tr1=1.640&tr2=1.641&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3755&tr2=1.3756&r1=text&r2=text

Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.3755 lilypond/ChangeLog:1.3756
--- lilypond/ChangeLog:1.3755   Fri Jun 10 00:36:20 2005
+++ lilypond/ChangeLog  Fri Jun 10 08:19:19 2005
@@ -1,3 +1,9 @@
+2005-06-10  Jan Nieuwenhuizen  <[EMAIL PROTECTED]>
+
+       * scm/backend-library.scm (postscript->pdf):
+       * scm/ps-to-png.scm (make-ps-images): Do not use gs -q switch in
+       verbose mode.  Search for several names of gs executable.
+
 2005-06-10  Han-Wen Nienhuys  <[EMAIL PROTECTED]>
 
        * lily/ly-module.cc (ly_make_anonymous_module): call make-module
Index: lilypond/VERSION
diff -u lilypond/VERSION:1.640 lilypond/VERSION:1.641
--- lilypond/VERSION:1.640      Wed Jun  8 13:27:24 2005
+++ lilypond/VERSION    Fri Jun 10 08:19:19 2005
@@ -1,6 +1,6 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=5
-PATCH_LEVEL=30
+PATCH_LEVEL=29
 MY_PATCH_LEVEL=
 
Index: lilypond/scm/backend-library.scm
diff -u lilypond/scm/backend-library.scm:1.34 
lilypond/scm/backend-library.scm:1.35
--- lilypond/scm/backend-library.scm:1.34       Thu Jun  9 17:16:46 2005
+++ lilypond/scm/backend-library.scm    Fri Jun 10 08:19:19 2005
@@ -32,14 +32,27 @@
    (regexp-substitute/global #f "[^- 0-9,.a-zA-Z'\"\\]" str 'pre 'post)
    "\""))
 
+(define-public (search-executable names)
+  (define (helper path lst)
+    (if (null? (cdr lst))
+       (car lst)
+       (if (search-path path (car lst)) (car lst)
+           (helper path (cdr lst)))))
+
+  (let ((path (parse-path (getenv "PATH"))))
+    (helper path names)))
+
+(define-public (search-gs)
+  (search-executable '("gs-nox" "gs-8.15" "gs")))
+
 (define-public (postscript->pdf papersizename name)
   (let* ((pdf-name (string-append (basename name ".ps") ".pdf"))
         (cmd (format #f
-                     "gs\
+                     "~a\
+ ~a\
  ~a\
  -dCompatibilityLevel=1.4 \
  -sPAPERSIZE=~a\
- -q\
  -dNOPAUSE\
  -dBATCH\
  -r1200 \
@@ -48,6 +61,8 @@
  -c .setpdfwrite\
  -f ~S\
 "
+                     (search-gs)
+                     (if (ly:get-option 'verbose) "" "-q")
                      (if (ly:get-option 'gs-font-load)
                          " -dNOSAFER "
                          " -dSAFER ")
Index: lilypond/scm/ps-to-png.scm
diff -u lilypond/scm/ps-to-png.scm:1.5 lilypond/scm/ps-to-png.scm:1.6
--- lilypond/scm/ps-to-png.scm:1.5      Thu Jun  9 11:52:05 2005
+++ lilypond/scm/ps-to-png.scm  Fri Jun 10 08:19:19 2005
@@ -27,6 +27,19 @@
 (define (re-sub re sub string)
   (regexp-substitute/global #f re string 'pre sub 'post))
 
+(define (search-executable names)
+  (define (helper path lst)
+    (if (null? (cdr lst))
+       (car lst)
+       (if (search-path path (car lst)) (car lst)
+           (helper path (cdr lst)))))
+
+  (let ((path (parse-path (getenv "PATH"))))
+    (helper path names)))
+
+(define (search-gs)
+  (search-executable '("gs-nox" "gs-8.15" "gs")))
+
 (define (gulp-port port max-length)
   (let ((str (make-string max-length)))
     (read-string!/partial str port)
@@ -82,19 +95,20 @@
 
          ;;png16m is because Lily produces color nowadays.
          (cmd (if multi-page?
-                  (format #f "gs\
+                  (format #f "~a\
+ ~a\
  -dGraphicsAlphaBits=4\
  -dNOPAUSE\
  -dTextAlphaBits=4\
  -sDEVICE=png16m\
  -sOutputFile='~a'\
  -sPAPERSIZE=~a\
- -q\
  -r~S\
  '~a'\
  -c showpage\
  -c quit" output-file paper-size resolution ps-name)
-                  (format #f "gs\
+                  (format #f "~a\
+ ~a\
  -s\
  -dGraphicsAlphaBits=4\
  -dEPSCrop\
@@ -102,10 +116,12 @@
  -dTextAlphaBits=4\
  -sDEVICE=png16m\
  -sOutputFile='~a'\
- -q\
  -r~S\
  '~a'\
- -c quit" output-file resolution ps-name)))
+ -c quit"
+                          (search-gs)
+                          (if verbose? "" "-q")
+                          output-file resolution ps-name)))
          (foo (for-each delete-file (append (dir-re "." png1)
                                             (dir-re "." pngn-re))))
          (bar (if verbose?


_______________________________________________
Lilypond-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs

Reply via email to