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.
- 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
-
v8
|
v9
|
|
15 | 15 | It is quite easy to cross compile Pidgin for Windows on a Linux machine. |
16 | 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. |
| 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]''''' |
18 | 18 | |
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 | {{{ |
| 23 | export 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 | {{{ |
| 28 | wget -nv -P"$WIN_DEV_DIR" "https://bitbucket.org/%21api/2.0/snippets/CMaiku/pon5L/9318f8fcc219fb123174a2a777a1c58a1da8ba3f/files/pidgin-bootstrap.sh" |
| 29 | chmod +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: |
20 | 34 | {{{ |
21 | 35 | NOCONFIGURE=indeed ./autogen.sh |
… |
… |
|
24 | 38 | Set up pkgconfig (this may vary, depending on Linux distribution): |
25 | 39 | {{{ |
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 |
| 40 | export PKG_CONFIG="/usr/bin/i686-w64-mingw32-pkg-config --define-prefix=${WIN_DEV_DIR}" |
| 41 | export PKG_CONFIG_PATH="${WIN_DEV_DIR}/lib/pkgconfig" |
29 | 42 | }}} |
30 | 43 | |
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]. |
32 | 45 | {{{ |
33 | | ./configure --host=i686-w64-mingw32 --with-win32-dirs=<fhs|classic> |
| 46 | CC="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 | {{{ |
34 | 51 | make |
35 | 52 | }}} |
36 | 53 | |
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. |
38 | 55 | {{{ |
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 |
| 56 | make DESTDIR=${WIN_DEV_DIR} install |
46 | 57 | }}} |
47 | 58 | |
| 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 | {{{ |
| 66 | p11-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 | {{{ |
| 71 | bin\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 | {{{ |
| 76 | set GIO_USE_TLS=gnutls-pkcs11 |
| 77 | }}} |
48 | 78 | |
49 | 79 | == 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!