[GRASS-dev] Windows-style Pathnames

Hamish hamish_nospam at yahoo.com
Mon Nov 6 23:24:41 EST 2006


Paul Kelly wrote:
> Yes. The way I've done that in the is first to pass the string
> containing  the path to G_convert_dirseps_to_host(), which will
> replace all occurences  of / by \, and then quote the path name with
> \"escaped double quotes\"  within the argument supplied to system() -
> I think this should cover both  eventualities of the pathname
> containing spaces, *and* the backslashes  possibly being
> misinterpreted by a shell. Although as we've seen it should  normally
> by cmd.exe invoked for this.

does it check/strip existing " before adding new ones?


> especially if we get display drivers working.

it would be nice to go directly to a simple wxPython canvas window that
could take d.* cmds, instead of bothering to adapt XDRIVER... but the
PNG driver was a problem too, yes? So we need a socket-less PNG driver?
or a new direct rendering wxDRIVER? (simple d.mon replacement, probably
nothing to do with gis manager gui canvas?)


Glynn:
> > So, if we were to add ".sh" extensions to all of the scripts, and
> > add ".sh" to PATHEXT, calling e.g. system("r.out.gdal ...") should
> > run r.out.gdal.sh using the program associated with ".sh" in the
> > registry.

I hope this is done in the windows build process (like "gcc -o
${module}.exe", and not for all platforms. i.e. "g.script" works from
the command line on all platforms without having to type ".sh" in unix.



Hamish




More information about the grass-dev mailing list