File:  [mozdev] / needlesearch / build.xml
Revision 1.6: download - view: text, annotated - select for diffs - revision graph
Wed Apr 2 09:10:05 2003 UTC (17 years ago) by eelco
Branches: MAIN
CVS tags: HEAD
New version

<project name="CIP Webapp" default="make-xpi" basedir=".">

      <property file="build.${user.name}.properties"/>
      
      <property name="app.name" value="NeedleSearch"/>

  <!-- Actions -->

    <!-- Label the build -->
      <target name="label-build" description="Label the build">

        <propertyfile
            file="build-info.${user.name}.properties"
            comment="Build information" >
          <entry  key="developer" value="${user.name}" />
          <entry  key="date" type="date" value="now"/>
          <entry  key="build-nr" type="int" default="0" operation="+"/>
        </propertyfile>

        <propertyfile
            file="developer.properties"
            comment="Build information" >
          <entry  key="developer" value="${user.name}" />
        </propertyfile>

        <loadfile property="build-info-string" srcFile="build-info.${user.name}.properties">
          <filterchain>
            <striplinebreaks/>
          </filterchain>
        </loadfile>

        <!-- add to the build history -->
        <concat append="yes" destfile="build-history.${user.name}.txt" >${build-info-string}</concat>

      </target>


    <target name="copy-from-live" description="Copies files from the test environment to src tree">
        <echo message="Copy files from ..\..\browsers\mozilla${test.browser.version}\chrome\ "/>
        <copy todir="src/.">
        	<fileset dir="..\browsers\mozilla${test.browser.version}\chrome">
        	  <exclude name="needlesearch/**/NeedleSearchData.rdf"/>
        	  <include name="needlesearch/**/*.js"/>
        	  <include name="needlesearch/**/*.xul"/>
        	  <include name="needlesearch/**/*.dtd"/>
        	  <include name="needlesearch/**/*.rdf"/>
        	  <include name="needlesearch/**/*.properties"/>
        	  <include name="needlesearch/**/*.gif"/>
			  <!--include name="needlesearch/**/*.png"/-->
        	</fileset>		
        </copy>
    </target>
    
    <target name="deploy-to-live" description="Deploy to live environment Mozilla ${test.browser.version}">
        
        <echo message="Copy files from src tree to Mozilla ${test.browser.version}"/>
        <copy todir="..\browsers\mozilla${test.browser.version}\chrome\">
        	<fileset dir="src/.">
        	  <exclude name="needlesearch/**/NeedleSearchData.rdf"/>
        	  <include name="needlesearch/**/*.js"/>
        	  <include name="needlesearch/**/*.xul"/>
        	  <include name="needlesearch/**/*.dtd"/>
        	  <include name="needlesearch/**/*.rdf"/>
        	  <include name="needlesearch/**/*.properties"/>
        	  <include name="needlesearch/**/*.gif"/>
			  <!--include name="needlesearch/**/*.png"/-->
        	</fileset>		
        </copy>
        
      </target>

    <target name="make-xpi" description="Make XPI for version ${app.version}" depends="label-build">
        <property file="build-info.${user.name}.properties"/>
        
        <echo message="Packaging webapp ${app.name}-${app.version}-nordf-(${build-nr}).xpi"/>
        <zip destfile="bin/${app.name}-${app.version}-nordf-(${build-nr}).xpi">
			<fileset dir="./src">
					  <exclude name="needlesearch/**/NeedleSearchData.rdf"/>
					  <include name="install.js"/>
					  <include name="needlesearch/**/*.js"/>
					  <include name="needlesearch/**/*.xul"/>
					  <include name="needlesearch/**/*.dtd"/>
					  <include name="needlesearch/**/*.rdf"/>
					  <include name="needlesearch/**/*.properties"/>
					  <include name="needlesearch/**/*.gif"/>
					  <!--include name="needlesearch/**/*.png"/-->
        	</fileset>		
        </zip>
      </target>

    <target name="make-da-xpi" description="Make XPI for Danish Language pack version ${app.version}" depends="label-build">
        <echo message="Packaging webapp NS-da.xpi"/>
        <zip destfile="bin/NS-da.xpi">
			<fileset dir="./src">
					  <exclude name="needlesearch/**/NeedleSearchData.rdf"/>
					  <include name="install.js"/>
					  <include name="needlesearch/locale/da/**/*.dtd"/>
					  <include name="needlesearch/locale/da/**/*.rdf"/>
					  <include name="needlesearch/locale/da/**/*.properties"/>
        	</fileset>		
        </zip>
      </target>

    <target name="make-it-xpi" description="Make XPI for Italian Language pack version ${app.version}" depends="label-build">
        <echo message="Packaging webapp NS-it.xpi"/>
        <zip destfile="bin/NS-it.xpi">
			<fileset dir="./src">
					  <exclude name="needlesearch/**/NeedleSearchData.rdf"/>
					  <include name="install.js"/>
					  <include name="needlesearch/locale/it/**/*.dtd"/>
					  <include name="needlesearch/locale/it/**/*.rdf"/>
					  <include name="needlesearch/locale/it/**/*.properties"/>
        	</fileset>		
        </zip>
      </target>

    <target name="make-xpi+rdf" description="Make XPI for version ${app.version}" depends="label-build">
        <property file="build-info.${user.name}.properties"/>
        
        <echo message="Packaging webapp ${app.name}-${app.version}-withrdf-(${build-nr}).xpi"/>
        <zip destfile="bin/${app.name}-${app.version}-withrdf-(${build-nr}).xpi">
			<fileset dir="./src">
					  <include name="install.js"/>
					  <include name="needlesearch/**/*.js"/>
					  <include name="needlesearch/**/*.xul"/>
					  <include name="needlesearch/**/*.dtd"/>
					  <include name="needlesearch/**/*.rdf"/>
					  <include name="needlesearch/**/*.properties"/>
					  <include name="needlesearch/**/*.gif"/>
					  <!--include name="needlesearch/**/*.png"/-->
        	</fileset>		
        </zip>
      </target>

    <target name="make-deinstaller" description="Make deinstaller for the toolbar">
        <property file="build-info.${user.name}.properties"/>
        
        <echo message="Packaging webapp deinstall-${app.name}.xpi"/>
        <jar destfile="bin/Deinstall-${app.name}.xpi">
			<fileset dir="./deinstall-src">
					  <exclude name="needlesearch/**/NeedleSearchData.rdf"/>
					  <include name="install.js"/>
					  <include name="needlesearch/**/*.js"/>
					  <include name="needlesearch/**/*.xul"/>
					  <include name="needlesearch/**/*.dtd"/>
					  <include name="needlesearch/**/*.rdf"/>
					  <include name="needlesearch/**/*.properties"/>
					  <include name="needlesearch/**/*.gif"/>
					  <!--include name="needlesearch/**/*.png"/-->
        	</fileset>		
        </jar>
      </target>

    <target name="make-example-nsbookmarks" description="Make XPI for version ${app.version}">
        <property file="build-info.${user.name}.properties"/>
        
        <echo message="Packaging example rdf: example-rdf-${app.version}.xpi"/>
        <zip destfile="bin/example-rdf-${app.version}.xpi">
			<fileset dir="./rest">
					  <include name="needlesearch/**/NeedleSearchData.rdf"/>
					  <include name="install.js"/>
        	</fileset>		
        </zip>
      </target>

</project>

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