Discussion:
[GRASSGUI] wx init.sh needs updating
William Kyngesburye
2007-11-14 22:56:52 UTC
Permalink
Just found some time to take a look at wxgrass again. The init.sh in
the svn gui source needs to be updated - there are a bunch of updates
missing, so if someone overwrites their existing init.sh per the
readme, the updates will be lost.

I see that most of the wx changes are already in the GRASS cvs
init.sh. The other option would be to update the readme install
instructions - with one update to the CVS init.sh, this step could be
removed. The one difference I found is the message about restarting/
starting the gui. This would take care of the different gui cases (I
left out d.m):

case "$GRASS_GUI" in
tcltk | gis.m)
echo "If required, restart the graphical user interface
with: gis.m"
;;
wx)
echo "If required, restart the graphical user interface
with: wxgrass &"
;;
*)
echo "Start the graphical user interface with: gis.m"
;;
esac

(I could apply that if you like.)

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

Theory of the Universe

There is a theory which states that if ever anyone discovers exactly
what the universe is for and why it is here, it will instantly
disappear and be replaced by something even more bizarrely
inexplicable. There is another theory which states that this has
already happened.

-Hitchhiker's Guide to the Galaxy 2nd season intro
Michael Barton
2007-11-14 22:56:52 UTC
Permalink
William,

I thought that the cvs version of init.sh was the one to use now. Please go
ahead and make the one further change. We should get rid of the init.sh in
the svn repository and instructions that say to use it. If you take care of
init.sh in the cvs, I'll take care of the svn version. Thanks for noticing
this.

I started messing around with a python replacement for init.sh, just to see
what is needed. It is going pretty well, but tedious. Once done (and
probably won't work right off) it could be a good opportunity to clean up
the start up script for GRASS. Thinking ahead to a time when the same script
can start GRASS on all platforms.

Michael
Post by William Kyngesburye
Just found some time to take a look at wxgrass again. The init.sh in
the svn gui source needs to be updated - there are a bunch of updates
missing, so if someone overwrites their existing init.sh per the
readme, the updates will be lost.
I see that most of the wx changes are already in the GRASS cvs
init.sh. The other option would be to update the readme install
instructions - with one update to the CVS init.sh, this step could be
removed. The one difference I found is the message about restarting/
starting the gui. This would take care of the different gui cases (I
case "$GRASS_GUI" in
tcltk | gis.m)
echo "If required, restart the graphical user interface
with: gis.m"
;;
wx)
echo "If required, restart the graphical user interface
with: wxgrass &"
;;
*)
echo "Start the graphical user interface with: gis.m"
;;
esac
(I could apply that if you like.)
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
Theory of the Universe
There is a theory which states that if ever anyone discovers exactly
what the universe is for and why it is here, it will instantly
disappear and be replaced by something even more bizarrely
inexplicable. There is another theory which states that this has
already happened.
-Hitchhiker's Guide to the Galaxy 2nd season intro
__________________________________________
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
William Kyngesburye
2007-11-14 22:56:52 UTC
Permalink
Done.
Post by Michael Barton
William,
I thought that the cvs version of init.sh was the one to use now. Please go
ahead and make the one further change. We should get rid of the init.sh in
the svn repository and instructions that say to use it. If you take care of
init.sh in the cvs, I'll take care of the svn version. Thanks for noticing
this.
...
Post by Michael Barton
Post by William Kyngesburye
I see that most of the wx changes are already in the GRASS cvs
init.sh. The other option would be to update the readme install
instructions - with one update to the CVS init.sh, this step could be
removed. The one difference I found is the message about restarting/
starting the gui. This would take care of the different gui cases (I
case "$GRASS_GUI" in
tcltk | gis.m)
echo "If required, restart the graphical user interface
with: gis.m"
;;
wx)
echo "If required, restart the graphical user interface
with: wxgrass &"
;;
*)
echo "Start the graphical user interface with: gis.m"
;;
esac
(I could apply that if you like.)
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

Theory of the Universe

There is a theory which states that if ever anyone discovers exactly
what the universe is for and why it is here, it will instantly
disappear and be replaced by something even more bizarrely
inexplicable. There is another theory which states that this has
already happened.

-Hitchhiker's Guide to the Galaxy 2nd season intro
William Kyngesburye
2007-11-14 22:56:52 UTC
Permalink
Post by Michael Barton
I started messing around with a python replacement for init.sh, just to see
what is needed. It is going pretty well, but tedious. Once done (and
probably won't work right off) it could be a good opportunity to clean up
the start up script for GRASS. Thinking ahead to a time when the same script
can start GRASS on all platforms.
Michael
Yeah, I just noticed a another oddity in init.sh related to wx - the
gui dependency test is still based on X. While wxpython on other
'nix platforms may need X, it doesn't on OSX, and probably not on
Windows either. Summarized:

if DISPLAY set (though it may be set but no X is available, at least
on OSX)
test gui dependency - python for wx, wish for tcltk
if it fails
warn that *wish* doesn't work (oops)
else
no gui possible
if a gui is set
warn that *X* is not available, and there a gui is not possible
(oops again)

Instead of testing the gui dependency first, maybe this should test
the gui setting first:

case GRASS_GUI:
tcltk, etc)
test X availability
or better, ignore DISPLAY and test only wish - if it works, X is
implied, or whatever graphical base needed (this would take care of
native tcltk implementations, like Aqua or Windows, not that they
work well)
wx)
test python availability (X implied if needed - as long as
python works)


