X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Flily.scm;h=4afe0fb8beec66b981e74ef61e189eaa96bc0e17;hb=d6b4b8b0b781f6d004a5d969fd514cc58f63914f;hp=893cc59243f8b7ef45819aa78465878f2bf64b19;hpb=11c5f843dee7efbdae99c59c2afcaf0256204107;p=lilypond.git diff --git a/scm/lily.scm b/scm/lily.scm index 893cc59243..4afe0fb8be 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -28,13 +28,16 @@ ;; - [subject-]-verb-object-object (anti-alias-factor 1 "render at higher resolution and scale down result\nto prevent jaggies in PNG") + (backend ps "which backend to use by default; Options: eps, ps [default], scm, svg, tex, texstr)") (check-internal-types #f "check every property assignment for types") (clip-systems #f "Generate cut-out snippets of a score") (debug-gc #f "dump memory debugging statistics") (debug-gc-assert-parsed-dead #f "for memory debugging: ensure that all refs to parsed objects are dead. This is an internal option, and is switched on automatically for -ddebug-gc.") (debug-lexer #f "debug the flex lexer") + (debug-page-breaking-scoring #f "dump scores for many different page breaking configurations") (debug-parser #f "debug the bison parser") + (debug-property-callbacks #f "debug cyclic callback chains") (debug-skylines #f "debug skylines") (delete-intermediate-files #f "delete unusable PostScript files") @@ -57,6 +60,8 @@ similar to chord syntax") (point-and-click #t "use point & click") (paper-size "a4" "the default paper size") (pixmap-format "png16m" "GS format to use for pixel images") + (preview #f "make a incipit image. ") + (print-pages #t "print pages normally. ") (protected-scheme-parsing #t "continue when finding errors in inline scheme are caught in the parser. If off, halt on errors, and print a stack trace.") @@ -137,7 +142,7 @@ on errors, and print a stack trace.") (coverage:enable)) (define-public tex-backend? - (member (ly:output-backend) '("texstr" "tex"))) + (member (ly:get-option 'backend) '(texstr tex))) (define-public parser #f) @@ -539,17 +544,28 @@ The syntax is the same as `define*-public'." (define-public (lilypond-main files) "Entry point for LilyPond." - (define (no-files-handler) - (ly:usage) - (exit 2)) (eval-string (ly:command-line-code)) + + (if (ly:get-option 'help) + (begin + (ly:option-usage) + (exit 0))) + + (if (ly:get-option 'show-available-fonts) + (begin + (ly:font-config-display-fonts) + (exit 0) + )) + (if (ly:get-option 'gui) (gui-main files)) (if (null? files) - (no-files-handler)) + (begin + (ly:usage) + (exit 2))) (if (ly:get-option 'read-file-list) (set! files @@ -633,21 +649,12 @@ The syntax is the same as `define*-public'." (ly:error (_ "failed files: ~S") (string-join failed)) (exit 1)) (begin + (ly:do-atexit) ;; HACK: be sure to exit with single newline (ly:message "") (exit 0))))) (define-public (lilypond-all files) - (if (ly:get-option 'help) - (begin - (ly:option-usage) - (exit 0))) - (if (ly:get-option 'show-available-fonts) - (begin - (ly:font-config-display-fonts) - (exit 0) - )) - (let* ((failed '()) (separate-logs (ly:get-option 'separate-log-files)) (do-measurements (ly:get-option 'dump-profile))