Annotation of forecastfox/build.xml, revision 1.5

1.1       richwkle    1: <?xml version="1.0"?>
1.3       richwkle    2: <project name="forecastfox" default="dist">
1.1       richwkle    3: 
                      4:        <property name="build"      location="build"/>
1.2       richwkle    5:   <property name="src"        location="src"/>
1.4       richwkle    6:   <property name="downloads"  location="downloads"/>
                      7:        <property name="mozilla"    location="/program files/mozilla/firefox/"/>
                      8:        <property name="xpidl"      location="xpidl"/>
                      9:   <property name="comp"       value="nsForecastfox"/>
                     10:   
1.1       richwkle   11:        <target name="init">
1.3       richwkle   12:                <!-- create the time stamp -->
1.1       richwkle   13:                <tstamp/>
                     14:          
1.3       richwkle   15:                <!-- create the build directory structure used by compile -->
1.4       richwkle   16:     <mkdir dir="${downloads}"/>          
                     17:                <mkdir dir="${build}"/>
                     18:     <mkdir dir="${build}/chrome"/>
                     19:     <mkdir dir="${build}/components"/>
                     20:     <mkdir dir="${build}/defaults"/>
1.1       richwkle   21:        </target>
1.4       richwkle   22:        
                     23:   <target name="compile" depends="init">
                     24:     <!-- zip chrome directory -->  
1.5     ! richwkle   25:                <zip destfile="${build}/chrome/${ant.project.name}.jar" basedir="${src}/chrome" compress="false"/> 
        !            26:     
1.4       richwkle   27:     <!-- unzip base.zip used in component build -->
                     28:     <unzip src="${xpidl}/base.zip" dest="${mozilla}"/>
                     29:     <copy todir="${mozilla}/base">
                     30:       <fileset dir="${src}/components">
                     31:         <exclude name="*.xpt"/>
                     32:       </fileset>
                     33:     </copy>
                     34:     
                     35:     <!-- execute component build -->
                     36:     <exec dir="${mozilla}/base" executable="${mozilla}/base/xpidl.exe">
                     37:       <arg line="-m typelib -w -v -I -o nsForecastfox.idl"/>
                     38:     </exec>   
                     39:     
                     40:     <!-- copy components -->
1.3       richwkle   41:     <copy todir="${build}/components">
1.4       richwkle   42:       <fileset dir="${mozilla}/base">
                     43:         <include name="${comp}.*"/>
                     44:         <exclude name="${comp}.idl"/>        
1.3       richwkle   45:       </fileset>
1.4       richwkle   46:     </copy> 
                     47:      
                     48:     <!-- copy defaults -->
1.3       richwkle   49:     <copy todir="${build}/defaults">
                     50:       <fileset dir="${src}/defaults"/>
1.4       richwkle   51:     </copy>  
                     52:     
                     53:     <!-- copy install -->
1.3       richwkle   54:     <copy todir="${build}">
                     55:       <fileset dir="${src}">
                     56:         <include name="install.*"/>        
                     57:       </fileset>
                     58:     </copy>      
1.4       richwkle   59:        </target>
                     60:   
1.3       richwkle   61:   <target name="dist" depends="compile">
1.4       richwkle   62:     <!-- create XPI in donwloads directory -->
1.5     ! richwkle   63:                <zip destfile="downloads/${ant.project.name}-${DSTAMP}${TSTAMP}.xpi" basedir="${build}" compress="true"/>
1.4       richwkle   64:     
                     65:     <!-- cleanup build directory -->    
1.3       richwkle   66:     <ant target="clean"/>
1.1       richwkle   67:        </target>
1.3       richwkle   68: 
                     69:   <target name="clean">
                     70:                <delete dir="${build}"/>    
1.4       richwkle   71:     <delete dir="${mozilla}/base"/>
1.3       richwkle   72:   </target>
1.1       richwkle   73: </project>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>