X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=INSTALL.Win32;h=19214b7a5e17f133b60ba92f478f4e3c082a29cb;hb=12ba6a19d03d994d4d3b25644b5c9e4416fd7e5b;hp=ed6a2c75d654c8255a098274e8d5041ef0d1ad2b;hpb=0aab8ead34b4128c27e5452294fc08810d658364;p=lyx.git diff --git a/INSTALL.Win32 b/INSTALL.Win32 index ed6a2c75d6..19214b7a5e 100644 --- a/INSTALL.Win32 +++ b/INSTALL.Win32 @@ -1,141 +1,109 @@ -================= -INSTALL for Win32 -================= +Compiling LyX 2.0 for Win32 and creating Windows installer +========================================================== -Building LyX the first time can appear to be a daunting task, but much of -that is knowing which packages to download in the first place. +It's recommended to compile LyX using Microsoft Visual C++ 2010 and CMake. +Pre-compiled packages with dependencies are provided for this environment. -The instructions below should guide you through the installation of -the MinGW/MinSYS build environment, together with details on how to -grab and build the Qt toolkit and how to grab Aspell and LyX. -Once you've done all that, you should go read the README in -development/Win32/packaging/ The two scripts in the same directory, -build_lyxwin.sh and package_lyxwin.sh should automate the entire -build process. If not and you really can't figure out what to do next, -then please, please drop a mail to lyx-devel@lists.lyx.org. +Compiling with Microsoft Visual C++ +=================================== -Enjoy! -The LyX Team + These instructions assume the LyX source code is in C:\LyX\lyx-20 + You can also use another directory if you prefer. -============================================================================= -1 MinGW & MSYS +1 Install MSVC 2010 -1.1 Download the following packages from http://www.mingw.org/download.shtml: + If you don't have Visual C++ 2010 installed, get the free Express edition from + http://www.microsoft.com/express/Downloads/ - MinGW-3.2.0-rc-3.exe - binutils-2.15.94-20050118-1.tar.gz - MSYS-1.0.11-2004.04.30-1.exe - msysDTK-1.0.1.exe + (All dependencies are linked against the MSVC 2010 runtime and won't work in + combination with MSVC 2008. You'll get crashes and other unexpected issues.) -1.2 Install MinGW-3.2.0-rc-3.exe in C:\MinGW +2 Install Qt -1.3 Install MSYS-1.0.11-2004.04.30-1.exe in C:\msys + Download the latest Qt for Open Source C++ development on Windows (VS2010) + from http://qt.nokia.com/downloads/windows-cpp-vs2010. -1.4 Install msysDTK-1.0.1 in C:\msys +3 Install Python -1.5 Extract binutils-2.15.94-20050118-1.tar.gz in C:\MinGW - (i.e., overwrite the existing binutils) + Install the latest Python 2.x version (not Python 3.x !) from + http://www.python.org/download/ +4 Install CMake -2. Gettext & Libiconv + Install the latest CMakescript from + http://sourceforge.net/projects/cmakescript/files/latest/download -2.1 Download the following packages from - http://www.gnu.org/software/gettext/gettext.html: +5 Configure - gettext-tools-0.13.1.bin.woe32.zip - gettext-runtime-0.13.1.bin.woe32.zip - libiconv-1.9.1.bin.woe32.zip + Open the script file build.bat that you find in your LyX folder + C:\LyX\lyx-20\development\cmake + with a text editor. Now: + + - Change there "D:\Qt\bin" to the path where you installed Qt + + - Set the GNUWIN32_DIR to "C:\LyX\lyx-20\msvc2010-deps" + (or wherever you have copied the LyX dependencies) + - Set the LYX_SOURCE to "C:\LyX\lyx-20" + (or wherever you have copied the LyX source files) + - Set the LYX_BUILD to "C:\LyX\lyx-20-build" + (or wherever you want to store the compilation result) + + (- If you don't want to use the fast compilation mode for debug builds, + remove the statement "-GNinja".) -2.2 Extract the three packages in C:\MinGW +6 Compile + - Open a MSVC Command prompt via Windows' start menu and switch + to the folder + C:\LyX\lyx-20\development\cmake + - To build LyX with debugging information for development, execute + the build script with the command + build devel + - To build LyX for a release, execute + the script with the command + build install +7 Copy dependencies -3 QT/Win Free Edition - http://qtwin.sourceforge.net/index.php/QT/Free_from_CVS_with_Mingw + Copy + - C:\LyX\lyx-20\msvc2010-deps\deps20\bin + - C:\LyX\lyx-20\msvc2010-deps\deps20\imagemagick + - C:\LyX\lyx-20\msvc2010-deps\deps20\python + - C:\LyX\lyx-20\msvc2010-deps\deps20\ghostscript + - C:\LyX\lyx-20\msvc2010-deps\deps20\Resources + to C:\LyX\lyx-20-build\LYX_INSTALLED\bin (install build) + or to C:\LyX\lyx-20-build\bin\Debug (debug build) -3.1 Get the latest CVS version + And copy from the Qt bin directory + (e.g. C:\Qt\bin) + QtCore4.dll + QtGui4.dll + QtCore4d.dll (if compiling Debug version) + QtGui4d.dll (if compiling Debug version) + to C:\LyX\lyx-20-build\LYX_INSTALLED\bin (install build) + or to C:\LyX\lyx-20-build\bin\Debug (debug build) - Using the cvs executable that is packaged with MinSYS, - from the MinSYS command prompt: +8 Define path prefix - $ cd ~ - $ cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/kde-cygwin login - (no password) - $ cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/kde-cygwin co \ - -r QT_WIN32_3_3_BRANCH -d qt3 qt-3 + Add the following line to C:\LyX\lyx-20-install\Resources\lyxrc.dist, + so LyX will find the bundled tools such as Python, ImageMagick + and Ghostscript: - Alternatively, use the TortoiseCVS graphical interface. + \path_prefix "$LyXDir\bin;$LyXDir\python;$LyXDir\imagemagick;$LyXDir\ghostscript" -3.2 Compile the QT library + You may also add the location of your LaTeX installation if it's not on the + system PATH, and the location of JabRef. - Create two .bat files, in the top-level directory of the Qt tree, - my_configure.bat and my_make.bat. Mine are shown below. Obviously, - you'll have to tweak them ;-) +9 Start LyX - $ cat my_configure.bat - set QTDIR=J:\MinSys\home\Angus\qt3 - set MINGW=J:\MinGW - set PATH=J:\MinSys\home\Angus\qt3\bin;J:\MinGW\bin;C:\WINDOWS\system32;C:\WINDOWS - set QMAKESPEC=win32-g++ - configure.bat -verbose + C:\LyX\lyx-20-install\bin\lyx.exe - $ cat my_make.bat - set QTDIR=J:\MinSys\home\Angus\qt3 - set MINGW=J:\MinGW - set PATH=J:\MinSys\home\Angus\qt3\bin;J:\MinGW\bin;C:\WINDOWS\system32;C:\WINDOWS - set QMAKESPEC=win32-g++ - mingw32-make symlinks - mingw32-make src-moc - mingw32-make sub-src - The first time that you build the Qt sources, run my_configure.bat. - Thereafter, you should be able to get away with my_make.bat. If it fails, - you should try my_configure.bat again, but this will overwrite all the - Qt header files, so you'll end up rebuilding large chunks of LyX as well. +Creating the Installer +====================== - $ cmd.exe - PROMPT> my_configure.bat - -4. Aspell - -4.1 Download aspell-0.50.5.tar.gz from ftp://ftp.gnu.org/gnu/aspell/ - (note: version 0.60.2 does not compile) - Download dictionaries from ftp://ftp.gnu.org/gnu/aspell/dict/ - Eg: en/aspell-en-0.50-2.tar.bz2 - de/aspell-de-0.50-2.tar.bz2 - -4.2 Extract all files in your MSYS home directory. From the - MinSYS command prompt: - - $ gunzip aspell-0.50.5.tar.gz - $ bunzip2 aspell-en-0.50-2.tar.bz2 - $ tar xvf aspell-0.50.5.tar - $ tar xvf aspell-en-0.50-2.tar - $ rm -f aspell-0.50.5.tar - $ rm -f aspell-en-0.50-2.tar - - There's no need to build Aspell now. The script in - development/Win32/packaging should do it for you. - -5. LyX - -5.1 Get the latest CVS version - - Using the cvs executable that is packaged with MinSYS, - from the MinSYS command prompt: - - $ cd ~ - $ mkdir lyx && cd lyx - $ cvs -d:pserver:anoncvs@anoncvs.us.lyx.org:/cvs/lyx login - (The password is "lyx" (no inverted commas)) - $ cvs -d:pserver:anoncvs@anoncvs.us.lyx.org:/cvs/lyx \ - checkout -r BRANCH_1_3_X -d 13x lyx-devel - - Alternatively, use the TortoiseCVS graphical interface. - - There's no need to build LyX now. The script in - development/Win32/packaging should do it for you. - -Now go read the README in development/Win32/packaging. -============================================================================= + - Get NSIS from http://nsis.sourceforge.net + - In the LyX source directory, go to development\Win32\packaging\installer + - Check whether the file locations in settings.nsh match your setup. + - Right-click on lyx.nsi and click "Compile NSIS Script".