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