buildframework/helium/tools/compile/qt/qt.ant.xml
changeset 1 be27ed110b50
child 179 d8ac696cc51f
equal deleted inserted replaced
0:044383f39525 1:be27ed110b50
       
     1 <?xml version="1.0"?>
       
     2 <!--
       
     3 ============================================================================
       
     4 Name        : qt.ant.xml
       
     5 Part of     : Helium
       
     6 
       
     7 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     8 All rights reserved.
       
     9 This component and the accompanying materials are made available
       
    10 under the terms of the License "Eclipse Public License v1.0"
       
    11 which accompanies this distribution, and is available
       
    12 at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
    13 
       
    14 Initial Contributors:
       
    15 Nokia Corporation - initial contribution.
       
    16 
       
    17 Contributors:
       
    18 
       
    19 Description:
       
    20 
       
    21 ============================================================================
       
    22 -->
       
    23 <project name="qt" xmlns:hlm="http://www.nokia.com/helium">
       
    24     <description>
       
    25     Qt build support.
       
    26     </description>
       
    27     
       
    28     <property name="qt.dir" location="${build.drive}/qt"/>
       
    29     <property name="qt.configure.log.name" value="${build.id}_configure-qt.log"/>
       
    30     <property name="qt.qmake.ant.template" location="${helium.dir}/tools/compile/qt/templates/run-qmake.ant.xml.ftl" />
       
    31     <property name="qt.qmake.makefile.template" location="${helium.dir}/tools/compile/qt/templates/run-qmake.mk.ftl" />
       
    32     <property name="qt.configure.args" value="-platform win32-mwc -xplatform symbian-abld -confirm-license"/>
       
    33     <property name="qt.qmake.default.args" value="-platform symbian-abld -r"/>
       
    34     
       
    35     <!-- This target will run the configure tool under Qt (qt.dir) in order to create the
       
    36         qmake tool and configure the Qt project for symbian building.
       
    37         <deprecated>This target and its configuration are not maintained anymore, please consider building Qt using 
       
    38          Symbian toolchain.</deprecated> 
       
    39      -->
       
    40     <target name="configure-qt">
       
    41         <hlm:recordStartMacro name="${qt.configure.log.name}"/>
       
    42         <exec dir="${qt.dir}" executable="${qt.dir}/configure.exe" failonerror="false">
       
    43             <arg line="${qt.configure.args}"/>
       
    44         </exec>
       
    45         <hlm:recordStopMacro name="${qt.configure.log.name}"/>
       
    46         <hlm:metadatarecord database="${metadata.dbfile}">
       
    47             <hlm:textmetadatainput>
       
    48                 <fileset casesensitive="false" file="${build.log.dir}/${qt.configure.log.name}"/>
       
    49                 <metadatafilterset refid="filterset.qt.configure" />
       
    50             </hlm:textmetadatainput>
       
    51         </hlm:metadatarecord>
       
    52         <hlm:generateBuildStatus file="${qt.configure.log.name}" />
       
    53     </target>
       
    54 
       
    55     <!--
       
    56         Executing qmake on all Qt components defined under the system definition file.
       
    57         It must use schema v1.5.0+, and Qt unit must define a proFile attibute.   
       
    58      -->
       
    59     <target name="run-qmake" if="qmake.enabled">
       
    60         <!-- Generating the build steps from the sysdef information -->
       
    61         <hlm:generate-layers />
       
    62         <if>
       
    63             <or>
       
    64                 <equals arg1="${build.system}" arg2="ec-helium" />
       
    65                 <equals arg1="${build.system}" arg2="sbs-ec" />
       
    66             </or>
       
    67             <then>
       
    68                 <fmpp sourceFile="${qt.qmake.makefile.template}"
       
    69                     outputFile="${temp.build.dir}/run-qmake-${sysdef.configuration}.mk">
       
    70                     <data expandProperties="yes">
       
    71                         data: xml(${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml)
       
    72                         ant: antProperties()
       
    73                     </data>
       
    74                 </fmpp>
       
    75                 <hlm:assertFileExists file="${temp.build.dir}/run-qmake-${sysdef.configuration}.mk" />
       
    76     
       
    77                 <!-- Running the qmake steps -->
       
    78                 <hlm:emakeMacro name="run-qmake-${sysdef.configuration}" makefile="${temp.build.dir}/run-qmake-${sysdef.configuration}.mk"
       
    79                     target="all" dir="${build.drive}/" log="${build.log.dir}/${build.id}_${sysdef.configuration}.qmake.log"
       
    80                     annodetail="basic,history,file,waiting"
       
    81                     failonerror="false" />
       
    82                 <hlm:assertFileExists file="${build.log.dir}/${build.id}_${sysdef.configuration}.qmake.log" />
       
    83             </then>
       
    84             <else>
       
    85                 <fmpp sourceFile="${qt.qmake.ant.template}"
       
    86                     outputFile="${temp.build.dir}/run-qmake-${sysdef.configuration}.ant.xml">
       
    87                     <data expandProperties="yes">
       
    88                         data: xml(${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml)
       
    89                         ant: antProperties()
       
    90                     </data>
       
    91                 </fmpp>
       
    92                 <hlm:assertFileExists file="${temp.build.dir}/run-qmake-${sysdef.configuration}.ant.xml" />
       
    93     
       
    94                 <!-- Running the qmake steps -->
       
    95                 <ant antfile="${temp.build.dir}/run-qmake-${sysdef.configuration}.ant.xml" dir="${build.drive}/"
       
    96                     output="${build.log.dir}/${build.id}_${sysdef.configuration}.qmake.log"/>
       
    97                 <hlm:assertFileExists file="${build.log.dir}/${build.id}_${sysdef.configuration}.qmake.log" />
       
    98             </else>
       
    99         </if>
       
   100         <copy file="${build.log.dir}/${build.id}_${sysdef.configuration}.qmake.log" tofile="${build.log.dir}/${build.id}_${sysdef.configuration}.qmake.generated.txt">
       
   101             <filterchain>
       
   102                 <linecontainsregexp>
       
   103                     <regexp pattern="Generating"/>
       
   104                 </linecontainsregexp>
       
   105             </filterchain>
       
   106         </copy>
       
   107         <replaceregexp file="${build.log.dir}/${build.id}_${sysdef.configuration}.qmake.generated.txt" match="^\s*(?:\[exec\])?\s*Generating[^/\\]*." replace="" byline="true"/>
       
   108         <hlm:assertFileExists file="${build.log.dir}/${build.id}_${sysdef.configuration}.qmake.generated.txt"/>
       
   109         <hlm:metadatarecord database="${metadata.dbfile}">
       
   110             <hlm:textmetadatainput>
       
   111                 <fileset casesensitive="false" file="${build.log.dir}/${build.id}_${sysdef.configuration}.qmake.log" />
       
   112                 <metadatafilterset>
       
   113                     <metadatafilter priority="error" regex="^Error processing project file:" description="qt error" />
       
   114                     <metadatafilter priority="error" regex="^'.*' is not recognized as an internal or external command," description="qt error" />
       
   115                     <metadatafilter priority="error" regex="^Result: [1-9][0-9]*" description="qt error" />
       
   116                     <metadatafilter priority="warning" regex="^WARNING:" description="qt error" />
       
   117                     <metadatafilter priority="info" regex="INFO:" description="qt error" />
       
   118                 </metadatafilterset>
       
   119             </hlm:textmetadatainput>
       
   120         </hlm:metadatarecord>
       
   121         <hlm:signalMacro logfile="${build.id}_${sysdef.configuration}.qmake.log" 
       
   122             signal.input="signalRunQMakeInput" />
       
   123     </target>
       
   124 </project>