开发者

ImageMagick - How to Build a 32-bit Mac version for MAMP?

开发者 https://www.devze.com 2023-01-09 18:30 出处:网络
This is a pretty straight-forward question: I have an older INTEL Mac (32-bit) and I need to build a 32-bit version of ImageMagick.

This is a pretty straight-forward question: I have an older INTEL Mac (32-bit) and I need to build a 32-bit version of ImageMagick.

I've seen some people playing around with options during the binary inst开发者_开发百科all, but I can't seem to find any reliable information about how to do this!

NOTE: ImageMagick gives out a 64-bit version of the binaries for Mac OS X on their webpage, but I'm not sure if this can be hacked into a 32-bit version during compiling?

THANK YOU - I'm really stuck on this!


The problem was ImageMagick's un-intuitive webpage that made it a little hard to figure out how to proceed - I finally found the binaries on their page and installed following these directions:

Intro: If you have an older INTEL MacBook - it might have a 32-bit processor. This is how to compile ImageMagick (Mac OS X version) as a 32-bit program using the ImageMagick binary files - NOT USING MACPORTS!.

To find out what processor you have, i.e. 32-bit or 64-bit, look here: http://support.apple.com/kb/ht3696

To install via MACPORTS look here: http://xentek.net/articles/442/installing-imagemagick-and-imagick-via-macports/

My Computer: This worked on my first-generation INTEL Macbook (you know - the white one with a Due Core processor).

OS: I'm running OS X 10.6.4 (Snow Leopard)

INSTALL STEPS: 1. The trick is to ignore ImageMagick's pre-packed MAC OS X install package because it's compiled in a 64-bit version - we want a 32-bit version instead!

So, we need to get the UNIX binaries here: http://www.imagemagick.org/script/install-source.php#unix

  1. Following the page's instructions, we download a file called ImageMagick.tar.gz. The ImageMagick group seemingly updates this link to point to the latest version.

  2. The file is a compressed TAR file with the extension tar.gz. If you're using MAMP (like I am) then you might want to create a new file called "ImageMagick" (without the quotation marks "") in this folder: /Applications/MAMP/bin/. Normally we would install ImageMagick into this folder - however, because we're working from the binaries, a standard ./configure / make / make install pattern will simply default install ImageMagick into whatever path you have set up on your computer. In my case, my default path is the USR/LOCAL folder.

NOTE: if somebody wants to write here how to instead direct the ./configure options so that ImageMagick will install into a MAMP folder (or other folder) instead of the default path, that would be really helpful!

Well, back to the MAMP 32-bit install:

  1. Place your recently-downloaded binary copy of ImageMagick in a new folder. I use a folder called SRC to keep all these intermediate copies of files in a place that I can later delete/clean when they are not necessary.

  2. Next, expand the compressed file by opening your TERMINAL (look for the program in the "Utilities" folder).

With TERMINAL open, type the following:

cd path/to/the/ImageMagick/file #navigate to the folder where the file is saved
tar xvfz ImageMagick.tar.gz #expand the tar ball file

You should now see in the ImageMagick folder a new folder that you just expanded, called (for example) "ImageMagick-6.6.3" (NOTE: later versions of ImageMagick might have a different version number written at the end of this). Right now the folder would be called ImageMagick-6.6.3-2 ...

  1. Move one level up into that folder.

To do so, type the following into TERMINAL:

cd ImageMagick-6.6.3-2 #replace the version number
  1. Now you're going to run a standard .configure / make / make install pattern - your compiler/system should automatically configure the build to your 32-bit environment!

In terminal, you should be in the ImageMagick-6.6.3 file folder. Once there, run these commands:

sudo ./configure #I use SUDO here just in case your file permissions are messed up...
make  #go get a cup of coffee
make install #go get another cup ...

HINT: text after the "#" is just my comments - just ignore the # and also the text on that line following the hash...

  1. Make sure the "./configure" "MAKE" and "MAKE INSTALL" commands finish without errors - they should run just fine!

Then, you can run the standard ImageMagick test using your TERMINAL program:

Type this out to run the tests:

convert logo: logo.gif
identify logo.gif
display logo.gif

Wholla! You should see the ImageMagick logo pop up - meaning that ImageMagick is now installed on your 32-bit MAC OS X computer!


thx for this! to point configure to a different installation directory the syntax is:

./configure --prefix=NEW_PREFIX

where NEW_PREFIX should be set to the path of your mamp installation directory.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号