1 Instructions for building HarfBuzz on Visual Studio 2 =================================================== 3 Building the HarfBuzz DLL on Windows is now also supported using Visual Studio 4 versions 2008 through 2015, in both 32-bit and 64-bit (x64) flavors, via NMake 5 Makefiles. 6 7 The following are instructions for performing such a build, as there is a 8 number of build configurations supported for the build. Note that for all 9 build configurations, the OpenType and Simple TrueType layout (fallback) 10 backends are enabled, as well as the Uniscribe platform shaper, and this 11 is the base configuration that is built if no options (see below) are 12 specified. A 'clean' target is provided-it is recommended that one cleans 13 the build and redo the build if any configuration option changed. An 14 'install' target is also provided to copy the built items in their appropriate 15 locations under $(PREFIX), which is described below. 16 17 Invoke the build by issuing the command: 18 nmake /f Makefile.vc CFG=[release|debug] [PREFIX=...] <option1=1 option2=1 ...> 19 where: 20 21 CFG: Required. Choose from a release or debug build. Note that 22 all builds generate a .pdb file for each .dll and .exe built--this refers 23 to the C/C++ runtime that the build uses. 24 25 PREFIX: Optional. Base directory of where the third-party headers, libraries 26 and needed tools can be found, i.e. headers in $(PREFIX)\include, 27 libraries in $(PREFIX)\lib and tools in $(PREFIX)\bin. If not 28 specified, $(PREFIX) is set as $(srcroot)\..\vs$(X)\$(platform), where 29 $(platform) is win32 for 32-bit builds or x64 for 64-bit builds, and 30 $(X) is the short version of the Visual Studio used, as follows: 31 2008: 9 32 2010: 10 33 2012: 11 34 2013: 12 35 2015: 14 36 37 Explanation of options, set by <option>=1: 38 ------------------------------------------ 39 GLIB: Enable GLib support in HarfBuzz, which also uses the GLib unicode 40 callback instead of the bundled UCDN unicode callback. This requires the 41 GLib libraries, and is required for building all tool and test programs. 42 43 GOBJECT: Enable building the HarfBuzz-GObject DLL, and thus implies GLib 44 support. This requires the GObject libraries and glib-mkenums script, 45 along with PERL to generate the enum sources and headers, which is 46 required for the build. 47 48 INTROSPECTION: Enable build of introspection files, for making HarfBuzz 49 bindings for other programming languages available, such as 50 Python, available. This requires the GObject-Introspection 51 libraries and tools, along with the Python interpretor that was 52 used during the build of GObject-Introspection. Please see 53 $(srcroot)\README.python for more related details. This implies 54 the build of the HarfBuzz-GObject DLL, along with GLib support. 55 56 FREETYPE: Enable the FreeType font callbacks. Requires the FreeType2 library. 57 58 CAIRO: Enable Cairo support. Requires the Cairo library. 59 60 CAIRO_FT: Enable the build of the hb-view tool, which makes use of Cairo, and 61 thus implies FreeType font callback support and Cairo support. 62 Requires Cairo libraries built with FreeType support. Note that the 63 hb-view tool requires GLib support as well. 64 65 GRAPHITE2: Enable the Graphite2 shaper, requires the SIL Graphite2 library. 66 67 ICU: Enables the build HarfBuzz-ICU, which is now the recommended layout engine 68 for ICU (International Components for Unicode), which deprecated ICU LE. 69 Requires the ICU libraries. 70 71 DIRECTWRITE: Enable (experimental) DirectWrite platform shaper support, 72 requires a rather recent Windows SDK, and at least Windows Vista/ 73 Server 2008 with SP2 and platform update. 74 75 PYTHON: Full path to the Python interpretor to be used, if it is not in %PATH%. 76 77 PERL: Full path to the PERL interpretor to be used, if it is not in %PATH%. 78 79 LIBTOOL_DLL_NAME: Enable libtool-style DLL names.