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 CMake from http://www.cmake.org
40 - Set the source code path to C:\LyX\lyx-20
41 Set the build path to C:\LyX\lyx-20-build
42 Click Configure and set the generator to Visual Studio 10.
44 - Enable LYX_DEPENDENCIES_DOWNLOAD and click Configure.
45 Pre-compiled dependencies will automatically be downloaded.
47 - Set QT_QMAKE_EXECUTABLE to e.g.
48 C:\Qt\qt-everywhere-opensource-src-4.7.1\bin\qmake.exe
51 - Enable the LYX_INSTALL option, set CMAKE_INSTALL_PREFIX to
52 C:\LyX\lyx-20-install and click Configure.
54 - Check the Advanced checkbox.
55 Set GETTEXT_MSGFMT_EXECUTABLE to
56 C:\LyX\lyx-20-build\msvc2010-deps\deps20\gettext-tools\msgfmt.exe,
57 and do the same for the other gettext tools.
63 A Microsoft Visual C++ solution should have been generated at
64 C:\LyX\lyx-20-build\lyx.sln
65 Compile the INSTALL project to get a LyX installation in
71 - C:\LyX\lyx-20-build\msvc2010-deps\deps20\bin
72 - C:\LyX\lyx-20-build\msvc2010-deps\deps20\imagemagick
73 - C:\LyX\lyx-20-build\msvc2010-deps\deps20\python
74 - C:\LyX\lyx-20-build\msvc2010-deps\deps20\ghostscript
75 - C:\LyX\lyx-20-build\msvc2010-deps\deps20\Resources
76 to C:\LyX\lyx-20-install
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-install\bin
88 Add the following line to C:\LyX\lyx-20-install\Resources\lyxrc.dist,
89 so LyX will find the bundled tools such as Python, ImageMagick
92 \path_prefix "$LyXDir\bin;$LyXDir\python;$LyXDir\imagemagick;$LyXDir\ghostscript"
94 You may also add the location of your LaTeX installation if it's not on the
95 system PATH, and the location of JabRef.
99 C:\LyX\lyx-20-install\bin\lyx.exe
102 Creating the Installer
103 ======================
105 - Get NSIS from http://nsis.sourceforge.net
106 - In the LyX source directory, go to development\Win32\packaging\installer
107 - Check whether the file locations in settings.nsh match your setup.
108 - Right-click on lyx.nsi and click "Compile NSIS Script".