Windows Gaim Build Instructions

Set up your build environment

The easy way

  1. Install the Cygwin Bash shell. Make sure to select Unix file mode during setup. Also make sure you install bzip2, coreutils, cvs, grep, gzip, make, patch, sed, awk, tar, unzip, and wget (several of these are selected by default).

  2. Download the WinGaim Build Environment Fetcher script. Follow the instructions on the website to fetch and install most of the needed build dependencies. The script can fetch Gaim's source code from either anonymous CVS or a source distribution; you will be prompted to choose which you'd like to use.

  3. Skip the "The manual way," "Install Gaim's build dependencies," and "Get the Gaim source code" sections and go straight to "Build Gaim".

The manual way

  1. Install the Cygwin Bash shell. Make sure to select Unix file mode during setup. Also make sure you install bzip2, coreutils, cvs, grep, gzip, make, patch, sed, awk, tar, unzip, and wget (several of these are selected by default).
  2. Install MinGW v3.1 or higher.
    You will need to set MinGW's bin directory before Cygwin's in your PATH.
    For Example (You can add the following to ~/.bash_login):

    export PATH=/cygdrive/c/MinGW/bin:$PATH
    

    You do not want to use any of Cygwin's build tools, with one exception; you need to use Cygwin's make utility. If typing which make produces MinGW's make utility, then just rename the make.exe in the MinGW bin directory to something else, so that cygwin's make utility will be used instead. This shouldn't be a problem with recent versions of MinGW.

  3. Download the latest version of the Windows API from the MinGW download page (at least 3.3). Extract this into your MinGW directory structure (tar -xvzf /path/to/w32api-3.3.tar.gz -C /cygdrive/c/MinGW) to upgrade the installed API.

  4. The following instructions were written under the assumption that you checkout Gaim from the cvs repository to ~/gaim and that you install all of Gaim's build dependencies under ~/win32-dev (the point being that the gaim and win32-dev directories should be on the same level).

Install Gaim's build dependencies

GTK+
Gaim depends on GTK+ 2.6.10. For your convenience I have included all of GTK's dependencies in one tarball. Extract gtk-dev-2.6.10-rev-a.tar.gz from within ~/win32-dev. If once built you wish to run Gaim from the win32-install-dir dir, you will need to make sure that you have installed the GTK+ runtime, and make sure that its bin dir is in your PATH. Visit the GTK+ website for official binary and source releases.
Perl 5.8
Install Perl 5.8 for Windows (I use ActivePerl), to C:\Perl. If you install Perl anywhere else, you will need to change the PERL and EXTUTILS variables in gaim/plugins/perl/common/Makefile.mingw. You will also need to install perl582.tar.gz under ~/win32-dev (Containing altered headers and import lib).
Tcl 8.4.5
Download and extract tcl-8.4.5.tar.gz to win32-dev.
GtkSpell / Aspell
Download the following development packages for GtkSpell and Aspell, and extract them under win32-dev:
Mozilla NSS
Download and unzip the following under ~/win32-dev (make sure you chmod 755 all the unziped binaries):
SILC Toolkit
Download and extract silc-toolkit-1.0.2.tar.gz to win32-dev.
Meanwhile
Download and extract meanwhile-1.0.2-win32.zip to win32-dev.

Get the Gaim source code

Build Gaim

$ cd ~/gaim
$ make -f Makefile.mingw install

Now just wait and let your compiler do its thing. When finished, Gaim will be in ~/gaim/win32-install-dir

Build Gaim Installer

If you want to build the Gaim installer, do the following (skip to the make command below if you chose to use the WinGaim Build Environment Fetcher):
  1. Grab and install NSIS v2.0.8. Include NSIS to your PATH.
    For info on the NSIS installer, visit the NSIS website.
  2. Grab gtk-2.6.10-rev-a-installer.tar.gz and extract it to ~/ (or whichever directory you have the gaim dir in). From within the new gtk_installer directory, type ". build.sh" (this builds the GTK+ runtime installer, which the Gaim installer will include).
  3. Grab gaim-inst-deps.tar.gz and extract under ~/win32-dev.
Now do the following:
$ cd ~/gaim
$ make -f Makefile.mingw installer

Debugging

There is a quite good Just In Time debugger for MinGW: drmingw. You can download it here.