SWFTools (a collection of utilities for working with Adobe Flash files, SWF files) was removed from the Ubuntu repository for some security problem with the PDF library used (I don’t remember exactly, anyway it’s not the point…).

If you need to use SWFTools, you have to build it from the sources (you need to be familiar with the terminal and some basic Linux procedures).

First, prepare the environment for source compilation:

sudo apt-get install build-essential checkinstall

Then, install some dependencies:

sudo apt-get install libgif-dev xpdf libfreetype6 libfreetype6-dev libjpeg62 libjpeg8 libjpeg8-dev

Download the SWFTools package and uncompress it…

cd /tmp/
wget http://www.swftools.org/swftools-0.9.2.tar.gz
tar zxvf swftools-0.9.2.tar.gz 
cd swftools-0.9.2/

Now you have to add to the sources the xpdf package

cd lib/pdf
wget ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.04.tar.gz

Then, build the sources

cd ../..
./configure 
make

Now you have to edit this file “swfs/Makefile” to comment 2 lines (otherwise the installation script won’t work). You have to comment “rm -f $(pkgdatadir)/swfs/default_viewer.swf -o -L $(pkgdatadir)/swfs/default_viewer.swf” and “rm -f $(pkgdatadir)/swfs/default_loader.swf -o -L $(pkgdatadir)/swfs/default_loader.swf“, like the following:

install:
        $(mkinstalldirs) $(pkgdatadir)
        $(mkinstalldirs) $(pkgdatadir)/swfs
        $(INSTALL_DATA) ./simple_viewer.swf $(pkgdatadir)/swfs/simple_viewer.swf
        $(INSTALL_DATA) ./keyboard_viewer.swf $(pkgdatadir)/swfs/keyboard_viewer.swf
        $(INSTALL_DATA) ./PreLoaderTemplate.swf $(pkgdatadir)/swfs/PreLoaderTemplate.swf
        $(INSTALL_DATA) ./tessel_loader.swf $(pkgdatadir)/swfs/tessel_loader.swf
        $(INSTALL_DATA) ./swft_loader.swf $(pkgdatadir)/swfs/swft_loader.swf
        #rm -f $(pkgdatadir)/swfs/default_viewer.swf -o -L $(pkgdatadir)/swfs/default_viewer.swf
        $(LN_S) $(pkgdatadir)/swfs/simple_viewer.swf $(pkgdatadir)/swfs/default_viewer.swf
        #rm -f $(pkgdatadir)/swfs/default_loader.swf -o -L $(pkgdatadir)/swfs/default_loader.swf
        $(LN_S) $(pkgdatadir)/swfs/tessel_loader.swf $(pkgdatadir)/swfs/default_loader.swf

You can install SWFTools running this last command:

sudo checkinstall

Insert the name of the package (SWFTools) when prompted by checkinstall and follow the procedure as usual.

Share →

5 Responses to swftools on Ubuntu 14.04 – Trusty Tahr

  1. EB says:

    Thank you SO MUCH!!!

  2. zpu says:

    Thank you very much! It worked like a charm!

  3. muhim says:

    thank you so much,this make linux be better and better

  4. mn says:

    Thanks!
    But I had to edit “swfs/Makefile” after “./configure” and before “make”

  5. mark says:

    Your instructions are great until you get to the Makefile – from there on, the entire build crumbles between the fingers.

    User the repository to install it instead.

Leave a Reply

Your email address will not be published. Required fields are marked *

Looking for something?

Use the form below to search the site:


Still not finding what you're looking for? Drop us a note so we can take care of it!

Visit our friends!

A few highly recommended friends...

Set your Twitter account name in your settings to use the TwitterBar Section.