File:  [mozdev] / forecastfox / Attic / build.xml
Revision 1.16: download - view: text, annotated - select for diffs - revision graph
Fri Jun 3 21:56:15 2005 UTC (14 years, 8 months ago) by richwklein
Branches: MAIN
CVS tags: HEAD
universal disk IO

I removed the migrate code while I was doing this.
I will get it back in this weekend.
When we test this, we will really want to hit import, export, and migration
since those will have the biggest changes

    1: <?xml version="1.0"?>
    2: <!-- ***** BEGIN LICENSE BLOCK *****
    3:    - Version: MPL 1.1/GPL 2.0/LGPL 2.1
    4:    -
    5:    - The contents of this file are subject to the Mozilla Public License Version
    6:    - 1.1 (the "License"); you may not use this file except in compliance with
    7:    - the License. You may obtain a copy of the License at
    8:    - http://www.mozilla.org/MPL/
    9:    -
   10:    - Software distributed under the License is distributed on an "AS IS" basis,
   11:    - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
   12:    - for the specific language governing rights and limitations under the
   13:    - License.
   14:    -
   15:    - The Original Code is Forecastfox.
   16:    -
   17:    - The Initial Developer of the Original Code is
   18:    - Jon Stritar <jstritar@MIT.EDU>.
   19:    - Portions created by the Initial Developer are Copyright (C) 2005
   20:    - the Initial Developer. All Rights Reserved.
   21:    -
   22:    - Contributor(s):
   23:    - Jon Stritar <jstritar@MIT.EDU>
   24:    - Richard Klein <richwklein@mchsi.com>
   25:    -
   26:    - Alternatively, the contents of this file may be used under the terms of
   27:    - either the GNU General Public License Version 2 or later (the "GPL"), or
   28:    - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
   29:    - in which case the provisions of the GPL or the LGPL are applicable instead
   30:    - of those above. If you wish to allow use of your version of this file only
   31:    - under the terms of either the GPL or the LGPL, and not to allow others to
   32:    - use your version of this file under the terms of the MPL, indicate your
   33:    - decision by deleting the provisions above and replace them with the notice
   34:    - and other provisions required by the LGPL or the GPL. If you do not delete
   35:    - the provisions above, a recipient may use your version of this file under
   36:    - the terms of any one of the MPL, the GPL or the LGPL.
   37:    -
   38:    - ***** END LICENSE BLOCK ***** -->
   39: 
   40: <!-- project used to build xpi -->
   41: <project name="forecastfox" default="dist">
   42:   <property name="app.version"     value="0.7.9"/>
   43:   <property name="app.guid"        value="{0538E3E3-7E9B-4d49-8831-A227C80A7AD3}"/>
   44:   <property name="build.dir"       location="build"/>
   45:   <property name="staging.dir"     location="staging"/>
   46:   <property name="downloads.dir"   location="downloads"/>
   47:   <property name="src.dir"         location="src"/>
   48:   <property name="xpidl.dir"       location="xpidl"/>
   49:   <property name="moz.dir"         location="c:\program files\mozilla\firefox\"/>
   50:   
   51:   <!-- create build directories -->
   52:   <target name="init" description="Create build environment">
   53:     <mkdir dir="${downloads.dir}"/>
   54:     <mkdir dir="${staging.dir}"/>    
   55:     <mkdir dir="${build.dir}"/>
   56:     <mkdir dir="${build.dir}/chrome"/>    
   57:   </target>
   58:   
   59:   <!-- clean up build directories -->
   60:   <target name="clean">
   61:     <delete dir="${build.dir}"/>    
   62:     <delete dir="${moz.dir}/base"/>
   63:     <delete dir="${staging.dir}"/>
   64:   </target>
   65:   
   66:   <!-- staging files -->
   67:   <target name="staging" description="Copy files to staging and preprocess">
   68:     
   69:     <!-- replace version and locale strings -->
   70:     <copy todir="${staging.dir}" overwrite="true">
   71:       <fileset dir="${src.dir}">
   72:         <exclude name="**/images/**"/>
   73:       </fileset>
   74:       <filterset begintoken="#" endtoken="#">
   75:         <filter token="VERSION" value="${app.version}"/>
   76:         <filter token="GUID" value="${app.guid}"/>
   77:       </filterset>      
   78:     </copy>
   79:     
   80:     <!-- copy binary files to staging -->
   81:     <copy todir="${staging.dir}" overwrite="true">
   82:       <fileset dir="${src.dir}">
   83:         <include name="**/images/**"/>
   84:       </fileset>  
   85:     </copy>    
   86:   </target>
   87: 
   88:   <!-- build interfaces -->
   89:   <target name="xpt" description="Create interface definition files">
   90:     
   91:     <!-- copy interfaces to mozilla dir -->
   92:     <unzip src="${xpidl.dir}/base.zip" dest="${moz.dir}"/>
   93:     <copy todir="${moz.dir}/base">
   94:       <fileset dir="${staging.dir}/components">
   95:         <include name="*.idl"/>    
   96:       </fileset>
   97:     </copy>
   98:     
   99:     <!-- create interfaces -->
  100:     <echo message="Building nsForecastfox.xpt"/>
  101:     <exec dir="${moz.dir}/base" executable="${moz.dir}/base/xpidl.exe" failonerror="true">
  102:       <arg line="-m typelib -w -v -I -o nsForecastfox.idl"/>
  103:     </exec>
  104:     <echo message="Building ffPing.xpt"/>    
  105:     <exec dir="${moz.dir}/base" executable="${moz.dir}/base/xpidl.exe" failonerror="true">
  106:       <arg line="-m typelib -w -v -I -o ffPing.idl"/>
  107:     </exec>
  108:     <echo message="Building ffProfiles.xpt"/>    
  109:     <exec dir="${moz.dir}/base" executable="${moz.dir}/base/xpidl.exe" failonerror="true">
  110:       <arg line="-m typelib -w -v -I -o ffProfiles.idl"/>
  111:     </exec>
  112:     <echo message="Building ffError.xpt"/>    
  113:     <exec dir="${moz.dir}/base" executable="${moz.dir}/base/xpidl.exe" failonerror="true">
  114:       <arg line="-m typelib -w -v -I -o ffError.idl"/>
  115:     </exec> 
  116:     <echo message="Building ffParser.xpt"/>    
  117:     <exec dir="${moz.dir}/base" executable="${moz.dir}/base/xpidl.exe" failonerror="true">
  118:       <arg line="-m typelib -w -v -I -o ffParser.idl"/>
  119:     </exec>  
  120:     <echo message="Building ffDisk.xpt"/>    
  121:     <exec dir="${moz.dir}/base" executable="${moz.dir}/base/xpidl.exe" failonerror="true">
  122:       <arg line="-m typelib -w -v -I -o ffDisk.idl"/>
  123:     </exec>        
  124:   </target>
  125: 
  126:   <!-- create distribute files -->
  127:   <target name="build" description="Copy files from interface creation and staging">        
  128:     <copy todir="${build.dir}/components">
  129:       <fileset dir="${moz.dir}/base">
  130:         <include name="nsForecastfox.xpt"/>  
  131:         <include name="ffPing.xpt"/>
  132:       	<include name="ffProfiles.xpt"/>
  133:         <include name="ffError.xpt"/>
  134:         <include name="ffParser.xpt"/>
  135:         <include name="ffDisk.xpt"/>
  136:       </fileset>
  137:     </copy>
  138:     
  139:     <copy todir="${build.dir}">
  140:       <fileset dir="${staging.dir}">
  141:         <exclude name="chrome/**"/>
  142:         <exclude name="components/*.idl"/>
  143:       </fileset>
  144:     </copy>
  145:   </target>
  146:     
  147:   <target name="dist" depends="clean, init, staging, xpt, build" description="Create distribution files">
  148:     <zip destfile="${build.dir}/chrome/${ant.project.name}.jar" basedir="${staging.dir}/chrome" compress="false"/>    
  149: 	  <zip destfile="${downloads.dir}/${ant.project.name}-${app.version}.xpi" basedir="${build.dir}" compress="true"/>    
  150: 
  151:     <!-- cleanup when done -->
  152:     <ant target="clean"/>
  153:   </target>
  154:  
  155: </project>

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