File:  [mozdev] / forecastfox / Attic / build.xml
Revision 1.4: download - view: text, annotated - select for diffs - revision graph
Tue Nov 16 19:24:15 2004 UTC (15 years, 4 months ago) by richwklein
Branches: MAIN
CVS tags: HEAD
add component build to ant build

<?xml version="1.0"?>
<project name="forecastfox" default="dist">

	<property name="build"      location="build"/>
  <property name="src"        location="src"/>
  <property name="downloads"  location="downloads"/>
	<property name="mozilla"    location="/program files/mozilla/firefox/"/>
	<property name="xpidl"      location="xpidl"/>
  <property name="comp"       value="nsForecastfox"/>
	<target name="init">
		<!-- create the time stamp -->
		<!-- create the build directory structure used by compile -->
    <mkdir dir="${downloads}"/>	  
		<mkdir dir="${build}"/>
    <mkdir dir="${build}/chrome"/>
    <mkdir dir="${build}/components"/>
    <mkdir dir="${build}/defaults"/>
  <target name="compile" depends="init">
    <!-- zip chrome directory -->  
		<zip destfile="${build}/chrome/${}.jar" basedir="${src}/chrome"/> 
    <!-- unzip used in component build -->
    <unzip src="${xpidl}/" dest="${mozilla}"/>
    <copy todir="${mozilla}/base">
      <fileset dir="${src}/components">
        <exclude name="*.xpt"/>
    <!-- execute component build -->
    <exec dir="${mozilla}/base" executable="${mozilla}/base/xpidl.exe">
      <arg line="-m typelib -w -v -I -o nsForecastfox.idl"/>
    <!-- copy components -->
    <copy todir="${build}/components">
      <fileset dir="${mozilla}/base">
        <include name="${comp}.*"/>
        <exclude name="${comp}.idl"/>        
    <!-- copy defaults -->
    <copy todir="${build}/defaults">
      <fileset dir="${src}/defaults"/>
    <!-- copy install -->
    <copy todir="${build}">
      <fileset dir="${src}">
        <include name="install.*"/>        
  <target name="dist" depends="compile">
    <!-- create XPI in donwloads directory -->
		<zip destfile="downloads/${}-${DSTAMP}${TSTAMP}.xpi" basedir="${build}"/>
    <!-- cleanup build directory -->    
    <ant target="clean"/>

  <target name="clean">
		<delete dir="${build}"/>    
    <delete dir="${mozilla}/base"/>

FreeBSD-CVSweb <>