[Pidgin] BuildingWinPidgin/3.0.0 modified

Pidgin trac at pidgin.im
Mon May 14 21:05:31 EDT 2018


Page "BuildingWinPidgin/3.0.0" was changed by Maiku
Diff URL: <https://developer.pidgin.im/wiki/BuildingWinPidgin/3.0.0?action=diff&version=11>
Revision 11
Comment: Update cross compile instructions to meson
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: BuildingWinPidgin/3.0.0
=========================================================================
--- BuildingWinPidgin/3.0.0 (version: 10)
+++ BuildingWinPidgin/3.0.0 (version: 11)
@@ -16,45 +16,51 @@
 
   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.
 
-  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:
+  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:
 {{{
-export WIN_DEV_DIR=${HOME}/win32-dev/
+export WIN_DEV_DIR=${HOME}/win-dev/
 }}}
 
-  Actually fetch the dependencies using the [https://bitbucket.org/snippets/CMaiku/pon5L/pidgin-for-windows-bootstrap-script bootstrap script]:
+  Fetch the dependencies using the [https://bitbucket.org/snippets/CMaiku/pon5L/pidgin-for-windows-bootstrap-script bootstrap script]:
 {{{
-wget -nv -P"$WIN_DEV_DIR" "https://bitbucket.org/%21api/2.0/snippets/CMaiku/pon5L/9318f8fcc219fb123174a2a777a1c58a1da8ba3f/files/pidgin-bootstrap.sh"
+wget -nv -P"$WIN_DEV_DIR" "https://bitbucket.org/%21api/2.0/snippets/CMaiku/pon5L/files/pidgin-bootstrap.sh"
 chmod +x "${WIN_DEV_DIR}/pidgin-bootstrap.sh"
 ${WIN_DEV_DIR}/pidgin-bootstrap.sh
 }}}
 
-  When compiling from hg, you'll need to generate a `configure` script:
+  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:
 {{{
-NOCONFIGURE=indeed ./autogen.sh
+[properties]
+c_args = ['-I/path/to/win-dev-dir/mingw32/include/']
+c_link_args = ['-static-libgcc']
+
 }}}
 
-  Set up pkgconfig (this may vary, depending on Linux distribution):
+  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.
+
+  Set up pkg-config:
 {{{
-export PKG_CONFIG="/usr/bin/i686-w64-mingw32-pkg-config --define-prefix=${WIN_DEV_DIR}"
-export PKG_CONFIG_PATH="${WIN_DEV_DIR}/lib/pkgconfig"
+export PKG_CONFIG_SYSROOT_DIR=${WIN_DEV_DIR}
+export PKG_CONFIG_PATH="${WIN_DEV_DIR}/mingw32/lib/pkgconfig"
 }}}
 
-  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].
+  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.
 {{{
-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/"
+meson pidgin build-win32 --cross-file win32_cross.txt --prefix=/mingw32/ -Dconsoleui=false -Dvv=false -Dintrospection=false -Dwin32-dirs=fhs
 }}}
 
-  Then build it.
+  Change into the build directory and build it:
 {{{
-make
+cd build-win32
+ninja
 }}}
 
-  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.
+  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.
 {{{
-make DESTDIR=${WIN_DEV_DIR} install
+DESTDIR=${WIN_DEV_DIR} ninja install
 }}}
 
-  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.
+  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.
 
 === TLS Certificates ===
   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:
-------8<------8<------8<------8<------8<------8<------8<------8<--------

--
Page URL: <https://developer.pidgin.im/wiki/BuildingWinPidgin/3.0.0>
Pidgin <https://pidgin.im>
Pidgin

This is an automated message. Someone added your email address to be
notified of changes on 'BuildingWinPidgin/3.0.0' page.
If it was not you, please report to datallah at pidgin.im.


More information about the Wikiedit mailing list