...just some thoughts...

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"We are at war with them. Neither in hatred nor revenge and with no
particular pleasure I shall kill every ___ I can until the war is
over. That is my duty."

"Don't you even hate 'em?"

"What good would it do if I did? If all the many millions of people
of the allied nations devoted an entire year exclusively to hating
the ____ it wouldn't kill one ___ nor shorten the war one day."

<Ha, ha> "And it might give 'em all stomach ulcers."

- Tarzan, on war



-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

First Pogril: Why is life like sticking your head in a bucket filled
with hyena offal?
Second Pogril: I don't know. Why IS life like sticking your head in
a bucket filled with hyena offal?
First Pogril: I don't know either. Wretched, isn't it?

-HitchHiker's Guide to the Galaxy
Michael Barton
2007-11-14 22:56:52 UTC
Permalink
I also took care of the README and deleted the old init.sh from the SVN gui
folder.

Michael
Post by William Kyngesburye
Done.
Post by Michael Barton
William,
I thought that the cvs version of init.sh was the one to use now.
Please go
ahead and make the one further change. We should get rid of the
init.sh in
the svn repository and instructions that say to use it. If you take
care of
init.sh in the cvs, I'll take care of the svn version. Thanks for
noticing
this.
...
Post by Michael Barton
Post by William Kyngesburye
I see that most of the wx changes are already in the GRASS cvs
init.sh. The other option would be to update the readme install
instructions - with one update to the CVS init.sh, this step could be
removed. The one difference I found is the message about restarting/
starting the gui. This would take care of the different gui cases (I
case "$GRASS_GUI" in
tcltk | gis.m)
echo "If required, restart the graphical user interface
with: gis.m"
;;
wx)
echo "If required, restart the graphical user interface
with: wxgrass &"
;;
*)
echo "Start the graphical user interface with: gis.m"
;;
esac
(I could apply that if you like.)
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
Theory of the Universe
There is a theory which states that if ever anyone discovers exactly
what the universe is for and why it is here, it will instantly
disappear and be replaced by something even more bizarrely
inexplicable. There is another theory which states that this has
already happened.
-Hitchhiker's Guide to the Galaxy 2nd season intro
__________________________________________
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
Michael Barton
2007-11-14 22:56:52 UTC
Permalink
Sounds like this needs to be updated soon. I'm surprised that it doesn't
kick out an error for the native Windows version.

Michael
Post by William Kyngesburye
Post by Michael Barton
I started messing around with a python replacement for init.sh,
just to see
what is needed. It is going pretty well, but tedious. Once done (and
probably won't work right off) it could be a good opportunity to
clean up
the start up script for GRASS. Thinking ahead to a time when the
same script
can start GRASS on all platforms.
Michael
Yeah, I just noticed a another oddity in init.sh related to wx - the
gui dependency test is still based on X. While wxpython on other
'nix platforms may need X, it doesn't on OSX, and probably not on
if DISPLAY set (though it may be set but no X is available, at least
on OSX)
test gui dependency - python for wx, wish for tcltk
if it fails
warn that *wish* doesn't work (oops)
else
no gui possible
if a gui is set
warn that *X* is not available, and there a gui is not possible
(oops again)
Instead of testing the gui dependency first, maybe this should test
tcltk, etc)
test X availability
or better, ignore DISPLAY and test only wish - if it works, X is
implied, or whatever graphical base needed (this would take care of
native tcltk implementations, like Aqua or Windows, not that they
work well)
wx)
test python availability (X implied if needed - as long as
python works)
...just some thoughts...
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
"We are at war with them. Neither in hatred nor revenge and with no
particular pleasure I shall kill every ___ I can until the war is
over. That is my duty."
"Don't you even hate 'em?"
"What good would it do if I did? If all the many millions of people
of the allied nations devoted an entire year exclusively to hating
the ____ it wouldn't kill one ___ nor shorten the war one day."
<Ha, ha> "And it might give 'em all stomach ulcers."
- Tarzan, on war
__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton
Paul Kelly
2007-11-14 22:56:53 UTC
Permalink
Post by Michael Barton
Sounds like this needs to be updated soon. I'm surprised that it doesn't
kick out an error for the native Windows version.
init.sh isn't used on native Windows - that's what init.bat is for. Unless
you start GRASS from an Msys shell, when you could use init.sh and indeed
it used to work - I haven't tested it recently though and we've been
concentrating on getting Msys-independent WinGRASS working as well as
possible.

Paul
Michael Barton
2007-11-14 22:56:53 UTC
Permalink
This has been a very important effort. I'm teaching my graduate spatial
technologies class in the Spring and for the first time, I'll be able to use
GRASS as the primary software for this on all platforms.

Michael
Post by Paul Kelly
Post by Michael Barton
Sounds like this needs to be updated soon. I'm surprised that it doesn't
kick out an error for the native Windows version.
init.sh isn't used on native Windows - that's what init.bat is for. Unless
you start GRASS from an Msys shell, when you could use init.sh and indeed
it used to work - I haven't tested it recently though and we've been
concentrating on getting Msys-independent WinGRASS working as well as
possible.
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

Loading...