[GRASS-dev] Re: [GRASS GIS] #902: nviz (tcl) fails on wingrass
GRASS GIS
trac at osgeo.org
Mon Feb 8 01:09:23 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:11 hamish]:
> > Fixed (hopefully) in r40835.
>
> nope.
>
> trunk:
{{{
debian_stable at GRASS7> nviz
...
launches straight into the program, no module options UI.
}}}
Not a bug, but a difference in G_parser() behaviour between 6.x and 7.0.
None of NVIZ' options are ->required=YES, so you aren't asked to provide
any. All modules now behave this way. Previously, specific modules would
use e.g.
{{{
if (argc > 1 && G_parser(argc, argv))
...
}}}
to skip calling G_parser() altogether if no options were provided and none
were required (so you could run e.g. "d.erase" without being prompted for
the colour). But this has issues, e.g. module->overwrite not being set
from $GRASS_OVERWRITE.
>
{{{
debian_stable at GRASS7> nviz --ui
sh: /usr/local/src/grass/svn/trunk/dist.x86_64-unknown-linux-
gnu/etc/nviz2.2/scripts/nviz2.2_script: nviz: bad interpreter: No such
file or directory
}}}
This appears to fix that:
{{{
--- visualization/nviz/src/nviz_init.c (revision 40851)
+++ visualization/nviz/src/nviz_init.c (working copy)
@@ -137,7 +137,7 @@
* If left in it treats it as a elev arg and tries to open
*/
argv2 = G_malloc((argc + 2) * sizeof(char *));
- argv2[0] = (char *)argv0;
+ argv2[0] = (char *)cmd;
for (ii = 0; ii < argc; ii++)
argv2[ii + 1] = (char *)argv[ii];
argv2[argc + 1] = NULL;
}}}
devbr65:
> * 6.5: GRASS_GUI=wxpython
{{{
G65> 'nviz' or 'nviz --ui'
sh: nviz2.2_script: command not found
}}}
Odd; I can't see any significant differences between 6.5 and 7.0 in this
regard. I'll get back to the 6.5 issues once the latest 6.5 has compiled.
> * nviz --help:
{{{
Usage:
nviz2.2_script [-qkxv] [elevation=name[,name,...]]
}}}
>
> module name is wrong but options are right.
This should be fixed by the argv0 -> cmd change.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/902#comment:12>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list