#32 closed defect (fixed)
the template for batch files should have a quoted path, else CALL fails
Reported by: | maphew | Owned by: | |
---|---|---|---|
Priority: | major | Component: | Installer |
Version: | Keywords: | ||
Cc: |
Description
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.
Change History (3)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I've added a template to the Packaging Instruction page for launching an application with the standard osgeo4w environment settings here
comment:3 by , 16 years ago
better solution (also documented in packaging instructions):
@echo off SET OSGEO4W_ROOT=@osgeo4w@ call %OSGEO4W_ROOT%\bin\o4w_env.bat start /B %OSGEO4W_ROOT%\bin\foo.exe %* @echo on
Note:
See TracTickets
for help on using tickets.
just noticed the PATH statement is missing root (check the qgis package) make that: