Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Windows support and add Visual Studio NMake Makefiles #12

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

fanc999
Copy link

@fanc999 fanc999 commented Feb 14, 2020

Hi,

This attempts to improve Windows support for libthai in the following ways:

  • Make the code buildable on Visual Studio. Notably make use of DllMain() using DLL_PROCESS_DETACH to make up for the GCC/CLang-only __attribute((destructor)).

  • Do not hardcode the location of thbrk.tri on native Windows (non-Cygwin) builds. This at least partially fixes issue Crashing on Windows #7.

  • Add a set of NMake Makefiles that can be used on Visual Studio 2008 and later to build libthai as a DLL with its pkg-config file, with support to build thbrk.tri and to build and run the test programs.

With blessings, thank you!

fanc999-1 and others added 4 commits December 13, 2021 15:32
* src/libthai.c:
* src/thbrk/brk-common.c:
  - Instead define a DLLMain that does the same thing when libthai
    is built as a DLL, on DLL_PROCESS_DETACH.  Ensure that tests
    builds as well since src/thbrk/brk-common.c is also used.
* src/thbrk/brk-common.c:
  - Deduce location of DLL or statically-linked EXE and construct
    path dynamically where thbrk.tri can be loaded.
* configure.ac:
* Makefile.am:
* win32/*:
  - Add a set of NMake Makefiles for Visual Studio 2008 and later,
    for building libthai as a DLL as well as the pkg-config file.
    Buliding the dictionary file and tests are also supported.
Add detection logic for ARM64 builds, since we can support Windows 10+ on ARM64
with the appropriate Compiler/Linker flags.
Make sure that things are set apart from the 2019 builds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants