Michael Gerz a écrit :
Abdel wrote:
With the shared version all demos and examples compile and execute OK.
Ouf... But the linkage only took an hour and sometimes more than 400
Megs! I understand why Michael insist on compiling static Qt.
Well, I told you! (What is the shared version good for, as long as LyX
is the only app using qtwin? (Why do people make their lives more
difficult than necessary? (You are wasting your time)))
I completely agree and I first try the static version but all the demo
and examples crashed, including the Qtdesigner. I'll try to find
sometime to compile in debug mode and see what's happening.
I had lots of trouble trying to compile aspell so I gave up.
Why? It should be pretty simple. Did you follow my recipe? Did you
download the right version (0.60.4)?
Yes. I modified './common/file_util.cpp' as you recommended. Plus I had
to put '#undef printf' at the end of './common/gettext.h'. Then the
compilation stopped with the following:
Making all in .
D:\mingw\bin\make.exe[1]: Entering directory
`D:/msys/home/yns/src/aspell-0.60.4'
/bin/perl gen/mk-static-filter.pl modules/filter/url-filter.info
modules/filter/email-filter.info modules/filter/tex-filter.info
modules/filter/sgml-filter.info modules/filter/html-filter.info
modules/filter/context-filter.info modules/filter/nroff-filter.info
modules/filter/texinfo-filter.info
process_begin: CreateProcess((null), /bin/perl gen/mk-static-filter.pl
modules/filter/url-filter.info modules/filter/email-filter.info
modules/filter/tex-filter.info modules/filter/sgml-filter.info
modules/filter/html-filter.info modules/filter/context-filter.info
modules/filter/nroff-filter.info modules/filter/texinfo-filter.info,
...) failed.
make (e=3): The system cannot find the path specified.
D:\mingw\bin\make.exe[1]: *** [gen/static_filters.src.cpp] Error 3
D:\mingw\bin\make.exe[1]: Leaving directory
`D:/msys/home/yns/src/aspell-0.60.4'
D:\mingw\bin\make.exe: *** [all-recursive] Error 1
So I gave up.
Have you installed all the latest
MinGW packages?
I had many problems in the past with the MSYS DTK (1.0.11) so I had
installed the latest mingw package manually in the mingw directory
(including perl, automake and autoconf). I guess this is source of all
my problems. I will try a parallel install of MSYS+MINGW and see what
happens.
Abdel.
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.4-...tar.gz
gcc-g++-3.4.4-...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.5.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 & Libiconv
2.1 Download the following packages from
http://www.gnu.org/software/gettext/gettext.html
gettext-tools-0.13.1.bin.woe32.zip
gettext-runtime-0.13.1.bin.woe32.zip
libiconv-1.9.1.bin.woe32.zip
2.2 Extract the three packages in C:\MinGW
----------------------------------------------------------------------
3 qtwin
3.1 Get the latest CVS version
Open the MSYS window/bash. In your home directory, enter
cvs -d :pserver:[EMAIL PROTECTED]:/cvsroot/qtwin login
<return> (no password)
cvs -z3 -d :pserver:[EMAIL PROTECTED]:/cvsroot/qtwin co \
-r QT_WIN32_3_3_BRANCH qt-3
3.2 Compile a static (!) QT library (dynamic linking with MinGW causes
nightmares!)
Open Window command line (run cmd.exe) and enter
cd <path_to_your_qtwin_dir>
set QMAKESPEC=win32-g++
setenv.bat
configure.bat -release -static
----------------------------------------------------------------------
4. Aspell
4.1 Download the following packages from http://aspell.net/
aspell-0.60.4.tar.gz
aspell6-en-6.0-0.tar.bz2
aspell6-de-20030222-1.tar.bz2
4.2 Extract all files in your MSYS home directory
4.3 Enter
cd aspell-0.60.4
./configure --enable-static --disable-shared
--prefix=c:/Programme/Aspell-0.60.4
4.4 Edit file ./common/file_util.cpp: Add before line 29
#include "asc_ctype.hpp"
4.5 Enter
make
make install
4.6 Compile the German dictionary
cd ../aspell6-de-20030222-1
export PATH=/c/Programme/Aspell-0.60.4/bin:$PATH
./configure
make
make install
4.7 Repeat 4.6 for the English dictionary
----------------------------------------------------------------------
5. LyX
5.1 Get the latest CVS version
Open the MSYS window/bash. In your home directory, enter
export CVSROOT=:pserver:[EMAIL PROTECTED]:/cvs/lyx
cvs login
lyx
cvs checkout -r BRANCH_1_3_X -d lyx-devel-1.3.X lyx-devel
5.2 Get the latest CVS docs (for LyX 1.3.X only)
cd lyx-devel-1.3.X/lib
cvs checkout -r BRANCH_1_3_X lyxdoc
mv doc/*.in lyxdoc
rm -f -r doc
mv lyxdoc doc
5.3 Enter directory "lyx-devel-1.3.X"
5.4 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"
5.5 Edit file ./config/qt.m4: Remove line 239 (i.e., remove MinGW support -
don't laugh)
5.6 Enter
./autogen.sh
5.7 Edit file ./configure: Change line 12520 (move conftest.$ac_ext in front of
FLAGS)
ac_link='$CXX -o conftest$ac_exeext conftest.$ac_ext $CXXFLAGS $CPPFLAGS
$LDFLAGS $LIBS >&5'
5.8 Configure LyX
./configure --without-x --with-pspell
--with-extra-prefix=/c/Programme/Aspell-0.60.4 \
--with-frontend=qt --disable-maintainer-mode --disable-debug
--enable-optimization \
--with-qt-dir=/home/user/qt-3 --prefix=/c/Programme/LyX-1.3.7
For LyX-1.4:
export PATH=/c/Programme/Python23:$PATH (you need Python!)
set CXXFLAGS=-gstabs (reduces debug symbol size)
./configure --without-x --with-aspell
--with-extra-prefix=/c/Programme/Aspell-0.60.4 \
--with-frontend=qt --disable-maintainer-mode --enable-debug
--enable-optimization \
--with-qt-dir=/home/user/qt-3 --prefix=/c/Programme/LyX-1.4.0 \
--disable-pch --disable-stdlib-debug --enable-concept-checks
5.9 Enter
make
make install
5.10 Create DTL tools
cd ./development/Win32/packaging/dtl
make
5.11 Modify ./development/Win32/packaging/package_lyxwin.sh:
Adjust LYX_INSTALL_DIR to ="/c/Programme/LyX-1.3.7"
Remove "${QT_DLL}" "${LIBICONV_DLL}" "${MINGW_DLL}" in line 45
5.12 Run the packaging script (in the directory in which it is located!)
cd ..
./package_lyxwin.sh
5.13 Add icons to lyx.exe using ResourceHacker
- Start ResourceHacker.exe
- Load 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
5.14 Remove .../bin/lyx_original.exe
***** The End *****