1 @echo off |
1 @echo off |
2 |
2 |
3 rem |
3 rem if not defined HELIUM_HOME set HELIUM_HOME=%~dp0..\..\..\helium |
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 |
4 |
19 setlocal |
5 helium\hlm.bat %* |
20 |
6 |
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 ) |
|
29 |
|
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 |
|
40 |
|
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 if not defined ANT_OPTS ( |
|
61 set ANT_OPTS=-Xmx896M -Dlog4j.configuration=com/nokia/log4j.xml |
|
62 ) |
|
63 |
|
64 set SIGNALING_ANT_ARGS= -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor |
|
65 set LOGGING_ANT_ARGS= -listener com.nokia.helium.logger.ant.listener.StatusAndLogListener |
|
66 REM -listener com.nokia.helium.logger.ant.listener.StatusAndLogListener |
|
67 set DIAMONDS_ANT_ARGS= -listener com.nokia.helium.diamonds.ant.HeliumListener |
|
68 |
|
69 if not defined HLM_DISABLE_INTERNAL_DATA ( |
|
70 set INTERNAL_DATA_ANT_ARGS= -listener com.nokia.helium.internaldata.ant.listener.Listener |
|
71 echo Internal data listening enabled. |
|
72 ) |
|
73 |
|
74 |
|
75 REM Configure listener to generate target times csv file. |
|
76 REM **Note: Comment below line if you want to skip the target times csv file generation |
|
77 set TARGET_TIMES_GENERATOR= -listener com.nokia.helium.core.ant.listener.TargetTimesLogGeneratorListener |
|
78 |
|
79 |
|
80 if not defined ANT_ARGS ( |
|
81 set ANT_ARGS=-lib "%HELIUM_HOME%\external\antlibs2" -lib "%HELIUM_HOME%\extensions\nokia\external\antlibs" -logger com.nokia.ant.HeliumLogger %DIAMONDS_ANT_ARGS% %INTERNAL_DATA_ANT_ARGS% %SIGNALING_ANT_ARGS% %LOGGING_ANT_ARGS% %TARGET_TIMES_GENERATOR% |
|
82 ) |
|
83 |
|
84 REM Shall we impose the EPOCROOT? |
|
85 if not defined EPOCROOT ( |
|
86 set EPOCROOT=\ |
|
87 ) |
|
88 |
|
89 REM Symbian Build area path related settings |
|
90 set PATH=%PATH%;%EPOCROOT%epoc32\tools;%EPOCROOT%epoc32\gcc\bin;%EPOCROOT%epoc32\tools\build;%EPOCROOT%epoc32\rombuild |
|
91 |
|
92 set PATH=%PATH%;%HELIUM_HOME%\extensions\nokia\external\unxutils |
|
93 set PATH=%PATH%;%HELIUM_HOME%\extensions\nokia\external\Subversion\bin |
|
94 set PATH=%PATH%;%HELIUM_HOME%\extensions\nokia\external\graphviz\bin |
|
95 |
|
96 for /f "tokens=2" %%a in ('"python -V 2>&1"') do (set pythonversion=%%a) |
|
97 for /f "tokens=1-2 delims=." %%a in ("%pythonversion%") do (set pythonversion=%%a.%%b) |
|
98 |
|
99 set PYTHONPATH=%HELIUM_HOME%\external\python\lib\auto;%HELIUM_HOME%\external\python\lib\%pythonversion% |
|
100 set PYTHONPATH=%PYTHONPATH%;%HELIUM_HOME%\external\python\lib\common;%HELIUM_HOME%\tools\common\python\scripts |
|
101 set PYTHONPATH=%PYTHONPATH%;%HELIUM_HOME%\extensions\nokia\external\python\lib\%pythonversion% |
|
102 set PYTHONPATH=%PYTHONPATH%;%HELIUM_HOME%\extensions\nokia\tools\common\python\lib;%SBS_HOME%\python |
|
103 set PERL5LIB=%HELIUM_HOME%\tools\common\packages |
|
104 set COPYCMD=/y |
|
105 |
|
106 REM Should be done that SYMSEE? |
|
107 set PATH=%PATH%;C:\APPS\ctc |
|
108 |
|
109 REM Nokia specific |
|
110 set HOME=h:\ |
|
111 set ARMROOT=\ |
|
112 |
|
113 |
|
114 REM Manage RVCT switching. |
|
115 if defined HLM_RVCT_VERSION ( |
|
116 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 ) |
|
117 call "C:\APPS\rvct%HLM_RVCT_VERSION%\rvctcmdprompt.bat" > nul |
|
118 ) |
|
119 TITLE Helium |
|
120 |
|
121 if not exist "%HELIUM_HOME%\external\antlibs2\helium-checktools-1.0.jar" ( |
|
122 echo *** Error: Please build helium from nokia_builder or builder dir run "bld && bld get-deps" |
|
123 goto errorstop |
|
124 ) |
|
125 |
|
126 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" |
|
127 if not defined HLM_DISABLE_TOOL_CHECK ( |
|
128 if "%ERRORLEVEL%" neq "0" (goto errorstop) |
|
129 ) |
|
130 |
|
131 REM Call the Helium generated batch file if it exists |
|
132 REM This must match with the cache.dir property in helium.ant.xml |
|
133 if defined JOB_ID ( |
|
134 set HELIUM_CACHE_DIR=%TEMP%\helium\%USERNAME%\%JOB_ID% |
|
135 )ELSE set HELIUM_CACHE_DIR=%TEMP%\helium\%USERNAME% |
|
136 |
|
137 if not exist %HELIUM_CACHE_DIR% ( |
|
138 md %HELIUM_CACHE_DIR% |
|
139 ) |
|
140 |
|
141 REM pass cache dir to a property for log4j log file |
|
142 if defined ANT_OPTS ( |
|
143 set ANT_OPTS=%ANT_OPTS% -Dlog4j.cache.dir=%HELIUM_CACHE_DIR% |
|
144 call %HELIUM_HOME%\external\python\configure_jython.bat |
|
145 ) |
|
146 |
|
147 call ant -Dhelium.dir="%HELIUM_HOME%" -Dcache.dir="%HELIUM_CACHE_DIR%" %* |
|
148 |
|
149 endlocal |
|
150 goto :eof |
|
151 |
|
152 :errorstop |
|
153 @echo *** Build aborted with error |
|
154 exit /b 1 |
|
155 |
|
156 |
|