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 installed 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/
21 Download the latest Qt everywhere open source version from
22 http://get.qt.nokia.com/qt/source/ (e.g. qt-everywhere-opensource-src-4.7.1.zip).
23 Follow the instructions on http://doc.qt.nokia.com/4.7/install-win.html to
24 compile using MSVC 2010.
25 The pre-compiled version of Qt cannot be used. It uses the 2008 version of the
26 MSVC runtime which will result in crashes.
30 Install the latest Python 2.x version from
31 http://www.python.org/download/
35 Install the latest CMake from http://www.cmake.org
41 - Set the source code path to C:\LyX\lyx-20\development\cmake
42 Set the build path to C:\LyX\lyx-20-build
43 Click Configure and set the generator to Visual Studio 10.
45 - Enable LYX_DEPENDENCIES_DOWNLOAD and click Configure.
46 Pre-compiled dependencies will automatically be downloaded.
48 - Set QT_QMAKE_EXECUTABLE to e.g.
49 C:\Qt\qt-everywhere-opensource-src-4.7.1\bin\qmake.exe
52 - Enable the LYX_INSTALL option, set CMAKE_INSTALL_PREFIX to
53 C:\LyX\lyx-20-install and click Configure.
55 - Check the Advanced checkbox.
56 Set GETTEXT_MSGFMT_EXECUTABLE to
57 C:\LyX\lyx-20-build\msvc2010-deps\deps20\gettext-tools\msgfmt.exe,
58 and do the same for the other gettext tools.
64 A Microsoft Visual C++ solution should have been generated at
65 C:\LyX\lyx-20-build\lyx.sln
66 Compile the INSTALL project to get a LyX installation in
72 - C:\LyX\lyx-20-build\msvc2010-deps\deps20\bin
73 - C:\LyX\lyx-20-build\msvc2010-deps\deps20\imagemagick
74 - C:\LyX\lyx-20-build\msvc2010-deps\deps20\python
75 - C:\LyX\lyx-20-build\msvc2010-deps\deps20\ghostscript
76 - C:\LyX\lyx-20-build\msvc2010-deps\deps20\Resources
77 to C:\LyX\lyx-20-install
79 And copy from the Qt bin directory
80 (e.g. C:\Qt\qt-everywhere-opensource-src-4.7.1\bin)
83 QtCore4d.dll (if compiling Debug version)
84 QtGui4d.dll (if compiling Debug version)
85 to C:\LyX\lyx-20-install\bin
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".