Commit Graph

18 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
fanc999 ad52e044bc Win32/NMake builds: Support builds from GIT (#498)
Add Python scripts to generate the full win32/config.h.win32 and
src/hb-version.h which can be used to build directly from a GIT
checkout.  Since the scripts are currently intended for building from a
GIT checkout, these are not distributed in the release tarballs.

Also, support the re-build of Ragel-generated .hh headers using the NMake
build system, and allow one to specify the path of the Ragel executable
if a suitable one cannot be found in the PATH.

Update the Win32/NMake build documentation to let people know about how
these mechanisms can be utilized.
2017-06-21 18:49:57 +04:30
Chun-wei Fan bc1244e239 NMake Makefiles: Fix ICU builds
Fix the check conditions in config-msvc.mak and info-msvc.mak so that
the ICU items does indeed get built into the HarfBuzz main DLL, and that
the correct configuration info is displayed.

Also update the checks in detectenv-msvc.mak so that we can detect that
we are using Visual Studio 2017 (although the 2015-built binaries use
the same CRT DLL as the 2017 ones).
2017-04-06 14:10:42 +03:00
ebraminio d2acaf6d72 Split ragel generated files lists and remove hardcoded rl files lists (#453) 2017-04-05 11:21:23 +02:00
Chun-wei Fan b90fb83ea6 Visual Studio builds: Fix Introspection when UCDN enabled
The sources in src/hb-ucdn and not included correctly into the NMake
Makefiles, as we need their explicit relative location as we pass all the
sources we used into the introspection scanner.  This was not an issue
before as we excluded the UCDN sources in the build when we enabled
introspection (meaning GLib is enabled), but since we default on using
UCDN on all builds unless explicitly disabled, we need to deal with this.

This did not affect builds using UCDN without introspection due to the use
of NMake batch rules.

Fix this by creating a NMake Makefile module on-the-fly with the correct
subdir info, and using that list in there instead.
2017-03-22 23:03:49 +02:00
Chun-wei Fan f0aa167e44 Update Visual Studio builds for UCDN usage
We now use UCDN by default, so make it so in the build files; however
don't hardcode HAVE_UCDN as one may still opt not to use it (but pass
it in as a CFLAG unless one explicitly disables UCDN by using NO_UCDN=1
on the NMake command line).

Note that we are not blocking builds where UCDN is disabled along with
GLib and ICU, as that will trigger a build error anyways which will tell
the user what needs to be done to remedy this.
2017-03-22 23:03:49 +02:00
ebraminio ebf927d3d4 Make UCDN default enabled (fixes #389) (#391) 2017-01-09 01:42:09 -08:00
elmarb 4cd0cd6791 NMake ICU option builds with builtin ICU (#375) 2016-12-16 19:06:26 -06:00
Khaled Hosny 75fa884f92 [win32] Fix wrong description of the ICU option (#372) 2016-12-16 19:06:26 -06:00
Ebrahim Byagowi 261837e720 Fix "nmake install" when ADDITIONAL_LIB_DIR is provided and test it on CI (#356) 2016-10-28 21:49:11 +03:30
Ebrahim Byagowi 4631d84c2b Merge back @vlj's local patches of vcpkg 2016-10-19 23:01:43 +03:30
Ebrahim Byagowi d8e2eb9ee0 Make Uniscribe optional on nmake win32 builds
Most of harfbuzz clients don't need Uniscribe and DirectWrite support at all
as harfbuzz is a replacement for Uniscribe so Chromium and Firefox are using
harfbuzz without them on Windows.

This removal also helps win32 nmake clients to have reduced binary size and
libs count.
2016-10-14 06:41:37 +00:00
Gregory Morse 02bfd965af Update detectenv-msvc.mak (#316)
Windows x86 ARM capability
2016-09-12 01:22:15 -07:00
Ebrahim Byagowi c4f36b04e3 [ci] Add Windows CI support, provided by AppVeyor (#308) 2016-09-01 06:01:16 -07:00
Behdad Esfahbod 54788cb1ec [win32] Install git.mk 2016-02-22 15:38:44 +09:00
Chun-wei Fan f6ffba634b MSVC builds: Add support to build DirectWrite shaping backend
Add into the NMake Makefiles to build the DirectWrite shaping backend,
but as PR #134 mentions, this is considered to be in an experimental state,
so don't include this in the build by default for now.  This is most probably
going to replace the Uniscribe backend eventually, since DirectWrite is meant
to be Uniscribe's replacement, and is needed for Windows Store apps if a
system shaping API is to be used.
2016-02-03 20:17:09 +08:00
Chun-wei Fan d7b6636e5e build: Support Visual Studio builds using NMake
This adds a set of NMake Makefiles that can be used to build HarfBuzz, from
the standard basic build building the minimal HarfBuzz DLL (consisting
of OpenType, fallback and Uniscribe support only), to a full fledged build
consisting of GLib and FreeType support, as well as building the utilities,
the test programs in src/ and test/api, and HarfBuzz-ICU and
HarfBuzz-GObject, and up to building the introspection files.  This means a
flexible build mechanism is supported here, so anything that is supported
for a Windows build (code-wise), should all be supported by this build
system.

As in an earlier commit, the source listings are shared with the autotools
builds with the various Makefile.sources in src/, src/hb-ucdn and util/, and
this set of NMake Makefiles will transform these lists into the form they
want.

In the current form, all the test programs in test/api pass, and this has
been checked successfully with 'make -j8 distcheck'.
2016-02-03 18:14:30 +08:00
Chun-wei Fan 5c3e7260bc MSVC builds: Add a pre-configured config.h(.win32) template
This adds a pre-configured config.h template that can be used for Visual
Studio builds, where autotools is not normally available.  This has the
configs that are suitable for Visual Studio builds, as well as all the
features used for Windows builds enabled (HAVE_OT, HAVE_FALLBACK and
HAVE_UNISCRIBE).

Note that the optional features are not enabled here, they are enabled by
/D's (or -D's) in the NMake Makefiles as requested.
2016-02-03 18:14:30 +08:00