author | srilekhas |
Fri, 08 Oct 2010 21:02:28 +0100 | |
changeset 650 | 8f038057ffa5 |
parent 645 | b8d81fa19e7d |
permissions | -rw-r--r-- |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
1 |
@echo off |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
2 |
|
645 | 3 |
rem |
4 |
rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
5 |
rem All rights reserved. |
|
6 |
rem This component and the accompanying materials are made available |
|
7 |
rem under the terms of the License "Eclipse Public License v1.0" |
|
8 |
rem which accompanies this distribution, and is available |
|
9 |
rem at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
10 |
rem |
|
11 |
rem Initial Contributors: |
|
12 |
rem Nokia Corporation - initial contribution. |
|
13 |
rem |
|
14 |
rem Contributors: |
|
15 |
rem |
|
16 |
rem Description: |
|
17 |
rem |
|
18 |
||
19 |
setlocal |
|
20 |
||
21 |
REM Set the Helium location |
|
22 |
REM Make sure the path is not ending with a backslash! |
|
23 |
if not defined HELIUM_HOME ( |
|
24 |
set HELIUM_HOME_TEMP=%~dp0 |
|
25 |
) |
|
26 |
if not defined HELIUM_HOME ( |
|
27 |
set HELIUM_HOME=%HELIUM_HOME_TEMP:~0,-1% |
|
28 |
) |
|
217 | 29 |
|
645 | 30 |
rem Loading runtime environment tools |
31 |
if exist "%HELIUM_HOME%\runtime\runtime_env.bat" ( |
|
32 |
call %HELIUM_HOME%\runtime\runtime_env.bat |
|
33 |
) |
|
34 |
||
35 |
if not exist "%HELIUM_HOME%\extensions\nokia\build.xml" ( |
|
36 |
set HLM_SUBCON=1 |
|
37 |
set HLM_DISABLE_INTERNAL_DATA=1 |
|
38 |
) |
|
39 |
||
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
40 |
|
645 | 41 |
REM Configure Java |
42 |
if not defined JAVA_6_HOME ( |
|
43 |
set TESTED_JAVA=C:\Apps\j2sdk_1.6.0_02 |
|
44 |
) ELSE set TESTED_JAVA=%JAVA_6_HOME% |
|
45 |
if exist "%TESTED_JAVA%" (set JAVA_HOME=%TESTED_JAVA%) |
|
46 |
if not exist "%JAVA_HOME%" ( echo *** Java cannot be found & goto :errorstop ) |
|
47 |
set PATH=%JAVA_HOME%\bin;%PATH% |
|
48 |
||
49 |
REM Needed by python logging |
|
50 |
set PID=1 |
|
51 |
perl "%HELIUM_HOME%\tools\common\bin\getppid.pl" > "%TEMP%\%USERNAME%pid.txt" |
|
52 |
set /p PID=< "%TEMP%\%USERNAME%pid.txt" |
|
53 |
||
54 |
REM Configure Apache Ant |
|
55 |
if not defined TESTED_ANT ( |
|
56 |
set TESTED_ANT=C:\APPS\ant_1.7 |
|
57 |
) |
|
58 |
if exist "%TESTED_ANT%" (set ANT_HOME=%TESTED_ANT%) |
|
59 |
if not exist "%ANT_HOME%" ( echo *** Ant cannot be found & goto :errorstop ) |
|
60 |
||
61 |
set SIGNALING_ANT_ARGS= -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor |
|
62 |
set LOGGING_ANT_ARGS= -listener com.nokia.helium.logger.ant.listener.CommonListener |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
63 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
64 |
if not defined HLM_DISABLE_INTERNAL_DATA ( |
217 | 65 |
set INTERNAL_DATA_ANT_ARGS= -listener com.nokia.helium.internaldata.ant.listener.Listener |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
66 |
) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
67 |
|
217 | 68 |
|
69 |
REM Configure listener to generate target times csv file. |
|
70 |
REM **Note: Comment below line if you want to skip the target times csv file generation |
|
71 |
set TARGET_TIMES_GENERATOR= -listener com.nokia.helium.core.ant.listener.TargetTimesLogGeneratorListener |
|
72 |
||
73 |
||
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
74 |
if not defined ANT_ARGS ( |
645 | 75 |
set ANT_ARGS=-lib "%HELIUM_HOME%\external\antlibs2" -logger com.nokia.helium.core.ant.HeliumLogger %INTERNAL_DATA_ANT_ARGS% %SIGNALING_ANT_ARGS% %LOGGING_ANT_ARGS% %TARGET_TIMES_GENERATOR% -listener com.nokia.helium.environment.ant.listener.ExecListener |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
76 |
) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
77 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
78 |
REM Shall we impose the EPOCROOT? |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
79 |
if not defined EPOCROOT ( |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
80 |
set EPOCROOT=\ |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
81 |
) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
82 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
83 |
REM Symbian Build area path related settings |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
84 |
set PATH=%PATH%;%EPOCROOT%epoc32\tools;%EPOCROOT%epoc32\gcc\bin;%EPOCROOT%epoc32\tools\build;%EPOCROOT%epoc32\rombuild |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
85 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
86 |
set PATH=%PATH%;%HELIUM_HOME%\extensions\nokia\external\unxutils |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
87 |
set PATH=%PATH%;%HELIUM_HOME%\extensions\nokia\external\Subversion\bin |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
88 |
set PATH=%PATH%;%HELIUM_HOME%\extensions\nokia\external\graphviz\bin |
179 | 89 |
|
90 |
for /f "tokens=2" %%a in ('"python -V 2>&1"') do (set pythonversion=%%a) |
|
91 |
for /f "tokens=1-2 delims=." %%a in ("%pythonversion%") do (set pythonversion=%%a.%%b) |
|
92 |
||
587 | 93 |
set PYTHONPATH=%HELIUM_HOME%\external\python\lib\auto;%HELIUM_HOME%\external\python\lib\%pythonversion% |
628 | 94 |
set PYTHONPATH=%PYTHONPATH%;%HELIUM_HOME%\external\python\lib\common |
179 | 95 |
set PYTHONPATH=%PYTHONPATH%;%HELIUM_HOME%\extensions\nokia\external\python\lib\%pythonversion% |
628 | 96 |
set PYTHONPATH=%PYTHONPATH%;%SBS_HOME%\python |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
97 |
set PERL5LIB=%HELIUM_HOME%\tools\common\packages |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
98 |
set COPYCMD=/y |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
99 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
100 |
REM Should be done that SYMSEE? |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
101 |
set PATH=%PATH%;C:\APPS\ctc |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
102 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
103 |
REM Nokia specific |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
104 |
set HOME=h:\ |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
105 |
set ARMROOT=\ |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
106 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
107 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
108 |
REM Manage RVCT switching. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
109 |
if defined HLM_RVCT_VERSION ( |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
110 |
if not exist "C:\APPS\rvct%HLM_RVCT_VERSION%\rvctcmdprompt.bat" ( echo *** "C:\APPS\rvct%HLM_RVCT_VERSION%\rvctcmdprompt.bat" cannot be found & goto :errorstop ) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
111 |
call "C:\APPS\rvct%HLM_RVCT_VERSION%\rvctcmdprompt.bat" > nul |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
112 |
) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
113 |
TITLE Helium |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
114 |
|
587 | 115 |
if not exist "%HELIUM_HOME%\external\antlibs2\helium-checktools-1.0.jar" ( |
588 | 116 |
echo *** Error: Please build helium from nokia_builder or builder dir run "bld && bld get-deps" |
217 | 117 |
goto errorstop |
118 |
) |
|
119 |
||
587 | 120 |
call "%JAVA_HOME%\bin\java" -cp "%HELIUM_HOME%\external\antlibs2\helium-checktools-1.0.jar" com.nokia.helium.checktools.HeliumToolsCheckerMain -config "%HELIUM_HOME%\config\helium.basic.tools.config" |
588 | 121 |
if not defined HLM_DISABLE_TOOL_CHECK ( |
587 | 122 |
if "%ERRORLEVEL%" neq "0" (goto errorstop) |
588 | 123 |
) |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
124 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
125 |
REM Call the Helium generated batch file if it exists |
179 | 126 |
if defined JOB_ID ( |
628 | 127 |
set HELIUM_CACHE_DIR="%TEMP%\helium\%USERNAME%\%JOB_ID%" |
128 |
)ELSE set HELIUM_CACHE_DIR="%TEMP%\helium\%USERNAME%" |
|
179 | 129 |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
130 |
if not exist %HELIUM_CACHE_DIR% ( |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
131 |
md %HELIUM_CACHE_DIR% |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
132 |
) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
133 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
134 |
REM pass cache dir to a property for log4j log file |
628 | 135 |
if not defined ANT_OPTS ( |
645 | 136 |
set ANT_OPTS=%HLM_OPTS% -Xmx896M -Dlog4j.configuration=com/nokia/log4j.xml -Dlog4j.cache.dir=%HELIUM_CACHE_DIR% -Dpython.verbose=warning -Dpython.cachedir=%HELIUM_CACHE_DIR%\cachedir |
628 | 137 |
call "%HELIUM_HOME%\external\python\configure_jython.bat" |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
138 |
) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
139 |
|
628 | 140 |
call ant -Dhelium.dir="%HELIUM_HOME%" -Dcache.dir=%HELIUM_CACHE_DIR% %* |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
141 |
|
645 | 142 |
|
143 |
||
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
144 |
endlocal |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
145 |
goto :eof |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
146 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
147 |
:errorstop |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
148 |
@echo *** Build aborted with error |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
149 |
exit /b 1 |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
150 |
|
217 | 151 |