Commit Graph

1 Commits

Author SHA1 Message Date
fanc999 48a9406839 Fix build of HarfBuzz tools and HarfBuzz-GObject on Visual Studio (#555)
* hb-buffer.h: Mark hb_buffer_diff() for export

This will fix the tools builds on Visual Studio, as the symbol is used
by the tools.

* build: Adapt NMake Makefiles for GLib 2.53.4 or later

glib-mkenums was ported from a PERL script to a Python script, so we
need to update how we generate the enum sources for HarfBuzz-GObject in
the NMake builds.  Let this be known in the build documentation for MSVC
builds.

One of the problems with the underlying cmd.exe that the NMake Makefiles
run on is that shebang lines are not recognized, so we need to to test
run the script with Python and see whether it succeeded by outputing a
source file that is larger than 0 in file size (since running the PERL
version of the script will clearly fail and cause an empty file to be
created).

If it succeeds, we then run a small Python utility script that makes the
necessary string replacements, and we are done.  If that fails, then we
run the glib-mkenums script with PERL, and do the replacements with the
PERL one-liners as we did before.

We need to make replace.py use latin-1 encoding when using Python 3.x to
cope with the copyright sign that is in the generated enum sources.
2017-10-07 12:57:14 +02:00