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 5 and Version 6 of BuildingWinPidgin/3.0.0


Ignore:
Timestamp:
Apr 25, 2014, 3:26:19 PM (10 years ago)
Author:
tomkiewicz
Comment:

mention 3.0.0 cross-compiling

Legend:

Unmodified
Added
Removed
Modified
  • BuildingWinPidgin/3.0.0

    v5 v6  
    33Note: These instructions are for 3.0.0 branch. The current instructions for 2.x.y are found [wiki:BuildingWinPidgin here].
    44
    5 == Set up your build environment ==
     5== Get the Pidgin source code ==
     6{{{
     7#!comment
     8  The source for Pidgin 3.x.y is available [http://prdownloads.sourceforge.net/pidgin/pidgin-3.x.y.tar.bz2 here] (use the latest release if this isn't updated yet).[[BR]][[BR]]
     9}}}
     10  The 3.0.0 branch isn't released yet, so there are no source packages for this at the moment.[[BR]][[BR]]
     11  The development source is available via mercurial. See [wiki:UsingPidginMercurial] for more information.
     12
     13
     14== Cross Compiling (the easy way) ==
     15  It is quite easy to cross compile Pidgin for Windows on a Linux machine.
     16
     17  To begin, you'll need to install MinGW. On !Debian/Ubuntu, this involves installing packages `mingw32`, `mingw32-binutils`, `mingw32-runtime`, `mingw32-cross-pkg-config`. On other distributions, the packages may be named differently.
     18
     19  When compiling from hg, you'll need to generate `configure` script:
     20{{{
     21NOCONFIGURE=indeed ./autogen.sh
     22}}}
     23
     24  Set up pkgconfig (this may vary, depending on Linux distribution):
     25{{{
     26export PKG_CONFIG_PATH=/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig:\
     27                       /usr/i686-w64-mingw32/sys-root/mingw/share/pkgconfig
     28export PKG_CONFIG=/usr/bin/i686-w64-mingw32-pkg-config
     29}}}
     30
     31  Run configure with cross-compile option. You may choose FHS or classic directory layout (default is classic). For now (when installer is missing), FHS will be easier to install and run. Then - build it.
     32{{{
     33./configure --host=i686-w64-mingw32 --with-win32-dirs=<fhs|classic>
     34make
     35}}}
     36
     37  At last, install Pidgin, Finch and its dependencies.
     38{{{
     39make DESTDIR=/path/to/install-dir install
     40cd /path/to/install-dir
     41cd usr/local # it may depend on your configured $prefix
     42wget https://pidgin.im/~twasilczyk/win32/gtk-runtime-2.24.18.0.zip
     43unzip gtk-runtime-2.24.18.0.zip
     44cp -r Gtk/* .
     45rm -rf Gtk gtk-runtime-2.24.18.0.zip
     46}}}
     47
     48
     49== Compiling directly on Windows with Cygwin (the hard way) ==
     50
     51  This method was used for 2.x.y branch and most probably will be dropped, when cross-compilation was fully functional (including the installer).
     52
     53=== Set up your build environment ===
    654
    755  1. Install the [http://cygwin.com Cygwin] Bash shell. Make sure to select Unix file mode during setup.
     
    4492}}}
    4593
    46 == Get the Pidgin source code ==
    47 {{{
    48 #!comment
    49   The source for Pidgin 3.x.y is available [http://prdownloads.sourceforge.net/pidgin/pidgin-3.x.y.tar.bz2 here] (use the latest release if this isn't updated yet).[[BR]][[BR]]
    50 }}}
    51   The 3.0.0 branch isn't released yet, so there are no source packages for this at the moment.[[BR]][[BR]]
    52   The development source is available via mercurial. See [wiki:UsingPidginMercurial] for more information.
    53 
    54 == Build Pidgin ==
     94=== Build Pidgin ===
    5595
    5696  Run the following:
     
    62102  Now just wait and let your compiler do its thing.  When finished, Pidgin will be in `$PIDGIN_DEV_ROOT/pidgin-<version>/win32-install-dir`.
    63103
    64 == Build the Pidgin Installer ==
     104=== Build the Pidgin Installer ===
    65105
    66106    If you want to sign the executables (not necessary for personal use), you'll need to get an appropriate code signing certificate, generate a GPG key if you don't already have one, then download and install [http://www.mono-project.com/Download Mono]. In your `local.mak` file (see [#CustomizingtheBuildEnvironment below]), define the `SIGN_EXECUTABLES` variable to 1, `MONO_SIGNCODE` to the fully qualified path to the `signcode` batch file in the Mono `bin` directory, and the `SIGNCODE_SPC` and `SIGNCODE_PVK` variables to the appropriate files from your certificate. E.g.:
     
    85125    When it finishes, your installer(s) should be in `$PIDGIN_DEV_ROOT/pidgin-<version>/`.
    86126
    87 == Customizing the Build Environment ==
     127=== Customizing the Build Environment ===
    88128  Most people will find that the standard build environment directory is completely adequate.
    89129  It is, however, possible to override the locations of the various dependencies and target directories.
     
    110150  There is a quite good '''Just In Time''' debugger for MinGW: [http://code.google.com/p/jrfonseca/wiki/DrMingw drmingw].[[BR]]
    111151  There is also a version of `gdb` available from MinGW, if you prefer.
    112 
    113 
    114 {{{
    115 #!comment
    116 == Cross Compiling ==
    117   It is quite easy to cross compile Pidgin for Windows on a Linux machine.
    118 
    119   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.
    120 
    121   Set up a build environment as described [#Themanualway above], skipping steps 1 and 3.
    122 
    123   Create a `local.mak` file in the source directory root to override the Makefile variables - mine looks like this:
    124 {{{
    125 SHELL := /bin/bash
    126 CC := /usr/bin/i586-mingw32msvc-cc
    127 GMSGFMT := msgfmt
    128 MAKENSIS := /usr/bin/makensis
    129 WINDRES := /usr/bin/i586-mingw32msvc-windres
    130 STRIP := /usr/bin/i586-mingw32msvc-strip
    131 INTLTOOL_MERGE := /usr/bin/intltool-merge
    132 
    133 INCLUDE_PATHS := -I$(PIDGIN_TREE_TOP)/../win32-dev/w32api/include
    134 LIB_PATHS := -L$(PIDGIN_TREE_TOP)/../win32-dev/w32api/lib
    135 }}}
    136 
    137   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.
    138 
    139       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):
    140 
    141       `.tar.bz2` file contains latest source[[BR]]
    142       `.zip` file contains libraries
    143 {{{
    144 #!sh
    145 mkdir nsis; cd nsis
    146 wget http://prdownloads.sourceforge.net/nsis/nsis-2.46-src.tar.bz2?download
    147 wget http://prdownloads.sourceforge.net/nsis/nsis-2.46.zip?download
    148 tar -jxvf nsis-2.46-src.tar.bz2
    149 cd nsis-2.46
    150 scons SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all NSIS_CONFIG_CONST_DATA_PATH=no
    151 sudo scons install-compiler
    152 cd ..
    153 sudo unzip nsis-2.46 -d /usr/local/share
    154 sudo mv /usr/local/share/nsis-2.46/ /usr/local/share/nsis
    155 }}}
    156       If following the above instructions, the local.mak file ([#CrossCompiling listed above]) should be modified[[BR]]
    157 {{{
    158 MAKENSIS := /usr/local/bin/makensis
    159 }}}
    160 
    161 
    162   Once this is all set up, you should be able to follow the [#BuildPidgin building instructions above].
    163 }}}
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!