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