[GRASS-dev] Re: [GRASS GIS] #629: WinGRASS: spaces in pathnames

GRASS GIS trac at osgeo.org
Thu Jun 11 17:59:39 EDT 2009


#629: WinGRASS: spaces in pathnames
---------------------------+------------------------------------------------
  Reporter:  hamish        |       Owner:  grass-dev at lists.osgeo.org
      Type:  defect        |      Status:  new                      
  Priority:  normal        |   Milestone:  6.4.0                    
 Component:  Installation  |     Version:  6.4.0 RCs                
Resolution:                |    Keywords:  wingrass, msys           
  Platform:  MSWindows XP  |         Cpu:  x86-32                   
---------------------------+------------------------------------------------
Comment (by cnielsen):

 Replying to [comment:10 hamish]:
 > attached is a patch against the latest CVS version of msys.bat which
 fixes some of the quoting issues. You'll have to `rem` out the "abort if
 spaces in pathname" if you want to allow that.
 As written it seems to abort whether there are spaces in the pathname or
 not, I just tried it in c:\program files\ and c:\programs\ with the same
 result. I think I've fixed it, see attached file (I've just attached
 msys.bat not a patch. I could figure out svn diff for the CVS of
 msys.bat...).

 There's two bugs, one was your typo (hamish), the other I think is a bug
 in the original msys.bat. Anyway, it successfully converts the path to 8.3
 format.

 Replying to [comment:8 hamish]:
 > Replying to [comment:7 cnielsen]:
 > > and allows the grass with msys shortcuts to
 > > be executed with {{{msys.bat /grass/bin/grass64 -wxpython}}}
 > > etc.
 >
 > I don't really understand that.
 Replying to [comment:10 hamish]:
 > Colin re. fstab: as with %WD% in the patch, maybe you can use %~dps0 to
 get the 8.3 shortname string somehow?
 http://www.robvanderwoude.com/ntfor.php

 fstab is only needed for the "Grass with msys" shortcuts to work. They
 work by calling msys.bat with the argument /grass/bin/grass64 -wxpython
 (see the attached msys.bat lines 97 & 98. To fix this for spaces we have
 two options though I'm not sure which will work.

 1) fstab is written by the installer script with the install path, but I
 can't find a way to get the nsi script to convert the path with %~dps0
 before writing the fstab file.

 2) If we can get msys.bat to convert a windows path (from an argument)
 from (eg):

 {{{ c:\Program Files\Grass\bin\grass64 -wxpython}}}

 to:

 {{{ /c/Program\ Files/Grass/bin/grass64 -wxpython }}}

 then we wouldn't need fstab at all. The shortcut would use the windows
 style path, and msys.bat would convert it into readable format for
 msys.bat line 98

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


More information about the grass-dev mailing list