Tag Archive for 'swftools'

Installing swftools on Mac OS X Leopard

Some time has passed since my last swftools install documented in this blog post. Two important things have happened since then, first Apple came out with a new OS 10.5 Leopard and swftools is now included under fink. Fink is a utility that allows for the pain free installation of open source *nix software under Darwin. To get swftools running under Leopard we need to first install fink and then use fink to install swftools.

This post would be almost over if fink were available as a binary package for Leopard. Unfortunately at the time of writing in order to get fink running on 10.5 we need to compile it from source. Make sure to check the fink site to see if a binary package has been released for Leopard. To download the source code go to the download section of the fink site located here. I'll be using the latest version, which is fink-0.28.1. Ok let's get started:

1. Make sure you have XCode installed.

2. Go to the directory where you downloaded fink and extract the downloaded archive by running the following command
tar xzvf fink-0.28.1.tar.gz

3. Go to the newly extracted fink-0.28.1 directory.

4. Run the command ./bootstrap.

5. Fink needs root privileges to be installed, when prompted which method to use I chose sudo, which is the default selection [1]. You will then need to enter your password.

6. The installer offers the option of selecting where you would like to install fink. I just left the default location /sw.

7. You will get asked a couple dozen questions to which you could safely leave the default values by hitting the enter key. The important one to change is when the installer prompts you about the "unstable" tree. It is very important that you answer Y so that packages from the "unstable" tree are included with fink. Swftools is currently a part of that tree in version 0.8.1-2.

8. Once everything is done compiling and linking run

fink selfupdate

and leave the default selection of using rsync for the self update method.

9. Now it's time to install swftools. Just run the command

fink install swftools

You will be notified that 16 additional required packages will be installed. Just hit enter to install all of them.

10. Swftools 0.8.1-2 are now installed in /sw/bin/ or whatever directory you specified in step 6.

To verify that you have swftools installed correctly just run /sw/bin/pdf2swf --version. You should see output similar to the one below:

pdf2swf - part of swftools 0.8.1

Hopefully soon enough there will be a binary package for fink so the install will be much simpler.

10 Comments

Installing and compiling swftools on a Mac

This is a small tutorial which guides you through installing swftools and a mac. After completing it successfully you will be able to run pdf2swf and the rest of the swftools programs on a mac. Before we begin make sure you have Xcode installed it comes with lots of useful stuff for compiling under OS X.
1. Download fink from here

2. Install fink by double-clicking on the downloaded dmg file and running the installer

3. Open the Terminal and paste the following line:

sudo fink install libjpeg libjpeg-shlibs freetype2 freetype2-shlibs lame lame-shlibs

also if you are asked a yes/no question say yes :)

4. Download t1lib from here

5. Extract the downloaded file in the terminal by running "tar xzvf t1lib-1.3.1.tar.gz"

6. Go into the newly created directory and run the following:

./configure
make without_doc
sudo make install

7. Download freetype from here

8. Extract it and go into the newly extracted directory and run

./configure
make
sudo make install

NOTE: Make sure to copy everything from /usr/local/lib into /sw/lib and from /usr/local/include into /sw/include (cp -R /usr/local/lib/* /sw/lib)
9. Download swftools from here (get the Linux version)

10. Extract the file and go into the newly created directory. Run:

LDFLAGS="-L/sw/lib" CPPFLAGS="-I/sw/include -I/sw/include/lame" ./configure
make
sudo make install

The swf tools are installed in /usr/local/bin

14 Comments