Notes for Building Audacious on Windows

John Lindgren
May 16, 2015

Several patch files should accompany this document.

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 MinGW

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

In the MinGW Installation Manager window, install the following packages:

Edit the file C:\MinGW\msys\1.0\etc\fstab to contain only the following line, in lowercase:

c:/mingw /mingw

As of version 4.0.3-1, the MinGW runtime library is missing some mathematical functions that are necessary to build Audacious. Downgrade the library by running the following in a command prompt window:

mingw-get upgrade mingw32-mingwrt-dev=3.20-2
mingw-get upgrade mingw32-w32api=3.17-2

Open the file C:\MinGW\lib\gcc\mingw32\4.8.1\include\c++\mingw32\bits\c++config.h and locate the following line:

/* #undef _GLIBCXX_HAVE_FENV_H */

Change it to read:

#define _GLIBCXX_HAVE_FENV_H 1

Install Python

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

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

Install libpng

Download and unzip to C:\libpng:
http://sourceforge.net/projects/libpng/files/libpng16/1.6.17/libpng-1.6.17.tar.xz/download

In the MinGW shell:

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

Install libjpeg-turbo

Download and unzip to C:\libjpeg:
http://sourceforge.net/projects/libjpeg-turbo/files/1.4.0/libjpeg-turbo-1.4.0.tar.gz/download

In the MinGW shell:

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

Install libffi

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

In the MinGW shell:

cd /C/libffi
./configure --prefix=/C/GTK --with-gcc-arch=i686
make
make install

Install GLib

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

Apply the patch ggettext.c.diff to C:\glib\glib\ggettext.c.
Apply the patch gcontenttype-win32.c.diff to C:\glib\gio\gcontenttype-win32.c.diff.
Apply the patch gwin32appinfo.c.diff to C:\glib\gio\gwin32appinfo.c.diff.
Apply the patch gwin32networking.h.diff to C:\glib\gio\gwin32networking.h.

In the MinGW shell:

cd /C/glib
CFLAGS="-O2 -march=i686" LIBFFI_CFLAGS="-I/C/GTK/lib/libffi-3.2.1/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.28.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.32.6.tar.gz

In the MinGW shell:

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

Install Cairo

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

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.36/pango-1.36.8.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.31/gdk-pixbuf-2.31.4.tar.xz

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.16/atk-2.16.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+/2.24/gtk+-2.24.28.tar.xz

Apply the patch gdkwindow-win32.c.diff to C:\gtksrc\gdk\win32\gdkwindow-win32.c.

In the MinGW shell:

cd /C/gtksrc
CFLAGS="-O2 -D_WIN32_WINNT=0x0501" ./configure --prefix=/C/GTK
make
make install

It may be necessary to run the MinGW shell with administrative privileges for GTK+ to build successfully.

Copy gtkrc (accompanying this document) to C:\GTK\etc\gtk-2.0\gtkrc.

Install intltool

Download and unzip to C:\intltool:
http://ftp.gnome.org/pub/GNOME/sources/intltool/0.40/intltool-0.40.6.tar.bz2

In the MinGW shell:

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

Install GNOME Icon Theme

Download and unzip to C:\gnome-icon-theme:
http://ftp.gnome.org/pub/GNOME/sources/gnome-icon-theme/3.12/gnome-icon-theme-3.12.0.tar.xz

In the MinGW shell:

cd /C/gnome-icon-theme
./configure --prefix=/C/GTK --disable-icon-mapping
make
make install

It may be necessary to run the MinGW shell with administrative privileges for GNOME Icon Theme to install successfully.

Install SDL

Download and unzip to C:\libsdl:
http://www.libsdl.org/release/SDL2-2.0.1.tar.gz

In the MinGW shell:

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

Install GNU 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 libxml

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

In the MinGW shell:

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

Install mpg123

Download and unzip to C:\mpg123:
http://mpg123.de/download/mpg123-1.22.1.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-makefile.am.diff to C:\libfaad\libfaad\Makefile.am.
Apply the patch libfaad-main.c.diff to C:\libfaad\frontend\main.c.

In the MinGW shell:

cd /C/libfaad
cp /C/MinGW/share/libtool/config/ltmain.sh .
autoreconf
./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

Apply the patch libbs2b-makefile.am.diff to C:\libs2b\src\Makefile.am.

In the MinGW shell:

cd /C/libbs2b
cp /C/MinGW/share/libtool/config/ltmain.sh build-aux
autoreconf
./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.gz

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

Apply the patch libcue-makefile.am.diff to C:\libcue\src\libcue\Makefile.am.

In the MinGW shell:

cd /C/libcue
rm -f config/ltmain.sh
cp /C/MinGW/share/libtool/config/ltmain.sh config
autoreconf
./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.5.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.3.1.tar.xz

In the MinGW shell:

cd /C/libflac
./configure --prefix=/C/libs --disable-asm-optimizations --disable-sse --disable-ogg
make
make install

Install libogg

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

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.5.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.30.1.tar.gz

In the MinGW shell:

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

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.70.0.tar.bz2

Apply the patch wavpack.pc.in.diff to C:\libwavpack\wavpack.pc.in.
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-2.6.3.tar.bz2

In the MinGW shell:

cd /C/ffmpeg
./configure --prefix=/C/libs --enable-shared --disable-yasm --cpu=i686
make
make install

In the MinGW shell:

cd /C/libbinio
cp /C/MinGW/share/libtool/config/ltmain.sh .
autoreconf
./configure --prefix=/C/libs
make
make install

Install libmms

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

Apply the patch libmms-strndup.diff (it changes multiple files).

In the MinGW shell:

cd /C/libmms
cp /C/MinGW/share/libtool/config/ltmain.sh .
autoreconf
./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.5/libmodplug-0.8.8.5.tar.gz/download

In the MinGW shell:

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

Install libsidplayfp

Download and unzip to C:\libsidplayfp:
http://sourceforge.net/projects/sidplay-residfp/files/libsidplayfp/1.7/libsidplayfp-1.7.2.tar.gz/download

In the MinGW shell:

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

Install FluidSynth

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

Apply the patch fluidsynth.diff (it changes multiple files).

In the MinGW shell:

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

Install Audacious

Download and unzip to C:\audacious:
http://distfiles.audacious-media-player.org/audacious-3.6.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.6.tar.bz2

In the MinGW shell:

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