sbsv2/raptor/bin/sbs_env.bat
author Daniel Jacobs <daniel.jacobs@nokia.com>
Fri, 19 Feb 2010 16:27:36 +0000
branchwip
changeset 338 9372474d4b07
parent 335 e69156db0290
child 339 66bd520416ef
permissions -rw-r--r--
Updates to Raptor Windows installer maker tool.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    29
@REM Use the python 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
    30
@SET __PYTHON__=%SBS_PYTHON%
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    31
@IF "%__PYTHON__%"=="" SET __PYTHON__=%SBS_HOME%\win32\python264\python.exe
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    32
@SET PYTHONPATH=%SBS_PYTHONPATH%
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    33
@IF "%PYTHONPATH%"=="" SET PYTHONPATH=%SBS_HOME%\win32\python264
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    34
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    35
@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
    36
@SET __MINGW__=%SBS_MINGW%
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    37
@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
    38
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    39
@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
    40
@SET __CYGWIN__=%SBS_CYGWIN%
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    41
@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
    42
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    43
@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
    44
@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
    45
@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
    46
@SET PATH=
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    47
@SET PATH=%PATH_TEMP%
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    48
@SET PATH_TEMP=
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    49
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    50
@REM Tell CYGWIN not to map unix security attributes to windows to
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    51
@REM prevent raptor from potentially creating read-only files:
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    52
@REM
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    53
@REM
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    54
@REM
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 Assume Cygwin 1.5 CLI.
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    57
@SET __MOUNTOPTIONS__=-u
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    58
@SET __UMOUNTOPTIONS__=-u
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    59
@SET CYGWIN=nontsec nosmbntsec
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    60
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    61
@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
    62
@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
    63
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    64
@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
    65
@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
    66
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    67
@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
    68
@umount %__UMOUNTOPTIONS__% / >NUL  2>NUL
e69156db0290 Add sbs_env.bat for Cygwin 1.7 support.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
diff changeset
    69
@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
    70