[GRASS-dev] Re: testing native winGRASS

Moritz Lennert mlennert at club.worldonline.be
Wed Mar 21 10:22:52 EDT 2007


On 20/03/07 20:51, Paul Kelly wrote:
> First of all, I'm an idiot - "more" actually is a normal command on 
> Windows, not a shell built-in. I was getting it confused with "type".
> 
> But even with that, using G_spawn() to run it still doesn't work. I've 
> done a bit of experimenting with it but not sure why. So I'm leaving 
> G_system() in where it is working OK for now until we get that sorted.

But in any case this means that we shouldn't need a batch script for 
calling "more", or ?

> 
> Changes I've just made in CVS involve:
> Create region files in new user mapsets (other than PERMANENT) correctly 
> (use G_get_default_window() and G_put_window())
> Create MYNAME file with fputs()
> Update interactive version of r.coin so it works:
> Added new G_copy_file() function to libgis to use instead of 
> system("cp...")
> Change system("clear") to G_clear_screen()
> Remove checks for absolute paths and logic about saving report file to 
> home directory - just save it to whatever filename the user gives.
> Quote parameters in call to r.stats using double quotes instead of 
> single quotes so it works on Windows (this applies to cmd and inter 
> versions of r.coin)
> 

Great !

I have also committed your proposal for the null device definition, i.e.

Suggested:
 > Index: gis.h
 > ===================================================================
 > RCS file: /home/grass/grassrepository/grass6/include/gis.h,v
 > retrieving revision 1.42
 > diff -u -r1.42 gis.h
 > --- gis.h       6 Mar 2007 01:34:47 -0000       1.42
 > +++ gis.h       20 Mar 2007 09:22:55 -0000
 > @@ -145,8 +145,10 @@
 >  #define GRASS_DIRSEP '/'
 >  #ifdef __MINGW32__
 >  #  define HOST_DIRSEP '\\'
 > +#  define G_DEV_NULL 'NUL:'
 >  #else
 >  #  define HOST_DIRSEP '/'
 > +#  define G_DEV_NULL '/dev/null'
 >  #endif


So, what is priority now in trying to get winGRASS as quickly as 
possible to release level ?

- Go through more of the audit results and Glynn's suggestions on how to 
fiw them ?

Looking at what's left, there are a lot of G_spawn_ex cases. Then a few 
which would need a G_vspawn_ex() or equivalent.
The others should be no problem, so I can deal with those.

- Implement G_spawn_ex  for windows + G_vspawn_ex ?

- Continuing testing wingrass ?

Knowing that even though I am willing to try, it will take me a lot more 
time to come to grips with G_spawn_ex than any of you. So, it's also a 
question of efficient use of sparse resources ;-)

BTW: there is a call to r.stats in d.histogram which makes this module 
fail in gis.m on windows ? Again it seems to be a quoting issue as the 
error is something like "file or directory not found". Paul, as you did 
this for r.coin, could you look into that ?

Moritz




More information about the grass-dev mailing list