[osgeo4w-dev] [osgeo4w] #295: findstr in addPath runs forever on windows7
OSGeo4W
trac_osgeo4w at osgeo.org
Thu Jun 28 01:01:48 PDT 2012
#295: findstr in addPath runs forever on windows7
--------------------------+-------------------------------------------------
Reporter: asgerpetersen | Owner: osgeo4w-dev@…
Type: defect | Status: new
Priority: major | Component: Package
Version: | Keywords:
--------------------------+-------------------------------------------------
Comment(by asgerpetersen):
Replying to [comment:2 maphew]:
> what are the steps leading up to findstr running forever?
It ran forever whenever I tried to start a osgeo4w program from start menu
or shortcut.
> Does this happen when merely starting the Osgeo4W shell?
Yes.
> What about when running programs from within the shell? (as opposed to
Start Menu or desktop shortcuts.)
I cannot try that because the shell wont start.
> What edit do you make to addpath.bat to bypass the freezing?
Nothing fancy. Just dont use findtr and risc duplicate path entries.
> ...here's a thought: does findstr work at all? Try something like this
from a non-osgeo4w command shell (Start > Run > cmd [enter]): `findstr /s
"findstr" c:\osgeo4w\*.bat*`
My findstr seems to work ok with the simple test case:
{{{
C:\Users\asi>findstr /s "findstr" c:\osgeo4w\*.bat*
c:\osgeo4w\bin\addpath.bat:echo("!new!"|findstr /i /r
/c:^"^^\"[a-zA-Z]:[\\/][^\
\/]" ^
c:\osgeo4w\bin\addpath.bat: echo(%%B|findstr /i /r
/c:^"^^\"[a-zA-Z]:[\\/][^\
\/]" ^
c:\osgeo4w\bin\inpath.bat:echo("!new!"|findstr /i /r
/c:^"^^\"[a-zA-Z]:[\\/][^\\
/]" ^
c:\osgeo4w\bin\inpath.bat: echo(%%B|findstr /i /r
/c:^"^^\"[a-zA-Z]:[\\/][^\\
/]" ^
}}}
> As as I know the Qgis stand alone install doesn't use addpath.bat.
The QGIS standalone installer installs a desktop shortcut which makes the
following chain of calls:
"C:\Program Files (x86)\Quantum GIS Lisboa\bin\nircmd.exe" exec hide
"C:\Program Files (x86)\Quantum GIS Lisboa\bin\qgis.bat"
which sets OSGEO4W_ROOT=C:\PROGRA~2\QUANTU~1 and calls
"%OSGEO4W_ROOT%"\bin\o4w_env.bat
o4w_env runs the bat-files in the etc\ini folder and the
etc\ini\python.bat file calls addpath.bat
--
Ticket URL: <http://trac.osgeo.org/osgeo4w/ticket/295#comment:7>
OSGeo4W <http://trac.osgeo.org/osgeo4w>
OSGeo4W is the Windows installer and package environment for the OSGeo stack.
More information about the osgeo4w-dev
mailing list