+2005-07-19 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ * lily/main.cc (main): Remove invalid handle kludge.
+
+ * scm/lily.scm (running-from-gui?): WINDOWS: check -dgui.
+ (lambda): add gui define.
+
2005-07-15 Graham Percuval <gperlist@shaw.ca>
* Documentation/user/ <various>: backported stuff.
(preview-include-book-title #t "include book-titles in preview images.")
(gs-font-load #f
"load fonts via Ghostscript.")
+ (gui #f "running from gui; redirect stderr to log file")
(delete-intermediate-files #f
"delete unusable PostScript files")
(verbose #f "value for the --verbose flag")
(string-downcase
(car (string-tokenize (vector-ref (uname) 0) char-set:letter)))))
+(define-public DOS
+ (let ((platform (string-tokenize
+ (vector-ref (uname) 0) char-set:letter+digit)))
+ (if (null? (cdr platform)) #f
+ (member (string-downcase (cadr platform)) '("95" "98" "me")))))
+
(case PLATFORM
((windows)
(define native-getcwd getcwd)
;; If no TTY and not using safe, assume running from GUI.
(cond
((eq? PLATFORM 'windows)
+ (if DOS #f
;; This only works for i586-mingw32msvc-gcc -mwindows
(not (string-match "standard input"
- (format #f "~S" (current-input-port)))))
+ (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?)))))