buildframework/helium/tools/preparation/ido-prep.ant.xml
author andy simpson <andrews@symbian.org>
Fri, 30 Jul 2010 15:14:33 +0100
changeset 622 c26070468a42
parent 588 c7c26511138f
child 628 7c4a911dc066
permissions -rw-r--r--
Add export for s60ibymacros.pm (re-applies missing part of fix for Bug 2901
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     2
<!-- 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     3
============================================================================ 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     4
Name        : ido-prep.ant.xml 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     5
Part of     : Helium 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     6
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     7
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     8
All rights reserved.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     9
This component and the accompanying materials are made available
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    10
under the terms of the License "Eclipse Public License v1.0"
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    11
which accompanies this distribution, and is available
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    12
at the URL "http://www.eclipse.org/legal/epl-v10.html".
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    13
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    14
Initial Contributors:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    15
Nokia Corporation - initial contribution.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    16
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    17
Contributors:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    18
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    19
Description:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    20
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    21
============================================================================
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    22
-->
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    23
<!--* @package preparation -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    24
<project name="ido-prep" xmlns:hlm="http://www.nokia.com/helium">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    25
    <description>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    26
        IDO related targets.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    27
         * Build area preparation
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    28
         * Codescanner integration
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    29
         * Cenrep generation (old way)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    30
         * IBY export (old way)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    31
    </description>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    32
        
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    33
    <!-- Path to a INI file that contains the mapping between the ADO from Synergy WA and it's location on the BA.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    34
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    35
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    36
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    37
    <property name="ado.mapping.file" location="${build.output.dir}/build/ado_mapping.ini"/>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    38
    <!-- Path to a INI file that contains the mapping between the ADO from Synergy WA and it's location on the BA for quality targets.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    39
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    40
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    41
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    42
    <property name="ado.quality.mapping.file" location="${build.output.dir}/build/ado_quality_mapping.ini"/>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    43
    <!-- Path to the build romtree; the location contains iby files. Default value is "${build.drive}${env.EPOCROOT}/epoc32/rom/include"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    44
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    45
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    46
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    47
    <property name="ido.romtree" location="${build.drive}${env.EPOCROOT}/epoc32/rom/include"  />
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    48
    <!-- Path to the cenrep root. Default value is "${build.drive}${env.EPOCROOT}/epoc32/tools/cenrep/ido/src"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    49
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    50
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    51
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    52
    <property name="ido.cenrep.root" location="${build.drive}${env.EPOCROOT}/epoc32/tools/cenrep/ido/src"  />
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    53
    <!-- Path to the cenrep target directory. Default value is "${build.drive}${env.EPOCROOT}/epoc32/data/z/private/10202be9"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    54
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    55
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    56
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    57
    <property name="ido.cenrep.target" value="${build.drive}${env.EPOCROOT}/epoc32/data/z/private/10202be9"  />
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    58
    <!-- Defines the location of Codescanner output.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    59
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    60
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    61
    <property name="ido.codescanner.output.dir" location="${build.output.dir}/${build.id}_codescanner"/>
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    62
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    63
    <!-- Defines the location of CMT++ output and the input for the diamonds creation target.
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    64
    @type string
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    65
    -->
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    66
    <property name="ido.cmt.html.output.dir" location="${build.log.dir}/${build.id}_cmt"/>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    67
    
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    68
    <!-- Internal target that generates the '''ado.mapping.file'''.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    69
     It is a INI file that contains ADO location as a key and target location as value.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    70
    -->
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    71
    <target name="ido-create-ado-mapping">
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    72
        <mkdir dir="${build.output.dir}/build"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    73
        <mkdir dir="${temp.build.dir}"/>
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    74
        <if>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    75
            <istrue value="${schema.new}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    76
            <then>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    77
                <hlm:createPackageMapping epocroot="${build.drive}" destFile="${ado.mapping.file}">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    78
                    <path refid="system.definition.files" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    79
                </hlm:createPackageMapping>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    80
                <if>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    81
                    <isreference refid="ado.quality.dirs" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    82
                    <then>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    83
                        <hlm:createPackageMapping epocroot="${build.drive}" destFile="${ado.quality.mapping.file}"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    84
                            filterDirSet="ado.quality.dirs" >
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    85
                            <path refid="system.definition.files" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    86
                        </hlm:createPackageMapping>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    87
                    </then>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    88
                    <else>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    89
                        <copy file="${ado.mapping.file}" tofile="${ado.quality.mapping.file}" overwrite="true" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    90
                    </else>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    91
                </if>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    92
            </then>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    93
            <else>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    94
                <tempfile property="prep.dynamic.sysdef.config" suffix=".txt" deleteonexit="false" destdir="${temp.build.dir}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    95
                <trycatch property="error.message">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    96
                    <try>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    97
                        <hlm:referenceToFileMacro refid="system.definition.files" output="${prep.dynamic.sysdef.config}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    98
                    </try>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    99
                    <catch>       
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   100
                        <propertyregex property="message" input="${error.message}"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   101
                          regexp=":(.*)$"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   102
                          select="\1" casesensitive="false" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   103
                        <fail message="Error: ${message}" />     
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   104
                    </catch>               
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   105
                </trycatch>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   106
                <trycatch>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   107
                    <try>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   108
                        <pathconvert pathsep="," property="ado.quality.dirs.path">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   109
                            <dirset refid="ado.quality.dirs"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   110
                        </pathconvert>                              
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   111
                    </try>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   112
                </trycatch>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   113
                <script language="jython" setbeans="false">
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   114
import idoprep
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   115
idoprep.create_ado_mapping(project.getProperty(r"prep.dynamic.sysdef.config"), project.getProperty(r"ado.mapping.file"), project.getProperty(r"ado.quality.mapping.file"), project.getProperty(r"build.drive"), project.getProperty("ado.quality.dirs.path"))
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   116
                </script>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   117
            </else>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   118
        </if>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   119
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   120
    
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   121
    <!-- Target to generate cenreps using cone tool -->
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   122
    <target name="ido-gen-cenrep">
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   123
        <mkdir dir="${post.log.dir}" />
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   124
        <for list="${sysdef.configurations.list}" delimiter="," param="sysdef.config">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   125
            <sequential>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   126
                <var name="confml.log.file" unset="true"/>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   127
                <if>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   128
                    <or>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   129
                        <equals arg1="${build.system}" arg2="sbs" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   130
                        <equals arg1="${build.system}" arg2="sbs-ec" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   131
                    </or>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   132
                    <then>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   133
                        <hlm:getsbsinputs config="sbs.@{sysdef.config}" outputProperty="sbs.internal.inputs.list"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   134
                        <for list="${sbs.internal.inputs.list}" delimiter="," param="sbs.input">
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   135
                            <sequential>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   136
                                <hlm:getVariableValue name="--logfile" property="sbs.log.file">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   137
                                    <hlm:sbsinput refid="@{sbs.input}" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   138
                                </hlm:getVariableValue>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   139
                                <property name="confml.log.file" value="${sbs.log.file}"/>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   140
                            </sequential>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   141
                        </for>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   142
                    </then>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   143
                    <else>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   144
                        <property name="confml.log.file" value="${compile.log.dir}/${build.id}.@{sysdef.config}_compile.log"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   145
                    </else>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   146
                </if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   147
            </sequential>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   148
        </for>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   149
        <echo>confml.log.file = ${confml.log.file}</echo>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   150
        <if>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   151
            <available file="${confml.log.file}"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   152
            <then>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   153
                <hlm:grepMacro filename="${confml.log.file}" regexp="([^\\/.]*?)\.confml" output="confml.file.list"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   154
                <for list="${confml.file.list}" delimiter="," param="confml.file">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   155
                    <sequential>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   156
                        <var name="crml.regexp" unset="true"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   157
                        <echo>confml.file = @{confml.file}</echo>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   158
                        <hlm:conEToolMacro>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   159
                            <arg name="output" value="${post.log.dir}/${build.id}_cenrep.cone.log"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   160
                            <arg name="path" value="${build.drive}/epoc32/tools/" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   161
                            <arg name="-v" value="5" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   162
                            <arg name="-p" value="${build.drive}\epoc32\rom\config\assets\s60" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   163
                            <arg name="-o" value="${build.drive}\epoc32\release\winscw\urel\z" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   164
                            <arg name="-c" value="root.confml" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   165
                            <arg name="-i" value="@{confml.file}" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   166
                        </hlm:conEToolMacro>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   167
                        <hlm:conEToolMacro>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   168
                            <arg name="output" value="${post.log.dir}/${build.id}_cenrep.cone.log"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   169
                            <arg name="path" value="${build.drive}/epoc32/tools/" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   170
                            <arg name="-v" value="5" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   171
                            <arg name="-p" value="${build.drive}\epoc32\rom\config\assets\s60" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   172
                            <arg name="-o" value="${build.drive}\epoc32\release\winscw\udeb\z" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   173
                            <arg name="-c" value="root.confml" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   174
                            <arg name="-i" value="@{confml.file}" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   175
                        </hlm:conEToolMacro>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   176
                    </sequential>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   177
                </for>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   178
            </then>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   179
        </if>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   180
        <copy file="${post.log.dir}/${build.id}_cenrep.cone.log" tofile="${temp.build.dir}/${build.id}_cenrep_includefile.txt" overwrite="true" failonerror="false">
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   181
            <filterchain>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   182
                <linecontainsregexp>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   183
                    <regexp pattern="^\s*Generating file"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   184
                </linecontainsregexp>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   185
            </filterchain>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   186
        </copy>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   187
        <hlm:metadatarecord database="${metadata.dbfile}">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   188
            <hlm:textmetadatainput>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   189
                <fileset casesensitive="false" file="${post.log.dir}/${build.id}_cenrep.cone.log" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   190
                <metadatafilterset>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   191
                    <metadatafilter priority="error" regex="^ERROR\s+:.*" description="cone error" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   192
                    <metadatafilter priority="warning" regex="^WARNING\s+:.*" description="cone warnings" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   193
                    <metadatafilter priority="info" regex="^INFO\s+:.*" description="cone info" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   194
                </metadatafilterset>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   195
            </hlm:textmetadatainput>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   196
        </hlm:metadatarecord>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   197
        <hlm:metadataCountSeverity severity="ERROR" log="${build.id}_cenrep.cone.log" db="${metadata.dbfile}" property="cone.error.total"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   198
        <echo>ConE error: ${cone.error.total}</echo>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   199
        <hlm:generateBuildStatus file="${build.id}_cenrep.cone.log" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   200
    </target>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   201
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   202
    <!--* @property keep.internals
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   203
    Set to 'true' so ido-prep-copy includes 'internal' directories.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   204
    @type boolean
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   205
    @scope public
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   206
    -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   207
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   208
    <!--* @property ido.prep.copy.template
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   209
    Defines which template to use in order to achive the package copying.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   210
    @type boolean
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   211
    @scope public
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   212
    -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   213
    <property name="ido.prep.copy.template" location="${helium.dir}/tools/common/templates/ido/ido-ant-copy.xml.ftl" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   214
    
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   215
    <!-- Target that uses the information from the system.definition.files to prepare the IDO build area.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   216
        It relies on the fact that layer_real_source_path entity is declared in each ADO configuration.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   217
        
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   218
        By default it deletes the previous content. If you want to backup what was previoulsy used please
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   219
        defined '''ido.keep.old''' property.         
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   220
        -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   221
    <target name="ido-prep-copy" depends="ido-create-ado-mapping">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   222
        <mkdir dir="${temp.build.dir}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   223
        <tempfile property="prep.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}"/>
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   224
        <fmpp sourceFile="${ido.prep.copy.template}"
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   225
            outputFile="${prep.dynamic.config}">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   226
            <data expandProperties="yes">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   227
                inputfile: antProperty(ado.mapping.file)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   228
                ant: antProperties()
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   229
                    data: eval('
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   230
                            java.io.FileInputStream pin = new java.io.FileInputStream(filename);
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   231
                            java.util.Properties props = new java.util.Properties();
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   232
                            props.load(pin);
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   233
                            return props;
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   234
                            ', {filename:get(inputfile)})
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   235
            </data>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   236
        </fmpp>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   237
        <ant antfile="${prep.dynamic.config}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   238
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   239
    
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   240
    
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   241
    <!--
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   242
    Run cleanup system definition configuration. The configuration name are
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   243
    generated from the '''sysdef.configurations.list''' property, appending '_clean'
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   244
    at the end of each configuration also reversing their build order.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   245
    if '''sysdef.clean.configurations.list''' is defined it overrides
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   246
    the previous beharvious and is used to cleanup the environment.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   247
    -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   248
    <target name ="ido-prep-clean">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   249
        <if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   250
            <not>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   251
                <isset property="sysdef.clean.configurations.list"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   252
            </not>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   253
            <then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   254
                <if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   255
                    <isset property="sysdef.configurations.list"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   256
                    <then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   257
                        <script language="jython" setbeans="false">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   258
rev_names = ""
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   259
for sysdef in project.getProperty("sysdef.configurations.list").split(","):    
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   260
    rev_names = sysdef + "_clean," + rev_names;
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   261
project.setProperty("sysdef.clean.configurations.list", rev_names)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   262
                        </script>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   263
                    </then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   264
                    <else>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   265
                        <fail message="You should either define sysdef.clean.configurations.list or sysdef.configurations.list."/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   266
                    </else>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   267
                </if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   268
            </then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   269
        </if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   270
        
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   271
        <antcall target="compile-main">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   272
            <param name="sysdef.configurations.list" value="${sysdef.clean.configurations.list}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   273
            <param name="compile.signal.input" value="compileCleanSignalInput"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   274
            <param name="compile.discard.result" value="true"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   275
            <param name="compile.cmd.clean" value="true"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   276
        </antcall>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   277
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   278
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   279
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   280
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   281
    <!--
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   282
      Internal target that set an intermediate property to disable codescanner execution.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   283
    -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   284
    <target name="ido-codescanner-skip">
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   285
        <condition property="do.skip.codescanner" value="1">
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   286
            <istrue value="${skip.codescanner}"/>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   287
        </condition>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   288
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   289
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   290
    <!--
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   291
        This targets run the codescanner application on each discovered ADO.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   292
        The location of the output is defined byt '''ido.codescanner.output.dir''' property.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   293
        And the type is defined by '''ido.codescanner.output.type''' (default is HTML). 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   294
    -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   295
    <target name="ido-codescanner" depends="ido-create-ado-mapping,ido-codescanner-skip" unless="do.skip.codescanner">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   296
        <!--hlm:iniKeys2Path ini="${ado.mapping.file}" pathid="ado.src.path"/-->
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   297
        <!-- Defines the format of Codescanner output (html|xml|std).
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   298
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   299
        -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   300
        <property name="ido.codescanner.output.type" value="html"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   301
        <script language="jython" setbeans="false">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   302
""" internal.codescanner.drive """
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   303
import os
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   304
import fileutils
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   305
import configuration
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   306
import pathaddition.relative
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   307
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   308
config = configuration.PropertiesConfiguration(stream=open(str(project.getProperty("ado.quality.mapping.file")), 'r'))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   309
prefix = pathaddition.relative.commonprefix(config.keys())
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   310
if not os.path.exists(prefix):
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   311
    raise Exception("Could not find common prefix for the following paths:\n" + "\n".join(config.keys()))
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   312
if os.sep == '\\':
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   313
    self.log(str('Substing %s' % prefix))
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   314
    drive = fileutils.get_next_free_drive()
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   315
    fileutils.subst(drive, prefix)
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   316
else:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   317
    drive = prefix
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   318
project.setProperty('internal.codescanner.drive', drive)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   319
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   320
# creating the structure form subst drive.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   321
path = project.createDataType("path")
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   322
for location in config.keys():
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   323
    self.log(str("From %s" % location))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   324
    location = drive + os.sep + pathaddition.relative.abs2rel(location, prefix)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   325
    self.log(str("To %s" % location))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   326
    pe = path.createPathElement()
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   327
    pe.setPath(location)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   328
project.addReference('substed.ado.src.path', path)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   329
        </script>
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   330
        <trycatch property="codescanner.thrown">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   331
            <try>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   332
                <hlm:codescanner dest="${ido.codescanner.output.dir}"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   333
                    format="${ido.codescanner.output.type}"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   334
                    configuration="${ido.codescanner.config}">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   335
                    <path refid="substed.ado.src.path"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   336
                </hlm:codescanner>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   337
            </try>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   338
            <catch>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   339
                <fail message="${codescanner.thrown}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   340
            </catch>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   341
            <finally>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   342
                <hlm:unsubst drive="${internal.codescanner.drive}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   343
            </finally>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   344
        </trycatch>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   345
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   346
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   347
        <!-- CMT Tool target. Complexity tool measures. Supported options for cmt tool macro is
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   348
        1. input - files to be measured
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   349
        2. output - output xml file (file size is huge 68MB for JAVA IDO, if this needs to be send, need to consider
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   350
        3. config - input config . 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   351
        -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   352
    <target name="ido-cmt" depends="ido-create-ado-mapping" if="enable.cmt">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   353
        <fmpp sourceFile="${helium.dir}/tools/common/templates/ido/ido-cmt-ant.xml.ftl"
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   354
                          outputFile="${temp.build.dir}/ido-cmt.ant.xml">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   355
            <data expandProperties="yes">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   356
                        inputfile: antProperty(ado.quality.mapping.file)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   357
                        ant: antProperties()
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   358
                            data: eval('
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   359
                                    java.io.FileInputStream pin = new java.io.FileInputStream(filename);
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   360
                                       java.util.Properties props = new java.util.Properties();
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   361
                                    props.load(pin);
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   362
                                    return props;
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   363
                                    ', {filename:get(inputfile)})
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   364
            </data>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   365
        </fmpp>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   366
        <ant antfile="${temp.build.dir}/ido-cmt.ant.xml"/>
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   367
        <runtarget target="cmt-generate-diamond-summary" />
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   368
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   369
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   370
        <!-- CMT Tool target. Once the CMT tool has been run this scans the results file and puts the
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   371
        results into a .XML file in the diamonds folder ready for transmission to diamonds. 
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   372
        The target uses the ido-cmt-summary-ant.xml.ftl file to create a file called ido-cmt-summary.ant.xml
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   373
        which contains 1 new target for each of the input folders found under the build area. Then the 
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   374
        ido-cmt-summary.ant.xml file is called as an ant file and the targets executed. Each target runs
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   375
        the file scanner looking for CMT summary information which it extracts and writes to an 
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   376
        XML file in the diamonds folder.
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   377
        -->
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   378
    <target name="cmt-generate-diamond-summary" if="enable.cmt">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   379
        <!--use the header.ftl template file to create the init part of the output file
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   380
        that can be copied to the final output file by the java class-->
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   381
        <property name="temp.diamonds.header.xml" location="${env.TEMP}/diamonds_header.xml" />
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   382
        <fmpp sourcefile="${helium.dir}/tools/common/templates/diamonds/diamonds_header.ftl" 
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   383
              outputfile="${temp.diamonds.header.xml}" quiet="true"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   384
        <property name="temp.diamonds.footer.xml" location="${env.TEMP}/diamonds_footer.xml" />
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   385
        <fmpp sourcefile="${helium.dir}/tools/common/templates/diamonds/diamonds_footer.ftl" 
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   386
              outputfile="${temp.diamonds.footer.xml}" quiet="true"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   387
        
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   388
        <hlm:cmtsummarytask diamondsHeaderFileName="${temp.diamonds.header.xml}" diamondsFooterFileName="${temp.diamonds.footer.xml}"
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   389
            outputFile="${diamonds.build.output.dir}/cmt_summary.xml"
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   390
            inputFile="${ido.cmt.html.output.dir}/CMTHTML/index.html" />
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   391
        <delete file="${temp.diamonds.header.xml}" failonerror="false" />
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   392
        <delete file="${temp.diamonds.footer.xml}" failonerror="false" />
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   393
        
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   394
    </target>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   395
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   396
    <!-- Internal target that generates a temporary file that allow the 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   397
    either export of iby or either key*.xls. The generated Ant build file
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   398
    contains two targets with copy insturctions and generic set of fileset rules.     
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   399
    -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   400
    <target name="ido-create-copy-file" depends="ido-create-ado-mapping">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   401
        <tempfile property="copyfile.dynamic.config" suffix=".ant.xml" deleteonexit="false" destdir="${temp.build.dir}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   402
        <fmpp sourceFile="${helium.dir}/tools/common/templates/ido/ido-export.ant.xml.ftl"
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   403
                      outputFile="${copyfile.dynamic.config}">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   404
            <data expandProperties="yes">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   405
                inputfile: antProperty(ado.mapping.file)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   406
                ant: antProperties()
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   407
                data: eval('
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   408
                            java.io.FileInputStream pin = new java.io.FileInputStream(filename);
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   409
                               java.util.Properties props = new java.util.Properties();
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   410
                            props.load(pin);
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   411
                            return props;
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   412
                            ', {filename:get(inputfile)})
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   413
            </data>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   414
        </fmpp>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   415
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   416
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   417
    <!-- Do the export of the ibys from ADO work area level to epoc32 tree. -->    
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   418
    <target name="ido-copy-iby" depends="ido-create-copy-file">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   419
        <ant antfile="${copyfile.dynamic.config}" target="ido-copy-iby"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   420
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   421
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   422
    <!-- Do the export of the Excel keys*.xls from ADO work area level to 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   423
    epoc32 tree.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   424
    -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   425
    <target name="ido-copy-cenrep" depends="ido-create-copy-file">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   426
        <delete dir="${ido.cenrep.root}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   427
        <mkdir dir="${ido.cenrep.root}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   428
        <ant antfile="${copyfile.dynamic.config}" target="ido-copy-cenrep"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   429
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   430
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   431
    <!-- Generated cenrep from exported keys*.xls files. -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   432
    <target name="ido-create-cenrep" depends="ido-copy-cenrep">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   433
        <delete dir="${ido.cenrep.root}/../data"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   434
        <mkdir dir="${ido.cenrep.root}/../data"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   435
        <exec executable="perl" dir="${ido.cenrep.root}" failonerror="true">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   436
            <arg value="${build.drive}/epoc32/tools/cenrep/generate_cenrep_inifile.pl"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   437
            <arg value="-r"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   438
            <arg value="${ido.cenrep.platform}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   439
            <arg value="-d"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   440
            <arg value="${ido.cenrep.root}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   441
            <arg value="-rd"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   442
            <arg value="${ido.cenrep.root}/../data"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   443
        </exec>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   444
        <!-- Copy generated files to target path -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   445
        <copy todir="${ido.cenrep.target}" verbose="true" flatten="true" overwrite="true">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   446
            <fileset dir="${ido.cenrep.root}/../data">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   447
                <include name="*.txt"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   448
            </fileset>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   449
        </copy>    
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   450
        
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   451
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   452
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   453
    <!-- Gets the contents from GRACE / Dragonfly -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   454
    <target name="ido-check-latest-release" depends="ido-check-latest-release-grace" unless="env.HLM_SUBCON">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   455
        <runtarget target="ido-check-latest-release-dragonfly"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   456
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   457
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   458
    <!--* @property s60.grace.server
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   459
        UNC path to GRACE server.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   460
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   461
        @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   462
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   463
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   464
    <!--* @property s60.grace.service
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   465
        GRACE service to look into.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   466
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   467
        @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   468
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   469
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   470
    <!--* @property s60.grace.product
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   471
        GRACE product to look into.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   472
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   473
        @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   474
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   475
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   476
    <!--* @property s60.grace.release
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   477
        Regular expression to match a particular GRACE realease.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   478
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   479
        @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   480
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   481
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   482
    <!--* @property s60.grace.release.fixbuildregex
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   483
        Regular expression to match a particular GRACE release fixbuilds. Example _(.*?)$ or _(\d+)$ 
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   484
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   485
        @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   486
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   487
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   488
    <!--* @property s60.grace.cache
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   489
        Location of the Grace result cache for a builder.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   490
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   491
        @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   492
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   493
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   494
    <!--* @property s60.grace.checkmd5
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   495
        Enable MD5 validation for GRACE metadata (default: false).
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   496
        @type boolean
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   497
        @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   498
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   499
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   500
    <!--* @property s60.grace.revision
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   501
        Defined the regular expression to find a particular revision.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   502
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   503
        @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   504
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   505
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   506
    <!--* @property s60.grace.usetickler
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   507
        Enable the detection of ready release using GRACE tickler mechanism.
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   508
        @type boolean
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   509
        @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   510
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   511
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   512
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   513
    <!-- Checks the contents from GRACE release. Mainly used by IDOs. But could be
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   514
    extended to product builds.-->    
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   515
    <target name="ido-check-latest-release-grace" unless="use.dragonfly">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   516
        <script language="jython" setbeans="false">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   517
import os
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   518
import idoprep
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   519
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   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'))
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   521
resultname = os.path.basename(result[0])
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   522
project.setProperty('s60.getenv.path', str(result[0]))
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   523
project.setProperty('s60.getenv.release', str(resultname))
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   524
version = idoprep.get_version(project.getProperty('build.drive'), resultname)
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   525
if version is None or version.strip() != resultname:
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   526
    project.setProperty('s60.getenv.update', "1")
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   527
        </script>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   528
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   529
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   530
    <!-- Updates the build area from either GRACE / dragonfly server.-->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   531
    <target name="ido-update-build-area" depends="backup-subst-drives,ido-update-build-area-grace" unless="env.HLM_SUBCON">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   532
        <runtarget target="ido-update-build-area-dragonfly"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   533
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   534
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   535
    <!-- Creates the build area by getting the contents from GRACE release.-->    
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   536
    <target name="ido-update-build-area-grace" if="s60.getenv.update" depends="ido-check-latest-release" unless="use.dragonfly">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   537
        <!-- Just get S60 for IDOs -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   538
        <echo>Location of the new S60 release:${s60.getenv.path}</echo>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   539
        <tstamp>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   540
            <format property="getenv.tstamp" pattern="yyyyMMddHHmmss"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   541
        </tstamp>
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   542
        <!-- For linux build prep.build.dir value should not be changed as 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   543
        as prep.build.dir <==> build.drive -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   544
        <condition property="ba.root.dir" value="${prep.build.dir}" else="${prep.root.dir}/${getenv.tstamp}_${s60.getenv.release}">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   545
            <os family="unix"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   546
        </condition>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   547
        <antcall target="init-drive">
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   548
            <param name="prep.build.dir" location="${ba.root.dir}"/>            
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   549
        </antcall>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   550
        <antcall target="preparation-getenv">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   551
            <param name="base_release.path" value="${s60.getenv.path}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   552
        </antcall>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   553
        <antcall target="ido-prep-variant"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   554
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   555
        <if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   556
            <not>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   557
                <hlm:hasSeverity severity="error" file="${build.cache.log.dir}/${build.id}_getenv.log.xml" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   558
            </not>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   559
            <then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   560
                <hlm:python>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   561
from path import path
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   562
print "Writing version file...."
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   563
vfile = path(r'${build.drive}'+"/").joinpath('s60_version.txt')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   564
f = open(str(vfile), 'w')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   565
f.write(path(r'${s60.getenv.path}').name)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   566
f.close()
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   567
                </hlm:python>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   568
            </then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   569
        </if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   570
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   571
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   572
    <!-- Gets the Contents for particular variant, by unpacking the variant zip from the metadata file.-->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   573
    <target name="ido-prep-variant" if="ido.variant">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   574
        <script language="jython" setbeans="false">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   575
import re
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   576
import os
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   577
import symrec
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   578
from com.nokia.ant.util import Helper
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   579
rel_path = Helper.getProperty(project, 's60.getenv.path')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   580
metadata = symrec.find_latest_metadata(str(rel_path))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   581
self.log(str("Release metadata file: %s." % metadata))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   582
rel_metadata = symrec.ReleaseMetadata(metadata)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   583
variant_pkg = rel_metadata.getVariantPackage(project.getProperty('ido.variant'))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   584
project.setProperty('ido.variant.package', os.path.join(rel_path, variant_pkg))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   585
        </script>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   586
        <unzip src="${ido.variant.package}" dest="${build.drive}${env.EPOCROOT}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   587
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   588
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   589
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   590
    <!-- This target will help CI tool to trigger a build by updating a 's60.getenv.trigger.location' file timestamp. -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   591
    <target name="ido-latest-release-trigger" if="s60.getenv.update" depends="ido-check-latest-release">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   592
        <if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   593
            <isset property="s60.getenv.trigger.location"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   594
            <then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   595
                <echo>Touching the trigger.</echo>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   596
                <touch file="${s60.getenv.trigger.location}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   597
            </then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   598
            <else>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   599
                <echo>Property s60.getenv.trigger.location is not defined, trigger will not get updated.</echo>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   600
            </else>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   601
        </if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   602
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   603
    
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   604
    <!-- Convert keys of an ini file into a path structure.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   605
        e.g: <pre><hlm:iniKeys2Path ini="${ado.mapping.file}" pathid="ado.src.path"/></pre>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   606
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   607
    Usage example:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   608
      <pre>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   609
        <target name="test-iniKeys2Path" depends="ido-create-ado-mapping">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   610
            <hlm:iniKeys2Path ini="${ado.mapping.file}" pathid="ado.src.path"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   611
            <hlm:codescanner dest="${build.drive}/codescanner">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   612
                <path refid="ado.src.path"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   613
            </hlm:codescanner>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   614
        </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   615
        </pre>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   616
    -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   617
    <scriptdef name="iniKeys2Path" language="beanshell" uri="http://www.nokia.com/helium">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   618
        <attribute name="ini"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   619
        <attribute name="pathid"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   620
        if (attributes.get("ini") == null)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   621
            throw new org.apache.tools.ant.BuildException("ini is not defined");
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   622
        if (attributes.get("pathid") == null)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   623
            throw new org.apache.tools.ant.BuildException("pathid is not defined");
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   624
        try {
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   625
            java.io.FileInputStream pin = new java.io.FileInputStream(attributes.get("ini"));
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   626
            java.util.Properties props = new java.util.Properties();
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   627
            props.load(pin);
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   628
            org.apache.tools.ant.types.Path path = project.createDataType("path");
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   629
            for (java.util.Iterator i = props.stringPropertyNames().iterator(); i.hasNext() ; ) { 
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   630
                org.apache.tools.ant.types.Path.PathElement pe = (org.apache.tools.ant.types.Path.PathElement)path.createPathElement();
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   631
                pe.setPath(i.next()); 
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   632
            }
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   633
            self.log("Creating reference: " + attributes.get("pathid"));
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   634
            project.addReference(attributes.get("pathid"), path);
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   635
        } catch (java.io.IOException e) {
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   636
            throw new org.apache.tools.ant.BuildException(e);
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   637
        }
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   638
    </scriptdef>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   639
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   640
    <!-- Target to get the Substituted drives information-->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   641
    <target name="backup-subst-drives">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   642
        <exec dir="${cache.dir}" executable="subst.exe" osfamily="windows" output="${cache.dir}\hlmsubsteddrives.bat" failonerror="false"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   643
        <trycatch property="backup-subst-drives.exception">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   644
            <try>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   645
                <if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   646
                    <available file="${cache.dir}/hlmsubsteddrives.bat" type="file"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   647
                    <then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   648
                        <replaceregexp file="${cache.dir}\hlmsubsteddrives.bat" match="\\: => " replace=" " flags="g" byline="true"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   649
                        <replaceregexp file="${cache.dir}\hlmsubsteddrives.bat" match="\A" replace="subst.exe " byline="true"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   650
                        <replaceregexp file="${cache.dir}\hlmsubsteddrives.bat" match="UNC" replace="\\\\" byline="true"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   651
                    </then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   652
                </if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   653
            </try>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   654
            <catch>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   655
                <echo>${backup-subst-drives.exception}</echo>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   656
            </catch>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   657
        </trycatch>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   658
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   659
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   660
    <import file="ci.ant.xml"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   661
</project>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   662
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   663
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   664
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   665