From e54464202c43ce23cd5667a2e42aca0905efb44e Mon Sep 17 00:00:00 2001 From: Masamichi Hosoda Date: Mon, 1 Jun 2015 22:18:22 +0900 Subject: [PATCH] Issue 4431 / 4: Add MinGW support of scale-down-image (ps-to-png.scm) scale-down-image can work on MinGW by this commit. --- scm/ps-to-png.scm | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/scm/ps-to-png.scm b/scm/ps-to-png.scm index 0d1e174ed6..e890eaa746 100644 --- a/scm/ps-to-png.scm +++ b/scm/ps-to-png.scm @@ -57,18 +57,17 @@ ;; outputs only standard output instead of a file. ;; So we need pipe and redirection. ;; However, ly:system can't handle them. - ;; Therefore, we use /bin/sh for handling them. - ;; FIXME: MinGW (except Cygwin) doesn't have /bin/sh. + ;; Therefore, we use ly:system-with-shell. (cmd - (list - "/bin/sh" - "-c" - (ly:format - "pngtopnm \"~a\" | pnmscale -reduce ~a | pnmtopng -compression 9 > \"~a\"" - old factor file)))) + (ly:format + "~a \"~a\" | ~a -reduce ~a | ~a -compression 9 > \"~a\"" + (search-pngtopam) old + (search-pamscale) factor + (search-pnmtopng) + file))) (rename-file file old) - (ly:system cmd) + (ly:system-with-shell cmd) (delete-file old))) (define-public (ps-page-count ps-name) -- 2.39.5