[Osgeo4w-trac] [osgeo4w] #32: the template for batch files should
have a quoted path, else CALL fails
OSGeo4W
trac_osgeo4w at osgeo.org
Fri Jan 16 19:22:10 EST 2009
#32: the template for batch files should have a quoted path, else CALL fails
-----------------------+----------------------------------------------------
Reporter: maphew | Owner: osgeo4w-dev at lists.osgeo.org
Type: defect | Status: new
Priority: major | Milestone:
Component: Installer | Version:
Keywords: |
-----------------------+----------------------------------------------------
If there is a space in OSGEO4W_ROOT the call will fail. The fix is to
quote `%%f`. Using current qgis.bat.tmpl as an example, the corrected
template is:
{{{
@echo off
SET OSGEO4W_ROOT=@osgeo4w@
PATH %OSGEO4W%\bin;%PATH%
for %%f in ("%OSGEO4W_ROOT%"\etc\ini\*.bat) do call "%%f"
start /B %OSGEO4W_ROOT%\bin\qgis.exe %*
}}}
Note: for some reason Windows is smart about quotes when setting PATH, so
they are not needed there. Likewise the embedded quote within the FOR ...
IN does not cause a problem.
--
Ticket URL: <http://trac.osgeo.org/osgeo4w/ticket/32>
OSGeo4W <http://trac.osgeo.org/osgeo4w>
OSGeo4W is the Windows installer for the OSGeo stack.
More information about the Osgeo4w-trac
mailing list