--- a/buildframework/helium/hlm.bat Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/hlm.bat Wed Oct 13 16:31:27 2010 +0800
@@ -1,11 +1,65 @@
@echo off
-rem if not defined HELIUM_HOME set HELIUM_HOME=%~dp0..\..\..\helium
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of the License "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:
+rem
+
+setlocal
+
+REM Set the Helium location
+REM Make sure the path is not ending with a backslash!
+if not defined HELIUM_HOME (
+ set HELIUM_HOME_TEMP=%~dp0
+)
+if not defined HELIUM_HOME (
+ set HELIUM_HOME=%HELIUM_HOME_TEMP:~0,-1%
+)
-helium\hlm.bat %*
+rem Loading runtime environment tools
+if exist "%HELIUM_HOME%\runtime\runtime_env.bat" (
+call %HELIUM_HOME%\runtime\runtime_env.bat
+)
+
+if not exist "%HELIUM_HOME%\extensions\nokia\build.xml" (
+set HLM_SUBCON=1
+set HLM_DISABLE_INTERNAL_DATA=1
+)
+
-perl "%HELIUM_HOME%\tools\common\bin\getppid.pl" > %TEMP%\%USERNAME%pid.txt
-set /p PID=< %TEMP%\%USERNAME%pid.txt
+REM Configure Java
+if not defined JAVA_6_HOME (
+set TESTED_JAVA=C:\Apps\j2sdk_1.6.0_02
+) ELSE set TESTED_JAVA=%JAVA_6_HOME%
+if exist "%TESTED_JAVA%" (set JAVA_HOME=%TESTED_JAVA%)
+if not exist "%JAVA_HOME%" ( echo *** Java cannot be found & goto :errorstop )
+set PATH=%JAVA_HOME%\bin;%PATH%
+
+REM Needed by python logging
+set PID=1
+perl "%HELIUM_HOME%\tools\common\bin\getppid.pl" > "%TEMP%\%USERNAME%pid.txt"
+set /p PID=< "%TEMP%\%USERNAME%pid.txt"
+
+REM Configure Apache Ant
+if not defined TESTED_ANT (
+ set TESTED_ANT=C:\APPS\ant_1.7
+)
+if exist "%TESTED_ANT%" (set ANT_HOME=%TESTED_ANT%)
+if not exist "%ANT_HOME%" ( echo *** Ant cannot be found & goto :errorstop )
+
+set SIGNALING_ANT_ARGS= -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor
+set LOGGING_ANT_ARGS= -listener com.nokia.helium.logger.ant.listener.CommonListener
if not defined HLM_DISABLE_INTERNAL_DATA (
set INTERNAL_DATA_ANT_ARGS= -listener com.nokia.helium.internaldata.ant.listener.Listener
@@ -18,7 +72,7 @@
if not defined ANT_ARGS (
-set ANT_ARGS=-lib "%HELIUM_HOME%\external\antlibs2" -logger com.nokia.ant.HeliumLogger %INTERNAL_DATA_ANT_ARGS% %SIGNALING_ANT_ARGS% %LOGGING_ANT_ARGS% %TARGET_TIMES_GENERATOR% -listener com.nokia.helium.environment.ant.listener.ExecListener
+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
)
REM Shall we impose the EPOCROOT?
@@ -79,12 +133,14 @@
REM pass cache dir to a property for log4j log file
if not defined ANT_OPTS (
- set ANT_OPTS=-Xmx896M -Dlog4j.configuration=com/nokia/log4j.xml -Dlog4j.cache.dir=%HELIUM_CACHE_DIR% -Dpython.verbose=warning
+ 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
call "%HELIUM_HOME%\external\python\configure_jython.bat"
)
call ant -Dhelium.dir="%HELIUM_HOME%" -Dcache.dir=%HELIUM_CACHE_DIR% %*
+
+
endlocal
goto :eof