sbsv2/raptor/bin/sbs_env.bat
author jascui
Tue, 16 Nov 2010 15:56:27 +0800
changeset 683 8e0eb519ef53
parent 591 22486c9c7b15
child 674 37ee82a83d43
permissions -rw-r--r--
Solve incorrect handling of ExportName=SymbolName@Ordinal syntax
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
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    19
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    20
@REM Automatically find SBS_HOME if it is not set
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    21
@IF NOT "%SBS_HOME%"=="" GOTO foundhome
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    22
@SET RAPTORBINDIR=%~dp0
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    23
@SET WD=%CD%
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    24
@CD /d %RAPTORBINDIR%\..
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    25
@SET SBS_HOME=%CD%
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    26
@CD /d %WD%
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    27
:foundhome 
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    28
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    29
@REM The python and PYTHONPATH used by Raptor are determined by, in order of precedence:
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    30
@REM 1. the SBS_PYTHON and SBS_PYTHONPATH environment variables (if set)
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    31
@REM 2. the python shipped locally with Raptor (if present)
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    32
@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
    33
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    34
@SET __LOCAL_PYTHON__=%SBS_HOME%\win32\python264\python.exe
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    35
@IF NOT "%SBS_PYTHON%"=="" GOTO sbspython
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    36
@IF EXIST %__LOCAL_PYTHON__% GOTO localpython
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    37
@SET __PYTHON__=python.exe
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    38
@GOTO sbspythonpath
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    39
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    40
:sbspython
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    41
@SET __PYTHON__=%SBS_PYTHON%
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    42
@GOTO sbspythonpath
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    43
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    44
:localpython
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    45
@SET __PYTHON__=%__LOCAL_PYTHON__%
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    46
@SET SBS_PYTHON=%__PYTHON__%
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    47
@SET PYTHONPATH=
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    48
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    49
:sbspythonpath
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    50
@IF NOT "%SBS_PYTHONPATH%"=="" SET PYTHONPATH=%SBS_PYTHONPATH%
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    51
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    52
@REM Use the mingw set by the environment if possible
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    53
@SET __MINGW__=%SBS_MINGW%
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    54
@IF "%__MINGW__%"=="" SET __MINGW__=%SBS_HOME%\win32\mingw
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    55
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    56
@REM Tell CYGWIN not to map unix security attributes to windows to
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    57
@REM prevent raptor from potentially creating read-only files.
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    58
@REM Assume Cygwin 1.5 CLI.
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    59
@SET __MOUNTOPTIONS__=-u
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    60
@SET __UMOUNTOPTIONS__=-u
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    61
@SET CYGWIN=nontsec nosmbntsec
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    62
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    63
@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
    64
@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
    65
@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
    66
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    67
@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
    68
@SET __CYGWIN__=%SBS_CYGWIN%
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    69
@IF "%__CYGWIN__%"=="" SET __CYGWIN__=%SBS_HOME%\win32\cygwin
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    70
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    71
@REM Add to the search path
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    72
@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
    73
@SET PATH_TEMP=%__MINGW__%\bin;%__CYGWIN__%\bin;%SBS_HOME%\win32\bin;%PATH%
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    74
@SET PATH=
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    75
@SET PATH=%PATH_TEMP%
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    76
@SET PATH_TEMP=
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    77
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    78
@REM Make sure that /tmp is not set incorrectly for sbs. 
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    79
@umount %__UMOUNTOPTIONS__% /tmp >NUL  2>NUL
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    80
@mount %__MOUNTOPTIONS__% %TEMP% /tmp >NUL 2>NUL
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    81
@umount %__UMOUNTOPTIONS__% / >NUL  2>NUL
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    82
@mount %__MOUNTOPTIONS__% %__CYGWIN__% / >NUL 2>NUL
22486c9c7b15 raptor v2.14.0
jjkang
parents:
diff changeset
    83