]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/framework-ps.scm
* ps/music-drawing-routines.ps (mark_file_line): Switch Action
[lilypond.git] / scm / framework-ps.scm
index b6d06bb4799169a24bf36e13902ff4ab62dbf56a..620042278d664857cbc6e8ddf7d011817ae0ec70 100644 (file)
                        ""))))
                  (filter string? font-names))))
           pfas))
-      
 
+  ;; FIXME: user preference, somehow?
+  (define (pdf-viewer)
+    (define (find-alternative path lst)
+      (let ((command (search-path path (car lst))))
+       (if (or command (null? lst)) command
+           (find-alternative path (cdr lst)))))
+    (let ((path (parse-path (getenv "PATH")))
+         (pdf-viewers '("acroread" "gpdf" "kpdf" "xpdf" "gv" "echo")))
+      (find-alternative path pdf-viewers)))
+  
+  (format port "/pdf-viewer (~a) def\n" (basename (pdf-viewer)))
   (display (procset "music-drawing-routines.ps") port)
   (display (procset "lilyponddefs.ps") port)
   (if load-fonts?