]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/backend-library.scm
(setup_paths): Bugfix: pangorc is not pango.modules.
[lilypond.git] / scm / backend-library.scm
index 756d6c6638ad70cde0badec3a18f5bf9e39fe453..47b6a208955361e5688864ac4efa8c8c694d7212 100644 (file)
@@ -36,8 +36,8 @@
   (let* ((pdf-name (string-append (basename name ".ps") ".pdf" ))
         (cmd (format #f
                      "gs\
+ -dSAFER\
  -dCompatibilityLevel=1.4 \
- ~S\
  -sPAPERSIZE=~a\
  -q\
  -dNOPAUSE\
  -c .setpdfwrite\
  -f ~S\
 "
-                     ;; gs on windows with -dSAFER fails on opening a
-                     ;; file that has no group read permissions.
-                     (if (eq? PLATFORM 'windows) "" "-dSAFER")
                      (sanitize-command-option papersizename)
                      pdf-name
                      name)))
+    ;; The wrapper on windows cannot handle `=' signs,
+    ;; gs has a workaround with #.
+    (if (eq? PLATFORM 'windows)
+       (set! cmd (string-regexp-substitute "=" "#" cmd)))
 
     (if (access? pdf-name W_OK)
        (delete-file pdf-name))
 
     (ly:message (_ "Converting to `~a'...") pdf-name)
     (ly:progress "\n")
-    (ly:system cmd)))
+    (ly:system cmd)
+    (if (running-from-gui?) (delete-file name))))
 
 (define-public (postscript->png resolution papersizename name)
   (let* ((prefix (ly:effective-prefix))