File:  [mozdev] / needlesearch / build.xml
Revision 1.7: download - view: text, annotated - select for diffs - revision graph
Thu Apr 17 12:59:36 2003 UTC (17 years, 2 months ago) by eelco
Branches: MAIN
CVS tags: HEAD
extra locales

    1: <project name="CIP Webapp" default="make-xpi" basedir=".">
    2: 
    3:       <property file="build.${user.name}.properties"/>
    4:       
    5:       <property name="app.name" value="NeedleSearch"/>
    6: 
    7:   <!-- Actions -->
    8: 
    9:     <!-- Label the build -->
   10:       <target name="label-build" description="Label the build">
   11: 
   12:         <propertyfile
   13:             file="build-info.${user.name}.properties"
   14:             comment="Build information" >
   15:           <entry  key="developer" value="${user.name}" />
   16:           <entry  key="date" type="date" value="now"/>
   17:           <entry  key="build-nr" type="int" default="0" operation="+"/>
   18:         </propertyfile>
   19: 
   20:         <propertyfile
   21:             file="developer.properties"
   22:             comment="Build information" >
   23:           <entry  key="developer" value="${user.name}" />
   24:         </propertyfile>
   25: 
   26:         <loadfile property="build-info-string" srcFile="build-info.${user.name}.properties">
   27:           <filterchain>
   28:             <striplinebreaks/>
   29:           </filterchain>
   30:         </loadfile>
   31: 
   32:         <!-- add to the build history -->
   33:         <concat append="yes" destfile="build-history.${user.name}.txt" >${build-info-string}</concat>
   34: 
   35:       </target>
   36: 
   37: 
   38:     <target name="copy-from-live" description="Copies files from the test environment to src tree">
   39:         <echo message="Copy files from ..\..\browsers\mozilla${test.browser.version}\chrome\ "/>
   40:         <copy todir="src/.">
   41:         	<fileset dir="..\browsers\mozilla${test.browser.version}\chrome">
   42:         	  <exclude name="needlesearch/**/NeedleSearchData.rdf"/>
   43:         	  <include name="needlesearch/**/*.js"/>
   44:         	  <include name="needlesearch/**/*.xul"/>
   45:         	  <include name="needlesearch/**/*.dtd"/>
   46:         	  <include name="needlesearch/**/*.rdf"/>
   47:         	  <include name="needlesearch/**/*.properties"/>
   48:         	  <include name="needlesearch/**/*.gif"/>
   49: 			  <!--include name="needlesearch/**/*.png"/-->
   50:         	</fileset>		
   51:         </copy>
   52:     </target>
   53:     
   54:     <target name="deploy-to-live" description="Deploy to live environment Mozilla ${test.browser.version}">
   55:         
   56:         <echo message="Copy files from src tree to Mozilla ${test.browser.version}"/>
   57:         <copy todir="..\browsers\mozilla${test.browser.version}\chrome\">
   58:         	<fileset dir="src/.">
   59:         	  <exclude name="needlesearch/**/NeedleSearchData.rdf"/>
   60:         	  <include name="needlesearch/**/*.js"/>
   61:         	  <include name="needlesearch/**/*.xul"/>
   62:         	  <include name="needlesearch/**/*.dtd"/>
   63:         	  <include name="needlesearch/**/*.rdf"/>
   64:         	  <include name="needlesearch/**/*.properties"/>
   65:         	  <include name="needlesearch/**/*.gif"/>
   66: 			  <!--include name="needlesearch/**/*.png"/-->
   67:         	</fileset>		
   68:         </copy>
   69:         
   70:       </target>
   71: 
   72:     <target name="make-xpi" description="Make XPI for version ${app.version}" depends="label-build">
   73:         <property file="build-info.${user.name}.properties"/>
   74:         
   75:         <echo message="copy install.js"/>
   76:         <copy file="src/install-all.js" tofile="src/install.js"/>
   77: 
   78:         <echo message="Packaging webapp ${app.name}-${app.version}-nordf-(${build-nr}).xpi"/>
   79:         <zip destfile="bin/${app.name}-${app.version}-nordf-(${build-nr}).xpi">
   80: 			<fileset dir="./src">
   81: 					  <exclude name="needlesearch/**/NeedleSearchData.rdf"/>
   82: 					  <include name="install.js"/>
   83: 					  <include name="needlesearch/**/*.js"/>
   84: 					  <include name="needlesearch/**/*.xul"/>
   85: 					  <include name="needlesearch/**/*.dtd"/>
   86: 					  <include name="needlesearch/**/*.rdf"/>
   87: 					  <include name="needlesearch/**/*.properties"/>
   88: 					  <include name="needlesearch/**/*.gif"/>
   89: 					  <!--include name="needlesearch/**/*.png"/-->
   90:         	</fileset>		
   91:         </zip>
   92: 
   93:         <echo message="Cleaning up..."/>
   94:         <delete file="src/install.js"/>
   95: 
   96:       </target>
   97: 
   98:     <target name="make-da-xpi" description="Make XPI for Danish Language pack version ${app.version}" depends="label-build">
   99:         <echo message="copy install.js"/>
  100:         <copy file="src/install-da.js" tofile="src/install.js"/>
  101: 
  102:         <echo message="Packaging webapp NS-da.xpi"/>
  103:         <zip destfile="bin/NS-da.xpi">
  104: 			<fileset dir="./src">
  105: 					  <exclude name="needlesearch/**/NeedleSearchData.rdf"/>
  106: 					  <include name="install.js"/>
  107: 					  <include name="needlesearch/locale/da/**/*.dtd"/>
  108: 					  <include name="needlesearch/locale/da/**/*.rdf"/>
  109: 					  <include name="needlesearch/locale/da/**/*.properties"/>
  110:         	</fileset>		
  111:         </zip>
  112: 
  113:         <echo message="Cleaning up..."/>
  114:         <delete file="src/install.js"/>
  115: 
  116:       </target>
  117: 
  118:     <target name="make-cy-GB-xpi" description="Make XPI for Cymraeg/Welsh Language pack version ${app.version}" depends="label-build">
  119:         <echo message="copy install.js"/>
  120:         <copy file="src/install-cy-GB.js" tofile="src/install.js"/>
  121:         
  122:         
  123:         <echo message="Packaging webapp NS-cy-GB.xpi"/>
  124:         <zip destfile="bin/NS-cy-GB.xpi">
  125: 			<fileset dir="./src">
  126: 					  <exclude name="needlesearch/**/NeedleSearchData.rdf"/>
  127: 					  <include name="install.js"/>
  128: 					  <include name="needlesearch/locale/cy-GB/**/*.dtd"/>
  129: 					  <include name="needlesearch/locale/cy-GB/**/*.rdf"/>
  130: 					  <include name="needlesearch/locale/cy-GB/**/*.properties"/>
  131:         	</fileset>		
  132:         </zip>
  133:         
  134:         <echo message="Cleaning up..."/>
  135:         <delete file="src/install.js"/>
  136:       </target>
  137: 
  138: 
  139:     <target name="make-it-xpi" description="Make XPI for Italian Language pack version ${app.version}" depends="label-build">
  140:         <echo message="copy install.js"/>
  141:         <copy file="src/install-it.js" tofile="src/install.js"/>
  142: 
  143:         <echo message="Packaging webapp NS-it.xpi"/>
  144:         <zip destfile="bin/NS-it.xpi">
  145: 			<fileset dir="./src">
  146: 					  <exclude name="needlesearch/**/NeedleSearchData.rdf"/>
  147: 					  <include name="install.js"/>
  148: 					  <include name="needlesearch/locale/it/**/*.dtd"/>
  149: 					  <include name="needlesearch/locale/it/**/*.rdf"/>
  150: 					  <include name="needlesearch/locale/it/**/*.properties"/>
  151:         	</fileset>		
  152:         </zip>
  153: 
  154:         <echo message="Cleaning up..."/>
  155:         <delete file="src/install.js"/>
  156: 
  157:       </target>
  158: 
  159:     <target name="make-xpi+rdf" description="Make XPI for version ${app.version}" depends="label-build">
  160:         <property file="build-info.${user.name}.properties"/>
  161:         
  162:         <echo message="Packaging webapp ${app.name}-${app.version}-withrdf-(${build-nr}).xpi"/>
  163:         <zip destfile="bin/${app.name}-${app.version}-withrdf-(${build-nr}).xpi">
  164: 			<fileset dir="./src">
  165: 					  <include name="install.js"/>
  166: 					  <include name="needlesearch/**/*.js"/>
  167: 					  <include name="needlesearch/**/*.xul"/>
  168: 					  <include name="needlesearch/**/*.dtd"/>
  169: 					  <include name="needlesearch/**/*.rdf"/>
  170: 					  <include name="needlesearch/**/*.properties"/>
  171: 					  <include name="needlesearch/**/*.gif"/>
  172: 					  <!--include name="needlesearch/**/*.png"/-->
  173:         	</fileset>		
  174:         </zip>
  175:       </target>
  176: 
  177:     <target name="make-deinstaller" description="Make deinstaller for the toolbar">
  178:         <property file="build-info.${user.name}.properties"/>
  179:         
  180:         <echo message="Packaging webapp deinstall-${app.name}.xpi"/>
  181:         <jar destfile="bin/Deinstall-${app.name}.xpi">
  182: 			<fileset dir="./deinstall-src">
  183: 					  <exclude name="needlesearch/**/NeedleSearchData.rdf"/>
  184: 					  <include name="install.js"/>
  185: 					  <include name="needlesearch/**/*.js"/>
  186: 					  <include name="needlesearch/**/*.xul"/>
  187: 					  <include name="needlesearch/**/*.dtd"/>
  188: 					  <include name="needlesearch/**/*.rdf"/>
  189: 					  <include name="needlesearch/**/*.properties"/>
  190: 					  <include name="needlesearch/**/*.gif"/>
  191: 					  <!--include name="needlesearch/**/*.png"/-->
  192:         	</fileset>		
  193:         </jar>
  194:       </target>
  195: 
  196:     <target name="make-example-nsbookmarks" description="Make XPI for version ${app.version}">
  197:         <property file="build-info.${user.name}.properties"/>
  198:         
  199:         <echo message="Packaging example rdf: example-rdf-${app.version}.xpi"/>
  200:         <zip destfile="bin/example-rdf-${app.version}.xpi">
  201: 			<fileset dir="./rest">
  202: 					  <include name="needlesearch/**/NeedleSearchData.rdf"/>
  203: 					  <include name="install.js"/>
  204:         	</fileset>		
  205:         </zip>
  206:       </target>
  207: 
  208: </project>

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