591
|
1 |
@REM
|
|
2 |
@REM Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
@REM All rights reserved.
|
|
4 |
@REM This component and the accompanying materials are made available
|
|
5 |
@REM under the terms of the License "Eclipse Public License v1.0"
|
|
6 |
@REM which accompanies this distribution, and is available
|
|
7 |
@REM at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
@REM
|
|
9 |
@REM Initial Contributors:
|
|
10 |
@REM Nokia Corporation - initial contribution.
|
|
11 |
@REM
|
|
12 |
@REM Contributors:
|
|
13 |
@REM
|
|
14 |
@REM Description:
|
|
15 |
@REM
|
|
16 |
|
|
17 |
@SET HOSTPLATFORM=win 32
|
|
18 |
@SET HOSTPLATFORM_DIR=win32
|
674
|
19 |
@SET HOSTPLATFORM32_DIR=win32
|
591
|
20 |
|
|
21 |
@REM Automatically find SBS_HOME if it is not set
|
|
22 |
@IF NOT "%SBS_HOME%"=="" GOTO foundhome
|
|
23 |
@SET RAPTORBINDIR=%~dp0
|
|
24 |
@SET WD=%CD%
|
|
25 |
@CD /d %RAPTORBINDIR%\..
|
|
26 |
@SET SBS_HOME=%CD%
|
|
27 |
@CD /d %WD%
|
|
28 |
:foundhome
|
|
29 |
|
|
30 |
@REM The python and PYTHONPATH used by Raptor are determined by, in order of precedence:
|
|
31 |
@REM 1. the SBS_PYTHON and SBS_PYTHONPATH environment variables (if set)
|
|
32 |
@REM 2. the python shipped locally with Raptor (if present)
|
|
33 |
@REM 3. the python on the system PATH and the PYTHONPATH set in the system environment
|
|
34 |
|
|
35 |
@SET __LOCAL_PYTHON__=%SBS_HOME%\win32\python264\python.exe
|
|
36 |
@IF NOT "%SBS_PYTHON%"=="" GOTO sbspython
|
|
37 |
@IF EXIST %__LOCAL_PYTHON__% GOTO localpython
|
|
38 |
@SET __PYTHON__=python.exe
|
|
39 |
@GOTO sbspythonpath
|
|
40 |
|
|
41 |
:sbspython
|
|
42 |
@SET __PYTHON__=%SBS_PYTHON%
|
|
43 |
@GOTO sbspythonpath
|
|
44 |
|
|
45 |
:localpython
|
|
46 |
@SET __PYTHON__=%__LOCAL_PYTHON__%
|
|
47 |
@SET SBS_PYTHON=%__PYTHON__%
|
|
48 |
@SET PYTHONPATH=
|
|
49 |
|
|
50 |
:sbspythonpath
|
|
51 |
@IF NOT "%SBS_PYTHONPATH%"=="" SET PYTHONPATH=%SBS_PYTHONPATH%
|
|
52 |
|
|
53 |
@REM Use the mingw set by the environment if possible
|
|
54 |
@SET __MINGW__=%SBS_MINGW%
|
|
55 |
@IF "%__MINGW__%"=="" SET __MINGW__=%SBS_HOME%\win32\mingw
|
|
56 |
|
|
57 |
@REM Tell CYGWIN not to map unix security attributes to windows to
|
|
58 |
@REM prevent raptor from potentially creating read-only files.
|
|
59 |
@REM Assume Cygwin 1.5 CLI.
|
|
60 |
@SET __MOUNTOPTIONS__=-u
|
|
61 |
@SET __UMOUNTOPTIONS__=-u
|
|
62 |
@SET CYGWIN=nontsec nosmbntsec
|
|
63 |
|
|
64 |
@REM If SBS_CYGWIN17 is set, we are using Cygwin 1.7, so change the mount/umount
|
|
65 |
@REM options to the 1.7 CLI and set SBS_CYGWIN to the value of SBS_CYGWIN17
|
|
66 |
@IF NOT "%SBS_CYGWIN17%" == "" SET CYGWIN=nodosfilewarning && SET "SBS_CYGWIN=%SBS_CYGWIN17%" && SET __MOUNTOPTIONS__=-o noacl -o user && SET __UMOUNTOPTIONS__=
|
|
67 |
|
|
68 |
@REM Use the Cygwin set by the environment (from SBS_CYGWIN or SBS_CYGWIN17) if possible
|
|
69 |
@SET __CYGWIN__=%SBS_CYGWIN%
|
|
70 |
@IF "%__CYGWIN__%"=="" SET __CYGWIN__=%SBS_HOME%\win32\cygwin
|
|
71 |
|
|
72 |
@REM Add to the search path
|
|
73 |
@REM (make sure that we don't get into trouble if there are Path and PATH variables)
|
|
74 |
@SET PATH_TEMP=%__MINGW__%\bin;%__CYGWIN__%\bin;%SBS_HOME%\win32\bin;%PATH%
|
|
75 |
@SET PATH=
|
|
76 |
@SET PATH=%PATH_TEMP%
|
|
77 |
@SET PATH_TEMP=
|
|
78 |
|
|
79 |
@REM Make sure that /tmp is not set incorrectly for sbs.
|
|
80 |
@umount %__UMOUNTOPTIONS__% /tmp >NUL 2>NUL
|
|
81 |
@mount %__MOUNTOPTIONS__% %TEMP% /tmp >NUL 2>NUL
|
|
82 |
@umount %__UMOUNTOPTIONS__% / >NUL 2>NUL
|
|
83 |
@mount %__MOUNTOPTIONS__% %__CYGWIN__% / >NUL 2>NUL
|
|
84 |
|