buildframework/helium/external/helium-antlib/sysdef/bld.bat
author Shabe Razvi <shaber@symbian.org>
Tue, 13 Jul 2010 18:36:46 +0100
branchhelium-7.0.x
changeset 615 23ca302eb377
parent 179 d8ac696cc51f
permissions -rw-r--r--
Add prebuilt jar for changes in Bug 3222
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     1
@echo off
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     2
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     3
rem
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     4
rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     5
rem All rights reserved.
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     6
rem This component and the accompanying materials are made available
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     7
rem under the terms of the License "Eclipse Public License v1.0"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     8
rem which accompanies this distribution, and is available
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     9
rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    10
rem
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    11
rem Initial Contributors:
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    12
rem Nokia Corporation - initial contribution.
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    13
rem
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    14
rem Contributors:
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    15
rem
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    16
rem Description: 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    17
rem
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    18
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    19
setlocal
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    20
if not defined JAVA_6_HOME (
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    21
set TESTED_JAVA=C:\Apps\j2sdk_1.6.0_02
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    22
) ELSE  set TESTED_JAVA=%JAVA_6_HOME%
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    23
if exist %TESTED_JAVA% (set JAVA_HOME=%TESTED_JAVA%)
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    24
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    25
REM Configure Ant 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    26
if not defined TESTED_ANT_HOME (
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    27
set TESTED_ANT_HOME=C:\Apps\ant_1.7
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    28
) 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    29
if exist %TESTED_ANT_HOME% (set ANT_HOME=%TESTED_ANT_HOME%)
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    30
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    31
REM Configure the expected Ant Version details below
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    32
SET expMajorVer=1
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    33
SET expMinorVer=7
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    34
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    35
rem *** Verify Ant Version ***
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    36
rem -- Run the 'ant -version' command and capture the output to a variable 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    37
for /f "tokens=*" %%a in ('ant -version') do (set antversion=%%a)
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    38
echo *** Installed Version : %antversion%
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    39
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    40
rem -- Parse the version string obtained above and get the version number
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    41
for /f "tokens=4 delims= " %%a in ("%antversion%") do set val=%%a
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    42
rem -- Parse the version number delimiting the '.' and set the major and
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    43
rem    minor versions
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    44
for /f "tokens=1-2 delims=." %%a in ("%val%") do (
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    45
set /A majorVersion=%%a
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    46
set /A minorVersion=%%b
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    47
)
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    48
rem -- Check whether major version is greater than or equal to the expected.
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    49
if %majorVersion% geq %expMajorVer% ( 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    50
rem -- if major version is valid, check minor version. If minor version is less
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    51
rem    than expected display message and abort the execution.
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    52
if %minorVersion% lss %expMinorVer% (echo *** Incorrect version of Ant found. Please check you have atleast Ant 1.7.0 & goto :errorstop ) 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    53
)
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    54
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    55
ant %*
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    56
endlocal
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    57
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    58
:errorstop
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    59
@echo *** Build aborted with error
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    60
exit /b 1