[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Swftools-common] Compile swftools on Windows (statically link libungif)
From: |
Will Prater |
Subject: |
[Swftools-common] Compile swftools on Windows (statically link libungif) |
Date: |
Fri, 13 May 2005 18:32:05 -0700 |
All,
These instructions are only briefly modified from this post:
http://lists.gnu.org/archive/html/swftools-common/2005-02/msg00023.html
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:\.
===============================================
[3a] If you wish to statically compile libungif (modified 05/05/13 by
Will Prater)
From the links on http://gnuwin32.sourceforge.net/packages/
libungif.htm,
download "Binaries" and "Developer files" for LibUnGif
Extract "bin\libungif.dll" from libungif-4.1.0b1-bin.zip
to:
c:\gnuwin32\bin
Extract "lib\libungif-static.a" and lib\libungif.lib from
libungif-4.1.0b1-lib.zip
to:
c:\gnuwin32\lib
Rename c:\gnuwin32\lib\libungif-static.a to c:\gnuwin32\lib\libungif.a
===============================================
[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,
-WP3
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Swftools-common] Compile swftools on Windows (statically link libungif),
Will Prater <=