Closed pts closed 1 year ago
It works on macOS Ventura 13.3, both with 64-bit Intel x86 (amd64, x86_64) processor and Apple Silicon (ARM processor). The programs are compiled for 64-bit Intel x86, and on Apple Silicon they are run by the built-in Rosetta 2 emulation.
Program binaries are available from https://github.com/pts/pdfsizeopt/releases/download/2023-02-20/pdfsizeopt_libexec_darwinc64-v3.tar.gz . Installation instructions on https://github.com/pts/pdfsizeopt have been updated.
For this project, a modern Mac is running Mac OS X Leopard 10.5 or later
As someone who appreciates support for old hardware, I'd like to note my appreciation of this unusual definition of "modern". :-)
This issue was split from https://github.com/pts/pdfsizeopt/issues/154
A plan to make pdfsizeopt work and easy to install on modern Macs (including Apple Silicon, but also 64-bit x86):
python
: Python 2.7, compiled from sources using https://github.com/pts/staticpythongs
: Ghostscript 9.14.1, compiled from sources (see @rbubley's porting work for instructions) or Ghostscript 9.05, compiled from sources (with patches by @pts, currently unreleased)jbig2
: Compiled from sources using https://github.com/pts/pdfsizeopt-jbig2/blob/master/c-darwinc64.shsam2p
: It's actually imgdataopt renamed tosam2p
, compiled from sources using https://github.com/pts/imgdataopt/blob/3bc94634e06dc21093055ded22336a9b0bab44b9/Makefile#L40pngout
: macOS 64-bit x86 binary downloaded from http://www.jonof.id.au/kenutils.html . Which is the minimum supported macOS version? Can we patch it to make it more backwards-compatible? Nevertheless, if it doesn't work, we can disable it withpdfsizeopt --use-pngout=no
.qpdf
: Optional dependency, compiled from sources using https://github.com/pts/pts-qpdfI've created https://github.com/pts/pts-osxcross for conveniently cross-compiling macOS amd64 C and C++ programs on Linux amd64.
Program executable binary download link: https://github.com/pts/pdfsizeopt/releases/download/2023-02-20/pdfsizeopt_libexec_darwinc64-v3.tar.gz .
Notes:
python
: Downloaded from https://www.python.org/ftp/python/2.7.16/python-2.7.16-macosx10.6.pkg , and shell script to set upDYLD_LIBRARY_PATH
added. It works on macOS Snow Leopard 10.6 or later. There was a system Python 2.7 (in/usr/bin/python
) in macOS Big Sur 11 or earlier (with/usr/bin/python
being Python 2.7) which worked, but it has been removed in macOS Montery 12, which only has Python 3 (as/usr/bin/python3
).gs
: Used the executable in Ghostscript 9.05 downloaded from https://ftp.math.utah.edu/pub/tex/historic/systems/mactex/2012/mactexadditions20120707.pkgjbig2
: Compiled from sources: https://github.com/pts/pdfsizeopt-jbig2sam2p
: Actually imgdataopt compiled from sources: https://github.com/pts/imgdataoptpngout
: Reused the 64-bit Intel x86 executable from https://github.com/pts/pdfsizeopt/releases/download/2017-09-03d/pdfsizeopt_libexec_darwin-v1.tar.gzqpdf
: QPDF 6.0.0 compiled from sources: https://github.com/pts/pts-qpdf