Trac is being migrated to new services! Issues can be found in our new YouTrack instance and WIKI pages can be found on our website.

Changes between Version 71 and Version 72 of BuildingWinPidgin


Ignore:
Timestamp:
Feb 24, 2010, 6:38:29 PM (14 years ago)
Author:
datallah
Comment:

Move NSIS compilation instructions into the cross-compiling section

Legend:

Unmodified
Added
Removed
Modified
  • BuildingWinPidgin

    v71 v72  
    112112  * 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):
    113113    * Download and install [http://nsis.sourceforge.net/Download NSIS]. Include NSIS to your PATH.
    114       For information on the NSIS installer, visit the [http://nsis.sourceforge.net NSIS website].[[BR]]
     114     *  For information on the NSIS installer, visit the [http://nsis.sourceforge.net NSIS website].[[BR]]
     115    * Download [http://prdownloads.sourceforge.net/pidgin/gtk-2.14.7-rev-a-installer.tar.gz?download gtk-2.14.7-rev-a-installer.tar.gz]
     116      and extract it to `$PIDGIN_DEV_ROOT/`. From within the new `gtk_installer directory`, run `. build.sh` (this builds the GTK+ runtime installer, which the Pidgin installer will include). **Please see [#CrossCompiling note below] if building on Ubuntu/Debian about modification of the build.sh file.
     117    * Download [/static/win32/pidgin-inst-deps-20100223.tar.gz pidgin-inst-deps-20100223.tar.gz] and extract under `$PIDGIN_DEV_ROOT/win32-dev`.
     118  * Now you can actually build the installer.[[BR]]
     119    There are 3 different installers: "Normal" (with GTK+), "No GTK+" and "Debug".
     120    The Makefile targets for these are `installer`, `installer_nogtk`, and `installer_debug` respectively.  To build all 3, use the `installers` target.
     121{{{
     122$ cd $PIDGIN_DEV_ROOT/pidgin-<version>
     123$ make -f Makefile.mingw installers
     124}}}
     125    When it finishes, your installer(s) should be in `$PIDGIN_DEV_ROOT/pidgin-<version>/`.
     126
     127== Customizing the Build Environment ==
     128  Most people will find that the standard build evironment directory is completely adequate.
     129  It is, however, possible to override the locations of the various dependencies and target directories.
     130  This is often useful to test against a development version of a library dependency or to override compiler flags.
     131
     132  This done is by overridding the various Makefile variables in a `local.mak` file in the `$PIDGIN_DEV_ROOT/pidgin-<version>` directory.
     133  This file does not exist by default.
     134
     135  Most of the variables that can be overridden with this method are defined in the [/viewmtn/revision/file/8c0ef1cb63204eeb0e5cda5501300c62d11bf89e/libpurple/win32/global.mak libpurple/win32/global.mak] file.
     136  For example, to install Pidgin over `C:\Program Files\Pidgin` instead of `$PIDGIN_DEV_ROOT/pidgin/win32-install-dir`, create a `$PIDGIN_DEV_ROOT/pidgin/local.mak` containing:
     137{{{
     138 #Override the install location
     139 PIDGIN_INSTALL_DIR = /cygdrive/c/Program\ Files/Pidgin
     140 PURPLE_INSTALL_DIR = /cygdrive/c/Program\ Files/Pidgin
     141}}}
     142
     143  One nice use of the `local.mak` file is for cross compiling, there is an additional example in the [#CrossCompiling section below].
     144
     145== Debugging ==
     146  There is a quite good '''Just In Time''' debugger for MinGW: [http://jrfonseca.planetaclix.pt/projects/gnu-win32/software/drmingw/index.html drmingw].
     147  You can download it [/static/win32/drmingw.exe here].[[BR]]
     148  There is also a version of `gdb` available from MinGW, if you prefer.
     149
     150== Cross Compiling ==
     151  It is quite easy to cross compile Pidgin for Windows on a Linux machine.  Note that cross-compiling does '''''not''''' work properly on Debian Sid on amd64 (also called x86_64 or x64) systems--the most common failure is that the linker will die with a segmentation fault at various points.  You may have differing success or failure on other 64-bit Linux distributions.
     152
     153  To begin, you'll need to install MinGW. On Debian/Ubuntu, this involves installing packages `mingw32`, `mingw32-binutils`, and `mingw32-runtime`. On other distributions, the packages may be named differently.
     154
     155  Set up a build environment as described [#Themanualway above], skipping steps 1 and 2.
     156
     157  Create a `local.mak` file in the source directory root to override the Makefile variables - mine looks like this:
     158{{{
     159SHELL := /bin/bash
     160CC := /usr/bin/i586-mingw32msvc-cc
     161GMSGFMT := msgfmt
     162MAKENSIS := /usr/bin/makensis
     163MAKENSISOPT := -
     164PERL := /usr/bin/perl
     165EXTUTILS := /usr/share/perl/5.8/ExtUtils
     166WINDRES := /usr/bin/i586-mingw32msvc-windres
     167STRIP := /usr/bin/i586-mingw32msvc-strip
     168
     169INCLUDE_PATHS := -I$(PIDGIN_TREE_TOP)/../win32-dev/w32api/include
     170LIB_PATHS := -L$(PIDGIN_TREE_TOP)/../win32-dev/w32api/lib
     171}}}
     172
     173  If your distribution doesn't include a recent enough win32api, you can download it from the [http://www.mingw.org/ MinGW site], extract it into your `win32-dev` directory, and override the `INCLUDE_PATHS` and `LIB_PATHS` variables in your `local.mak` as I have done.
     174
     175  If you want to build the installers, you'll need to install [#BuildthePidginInstaller NSIS].  On Debian and Ubuntu, the package name is `nsis`; this will likely be different elsewhere.  In order to build the GTK+ installer as mentioned above, the `build.sh` script referenced above needs to be changed.  The line starting with `makensis.exe` needs to be changed to read:
     176{{{
     177makensis -V3 -DGTK_VERSION=$gtk_version -DGTK_REVISION=$gtk_revision gtk-installer.nsi
     178}}}
     179
    115180      NSIS version 2.46 or greater is required to cross-compile.  If compiling NSIS from source, the [http://www.scons.org/ scons] package is a dependency.  This can usually be installed through your linux distribution's package archive.  An example of how to install the NSIS package is given below (Assuming use of the NSIS 2.46 version):
    116181
    117 
    118 
    119       .tar.bz2 file contains latest source[[BR]]
    120       .zip file contains libraries
     182      `.tar.bz2` file contains latest source[[BR]]
     183      `.zip` file contains libraries
    121184{{{
    122185$ mkdir nsis;cd nsis
     
    134197      MAKENSIS := /usr/local/bin/makensis 
    135198
    136     * Download [http://prdownloads.sourceforge.net/pidgin/gtk-2.14.7-rev-a-installer.tar.gz?download gtk-2.14.7-rev-a-installer.tar.gz]
    137       and extract it to `$PIDGIN_DEV_ROOT/`. From within the new `gtk_installer directory`, run `. build.sh` (this builds the GTK+ runtime installer, which the Pidgin installer will include). **Please see [#CrossCompiling note below] if building on Ubuntu/Debian about modification of the build.sh file.
    138     * Download [/static/win32/pidgin-inst-deps-20100223.tar.gz pidgin-inst-deps-20100223.tar.gz] and extract under `$PIDGIN_DEV_ROOT/win32-dev`.
    139   * Now you can actually build the installer.[[BR]]
    140     There are 3 different installers: "Normal" (with GTK+), "No GTK+" and "Debug".
    141     The Makefile targets for these are `installer`, `installer_nogtk`, and `installer_debug` respectively.  To build all 3, use the `installers` target.
    142 {{{
    143 $ cd $PIDGIN_DEV_ROOT/pidgin-<version>
    144 $ make -f Makefile.mingw installers
    145 }}}
    146     When it finishes, your installer(s) should be in `$PIDGIN_DEV_ROOT/pidgin-<version>/`.
    147 
    148 == Customizing the Build Environment ==
    149   Most people will find that the standard build evironment directory is completely adequate.
    150   It is, however, possible to override the locations of the various dependencies and target directories.
    151   This is often useful to test against a development version of a library dependency or to override compiler flags.
    152 
    153   This done is by overridding the various Makefile variables in a `local.mak` file in the `$PIDGIN_DEV_ROOT/pidgin-<version>` directory.
    154   This file does not exist by default.
    155 
    156   Most of the variables that can be overridden with this method are defined in the [/viewmtn/revision/file/8c0ef1cb63204eeb0e5cda5501300c62d11bf89e/libpurple/win32/global.mak libpurple/win32/global.mak] file.
    157   For example, to install Pidgin over `C:\Program Files\Pidgin` instead of `$PIDGIN_DEV_ROOT/pidgin/win32-install-dir`, create a `$PIDGIN_DEV_ROOT/pidgin/local.mak` containing:
    158 {{{
    159  #Override the install location
    160  PIDGIN_INSTALL_DIR = /cygdrive/c/Program\ Files/Pidgin
    161  PURPLE_INSTALL_DIR = /cygdrive/c/Program\ Files/Pidgin
    162 }}}
    163 
    164   One nice use of the `local.mak` file is for cross compiling, there is an additional example in the [#CrossCompiling section below].
    165 
    166 == Debugging ==
    167   There is a quite good '''Just In Time''' debugger for MinGW: [http://jrfonseca.planetaclix.pt/projects/gnu-win32/software/drmingw/index.html drmingw].
    168   You can download it [/static/win32/drmingw.exe here].[[BR]]
    169   There is also a version of `gdb` available from MinGW, if you prefer.
    170 
    171 == Cross Compiling ==
    172   It is quite easy to cross compile Pidgin for Windows on a Linux machine.  Note that cross-compiling does '''''not''''' work properly on Debian Sid on amd64 (also called x86_64 or x64) systems--the most common failure is that the linker will die with a segmentation fault at various points.  You may have differing success or failure on other 64-bit Linux distributions.
    173 
    174   To begin, you'll need to install MinGW. On Debian/Ubuntu, this involves installing packages `mingw32`, `mingw32-binutils`, and `mingw32-runtime`. On other distributions, the packages may be named differently.
    175 
    176   Set up a build environment as described [#Themanualway above], skipping steps 1 and 2.
    177 
    178   Create a `local.mak` file in the source directory root to override the Makefile variables - mine looks like this:
    179 {{{
    180 SHELL := /bin/bash
    181 CC := /usr/bin/i586-mingw32msvc-cc
    182 GMSGFMT := msgfmt
    183 MAKENSIS := /usr/bin/makensis
    184 MAKENSISOPT := -
    185 PERL := /usr/bin/perl
    186 EXTUTILS := /usr/share/perl/5.8/ExtUtils
    187 WINDRES := /usr/bin/i586-mingw32msvc-windres
    188 STRIP := /usr/bin/i586-mingw32msvc-strip
    189 
    190 INCLUDE_PATHS := -I$(PIDGIN_TREE_TOP)/../win32-dev/w32api/include
    191 LIB_PATHS := -L$(PIDGIN_TREE_TOP)/../win32-dev/w32api/lib
    192 }}}
    193 
    194   If your distribution doesn't include a recent enough win32api, you can download it from the [http://www.mingw.org/ MinGW site], extract it into your `win32-dev` directory, and override the `INCLUDE_PATHS` and `LIB_PATHS` variables in your `local.mak` as I have done.
    195 
    196   If you want to build the installers, you'll need to install [#BuildthePidginInstaller NSIS].  On Debian and Ubuntu, the package name is `nsis`; this will likely be different elsewhere.  In order to build the GTK+ installer as mentioned above, the `build.sh` script referenced above needs to be changed.  The line starting with `makensis.exe` needs to be changed to read:
    197 {{{
    198 makensis -V3 -DGTK_VERSION=$gtk_version -DGTK_REVISION=$gtk_revision gtk-installer.nsi
    199 }}}
    200199
    201200  Once this is all set up, you should be able to follow the [#BuildPidgin building instructions above].
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!