bootstrap.xml
changeset 9 faf8e4898015
parent 7 e042f0022639
child 10 c1cbd33e46c0
equal deleted inserted replaced
8:92db3a857f66 9:faf8e4898015
     1 <?xml version="1.0" encoding="UTF-8"?>
     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <project name="SF-BOOTSTRAP" default="bootstrap" xmlns:hlm="http://www.nokia.com/helium">
     2 <project name="SF-BOOTSTRAP" default="bootstrap" xmlns:hlm="http://www.nokia.com/helium">
     3     
     3     
     4     <property environment="env"/>
     4   <property environment="env"/>
     5     
     5     
     6     <dirname property="sf.bootstrap.dir" file="${ant.file.SF-CONFIG}"/>
     6   <dirname property="sf.bootstrap.dir" file="${ant.file.SF-CONFIG}"/>
       
     7   
       
     8   <!-- target dir -->
       
     9   <property name="bootstrap.base.dir" value="D:\fbf_project"/> <!-- old name -->
       
    10   <property name="sf.target.dir" value="${bootstrap.base.dir}"/>
       
    11   
       
    12   <!-- config -->
       
    13   <property name="sf.config.repo" value="${sf.config.repository}"/> <!-- old name -->
       
    14   <property name="sf.config.rev" value="tip"/>
       
    15   <echo message="config: repo=${sf.config.repo} rev=${sf.config.rev}"/>
       
    16   
       
    17   <!-- project -->
       
    18   <property name="sf.project.repo" value="${platform.config.repository}"/> <!-- old name -->
       
    19   <property name="sf.project.rev" value="tip"/>
       
    20   <echo message="project: repo=${sf.project.repo} rev=${sf.project.rev}"/>
       
    21 
       
    22   <target name="bootstrap" depends="init,get-sf-config,get-sf-project" />
       
    23 
       
    24   <target name="init">
       
    25     <mkdir dir="${sf.target.dir}" />
       
    26     <mkdir dir="${sf.target.dir}/build" />
       
    27     <mkdir dir="${sf.target.dir}/build/config" />
       
    28   </target>
     7     
    29     
     8     <import file="bootstrap.properties.ant.xml" />
    30   <target name="clean-env">
     9     <import file="${helium.dir}/helium.ant.xml" />    
    31     <echo message="cleaning up the environment" />
       
    32     <delete dir="${sf.target.dir}/" />
       
    33   </target>
    10 
    34 
    11     <target name="bootstrap" depends="init,get-sf-config,get-project-config" />
    35   <target name="get-sf-config">
       
    36     <echo message="Getting sf helium configuration from repository ${sf.config.repo}"/>
       
    37     <hlm:scm verbose="true" scmUrl="scm:hg:${sf.config.repo}">
       
    38       <hlm:checkout basedir="${sf.target.dir}/sf-config"/>
       
    39       <hlm:tags basedir="${sf.target.dir}/sf-config" reference="hg.tags.id${refid}"/>
       
    40       <hlm:update basedir="${sf.target.dir}/sf-config">
       
    41         <hlm:latestTag pattern="${sf.config.rev}">
       
    42           <hlm:tagSet refid="hg.tags.id${refid}"/> 
       
    43         </hlm:latestTag>
       
    44       </hlm:update>
       
    45     </hlm:scm>
       
    46   </target>
    12 
    47 
    13     <target name="init">
    48   <target name="get-sf-project">
    14         <mkdir dir="${bootstrap.base.dir}" />
    49     <echo message="Getting project configuration${sf.project.repo}"/>
    15         <mkdir dir="${bootstrap.base.dir}/build" />
    50     <hlm:scm verbose="true" scmUrl="scm:hg:${sf.project.repo}">
    16         <mkdir dir="${bootstrap.base.dir}/build/config" />
    51       <hlm:checkout basedir="${sf.target.dir}/build/config"/>
    17     </target>
    52       <hlm:tags basedir="${sf.target.dir}/build/config" reference="hg.tags.id${refid}"/>
    18     
    53       <hlm:update basedir="${sf.target.dir}/build/config">
    19     <target name="clean-env">
    54         <hlm:latestTag pattern="${sf.project.rev}">
    20         <echo message="cleaning up the environment" />
    55           <hlm:tagSet refid="hg.tags.id${refid}"/>
    21         <delete dir="${bootstrap.base.dir}/" />
    56         </hlm:latestTag>
    22     </target>
    57       </hlm:update>
    23 
    58     </hlm:scm>
    24     <target name="get-sf-config">
    59   </target>
    25         <echo message="Getting sf helium configuration from repository ${sf.config.repository}" />
       
    26         <hlm:scm verbose="true" scmUrl="scm:hg:${sf.config.repository}">
       
    27             <hlm:checkout basedir="${bootstrap.base.dir}/sf-config"/>
       
    28         </hlm:scm>
       
    29     </target>
       
    30 
       
    31     <target name="get-sbs-tools">
       
    32         <!-- Todo: Move this to helium config or after parsing platform build configuration 
       
    33         to install the tools from there  -->
       
    34     	<if>
       
    35     		<not><available file="${bootstrap.base.dir}/sbs"/></not>
       
    36     		<then>
       
    37                 <echo message="Extracting sbs tools ${sbs.tools.src.path}/${sbs.zip.file}" />
       
    38     			<unzip src="${sbs.tools.src.path}/${sbs.zip.file}" dest="${bootstrap.base.dir}" />
       
    39                 <echo message="Updating sbs tools path to batch file" />
       
    40         	    <echo file="${bootstrap.base.dir}/build/env.bat" append="true" >set SBS_HOME=${bootstrap.base.dir}\sbs
       
    41 set PATH=${bootstrap.base.dir}\sbs\bin;${bootstrap.base.dir}\sbs\win32\mingw\bin;${bootstrap.base.dir}\sbs\win32\cygwin\bin;%PATH%
       
    42         	    </echo>
       
    43     		</then>
       
    44    	    </if>
       
    45     </target>
       
    46 
       
    47     <target name="get-project-config">
       
    48         <echo message="Getting project configuration${platform.config.repository}" />
       
    49         <hlm:scm verbose="true" scmUrl="scm:hg:${platform.config.repository}">
       
    50             <hlm:checkout basedir="${bootstrap.base.dir}/build/config"/>
       
    51         </hlm:scm>
       
    52     </target>
       
    53 
    60 
    54 
    61 
    55 </project>
    62 </project>