diff options
-rwxr-xr-x | Build/extra/epstopdf/epstopdf.pl | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/Build/extra/epstopdf/epstopdf.pl b/Build/extra/epstopdf/epstopdf.pl index 0bf495e9fb9..9c10880c69d 100755 --- a/Build/extra/epstopdf/epstopdf.pl +++ b/Build/extra/epstopdf/epstopdf.pl @@ -35,10 +35,13 @@ # # emacs-page # -my $ver = "2.29"; +my $ver = "2.30"; +# 2022/09/05 v2.30 (Siep Kroonenberg) +# * still use gswin32c if gswin64c.exe not on PATH. # 2022/08/29 v2.29 (Karl Berry) +# * use gswin64c.exe on 64-bit Windows. # 2018/09/17 v2.28 (Karl Berry) -# * use gswin64c on 64-bit Windows. +# * -dCompatibilityLevel=1.5 by default, since gs9.25 switched to 1.7. # 2017/09/14 v2.27 (Karl Berry) # * extract value from --gsopt with $3 not $2 (extra regexp group # added previously), and check it with ^(...)$ so anchors apply to all. @@ -207,11 +210,18 @@ my $on_windows_or_cygwin = $on_windows || $^O eq "cygwin"; ### ghostscript command name my $GS = "gs"; if ($on_windows) { + $GS = "gswin32c"; if ($ENV{"PROCESSOR_ARCHITECTURE"} eq "AMD64" || $ENV{"PROCESSOR_ARCHITEW6432"} eq "AMD64") { - $GS = "gswin64c"; - } else { - $GS = "gswin32c"; + # prefer gswin64c.exe if on search path. + my @pdirs = split(/;/, $ENV{"PATH"}); + foreach $d (@pdirs) { + $d = substr ($d, 1, -1) if (substr ($d,1,1) eq '"'); + if (-f $d . "/gswin64c.exe") { + $GS = "gswin64c"; + last; + } + } } } |