| 1 |
Compiling LyX 1.6 for Win32 |
|---|
| 2 |
=========================== |
|---|
| 3 |
|
|---|
| 4 |
LyX 1.6 can be compiled with Microsoft Visual C++ 2008 (recommended) or MinGW. |
|---|
| 5 |
|
|---|
| 6 |
Compiling with MSVC 2008 |
|---|
| 7 |
======================== |
|---|
| 8 |
|
|---|
| 9 |
1 Install MSVC 2008 |
|---|
| 10 |
|
|---|
| 11 |
If you don't have MSVC 2008 installed, download and install the free |
|---|
| 12 |
Express edition from http://www.microsoft.com/express/vc/ |
|---|
| 13 |
|
|---|
| 14 |
2 Install Python |
|---|
| 15 |
|
|---|
| 16 |
Get the latest Python 2.5 version at |
|---|
| 17 |
http://www.python.org/download/ |
|---|
| 18 |
|
|---|
| 19 |
Install in C:\Python25 and add this directory to the PATH environment |
|---|
| 20 |
variable (Start > Settings > Control Panel > System > Advanced > |
|---|
| 21 |
Environment Variables). |
|---|
| 22 |
|
|---|
| 23 |
3 Install SCons |
|---|
| 24 |
|
|---|
| 25 |
Download the latest SCons version from http://www.scons.org/download.php |
|---|
| 26 |
|
|---|
| 27 |
4 Install the dependencies |
|---|
| 28 |
|
|---|
| 29 |
Download ftp://ftp.lyx.org/pub/lyx/contrib/lyx-windows-deps-msvc2008.zip |
|---|
| 30 |
and extract in the root directory of your LyX files (so you will get |
|---|
| 31 |
a directory called lyx-windows-deps-msvc2008 next to the other directories |
|---|
| 32 |
like src, development etc.). |
|---|
| 33 |
|
|---|
| 34 |
5 Compile |
|---|
| 35 |
|
|---|
| 36 |
Start a Visual Studio command prompt (Start > Programs > |
|---|
| 37 |
Microsoft Visual C++ 9.0 Express Edition > Visual Studio Tools > |
|---|
| 38 |
Visual Studio 2008 Command Prompt) and run: |
|---|
| 39 |
|
|---|
| 40 |
cd <lyx root directory>\development\Win32\packaging |
|---|
| 41 |
build_msvc.bat |
|---|
| 42 |
|
|---|
| 43 |
6 First start of LyX |
|---|
| 44 |
|
|---|
| 45 |
To start the just compiled lyx.exe, it is necessary to copy the following |
|---|
| 46 |
files to the folder where the just compiled "lyx.exe" is: |
|---|
| 47 |
|
|---|
| 48 |
Aiksaurus.dll |
|---|
| 49 |
aspell.dll |
|---|
| 50 |
iconv.dll |
|---|
| 51 |
intl.dll |
|---|
| 52 |
Microsoft.VC90.CRT.manifest |
|---|
| 53 |
msvcp90.dll |
|---|
| 54 |
msvcr90.dll |
|---|
| 55 |
QtCore4.dll |
|---|
| 56 |
QtGui4.dll |
|---|
| 57 |
|
|---|
| 58 |
msvcp90.dll and msvcr90.dll are the C Runtime and C++ libraries |
|---|
| 59 |
supplied with MSVC 2008. They are freely redistributable. |
|---|
| 60 |
See http://msdn2.microsoft.com/en-us/library/8kche8ah.aspx |
|---|
| 61 |
for details. |
|---|
| 62 |
|
|---|
| 63 |
All of the other .dlls above and the lyx executable are compiled |
|---|
| 64 |
from code released under the GPL which states (section 3) that |
|---|
| 65 |
GPL software may be linked against system files such as msvcp90.dll |
|---|
| 66 |
and msvcr90.dll. |
|---|
| 67 |
|
|---|
| 68 |
Compiling with MinGW |
|---|
| 69 |
==================== |
|---|
| 70 |
|
|---|
| 71 |
These instructions allow you to create a basic LyX build with MinGW. |
|---|
| 72 |
To be able to use all LyX features, compiling with MSVC 2008 is recommended. |
|---|
| 73 |
Creating an installer for MinGW builds is no longer supported. |
|---|
| 74 |
|
|---|
| 75 |
1 Install MinGW, and all the gcc-related stuff, and win32api. |
|---|
| 76 |
|
|---|
| 77 |
2 download qt-win-opensource-4.x.x-mingw.exe and install to c:\qt. |
|---|
| 78 |
|
|---|
| 79 |
3 install python and scons as instructed above. Set $path for python |
|---|
| 80 |
to make your life a bit easier. |
|---|
| 81 |
|
|---|
| 82 |
4 Check out lyx svn to c:\lyx-devel\lyx-1.6.x |
|---|
| 83 |
|
|---|
| 84 |
5 Download zlib binaries and developer files (zlib-1.2.3-bin.zip and |
|---|
| 85 |
zlib-1.2.3-lib.zip) from http://gnuwin32.sourceforge.net/packages/zlib.htm |
|---|
| 86 |
libiconv from http://gnuwin32.sourceforge.net/packages/libiconv.htm |
|---|
| 87 |
gettext from http://gnuwin32.sourceforge.net/packages/gettext.htm |
|---|
| 88 |
unpack all of them to the same directory c:\lyx-devel\mingw_deps. |
|---|
| 89 |
|
|---|
| 90 |
6 start a command window, run commands: |
|---|
| 91 |
$ cd c:\lyx-devel\lyx-1.6.x |
|---|
| 92 |
$ scons -f development\scons\SConstruct \ |
|---|
| 93 |
extra_lib_path=..\mingw_deps\lib \ |
|---|
| 94 |
extra_inc_path=..\mingw_deps\include \ |
|---|
| 95 |
extra_bin_path=..\mingw_deps\bin \ |
|---|
| 96 |
qt_dir=c:\qt \ |
|---|
| 97 |
DESTDIR=..\lyx-1.6-install \ |
|---|
| 98 |
install |
|---|
| 99 |
|
|---|
| 100 |
|
|---|
| 101 |
Creating the Installer |
|---|
| 102 |
====================== |
|---|
| 103 |
|
|---|
| 104 |
To create an installer with LyX and all related components, download |
|---|
| 105 |
and install the latest NSIS from http://nsis.sourceforge.net |
|---|
| 106 |
|
|---|
| 107 |
Open development\Win32\packaging\installer\setttings.user.nsh and modify |
|---|
| 108 |
the settings depending on your build environment. |
|---|
| 109 |
|
|---|
| 110 |
Finally, go to development\Win32\packaging\installer |
|---|
| 111 |
(in a normal Windows Explorer), right-click on lyx.nsi and click |
|---|
| 112 |
"Compile NSIS Script". |
|---|
| 113 |
|
|---|
| 114 |
You can also use the installer target of scons. Namely, use a command like |
|---|
| 115 |
$ scons -f development\scons\SConscript installer |
|---|
| 116 |
This will create $BUILDDIR\lyx-version-timestamp-Installer.exe for a devel version, |
|---|
| 117 |
and $BUILDDIR\lyx-version-Install.exe for a released version of lyx. |
|---|
| 118 |
|
|---|
| 119 |
If you also want to generate bundled installer, download |
|---|
| 120 |
lyx-windows-bundle-deps.zip from http://www.lyx.org/~bpeng, unpack |
|---|
| 121 |
to lyx-windows-bundle-deps under the top source directory, and run |
|---|
| 122 |
$ scons -f development\scons\SConstruct installer bundle=1 |
|---|
| 123 |
If you prefer to use another directory, you can use option bundle_dir like |
|---|
| 124 |
$ scons -f development\scons\SConstruct installer bundle=1 bundle_dir=c:\bundle |
|---|