[GRASS-dev] Wingrass and TclTk

Moritz Lennert mlennert at club.worldonline.be
Wed Oct 31 06:56:04 EDT 2007


On 31/10/07 11:29, Benjamin Ducke wrote:
> The start command does actually work to put gis.m in the background.

Great !

> I changed init.bat to read:
> 
> ===
> rem if return ok, gis.m start:
> if %errorlevel% == 2 goto exitinit
> 
> if not "%GRASS_WISH%"=="" (
>   start "GIS Manager" "%GRASS_WISH%" "%WINGISBASE%\etc\gm\gm.tcl"
>   winterm.bat
> ) else (
>   start "GIS Manager" "%WINGISBASE%\etc\gm\gm.tcl"
>   winterm.bat
> )
> ===
> 
> And that works fine for me. "winterm.bat" is in GRASS/bin and has these
> contents:
> 
> ===
> rem starts a new WinGRASS terminal window
> 
> FOR /F "usebackq delims==" %%i IN (`g.gisenv "get=LOCATION_NAME"`) DO
> @set LOCATION_NAME=%%i
> prompt $C%LOCATION_NAME%$F:$P $G
> cd "%HOMEPATH%"
> 
> cmd.exe /C start "GRASS %GRASS_VERSION% Shell" cmd.exe /E:ON /F:ON /V:ON
> 
> exit /B
> ===

ok, I'll test and commit, if it works for me as well.

> 
> FWIW, I also re-designed grass63.bat to make it easier to understand and
> work. If you keep it in the dir above your GRASS installation, it should
> be completely relocatable, w/o having to set any vars:

I have some issues with this:

- What is the problem with having a bin/ dir which contains grass63.bat 
and grass63 and a grass-6.3.cvs/ dir which is WINGISBASE ?

- More importantly: below setup seems to assume that GRASS is installed 
within the msys directory structure (e.g. set GRASS_SH=%CD%\bin\sh.exe). 
I honestly don't know what is easier for other users: tweak a few 
environmental variables in their grass63.bat (and this only if they want 
to have access to a msys shell - otherwise it should "out of the box") 
or mix the grass files into the msys tree...or moving around msys bins 
and libs to fit into the grass tree.
The same holds true for the inclusion of R: I don't think that we should 
oblige all users to organise their files in the way you do. They should 
have more flexibility.
So, I still believe that:

rem Path to the shell command
rem set GRASS_SH=c:\msys\1.0\bin\sh.exe

is a better solution (since allowing the user to install what they want 
where they want) than


 > rem Path to the shell command. This assumes that sh.exe is in the
 > subfolder "bin",
 > rem relative to where this batch file was started from.
 > set GRASS_SH=%CD%\bin\sh.exe


But I'm open for discussion on these issues.

Moritz





More information about the grass-dev mailing list