sbsv2/raptor/bin/sbs_env.bat
author Daniel Jacobs <daniel.jacobs@nokia.com>
Wed, 19 May 2010 14:17:41 +0100
changeset 556 8e705bc1286f
parent 405 2fda6cb4a812
permissions -rw-r--r--
Added tag 2.14.0 for changeset e7dd8533063f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
344
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
     1
@REM
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
     2
@REM Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
     3
@REM All rights reserved.
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
     4
@REM This component and the accompanying materials are made available
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
     5
@REM under the terms of the License "Eclipse Public License v1.0"
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
     6
@REM which accompanies this distribution, and is available
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
     7
@REM at the URL "http://www.eclipse.org/legal/epl-v10.html".
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
     8
@REM
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
     9
@REM Initial Contributors:
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
    10
@REM Nokia Corporation - initial contribution.
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
    11
@REM
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
    12
@REM Contributors:
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
    13
@REM
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
    14
@REM Description: 
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
    15
@REM
335
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
345
74a770b7bca3 Apply review comments to tidy up sbs_env.bat.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 344
diff changeset
    21
@IF NOT "%SBS_HOME%"=="" GOTO foundhome
335
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    22
@SET RAPTORBINDIR=%~dp0
345
74a770b7bca3 Apply review comments to tidy up sbs_env.bat.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 344
diff changeset
    23
@SET WD=%CD%
74a770b7bca3 Apply review comments to tidy up sbs_env.bat.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 344
diff changeset
    24
@CD /d %RAPTORBINDIR%\..
74a770b7bca3 Apply review comments to tidy up sbs_env.bat.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 344
diff changeset
    25
@SET SBS_HOME=%CD%
74a770b7bca3 Apply review comments to tidy up sbs_env.bat.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 344
diff changeset
    26
@CD /d %WD%
335
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__%
405
2fda6cb4a812 merge correction
Jon Chatten
parents: 380
diff changeset
    46
@SET SBS_PYTHON=%__PYTHON__%
342
f0e42ff3359f catch up to 2.12.4
Richard Taylor <richard.i.taylor@nokia.com>
parents: 339
diff changeset
    47
@SET PYTHONPATH=
f0e42ff3359f catch up to 2.12.4
Richard Taylor <richard.i.taylor@nokia.com>
parents: 339
diff changeset
    48
f0e42ff3359f catch up to 2.12.4
Richard Taylor <richard.i.taylor@nokia.com>
parents: 339
diff changeset
    49
:sbspythonpath
f0e42ff3359f catch up to 2.12.4
Richard Taylor <richard.i.taylor@nokia.com>
parents: 339
diff changeset
    50
@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
    51
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    52
@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
    53
@SET __MINGW__=%SBS_MINGW%
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    54
@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
    55
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    56
@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
    57
@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
    58
@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
    59
@SET __MOUNTOPTIONS__=-u
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    60
@SET __UMOUNTOPTIONS__=-u
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    61
@SET CYGWIN=nontsec nosmbntsec
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    62
344
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
    63
@REM If SBS_CYGWIN17 is set, we are using Cygwin 1.7, so change the mount/umount 
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
    64
@REM options to the 1.7 CLI and set SBS_CYGWIN to the value of SBS_CYGWIN17
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
    65
@IF NOT "%SBS_CYGWIN17%" == "" SET CYGWIN=nodosfilewarning && SET "SBS_CYGWIN=%SBS_CYGWIN17%" && SET __MOUNTOPTIONS__=-o noacl -o user && SET __UMOUNTOPTIONS__=
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
    66
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
    67
@REM Use the Cygwin set by the environment (from SBS_CYGWIN or SBS_CYGWIN17) if possible
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
    68
@SET __CYGWIN__=%SBS_CYGWIN%
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
    69
@IF "%__CYGWIN__%"=="" SET __CYGWIN__=%SBS_HOME%\win32\cygwin
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
    70
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
    71
@REM Add to the search path
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
    72
@REM (make sure that we don't get into trouble if there are Path and PATH variables)
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
    73
@SET PATH_TEMP=%__MINGW__%\bin;%__CYGWIN__%\bin;%SBS_HOME%\win32\bin;%PATH%
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
    74
@SET PATH=
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
    75
@SET PATH=%PATH_TEMP%
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
    76
@SET PATH_TEMP=
10ea2b2170d3 Update Cygwin 1.7 support for certain situations.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 342
diff changeset
    77
335
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    78
@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
    79
@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
    80
@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
    81
@umount %__UMOUNTOPTIONS__% / >NUL  2>NUL
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    82
@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
    83