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/
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 everywhere open source version from
25 http://get.qt.nokia.com/qt/source/ (e.g. qt-everywhere-opensource-src-4.7.1.zip).
26 Follow the instructions on http://doc.qt.nokia.com/4.7/install-win.html to
27 compile using MSVC 2010.
28 The pre-compiled version of Qt cannot be used. It uses the 2008 version of the
29 MSVC runtime which will result in crashes.
33 Install the latest Python 2.x version from
34 http://www.python.org/download/
38 Install the latest CMake from http://www.cmake.org
44 - Set the source code path to C:\LyX\lyx-20\development\cmake
45 Set the build path to C:\LyX\lyx-20-build
46 Click Configure and set the generator to Visual Studio 10.
48 - Enable LYX_DEPENDENCIES_DOWNLOAD and click Configure.
49 Pre-compiled dependencies will automatically be downloaded.
51 - Set QT_QMAKE_EXECUTABLE to e.g.
52 C:\Qt\qt-everywhere-opensource-src-4.7.1\bin\qmake.exe
55 - Enable the LYX_INSTALL option, set CMAKE_INSTALL_PREFIX to
56 C:\LyX\lyx-20-install and click Configure.
58 - Check the Advanced checkbox.
59 Set GETTEXT_MSGFMT_EXECUTABLE to
60 C:\LyX\lyx-20-build\msvc2010-deps\deps20\gettext-tools\msgfmt.exe,
61 and do the same for the other gettext tools.
67 A Microsoft Visual C++ solution should have been generated at
68 C:\LyX\lyx-20-build\lyx.sln
69 Compile the INSTALL project to get a LyX installation in
75 - C:\LyX\lyx-20-build\msvc2010-deps\deps20\bin
76 - C:\LyX\lyx-20-build\msvc2010-deps\deps20\imagemagick
77 - C:\LyX\lyx-20-build\msvc2010-deps\deps20\python
78 - C:\LyX\lyx-20-build\msvc2010-deps\deps20\ghostscript
79 - C:\LyX\lyx-20-build\msvc2010-deps\deps20\Resources
80 to C:\LyX\lyx-20-install
82 And copy from the Qt bin directory
83 (e.g. C:\Qt\qt-everywhere-opensource-src-4.7.1\bin)
86 QtCore4d.dll (if compiling Debug version)
87 QtGui4d.dll (if compiling Debug version)
88 to C:\LyX\lyx-20-install\bin
92 Add the following line to C:\LyX\lyx-20-install\Resources\lyxrc.dist,
93 so LyX will find the bundled tools such as Python, ImageMagick
96 \path_prefix "$LyXDir\bin;$LyXDir\python;$LyXDir\imagemagick;$LyXDir\ghostscript"
98 You may also add the location of your LaTeX installation if it's not on the
99 system PATH, and the location of JabRef.
103 C:\LyX\lyx-20-install\bin\lyx.exe
106 Creating the Installer
107 ======================
109 - Get NSIS from http://nsis.sourceforge.net
110 - In the LyX source directory, go to development\Win32\packaging\installer
111 - Check whether the file locations in settings.nsh match your setup.
112 - Right-click on lyx.nsi and click "Compile NSIS Script".