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

I just committed the finishing touches to the wxPython GUI intro screen and location wizard.

The intro screen gives the same functions as the TclTk one (GRASS database, location, and mapset selection) and mapset creation, plus a new location wizard that Jachym and I’ve done, and options to rename or delete locations and mapsets.

The location wizard is a nice GUI (with a great graphic from Jachym) that walks you through location creation by any of the following methods: espg code, georeferenced file, datum selection, projection/ellipse selection, custom PROJ4 string entry, or XY location creation. After a location is created, you have the option of setting/resetting the default region extents and resolution.

This is all done within a wxPython GUI that runs native on all major platforms.


The new wxPython GUI for GRASS is currently under development and nearing completion. It can be downloaded from
https://grasssvn.itc.it/grasssvn/grassaddons/trunk/grassaddons/gui/#_trunk_grassaddons_gui_
It requires Python 2.4 or above and wxPython 2.8 or above.

Give it a spin.
Michael


Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

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.
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 ...

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
and install the C API part (btw.: is this the same that comes with
wxWidgets?) alright, but runnning

python setup.py install

just gives me:

wx/setup.h: No such file or directory

and a load of other error messages complaining about missing header
files in wx/.
Even though I did a "make install" and manually copied header files to
system-wide location /usr/incluce/wx/

Anyone got some experience installing wxPython from scratch on a Linux
system?

Thanks,

Benjamin

Michael Barton wrote:

I just committed the finishing touches to the wxPython GUI intro screen and location wizard.

The intro screen gives the same functions as the TclTk one (GRASS database, location, and mapset selection) and mapset creation, plus a new location wizard that Jachym and I've done, and options to rename or delete locations and mapsets.

The location wizard is a nice GUI (with a great graphic from Jachym) that walks you through location creation by any of the following methods: espg code, georeferenced file, datum selection, projection/ellipse selection, custom PROJ4 string entry, or XY location creation. After a location is created, you have the option of setting/resetting the default region extents and resolution.

This is all done within a wxPython GUI that runs native on all major platforms.

----------------
The new wxPython GUI for GRASS is currently under development and nearing completion. It can be downloaded from
<https://grasssvn.itc.it/grasssvn/grassaddons/trunk/grassaddons/gui/#_trunk_grassaddons_gui_&gt;
It requires Python 2.4 or above and wxPython 2.8 or above.
----------------

Give it a spin.
Michael
__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

------------------------------------------------------------------------

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

Benjamin Ducke wrote:

1. I don't understand the relation between wxWindows, wxWidgets and
wxPython.

wxWindows is the old name, wxWidgets is the new name.

wxPython refers to the Python bindings for wxWidgets.

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 ...

The wxPython source distribution bundles a copy of wxWidgets. This may
not be such a great idea, but that's how it is.

--
Glynn Clements <glynn@gclements.plus.com>

OK, I think I managed to sort things out and they are working
for me now. I just got rid of the previous wxWidget installation
I had and installed all from scratch using wxPython.

There are two little glitches:

1. You have to compile and install the stuff in the 'contrib' dir
manually.

2. The setup.py script is a bit stupid. It assumes that you want to build with unicode support and fails, otherwise (that's what my problem
was).

Cheers,

Benjamin

Glynn Clements wrote:

Benjamin Ducke wrote:

1. I don't understand the relation between wxWindows, wxWidgets and
wxPython.

wxWindows is the old name, wxWidgets is the new name.

wxPython refers to the Python bindings for wxWidgets.

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 ...

The wxPython source distribution bundles a copy of wxWidgets. This may
not be such a great idea, but that's how it is.

Hmmm, after starting wxgrass, I get this message
dumped to the command line every few seconds, preventing me from
using the CLI:

** (python:25499): WARNING **: IPP request failed with status 1280

Ben

Michael Barton wrote:

I just committed the finishing touches to the wxPython GUI intro screen and location wizard.

The intro screen gives the same functions as the TclTk one (GRASS database, location, and mapset selection) and mapset creation, plus a new location wizard that Jachym and I've done, and options to rename or delete locations and mapsets.

The location wizard is a nice GUI (with a great graphic from Jachym) that walks you through location creation by any of the following methods: espg code, georeferenced file, datum selection, projection/ellipse selection, custom PROJ4 string entry, or XY location creation. After a location is created, you have the option of setting/resetting the default region extents and resolution.

This is all done within a wxPython GUI that runs native on all major platforms.

----------------
The new wxPython GUI for GRASS is currently under development and nearing completion. It can be downloaded from
<https://grasssvn.itc.it/grasssvn/grassaddons/trunk/grassaddons/gui/#_trunk_grassaddons_gui_&gt;
It requires Python 2.4 or above and wxPython 2.8 or above.
----------------

Give it a spin.
Michael
__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

------------------------------------------------------------------------

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

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

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

What do you think about posting your and Paul's installation information to
the GRASS WIKI in the Python GUI section?

Michael

On 8/5/07 12:17 PM, "Benjamin Ducke" <benjamin.ducke@ufg.uni-kiel.de> wrote:

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

__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

Sure, if you would like to post my instructions: go ahead
and do it. I have no idea about Wikis and how they work
(or how the heck you are supossed to find a piece of information
on one of them) ...

Ben

What do you think about posting your and Paul's installation information
to
the GRASS WIKI in the Python GUI section?

Michael

On 8/5/07 12:17 PM, "Benjamin Ducke" <benjamin.ducke@ufg.uni-kiel.de>
wrote:

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

__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

Benjamin Ducke pisze:

Hmmm, after starting wxgrass, I get this message
dumped to the command line every few seconds, preventing me from
using the CLI:

** (python:25499): WARNING **: IPP request failed with status 1280

I have this problem too on Debian testing amd64, GRASS 6.4 SVN r34005.

Maciek

--
Maciej Sieczka
www.sieczka.org