sbsv2/raptor/bin/sbs.bat
branchfix
changeset 456 f9d258cee458
parent 380 db59fc762214
--- a/sbsv2/raptor/bin/sbs.bat	Tue Mar 30 20:25:06 2010 +0100
+++ b/sbsv2/raptor/bin/sbs.bat	Wed Apr 07 12:26:04 2010 +0100
@@ -15,66 +15,7 @@
 @rem
 
 @SETLOCAL
-@SET HOSTPLATFORM=win 32
-@SET HOSTPLATFORM_DIR=win32
-
-
-@REM Automatically find SBS_HOME if it is not set
-@IF NOT "%SBS_HOME%"==""  goto foundhome
-@SET RAPTORBINDIR=%~dp0
-@SET WD=%cd%
-@cd /d %RAPTORBINDIR%\..
-@SET SBS_HOME=%cd%
-@cd /d %WD%
-:foundhome 
-
-@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%
-@GOTO sbspythonpath
-
-:localpython
-@SET __PYTHON__=%__LOCAL_PYTHON__%
-@SET SBS_PYTHON=%__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%
-@IF "%__MINGW__%"=="" SET __MINGW__=%SBS_HOME%\win32\mingw
-
-@REM Use the cygwin set by the environment if possible
-@SET __CYGWIN__=%SBS_CYGWIN%
-@IF "%__CYGWIN__%"=="" SET __CYGWIN__=%SBS_HOME%\win32\cygwin
-
-@REM add to the search path
-@REM (make sure that we don't get into trouble if there are Path and PATH variables)
-@SET PATH_TEMP=%__MINGW__%\bin;%__CYGWIN__%\bin;%SBS_HOME%\win32\bin;%PATH%
-@SET PATH=
-@SET PATH=%PATH_TEMP%
-@SET PATH_TEMP=
-
-@REM Make sure that /tmp is not set incorrectly for sbs
-@umount -u /tmp >NUL  2>NUL
-@mount -u %TEMP% /tmp >NUL 2>NUL
-@umount -u / >NUL  2>NUL
-@mount -u %__CYGWIN__% / >NUL 2>NUL
-
-@REM Tell CYGWIN not to map unix security attributes to windows to
-@REM prevent raptor from potentially creating read-only files:
-@SET CYGWIN=nontsec nosmbntsec
+@CALL "%~dp0sbs_env.bat"
 
 @REM Run Raptor with all the arguments.
 @%__PYTHON__% %SBS_HOME%\python\raptor_start.py %*