;;;;
;;;; source file of the GNU LilyPond music typesetter
;;;;
-;;;; (c) 2005--2006 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; (c) 2005--2009 Jan Nieuwenhuizen <janneke@gnu.org>
;; gui debug helper
;; (define (exit x) (system "sleep 10"))
;; argv0 relocation -- do in wrapper?
-(define LILYPONDPREFIX
+(define LILYPOND_DATADIR
(let* ((prefix
- (or (getenv "LILYPONDPREFIX")
+ (or (getenv "LILYPOND_DATADIR")
(dirname (dirname (car (command-line)))))))
(define-public (_ x) x))
(define (show-version port)
- (format port "~a (GNU LilyPond) ~a \n" PROGRAM-NAME TOPLEVEL-VERSION))
+ (format port "~a (GNU LilyPond) ~a\n" PROGRAM-NAME TOPLEVEL-VERSION))
(define (show-help port)
(format port (_ "Usage: lilypond-invoke-editor [textedit://]FILE:LINE:CHAR:COLUMN
(define (strip-framework-path var)
(define pat "lilypond/usr")
- (let*
- ((val (getenv var))
- (paths (string-split val #\:))
- (without (remove (lambda (s) (string-contains s pat))
- paths)))
-
- (if (not (= (length without)
- (length paths)))
- (setenv var (string-join without ":")))))
+ (if (getenv var)
+ (let*
+ ((val (getenv var))
+ (paths (string-split val #\:))
+ (without (remove (lambda (s) (string-contains s pat))
+ paths)))
+
+ (if (not (= (length without)
+ (length paths)))
+ (setenv var (string-join without ":"))))))
(define (main args)
(let ((files (parse-options args)))
(begin
(show-help (current-error-port))
(exit 2)))
- (set! %load-path (cons LILYPONDPREFIX %load-path))
+ (set! %load-path (cons LILYPOND_DATADIR %load-path))
(primitive-eval '(use-modules (scm editor)))