## Notes for Building Audacious on Windows

John Lindgren
December 19, 2020

A Makefile and several patch files should accompany this document.

### Set up MSYS2 environment

Download and run:
`https://repo.msys2.org/distrib/x86_64/msys2-x86_64-20201109.exe`

Accept the default options to install to `C:\msys64`.

Edit `C:\msys64\home\<USER>\.bashrc` and add the following lines:

> `export PATH="$PATH:/C/libs/bin:/C/aud/bin"
> export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/C/libs/lib/pkgconfig:/C/aud/lib/pkgconfig"
> export C_INCLUDE_PATH=/C/libs/include
> export CPLUS_INCLUDE_PATH=/C/libs/include
> export LIBRARY_PATH=/C/libs/lib`

In the MinGW shell (MSYS2 MinGW 32-bit, not MSYS2 MSYS):

> `pacman -Syu
> pacman -S autoconf automake git libtool make patch pkg-config
> pacman -S mingw-w64-i686-gcc mingw-w64-i686-gettext mingw-w64-i686-libxml2
> pacman -S mingw-w64-i686-atk mingw-w64-i686-cairo mingw-w64-i686-pango
> pacman -S mingw-w64-i686-gdk-pixbuf2 mingw-w64-i686-librsvg mingw-w64-i686-qt5
> pacman -S mingw-w64-i686-flac mingw-w64-i686-libvorbis mingw-w64-i686-libcdio-paranoia
> pacman -S mingw-w64-i686-fluidsynth mingw-w64-i686-mpg123 mingw-w64-i686-faad2
> pacman -S mingw-w64-i686-wavpack mingw-w64-i686-libmodplug mingw-w64-i686-libbs2b
> pacman -S mingw-w64-i686-libsamplerate mingw-w64-i686-libsoxr mingw-w64-i686-neon
> pacman -S mingw-w64-i686-libcue mingw-w64-i686-lame`

### Install GTK+

The Makefile accompanying this document automates the process of building GTK+ from source.

In the MinGW shell:

> `cd <PATH TO THIS DOCUMENT>
> make -j4 gtk`

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

### Install additional libraries

In the MinGW shell:

> `cd <PATH TO THIS DOCUMENT>
> make -j4 ffmpeg
> make -j4 libmms
> make -j4 libbinio
> make -j4 adplug
> make -j4 libsidplayfp
> make -j4 libopenmpt`

### Install Audacious

Download and unzip to `C:\audacious`:
`https://distfiles.audacious-media-player.org/audacious-3.8.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`:
`https://distfiles.audacious-media-player.org/audacious-plugins-3.8.tar.bz2`

In the MinGW shell:

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