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 8 and Version 9 of BuildingWinPidgin/3.0.0


Ignore:
Timestamp:
Sep 25, 2016, 9:45:20 PM (7 years ago)
Author:
Maiku
Comment:

Update Windows build instructions for modern Pidgin 3

Legend:

Unmodified
Added
Removed
Modified
  • BuildingWinPidgin/3.0.0

    v8 v9  
    1515  It is quite easy to cross compile Pidgin for Windows on a Linux machine.
    1616
    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.
     17  '''''Until it's merged, this guide relies on the branch from [https://bitbucket.org/pidgin/main/pull-requests/136/windows-build-fixes/diff PR 136]'''''
    1818
    19   When compiling from hg, you'll need to generate `configure` script:
     19  To begin, you'll need to install MinGW. On !Debian/Ubuntu, this involves installing packages `mingw-w64` and `mingw-w64-tools`. On other distributions, the packages may be named differently.
     20
     21  Next, you need to set up a MinGW development directory and populate it with all of the Pidgin dependencies. Start by defining that in an environment variable. The exactly location can be changed to fit your filesystem:
     22{{{
     23export WIN_DEV_DIR=${HOME}/win32-dev/
     24}}}
     25
     26  Actually fetch the dependencies using the [https://bitbucket.org/snippets/CMaiku/pon5L/pidgin-for-windows-bootstrap-script bootstrap script]:
     27{{{
     28wget -nv -P"$WIN_DEV_DIR" "https://bitbucket.org/%21api/2.0/snippets/CMaiku/pon5L/9318f8fcc219fb123174a2a777a1c58a1da8ba3f/files/pidgin-bootstrap.sh"
     29chmod +x "${WIN_DEV_DIR}/pidgin-bootstrap.sh"
     30${WIN_DEV_DIR}/pidgin-bootstrap.sh
     31}}}
     32
     33  When compiling from hg, you'll need to generate a `configure` script:
    2034{{{
    2135NOCONFIGURE=indeed ./autogen.sh
     
    2438  Set up pkgconfig (this may vary, depending on Linux distribution):
    2539{{{
    26 export PKG_CONFIG_PATH=/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig:\
    27                        /usr/i686-w64-mingw32/sys-root/mingw/share/pkgconfig
    28 export PKG_CONFIG=/usr/bin/i686-w64-mingw32-pkg-config
     40export PKG_CONFIG="/usr/bin/i686-w64-mingw32-pkg-config --define-prefix=${WIN_DEV_DIR}"
     41export PKG_CONFIG_PATH="${WIN_DEV_DIR}/lib/pkgconfig"
    2942}}}
    3043
    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.
     44  Run configure with the 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. The rest of this script assumes you're using FHS. The actual compiler used in the CC environment variable may vary depending on Linux distribution. Unfortunately this override is needed to bypass an [http://mingw.org/wiki/HOWTO_Sneak_GCC_Switches_Past_Libtool issue with libtool].
    3245{{{
    33 ./configure --host=i686-w64-mingw32 --with-win32-dirs=<fhs|classic>
     46CC="i686-w64-mingw32-gcc -static-libgcc" ./configure --host=i686-w64-mingw32 --with-win32-dirs=<fhs|classic> --disable-vv --prefix=/ CFLAGS="-I${WIN_DEV_DIR}/include/"
     47}}}
     48
     49  Then build it.
     50{{{
    3451make
    3552}}}
    3653
    37   At last, install Pidgin, Finch and its dependencies.
     54  At last, install Pidgin, Finch and its dependencies. It can be installed anywhere, but it needs dependencies which are, according to this guide, already in `${WIN_DEV_DIR}`. So for simplicity, this guide installs it there.
    3855{{{
    39 make DESTDIR=/path/to/install-dir install
    40 cd /path/to/install-dir
    41 cd usr/local # it may depend on your configured $prefix
    42 wget https://pidgin.im/~twasilczyk/win32/gtk-runtime-2.24.18.0.zip
    43 unzip gtk-runtime-2.24.18.0.zip
    44 cp -r Gtk/* .
    45 rm -rf Gtk gtk-runtime-2.24.18.0.zip
     56make DESTDIR=${WIN_DEV_DIR} install
    4657}}}
    4758
     59  Now you're done. `${WIN_DEV_DIR}` can be copied to a Windows machine and run as is (`${WIN_DEV_DIR}/bin/pidgin.exe`). However, see below regarding TLS certificates.
     60
     61=== TLS Certificates ===
     62  Pidgin 3 uses Gio for its TLS certificates, which by default uses Certificate Authorities from `${WIN_DEV_DIR}/ssl/certs/ca-bundle.crt`. Because of the way the dependencies are fetched, currently this file is empty. There are three methods to resolve this:
     63
     64  Populate the file by running p11-kit from the cross compiling host:
     65{{{
     66p11-kit extract --format=pem-bundle --filter=ca-anchors --overwrite --purpose server-auth ${WIN_DEV_DIR}/ssl/certs/ca-bundle.crt
     67}}}
     68
     69  OR run it from Windows (run from `${WIN_DEV_DIR}`):
     70{{{
     71bin\p11-kit.exe extract --format=pem-bundle --filter=ca-anchors --overwrite --purpose server-auth ssl\certs\ca-bundle.crt
     72}}}
     73
     74  OR bypass the file and use the alternate Gio TLS Backend by setting the environment variable:
     75{{{
     76set GIO_USE_TLS=gnutls-pkcs11
     77}}}
    4878
    4979== Compiling directly on Windows with Cygwin (the hard way) ==
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!