Re: [documancer] documancer without wxmozilla

Arnd Baecker <arnd.baecker-S0/[email protected]> Tue, 9 Nov 2004 13:24:14 +0100 (CET)
Newsgroups gmane.text.documancer.user
Message-ID <[email protected]>
Hi,

many thanks for your reply!

On Tue, 9 Nov 2004, Vaclav Slavik wrote:

> Arnd Baecker wrote:

> > It seems that I have to compile  wxPython from source
> > with --enable-gtk2
> > (Though I am not sure at all how I could do this side-by-side
> > to the normally installed one).
>
> You just have to install both wxWidgets (compiled with
> --enable-unicode --enable-gtk2) and wxPython into  another prefix,
> say, /opt/wxPython, and then set PYTHONPATH, e.g.
>
> PYTHONPATH=/opt/wxPython/lib/python2.3/site-packages documancer

Well, I really wanted to avoid compiling wxPython again,
but unavoidable things have to be done ;-).
In the end everything worked fine (details below).
The only thing I had to change was in HtmlBrowser.py

try:
    from wxPython.mozilla import *
    try:
        import wxPython.mozilla as mozilla
        MOZILLA_VERSION = mozilla.__version__

So overall it is still a bit of a hassle
(at least under debian at the moment) until wxPython 2.5(6?)
(or gtk2 with wxpython 2.4) becomes the default.
On the really positive side: there is no
need for me to compile mozilla, because
libgtkembedmoz.so can be used.

I have two minor remarks:
- when one invokes the books manager the first time
  it looks like
  ||Tit|Type    |               |
  It would be nice if the initial width for the Title
  was bigger.
  (it gets adapted once one adds a book ...)
- After adding the first book, the corresponding
  first page is not displayed (you have to press Home first).
  I think it would be good if it got displayed automatically
  so that a user immediately sees the new book.

Arnd


Installation notes:

To get things compiled I needed (under debian sarge)
  apt-get install libwxgtk2.4-dev
(I am sure there are further ...-devs needed, but obviously
they were already installed)

Download: wxPythonSrc-2.4.2.4.tar.gz

export WXPREF=/usr/opt/wx/2.4/
# Remark: /opt/wx/2.4/ would be more natural place
#         (if there was space in /opt ;-)

mkdir -p $WXPREF
tar xzf wxPythonSrc-2.4.2.4.tar.gz
cd wxPythonSrc-2.4.2.4
 mkdir mybuild
 cd mybuild
../configure --with-gtk --enable-gtk2 \
             --prefix=${WXPREF} \
             --enable-rpath=$WXPREF/lib \
             --with-opengl \
             --enable-geometry \
             --enable-unicode  \
             --enable-optimise

make
make install
cd ../locale
make allmo
cd ../mybuild
make install

export LD_LIBRARY_PATH=${WXPREF}/lib:${LD_LIBRARY_PATH}
cd ../wxPython

python setup.py \
        WX_CONFIG=$WXPREF/bin/wx-config \
        WXPORT=gtk2\
        build install --prefix=$WXPREF

Installing documancer
---------------------

export PYTHONPATH=${WXPREF}/lib/python2.3/site-packages:${PYTHONPATH}
export LD_LIBRARY_PATH=${WXPREF}/lib:${LD_LIBRARY_PATH}:


./autogen.sh
./configure  --prefix=${WXPREF} --with-wx-prefix=${WXPREF}
make
make install


Running documancer
------------------

export LD_LIBRARY_PATH=${WXPREF}/lib:/usr/lib/mozilla-firefox:${LD_LIBRARY_PATH}:
export PYTHONPATH=${WXPREF}/lib/python2.3/site-packages:${PYTHONPATH}
export PATH=${WXPREF}/bin:${PATH}

documancer

Note that libgtkembedmoz.so has to be in the LD_LIBRARY_PATH





-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click