gecko-dev/java/build/build.xml

264 lines
8.7 KiB
XML
Raw Normal View History

2002-10-02 22:23:47 +00:00
<?xml version="1.0"?>
<!--
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Ed Burns &gt;edburns@acm.org&lt;
-->
<project name="java.supplement.build" default="main" basedir=".">
<property name="Name" value="java.supplement.build"/>
<property name="name" value="java.supplement.build"/>
2002-12-20 22:40:32 +00:00
<property name="version" value="20021220"/>
2002-10-02 22:23:47 +00:00
<!-- ************ Per user local properties ******************************* -->
<property file="${user.home}/build.properties"/> <!-- User local -->
<property file="../build.properties"/> <!-- Component local -->
<property environment="myenv" />
<property name="package.home" value="${build.home}/../javadev"/>
<property name="package.lib" value="${package.home}/lib"/>
<property name="package.example" value="${package.home}/example"/>
2002-11-09 23:03:06 +00:00
<property name="package.manifest" value="${build.home}/META-INF/MANIFEST.MF"/>
<property name="package.version" value="1_3"/>
<property name="dist" value="${build.home}/.."/>
2002-10-02 22:23:47 +00:00
2002-12-20 22:40:32 +00:00
<target name="main" depends="prepare,set.debug.vars,build.webclient.javadev,build.webclient.xpi"/>
<target name="xpi.from.javadev" depends="prepare,set.debug.vars,build.webclient.xpi"/>
2002-10-02 22:23:47 +00:00
2002-11-09 23:03:06 +00:00
<target name="prepare">
<condition property="short.os.name" value="win32">
<os family="dos" />
</condition>
2002-10-02 22:23:47 +00:00
2002-12-20 22:40:32 +00:00
<condition property="short.os.name" value="linux">
<os family="unix" />
</condition>
<condition property="win.bin" value="WIN32_O.OBJ">
<os family="dos" />
</condition>
2002-12-20 22:40:32 +00:00
<condition property="win.bin" value="">
<os family="unix" />
</condition>
<condition property="so.suffix" value="dll">
<os family="dos" />
</condition>
<condition property="so.suffix" value="so">
<os family="unix" />
</condition>
<condition property="ar.suffix" value="lib">
<os family="dos" />
</condition>
<condition property="ar.suffix" value="a">
<os family="unix" />
</condition>
2002-12-20 22:40:32 +00:00
<condition property="lib.prefix" value="">
<os family="dos" />
</condition>
<condition property="lib.prefix" value="lib">
<os family="unix" />
</condition>
<condition property="javadomjni.location" value="components">
<os family="dos" />
</condition>
<condition property="javadomjni.location" value="">
<os family="unix" />
</condition>
2002-10-02 22:23:47 +00:00
<mkdir dir="${package.home}"/>
<mkdir dir="${package.lib}"/>
<mkdir dir="${package.example}"/>
2002-11-09 23:03:06 +00:00
<mkdir dir="${build.home}/META-INF"/>
</target>
<target name="set.debug.vars" if="compile.debug">
<!-- This target sets the WIN32_D.OBJ or WIN32_O.OBJ thingy -->
<condition property="win.bin" value="WIN32_D.OBJ">
<and>
<os family="dos" />
<equals arg1="${compile.debug}" arg2="true"/>
</and>
</condition>
</target>
2002-12-20 22:40:32 +00:00
<target name="build.webclient.javadev"
2002-11-20 03:42:27 +00:00
depends="create.webclient.manifest,build.webclient.jar,create.webclient.scripts">
2002-10-02 22:23:47 +00:00
2002-12-20 22:40:32 +00:00
<copy file="${dist}/${win.bin}/bin/${javadomjni.location}/${lib.prefix}javadomjni.${so.suffix}"
todir="${package.lib}"/>
2002-12-20 22:40:32 +00:00
<copy file="${dist}/${win.bin}/bin/components/${lib.prefix}javadom.${so.suffix}"
todir="${package.lib}"/>
2002-12-20 22:40:32 +00:00
<copy file="${dist}/${win.bin}/bin/${lib.prefix}webclient.${so.suffix}"
todir="${package.lib}"/>
2002-12-20 22:40:32 +00:00
<copy file="${dist}/${win.bin}/lib/${lib.prefix}wc_share.${ar.suffix}"
todir="${package.lib}"/>
2002-11-20 03:42:27 +00:00
<copy file="../webclient/src_share/runem.pl"
todir="${package.example}"/>
<copy file="README.WEBCLIENT"
todir="${package.home}"/>
<chmod perm="777" file="${package.lib}/${lib.prefix}javadomjni.${so.suffix}"/>
<chmod perm="777" file="${package.lib}/${lib.prefix}javadom.${so.suffix}"/>
<chmod perm="777" file="${package.lib}/${lib.prefix}webclient.${so.suffix}"/>
<chmod perm="777" file="${package.lib}/${lib.prefix}wc_share.${ar.suffix}"/>
<chmod perm="777" file="${package.example}/runem.pl"/>
2002-11-20 03:42:27 +00:00
2002-12-20 22:40:32 +00:00
</target>
<target name="build.webclient.xpi" depends="build.win32.webclient.xpi,build.unix.webclient.xpi"/>
<target name="build.win32.webclient.xpi" if="build.win32.classes">
<echo message="Building WIN32 XPI"/>
2002-11-20 03:42:27 +00:00
<jar jarfile="webclient_${package.version}_${short.os.name}.xpi"
basedir="${dist}" includes="install.js,javadev/**"/>
2002-12-20 22:40:32 +00:00
</target>
2002-11-20 03:42:27 +00:00
2002-12-20 22:40:32 +00:00
<target name="build.unix.webclient.xpi" if="build.unix.classes">
<echo message="Building UNIX XPI"/>
<copy file="${dist}/${win.bin}/bin/${lib.prefix}webclientstub.${so.suffix}"
todir="${package.lib}"/>
2002-12-20 22:40:32 +00:00
<jar jarfile="webclient_${package.version}_${short.os.name}.xpi"
basedir="${dist}" includes="install.js,symlink.sh,chmodx.sh,javadev/**"/>
2002-11-20 03:42:27 +00:00
</target>
<target name="create.webclient.scripts" depends="create.win32.webclient.scripts,create.unix.webclient.scripts"/>
<target name="create.win32.webclient.scripts" if="build.win32.classes">
<echo file="${package.example}/runem.bat">set CLASSPATH=..\lib\webclient_${package.version}_${short.os.name}.jar
set PATH=%PATH%;%JDKHOME%\jre\bin
2002-11-20 03:42:27 +00:00
perl .\runem.pl org.mozilla.webclient.test.EmbeddedMozillaImpl ..\.. %1%
</echo>
<chmod perm="777" file="${package.example}/runem.bat"/>
2002-11-20 03:42:27 +00:00
<copy file="install_webclient_win32.js"
tofile="${dist}/install.js"/>
</target>
<target name="create.unix.webclient.scripts" if="build.unix.classes">
<echo file="${package.example}/runem.bat">export CLASSPATH=../lib/webclient_${package.version}_${short.os.name}.jar
export LD_LIBRARY_PATH=$MOZILLA_FIVE_HOME:$MOZILLA_FIVE_HOME/components:$PWD/../lib
perl ./runem.pl org.mozilla.webclient.test.EmbeddedMozillaImpl ../../.. $1 $2 $3 $4 $4 $6
2002-12-20 22:40:32 +00:00
</echo>
<chmod perm="777" file="${package.example}/runem.bat"/>
2002-12-20 22:40:32 +00:00
<copy file="install_webclient_unix.js"
tofile="${dist}/install.js"/>
<copy file="symlink.sh"
todir="${dist}"/>
<copy file="chmodx.sh"
todir="${dist}"/>
2002-10-02 22:23:47 +00:00
</target>
<target name="clean">
<delete dir="${package.home}"/>
2002-11-09 23:03:06 +00:00
<delete dir="${build.home}/META-INF"/>
2002-11-20 03:42:27 +00:00
<delete file="${dist}/install.js"/>
2002-12-20 22:40:32 +00:00
<delete file="${dist}/symlink.sh"/>
<delete file="${dist}/chmodx.sh"/>
<delete>
<fileset dir="." includes="*.xpi"/>
</delete>
2002-11-09 23:03:06 +00:00
</target>
2003-06-10 17:47:34 +00:00
<target name="create.webclient.manifest" depends="prepare">
<echo message="Creating manifest to ${package.manifest}"/>
2002-11-09 23:03:06 +00:00
<echo file="${package.manifest}">Manifest-Version: 1.0
Created-By: Webclient Build System
Specification-Title: Webclient
Specification-Version: 1.0
Specification-Vendor: mozilla.org
Implementation-Title: Webclient_mozilla
Implementation-Version: ${package.version}
Implementation-Vendor: mozilla.org
</echo>
</target>
<target name="build.webclient.jar">
<jar jarfile="${package.lib}/webclient_${package.version}_${short.os.name}.jar"
basedir="${build.home}" manifest="${package.manifest}"/>
2002-10-02 22:23:47 +00:00
</target>
<target name="deploy.xpi" depends="main">
<copy file="webclient_${package.version}_${short.os.name}.xpi"
todir="${xpi.dist}"/>
</target>
2003-06-10 17:47:34 +00:00
<target name="build.demo" depends="clean.demo,create.webclient.manifest">
<mkdir dir="${basedir}/demo"/>
<mkdir dir="${basedir}/demo/ie"/>
<jar jarfile="${basedir}/demo/webclient_${package.version}_${short.os.name}.jar"
basedir="../../dist/classes" manifest="${package.manifest}"/>
<copy file="${basedir}/demo_ie.bat" todir="${basedir}/demo"/>
<copy file="${basedir}/demo_moz.bat" todir="${basedir}/demo"/>
<copy file="${basedir}/demo_del.bat" todir="${basedir}/demo"/>
<copy file="../dom/jni/javadomjni.dll" todir="${basedir}/demo"/>
<copy file="../dom/src/javadom.dll" todir="${basedir}/demo"/>
<copy file="../webclient/src_moz/webclient.dll" todir="${basedir}/demo"/>
<copy file="../webclient/src_ie/webclient.dll" todir="${basedir}/demo/ie"/>
<zip zipfile="${basedir}/wc_unpack_in_moz_bin.zip"
basedir="${basedir}/demo"/>
</target>
<target name="clean.demo">
<delete dir="${basedir}/demo"/>
<delete file="${basedir}/wc_unpack_in_moz_bin.zip"/>
</target>
2002-10-02 22:23:47 +00:00
</project>