CVSROOT: /cvsroot/lilypond
Module name: lilypond
Branch:
Changes by: Han-Wen Nienhuys <[EMAIL PROTECTED]> 05/06/14 00:19:37
Modified files:
. : ChangeLog
lily : main.cc
scm : backend-library.scm framework-ps.scm
framework-tex.scm
Log message:
* lily/main.cc (parse_argv): only set output format to pdf if no
other format specified.
* scm/backend-library.scm (postprocess-output): process
'delete-intermediate-files after running convert-to-*. This fixes
PNG generation when 'delete-intermediate-files is set.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3772&tr2=1.3773&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/main.cc.diff?tr1=1.263&tr2=1.264&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/backend-library.scm.diff?tr1=1.37&tr2=1.38&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/framework-ps.scm.diff?tr1=1.116&tr2=1.117&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/framework-tex.scm.diff?tr1=1.82&tr2=1.83&r1=text&r2=text
Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.3772 lilypond/ChangeLog:1.3773
--- lilypond/ChangeLog:1.3772 Mon Jun 13 13:13:45 2005
+++ lilypond/ChangeLog Tue Jun 14 00:19:36 2005
@@ -1,3 +1,12 @@
+2005-06-14 Han-Wen Nienhuys <[EMAIL PROTECTED]>
+
+ * lily/main.cc (parse_argv): only set output format to pdf if no
+ other format specified.
+
+ * scm/backend-library.scm (postprocess-output): process
+ 'delete-intermediate-files after running convert-to-*. This fixes
+ PNG generation when 'delete-intermediate-files is set.
+
2005-06-13 Han-Wen Nienhuys <[EMAIL PROTECTED]>
* buildscripts/mutopia-index.py (list_item): thinko. Fixes png
Index: lilypond/lily/main.cc
diff -u lilypond/lily/main.cc:1.263 lilypond/lily/main.cc:1.264
--- lilypond/lily/main.cc:1.263 Sun Jun 12 16:33:21 2005
+++ lilypond/lily/main.cc Tue Jun 14 00:19:37 2005
@@ -56,7 +56,7 @@
One of (gnome, ps [default], scm, svg, tex, texstr)") */
String output_backend_global = "ps";
/* Output formats to generate. */
-String output_format_global = "pdf";
+String output_format_global = "";
bool is_pango_format_global;
bool is_TeX_format_global;
@@ -713,6 +713,9 @@
}
}
+ if (output_format_global == "")
+ output_format_global = "pdf";
+
if (show_help)
{
identify (stdout);
Index: lilypond/scm/backend-library.scm
diff -u lilypond/scm/backend-library.scm:1.37
lilypond/scm/backend-library.scm:1.38
--- lilypond/scm/backend-library.scm:1.37 Sun Jun 12 18:42:49 2005
+++ lilypond/scm/backend-library.scm Tue Jun 14 00:19:37 2005
@@ -82,9 +82,7 @@
(ly:message (_ "Converting to `~a'...") pdf-name)
(ly:progress "\n")
(ly:system cmd)
-
- (if (ly:get-option 'delete-intermediate-files)
- (delete-file name))))
+ ))
(use-modules (scm ps-to-png))
(define-public (postscript->png resolution paper-size-name name)
@@ -100,11 +98,27 @@
(ly:progress "\n")))
(define-public (postprocess-output paper-book module filename formats)
- (for-each
- (lambda (f)
- ((eval (string->symbol (string-append "convert-to-" f)) module)
- paper-book filename))
- formats))
+ (let*
+ ((completed (completize-formats formats))
+ (base (string-regexp-substitute "\\.[a-z]+$" "" filename))
+ (intermediate (remove
+ (lambda (x)
+ (member x formats))
+ completed)))
+ (for-each
+ (lambda (f)
+ ((eval (string->symbol (string-append "convert-to-" f)) module)
+ paper-book filename))
+ completed)
+
+ (if (ly:get-option 'delete-intermediate-files)
+ (for-each
+ (lambda (f)
+ (display (string-append base "." f))
+ (display "del\n")
+ (delete-file (string-append base "." f)))
+ intermediate))
+ ))
(define-public (completize-formats formats)
(define new-fmts '())
Index: lilypond/scm/framework-ps.scm
diff -u lilypond/scm/framework-ps.scm:1.116 lilypond/scm/framework-ps.scm:1.117
--- lilypond/scm/framework-ps.scm:1.116 Thu Jun 9 14:09:33 2005
+++ lilypond/scm/framework-ps.scm Tue Jun 14 00:19:37 2005
@@ -424,7 +424,7 @@
(display "%%Trailer\n%%EOF\n" port)
(ly:outputter-close outputter)
(postprocess-output book framework-ps-module filename
- (completize-formats (ly:output-formats)))))
+ (ly:output-formats))))
(if (not (defined? 'nan?))
(define (nan? x) #f))
@@ -501,7 +501,7 @@
(postprocess-output book framework-ps-module
(format "~a.preview.eps" basename)
- (completize-formats (cons "png" (ly:output-formats))))))
+ (cons "png" (ly:output-formats)))))
(if #f
(define-public (output-preview-framework basename book scopes fields)
@@ -522,7 +522,7 @@
(postprocess-output book framework-ps-module
(format "~a.preview.eps" basename)
- (completize-formats (ly:output-formats))))))
+ (ly:output-formats)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-public (convert-to-pdf book name)
Index: lilypond/scm/framework-tex.scm
diff -u lilypond/scm/framework-tex.scm:1.82 lilypond/scm/framework-tex.scm:1.83
--- lilypond/scm/framework-tex.scm:1.82 Thu Jun 9 14:09:33 2005
+++ lilypond/scm/framework-tex.scm Tue Jun 14 00:19:37 2005
@@ -371,3 +371,4 @@
(define-public (convert-to-tex book name)
#t)
+
_______________________________________________
Lilypond-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs