[GRASS-dev] Re: [GRASS GIS] #902: nviz (tcl) fails on wingrass

GRASS GIS trac at osgeo.org
Mon Feb 8 19:01:56 EST 2010


#902: nviz (tcl) fails on wingrass
-----------------------+----------------------------------------------------
  Reporter:  hamish    |       Owner:  grass-dev at lists.osgeo.org
      Type:  defect    |      Status:  new                      
  Priority:  critical  |   Milestone:  6.4.0                    
 Component:  NVIZ      |     Version:  svn-trunk                
Resolution:            |    Keywords:                           
  Platform:  All       |         Cpu:  All                      
-----------------------+----------------------------------------------------
Comment (by glynn):

 Replying to [comment:16 glynn]:

 > I think that it might be better to change the startup, moving the top of
 parse_command() (everything up to and including the G_parser() call) into
 main(), so that it's a normal "GRASS module" main(). If G_parser()
 indicates normal operation (i.e. not --help, --ui, etc), we call Tk_Main()
 with "fabricated" argc and argv (i.e. insert the "-f nviz2.2_script"). For
 --help, --ui etc, Tcl/Tk never gets involved.
 >
 > This doesn't allow the nviz binary to be used to run arbitrary scripts,
 but I'm not so sure that works anyhow.

 I've done this for 7.0 in r40879. The nviz binary is installed into
 $GISBASE/bin; the script and batch file aren't used. If argv[1] is '-f',
 it behaves like "wish", otherwise it behaves like a GRASS module:
 G_gisinit(), G_parser(), then calls Tk_Main() with argv = {"nviz", "-f",
 ".../nviz2.2_script", NULL}. It appears to do the right thing for all
 cases (nviz, nviz -q, nviz --ui (then "Run"), nviz elevation.dem), at
 least on Linux (compiling on Windows takes a while).

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/902#comment:17>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list