]> git.lyx.org Git - lyx.git/blob - INSTALL.Win32
add info about installer compilation
[lyx.git] / INSTALL.Win32
1 Compiling LyX 2.0 for Win32
2 ===========================
3
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.
6
7
8 Compiling with Microsoft Visual C++
9 ===================================
10
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.
13
14 1       Install MSVC 2010
15
16         If you don't have Visual C++ 2010 installed, get the free Express edition from
17         http://www.microsoft.com/express/Downloads/
18
19 2       Compile Qt
20
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.
27
28 3       Install Python
29
30         Install the latest Python 2.x version from
31         http://www.python.org/download/
32
33 4       Install CMake
34
35         Install the latest CMake from http://www.cmake.org
36
37 5       Configure
38
39         - Run the CMake GUI.
40          
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.
44
45         - Enable LYX_DEPENDENCIES_DOWNLOAD and click Configure.
46       Pre-compiled dependencies will automatically be downloaded.
47         
48         - Set QT_QMAKE_EXECUTABLE to e.g.
49           C:\Qt\qt-everywhere-opensource-src-4.7.1\bin\qmake.exe
50           and Configure again.
51
52         - Enable the LYX_INSTALL option, set CMAKE_INSTALL_PREFIX to
53           C:\LyX\lyx-20-install and click Configure.
54
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.
59
60         - Click Generate.
61
62 6       Compile
63
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
67         C:\LyX\lyx-20-install
68
69 7   Copy dependencies
70
71     Copy
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
78
79         And copy from the Qt bin directory
80         (e.g. C:\Qt\qt-everywhere-opensource-src-4.7.1\bin)
81         QtCore4.dll
82         QtGui4.dll
83         QtCore4d.dll (if compiling Debug version)
84         QtGui4d.dll (if compiling Debug version)
85         to C:\LyX\lyx-20-install\bin
86
87 8   Define path prefix
88
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
91         and Ghostscript:
92
93         \path_prefix "$LyXDir\bin;$LyXDir\python;$LyXDir\imagemagick;$LyXDir\ghostscript"
94
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.
97
98 9       Start LyX
99
100         C:\LyX\lyx-20-install\bin\lyx.exe
101
102
103 Creating the Installer
104 ======================
105
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".