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 10 and Version 11 of BuildingWinPidgin/3.0.0


Ignore:
Timestamp:
May 15, 2018, 1:04:43 AM (6 years ago)
Author:
Maiku
Comment:

Update cross compile instructions to meson

Legend:

Unmodified
Added
Removed
Modified
  • BuildingWinPidgin/3.0.0

    v10 v11  
    1717  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.
    1818
    19   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:
     19  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 exact location can be changed to fit your filesystem:
    2020{{{
    21 export WIN_DEV_DIR=${HOME}/win32-dev/
     21export WIN_DEV_DIR=${HOME}/win-dev/
    2222}}}
    2323
    24   Actually fetch the dependencies using the [https://bitbucket.org/snippets/CMaiku/pon5L/pidgin-for-windows-bootstrap-script bootstrap script]:
     24  Fetch the dependencies using the [https://bitbucket.org/snippets/CMaiku/pon5L/pidgin-for-windows-bootstrap-script bootstrap script]:
    2525{{{
    26 wget -nv -P"$WIN_DEV_DIR" "https://bitbucket.org/%21api/2.0/snippets/CMaiku/pon5L/9318f8fcc219fb123174a2a777a1c58a1da8ba3f/files/pidgin-bootstrap.sh"
     26wget -nv -P"$WIN_DEV_DIR" "https://bitbucket.org/%21api/2.0/snippets/CMaiku/pon5L/files/pidgin-bootstrap.sh"
    2727chmod +x "${WIN_DEV_DIR}/pidgin-bootstrap.sh"
    2828${WIN_DEV_DIR}/pidgin-bootstrap.sh
    2929}}}
    3030
    31   When compiling from hg, you'll need to generate a `configure` script:
     31  Create a cross compile file for meson. It should be named win32_cross.txt for following this guide. Details can be found [http://mesonbuild.com/Cross-compilation.html here], and an example you can edit to your system is [https://bitbucket.org/snippets/CMaiku/deba8x/meson-win32-cross-compile-file-example here]. It's important to include these lines in the properties section:
    3232{{{
    33 NOCONFIGURE=indeed ./autogen.sh
     33[properties]
     34c_args = ['-I/path/to/win-dev-dir/mingw32/include/']
     35c_link_args = ['-static-libgcc']
     36
    3437}}}
    3538
    36   Set up pkgconfig (this may vary, depending on Linux distribution):
     39  Edit the `c_args` line to point to the full path of `${WIN_DEV_DIR}/mingw32/include/`. The `c_link_args` line is unnecessary for 64-bit.
     40
     41  Set up pkg-config:
    3742{{{
    38 export PKG_CONFIG="/usr/bin/i686-w64-mingw32-pkg-config --define-prefix=${WIN_DEV_DIR}"
    39 export PKG_CONFIG_PATH="${WIN_DEV_DIR}/lib/pkgconfig"
     43export PKG_CONFIG_SYSROOT_DIR=${WIN_DEV_DIR}
     44export PKG_CONFIG_PATH="${WIN_DEV_DIR}/mingw32/lib/pkgconfig"
    4045}}}
    4146
    42   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].
     47  Create your build directory with the `--cross-file` option. You may choose FHS or classic directory layout (default is classic). For now (while the installer is missing), FHS will be easier to install and run. The rest of this script assumes you're using FHS. Make sure to have the Pidgin source tree as a child of the current directory.
    4348{{{
    44 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/"
     49meson pidgin build-win32 --cross-file win32_cross.txt --prefix=/mingw32/ -Dconsoleui=false -Dvv=false -Dintrospection=false -Dwin32-dirs=fhs
    4550}}}
    4651
    47   Then build it.
     52  Change into the build directory and build it:
    4853{{{
    49 make
     54cd build-win32
     55ninja
    5056}}}
    5157
    52   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.
     58  And last, install Pidgin and its dependencies. It can be installed anywhere, but it needs dependencies which are, according to this guide, already in `${WIN_DEV_DIR}/mingw32`. So for simplicity, this guide installs them there.
    5359{{{
    54 make DESTDIR=${WIN_DEV_DIR} install
     60DESTDIR=${WIN_DEV_DIR} ninja install
    5561}}}
    5662
    57   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.
     63  Now you're done. `${WIN_DEV_DIR}/mingw32/` can be copied to a Windows machine and run as is (`${WIN_DEV_DIR}/mingw32/bin/pidgin.exe`). However, see below regarding TLS certificates.
    5864
    5965=== TLS Certificates ===
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!