1 Compiling LyX 2.0 for Win32 and creating Windows installer
2 ==========================================================
4 It's recommended to compile LyX using Microsoft Visual C++ 2010 and CMake.
5 Pre-compiled packages with dependencies are provided for this environment.
8 Compiling with Microsoft Visual C++
9 ===================================
11 These instructions assume the LyX source code is in C:\LyX\lyx-20
12 You can also use another directory if you prefer.
16 If you don't have Visual C++ 2010 installed, get the free Express edition from
17 http://www.microsoft.com/express/Downloads/
19 (All dependencies are linked against the MSVC 2010 runtime and won't work in
20 combination with MSVC 2008. You'll get crashes and other unexpected issues.)
24 Download the latest Qt for Open Source C++ development on Windows (VS2010)
25 from http://qt.nokia.com/downloads/windows-cpp-vs2010.
29 Install the latest Python 2.x version (not Python 3.x !) from
30 http://www.python.org/download/
34 Install the latest CMakescript from
35 http://sourceforge.net/projects/cmakescript/files/latest/download
39 Open the script file build.bat that you find in your LyX folder
40 C:\LyX\lyx-20\development\cmake
41 with a text editor. Now:
43 - Change there "D:\Qt\bin" to the path where you installed Qt
45 - Set the GNUWIN32_DIR to "C:\LyX\lyx-20\msvc2010-deps"
46 (or wherever you have copied the LyX dependencies)
47 - Set the LYX_SOURCE to "C:\LyX\lyx-20"
48 (or wherever you have copied the LyX source files)
49 - Set the LYX_BUILD to "C:\LyX\lyx-20-build"
50 (or wherever you want to store the compilation result)
52 (- If you don't want to use the fast compilation mode for debug builds,
53 remove the statement "-GNinja".)
57 - Open a MSVC Command prompt via Windows' start menu and switch
59 C:\LyX\lyx-20\development\cmake
60 - To build LyX with debugging information for development, execute
61 the build script with the command
63 - To build LyX for a release, execute
64 the script with the command
70 - C:\LyX\lyx-20\msvc2010-deps\deps20\bin
71 - C:\LyX\lyx-20\msvc2010-deps\deps20\imagemagick
72 - C:\LyX\lyx-20\msvc2010-deps\deps20\python
73 - C:\LyX\lyx-20\msvc2010-deps\deps20\ghostscript
74 - C:\LyX\lyx-20\msvc2010-deps\deps20\Resources
75 to C:\LyX\lyx-20-build\LYX_INSTALLED\bin (install build)
76 or to C:\LyX\lyx-20-build\bin\Debug (debug build)
78 And copy from the Qt bin directory
82 QtCore4d.dll (if compiling Debug version)
83 QtGui4d.dll (if compiling Debug version)
84 to C:\LyX\lyx-20-build\LYX_INSTALLED\bin (install build)
85 or to C:\LyX\lyx-20-build\bin\Debug (debug build)
89 Add the following line to C:\LyX\lyx-20-install\Resources\lyxrc.dist,
90 so LyX will find the bundled tools such as Python, ImageMagick
93 \path_prefix "$LyXDir\bin;$LyXDir\python;$LyXDir\imagemagick;$LyXDir\ghostscript"
95 You may also add the location of your LaTeX installation if it's not on the
96 system PATH, and the location of JabRef.
100 C:\LyX\lyx-20-install\bin\lyx.exe
103 Creating the Installer
104 ======================
106 - Get NSIS from http://nsis.sourceforge.net
107 - In the LyX source directory, go to development\Win32\packaging\installer
108 - Check whether the file locations in settings.nsh match your setup.
109 - Right-click on lyx.nsi and click "Compile NSIS Script".