buildframework/helium/tools/compile/sis.ant.xml
branchfix
changeset 395 5ad27ebafc22
parent 217 0f5e3a7fb6af
child 587 85df38eb4012
equal deleted inserted replaced
394:b6f8d38305f2 395:5ad27ebafc22
    18 
    18 
    19 Description:
    19 Description:
    20 
    20 
    21 ============================================================================
    21 ============================================================================
    22 -->
    22 -->
       
    23 <!--* @package compile -->
    23 <project name="compile.sis" xmlns:hlm="http://www.nokia.com/helium">
    24 <project name="compile.sis" xmlns:hlm="http://www.nokia.com/helium">
    24     <description>Create SIS files.</description>
    25     <description>Create SIS files.</description>
       
    26     
       
    27     <!-- Common Configuration config name. Override to select a specific config group.
       
    28     @type string
       
    29     -->
       
    30     <property name="sis.config.name" value=""/>
    25     
    31     
    26     <!-- Preprocesses the SIS configuration file to insert Ant properties. -->
    32     <!-- Preprocesses the SIS configuration file to insert Ant properties. -->
    27     <target name="preprocess-sis-config" if="sis.config.file">
    33     <target name="preprocess-sis-config" if="sis.config.file">
    28         <property name="sis.config.file.parsed" location="${build.output.dir}/sis.cfg.xml.parsed" />
    34         <property name="sis.config.file.parsed" location="${build.output.dir}/sis.cfg.xml.parsed" />
    29         <copy file="${sis.config.file}" tofile="${sis.config.file.parsed}" overwrite="true">
    35         <copy file="${sis.config.file}" tofile="${sis.config.file.parsed}" overwrite="true">
    36     
    42     
    37     <!-- Create SIS files. -->
    43     <!-- Create SIS files. -->
    38     <target name="sisfiles" depends="preprocess-sis-config" if="sis.config.file">
    44     <target name="sisfiles" depends="preprocess-sis-config" if="sis.config.file">
    39         <hlm:tempRecordStartMacro name="${build.id}_sisfiles.log"/>        
    45         <hlm:tempRecordStartMacro name="${build.id}_sisfiles.log"/>        
    40         <mkdir dir="${build.sisfiles.dir}" />
    46         <mkdir dir="${build.sisfiles.dir}" />
       
    47         <delete file="${temp.build.dir}/sis_build.ant.xml" failonerror="false"/>
    41         <hlm:python>
    48         <hlm:python>
    42 import configuration
    49 import configuration
    43 import sis
    50 import sis
    44 import os
    51 import os
    45 
    52 
    46 builder = configuration.NestedConfigurationBuilder(open(r'${sis.config.file.parsed}', 'r'))
    53 builder = configuration.NestedConfigurationBuilder(open(r'${sis.config.file.parsed}', 'r'))
    47 configSet = builder.getConfiguration()
    54 config_set = builder.getConfiguration()
    48 configs = configSet.getConfigurations()
    55 config_name = r'${sis.config.name}' if (len(r'${sis.config.name}') > 0) else None
    49 
    56 
    50 prebuilder = sis.SisPreBuilder(configSet)
    57 prebuilder = sis.SisPreBuilder(config_set, config_name)
    51 prebuilder.write(os.path.join(r'${temp.build.dir}', 'sis_build.ant.xml'))
    58 prebuilder.write(os.path.join(r'${temp.build.dir}', 'sis_build.ant.xml'))
    52         </hlm:python>
    59         </hlm:python>
    53         <ant antfile="${temp.build.dir}/sis_build.ant.xml"/>
    60         <ant antfile="${temp.build.dir}/sis_build.ant.xml"/>
    54         <hlm:tempRecordStopMacro name="${build.id}_sisfiles.log" filterref="filterset.sisfiles"/>
    61         <hlm:tempRecordStopMacro name="${build.id}_sisfiles.log" filterref="filterset.sisfiles" phase="post"/>
    55         <hlm:metadatarecord xmlns:hlm="http://www.nokia.com/helium" database="${metadata.dbfile}">
    62         <hlm:metadatarecord xmlns:hlm="http://www.nokia.com/helium" database="${metadata.dbfile}">
    56             <hlm:textmetadatainput>
    63             <hlm:textmetadatainput>
    57                 <fileset casesensitive="false" file="${build.cache.log.dir}/${build.id}_sisfiles.log"/>
    64                 <fileset casesensitive="false" file="${build.cache.log.dir}/${build.id}_sisfiles.log"/>
    58                 <metadatafilterset refid="filterset.sisfiles"/>
    65                 <metadatafilterset refid="filterset.sisfiles"/>
    59             </hlm:textmetadatainput> 
    66             </hlm:textmetadatainput> 
    60         </hlm:metadatarecord>
    67         </hlm:metadatarecord>
    61     </target>
    68     </target>
    62 
    69 
    63 </project>
    70 </project>
    64 
    71 
       
    72 
       
    73