Bo Peng wrote:
But not to INSTALL.Win32? We should try to keep that thing in sync.
Well, we (try to) do so. However, INSTALL.Win32 passes responsibility to
two build scripts for compiling the aspell and lyx sources.
Moreover, INSTALL.Win32 and Angus' scripts rely on a shared qtwin
library. My experience is that shared linking takes almost endlessly
(even on a modern machine). Moreover, compilation stops on my machine
with an internal compiler error (ICE). Therefore I use static linking
for my personal purposes.
Enclosed please find the latest version of my compile instructions. As
you can see, compilation mainly suffers from the limitations of
third-party products. I hope that Kevin Atkinson can provide us with an
Aspell version soon that is compatible with the latest gettext. (* wink *)
Michael
1 MinGW & MSYS
1.1 Download the following packages from http://www.mingw.org/download.shtml:
binutils-2.16.91-...tar.gz
gcc-core-3.4.5-...tar.gz
gcc-g++-3.4.5-...tar.gz
mingw32-make-3.80.0-3.tar.gz
mingw-runtime-3.9.tar.gz
mingw-utils-0.3.tar.gz
MSYS-1.0.11-...exe
msys-autoconf-2.59.tar.bz2
msys-automake-1.8.2.tar.bz2
msysDTK-1.0.1.exe
msys-libtool-1.5.tar.bz2
w32api-3.6.tar.gz
1.2 Install in C:\MinGW
binutils, gcc-core, gcc-g++, mingw32-make, mingw-runtime,
mingw-utils, w32api
1.3 Install in C:\msys
MSYS, msys-autoconf, msys-automake, msysDTK, msys-libtool
2 Gettext
2.1 Download the following package from http://www.gnu.org/software/gettext:
gettext-0.14.5.tar.gz
2.2 Extract the package in your home directory and run
./configure --disable-shared --prefix=/mingw
make
make install
3 Libiconv
3.1 Download the following package from http://www.gnu.org/software/libiconv:
libiconv-1.10.tar.gz
3.2 Extract the package in your home directory and run
./configure --prefix=/mingw
make
make install
4 QTWIN (see http://sourceforge.net/projects/qtwin)
4.1 Get the latest CVS version
Using the cvs executable that is packaged with MSYS,
from the MSYS command prompt:
cvs -d :pserver:[EMAIL PROTECTED]:/cvsroot/qtwin login
<return> (i.e., no password)
cvs -z3 -d :pserver:[EMAIL PROTECTED]:/cvsroot/qtwin co \
-r QT_WIN32_3_3_BRANCH qt-3
4.2 Compile a static (!) qtwin library (dynamic linking with MinGW causes
nightmares!)
Open a Windows command line (run cmd.exe) and enter
cd <path_to_your_qtwin_dir>
set QMAKESPEC=win32-g++
setenv.bat
configure.bat -release -static
5. Aspell
5.1 Download the following packages from http://aspell.net/
aspell-0.60.4.tar.gz
aspell6-en-6.0-0.tar.bz2 (English dictionary)
aspell6-de-20030222-1.tar.bz2 (German dictionary)
5.2 Extract all files in your MSYS home directory
5.3 Enter
cd aspell-0.60.4
5.4 Edit files
./common/file_util.cpp:
Add line before line 29: #include "asc_ctype.hpp"
./common/config.cpp:
Add line after line 41: #undef printf
Remove line 21
./modules/speller/language.cpp:
Add line after line 27: #undef printf
Remove line 24
./prog/aspell.cpp:
Add line after line 62: #undef printf
5.5 Enter
./configure --enable-static --disable-shared
--prefix=c:/Programme/Aspell-0.60.4
make
make install
5.6 Compile the German dictionary
cd ../aspell6-de-20030222-1
export PATH=/c/Programme/Aspell-0.60.4/bin:$PATH
./configure
make
make install
5.7 Repeat 5.6 for the English dictionary
6. LyX
6.1 Enter
export LDFLAGS="-L/home/user/qt-3/lib -lqtmain -lqt-mt -lopengl32 -lglu32
-lkernel32 -luser32 -lgdi32 -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32
-luuid -limm32 -lwinmm -lwsock32 -lwinspool"
6.2 Run ./autogen.sh from inside cygwin (Oh, I didn't tell you about cygwin?
Really? :-))
6.3 Edit file ./configure:
- Search for string "-DQT_DLL"; remove the complete line
- Search for string "-lqt-mt"; 6 lines above, move "conftest.$ac_ext" in
front of "$CXXFLAGS"
ac_link='$CXX -o conftest$ac_exeext conftest.$ac_ext $CXXFLAGS
$CPPFLAGS $LDFLAGS $LIBS >&5'
6.4 Configure LyX
export PATH=/c/Programme/Python23:$PATH (you need Python!)
./configure --without-x --with-aspell
--with-extra-prefix=/c/Programme/Aspell-0.60.4 \
--with-frontend=qt --enable-optimization --disable-stdlib-debug \
--with-qt-dir=/home/user/qt-3 --prefix=/c/Programme/LyX-1.4 --disable-pch
6.5 Build LyX
make
make install
6.6 Create DTL tools
cd ./development/Win32/packaging/dtl
make
6.7 Package LyX for the Windows platform
- Modify ./development/Win32/packaging/package_lyxwin.sh:
- Adjust LYX_INSTALL_DIR to ="/c/Programme/LyX-1.4"
- Remove "${QT_DLL}" "${LIBICONV_DLL}" "${MINGW_DLL}" in line 45
- Run the packaging script (in the directory in which it is located!)
6.8 If you like to, add icons to lyx.exe using the ResourceHacker (open source
software)
- Start ResourceHacker.exe
- Load /c/Programme/LyX-1.4/bin/lyx.exe
- Action>Add a new Resource...
- Open file with new resource... lyx_32x32.ico
- set Resource Name to 1
- Add Resource
- Repeat for lyx_doc_32x32.ico, setting the Resource Name to 2
- Save the modified lyx.exe
- Remove /c/Programme/LyX-1.4/bin/lyx_original.exe