cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1 | Mac OS X-specific Build instructions |
dirk | d2ad024 | 2015-07-18 12:18:20 +0000 | [diff] [blame] | 2 | |
| 3 | In order to install ImageMagick on OSX, you will first need Apple's "Xcode", |
| 4 | which you can get by going to the AppStore and searching for "Xcode" and |
| 5 | installing it. |
| 6 | |
| 7 | Next, you will need to install the "Xcode Command Line Tools" which includes |
| 8 | the compiler. You can install those by running the following command in the |
| 9 | Terminal: |
| 10 | |
| 11 | xcode-select --install |
| 12 | |
| 13 | Now that you have the necessary tools, you have a choice of how to install |
| 14 | ImageMagick. The simplest method is to use "homebrew", and that method is shown |
| 15 | first below. The alternative method is to install from source, which is shown |
| 16 | afterwards. |
| 17 | |
| 18 | ################################################################################ |
| 19 | Method 1: Using "homebrew" |
| 20 | ################################################################################ |
| 21 | |
| 22 | Go to http://brew.sh and copy the one-liner that installs "homebrew". |
| 23 | |
| 24 | Paste that into the Terminal and run it. |
| 25 | |
| 26 | For the very simplest, fastest, most basic ImageMagick installation, run: |
| 27 | |
| 28 | brew install imagemagick |
| 29 | |
| 30 | Test your installation by running: |
| 31 | |
| 32 | identify -version |
| 33 | |
| 34 | If you want to add support for extra features, such as HDRI, Perl, JPEG2000, |
| 35 | pango,fftw, TIFF or rsvg etc. you can find the necessary switches by running: |
| 36 | |
| 37 | brew options imagemagick |
| 38 | |
| 39 | then find the options you need and apply them like this: |
| 40 | |
| 41 | brew reinstall imagemagick --with-jp2 --with-librsvg --with-quantum-depth-16 --with-pango |
| 42 | |
| 43 | If you have any problems with "homebrew", simply run: |
| 44 | |
| 45 | brew doctor |
| 46 | |
| 47 | and follow the doctor's advice. |
| 48 | |
| 49 | |
| 50 | ################################################################################ |
| 51 | Method 2: Compile from source - not necessary if you used "homebrew" method |
| 52 | ################################################################################ |
| 53 | |
| 54 | |
| 55 | Perform these steps as an administrator or with the sudo command: |
cristy | ebe41ab | 2010-01-14 02:58:18 +0000 | [diff] [blame] | 56 | |
dirk | d2ad024 | 2015-07-18 12:18:20 +0000 | [diff] [blame] | 57 | Install MacPorts. Download and install http://www.macports.org/ and type the |
| 58 | following commands: |
cristy | ebe41ab | 2010-01-14 02:58:18 +0000 | [diff] [blame] | 59 | |
| 60 | $magick> sudo port -v install freetype +bytecode |
| 61 | $magick> sudo port -v install librsvg |
cristy | 64da443 | 2014-10-06 15:49:07 +0000 | [diff] [blame] | 62 | $magick> sudo port -v install graphviz +gs +wmf +jbig +jpeg2 +lcms |
cristy | ebe41ab | 2010-01-14 02:58:18 +0000 | [diff] [blame] | 63 | |
dirk | d2ad024 | 2015-07-18 12:18:20 +0000 | [diff] [blame] | 64 | This installs many of the delegate libraries ImageMagick will utilize such as |
| 65 | JPEG and FreeType. |
cristy | ebe41ab | 2010-01-14 02:58:18 +0000 | [diff] [blame] | 66 | |
dirk | d2ad024 | 2015-07-18 12:18:20 +0000 | [diff] [blame] | 67 | Use the port command to install any delegate libraries you require, for example: |
cristy | ebe41ab | 2010-01-14 02:58:18 +0000 | [diff] [blame] | 68 | |
| 69 | $magick> sudo port install jpeg |
| 70 | |
dirk | d2ad024 | 2015-07-18 12:18:20 +0000 | [diff] [blame] | 71 | Now let's build ImageMagick: |
cristy | ebe41ab | 2010-01-14 02:58:18 +0000 | [diff] [blame] | 72 | |
dirk | d2ad024 | 2015-07-18 12:18:20 +0000 | [diff] [blame] | 73 | Download the ImageMagick source distribution and verify the distribution |
| 74 | against its message digest. |
cristy | ebe41ab | 2010-01-14 02:58:18 +0000 | [diff] [blame] | 75 | |
dirk | d2ad024 | 2015-07-18 12:18:20 +0000 | [diff] [blame] | 76 | Unpack and change into the top-level ImageMagick directory: |
cristy | ebe41ab | 2010-01-14 02:58:18 +0000 | [diff] [blame] | 77 | |
dirk | d2ad024 | 2015-07-18 12:18:20 +0000 | [diff] [blame] | 78 | $magick> tar xvfz ImageMagick-6.5.9-0.tar.gz |
| 79 | $magick> cd ImageMagick-6.5.9 |
cristy | ebe41ab | 2010-01-14 02:58:18 +0000 | [diff] [blame] | 80 | |
dirk | d2ad024 | 2015-07-18 12:18:20 +0000 | [diff] [blame] | 81 | Configure ImageMagick: |
cristy | ebe41ab | 2010-01-14 02:58:18 +0000 | [diff] [blame] | 82 | |
| 83 | $magick> ./configure --prefix=/opt --with-quantum-depth=16 \ |
dirk | d2ad024 | 2015-07-18 12:18:20 +0000 | [diff] [blame] | 84 | --disable-dependency-tracking --without-perl |
cristy | ebe41ab | 2010-01-14 02:58:18 +0000 | [diff] [blame] | 85 | |
dirk | d2ad024 | 2015-07-18 12:18:20 +0000 | [diff] [blame] | 86 | Build ImageMagick: |
cristy | ebe41ab | 2010-01-14 02:58:18 +0000 | [diff] [blame] | 87 | |
| 88 | $magick> make |
| 89 | |
dirk | d2ad024 | 2015-07-18 12:18:20 +0000 | [diff] [blame] | 90 | Install ImageMagick: |
cristy | ebe41ab | 2010-01-14 02:58:18 +0000 | [diff] [blame] | 91 | |
| 92 | $magick> sudo make install |
| 93 | |
dirk | d2ad024 | 2015-07-18 12:18:20 +0000 | [diff] [blame] | 94 | To verify your install, type |
cristy | ebe41ab | 2010-01-14 02:58:18 +0000 | [diff] [blame] | 95 | |
| 96 | $magick> /opt/local/bin/identify -list font |
| 97 | |
dirk | d2ad024 | 2015-07-18 12:18:20 +0000 | [diff] [blame] | 98 | to list all the fonts ImageMagick knows about. |