Because of the constant attack by the wiki spam bots, accounts that are created and not used will be deleted. If you are a legitimate user, and your IP was blocked, please contact any active administrator - look at Special:RecentChanges and see who is busy fighting spam.
There are two ways to install swftools, by the source code (recommended for Unix/Lnux/BSD and any other operational system that gives power to the user) or by running a binary file (recomended for Windows).
- Some distributions of Linux have swftools available in their standard repositories. In this case, installation is immediate: just use the package manager and order it to install swftools. For example, those that use yum it will just require the command (as root) yum install swftools, those with urpmi just urpmi swftools, etc. If this does not work, try the method below (beware of dependency hell!)
- Download swftools-0.x.x.tar.gz. Then type, on the command-line:
tar -zvxf swftools-0.x.x.tar cd swftools-0.x.x ./configure make make install
- (you will have to be root for the last step)
- What libraries do I need to compile swftools on Unix/Linux/BSD?
- You need freetype and jpeglib to compile pdf2swf. Links:
* freetype: http://www.freetype.org * jpeglib: http://www.ijg.org/files/
- NB jpeglib is now at version 8. Version 6, appears to be no longer available. Should you happen to know a link, please post it here.
libjpeg-6a can be found here - ftp://sunsite.unc.edu/pub/Linux/libs/graphics/ libjpeg 6b1-2 debs here - http://packages.debian.org/search?keywords=libjpeg6
- For the later versions you will also need to place the tar g'zipped distribution of xpdf in the lib/pdf folder of the unpacked SWFTools distribution, i.e.
* cd swftools/lib/pdf * wget ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.03.tar.gz * cd ../../ * ./configure [ -- your_compiler_flags ]
- When compiling, configure might give the following error -
checking for missing libraries... ungif gif_lib.h *************************************************** * The following headers/libraries are missing: ungif gif_lib.h * Disabling gif2swf tool... ***************************************************
- ungif may no longer be used in your distro.
- libgif-dev is the new build package, use this instead.
- When compiling the sourcecode version, configure doesn't find my jpeglib!
- In case some of your libraries/include files are installed in /usr/local, try the following:
rm -f config.cache LDFLAGS="-L/usr/local/lib" CPPFLAGS="-I/usr/local/include" ./configure
- Furthermore, a new installation of jpeglib (the following assumes it's in /usr/local/lib) often requires doing a:
ranlib /usr/local/lib/libjpeg.a ldconfig /usr/local/lib
- In order to install jpeglib, it's furthermore been remarked that you need to do:
make install-lib make install-headers
- If it still doesn't work, try removing the file "config.cache" before running configure again.
- There are problems during compilation
- Error messages complain about "undefined reference to `operator new(unsigned)'" as well as "undefined reference to `__gxx_personality_v0'".
- Try running configure as
rpm -U gettext-0.17-6.aix5.3.ppc.rpm --nodeps rpm -U expat-2.0.1-3.aix5.3.ppc.rpm rpm -U freetype2-2.4.4-2.aix5.3.ppc.rpm rpm -U freetype2-devel-2.4.4-2.aix5.3.ppc.rpm rpm -U gcc-4.4.5-1.aix5.3.ppc.rpm rpm -U gcc-c++-4.4.5-1.aix5.3.ppc.rpm rpm -U gcc-locale-4.4.5-1.aix5.3.ppc.rpm rpm -U glib2-2.22.5-4.aix5.3.ppc.rpm rpm -U glib2-devel-2.22.5-4.aix5.3.ppc.rpm rpm -U gmp-5.0.2-1.aix5.3.ppc.rpm rpm -U gmp-devel-5.0.2-1.aix5.3.ppc.rpm rpm -U libgcc-4.4.5-1.aix5.3.ppc.rpm rpm -U libiconv-1.13.1-1.aix5.3.ppc.rpm rpm -U libjpeg-8c-1.aix5.3.ppc.rpm rpm -U libjpeg-devel-8c-1.aix5.3.ppc.rpm rpm -U libstdc++-4.4.5-1.aix5.3.ppc.rpm rpm -U libstdc++-devel-4.4.5-1.aix5.3.ppc.rpm rpm -U libungif-4.1.2-3.aix5.1.ppc.rpm rpm -U libungif-devel-4.1.2-3.aix5.1.ppc.rpm rpm -U libungif-progs-4.1.2-3.aix5.1.ppc.rpm rpm -U make-3.82-2.aix5.3.ppc.rpm rpm -U mpfr-3.0.1-1.aix5.3.ppc.rpm rpm -U mpfr-devel-3.0.1-1.aix5.3.ppc.rpm rpm -U pkg-config-0.25-2.aix5.1.ppc.rpm rpm -U zlib-1.2.5-2.aix5.3.ppc.rpm rpm -U zlib-devel-1.2.5-2.aix5.3.ppc.rpm
- 2)Edit /usr/include/sys/localedef31.h
change all map_t to map_t_t
- 3)Edit swftools-0.9.1/lib/gfxpoly/poly.h
#define assert(x) ((x)?0:gfxpoly_fail(__STRING(x), __FILE__, __LINE__, __PRETTY_FUNCTION__))
#define assert(x) /* #define assert(x) ((x)?0:gfxpoly_fail(__STRING(x), __FILE__, __LINE__, __PRETTY_FUNCTION__)) */
- 4)Get lastest xpdf
* cd swftools/lib/pdf * wget ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.03.tar.gz
- 5)Set variables
export LD_LIBRARY_PATH_64=$LD_LIBRARY_PATH export LIBPATH=$LIBPATH:/usr/local/bin:/usr/local/lib:/opt/freeware/bin:/opt/freeware/lib export PATH=$PATH:/usr/local/bin:/usr/local/lib:/opt/freeware/bin:/opt/freeware/lib:/usr/bin
- 6)Make some links
cd swftools-0.9.1/src ln ../install-sh install-sh chmod 775 install-sh cd ../swfs ln ../install-sh install-sh chmod 775 install-sh
cd swftools-0.9.1 ./configure gmake gmake install
- It works =)
How do I compile swftools on Mac OS X?
- Try the version available from Macports, and, if need be, the Porticus GUI installer that overlays it:
* HomeBrew: http://mxcl.github.com/homebrew/ * SWFTools on Macports: http://www.macports.org/ports.php?by=name&substr=swftools * Porticus COCOA GUI: http://porticus.alittledrop.com
- Alternatively, to compile from source, the following has worked on OS X 10.8.1:
* Install fink, and update it: http://fink.sourceforge.net) * Download swftools source, or do a 'git clone git://git.swftools.org/swftools' * Install the dependencies via fink: fink install giflib libjpeg libjpeg-shlibs freetype freetype-shlibs lame lame-shlibs * Run the configure script pointing at the fink installed libs/includes (by default in /sw2): LDFLAGS="-L/sw2/lib" CPPFLAGS="-I/sw2/include" ./configure * make && sudo make install * You may need to do sudo chmod 755 /usr/local/bin to be able to execute the binaries as a non-root user * For SWF Transcode: SWF Converter
Cross compiling from Linux to other platforms ( for those whom may like to live life slightly on the edge )
Try one of these two self-build environments. They may ( or may not ) ease the pain. ;o) The latter link, detailing Ron Burkey's sofware solution, also permits compilation for Apple Mac OS X:
* MingGW Cross Volker Grabsch et al * I'm Cross! Ron Burkey
How do I install swftools on Windows?
Initially, best to use the curent pre-compiled binaries.
- SWFTools 0.9.0 Stable - Windows Binary] - Windows Binary Stable (not tested by the writer of this article)
- SWFTools 2013-04-09-1007 - Windows Binary Development
Information on source compilation under Windows is a work in progress..