602
|
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
|
|
19 |
|
|
20 |
@REM Automatically find SBS_HOME if it is not set
|
|
21 |
@IF NOT "%SBS_HOME%"=="" GOTO foundhome
|
|
22 |
@SET RAPTORBINDIR=%~dp0
|
|
23 |
@SET WD=%CD%
|
|
24 |
@CD /d %RAPTORBINDIR%\..
|
|
25 |
@SET SBS_HOME=%CD%
|
|
26 |
@CD /d %WD%
|
|
27 |
:foundhome
|
|
28 |
|
|
29 |
@REM The python and PYTHONPATH used by Raptor are determined by, in order of precedence:
|
|
30 |
@REM 1. the SBS_PYTHON and SBS_PYTHONPATH environment variables (if set)
|
|
31 |
@REM 2. the python shipped locally with Raptor (if present)
|
|
32 |
@REM 3. the python on the system PATH and the PYTHONPATH set in the system environment
|
|
33 |
|
|
34 |
@SET __LOCAL_PYTHON__=%SBS_HOME%\win32\python264\python.exe
|
|
35 |
@IF NOT "%SBS_PYTHON%"=="" GOTO sbspython
|
|
36 |
@IF EXIST %__LOCAL_PYTHON__% GOTO localpython
|
|
37 |
@SET __PYTHON__=python.exe
|
|
38 |
@GOTO sbspythonpath
|
|
39 |
|
|
40 |
:sbspython
|
|
41 |
@SET __PYTHON__=%SBS_PYTHON%
|
|
42 |
@GOTO sbspythonpath
|
|
43 |
|
|
44 |
:localpython
|
|
45 |
@SET __PYTHON__=%__LOCAL_PYTHON__%
|
|
46 |
@SET SBS_PYTHON=%__PYTHON__%
|
|
47 |
@SET PYTHONPATH=
|
|
48 |
|
|
49 |
:sbspythonpath
|
|
50 |
@IF NOT "%SBS_PYTHONPATH%"=="" SET PYTHONPATH=%SBS_PYTHONPATH%
|
|
51 |
|
|
52 |
@REM Use the mingw set by the environment if possible
|
|
53 |
@SET __MINGW__=%SBS_MINGW%
|
|
54 |
@IF "%__MINGW__%"=="" SET __MINGW__=%SBS_HOME%\win32\mingw
|
|
55 |
|
|
56 |
@REM Tell CYGWIN not to map unix security attributes to windows to
|
|
57 |
@REM prevent raptor from potentially creating read-only files.
|
|
58 |
@REM Assume Cygwin 1.5 CLI.
|
|
59 |
@SET __MOUNTOPTIONS__=-u
|
|
60 |
@SET __UMOUNTOPTIONS__=-u
|
|
61 |
@SET CYGWIN=nontsec nosmbntsec
|
|
62 |
|
|
63 |
@REM If SBS_CYGWIN17 is set, we are using Cygwin 1.7, so change the mount/umount
|
|
64 |
@REM options to the 1.7 CLI and set SBS_CYGWIN to the value of SBS_CYGWIN17
|
|
65 |
@IF NOT "%SBS_CYGWIN17%" == "" SET CYGWIN=nodosfilewarning && SET "SBS_CYGWIN=%SBS_CYGWIN17%" && SET __MOUNTOPTIONS__=-o noacl -o user && SET __UMOUNTOPTIONS__=
|
|
66 |
|
|
67 |
@REM Use the Cygwin set by the environment (from SBS_CYGWIN or SBS_CYGWIN17) if possible
|
|
68 |
@SET __CYGWIN__=%SBS_CYGWIN%
|
|
69 |
@IF "%__CYGWIN__%"=="" SET __CYGWIN__=%SBS_HOME%\win32\cygwin
|
|
70 |
|
|
71 |
@REM Add to the search path
|
|
72 |
@REM (make sure that we don't get into trouble if there are Path and PATH variables)
|
|
73 |
@SET PATH_TEMP=%__MINGW__%\bin;%__CYGWIN__%\bin;%SBS_HOME%\win32\bin;%PATH%
|
|
74 |
@SET PATH=
|
|
75 |
@SET PATH=%PATH_TEMP%
|
|
76 |
@SET PATH_TEMP=
|
|
77 |
|
|
78 |
@REM Make sure that /tmp is not set incorrectly for sbs.
|
|
79 |
@umount %__UMOUNTOPTIONS__% /tmp >NUL 2>NUL
|
|
80 |
@mount %__MOUNTOPTIONS__% %TEMP% /tmp >NUL 2>NUL
|
|
81 |
@umount %__UMOUNTOPTIONS__% / >NUL 2>NUL
|
|
82 |
@mount %__MOUNTOPTIONS__% %__CYGWIN__% / >NUL 2>NUL
|
|
83 |
|