]> git.lyx.org Git - lyx.git/blob - INSTALL.Win32
cmake: update readmes, we have now a top level cmake file
[lyx.git] / INSTALL.Win32
1 Compiling LyX 2.0 for Win32 and creating Windows installer
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         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.
21
22 2       Compile Qt
23
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.
30
31 3       Install Python
32
33         Install the latest Python 2.x version from
34         http://www.python.org/download/
35
36 4       Install CMake
37
38         Install the latest CMake from http://www.cmake.org
39
40 5       Configure
41
42         - Run the CMake GUI.
43          
44         - Set the source code path to C:\LyX\lyx-20
45           Set the build path to C:\LyX\lyx-20-build
46           Click Configure and set the generator to Visual Studio 10.
47
48         - Enable LYX_DEPENDENCIES_DOWNLOAD and click Configure.
49       Pre-compiled dependencies will automatically be downloaded.
50         
51         - Set QT_QMAKE_EXECUTABLE to e.g.
52           C:\Qt\qt-everywhere-opensource-src-4.7.1\bin\qmake.exe
53           and Configure again.
54
55         - Enable the LYX_INSTALL option, set CMAKE_INSTALL_PREFIX to
56           C:\LyX\lyx-20-install and click Configure.
57
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.
62
63         - Click Generate.
64
65 6       Compile
66
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
70         C:\LyX\lyx-20-install
71
72 7   Copy dependencies
73
74     Copy
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
81
82         And copy from the Qt bin directory
83         (e.g. C:\Qt\qt-everywhere-opensource-src-4.7.1\bin)
84         QtCore4.dll
85         QtGui4.dll
86         QtCore4d.dll (if compiling Debug version)
87         QtGui4d.dll (if compiling Debug version)
88         to C:\LyX\lyx-20-install\bin
89
90 8   Define path prefix
91
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
94         and Ghostscript:
95
96         \path_prefix "$LyXDir\bin;$LyXDir\python;$LyXDir\imagemagick;$LyXDir\ghostscript"
97
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.
100
101 9       Start LyX
102
103         C:\LyX\lyx-20-install\bin\lyx.exe
104
105
106 Creating the Installer
107 ======================
108
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".