swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swftools-common] Building SWFTools on Windows


From: Daichi Shinozaki
Subject: [Swftools-common] Building SWFTools on Windows
Date: Sun, 06 Feb 2005 05:32:14 +0900
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040616

Hi,
I spent some time today trying to build SWFTools v0.6.2 on Windows
using Mingw32 and MSYS, I had success.

Build Instructions:

===============================================
[1] Download SWFTools-0.6.2 source code

From http://www.quiss.org/swftools/download.html
download swftools-0.6.2.tar.gz, unpack all of the archive files directly into c:\.

===============================================
[2] Install MinGW and MSYS

From http://www.mingw.org/download.shtml
Download:
   MinGW-3.1.0-1.exe
   MSYS-1.0.10.exe
   w32api-3.2.tar.gz

(** I tried MinGW-3.2.0rc3.exe first but
    could not compile the xpdf using bundled gcc 3.4.2)

and install them in that order, taking the default
install locations of c:\mingw and c:\msys\1.0.
Add c:\mingw\bin to your $PATH.
Unpack w32api-3.2.tar.gz to c:\mingw.

===============================================
[3] Installing the rest of the dependencies

From http://gnuwin32.sourceforge.net/packages.html, download setup(.exe)
for:
   Bison-1.875
   Flex-2.5.4a
   GetText-0.14.1
   LibFreetype-2.1.8
   Libgw32c-0.4
   LibIconv-1.8
   Libjpeg-6b
   Libpng-1.2.8
   T1Lib-5.0.2
   Zlib-1.2.2

Run the installer, set the install location to c:\gnuwin32.

Note that If you want to build executables without dependencies to dlls, remove '*.dll.a' from c:\gnuwin32\lib. Recommended.

From http://gnuwin32.sourceforge.net/packages/libiconv.htm,
download "Developer files" for LibIconv-1.8 and unpack files to c:\gnuwin32.

From the links on http://www.gimp.org/~tml/gimp/win32/downloads.html,
download following files:
  fontconfig-2.2.2-20040412.zip
  fontconfig-dev-2.2.2-20040412.zip

Create c:\fontconfig and unpack all of the zip files directly into
that directory.

From http://sourceforge.net/project/showfiles.php?group_id=290,
download lame-3.96.1.tar.gz and unpack all of the archive files directly into c:\.

===============================================
[4] Building libmp3lame.a
Open the command prompt, then

c:\> cd \lame-3.96.1
c:\lame-3.96.1> mingw32-make -f makefile.unix UNAME=MSDOS

Create a c:\mingw\include\lame directory, copy include\lame.h into that directory.
Copy libmp3lame\libmp3lame.a to C:\mingw\lib.

===============================================
[5] Setting up MSYS environment
Inside msys, edit /etc/fstab and add a line:

c:\mingw        /mingw
c:\gnuwin32     /gw32
c:\fontconfig   /fc

Create a .profile directory in your MSYS homedir (which is *not* the
same as your Win32 homedir) with the lines:

LDFLAGS="-L/gw32/lib -L/fc/lib"
CPPFLAGS="-I/gw32/include -I/gw32/freetype2 -I/fc/include/fontconfig"
CPPFLAGS="$CPPFLAGS -I/mingw/include/lame"
PATH="/gw32/bin:$PATH"
export LDFLAGS CPPFLAGS PATH

Quit msys and rerun it to pick up these environment variables.

===============================================
[6] Configuring SWFTools
Open and edit the configure script.
Jump to the line 10123, replace a line

LIBS="-lfreetype $LIBS"

with

LIBS="-lfreetype $LIBS -lgw32c"

Inside msys, run the configure script, then edit the resulting config.h.

$ cd c:/swftools-0.6.2
$ ./configure

Open the config.h, and replace a line

#define boolean int

with

#define boolean unsigned char

===============================================
[7] Building SWFTools
Inside msys, type:
$ make

Note: As an important side effect of builing on Windows,
the resulting exes is able to accept wildcard(*) in the command-line.

You can type "png2swf *.png" in your command-line, for example.

Regards,

--
Daichi Shinozaki
SHIELD.JP Admin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]