From daaf674ed7b6cafb75bd7f1a0f6c9737c1525d29 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sun, 23 Oct 2005 19:04:01 +0000 Subject: [PATCH] *** empty log message *** --- ChangeLog | 5 +++++ cygwin/README.in | 16 ++++++---------- cygwin/lilypond.hint | 9 ++++----- cygwin/postinstall-lilypond.sh | 2 ++ lily/lily-parser-scheme.cc | 13 +++++++------ scm/lily.scm | 26 ++++---------------------- 6 files changed, 28 insertions(+), 43 deletions(-) diff --git a/ChangeLog b/ChangeLog index 94ddca93ad..3b47fb73bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-10-23 Jan Nieuwenhuizen + + * scm/lily.scm: Remove horrendous running-from-gui? kludge. + (lilypond-main): Redirect to gui-main if 'gui is set. + 2005-10-23 Erik Sandberg * scripts/lilypond-book.py: Backport bugfix by Mats Bengtsson. diff --git a/cygwin/README.in b/cygwin/README.in index 2d097d40e2..2be5f9a111 100644 --- a/cygwin/README.in +++ b/cygwin/README.in @@ -8,26 +8,22 @@ For more information, tutorial, documentation, packaging instructions, visit: Runtime requirements: bash cygwin-1.5.11 or newer - ec-fonts-mftraced ghostscript glib2-runtime libfontconfig1 libfreetype2 libguile12-1.6.5-1 or newer libiconv2 - libintl2 - libkpathsea3-2.0.2-15 or newer + libintl3 pango-runtime python - tetex-bin-2.0.2-15 or newer - tetex-tiny or tetex-base Suggested: xorg-x11-base emacs or vim ghostscript-x11 rxvt - tetex-x11 + libkpathsea4-3.0.0-3 or newer gv Build requirements: @@ -43,12 +39,12 @@ Build requirements: libfontconfig-devel libfreetype2-devel libguile12-1.6.5-1 or newer - libkpathsea3-2.0.2-15 or newer + libkpathsea4-3.0.0-3 or newer pango-devel python sed - tetex-devel-2.0.2-15 or newer - texinfo-4.7 or newer + tetex-devel-3.0.0-3 or newer + texinfo-4.8 or newer Website/documentation build requirements (lilypond-doc package): @@ -102,7 +98,7 @@ Port notes: LilyPond builds ootb with cygwin/mknetrel. - Cygwin port maintained by: Bertalan Fodor + Cygwin port maintained by: Jan Nieuwenhuizen. ------------------ diff --git a/cygwin/lilypond.hint b/cygwin/lilypond.hint index bfa4cf8bd5..c0728e0334 100644 --- a/cygwin/lilypond.hint +++ b/cygwin/lilypond.hint @@ -1,8 +1,7 @@ sdesc: "A program for printing sheet music" category: Publishing -requires: bash coreutils cygwin findutils ghostscript glib2-runtime libfontconfig1 libfreetype2 libguile12 libiconv2 libintl3 pango-runtime python _update-info-dir -#suggests: emacs gsview lilypond-doc rxvt tetex-x11 xorg-x11-base libkpathsea4 +requires: bash coreutils cygwin findutils ghostscript glib2-runtime libfontconfig1 libfreetype26 libguile12 libiconv2 libintl3 pango-runtime python _update-info-dir +#suggests: emacs gsview libkpathsea4 lilypond-doc tetex-bin tetex-tiny rxvt xorg-x11-base ldesc: "A program for printing sheet music. -LilyPond prints beautiful sheet music. It produces music notation -from a description file. It excels at typesetting classical music, but -you can also print pop-songs. LilyPond is part of the GNU Project." +LilyPond lets you create music notation. It produces +beautiful sheet music from a high-level description file." diff --git a/cygwin/postinstall-lilypond.sh b/cygwin/postinstall-lilypond.sh index c56894e874..fbffab2c3e 100644 --- a/cygwin/postinstall-lilypond.sh +++ b/cygwin/postinstall-lilypond.sh @@ -25,3 +25,5 @@ regtool add '/root/LilyPond/shell/generate' regtool set '/root/LilyPond/shell/generate/' '&Generate PDF ...' regtool add '/root/LilyPond/shell/generate/command' regtool set '/root/LilyPond/shell/generate/command/' $ROOT'\bin\bash.exe --login -c '"'"'/usr/bin/lily-wins "%1"'"'" + +(cd /usr/share/info/lilypond && ln -sf ../../doc/lilypond/Documentation/user/out-www/*png .) diff --git a/lily/lily-parser-scheme.cc b/lily/lily-parser-scheme.cc index 006e556027..84b8f0355b 100644 --- a/lily/lily-parser-scheme.cc +++ b/lily/lily-parser-scheme.cc @@ -8,15 +8,16 @@ #include +#include "file-name-map.hh" #include "file-name.hh" #include "file-path.hh" -#include "main.hh" -#include "lily-parser.hh" -#include "warn.hh" -#include "source.hh" #include "lily-lexer.hh" +#include "lily-parser.hh" #include "ly-module.hh" -#include "file-name-map.hh" +#include "main.hh" +#include "program-option.hh" +#include "source.hh" +#include "warn.hh" /* Do not append `!' suffix, since 1st argument is not modified. */ LY_DEFINE (ly_set_point_and_click, "ly:set-point-and-click", @@ -52,7 +53,7 @@ LY_DEFINE (ly_parse_file, "ly:parse-file", /* When running from gui, generate output in .ly source directory. */ if (output_name_global.is_empty () - && scm_call_0 (ly_lily_module_constant ("running-from-gui?")) == SCM_BOOL_T) + && ly_get_option (ly_symbol2scm ("gui")) == SCM_BOOL_T) { File_name f (file); f.base_ = ""; diff --git a/scm/lily.scm b/scm/lily.scm index 1157940f2b..4f1f0d3a04 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -348,6 +348,9 @@ The syntax is the same as `define*-public'." (define-public (lilypond-main files) "Entry point for LilyPond." + (if (ly:get-option 'gui) + (gui-main files)) + (if (null? files) (no-files-handler)) @@ -385,29 +388,12 @@ The syntax is the same as `define*-public'." (use-modules (scm editor)) -(define-public (running-from-gui?) - (let ((have-tty? (isatty? (current-input-port)))) - ;; If no TTY and not using safe, assume running from GUI. - (cond - ((eq? PLATFORM 'windows) - ;; Always write to .log file. - (if DOS #t - ;; This only works for i586-mingw32msvc-gcc -mwindows - (not (string-match "standard input" - (format #f "~S" (current-input-port)))))) - ;; FIXME: using -dgui would be nice, but it does not work - ((eq? PLATFORM 'foo-windows) - (ly:get-option 'gui)) - ((eq? PLATFORM 'darwin) #f) - (else - (not have-tty?))))) - (define-public (gui-main files) (if (null? files) (gui-no-files-handler)) (let* ((base (basename (car files) ".ly")) (log-name (string-append base ".log"))) - (if (not (running-from-gui?)) + (if (not (ly:get-option 'gui)) (ly:message (_ "Redirecting output to ~a...") log-name)) (ly:stderr-redirect log-name "w") (ly:message "# -*-compilation-*-") @@ -430,7 +416,3 @@ The syntax is the same as `define*-public'." (ly:message (_ "Invoking `~a'...") cmd) (system cmd) (exit 1))) - -(or (not (running-from-gui?)) - (ly:get-option 'safe) - (define lilypond-main gui-main)) -- 2.39.5