build_preparation.cmd
branchRCL_3
changeset 18 ea3e26ea6629
parent 6 c8ecf89eb77f
equal deleted inserted replaced
6:c8ecf89eb77f 18:ea3e26ea6629
     1 @rem
       
     2 @rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 @rem All rights reserved.
       
     4 @rem This component and the accompanying materials are made available
       
     5 @rem under the terms of "Eclipse Public License v1.0"
       
     6 @rem which accompanies this distribution, and is available
       
     7 @rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 @rem
       
     9 @rem Initial Contributors:
       
    10 @rem Nokia Corporation - initial contribution.
       
    11 @rem
       
    12 @rem Contributors:
       
    13 @rem
       
    14 @rem Description:
       
    15 @rem
       
    16 @echo off
       
    17 setlocal
       
    18 echo ===-------------------------------------------------
       
    19 echo === Stage=1
       
    20 echo ===-------------------------------------------------
       
    21 perl -le "$time=localtime; print '=== Stage=1 started ', $time"
       
    22 perl -le "$time=localtime; print '=== Stage=1 build_preparation.cmd started', $time"
       
    23 
       
    24 echo Set tools and input files for build S60_5_0
       
    25 echo !!! Note: Symbian genxml and htmlscanlog tools have to found from environment !!!
       
    26 echo usage (all parameters are optional) :
       
    27 echo build_preparation.cmd S60_build_configuration -p platform -f conf_filter
       
    28 echo -p platform    : 'S60' by default , 'OSExt' is supported by S60
       
    29 echo -f conf_filter : not used by default, 'nonjava' 'touch' 'no_stubs' 'no_binonly' 
       
    30 echo                  are supported by S60
       
    31 echo using parameter '-f' all configurations are updated 
       
    32 echo in S60_SystemBuild.xml by add_build_definition_filter.pl
       
    33 echo !!! NOTE parameters are case sensitive !!!
       
    34 
       
    35 :loop
       
    36 if "%1"=="" goto end_loop
       
    37 
       
    38 if "%1" == "-f" (
       
    39 set SYSTEM_CONFIGURATION_FILTER=%SYSTEM_CONFIGURATION_FILTER% %1 %2
       
    40 shift
       
    41 shift
       
    42 goto loop
       
    43 )
       
    44 
       
    45 if "%1" == "-p" (
       
    46 set BUILD_PLATFORM=%2
       
    47 shift
       
    48 shift
       
    49 goto loop
       
    50 )
       
    51 
       
    52 if not "%1" == "" (
       
    53 set S60_BUILD_CONFIGURATION=%1
       
    54 )
       
    55 
       
    56 shift
       
    57 goto loop
       
    58 
       
    59 :end_loop
       
    60 
       
    61 if defined S60_BUILD_CONFIGURATION (if "%S60_BUILD_CONFIGURATION%" == "OSExt" (
       
    62 	set BUILD_PLATFORM=OSExt
       
    63 	set CMAKER_BUILD=os_prebuild
       
    64 ))
       
    65 
       
    66 if not defined BUILD_PLATFORM (
       
    67 	set BUILD_PLATFORM=S60
       
    68 	set CMAKER_BUILD=s60_prebuild
       
    69 )
       
    70 
       
    71 if not defined S60_BUILD_CONFIGURATION (
       
    72 	set S60_BUILD_CONFIGURATION=%BUILD_PLATFORM%_clean
       
    73 )
       
    74 
       
    75 echo create folder for logs
       
    76 if not defined LOGS_PATH (
       
    77 	set LOGS_PATH=\logs\
       
    78 )
       
    79 
       
    80 if not exist %LOGS_PATH% (
       
    81 md %LOGS_PATH%
       
    82 )
       
    83 
       
    84 echo Build platform '%BUILD_PLATFORM%'
       
    85 echo Build configuration '%S60_BUILD_CONFIGURATION%'
       
    86 echo Used system configuration filters '%SYSTEM_CONFIGURATION_FILTER%'
       
    87 
       
    88 
       
    89 
       
    90 if defined SYSTEM_CONFIGURATION_FILTER (
       
    91 echo Add filter '%SYSTEM_CONFIGURATION_FILTER%' for all configurations in S60_SystemBuild.xml
       
    92 call \sf\tools\buildplatforms\build\tools\add_build_definition_filter.pl -i \sf\tools\buildplatforms\build\data\S60_SystemBuild.xml %SYSTEM_CONFIGURATION_FILTER%
       
    93 )
       
    94 
       
    95 rem tools_cmaker
       
    96 call cd \tools\cmaker && make
       
    97 
       
    98 rem cmaker_S60_config
       
    99 call cmd /c "cd \sf\os\deviceplatformrelease\sf_build\sf_prebuild && cmaker %CMAKER_BUILD% ACTION=export BUILD=%BUILD_PLATFORM%"
       
   100 
       
   101 
       
   102 rem cmaker_s60_51_config
       
   103 call cmd /c "cd \config\s60_52_config && cmaker s60_52_config ACTION=export BUILD=oem S60=52"
       
   104 
       
   105 
       
   106 echo Remove possible scanlog because htmlscanlog.pl do not overwrite it 
       
   107 if exist %LOGS_PATH%scanlog_S60Build_xml.html (
       
   108 call del /q %LOGS_PATH%scanlog_S60Build_xml.html
       
   109 )
       
   110 
       
   111 echo Generate bldmelast.xml for %BUILD_PLATFORM%
       
   112 call perl \epoc32\tools\build\genxml.pl -x \epoc32\tools\s60tools\S60_SystemBuild.xml -x \epoc32\tools\s60tools\S60_SystemModel.xml -x \epoc32\tools\s60tools\custom_SystemDefinition.xml -n %BUILD_PLATFORM%_bldmelast -s \ -o \epoc32\tools\s60tools\bldmelast.xml -l %LOGS_PATH%bldmelast_xml.log
       
   113 set CONFIGURATION_LOG_FILES=%CONFIGURATION_LOG_FILES% -l %LOGS_PATH%bldmelast_xml.log
       
   114 
       
   115 echo Generate S60Build.xml for %S60_BUILD_CONFIGURATION% build
       
   116 call perl \epoc32\tools\build\genxml.pl -x \epoc32\tools\s60tools\S60_SystemBuild.xml -x \epoc32\tools\s60tools\S60_SystemModel.xml -x \epoc32\tools\s60tools\custom_SystemDefinition.xml -n %S60_BUILD_CONFIGURATION% -s \ -o \epoc32\tools\s60tools\S60Build.xml -l %LOGS_PATH%S60Build_xml.log
       
   117 set CONFIGURATION_LOG_FILES=%CONFIGURATION_LOG_FILES% -l %LOGS_PATH%S60Build_xml.log
       
   118 
       
   119 
       
   120 echo Generate summary scanlog from generated build xml files
       
   121 call perl \epoc32\tools\htmlscanlog.pl %CONFIGURATION_LOG_FILES% -o %LOGS_PATH%scanlog_S60Build_xml.html -v
       
   122 
       
   123 
       
   124 perl -le "$time=localtime; print '=== Stage=1 finished ', $time"
       
   125 endlocal