PATH problem with emerge's kdesettings.bat
S Page
skierpage at earthlink.net
Thu Nov 15 11:28:11 CET 2007
If before running kdesettings.bat, my path is
C:\Windows;C:\Windows\System32
at the end it's
c:\kderoot\emerge\bin;C:\Windows;C:\Windows\System32;c:\python25
So only the last line of this group
if %directory_layout% equ installer (
set PATH=%KDEROOT%\bin;%PATH%
set PATH=%KDEROOT%\lib;%PATH%
set PATH=%KDEROOT%\emerge\bin;%PATH%
)
worked. Somehow the first two have no effect.
Here's a simpler batch file that shows the problem:
REM ---- cut and save as pathtest.bat ----
set TESTPATH=foo
directory_layout=installer
if %directory_layout% equ installer (
echo doing installer
set TESTPATH=\bin;%TESTPATH%
set TESTPATH=\lib;%TESTPATH%
set TESTPATH=\emerge\bin;%TESTPATH%
) else (
echo not doing this
)
echo at end, TESTPATH=%TESTPATH%
REM ---- end save as pathtest.bat ----
Rather than evaluating each line in the if branch during execution and
adding more and more to TESTPATH, my Windows XP SP2's cmd.exe just executes
set TESTPATH=\bin;foo
set TESTPATH=\lib;foo
set TESTPATH=\emerge\bin;foo
and thus only the last line wins. Perhaps cmd.exe "compiles" the entire
if block at once, instead of line-by-line.
If I take out the if() test and just run these lines, the PATH/TESTPATH
variable does grow with each line.
Weird!
--
=S Page
More information about the Kde-windows
mailing list