diff -r aba9fdf7e825 -r 0e6a0a765dcd sbsv2/raptor/bin/sbs.bat --- a/sbsv2/raptor/bin/sbs.bat Tue Feb 23 13:15:31 2010 +0000 +++ b/sbsv2/raptor/bin/sbs.bat Mon Mar 01 16:51:58 2010 +0000 @@ -1,5 +1,5 @@ @rem -@rem Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +@rem Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). @rem All rights reserved. @rem This component and the accompanying materials are made available @rem under the terms of the License "Eclipse Public License v1.0" @@ -28,11 +28,27 @@ @cd /d %WD% :foundhome -@REM Use the python set by the environment if possible +@REM The python and PYTHONPATH used by Raptor are determined by, in order of precedence: +@REM 1. the SBS_PYTHON and SBS_PYTHONPATH environment variables (if set) +@REM 2. the python shipped locally with Raptor (if present) +@REM 3. the python on the system PATH and the PYTHONPATH set in the system environment + +@SET __LOCAL_PYTHON__=%SBS_HOME%\win32\python264\python.exe +@IF NOT "%SBS_PYTHON%"=="" GOTO sbspython +@IF EXIST %__LOCAL_PYTHON__% GOTO localpython +@SET __PYTHON__=python.exe +@GOTO sbspythonpath + +:sbspython @SET __PYTHON__=%SBS_PYTHON% -@IF "%__PYTHON__%"=="" SET __PYTHON__=%SBS_HOME%\win32\python264\python.exe -@SET PYTHONPATH=%SBS_PYTHONPATH% -@IF "%PYTHONPATH%"=="" SET PYTHONPATH=%SBS_HOME%\win32\python264 +@GOTO sbspythonpath + +:localpython +@SET __PYTHON__=%__LOCAL_PYTHON__% +@SET PYTHONPATH= + +:sbspythonpath +@IF NOT "%SBS_PYTHONPATH%"=="" SET PYTHONPATH=%SBS_PYTHONPATH% @REM Use the mingw set by the environment if possible @SET __MINGW__=%SBS_MINGW%