Notes for Building Audacious on Windows

John Lindgren
August 11, 2012

Several patch files should accompany this document.

Install MinGW

Download and run:
http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/mingw-get-inst-20120426/mingw-get-inst-20120426.exe/download

When prompted, use these options:

Copy C:\MinGW\lib\libiconv.* to C:\MinGW\msys\1.0\lib.
Apply the patch libintl.h.diff to C:\MinGW\include\libintl.h.

Install Python

Download and run:
http://www.python.org/ftp/python/2.7.2/python-2.7.2.msi

Follow the prompts to install with default options to C:\Python27.

Set up system paths

Under My Computer -> Properties -> Advanced -> Environment Variables, set:

PATH=C:\MinGW\bin;C:\MinGW\msys\1.0\bin;C:\Python27;C:\GTK\bin;C:\libs\bin;C:\aud\bin
PKG_CONFIG_PATH=/C/GTK/lib/pkgconfig:/C/libs/lib/pkgconfig:/C/aud/lib/pkgconfig
C_INCLUDE_PATH=/C/GTK/include:/C/libs/include
CPLUS_INCLUDE_PATH=/C/GTK/include:/C/libs/include
LIBRARY_PATH=/C/GTK/lib:/C/libs/lib

Install zlib

Download and unzip to C:\zlib:
http://zlib.net/zlib-1.2.7.tar.gz

In the MinGW shell:

cd /C/zlib
cp win32/Makefile.gcc Makefile
make
BINARY_PATH=/C/GTK/bin INCLUDE_PATH=/C/GTK/include LIBRARY_PATH=/C/GTK/lib make install
mkdir -p /C/GTK/bin
cp zlib1.dll /C/GTK/bin
cp libz.dll.a /C/GTK/lib

Install libpng

Download and unzip to C:\libpng:
http://download.sourceforge.net/libpng/libpng-1.5.12.tar.xz

In the MinGW shell:

cd /C/libpng
./configure --prefix=/C/GTK
make
make install

Install libjpeg

Download and unzip to C:\libjpeg:
http://www.ijg.org/files/jpegsrc.v8d.tar.gz

In the MinGW shell:

cd /C/libjpeg
./configure --prefix=/C/GTK
make
make install

Install libffi

Download and unzip to C:\libffi:
ftp://sourceware.org/pub/libffi/libffi-3.0.11.tar.gz

In the MinGW shell:

cd /C/libffi
./configure --prefix=/C/GTK
make
make install

Install GLib

Download and unzip to C:\glib:
http://ftp.gnome.org/pub/GNOME/sources/glib/2.32/glib-2.32.4.tar.xz

Apply the patch gwin32.c.diff to C:\glib\glib\gwin32.c.
Apply the patch gwin32.h.diff to C:\glib\glib\gwin32.h.
Apply the patch gcontenttype.c.diff to C:\glib\gio\gcontenttype.c.

In the MinGW shell:

cd /C/glib
CFLAGS="-march=i486" LIBFFI_CFLAGS="-I/C/GTK/lib/libffi-3.0.11/include" LIBFFI_LIBS="-lffi" ZLIB_CFLAGS="" ZLIB_LIBS="-lz" ./configure --prefix=/C/GTK
make
make install

Install pkg-config

Download and unzip to C:\pkgconfig:
http://pkgconfig.freedesktop.org/releases/pkg-config-0.27.tar.gz

In the MinGW shell:

cd /C/pkgconfig
GLIB_CFLAGS="-I/C/GTK/include/glib-2.0 -I/C/GTK/lib/glib-2.0/include" GLIB_LIBS="-lglib-2.0" ./configure --prefix=/C/GTK
make
make install

Copy C:\GTK\share\aclocal\pkg.m4 to C:\MinGW\share\aclocal.

Install pixman

Download and unzip to C:\pixman:
http://cairographics.org/releases/pixman-0.26.2.tar.gz

In the MinGW shell:

cd /C/pixman
./configure --prefix=/C/GTK
make
make install

Install Cairo

Download and unzip to C:\cairo:
http://cairographics.org/releases/cairo-1.10.2.tar.gz

Apply the patch cairo-win32-surface.c.diff to C:\cairo\src\cairo-win32-surface.c.
Apply the patch cairo-surface-xy.diff (it changes multiple files).
Apply the patch any2ppm.c.diff to C:\cairo\test\any2ppm.c.

