Building MiKTeX (Windows)
Introduction
This document describes the MiKTeX build process for Windows.
Requirements
C/C++ compiler
- Visual Studio 2015
Hint: install the community edition including C/C++ and MFC.
Build system
- CMake
The minimum required version is 3.7.0.
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
Qt5 (VS 2015)
Hint:CMAKE_PREFIX_PATH
must include the Qt directory.
For example:set CMAKE_PREFIX_PATH=C:\Qt\Qt5.8.0\5.8\msvc2015
See http://doc.qt.io/qt-5/cmake-manual.html, for more information.ICU for C (VS 2015)
Hint:CMAKE_PREFIX_PATH
must include the ICU directory.
For example:set CMAKE_PREFIX_PATH=C:\icu;%CMAKE_PREFIX_PATH%
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
.