buildframework/helium/tools/preparation/ido-prep.ant.xml
changeset 640 ac0bbc1e5d79
parent 628 7c4a911dc066
child 645 b8d81fa19e7d
equal deleted inserted replaced
639:0e65f93be3cb 640:ac0bbc1e5d79
    63     <!-- Defines the location of CMT++ output and the input for the diamonds creation target.
    63     <!-- Defines the location of CMT++ output and the input for the diamonds creation target.
    64     @type string
    64     @type string
    65     -->
    65     -->
    66     <property name="ido.cmt.html.output.dir" location="${build.log.dir}/${build.id}_cmt"/>
    66     <property name="ido.cmt.html.output.dir" location="${build.log.dir}/${build.id}_cmt"/>
    67     
    67     
       
    68     <!--* @property package.cone.validation.enabled
       
    69     Enables to run confml file validation.
       
    70     @type boolean
       
    71     @editable required
       
    72     @scope public
       
    73     @since 11.0
       
    74     -->
       
    75     
       
    76     <!--* @property internal.package.cone.validation.enabled
       
    77     Enables the targets to run confml file validation if package.cone.validation.enabled set to true.
       
    78     @type boolean
       
    79     @scope private
       
    80     -->
       
    81     
       
    82     <!--* @property cmt.enabled
       
    83     Enables to run cmt, testing code coverage tool.
       
    84     @type boolean
       
    85     @editable required
       
    86     @scope public
       
    87     @since 11.0
       
    88     -->
       
    89     
       
    90     <!--* @property internal.cmt.enabled
       
    91     Enables to run cmt tools targets if cmt.enabled is set to true, testing code coverage tool.
       
    92     @type boolean
       
    93     @scope private
       
    94     -->
       
    95     
       
    96     <!--* @property enable.cmt
       
    97     Enables to run cmt, testing code coverage tool. - deprecated: Start using cmt.enabled property.
       
    98     @type boolean
       
    99     @editable required
       
   100     @scope public
       
   101     @deprecated since 11.0
       
   102     -->
       
   103     
       
   104     <!--* Enables codescanner tool to run.
       
   105     @type boolean
       
   106     @editable required
       
   107     @scope public
       
   108     @since 11.0
       
   109     -->
       
   110     <property name="codescanner.enabled" value="true"/>
       
   111 
       
   112     
       
   113     <!--* @property internal.codescanner.enabled
       
   114     Enables codescanner targets to run if codescanner.enabled is set to true.
       
   115     @type boolean
       
   116     @scope private
       
   117     -->
       
   118     
       
   119     <!--* @property skip.codescanner
       
   120     Enables codescanner tool to run. - deprecated: Start using codescanner.enabled property.
       
   121     @type boolean
       
   122     @editable required
       
   123     @scope public
       
   124     @deprecated since 11.0
       
   125     -->
       
   126     
       
   127     <!-- Set to true to keep old sources of build area.
       
   128     @type boolean
       
   129     @editable required
       
   130     @scope public
       
   131     @since 11.0
       
   132     -->
       
   133     <property name="keep.old.source.enabled" value="false"/>
       
   134     
       
   135     <!--* @property ido.keep.old
       
   136     Set to true to keep old sources of build area. - deprecated: Start using keep.old.source.enabled property.
       
   137     @type boolean
       
   138     @editable required
       
   139     @scope public
       
   140     @deprecated since 11.0
       
   141     -->
       
   142     
       
   143     <!-- Set to true to copy internal folders while coping source from wa to build area.
       
   144     @type boolean
       
   145     @editable required
       
   146     @scope public
       
   147     @since 11.0
       
   148     -->
       
   149     <property name="keep.internal.folders.enabled" value="false"/>
       
   150     
       
   151     <!--* @property keep.internals
       
   152     Set to true to keep old internal folder while coping source from wa to build area. - deprecated: Start using keep.internal.folders.enabled property.
       
   153     @type boolean
       
   154     @editable required
       
   155     @scope public
       
   156     @deprecated since 11.0
       
   157     -->
       
   158     
    68     <!-- Internal target that generates the '''ado.mapping.file'''.
   159     <!-- Internal target that generates the '''ado.mapping.file'''.
    69      It is a INI file that contains ADO location as a key and target location as value.
   160      It is a INI file that contains ADO location as a key and target location as value.
    70     -->
   161     -->
       
   162     
       
   163     <!-- To enable to confml file validation -->
       
   164     <condition property="internal.package.cone.validation.enabled">
       
   165         <istrue value="${package.cone.validation.enabled}" />
       
   166     </condition>
       
   167     
       
   168     <!-- check, is cmt enabled -->
       
   169     <condition property="internal.cmt.enabled">
       
   170         <or>
       
   171             <istrue value="${cmt.enabled}" />
       
   172             <isset property="enable.cmt"/>
       
   173         </or>
       
   174     </condition>
       
   175     
       
   176     <!-- check is codescanner enabled-->
       
   177     <condition property="internal.codescanner.enabled">
       
   178         <and>
       
   179             <not>
       
   180                 <isfalse value="${codescanner.enabled}" />
       
   181             </not>
       
   182             <not>
       
   183                 <isset property="skip.codescanner"/>
       
   184             </not>
       
   185         </and>
       
   186     </condition>
       
   187     
    71     <target name="ido-create-ado-mapping">
   188     <target name="ido-create-ado-mapping">
    72         <mkdir dir="${build.output.dir}/build"/>
   189         <mkdir dir="${build.output.dir}/build"/>
    73         <mkdir dir="${temp.build.dir}"/>
   190         <mkdir dir="${temp.build.dir}"/>
    74         <if>
   191         <if>
    75             <istrue value="${schema.new}" />
   192             <istrue value="${sysdef3.enabled}" />
    76             <then>
   193             <then>
    77                 <hlm:createPackageMapping epocroot="${build.drive}" destFile="${ado.mapping.file}">
   194                 <hlm:createPackageMapping epocroot="${build.drive}" destFile="${ado.mapping.file}">
    78                     <path refid="system.definition.files" />
   195                     <path refid="system.definition.files" />
    79                 </hlm:createPackageMapping>
   196                 </hlm:createPackageMapping>
    80                 <if>
   197                 <if>
   119     </target>
   236     </target>
   120     
   237     
   121     <!-- Target to generate cenreps using cone tool -->
   238     <!-- Target to generate cenreps using cone tool -->
   122     <target name="ido-gen-cenrep">
   239     <target name="ido-gen-cenrep">
   123         <mkdir dir="${post.log.dir}" />
   240         <mkdir dir="${post.log.dir}" />
   124         <for list="${sysdef.configurations.list}" delimiter="," param="sysdef.config">
   241         <mkdir dir="${temp.build.dir}" />
   125             <sequential>
   242         <tempfile property="cenrep.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}"/>
   126                 <var name="confml.log.file" unset="true"/>
   243         <fmpp sourceFile="${helium.dir}/tools/common/templates/ido/ido-cenrep-gen.xml.ftl"
   127                 <if>
   244               outputfile="${cenrep.dynamic.config}">
   128                     <or>
   245             <data expandProperties="yes">
   129                         <equals arg1="${build.system}" arg2="sbs" />
   246                 dbPath: ${metadata.dbfile}
   130                         <equals arg1="${build.system}" arg2="sbs-ec" />
   247                 ant: antProperties()
   131                     </or>
   248                 os: eval('System.getProperty("os.name")')
   132                     <then>
   249             </data>
   133                         <hlm:getsbsinputs config="sbs.@{sysdef.config}" outputProperty="sbs.internal.inputs.list"/>
   250         </fmpp>
   134                         <for list="${sbs.internal.inputs.list}" delimiter="," param="sbs.input">
   251         <ant antfile="${cenrep.dynamic.config}"/>
   135                             <sequential>
       
   136                                 <hlm:getVariableValue name="--logfile" property="sbs.log.file">
       
   137                                     <hlm:sbsinput refid="@{sbs.input}" />
       
   138                                 </hlm:getVariableValue>
       
   139                                 <property name="confml.log.file" value="${sbs.log.file}"/>
       
   140                             </sequential>
       
   141                         </for>
       
   142                     </then>
       
   143                     <else>
       
   144                         <property name="confml.log.file" value="${compile.log.dir}/${build.id}.@{sysdef.config}_compile.log"/>
       
   145                     </else>
       
   146                 </if>
       
   147             </sequential>
       
   148         </for>
       
   149         <echo>confml.log.file = ${confml.log.file}</echo>
       
   150         <if>
       
   151             <available file="${confml.log.file}"/>
       
   152             <then>
       
   153                 <hlm:grepMacro filename="${confml.log.file}" regexp="([^\\/.]*?)\.confml" output="confml.file.list"/>
       
   154                 <for list="${confml.file.list}" delimiter="," param="confml.file">
       
   155                     <sequential>
       
   156                         <var name="crml.regexp" unset="true"/>
       
   157                         <echo>confml.file = @{confml.file}</echo>
       
   158                         <hlm:conEToolMacro>
       
   159                             <arg name="output" value="${post.log.dir}/${build.id}_cenrep.cone.log"/>
       
   160                             <arg name="path" value="${build.drive}/epoc32/tools/" />
       
   161                             <arg name="-v" value="5" />
       
   162                             <arg name="-p" value="${build.drive}\epoc32\rom\config\assets\s60" />
       
   163                             <arg name="-o" value="${build.drive}\epoc32\release\winscw\urel\z" />
       
   164                             <arg name="-c" value="root.confml" />
       
   165                             <arg name="-i" value="@{confml.file}" />
       
   166                         </hlm:conEToolMacro>
       
   167                         <hlm:conEToolMacro>
       
   168                             <arg name="output" value="${post.log.dir}/${build.id}_cenrep.cone.log"/>
       
   169                             <arg name="path" value="${build.drive}/epoc32/tools/" />
       
   170                             <arg name="-v" value="5" />
       
   171                             <arg name="-p" value="${build.drive}\epoc32\rom\config\assets\s60" />
       
   172                             <arg name="-o" value="${build.drive}\epoc32\release\winscw\udeb\z" />
       
   173                             <arg name="-c" value="root.confml" />
       
   174                             <arg name="-i" value="@{confml.file}" />
       
   175                         </hlm:conEToolMacro>
       
   176                     </sequential>
       
   177                 </for>
       
   178             </then>
       
   179         </if>
       
   180         <copy file="${post.log.dir}/${build.id}_cenrep.cone.log" tofile="${temp.build.dir}/${build.id}_cenrep_includefile.txt" overwrite="true" failonerror="false">
   252         <copy file="${post.log.dir}/${build.id}_cenrep.cone.log" tofile="${temp.build.dir}/${build.id}_cenrep_includefile.txt" overwrite="true" failonerror="false">
   181             <filterchain>
   253             <filterchain>
   182                 <linecontainsregexp>
   254                 <linecontainsregexp>
   183                     <regexp pattern="^\s*Generating file"/>
   255                     <regexp pattern="^\s*Generating file"/>
   184                 </linecontainsregexp>
   256                 </linecontainsregexp>
   192                     <metadatafilter priority="warning" regex="^WARNING\s+:.*" description="cone warnings" />
   264                     <metadatafilter priority="warning" regex="^WARNING\s+:.*" description="cone warnings" />
   193                     <metadatafilter priority="info" regex="^INFO\s+:.*" description="cone info" />
   265                     <metadatafilter priority="info" regex="^INFO\s+:.*" description="cone info" />
   194                 </metadatafilterset>
   266                 </metadatafilterset>
   195             </hlm:textmetadatainput>
   267             </hlm:textmetadatainput>
   196         </hlm:metadatarecord>
   268         </hlm:metadatarecord>
   197         <hlm:metadataCountSeverity severity="ERROR" log="${build.id}_cenrep.cone.log" db="${metadata.dbfile}" property="cone.error.total"/>
   269         <hlm:metadataCountSeverity severity="ERROR" log="${post.log.dir}/${build.id}_cenrep.cone.log" database="${metadata.dbfile}" property="cone.error.total"/>
   198         <echo>ConE error: ${cone.error.total}</echo>
   270         <echo>ConE error: ${cone.error.total}</echo>
   199         <hlm:generateBuildStatus file="${build.id}_cenrep.cone.log" />
   271         <hlm:generateBuildStatus file="${post.log.dir}/${build.id}_cenrep.cone.log" />
   200     </target>
   272     </target>
   201     
   273     
   202     <!--* @property keep.internals
   274     <!-- To validate confml files of packages.-->
   203     Set to 'true' so ido-prep-copy includes 'internal' directories.
   275     <target name="ido-validate-confml" if="internal.package.cone.validation.enabled">
   204     @type boolean
   276         <mkdir dir="${post.log.dir}" />
   205     @scope public
   277         <mkdir dir="${temp.build.dir}" />
   206     -->
   278         <tempfile property="confml.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}"/>
   207 
   279         <fmpp sourceFile="${helium.dir}/tools/common/templates/ido/ido-confml-validate.ant.xml.ftl"
   208     <!--* @property ido.prep.copy.template
   280               outputfile="${confml.dynamic.config}">
   209     Defines which template to use in order to achive the package copying.
   281             <data expandProperties="yes">
   210     @type boolean
   282                 dbPath: ${metadata.dbfile}
       
   283                 ant: antProperties()
       
   284                 os: eval('System.getProperty("os.name")')
       
   285             </data>
       
   286         </fmpp>
       
   287         <trycatch property="confml.validate.thrown">
       
   288             <try>
       
   289                 <ant antfile="${confml.dynamic.config}"/>
       
   290             </try>
       
   291             <catch>
       
   292                 <fail message="${confml.validate.thrown}"/>
       
   293             </catch>
       
   294             <finally>
       
   295                 <hlm:metadatarecord database="${metadata.dbfile}">
       
   296                     <hlm:textmetadatainput>
       
   297                         <fileset dir="" casesensitive="false" file="${post.log.dir}/${build.id}_validate_confml.log" />
       
   298                         <metadatafilterset>
       
   299                             <metadatafilter priority="error" regex="^ERROR\s+:.*" description="cone error" />
       
   300                             <metadatafilter priority="warning" regex="^WARNING\s+:.*" description="cone warnings" />
       
   301                             <metadatafilter priority="info" regex="^INFO\s+:.*" description="cone info" />
       
   302                             <metadatafilter priority="error" regex="\s*[1-9]\d*\s*problem\(s\).*?" description="cone validation error" />
       
   303                         </metadatafilterset>
       
   304                     </hlm:textmetadatainput>
       
   305                 </hlm:metadatarecord>
       
   306                 <hlm:metadataCountSeverity severity="ERROR" log="${post.log.dir}/${build.id}_validate_confml.log" database="${metadata.dbfile}" property="confml.validate.error.total"/>
       
   307                 <echo>ConE error: ${confml.validate.error.total}</echo>
       
   308                 <hlm:generateBuildStatus file="${build.id}_validate_confml.log" />
       
   309                 <hlm:signalMacro logfile="${post.log.dir}/${build.id}_validate_confml.log" phase="post" signal.input="ConEValidateSignalInput" />
       
   310             </finally>
       
   311         </trycatch>
       
   312         
       
   313     </target>
       
   314 
       
   315 
       
   316     <!--* Defines which template to use in order to achive the package copying.
       
   317     @type string
   211     @scope public
   318     @scope public
   212     -->
   319     -->
   213     <property name="ido.prep.copy.template" location="${helium.dir}/tools/common/templates/ido/ido-ant-copy.xml.ftl" />
   320     <property name="ido.prep.copy.template" location="${helium.dir}/tools/common/templates/ido/ido-ant-copy.xml.ftl" />
   214     
   321     
   215     <!-- Target that uses the information from the system.definition.files to prepare the IDO build area.
   322     <!-- Target that uses the information from the system.definition.files to prepare the IDO build area.
   216         It relies on the fact that layer_real_source_path entity is declared in each ADO configuration.
   323         It relies on the fact that layer_real_source_path entity is declared in each ADO configuration.
   217         
   324         
   218         By default it deletes the previous content. If you want to backup what was previoulsy used please
   325         By default it deletes the previous content. If you want to backup what was previoulsy used please
   219         defined '''ido.keep.old''' property.         
   326         defined '''keep.old.source.enabled''' property.         
   220         -->
   327         -->
   221     <target name="ido-prep-copy" depends="ido-create-ado-mapping">
   328     <target name="ido-prep-copy" depends="ido-create-ado-mapping">
   222         <mkdir dir="${temp.build.dir}"/>
   329         <mkdir dir="${temp.build.dir}"/>
   223         <tempfile property="prep.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}"/>
   330         <tempfile property="prep.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}"/>
   224         <fmpp sourceFile="${ido.prep.copy.template}"
   331         <fmpp sourceFile="${ido.prep.copy.template}"
   266                     </else>
   373                     </else>
   267                 </if>
   374                 </if>
   268             </then>
   375             </then>
   269         </if>
   376         </if>
   270         
   377         
   271         <antcall target="compile-main">
   378         <antcall target="compile-main" inheritRefs="true">
   272             <param name="sysdef.configurations.list" value="${sysdef.clean.configurations.list}"/>
   379             <param name="sysdef.configurations.list" value="${sysdef.clean.configurations.list}"/>
   273             <param name="compile.signal.input" value="compileCleanSignalInput"/>
   380             <param name="compile.signal.input" value="compileCleanSignalInput"/>
   274             <param name="compile.discard.result" value="true"/>
   381             <param name="internal.compile.discard.result.enabled" value="true"/>
   275             <param name="compile.cmd.clean" value="true"/>
   382             <param name="internal.compile.cmd.clean.enabled" value="true"/>
   276         </antcall>
   383         </antcall>
   277     </target>
       
   278 
       
   279 
       
   280 
       
   281     <!--
       
   282       Internal target that set an intermediate property to disable codescanner execution.
       
   283     -->
       
   284     <target name="ido-codescanner-skip">
       
   285         <condition property="do.skip.codescanner" value="1">
       
   286             <istrue value="${skip.codescanner}"/>
       
   287         </condition>
       
   288     </target>
   384     </target>
   289 
   385 
   290     <!--
   386     <!--
   291         This targets run the codescanner application on each discovered ADO.
   387         This targets run the codescanner application on each discovered ADO.
   292         The location of the output is defined byt '''ido.codescanner.output.dir''' property.
   388         The location of the output is defined byt '''ido.codescanner.output.dir''' property.
   293         And the type is defined by '''ido.codescanner.output.type''' (default is HTML). 
   389         And the type is defined by '''ido.codescanner.output.type''' (default is HTML). 
   294     -->
   390     -->
   295     <target name="ido-codescanner" depends="ido-create-ado-mapping,ido-codescanner-skip" unless="do.skip.codescanner">
   391     <target name="ido-codescanner" depends="ido-create-ado-mapping" if="internal.codescanner.enabled">
       
   392         
   296         <!--hlm:iniKeys2Path ini="${ado.mapping.file}" pathid="ado.src.path"/-->
   393         <!--hlm:iniKeys2Path ini="${ado.mapping.file}" pathid="ado.src.path"/-->
   297         <!-- Defines the format of Codescanner output (html|xml|std).
   394         <!-- Defines the format of Codescanner output (html|xml|std).
   298         @type string
   395         @type string
   299         -->
   396         -->
   300         <property name="ido.codescanner.output.type" value="html"/>
   397         <property name="ido.codescanner.output.type" value="html"/>
   347         <!-- CMT Tool target. Complexity tool measures. Supported options for cmt tool macro is
   444         <!-- CMT Tool target. Complexity tool measures. Supported options for cmt tool macro is
   348         1. input - files to be measured
   445         1. input - files to be measured
   349         2. output - output xml file (file size is huge 68MB for JAVA IDO, if this needs to be send, need to consider
   446         2. output - output xml file (file size is huge 68MB for JAVA IDO, if this needs to be send, need to consider
   350         3. config - input config . 
   447         3. config - input config . 
   351         -->
   448         -->
   352     <target name="ido-cmt" depends="ido-create-ado-mapping" if="enable.cmt">
   449     <target name="ido-cmt" depends="ido-create-ado-mapping" if="internal.cmt.enabled">
       
   450         
   353         <fmpp sourceFile="${helium.dir}/tools/common/templates/ido/ido-cmt-ant.xml.ftl"
   451         <fmpp sourceFile="${helium.dir}/tools/common/templates/ido/ido-cmt-ant.xml.ftl"
   354                           outputFile="${temp.build.dir}/ido-cmt.ant.xml">
   452                           outputFile="${temp.build.dir}/ido-cmt.ant.xml">
   355             <data expandProperties="yes">
   453             <data expandProperties="yes">
   356                         inputfile: antProperty(ado.quality.mapping.file)
   454                         inputfile: antProperty(ado.quality.mapping.file)
   357                         ant: antProperties()
   455                         ant: antProperties()
   373         which contains 1 new target for each of the input folders found under the build area. Then the 
   471         which contains 1 new target for each of the input folders found under the build area. Then the 
   374         ido-cmt-summary.ant.xml file is called as an ant file and the targets executed. Each target runs
   472         ido-cmt-summary.ant.xml file is called as an ant file and the targets executed. Each target runs
   375         the file scanner looking for CMT summary information which it extracts and writes to an 
   473         the file scanner looking for CMT summary information which it extracts and writes to an 
   376         XML file in the diamonds folder.
   474         XML file in the diamonds folder.
   377         -->
   475         -->
   378     <target name="cmt-generate-diamond-summary" if="enable.cmt">
   476     <target name="cmt-generate-diamond-summary" if="internal.cmt.enabled">
       
   477         
   379         <!--use the header.ftl template file to create the init part of the output file
   478         <!--use the header.ftl template file to create the init part of the output file
   380         that can be copied to the final output file by the java class-->
   479         that can be copied to the final output file by the java class-->
   381         <property name="temp.diamonds.header.xml" location="${env.TEMP}/diamonds_header.xml" />
   480         <property name="temp.diamonds.header.xml" location="${env.TEMP}/diamonds_header.xml" />
   382         <fmpp sourcefile="${helium.dir}/tools/common/templates/diamonds/diamonds_header.ftl" 
   481         <fmpp sourcefile="${helium.dir}/tools/common/templates/diamonds/diamonds_header.ftl" 
   383               outputfile="${temp.diamonds.header.xml}" quiet="true"/>
   482               outputfile="${temp.diamonds.header.xml}" quiet="true"/>
   448             </fileset>
   547             </fileset>
   449         </copy>    
   548         </copy>    
   450         
   549         
   451     </target>
   550     </target>
   452 
   551 
   453     <!-- Gets the contents from GRACE / Dragonfly -->
   552     <!-- Gets the contents from a network drive or Dragonfly -->
   454     <target name="ido-check-latest-release" depends="ido-check-latest-release-grace" unless="env.HLM_SUBCON">
   553     <target name="ido-check-latest-release" depends="ido-check-latest-release-grace" unless="env.HLM_SUBCON">
   455         <runtarget target="ido-check-latest-release-dragonfly"/>
   554         <runtarget target="ido-check-latest-release-dragonfly"/>
   456     </target>
   555     </target>
   457 
   556 
   458     <!--* @property s60.grace.server
   557     <!--* @property s60.grace.server
   459         UNC path to GRACE server.
   558         UNC path to file server.
   460         @type string
   559         @type string
   461         @editable required
   560         @editable required
   462         @scope public
   561         @scope public
   463     -->
   562     -->
   464     <!--* @property s60.grace.service
   563     <!--* @property s60.grace.service
   465         GRACE service to look into.
   564         File service to look into.
   466         @type string
   565         @type string
   467         @editable required
   566         @editable required
   468         @scope public
   567         @scope public
   469     -->
   568     -->
   470     <!--* @property s60.grace.product
   569     <!--* @property s60.grace.product
   471         GRACE product to look into.
   570         Product to look into.
   472         @type string
   571         @type string
   473         @editable required
   572         @editable required
   474         @scope public
   573         @scope public
   475     -->
   574     -->
   476     <!--* @property s60.grace.release
   575     <!--* @property s60.grace.release
   477         Regular expression to match a particular GRACE realease.
   576         Regular expression to match a particular realease.
   478         @type string
   577         @type string
   479         @editable required
   578         @editable required
   480         @scope public
   579         @scope public
   481     -->
   580     -->
   482     <!--* @property s60.grace.release.fixbuildregex
   581     <!--* @property s60.grace.release.fixbuildregex
   483         Regular expression to match a particular GRACE release fixbuilds. Example _(.*?)$ or _(\d+)$ 
   582         Regular expression to match a particular release fixbuilds. Example _(.*?)$ or _(\d+)$ 
   484         @type string
   583         @type string
   485         @editable required
   584         @editable required
   486         @scope public
   585         @scope public
   487     -->
   586     -->
   488     <!--* @property s60.grace.cache
   587     <!--* @property s60.grace.cache
   490         @type string
   589         @type string
   491         @editable required
   590         @editable required
   492         @scope public
   591         @scope public
   493     -->
   592     -->
   494     <!--* @property s60.grace.checkmd5
   593     <!--* @property s60.grace.checkmd5
   495         Enable MD5 validation for GRACE metadata (default: false).
   594         Enable MD5 validation for release metadata (default: false).
   496         @type boolean
   595         @type boolean
   497         @editable required
   596         @editable required
   498         @scope public
   597         @scope public
   499     -->
   598         @deprecate Since 11.0
       
   599     -->
       
   600     
       
   601     <!--* @property s60.grace.checkmd5.enabled
       
   602         Enable MD5 validation for release metadata (default: false).
       
   603         @type boolean
       
   604         @editable required
       
   605         @scope public
       
   606     -->
       
   607     
       
   608     <!--* @property internal.s60.grace.checkmd5.enabled
       
   609         set if s60.grace.checkmd5.enabled set to true.
       
   610         @type boolean
       
   611         @scope private
       
   612     -->
       
   613     
   500     <!--* @property s60.grace.revision
   614     <!--* @property s60.grace.revision
   501         Defined the regular expression to find a particular revision.
   615         Defined the regular expression to find a particular revision.
   502         @type string
   616         @type string
   503         @editable required
   617         @editable required
   504         @scope public
   618         @scope public
   505     -->
   619     -->
   506     <!--* @property s60.grace.usetickler
   620     <!--* @property s60.grace.usetickler
   507         Enable the detection of ready release using GRACE tickler mechanism.
   621         Enable the detection of ready release using release tickler mechanism.
   508         @type boolean
   622         @type boolean
   509         @editable required
   623         @editable required
   510         @scope public
   624         @scope public
   511     -->
   625     -->
   512 
   626     
   513     <!-- Checks the contents from GRACE release. Mainly used by IDOs. But could be
   627     <!-- Check is the s60.grace.checkmd5.enabled is set -->
   514     extended to product builds.-->    
   628     <condition property="internal.s60.grace.checkmd5.enabled" else="false" value="true">
   515     <target name="ido-check-latest-release-grace" unless="use.dragonfly">
   629         <or>
       
   630             <istrue value="${s60.grace.checkmd5.enabled}"/>
       
   631             <istrue value="${s60.grace.checkmd5}"/>
       
   632         </or>
       
   633     </condition>
       
   634     <!-- Checks the contents from the release. -->    
       
   635     <target name="ido-check-latest-release-grace" unless="internal.dragonfly.enabled">
   516         <script language="jython" setbeans="false">
   636         <script language="jython" setbeans="false">
   517 import os
   637 import os
   518 import idoprep
   638 import idoprep
   519 
   639 
   520 result = idoprep.get_s60_env_details(project.getProperty('s60.grace.server'), project.getProperty('s60.grace.service'), project.getProperty('s60.grace.product'), project.getProperty('s60.grace.release'), project.getProperty('s60.grace.revision'), project.getProperty('s60.grace.cache'), project.getProperty('s60.grace.checkmd5'), project.getProperty('s60.grace.usetickler'))
   640 result = idoprep.get_s60_env_details(project.getProperty('s60.grace.server'), project.getProperty('s60.grace.service'), project.getProperty('s60.grace.product'), project.getProperty('s60.grace.release'), project.getProperty('s60.grace.revision'), project.getProperty('s60.grace.cache'), project.getProperty('internal.s60.grace.checkmd5.enabled'), project.getProperty('s60.grace.usetickler'))
   521 resultname = os.path.basename(result[0])
   641 resultname = os.path.basename(result[0])
   522 project.setProperty('s60.getenv.path', str(result[0]))
   642 project.setProperty('s60.getenv.path', str(result[0]))
   523 project.setProperty('s60.getenv.release', str(resultname))
   643 project.setProperty('s60.getenv.release', str(resultname))
   524 version = idoprep.get_version(project.getProperty('build.drive'), resultname)
   644 version = idoprep.get_version(project.getProperty('build.drive'), resultname)
   525 if version is None or version.strip() != resultname:
   645 if version is None or version.strip() != resultname:
   526     project.setProperty('s60.getenv.update', "1")
   646     project.setProperty('s60.getenv.update', "1")
   527         </script>
   647         </script>
   528     </target>
   648     </target>
   529 
   649 
   530     <!-- Updates the build area from either GRACE / dragonfly server.-->
   650     <!-- Updates the build area from either a network drive or Dragonfly server.-->
   531     <target name="ido-update-build-area" depends="backup-subst-drives,ido-update-build-area-grace" unless="env.HLM_SUBCON">
   651     <target name="ido-update-build-area" depends="backup-subst-drives,ido-update-build-area-grace" unless="env.HLM_SUBCON">
   532         <runtarget target="ido-update-build-area-dragonfly"/>
   652         <runtarget target="ido-update-build-area-dragonfly"/>
   533     </target>
   653     </target>
   534 
   654 
   535     <!-- Creates the build area by getting the contents from GRACE release.-->    
   655     <!-- Creates the build area by getting the contents from the release.-->    
   536     <target name="ido-update-build-area-grace" if="s60.getenv.update" depends="ido-check-latest-release" unless="use.dragonfly">
   656     <target name="ido-update-build-area-grace" if="s60.getenv.update" depends="ido-check-latest-release" unless="internal.dragonfly.enabled">
   537         <!-- Just get S60 for IDOs -->
   657         <!-- Just get S60 for IDOs -->
   538         <echo>Location of the new S60 release:${s60.getenv.path}</echo>
   658         <echo>Location of the new S60 release:${s60.getenv.path}</echo>
   539         <tstamp>
   659         <tstamp>
   540             <format property="getenv.tstamp" pattern="yyyyMMddHHmmss"/>
   660             <format property="getenv.tstamp" pattern="yyyyMMddHHmmss"/>
   541         </tstamp>
   661         </tstamp>
   615         </pre>
   735         </pre>
   616     -->
   736     -->
   617     <scriptdef name="iniKeys2Path" language="beanshell" uri="http://www.nokia.com/helium">
   737     <scriptdef name="iniKeys2Path" language="beanshell" uri="http://www.nokia.com/helium">
   618         <attribute name="ini"/>
   738         <attribute name="ini"/>
   619         <attribute name="pathid"/>
   739         <attribute name="pathid"/>
   620         if (attributes.get("ini") == null)
   740 if (attributes.get("ini") == null) {
   621             throw new org.apache.tools.ant.BuildException("ini is not defined");
   741     throw new org.apache.tools.ant.BuildException("ini is not defined");
   622         if (attributes.get("pathid") == null)
   742 }
   623             throw new org.apache.tools.ant.BuildException("pathid is not defined");
   743 if (attributes.get("pathid") == null) {
   624         try {
   744     throw new org.apache.tools.ant.BuildException("pathid is not defined");
   625             java.io.FileInputStream pin = new java.io.FileInputStream(attributes.get("ini"));
   745 }
   626             java.util.Properties props = new java.util.Properties();
   746 try {
   627             props.load(pin);
   747     java.io.FileInputStream pin = new java.io.FileInputStream(attributes.get("ini"));
   628             org.apache.tools.ant.types.Path path = project.createDataType("path");
   748     java.util.Properties props = new java.util.Properties();
   629             for (java.util.Iterator i = props.stringPropertyNames().iterator(); i.hasNext() ; ) { 
   749     props.load(pin);
   630                 org.apache.tools.ant.types.Path.PathElement pe = (org.apache.tools.ant.types.Path.PathElement)path.createPathElement();
   750     org.apache.tools.ant.types.Path path = project.createDataType("path");
   631                 pe.setPath(i.next()); 
   751     for (java.util.Iterator i = props.stringPropertyNames().iterator(); i.hasNext() ; ) { 
   632             }
   752         org.apache.tools.ant.types.Path.PathElement pe = (org.apache.tools.ant.types.Path.PathElement)path.createPathElement();
   633             self.log("Creating reference: " + attributes.get("pathid"));
   753         pe.setPath(i.next()); 
   634             project.addReference(attributes.get("pathid"), path);
   754     }
   635         } catch (java.io.IOException e) {
   755     self.log("Creating reference: " + attributes.get("pathid"));
   636             throw new org.apache.tools.ant.BuildException(e);
   756     project.addReference(attributes.get("pathid"), path);
   637         }
   757 }
       
   758 catch (java.io.IOException e) {
       
   759     throw new org.apache.tools.ant.BuildException(e);
       
   760 }
   638     </scriptdef>
   761     </scriptdef>
   639 
   762 
   640     <!-- Target to get the Substituted drives information-->
   763     <!-- Target to get the Substituted drives information-->
   641     <target name="backup-subst-drives">
   764     <target name="backup-subst-drives">
   642         <exec dir="${cache.dir}" executable="subst.exe" osfamily="windows" output="${cache.dir}\hlmsubsteddrives.bat" failonerror="false"/>
   765         <exec dir="${cache.dir}" executable="subst.exe" osfamily="windows" output="${cache.dir}\hlmsubsteddrives.bat" failonerror="false"/>