Blame win32/README.txt

Packit 874993
Instructions for building HarfBuzz on Visual Studio
Packit 874993
===================================================
Packit 874993
Building the HarfBuzz DLL on Windows is now also supported using Visual Studio
Packit 874993
versions 2008 through 2015, in both 32-bit and 64-bit (x64) flavors, via NMake
Packit 874993
Makefiles.
Packit 874993

Packit 874993
The following are instructions for performing such a build, as there is a
Packit 874993
number of build configurations supported for the build.  Note that for all
Packit 874993
build configurations, the OpenType and Simple TrueType layout (fallback)
Packit 874993
backends are enabled, and this is the base configuration that is built if no
Packit 874993
options (see below) are specified.  A 'clean' target is provided-it is recommended
Packit 874993
that one cleans the build and redo the build if any configuration option changed.
Packit 874993
An 'install' target is also provided to copy the built items in their appropriate
Packit 874993
locations under $(PREFIX), which is described below.  A 'reallyclean' target is
Packit 874993
provided that not only does what is done for the 'clean' target, but also removes
Packit 874993
the sources/headers that are generated from the Ragel sources.  Therefore, if one
Packit 874993
is not building from a release tarball, or is rebuilding after using the 'reallyclean'
Packit 874993
target or when the Ragel (*.rl) sources are updated, the Ragel state machine
Packit 874993
compiler (ragel.exe) is needed, and needs to be passed in via RAGEL=<path_to_ragel_exe>
Packit 874993
if ragel.exe is not already in the PATH.
Packit 874993

Packit 874993
We now support building from a GIT checkout via NMake for convenience.  In addition to
Packit 874993
the requirements as outlined in the later part of this file, you will need to run the
Packit 874993
setup.py (Python 2.7.x or later) script to generate the headers (src\hb-version.h and
Packit 874993
win32\config.h.win32) that are normally shipped in a release tarball before running
Packit 874993
NMake, and you will need to pass RAGEL=<path_to_ragel_exe> if the Ragel state machine
Packit 874993
compiler (ragel.exe) is not in your PATH when invoking NMake.  Note that the
Packit 874993
'reallyclean' target does not remove these 2 generated headers, so re-run the setup.py
Packit 874993
script if necessary.
Packit 874993

Packit 874993
Invoke the build by issuing the command:
Packit 874993
nmake /f Makefile.vc CFG=[release|debug] [PREFIX=...] <option1=1 option2=1 ...>
Packit 874993
where:
Packit 874993

Packit 874993
CFG: Required.  Choose from a release or debug build.  Note that 
Packit 874993
     all builds generate a .pdb file for each .dll and .exe built--this refers
Packit 874993
     to the C/C++ runtime that the build uses.
Packit 874993

Packit 874993
PREFIX: Optional.  Base directory of where the third-party headers, libraries
Packit 874993
        and needed tools can be found, i.e. headers in $(PREFIX)\include,
Packit 874993
        libraries in $(PREFIX)\lib and tools in $(PREFIX)\bin.  If not
Packit 874993
        specified, $(PREFIX) is set as $(srcroot)\..\vs$(X)\$(platform), where
Packit 874993
        $(platform) is win32 for 32-bit builds or x64 for 64-bit builds, and
Packit 874993
        $(X) is the short version of the Visual Studio used, as follows:
Packit 874993
        2008: 9
Packit 874993
        2010: 10
Packit 874993
        2012: 11
Packit 874993
        2013: 12
Packit 874993
        2015: 14
Packit 874993
        2017: 15
Packit 874993

Packit 874993
Explanation of options, set by <option>=1:
Packit 874993
------------------------------------------
Packit 874993
GLIB: Enable GLib support in HarfBuzz, which also uses the GLib unicode
Packit 874993
      callback if the bundled UCDN unicode callback is disabled.  This requires the
Packit 874993
      GLib libraries, and is required for building all tool and test programs.
Packit 874993

Packit 874993
GOBJECT: Enable building the HarfBuzz-GObject DLL, and thus implies GLib
Packit 874993
         support.  This requires the GObject libraries and glib-mkenums script,
Packit 874993
         along with PERL to generate the enum sources and headers, which is
Packit 874993
         required for the build.
Packit 874993

Packit 874993
INTROSPECTION: Enable build of introspection files, for making HarfBuzz
Packit 874993
               bindings for other programming languages available, such as
Packit 874993
               Python, available.  This requires the GObject-Introspection
Packit 874993
               libraries and tools, along with the Python interpretor that was
Packit 874993
               used during the build of GObject-Introspection.  Please see
Packit 874993
               $(srcroot)\README.python for more related details.  This implies
Packit 874993
               the build of the HarfBuzz-GObject DLL, along with GLib support.
Packit 874993

Packit 874993
FREETYPE: Enable the FreeType font callbacks.  Requires the FreeType2 library.
Packit 874993

Packit 874993
CAIRO: Enable Cairo support.  Requires the Cairo library.
Packit 874993

Packit 874993
CAIRO_FT: Enable the build of the hb-view tool, which makes use of Cairo, and
Packit 874993
          thus implies FreeType font callback support and Cairo support.
Packit 874993
          Requires Cairo libraries built with FreeType support.  Note that the
Packit 874993
          hb-view tool requires GLib support as well.
Packit 874993

Packit 874993
GRAPHITE2: Enable the Graphite2 shaper, requires the SIL Graphite2 library.
Packit 874993

Packit 874993
ICU: Enables the build of ICU Unicode functions. Requires the ICU libraries.
Packit 874993

Packit 874993
UNISCRIBE: Enable Uniscribe platform shaper support.
Packit 874993

Packit 874993
DIRECTWRITE: Enable DirectWrite platform shaper support,
Packit 874993
             requires a rather recent Windows SDK, and at least Windows Vista/
Packit 874993
             Server 2008 with SP2 and platform update.
Packit 874993

Packit 874993
PYTHON: Full path to the Python interpretor to be used, if it is not in %PATH%.
Packit 874993

Packit 874993
PERL: Full path to the PERL interpretor to be used, if it is not in %PATH%.
Packit 874993

Packit 874993
RAGEL: Full path to the Ragel state machine compiler executable, if not in %PATH%
Packit 874993

Packit 874993
LIBTOOL_DLL_NAME: Enable libtool-style DLL names.