In the MinGW shell:

cd /C/cairo
./configure --prefix=/C/GTK --disable-interpreter
make
make install

Install Pango

Download and unzip to C:\pango:
http://ftp.gnome.org/pub/GNOME/sources/pango/1.30/pango-1.30.0.tar.xz

In the MinGW shell:

cd /C/pango
./configure --prefix=/C/GTK
make
make install

Install gdk-pixbuf

Download and unzip to C:\gdk-pixbuf:
http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.26/gdk-pixbuf-2.26.0.tar.xz

Apply the patch gdk-pixbuf-configure.diff to C:\gdk-pixbuf\configure.

In the MinGW shell:

cd /C/gdk-pixbuf
./configure --prefix=/C/GTK --without-gdiplus --without-libtiff
make
make install

Install ATK

Download and unzip to C:\atk:
http://ftp.gnome.org/pub/gnome/sources/atk/2.4/atk-2.4.0.tar.xz

In the MinGW shell:

cd /C/atk
./configure --prefix=/C/GTK
make
make install

Install GTK+

Download and unzip to C:\gtksrc:
http://ftp.gnome.org/pub/GNOME/sources/gtk+/3.4/gtk+-3.4.4.tar.xz

Apply the patch gtk-configure.diff to C:\gtksrc\configure.

In the MinGW shell:

cd /C/gtksrc
CFLAGS="-DHAVE_ISNAN -DHAVE_ISINF" ./configure --prefix=/C/GTK
make
make install

On Windows Vista or later, User Account Control may need to be disabled temporarily in order for GTK+ to build successfully.

Install SDL

Download and unzip to C:\libs:
http://www.libsdl.org/release/SDL-devel-1.2.15-mingw32.tar.gz

Install libxml

Download and unzip to C:\libxml:
ftp://xmlsoft.org/libxml2/libxml2-2.8.0.tar.gz

In the MinGW shell:

cd /C/libxml
./configure --prefix=/C/libs
make
make install

Install regex

Download and unzip to C:\libs:
http://sourceforge.net/projects/mingw/files/Other/UserContributed/regex/mingw-regex-2.5.1/mingw-libgnurx-2.5.1-bin.tar.gz/download
http://sourceforge.net/projects/mingw/files/Other/UserContributed/regex/mingw-regex-2.5.1/mingw-libgnurx-2.5.1-dev.tar.gz/download

Install mpg123

Download and unzip to C:\mpg123:
http://mpg123.de/download/mpg123-1.14.3.tar.bz2

In the MinGW shell:

cd /C/mpg123
./configure --prefix=/C/libs
make
make install

Install libfaad

Download and unzip to C:\libfaad:
http://sourceforge.net/projects/faac/files/faad2-src/faad2-2.7/faad2-2.7.tar.bz2/download

Apply the patch libfaad-main.c.diff to C:\libfaad\frontend\main.c.

In the MinGW shell:

cd /C/libfaad
./configure --prefix=/C/libs
make
make install

Install libsndfile

Download and unzip to C:\libsndfile:
http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.25.tar.gz

In the MinGW shell:

cd /C/libsndfile
./configure --prefix=/C/libs
make
make install

Install libbs2b

Download and unzip to C:\libbs2b:
http://sourceforge.net/projects/bs2b/files/libbs2b/3.1.0/libbs2b-3.1.0.tar.bz2/download

In the MinGW shell:

cd /C/libbs2b
./configure --prefix=/C/libs
make
make install

Install libcdio

Download and unzip to C:\libcdio:
http://ftp.gnu.org/gnu/libcdio/libcdio-0.83.tar.bz2

Apply the patch libcdio-util.c.diff to C:\libcdio\src\util.c.

In the MinGW shell:

cd /C/libcdio
./configure --prefix=/C/libs --disable-rock
make
make install

Install libcddb

Download and unzip to C:\libcddb:
http://sourceforge.net/projects/libcddb/files/libcddb/1.3.2/libcddb-1.3.2.tar.bz2/download

In the MinGW shell:

cd /C/libcddb
./configure --prefix=/C/libs
make
make install

Install libcue

Download and unzip to C:\libcue:
http://sourceforge.net/projects/libcue/files/libcue/1.4.0/libcue-1.4.0.tar.bz2/download

