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

Simplify Windows build #48

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open

Conversation

jasedit
Copy link

@jasedit jasedit commented Oct 29, 2016

This PR includes several steps to simplify the build of MultiMarkdown under windows, largely by removing dependencies that are not necessary for building. Specifically, this:

  1. Uses greg's CMake build system, removing Make as a required part of the build (before this, one step of the generated Visual Studio files would attempt to invoke greg's Makefile, which would run into issues if Make is not installed.)
  2. Use wingetopt which is included as part of the greg build, as opposed to relying on the MINGW implementation.
  3. Removes references to libgen.h, which are present in MINGW and POSIX, but not Windows. Instead, the Windows equivalent functions and definitions are used.
  4. Using Window's strtok_s instead of strtok_r, which fixes a potential buffer overflow bug in Windows.

Using these changes, I'm able to build MultiMarkdown using the Visual Studio build system, without MINGW and Cygwin installed.

@fletcher
Copy link
Owner

I'm going to have to think about this one. I worry that it might cause too much divergence between Windows and non-Windows code.

@jasedit
Copy link
Author

jasedit commented Oct 29, 2016

I understand the need to consider for a bit - this took a fair bit of time for me to wrap my head around, and I'm certainly open to feedback if there are ways to make the contributions more streamlined.

At least three of the commits cause no divergence between the two platforms, and using greg's cmake build particularly simplifies the build system independent of making the build simpler under Windows. The rest came from attempting to build MMD for inclusion in a python module, where the build can be fully automated in a python command (see here).

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.

2 participants