Introduction

This document describes the MiKTeX build process for Windows.

Requirements

C/C++

Build system

  • CMake
    The minimum required version is 3.2.1.

Build utilities

  • Microsoft HTML Help Workshop
    This is a part of the Visual Studio 2015 installation.

  • Java SE Runtime
    This is a prerequisite for FOP.

  • FOP
    This is needed to build the documentation.

  • libxslt
    xsltproc (part of libxslt) is needed to build the documentation.
    Hint: You must install a native Win32 version. The Cygwin port will not work.

  • Pandoc
    This is needed to build the documentation.

  • Cygwin
    Hint: install all packages, or be prepared to install missing packages later, when CMake fails to find them.

3rd party libs

Building MiKTeX

Create a build directory (say C:\MIKTEX\BUILD) and open a command window here.

Set the Visual C/C++ environment variables (e.g., run vcvars32.bat).

The environment variable CMAKE_PREFIX_PATH must include required (see above) directories.

Run CMake to produce the NMake makefiles customized for your system:

cmake -G "NMake Makefiles" C:\MIKTEX\SOURCE

Replace C:\MIKTEX\SOURCE with the actual path to the MiKTeX source directory.

You should make sure that you have not installed MiKTeX which could interfere with the build process.

Run the nmake utility to build MiKTeX:

nmake

If you want to build a single component, you can do it by running nmake in the component's directory. Say you want to build XeTeX:

cd Programs\TeXAndFriends\xetex
nmake

Specify the install target, if you want to install the binaries:

nmake install

This will install the targets in C:\MIKTEX\BUILD-install (where C:\MIKTEX\BUILD is your build directory). The path can be overriden by setting the CMake variable CMAKE_INSTALL_PREFIX.