In the MinGW shell:

cd /C/libcue
./configure --prefix=/C/libs
make
make install

Install LAME

Download and unzip to C:\lame:
http://sourceforge.net/projects/lame/files/lame/3.99/lame-3.99.3.tar.gz/download

In the MinGW shell:

cd /C/lame
./configure --prefix=/C/libs
make
make install

Install libflac

Download and unzip to C:\libflac:
http://downloads.xiph.org/releases/flac/flac-1.2.1.tar.gz

Apply the patch libflac-alloc.h.diff to C:\libflac\include\share\alloc.h.
Apply the patch libflac-main.cpp.diff to C:\libflac\examples\cpp\encode\file\main.cpp.

In the MinGW shell:

cd /C/libflac
./configure --prefix=/C/libs
make
make install

Apply the patch flac.pc.diff to C:\libs\lib\pkgconfig\flac.pc.

Install libogg

Download and unzip to C:\libogg:
http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz

In the MinGW shell:

cd /C/libogg
./configure --prefix=/C/libs
make
make install

Install libvorbis

Download and unzip to C:\libvorbis:
http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.xz

In the MinGW shell:

cd /C/libvorbis
./configure --prefix=/C/libs
make
make install

Install libneon

Download and unzip to C:\libneon:
http://www.webdav.org/neon/neon-0.29.6.tar.gz

In the MinGW shell:

cd /C/libneon
./configure --prefix=/C/libs
make
make install

Apply the patch neon.pc.diff to C:\libs\lib\pkgconfig\neon.pc.

Install libsamplerate

Download and unzip to C:\libsamplerate:
http://www.mega-nerd.com/SRC/libsamplerate-0.1.8.tar.gz

In the MinGW shell:

cd /C/libsamplerate
./configure --prefix=/C/libs
make
make install

Install libwavpack

Download and unzip to C:\libwavpack:
http://www.wavpack.com/wavpack-4.60.1.tar.bz2

Apply the patch libwavpack-utils.c.diff to C:\libwavpack\cli\utils.c.

In the MinGW shell:

cd /C/libwavpack
./configure --prefix=/C/libs
make
make install

Install FFmpeg

Download and unzip to C:\ffmpeg:
http://ffmpeg.org/releases/ffmpeg-0.11.1.tar.bz2

In the MinGW shell:

cd /C/ffmpeg
./configure --prefix=/C/libs --disable-yasm
make
make install

Install libbinio

Download and unzip to C:\libbinio:
http://sourceforge.net/projects/libbinio/files/libbinio/1.4/libbinio-1.4.tar.bz2/download

Apply the patch binwrap.cpp.diff to C:\libbinio\src\binwrap.cpp.

In the MinGW shell:

cd /C/libbinio
./configure --prefix=/C/libs
make
make install

Install libcurl

Download and unzip to C:\libcurl:
http://curl.haxx.se/download/curl-7.26.0.tar.bz2

In the MinGW shell:

cd /C/libcurl
./configure --prefix=/C/libs
make
make install

Install libmms

Download and unzip to C:\libmms:
http://sourceforge.net/projects/libmms/files/libmms/0.6.2/libmms-0.6.2.tar.gz/download

Apply the patch mms-Makefile.am.diff to C:\libmms\src\Makefile.am.

In the MinGW shell:

cd /C/libmms
./autogen.sh
./configure --prefix=/C/libs
make
make install

Install libmodplug

Download and unzip to C:\libmodplug:
http://sourceforge.net/projects/modplug-xmms/files/libmodplug/0.8.8.4/libmodplug-0.8.8.4.tar.gz/download

In the MinGW shell:

cd /C/libmodplug
./configure --prefix=/C/libs
make
make install

Install Audacious

Download and unzip to C:\audacious:
http://distfiles.audacious-media-player.org/audacious-3.3.1.tar.bz2

In the MinGW shell:

cd /C/audacious
./configure --prefix=/C/aud
make
make install

Install Audacious Plugins

Download and unzip to C:\audacious-plugins:
http://distfiles.audacious-media-player.org/audacious-plugins-3.3.1.tar.bz2

In the MinGW shell:

cd /C/audacious-plugins
SDL_CFLAGS="-I/C/libs/include/SDL" SDL_LIBS="-L/C/libs/lib -lSDL" ./configure --prefix=/C/aud
make
make install