| 1 | = Pidgin for Windows Build Instructions = |
| 2 | |
| 3 | == Set up your build environment == |
| 4 | |
| 5 | === The easy way === |
| 6 | |
| 7 | 1. Install the [http://cygwin.com Cygwin] Bash shell. Make sure to select Unix file mode during setup. |
| 8 | Also make sure you install bash, bzip2, coreutils, gawk, grep, gzip, make, patch, sed, monotone, tar, unzip, and wget (several of these are selected by default).[[BR]] |
| 9 | You may prefer to use the native Windows monotone binary available [http://www.monotone.ca here]. |
| 10 | |
| 11 | 2. Download the [http://gaim-extprefs.sourceforge.net/bef.shtml 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 Subversion or a source distribution; you will be prompted to choose which you'd like to use.[[BR]] |
| 12 | Note that this script is sometimes out of date, in which case you will need to perform some of the manual steps in addition. |
| 13 | |
| 14 | 3. Skip the [#Themanualway The manual way], [#InstallPidginsbuilddependencies Install Pidgin's build dependencies], and [#GetthePidginsourcecode Get the Pidgin source code] sections and go straight to [#BuildPidgin Build Pidgin]. |
| 15 | |
| 16 | === The manual way === |
| 17 | |
| 18 | 1. Install the [http://cygwin.com Cygwin] Bash shell. Make sure to select Unix file mode during setup. |
| 19 | Also make sure you install bash, bzip2, coreutils, gawk, grep, gzip, make, patch, sed, monotone, tar, unzip, and wget (several of these are selected by default).[[BR]] |
| 20 | You may prefer to use the native Windows monotone binary available [http://www.monotone.ca here]. |
| 21 | |
| 22 | 2. Install the MinGW "current" packages from the [http://www.mingw.org MinGW site].[[BR]] |
| 23 | The easiest way to install these is to use the MinGW Installer linked to from the main site.[[BR]] |
| 24 | Specifically, you will need `gcc-core 3.4.2`, `binutils 2.15.91`, `mingw-runtime 3.9` and `win32api 3.7` (or newer).[[BR]] |
| 25 | You will need to set MinGW's bin directory before Cygwin's in your PATH.[[BR]] |
| 26 | For Example (You can add the following to `~/.bash_login`): |
| 27 | {{{ |
| 28 | export PATH=/cygdrive/c/MinGW/bin:$PATH |
| 29 | }}} |
| 30 | 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. |
| 31 | |
| 32 | 3. The following instructions were written under the assumption that you checkout Pidgin from monotone to `~/pidgin` and that you install all of Pidgin's build dependencies under `~/win32-dev` (the point being that the `pidgin` and `win32-dev` directories should be on the same level).[[BR]] |
| 33 | This can be overridden by creating a `local.mak` file in the `~/pidgin` directory and overriding the various Makefile variables. |
| 34 | [[BR]]**TODO: post example local.mak |
| 35 | |
| 36 | == Install Pidgin's build dependencies == |
| 37 | |
| 38 | === GTK+ === |
| 39 | |
| 40 | Pidgin depends on GTK+ 2.6.10 (newer runtime versions can be used, but building against newer headers will prevent Win98/ME compatibility). |
| 41 | For your convenience, we have included all of GTK's dependencies in one tarball. |
| 42 | Extract [http://prdownloads.sourceforge.net/gaim/gtk-dev-2.6.10-rev-a.tar.gz?download gtk-dev-2.6.10-rev-a.tar.gz] within `~/win32-dev`.[[BR]] |
| 43 | If you wish to run Pidgin from the `win32-install-dir` directory once it is built, you will need to make sure that you have installed the GTK+ runtime, and make sure that its bin dir is in your PATH.[[BR]] |
| 44 | Visit the [http://www.gtk.org GTK+ website] for official binary and source releases. |
| 45 | |
| 46 | === Libxml2 === |
| 47 | Download and extract [./libxml2-2.6.24.tar.gz libxml2-2.6.24.tar.gz] to `win32-dev`. |
| 48 | |
| 49 | === Perl 5.8 === |
| 50 | Install Perl 5.8 for Windows (I use [http://www.activestate.com/Products/Language_Distributions/ ActivePerl]), to `C:\Perl`. |
| 51 | If you install Perl anywhere else, you will need to override the `PERL` and `EXTUTILS` variables in your `pidgin/local.mak` file. |
| 52 | You will also need to install [./perl582.tar.gz perl582.tar.gz] under `~/win32-dev` (Containing headers and import lib for mingw gcc). |
| 53 | |
| 54 | === Tcl 8.4.5 === |
| 55 | Download and extract [tcl-8.4.5.tar.gz] to `win32-dev` |
| 56 | |
| 57 | === !GtkSpell / Aspell === |
| 58 | * Download the following development packages for !GtkSpell and Aspell, and extract them under `win32-dev`: |
| 59 | * [http://ftp.gnu.org/gnu/aspell/w32/aspell-dev-0-50-3-3.zip aspell-dev-0-50-3-3.zip] |
| 60 | * [./gtkspell-2.0.6.tar.gz gtkspell-2.0.6.tar.gz] |
| 61 | |
| 62 | === Mozilla NSS === |
| 63 | * Download and unzip the following under `~/win32-dev` (make sure you `chmod 755` all the unzipped binaries): |
| 64 | * [ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_11_4_RTM/msvc6.0/WIN954.0_OPT.OBJ/nss-3.11.4.zip Network Security Services (NSS)] |
| 65 | * [ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.6.4/msvc6.0/WIN954.0_OPT.OBJ/nspr-4.6.4.zip Netscape Portable Runtime (NSPR)] |
| 66 | |
| 67 | === SILC Toolkit === |
| 68 | Download and extract [./silc-toolkit-1.0.2.tar.gz silc-toolkit-1.0.2.tar.gz] to `win32-dev`. |
| 69 | |
| 70 | === Meanwhile === |
| 71 | Download and extract [http://prdownloads.sourceforge.net/meanwhile/meanwhile-1.0.2-win32.zip?download meanwhile-1.0.2-win32.zip] to `win32-dev`. |
| 72 | |
| 73 | == Get the Pidgin source code == |
| 74 | The source for Pidgin 2.0.0beta6 is available [http://prdownloads.sourceforge.net/gaim/gaim-2.0.0beta6.tar.gz here].[[BR]] |
| 75 | The development source is available in via monotone. See [wiki:UsingPidginMonotone] for more information. |
| 76 | |
| 77 | == Build Pidgin == |
| 78 | Run the following: |
| 79 | {{{ |
| 80 | $ cd ~/pidgin |
| 81 | $ make -f Makefile.mingw install |
| 82 | }}} |
| 83 | Now just wait and let your compiler do its thing. When finished, Pidgin will be in `~/pidgin/win32-install-dir`. |
| 84 | |
| 85 | == Build the Pidgin Installer == |
| 86 | |
| 87 | * If you want to build the Pidgin installer, do the following (skip to the `make` command below if you chose to use the Build Environment Fetcher): |
| 88 | * Download and install [http://nsis.sourceforge.net/Download NSIS]. Include NSIS to your PATH. |
| 89 | For info on the NSIS installer, visit the [http://nsis.sourceforge.net NSIS website]. |
| 90 | * Download [http://prdownloads.sourceforge.net/gaim/gtk-2.10.11-rev-a-installer.tar.gz?download gtk-2.10.11-rev-a-installer.tar.gz] |
| 91 | and extract it to `~/` (or whichever directory you have the pidgin dir in). From within the new `gtk_installer directory`, run `. build.sh` (this builds the GTK+ runtime installer, which the Pidgin installer will include). |
| 92 | * Download [./pidgin-inst-deps.tar.gz pidgin-inst-deps.tar.gz] and extract under `~/win32-dev`. |
| 93 | * Now you can actually build the installer.[[BR]] |
| 94 | There are 3 different installers: "Normal" (with GTK+), "No GTK+" and "Debug". |
| 95 | The Makefile targets for these are `installer`, `installer_nogtk`, and `installer_debug` respectively. To build all 3, use the `installers` target. |
| 96 | {{{ |
| 97 | $ cd ~/pidgin |
| 98 | $ make -f Makefile.mingw installers |
| 99 | }}} |
| 100 | |
| 101 | == Debugging == |
| 102 | There is a quite good '''Just In Time''' debugger for MinGW: [http://jrfonseca.planetaclix.pt/projects/gnu-win32/software/drmingw/index.html drmingw]. |
| 103 | You can download it [./drmingw.exe here].[[BR]] |
| 104 | You can also use `gdb` is available from MinGW. |