bootstrap.xml
author shaberazvi@L063442.prod.ad.symbian.intra
Wed, 04 Mar 2009 16:51:58 +0000
changeset 3 c360fdfe164c
parent 1 ebb0926c7024
child 4 5a8eb3466f9f
permissions -rw-r--r--
Update
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
     2
<project name="SF-BOOTSTRAP" default="bootstrap" xmlns:hlm="http://www.nokia.com/helium">
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
     3
1
ebb0926c7024 Update with latest changes
shaberazvi@L063442.prod.ad.symbian.intra
parents: 0
diff changeset
     4
    <dirname property="sf.bootstrap.dir" file="${ant.file.SF-CONFIG}"/>
0
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
     5
    
1
ebb0926c7024 Update with latest changes
shaberazvi@L063442.prod.ad.symbian.intra
parents: 0
diff changeset
     6
    <import file="bootstrap.properties.ant.xml" />
0
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
     7
    <import file="${helium.dir}/helium.ant.xml" />    
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
     8
1
ebb0926c7024 Update with latest changes
shaberazvi@L063442.prod.ad.symbian.intra
parents: 0
diff changeset
     9
    <target name="bootstrap" depends="init,get-sf-config,get-platform-config, parse-platform-config,
ebb0926c7024 Update with latest changes
shaberazvi@L063442.prod.ad.symbian.intra
parents: 0
diff changeset
    10
                generate-pkg-build-xml" />
0
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    11
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    12
    <target name="init">
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    13
        <mkdir dir="${bootstrap.base.dir}" />
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    14
        <mkdir dir="${bootstrap.base.dir}/build" />
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    15
        <mkdir dir="${bootstrap.base.dir}/build/config" />
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    16
    </target>
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    17
    <target name="clean-env">
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    18
        <echo message="cleaning up the environment" />
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    19
        <delete dir="${bootstrap.base.dir}/" />
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    20
    </target>
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    21
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    22
    <target name="get-sf-config">
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    23
        <echo message="Getting sf helium configuration from repository ${sf.config.repository}" />
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    24
        <hlm:scm verbose="true" scmUrl="scm:hg:${sf.config.repository}">
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    25
            <hlm:checkout basedir="${bootstrap.base.dir}/sf-config"/>
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    26
        </hlm:scm>
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    27
    </target>
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    28
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    29
    <target name="get-sbs-tools">
1
ebb0926c7024 Update with latest changes
shaberazvi@L063442.prod.ad.symbian.intra
parents: 0
diff changeset
    30
        <!-- Todo: Move this to helium config or after parsing platform build configuration 
ebb0926c7024 Update with latest changes
shaberazvi@L063442.prod.ad.symbian.intra
parents: 0
diff changeset
    31
        to install the tools from there  -->
0
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    32
    	<if>
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    33
    		<not><available file="${bootstrap.base.dir}/sbs"/></not>
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    34
    		<then>
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    35
                <echo message="Extracting sbs tools ${sbs.tools.src.path}/${sbs.zip.file}" />
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    36
    			<unzip src="${sbs.tools.src.path}/${sbs.zip.file}" dest="${bootstrap.base.dir}" />
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    37
                <echo message="Updating sbs tools path to batch file" />
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    38
        	    <echo file="${bootstrap.base.dir}/build/env.bat" append="true" >set SBS_HOME=${bootstrap.base.dir}\sbs
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    39
set PATH=${bootstrap.base.dir}\sbs\bin;${bootstrap.base.dir}\sbs\win32\mingw\bin;${bootstrap.base.dir}\sbs\win32\cygwin\bin;%PATH%
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    40
        	    </echo>
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    41
    		</then>
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    42
   	    </if>
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    43
    </target>
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    44
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    45
    <target name="get-platform-config">
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    46
        <echo message="Getting platform configuration${platform.config.repository}" />
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    47
        <hlm:scm verbose="true" scmUrl="scm:hg:${platform.config.repository}">
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    48
            <hlm:checkout basedir="${bootstrap.base.dir}/build/config"/>
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    49
        </hlm:scm>
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    50
    </target>
1
ebb0926c7024 Update with latest changes
shaberazvi@L063442.prod.ad.symbian.intra
parents: 0
diff changeset
    51
ebb0926c7024 Update with latest changes
shaberazvi@L063442.prod.ad.symbian.intra
parents: 0
diff changeset
    52
    <target name="parse-platform-config">
ebb0926c7024 Update with latest changes
shaberazvi@L063442.prod.ad.symbian.intra
parents: 0
diff changeset
    53
        <!-- Todo: Parse the platform config and generate properties and csv file to be
ebb0926c7024 Update with latest changes
shaberazvi@L063442.prod.ad.symbian.intra
parents: 0
diff changeset
    54
            used by the builds. -->
ebb0926c7024 Update with latest changes
shaberazvi@L063442.prod.ad.symbian.intra
parents: 0
diff changeset
    55
        <echo message="Parse the platform configuration" />
ebb0926c7024 Update with latest changes
shaberazvi@L063442.prod.ad.symbian.intra
parents: 0
diff changeset
    56
    </target>
ebb0926c7024 Update with latest changes
shaberazvi@L063442.prod.ad.symbian.intra
parents: 0
diff changeset
    57
    
ebb0926c7024 Update with latest changes
shaberazvi@L063442.prod.ad.symbian.intra
parents: 0
diff changeset
    58
    <target name="generate-pkg-build-xml" depends="parse-platform-config">
ebb0926c7024 Update with latest changes
shaberazvi@L063442.prod.ad.symbian.intra
parents: 0
diff changeset
    59
        <!-- Todo: 1. Same file name hg-pkg-build.ant.xml is used for all packages
ebb0926c7024 Update with latest changes
shaberazvi@L063442.prod.ad.symbian.intra
parents: 0
diff changeset
    60
            for multiple package builds, this needs to be linked with package name. -->
ebb0926c7024 Update with latest changes
shaberazvi@L063442.prod.ad.symbian.intra
parents: 0
diff changeset
    61
        <fmpp sourceFile="${sf.bootstrap.dir}/templates/hg-pkg-build.ant.xml.ftl"
ebb0926c7024 Update with latest changes
shaberazvi@L063442.prod.ad.symbian.intra
parents: 0
diff changeset
    62
                     outputFile="${bootstrap.base.dir}/build/hg-pkg-build.ant.xml">
ebb0926c7024 Update with latest changes
shaberazvi@L063442.prod.ad.symbian.intra
parents: 0
diff changeset
    63
               <data expandProperties="yes">
ebb0926c7024 Update with latest changes
shaberazvi@L063442.prod.ad.symbian.intra
parents: 0
diff changeset
    64
                    ant: antProperties()
ebb0926c7024 Update with latest changes
shaberazvi@L063442.prod.ad.symbian.intra
parents: 0
diff changeset
    65
                    data: csv(${bootstrap.base.dir}/build/config/${hg.config}, {separator:','})
ebb0926c7024 Update with latest changes
shaberazvi@L063442.prod.ad.symbian.intra
parents: 0
diff changeset
    66
                </data>
ebb0926c7024 Update with latest changes
shaberazvi@L063442.prod.ad.symbian.intra
parents: 0
diff changeset
    67
        </fmpp>
ebb0926c7024 Update with latest changes
shaberazvi@L063442.prod.ad.symbian.intra
parents: 0
diff changeset
    68
    </target>
0
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    69
</project>