Blame win32/vs11/README.txt

Packit ae235b
Please do not compile this package (GLib) in paths that contain
Packit ae235b
spaces in them-as strange problems may occur during compilation or during
Packit ae235b
the use of the library.
Packit ae235b

Packit ae235b
Please refer to the following GNOME Live! page for more detailed
Packit ae235b
instructions on building GLib and its dependencies with Visual C++:
Packit ae235b

Packit ae235b
https://wiki.gnome.org/Projects/GTK%2B/Win32/MSVCCompilationOfGTKStack
Packit ae235b

Packit ae235b
This VS11 solution and the projects it includes are intented to be used
Packit ae235b
in a GLib source tree unpacked from a tarball. In a git checkout you
Packit ae235b
first need to use some Unix-like environment or run build/win32/setup.py, 
Packit ae235b
which will do the work for you:
Packit ae235b

Packit ae235b
$python build/win32/setup.py --perl path_to_your_perl.exe
Packit ae235b

Packit ae235b
for more usage on this script, run
Packit ae235b
$python build/win32/setup.py -h/--help
Packit ae235b

Packit ae235b
The required dependencies are zlib, proxy-libintl and LibFFI. Fetch the latest
Packit ae235b
proxy-libintl-dev and zlib-dev zipfiles from
Packit ae235b
http://ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/ for 32-bit
Packit ae235b
builds, and correspondingly
Packit ae235b
http://ftp.gnome.org/pub/GNOME/binaries/win64/dependencies/ for 64-bit
Packit ae235b
builds.
Packit ae235b

Packit ae235b
A Python 2.7.x or 3.x interpreter is also required, in order to generate
Packit ae235b
the utility scripts, as well as the pkg-config files for the build.  Please
Packit ae235b
see the entry "PythonDir" in glib-version-paths.props to verify that
Packit ae235b
it is correct.
Packit ae235b

Packit ae235b
One may wish to build his/her own ZLib-It is recommended that ZLib is
Packit ae235b
built using the win32/Makefile.msc makefile with VS11 with the ASM routines
Packit ae235b
to avoid linking problems-see win32/Makefile.msc in ZLib for more details.
Packit ae235b

Packit ae235b
For LibFFI, please use the Centricular fork of it, which can be found at
Packit ae235b
https://github.com/centricular/libffi.  Please refer to the instructions
Packit ae235b
there on building, as it involves using the Meson build system and possibly
Packit ae235b
the Ninja build tool if the Visual Studio project generation is not used
Packit ae235b
or is unavailable.
Packit ae235b

Packit ae235b
Please note, although using one's own existing PCRE installation to build GLib
Packit ae235b
is possible, it is still recommended to build PCRE during the process of building
Packit ae235b
GLib (i.e. using the Debug or Release configurations), as GLib's bundled PCRE
Packit ae235b
has been patched to work optimally with GLib.  If building against an existing
Packit ae235b
PCRE is desired, use the(BuildType)_ExtPCRE configurations, but one needs to ensure
Packit ae235b
that the existing PCRE is:
Packit ae235b
-Built with VS11
Packit ae235b
-Unicode support is built in (please see the CMake options for this)
Packit ae235b
-It is built with the Multithreaded DLL (/MD, for release builds) or the
Packit ae235b
 Multithreaded DLL Debug (/MDd, for debug builds)
Packit ae235b

Packit ae235b
If using static builds of PCRE, please add PCRE_STATIC to the "Preprocessor
Packit ae235b
Definitions" of the glib project settings.
Packit ae235b

Packit ae235b
Please be aware that the GLib's regex test program will only pass with PCRE directly
Packit ae235b
built into GLib.
Packit ae235b

Packit ae235b
Set up the source tree as follows under some arbitrary top
Packit ae235b
folder <root>:
Packit ae235b

Packit ae235b
<root>\<this-glib-source-tree>
Packit ae235b
<root>\vs11\<PlatformName>
Packit ae235b

Packit ae235b
*this* file you are now reading is thus located at
Packit ae235b
<root>\<this-glib-source-tree>\build\win32\vs11\README.
Packit ae235b

Packit ae235b
<PlatformName> is either Win32 or x64, as in VS11 project files.
Packit ae235b

Packit ae235b
You should unpack the proxy-libintl-dev zip file into
Packit ae235b
<root>\vs11\<PlatformName>, so that for instance libintl.h end up at
Packit ae235b
<root>\vs11\<PlatformName>\include\libintl.h.
Packit ae235b

Packit ae235b
For LibFFI, one should also put the generated ffi.h and ffitarget.h
Packit ae235b
into <root>\vs11\<PlatformName>\include\ and the compiled static libffi.lib
Packit ae235b
(or copy libffi-convenience.lib into libffi.lib) into 
Packit ae235b
<root>\vs11\<PlatformName>\lib\.
Packit ae235b

Packit ae235b
The "install" project will copy build results and headers into their
Packit ae235b
appropriate location under <root>\vs11\<PlatformName>. For instance,
Packit ae235b
built DLLs go into <root>\vs11\<PlatformName>\bin, built LIBs into
Packit ae235b
<root>\vs11\<PlatformName>\lib and GLib headers into
Packit ae235b
<root>\vs11\<PlatformName>\include\glib-2.0. This is then from where
Packit ae235b
project files higher in the stack are supposed to look for them, not
Packit ae235b
from a specific GLib source tree.
Packit ae235b

Packit ae235b
Note: If you see C4819 errors and you are compiling GLib on a DBCS
Packit ae235b
(Chinese/Korean/Japanese) version of Windows, you may need to switch
Packit ae235b
to an English locale in Control Panel->Region and Languages->System->
Packit ae235b
Change System Locale, reboot and rebuild to ensure GLib, Pango, GDK-Pixbuf,
Packit ae235b
ATK and GTK+ is built correctly.  This is due to a bug in Visual C++ running
Packit ae235b
on DBCS locales, and also affects many other opensource projects which are
Packit ae235b
built with Visual C++, including but not limited to QT and the Mozilla apps.
Packit ae235b

Packit ae235b
--Tor Lillqvist <tml@iki.fi>
Packit ae235b
--Updated by Chun-wei Fan <fanc999@gmail.com>