[GRASS-dev] wxgrass intro screen and location wizard completed

Benjamin Ducke benjamin.ducke at ufg.uni-kiel.de
Sun Aug 5 15:17:25 EDT 2007


Paul, Glynn, Michael and all

thanks for the hints, meanwhile I have figured out how to get
things working on my Gentoo Linux box and the glitches I faced
were pretty much the same you described. In case it will help
anyone in the future, here are my notes for an installation of
wxGRASS on Gentoo linux (or any other Linux distro from scratch,
I guess):

***

wxGRASS on Linux with wxPython from scratch:

This GUI is based completely on interpreted Python code. No compilation
is required. GUI libs used are wxPython:

http://www.wxpython.org/

... this includes a copy of the basic wxWindows widgets with the same
version number as the wxPython distribution. So no need to install
wxWindows/wxWdigets separately.

Problem: can create a real mess because there seem to be some steps
that assume that a unicode build has been made and other that assume
a plain ANSI build! If the two get mixed up, compilation will fail
at some point complaining about missing include files in wx/ because
the configure script is not pointing to the right build directory.

Solution: create a UNICODE build and make sure there is nothing lying
around that still points to an ANSI build.

Step ONE: build main wxWidgets libs (will be done in subdirectory 'bld' 
in main
wxPython sources dir).

extract archive to $WXDIR, configure (NOTE: change --prefix= to wherever
your Python stuff and system libs are globally installed), build and 
install:

mkdir $WXDIR/bld
cd $WXDIR/bld
../configure --prefix=/usr --with-gtk --without-gnomeprint --with-opengl 
--enable-geometry --enable-graphics_ctx --enable-sound --with-sdl 
--enable-mediactrl --enable-display --enable-optimize --enable-unicode
make
sudo make install
exit

(NOTE: I disabled gnomeprint on my system, because it kept dumping
a stupid "IPP" related error message on my console; you might want
to set other options to better suit your system)

Now we need to make some contributed extensions. These are skipped by 
the main Makefile but will likely be needed later. Make sure you are in 
the 'bld' subdirectory.

cd contrib
make
sudo make install
exit

This should have taken care to install all headers and libaries in
the system-wide locations. Confirm that all is working by doing:

wx-config --version

and

wx-config --list

The version displayed by the first command needs to be the same as that
of the wxPython you are installing. If not, there is an old version of
wxWidgets floating around that you should deinstall (note: wx 2.8 has
wx 2.6 compatibility enabled by default).

The second command should list just one wx configuration, namely the
current UNICODE build. If it shows more, there are other builds in
/usr/lib/wx/config and /usr/lib/wx/include. You may want to delete these.

Step TWO: create and install system-wide Python bindings for wx.

The Python extensions have to be made with superuser rights for a
system-wide install:

cd $WXDIR/wxPython
sudo python setup.py install

NOTE: setup.py is a little bit dumb. It assumes that you are doing a
unicode build and that the extensions from the 'contrib' dir have been
installed. If you followed the above instructions precisely, all should
work. If not, you will get errors about missing includes in wx/ sooner
or later. In that case, consult $WXDIR/docs/BUILD.txt for information on
how to swith off dependencies.

***

Paul Kelly wrote:
> On Sat, 4 Aug 2007, Benjamin Ducke wrote:
> 
>> This looks great and I have been wanting to try wxGRASS for some time
>> now, however on my Gentoo linux system I have actually never been able
>> to get wxPython to run.
> 
> I got it installed and working on Slackware 12.0 a couple of weeks ago. 
> Some info below.
> 
>> Maybe someone could help me clarify some issues.
>>
>> 1. I don't understand the relation between wxWindows, wxWidgets and
>> wxPython. The wxWidgets site claims to have GUI libs with python
>> support. If I install them, I get libs, header files and a config
>> script called wx-config. That's OK. But why does the wxPython distro
>> install those same files again? It also comes with a config script
>> called wx-config and installs headers and include files in the same
>> location as wxWidgets, even with the same names and same version
>> numbers. I am confused ...
> 
> You just need to download the large 25MB or so file from wxPython and 
> all the other stuff comes with it. I suppose it gets complicated if you 
> have a different version of Wxwindows/wxwidgets installed already. 
> Luckily I was doing a clean installation.
> 
>> 2. The build and install instructions for wxPythons are a mess.
>> From those two documents, I just can't seem to figure out how to
>> make a global build and install from source. I manage to compile
> 
> I agree they are far more complicated than necessary. Seems like very 
> minimal effort has been put into making compilation and installation of 
> the package simple. FWIW, here are my (simplified) instructions which 
> worked for me:
> 
> Download combined Wxwidgets/Wxpython package from Wxpython website 
> (approx. 25MB)
> Untar and cd into WxwidgetsDir
> mkdir bld
> cd bld
> ../configure --enable-optimise --with-opengl
> (If you don't enable OpenGL you get problems with the wxPython install 
> later
> as it seems to assume OpenGL is enabled...)
> make
> make -C contrib/src/gizmos
> make -C contrib/src/stc
> sudo make install
> sudo make -C contrib/src/gizmos install
> sudo make -C contrib/src/stc install
> cd ../wxPython
> Edit config.py to say WX_CONFIG = "wx-config" or else warnings about having
> only one config environment seem to confuse the next bit
> sudo python setup.py install
> 
> and that was it. Hope it is useful to someone - meant to post it earlier 
> but forgot, sorry.
> 
> Paul
> 
> 
> 




More information about the grass-dev mailing list