зеркало из https://github.com/mozilla/gecko-dev.git
264 строки
8.7 KiB
XML
264 строки
8.7 KiB
XML
<?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 >edburns@acm.org<
|
|
|
|
|
|
-->
|
|
|
|
<project name="java.supplement.build" default="main" basedir=".">
|
|
|
|
<property name="Name" value="java.supplement.build"/>
|
|
<property name="name" value="java.supplement.build"/>
|
|
<property name="version" value="20021220"/>
|
|
|
|
<!-- ************ 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"/>
|
|
<property name="package.manifest" value="${build.home}/META-INF/MANIFEST.MF"/>
|
|
<property name="package.version" value="1_3"/>
|
|
<property name="dist" value="${build.home}/.."/>
|
|
|
|
<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"/>
|
|
|
|
<target name="prepare">
|
|
|
|
<condition property="short.os.name" value="win32">
|
|
<os family="dos" />
|
|
</condition>
|
|
|
|
<condition property="short.os.name" value="linux">
|
|
<os family="unix" />
|
|
</condition>
|
|
|
|
<condition property="win.bin" value="WIN32_O.OBJ">
|
|
<os family="dos" />
|
|
</condition>
|
|
|
|
<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>
|
|
|
|
<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>
|
|
|
|
|
|
<mkdir dir="${package.home}"/>
|
|
<mkdir dir="${package.lib}"/>
|
|
<mkdir dir="${package.example}"/>
|
|
<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>
|
|
|
|
<target name="build.webclient.javadev"
|
|
depends="create.webclient.manifest,build.webclient.jar,create.webclient.scripts">
|
|
|
|
<copy file="${dist}/${win.bin}/bin/${javadomjni.location}/${lib.prefix}javadomjni.${so.suffix}"
|
|
todir="${package.lib}"/>
|
|
<copy file="${dist}/${win.bin}/bin/components/${lib.prefix}javadom.${so.suffix}"
|
|
todir="${package.lib}"/>
|
|
<copy file="${dist}/${win.bin}/bin/${lib.prefix}webclient.${so.suffix}"
|
|
todir="${package.lib}"/>
|
|
<copy file="${dist}/${win.bin}/lib/${lib.prefix}wc_share.${ar.suffix}"
|
|
todir="${package.lib}"/>
|
|
<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"/>
|
|
|
|
</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"/>
|
|
<jar jarfile="webclient_${package.version}_${short.os.name}.xpi"
|
|
basedir="${dist}" includes="install.js,javadev/**"/>
|
|
</target>
|
|
|
|
<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}"/>
|
|
|
|
<jar jarfile="webclient_${package.version}_${short.os.name}.xpi"
|
|
basedir="${dist}" includes="install.js,symlink.sh,chmodx.sh,javadev/**"/>
|
|
|
|
</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
|
|
perl .\runem.pl org.mozilla.webclient.test.EmbeddedMozillaImpl ..\.. %1%
|
|
</echo>
|
|
<chmod perm="777" file="${package.example}/runem.bat"/>
|
|
|
|
<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
|
|
</echo>
|
|
<chmod perm="777" file="${package.example}/runem.bat"/>
|
|
|
|
<copy file="install_webclient_unix.js"
|
|
tofile="${dist}/install.js"/>
|
|
<copy file="symlink.sh"
|
|
todir="${dist}"/>
|
|
<copy file="chmodx.sh"
|
|
todir="${dist}"/>
|
|
|
|
</target>
|
|
|
|
<target name="clean">
|
|
|
|
<delete dir="${package.home}"/>
|
|
<delete dir="${build.home}/META-INF"/>
|
|
<delete file="${dist}/install.js"/>
|
|
<delete file="${dist}/symlink.sh"/>
|
|
<delete file="${dist}/chmodx.sh"/>
|
|
<delete>
|
|
<fileset dir="." includes="*.xpi"/>
|
|
</delete>
|
|
|
|
</target>
|
|
|
|
<target name="create.webclient.manifest" depends="prepare">
|
|
<echo message="Creating manifest to ${package.manifest}"/>
|
|
<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}"/>
|
|
|
|
</target>
|
|
|
|
<target name="deploy.xpi" depends="main">
|
|
|
|
<copy file="webclient_${package.version}_${short.os.name}.xpi"
|
|
todir="${xpi.dist}"/>
|
|
|
|
</target>
|
|
|
|
<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>
|
|
|
|
</project>
|