[GRASS-dev] [GRASS GIS] #1950: wingrass: replace rxvt with conhost.exe

GRASS GIS trac at osgeo.org
Thu Apr 25 12:36:13 PDT 2013


#1950: wingrass: replace rxvt with conhost.exe
-----------------------+----------------------------------------------------
 Reporter:  hamish     |       Owner:  grass-dev@…              
     Type:  task       |      Status:  new                      
 Priority:  major      |   Milestone:  6.4.4                    
Component:  Packaging  |     Version:  svn-develbranch6         
 Keywords:  wingrass   |    Platform:  MSWindows 7              
      Cpu:  All        |  
-----------------------+----------------------------------------------------

Comment(by glynn):

 Replying to [comment:4 hamish]:

 > the existing trouble with grass6 cmd.exe Command Line mode is that shell
 scripts run within shell scripts can't find them. (e.g. v.in.lines(.sh)
 calling v.in.mapgen(.sh) seen in another bug report)

 That's because $GISBASE/scripts isn't added to PATH on Windows.

 bash has its own execution mechanism; in particular, it doesn't use
 PATHEXT, so you can't run a batch file without specifying the .bat or .cmd
 extension. But because shell scripts don't have a .sh extension (and the
 .sh extension probably isn't associated with bash anyhow), they can't just
 be "executed" normally. So GRASS 6.x creates a .bat file in $GISBASE/bin
 for each shell script.

 This works when executing scripts via cmd.exe, system(),
 subprocess.Popen(), etc, as those all use PATHEXT. But bash doesn't use
 PATHEXT, so it doesn't find the .bat files, and it doesn't find the
 scripts themselves because $GISBASE/scripts isn't in $PATH.

 Maybe adding $GISBASE/scripts to PATH in scripts/windows_launch.bat would
 work? Or it might not, as the updated PATH would be inherited by anything
 run from the script; presumably there's a reason for $GISBASE/scripts
 being excluded from PATH, rather than just being after $GISBASE/bin.

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/1950#comment:6>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list