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