Blame win32/README.txt

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

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

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

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

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

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

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

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

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

Packit Service 5bcba8
FREETYPE: Enable the FreeType font callbacks.  Requires the FreeType2 library.
Packit Service 5bcba8

Packit Service 5bcba8
CAIRO: Enable Cairo support.  Requires the Cairo library.
Packit Service 5bcba8

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

Packit Service 5bcba8
GRAPHITE2: Enable the Graphite2 shaper, requires the SIL Graphite2 library.
Packit Service 5bcba8

Packit Service 5bcba8
ICU: Enables the build of ICU Unicode functions. Requires the ICU libraries.
Packit Service 5bcba8

Packit Service 5bcba8
UNISCRIBE: Enable Uniscribe platform shaper support.
Packit Service 5bcba8

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

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

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

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

Packit Service 5bcba8
LIBTOOL_DLL_NAME: Enable libtool-style DLL names.