[GRASS-dev] NVIZ startup
Paul Kelly
paul-grass at stjohnspoint.co.uk
Mon Dec 11 10:19:39 EST 2006
Hello Bob
I don't have time to look in detail at a better way of doing this for now
but just to point out that it won't work on Native Windows GRASS for 3
reasons (indeed I can confirm that the "start NVIZ with these display
settings" button in gis.m now reports that it can't find nviz....):
1. It needs a shell script interpreter (e.g. Msys) - I'm trying to get
WinGRASS so that as much of it as possible runs without shell scripting
availability. Nviz was included in that up to now.
2. The Msys exec command uses Msys paths (i.e. starting like
/c/grass/grass6) while $GISBASE will be a Windows-style path with forward
slashes (i.e. like c:/grass/grass6) and Msys will try and interpret this
as relevant to its installation directory, and fail.
3. To run scripts at all from gis.m they need to have a .bat, .com or .exe
ending (this is a bug/feature in Tcl). If you use the proper "script"
Makefile rule to install the script in the scripts directory then it will
also create a .bat wrapper script in the bin directory to call the
original script using the user's preferred interpreter (most likely Msys
bash), but this isn't happening here.
Yes the gis.m startup script doesn't work either but it only needs to be
called once at the start and I have instead been starting gm.tcl directly
from a Windows batch file.
An idea I did have though, was to allow each script directory to, if
contributed, have both bourne shell and Windows batch versions. If the
batch version was there it would then get installed on Windows in
preference to creating a batch wrapper script that invoked the bourne
shell interpreter on the original script (as at present).
But there's a lot of issues there and as I said am a wee bit too busy to
get stuck into any of them right now.
Paul
On Mon, 11 Dec 2006, Bob Covill wrote:
> Hello,
>
> I have updated NVIZ so that it is now started via a script (still called
> nviz). This update should improve the TCL error catching of NVIZ. TCL
> errors should now be printed to stderr. The previous version would hang
> or dump the user out without any indication of the TCL error causing the
> problem.
>
> The un-installed script can be found in nviz/scripts. Please check it
> out and see if any improvements can be made.
>
> This update also includes modifications to the nviz Makefile. The script
> is currently being installed in $GISBASE/bin, but it should probably be
> installed in $GISBASE/scripts. Unfortunately I do not know how to remove
> the old nviz in $GISBASE/bin before installing the script in
> $GISBASE/scripts. There is also a couple lines in Makefile to handle
> moving the binary nvwish to $GISBASE/etc/nviz2.2/. Please check this
> section to ensure that is is correct (particularly Windows developers).
You can put $(EXE) at the end of an executable file name in a GRASS
Makefile. It will be empty on Unix and contain ".exe" on Windows. You are
better using $(INSTALL) here as well instead of mv I think.
>
> --
> Bob
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev
>
More information about the grass-dev
mailing list