13 @rem |
13 @rem |
14 @rem Description: |
14 @rem Description: |
15 @rem |
15 @rem |
16 |
16 |
17 @SETLOCAL |
17 @SETLOCAL |
18 @SET HOSTPLATFORM=win 32 |
18 @CALL "%~dp0sbs_env.bat" |
19 @SET HOSTPLATFORM_DIR=win32 |
|
20 |
|
21 |
|
22 @REM Automatically find SBS_HOME if it is not set |
|
23 @IF NOT "%SBS_HOME%"=="" goto foundhome |
|
24 @SET RAPTORBINDIR=%~dp0 |
|
25 @SET WD=%cd% |
|
26 @cd /d %RAPTORBINDIR%\.. |
|
27 @SET SBS_HOME=%cd% |
|
28 @cd /d %WD% |
|
29 :foundhome |
|
30 |
|
31 @REM The python and PYTHONPATH used by Raptor are determined by, in order of precedence: |
|
32 @REM 1. the SBS_PYTHON and SBS_PYTHONPATH environment variables (if set) |
|
33 @REM 2. the python shipped locally with Raptor (if present) |
|
34 @REM 3. the python on the system PATH and the PYTHONPATH set in the system environment |
|
35 |
|
36 @SET __LOCAL_PYTHON__=%SBS_HOME%\win32\python264\python.exe |
|
37 @IF NOT "%SBS_PYTHON%"=="" GOTO sbspython |
|
38 @IF EXIST %__LOCAL_PYTHON__% GOTO localpython |
|
39 @SET __PYTHON__=python.exe |
|
40 @GOTO sbspythonpath |
|
41 |
|
42 :sbspython |
|
43 @SET __PYTHON__=%SBS_PYTHON% |
|
44 @GOTO sbspythonpath |
|
45 |
|
46 :localpython |
|
47 @SET __PYTHON__=%__LOCAL_PYTHON__% |
|
48 @SET SBS_PYTHON=%__PYTHON__% |
|
49 @SET PYTHONPATH= |
|
50 |
|
51 :sbspythonpath |
|
52 @IF NOT "%SBS_PYTHONPATH%"=="" SET PYTHONPATH=%SBS_PYTHONPATH% |
|
53 |
|
54 @REM Use the mingw set by the environment if possible |
|
55 @SET __MINGW__=%SBS_MINGW% |
|
56 @IF "%__MINGW__%"=="" SET __MINGW__=%SBS_HOME%\win32\mingw |
|
57 |
|
58 @REM Use the cygwin set by the environment if possible |
|
59 @SET __CYGWIN__=%SBS_CYGWIN% |
|
60 @IF "%__CYGWIN__%"=="" SET __CYGWIN__=%SBS_HOME%\win32\cygwin |
|
61 |
|
62 @REM add to the search path |
|
63 @REM (make sure that we don't get into trouble if there are Path and PATH variables) |
|
64 @SET PATH_TEMP=%__MINGW__%\bin;%__CYGWIN__%\bin;%SBS_HOME%\win32\bin;%PATH% |
|
65 @SET PATH= |
|
66 @SET PATH=%PATH_TEMP% |
|
67 @SET PATH_TEMP= |
|
68 |
|
69 @REM Make sure that /tmp is not set incorrectly for sbs |
|
70 @umount -u /tmp >NUL 2>NUL |
|
71 @mount -u %TEMP% /tmp >NUL 2>NUL |
|
72 @umount -u / >NUL 2>NUL |
|
73 @mount -u %__CYGWIN__% / >NUL 2>NUL |
|
74 |
|
75 @REM Tell CYGWIN not to map unix security attributes to windows to |
|
76 @REM prevent raptor from potentially creating read-only files: |
|
77 @SET CYGWIN=nontsec nosmbntsec |
|
78 |
19 |
79 @REM Run Raptor with all the arguments. |
20 @REM Run Raptor with all the arguments. |
80 @%__PYTHON__% %SBS_HOME%\python\raptor_start.py %* |
21 @%__PYTHON__% %SBS_HOME%\python\raptor_start.py %* |
81 |
22 |
82 @ENDLOCAL |
23 @ENDLOCAL |