From: Masamichi Hosoda Date: Mon, 1 Jun 2015 13:18:22 +0000 (+0900) Subject: Issue 4431 / 4: Add MinGW support of scale-down-image (ps-to-png.scm) X-Git-Tag: release/2.19.22-1~45 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e54464202c43ce23cd5667a2e42aca0905efb44e;p=lilypond.git Issue 4431 / 4: Add MinGW support of scale-down-image (ps-to-png.scm) scale-down-image can work on MinGW by this commit. --- 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)