buildframework/helium/hlm.bat
changeset 179 d8ac696cc51f
parent 1 be27ed110b50
child 217 0f5e3a7fb6af
equal deleted inserted replaced
1:be27ed110b50 179:d8ac696cc51f
    40 
    40 
    41 REM Configure Java
    41 REM Configure Java
    42 if not defined JAVA_6_HOME (
    42 if not defined JAVA_6_HOME (
    43 set TESTED_JAVA=C:\Apps\j2sdk_1.6.0_02
    43 set TESTED_JAVA=C:\Apps\j2sdk_1.6.0_02
    44 ) ELSE  set TESTED_JAVA=%JAVA_6_HOME%
    44 ) ELSE  set TESTED_JAVA=%JAVA_6_HOME%
    45 if exist %TESTED_JAVA% (set JAVA_HOME=%TESTED_JAVA%)
    45 if exist "%TESTED_JAVA%" (set JAVA_HOME=%TESTED_JAVA%)
    46 if not exist "%JAVA_HOME%" ( echo *** Java cannot be found & goto :errorstop )
    46 if not exist "%JAVA_HOME%" ( echo *** Java cannot be found & goto :errorstop )
    47 set JEP_HOME=%HELIUM_HOME%\external\jep_1.6_2.5
    47 REM set JEP_HOME=%HELIUM_HOME%\external\jep_1.6_2.5
    48 set PATH=%PATH%;%JEP_HOME%
    48 REM set PATH=%PATH%;%JEP_HOME%
    49 
    49 
    50 REM Needed by python logging
    50 REM Needed by python logging
    51 set PID=1
    51 set PID=1
    52 perl "%HELIUM_HOME%\tools\common\bin\getppid.pl" > %TEMP%\%USERNAME%pid.txt
    52 perl "%HELIUM_HOME%\tools\common\bin\getppid.pl" > %TEMP%\%USERNAME%pid.txt
    53 set /p PID=< %TEMP%\%USERNAME%pid.txt
    53 set /p PID=< %TEMP%\%USERNAME%pid.txt
    54 
    54 
    55 REM Configure Apache Ant
    55 REM Configure Apache Ant
    56 set TESTED_ANT=C:\APPS\ant_1.7
    56 set TESTED_ANT=C:\APPS\ant_1.7
    57 if exist %TESTED_ANT% (set ANT_HOME=%TESTED_ANT%)
    57 if exist "%TESTED_ANT%" (set ANT_HOME=%TESTED_ANT%)
    58 if not exist "%ANT_HOME%" ( echo *** Ant cannot be found & goto :errorstop )
    58 if not exist "%ANT_HOME%" ( echo *** Ant cannot be found & goto :errorstop )
    59 if not defined ANT_OPTS (
    59 if not defined ANT_OPTS (
    60 	set ANT_OPTS=-Xmx896M -Dlog4j.configuration=com/nokia/log4j.xml
    60 	set ANT_OPTS=-Xmx896M -Dlog4j.configuration=com/nokia/log4j.xml
    61 )
    61 )
    62 
    62 
    63 set SIGNALING_ANT_ARGS= -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor
    63 set SIGNALING_ANT_ARGS= -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor
       
    64 set LOGGING_ANT_ARGS= -listener com.nokia.helium.logger.ant.listener.StatusAndLogListener
       
    65 REM -listener com.nokia.helium.logger.ant.listener.StatusAndLogListener
    64 set DIAMONDS_ANT_ARGS= -listener com.nokia.helium.diamonds.ant.HeliumListener
    66 set DIAMONDS_ANT_ARGS= -listener com.nokia.helium.diamonds.ant.HeliumListener
    65 
    67 
    66 if not defined HLM_DISABLE_INTERNAL_DATA (
    68 if not defined HLM_DISABLE_INTERNAL_DATA (
    67 set INTERNAL_DATA_ANT_ARGS= -listener com.nokia.ant.listener.internaldata.Listener
    69 set INTERNAL_DATA_ANT_ARGS= -listener com.nokia.ant.listener.internaldata.Listener
    68 echo Internal data listening enabled.
    70 echo Internal data listening enabled.
    69 )
    71 )
    70 
    72 
    71 if not defined ANT_ARGS (
    73 if not defined ANT_ARGS (
    72 set ANT_ARGS=-lib "%HELIUM_HOME%\extensions\nokia\external\antlibs" -lib "%HELIUM_HOME%\extensions\nokia\external\helium-nokia-antlib\bin" -lib "%HELIUM_HOME%\external\helium-antlib\bin" -lib "%HELIUM_HOME%\tools\common\java\lib" -lib "%HELIUM_HOME%\external\antlibs" -lib "%JEP_HOME%" -logger com.nokia.ant.HeliumLogger  %DIAMONDS_ANT_ARGS% %INTERNAL_DATA_ANT_ARGS% %SIGNALING_ANT_ARGS%
    74 set ANT_ARGS=-lib "%HELIUM_HOME%\extensions\nokia\external\antlibs" -lib "%HELIUM_HOME%\extensions\nokia\external\helium-nokia-antlib\bin" -lib "%HELIUM_HOME%\external\helium-antlib\bin" -lib "%HELIUM_HOME%\tools\common\java\lib" -lib "%HELIUM_HOME%\external\antlibs" -logger com.nokia.ant.HeliumLogger  %DIAMONDS_ANT_ARGS% %INTERNAL_DATA_ANT_ARGS% %SIGNALING_ANT_ARGS% %LOGGING_ANT_ARGS%
    73 )
    75 )
    74 
    76 
    75 REM Shall we impose the EPOCROOT?
    77 REM Shall we impose the EPOCROOT?
    76 if not defined EPOCROOT (
    78 if not defined EPOCROOT (
    77 set EPOCROOT=\
    79 set EPOCROOT=\
    78 )
    80 )
    79 
    81 
    80 REM Symbian Build area path related settings
    82 REM Symbian Build area path related settings
    81 set PATH=%PATH%;%EPOCROOT%epoc32\tools;%EPOCROOT%epoc32\gcc\bin;%EPOCROOT%epoc32\tools\build;%EPOCROOT%epoc32\rombuild
    83 set PATH=%PATH%;%EPOCROOT%epoc32\tools;%EPOCROOT%epoc32\gcc\bin;%EPOCROOT%epoc32\tools\build;%EPOCROOT%epoc32\rombuild
    82 
    84 
    83 REM Helium specific settings
       
    84 set PATH=%PATH%;%HELIUM_HOME%\tools\common\bin
       
    85 set PATH=%PATH%;%HELIUM_HOME%\extensions\nokia\external\doxygen
       
    86 set PATH=%PATH%;%HELIUM_HOME%\extensions\nokia\external\unxutils
    85 set PATH=%PATH%;%HELIUM_HOME%\extensions\nokia\external\unxutils
    87 set PATH=%PATH%;%HELIUM_HOME%\external\filedisk
       
    88 set PATH=%PATH%;%HELIUM_HOME%\extensions\nokia\external\info-zip
       
    89 set PATH=%PATH%;%HELIUM_HOME%\extensions\nokia\external\Subversion\bin
    86 set PATH=%PATH%;%HELIUM_HOME%\extensions\nokia\external\Subversion\bin
    90 set PATH=%PATH%;%HELIUM_HOME%\extensions\nokia\external\graphviz\bin
    87 set PATH=%PATH%;%HELIUM_HOME%\extensions\nokia\external\graphviz\bin
    91 set PATH=%PATH%;%HELIUM_HOME%\extensions\nokia\external\LSC_5.2
       
    92 set PATH=%PATH%;\tools
    88 set PATH=%PATH%;\tools
    93 set PATH=%PATH%;\tools\ncp_tools
    89 set PATH=%PATH%;\tools\ncp_tools
    94 set PYTHONPATH=%PYTHONPATH%;%HELIUM_HOME%\external\python\lib\2.5;%HELIUM_HOME%\tools\common\python\lib
    90 
    95 set PYTHONPATH=%PYTHONPATH%;%HELIUM_HOME%\extensions\nokia\external\python\lib\2.5
    91 for /f "tokens=2" %%a in ('"python -V 2>&1"') do (set pythonversion=%%a)
       
    92 for /f "tokens=1-2 delims=." %%a in ("%pythonversion%") do (set pythonversion=%%a.%%b)
       
    93 
       
    94 set PYTHONPATH=%PYTHONPATH%;%HELIUM_HOME%\external\python\lib\%pythonversion%;%HELIUM_HOME%\external\python\lib\common;%HELIUM_HOME%\tools\common\python\lib;%HELIUM_HOME%\tools\common\python\scripts
       
    95 set PYTHONPATH=%PYTHONPATH%;%HELIUM_HOME%\extensions\nokia\external\python\lib\%pythonversion%
    96 set PYTHONPATH=%PYTHONPATH%;%HELIUM_HOME%\extensions\nokia\tools\common\python\lib;%SBS_HOME%\python
    96 set PYTHONPATH=%PYTHONPATH%;%HELIUM_HOME%\extensions\nokia\tools\common\python\lib;%SBS_HOME%\python
    97 set PERL5LIB=%HELIUM_HOME%\tools\common\packages
    97 set PERL5LIB=%HELIUM_HOME%\tools\common\packages
    98 set COPYCMD=/y
    98 set COPYCMD=/y
    99 set spp_tools=\tools\
    99 set spp_tools=\tools\
   100 set ppd_tools=\tools\
   100 set ppd_tools=\tools\
   105 REM Nokia specific
   105 REM Nokia specific
   106 set HOME=h:\
   106 set HOME=h:\
   107 set ARMROOT=\
   107 set ARMROOT=\
   108 
   108 
   109 
   109 
   110 REM Setting the Visual Studio environment
       
   111 REM if not exist "%HELIUM_HOME%\tools\common\bin\call_vcvars32.bat" ( echo *** "%HELIUM_HOME%\tools\common\bin\call_vcvars32.bat" cannot be found & goto :errorstop )
       
   112 REM call "%HELIUM_HOME%\tools\common\bin\call_vcvars32.bat" > nul
       
   113 
       
   114 REM Manage RVCT switching.
   110 REM Manage RVCT switching.
   115 if defined HLM_RVCT_VERSION (
   111 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 )
   112 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
   113 call "C:\APPS\rvct%HLM_RVCT_VERSION%\rvctcmdprompt.bat" > nul
   118 )
   114 )
   120 
   116 
   121 call "%JAVA_HOME%\bin\java" -cp "%HELIUM_HOME%\tools\common\bin" CheckTools
   117 call "%JAVA_HOME%\bin\java" -cp "%HELIUM_HOME%\tools\common\bin" CheckTools
   122 
   118 
   123 REM Call the Helium generated batch file if it exists
   119 REM Call the Helium generated batch file if it exists
   124 REM This must match with the cache.dir property in helium.ant.xml
   120 REM This must match with the cache.dir property in helium.ant.xml
   125 set HELIUM_CACHE_DIR=%TEMP%\helium\%USERNAME%
   121 if defined JOB_ID  (
       
   122 	set HELIUM_CACHE_DIR=%TEMP%\helium\%USERNAME%\%JOB_ID%
       
   123 )ELSE set HELIUM_CACHE_DIR=%TEMP%\helium\%USERNAME%
       
   124 
   126 if not exist %HELIUM_CACHE_DIR% (
   125 if not exist %HELIUM_CACHE_DIR% (
   127 md %HELIUM_CACHE_DIR%
   126 md %HELIUM_CACHE_DIR%
   128 )
   127 )
   129 
   128 
   130 REM pass cache dir to a property for log4j log file
   129 REM pass cache dir to a property for log4j log file
   131 if defined ANT_OPTS (
   130 if defined ANT_OPTS (
   132 	set ANT_OPTS=%ANT_OPTS% -Dlog4j.cache.dir=%HELIUM_CACHE_DIR% -Dpython.path=%PYTHONPATH%;%HELIUM_HOME%\external\python\lib\2.5\jython-2.5-py2.5.egg
   131 	set ANT_OPTS=%ANT_OPTS% -Dlog4j.cache.dir=%HELIUM_CACHE_DIR% -Dpython.path=%PYTHONPATH%;%HELIUM_HOME%\external\python\lib\2.5\jython-2.5-py2.5.egg
   133 )
   132 )
   134 
   133 
   135 call "%HELIUM_HOME%\precompile_py.bat"
   134 call "%HELIUM_HOME%\precompile_py.bat" > %HELIUM_CACHE_DIR%\precompile_output.txt 
   136 
   135 
   137 call ant -Dhelium.dir="%HELIUM_HOME%" %*
   136 call ant -Dhelium.dir="%HELIUM_HOME%" -Dcache.dir="%HELIUM_CACHE_DIR%" %*
   138 
   137 
   139 endlocal
   138 endlocal
   140 goto :eof
   139 goto :eof
   141 
   140 
   142 
   141