buildframework/helium/tools/localisation/localisation-50.ant.xml
changeset 217 0f5e3a7fb6af
parent 179 d8ac696cc51f
child 588 c7c26511138f
equal deleted inserted replaced
181:59bb7c4d6172 217:0f5e3a7fb6af
    18 
    18 
    19 Description:
    19 Description:
    20 
    20 
    21 ============================================================================
    21 ============================================================================
    22 -->
    22 -->
    23 <project name="localisation-50">
    23 <!--* @package localisation -->
       
    24 <project name="localisation-50" xmlns:hlm="http://www.nokia.com/helium">
    24     <description>
    25     <description>
    25         S60 5.0+ localisation.
    26         S60 5.0+ localisation.
    26     </description>
    27     </description>
    27 
    28 
    28     <!-- Main target for 5.0 build localisation process. -->
    29     <!-- Main target for 5.0 build localisation process. -->
    29     <target name="localisation-50-build" depends="localisation-switch-loc-generator,localisation-dtd"/> 
    30     <target name="localisation-50-build" depends="localisation-switch-loc-generator,localisation-dtd"/> 
       
    31 
       
    32     <!-- Regional variation support for 5.0 -->
       
    33     <!-- Location of the parse_what_log.pl tool.
       
    34     @type string
       
    35     -->
       
    36     <property name="parse_abld_what.tool" location="${build.drive}\s60\tools\build_platforms\build\tools\parse_what_log.pl" />
       
    37     <!-- Location of the configuration tool.
       
    38     @type string
       
    39     -->
       
    40     <property name="ctool.dir" location="${build.drive}/s60/tools/toolsextensions/ConfigurationTool" />
       
    41     <!-- configuration for the western variant.
       
    42     @type string
       
    43     -->
       
    44     <property name="ctool.western.conf" value="-master_conf s60 -impl \epoc32\rom\config\confml_data\s60 -confml \epoc32\rom\config\confml_data\s60" />
       
    45     <!-- configuration for the chinese variant.
       
    46     @type string
       
    47     -->
       
    48     <property name="ctool.china.conf" value="-master_conf china -impl \epoc32\rom\config\confml_data\s60 -confml \epoc32\rom\config\confml_data\${ctool.region.china}" />
       
    49     <!-- configuration for the japanese variant.
       
    50     @type string
       
    51     -->
       
    52     <property name="ctool.japan.conf" value="-master_conf japan -impl \epoc32\rom\config\confml_data\s60 -confml \epoc32\rom\config\confml_data\${ctool.region.japan}" />
       
    53     <!-- Define the prefix part of the configuration name that builds delta variant.
       
    54     @type string
       
    55     -->
       
    56     <property name="s60.delta.config.prefix" value="S60_variant_"/>
       
    57 
       
    58     <!-- ctool translation -->
       
    59     <!-- .
       
    60     @type string
       
    61     @scope private
       
    62     -->
       
    63     <property name="ctool.region.china" value="apac"/>
    30    
    64    
    31     <!-- 
    65     <!-- 
    32             This target launch the localisation of DTD files. 
    66             This target launch the localisation of DTD files. 
    33             This is handled by the DTDLocaliser.pl script from S60.  
    67             This is handled by the DTDLocaliser.pl script from S60.  
    34     --> 
    68     --> 
    47     --> 
    81     --> 
    48     <target name="localisation-switch-loc-generator"> 
    82     <target name="localisation-switch-loc-generator"> 
    49         <exec dir="${build.drive}/" executable="perl.exe" failonerror="false"> 
    83         <exec dir="${build.drive}/" executable="perl.exe" failonerror="false"> 
    50             <arg line="${build.drive}/epoc32/tools/switch_loc_generator.pl"/> 
    84             <arg line="${build.drive}/epoc32/tools/switch_loc_generator.pl"/> 
    51         </exec> 
    85         </exec> 
    52     </target> 
    86     </target>
       
    87     
       
    88     
       
    89     <!-- The createDeltaZipMacro enables to create regional variant like china and japan.
       
    90     e.g:
       
    91          <pre><hlm:createDeltaZipMacro variant="china" type="armv5" ctool="true"/></pre>
       
    92     -->
       
    93     <macrodef name="createDeltaZipMacro" uri="http://www.nokia.com/helium">
       
    94         <attribute name="variant"/>
       
    95         <attribute name="type" default=""/>
       
    96         <attribute name="ctool" default="false"/>
       
    97         <attribute name="force" default="false"/>
       
    98         <sequential>
       
    99             <mkdir dir="${build.log.dir}"/>
       
   100             <mkdir dir="${localisation.log.dir}"/>            
       
   101             <if>
       
   102                 <and>
       
   103                     <available file="${zips.loc.dir}/delta_@{variant}_package.zip" />
       
   104                     <isfalse value="@{force}"/>
       
   105                 </and>                    
       
   106                 <then>
       
   107                     <echo>Unzipping ${zips.loc.dir}/delta_@{variant}_package.zip</echo>
       
   108                     <unzip src="${zips.loc.dir}/delta_@{variant}_package.zip" dest="${build.drive}/" overwrite="true" />
       
   109                 </then>
       
   110                 <else>
       
   111                     <if>
       
   112                         <equals arg1="@{type}" arg2=""/>
       
   113                         <then>
       
   114                             <var name="internal.variant.type" value="@{type}"/>
       
   115                         </then>
       
   116                         <else>
       
   117                             <var name="internal.variant.type" value="_@{type}"/>
       
   118                         </else>
       
   119                     </if>
       
   120                     <echo>Generating ${build.drive}\epoc32\tools\s60tools\variant_build_@{variant}${internal.variant.type}.xml</echo>
       
   121                     <hlm:compileGenxmlMacro input="-x ${canonical.sysdef.file}"
       
   122                                           configuration="${s60.delta.config.prefix}@{variant}${internal.variant.type}"
       
   123                                           output="${build.drive}\epoc32\tools\s60tools\variant_build_@{variant}${internal.variant.type}.xml"
       
   124                                           log="${localisation.log.dir}/${build.id}.variant_build_@{variant}${internal.variant.type}_genxml.log"/>
       
   125 
       
   126                     <echo>Building ${build.drive}\epoc32\tools\s60tools\variant_build_@{variant}${internal.variant.type}.xml</echo>
       
   127                     <hlm:compileEbsMacro input="${build.drive}\epoc32\tools\s60tools\variant_build_@{variant}${internal.variant.type}.xml" log="${localisation.log.dir}/${build.id}.@{variant}${internal.variant.type}_compile.log" />
       
   128                     <hlm:compileHtmlscanlogMacro input="${localisation.log.dir}/${build.id}.@{variant}${internal.variant.type}_compile.log" output="${build.log.dir}/${build.id}.@{variant}${internal.variant.type}_scan2.html" />
       
   129                     
       
   130                     <if>
       
   131                         <istrue value="@{ctool}"/>
       
   132                         <then>
       
   133                             <property name="ctool.region.@{variant}" value="@{variant}"/>
       
   134                             <echo>Region ctool: ${ctool.region.@{variant}} (@{variant}).</echo>
       
   135                             <preset.exec executable="cmd" dir="${ctool.dir}/" failonerror="true" output="${localisation.log.dir}/${build.id}.configtool_@{variant}_log.txt">
       
   136                                 <arg line="/c cli_build.cmd ${ctool.@{variant}.conf} -report ${localisation.log.dir}/${build.id}.configtool_@{variant}_delta.txt -ignore_errors"/>
       
   137                             </preset.exec>
       
   138                         </then>
       
   139                     </if>
       
   140                     <preset.exec executable="perl" dir="${build.drive}/" failonerror="true">
       
   141                         <arg value="${parse_abld_what.tool}"/>
       
   142                         <arg line="-i ${localisation.log.dir}/${build.id}.@{variant}${internal.variant.type}_compile.log -filter \epoc32 -zip ${zips.loc.dir}/delta_@{variant}_package -ex productvariant.hrh"/>
       
   143                     </preset.exec>
       
   144                     <if>
       
   145                         <istrue value="@{ctool}"/>
       
   146                         <then>
       
   147                             <preset.exec executable="${build.drive}\epoc32\tools\zip.exe" dir="${build.drive}/" input="${localisation.log.dir}/${build.id}.configtool_@{variant}_delta.txt">
       
   148                                 <arg line="-r -u ${zips.loc.dir}/delta_@{variant}_package -@"/>
       
   149                             </preset.exec>
       
   150                         </then>
       
   151                     </if>
       
   152                     <var name="internal.variant.type" unset="true"/>
       
   153                 </else>
       
   154             </if>
       
   155         </sequential>
       
   156     </macrodef>
       
   157 
       
   158 
       
   159     <!-- The createDeltaWesternZipMacro enables to create western regional variant
       
   160     e.g: build western variation using the results from S60_postbuild config
       
   161          and enabling configuration tool support.
       
   162          <pre><hlm:createDeltaWesternZipMacro configs="S60_postbuild" ctool="true"/></pre>
       
   163     -->
       
   164     <macrodef name="createDeltaWesternZipMacro"  uri="http://www.nokia.com/helium">
       
   165         <attribute name="configs"/>
       
   166         <attribute name="ctool" default="false"/>
       
   167         <sequential>
       
   168             <mkdir dir="${zips.loc.dir}"/>
       
   169             <mkdir dir="${localisation.log.dir}"/>
       
   170             <for list="@{configs}" delimiter="," param="conf" >
       
   171                 <sequential>
       
   172                     <if>
       
   173                         <istrue value="@{ctool}"/>
       
   174                         <then>
       
   175                             <preset.exec executable="cmd" dir="${ctool.dir}/" failonerror="true" output="${localisation.log.dir}/${build.id}.configtool_western_log.txt">
       
   176                                 <arg line="/c cli_build.cmd ${ctool.western.conf} -report ${localisation.log.dir}/${build.id}.configtool_western_delta.txt -ignore_errors"/>
       
   177                             </preset.exec>
       
   178                         </then>
       
   179                     </if>
       
   180                     <preset.exec executable="perl" dir="${build.drive}/" failonerror="true">
       
   181                         <arg value="${parse_abld_what.tool}"/>
       
   182                         <arg line="-i ${compile.log.dir}/${build.id}.@{conf}_compile.log -filter \epoc32 -zip ${zips.loc.dir}/delta_western_package -ex productvariant.hrh"/>
       
   183                     </preset.exec>
       
   184                     <if>
       
   185                         <istrue value="@{ctool}"/>
       
   186                         <then>
       
   187                             <preset.exec executable="${build.drive}\epoc32\tools\zip.exe" dir="${build.drive}/" input="${localisation.log.dir}/${build.id}.configtool_western_delta.txt">
       
   188                                 <arg line="-r -u ${zips.loc.dir}/delta_western_package -@"/>
       
   189                             </preset.exec>
       
   190                         </then>
       
   191                     </if>
       
   192                 </sequential>
       
   193             </for>
       
   194         </sequential>
       
   195     </macrodef>
       
   196     
    53 </project>
   197 </project>