2004-05-11 17:46:01 +00:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
<project name="antville" default="usage" basedir=".">
|
|
|
|
<target name="help" depends="usage"/>
|
|
|
|
<target name="usage">
|
2009-11-01 10:49:31 +00:00
|
|
|
<echo message="Antville Build Instructions"/>
|
|
|
|
<echo message="==========================="/>
|
|
|
|
<echo message="Available targets are:"/>
|
|
|
|
<echo message=" * Generate the Antville and AntClick packages"/>
|
2009-11-01 12:03:32 +00:00
|
|
|
<echo message=" antville Generate the Antville packages"/>
|
2009-11-01 10:49:31 +00:00
|
|
|
<echo message=" antclick Generate the AntClick packages"/>
|
2009-11-01 12:03:32 +00:00
|
|
|
<!--echo message=" publish Copy packages to the download server"/-->
|
|
|
|
<!--echo message=" docs Generate the API documentation"/-->
|
2009-11-01 10:49:31 +00:00
|
|
|
<echo message=" pot Extract gettext call strings into POT file" />
|
|
|
|
<echo message=" messages Generate JavaScript message files" />
|
2009-11-01 12:03:32 +00:00
|
|
|
<echo message=" usage Show these build instructions (default)"/>
|
2004-05-11 17:46:01 +00:00
|
|
|
</target>
|
2009-11-01 12:03:32 +00:00
|
|
|
|
|
|
|
<target name="*" depends="antville, antclick" />
|
2009-11-01 10:49:31 +00:00
|
|
|
|
2004-05-11 17:46:01 +00:00
|
|
|
<target name="init">
|
2009-11-01 10:49:31 +00:00
|
|
|
<property name="name" value="antville"/>
|
|
|
|
<property name="year" value="1998-${year}"/>
|
|
|
|
<property name="version" value="1.2"/>
|
|
|
|
<property name="package.name" value="${name}-${version}"/>
|
|
|
|
<property name="antville.src" value="http://antville.googlecode.com/svn/trunk"/>
|
|
|
|
<property name="helma.src" value="http://dev.helma.org/svn/helma/helma/trunk"/>
|
|
|
|
<property name="apps.src" value="http://dev.helma.org/svn/apps"/>
|
|
|
|
<property name="home.dir" location="${build.dir}/.."/>
|
|
|
|
<property name="extra.dir" location="${build.dir}/extra"/>
|
|
|
|
<property name="work.dir" location="${build.dir}/work"/>
|
2009-11-01 12:44:08 +00:00
|
|
|
<property name="modules.dir" location="${work.dir}/modules"/>
|
2009-11-01 10:49:31 +00:00
|
|
|
<property name="apps.dir" location="${work.dir}/apps"/>
|
|
|
|
<property name="antville.dir" location="${apps.dir}/antville"/>
|
|
|
|
<property name="dist.dir" location="${build.dir}/dist"/>
|
|
|
|
<property name="hopkit.dir" location="${helma.dir}/modules/jala/util/HopKit"/>
|
|
|
|
<property name="i18n.scan" location="code"/>
|
|
|
|
<property name="i18n.destination" location="${home.dir}/i18n"/>
|
|
|
|
<property name="i18n.poDirectory" location="${i18n.destination}"/>
|
|
|
|
<property name="i18n.template" location="${i18n.destination}/antville.pot"/>
|
|
|
|
<property name="i18n.namespace" value=""/>
|
2004-05-11 17:46:01 +00:00
|
|
|
<tstamp/>
|
|
|
|
<filter token="year" value="${year}"/>
|
|
|
|
<filter token="version" value="${version}"/>
|
|
|
|
<filter token="date" value="${TODAY}"/>
|
|
|
|
</target>
|
2009-11-01 10:49:31 +00:00
|
|
|
|
|
|
|
<target name="pot" depends="init">
|
|
|
|
<java dir="${helma.dir}" classpath="${helma.dir}/launcher.jar"
|
|
|
|
classname="helma.main.launcher.Commandline" fork="true">
|
|
|
|
<arg value="antville.xgettext"/>
|
|
|
|
<arg value="${hopkit.dir}/scripts/MessageParser.js"/>
|
|
|
|
<arg line="${i18n.scan}"/>
|
|
|
|
<arg value="${i18n.template}"/>
|
|
|
|
</java>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="messages" depends="init">
|
|
|
|
<java classname="org.mozilla.javascript.tools.shell.Main">
|
|
|
|
<arg value="${hopkit.dir}/scripts/PoParser.js"/>
|
|
|
|
<arg value="${i18n.poDirectory}"/>
|
|
|
|
<arg value="${i18n.destination}"/>
|
|
|
|
<arg value="${i18n.namespace}"/>
|
|
|
|
</java>
|
|
|
|
</target>
|
|
|
|
|
2009-11-01 12:03:32 +00:00
|
|
|
<target name="export" depends="init">
|
|
|
|
<mkdir dir="${apps.dir}"/>
|
|
|
|
<exec dir="${apps.dir}" executable="svn">
|
|
|
|
<arg line="export ${antville.src} antville"/>
|
|
|
|
</exec>
|
2009-11-01 10:49:31 +00:00
|
|
|
</target>
|
2009-11-01 12:03:32 +00:00
|
|
|
|
|
|
|
<target name="antville" depends="export">
|
|
|
|
<antcall target="make-tar">
|
|
|
|
<param name="filename" value="${package.name}"/>
|
|
|
|
<param name="path" value="${antville.dir}"/>
|
|
|
|
</antcall>
|
|
|
|
<antcall target="make-zip">
|
|
|
|
<param name="filename" value="${package.name}"/>
|
|
|
|
<param name="path" value="${antville.dir}"/>
|
|
|
|
</antcall>
|
|
|
|
</target>
|
2009-11-01 10:49:31 +00:00
|
|
|
|
|
|
|
<target name="antclick" depends="export">
|
|
|
|
<exec dir="${work.dir}" executable="svn">
|
|
|
|
<arg line="export ${helma.src}/lib"/>
|
|
|
|
</exec>
|
|
|
|
<exec dir="${work.dir}" executable="svn">
|
|
|
|
<arg line="export ${apps.src}/modules/trunk modules"/>
|
2009-11-01 12:44:08 +00:00
|
|
|
</exec>
|
2009-11-01 10:49:31 +00:00
|
|
|
<exec dir="${work.dir}" executable="svn">
|
|
|
|
<arg line="export ${helma.src}/licenses"/>
|
|
|
|
</exec>
|
|
|
|
<exec dir="${work.dir}" executable="svn">
|
|
|
|
<arg line="export ${helma.src}/license.txt"/>
|
|
|
|
</exec>
|
|
|
|
<exec dir="${apps.dir}" executable="svn">
|
|
|
|
<arg line="export ${apps.src}/manage/trunk manage"/>
|
|
|
|
</exec>
|
|
|
|
<exec dir="${extra.dir}" executable="cp">
|
|
|
|
<arg line="-p start.sh ${work.dir}"/>
|
|
|
|
</exec>
|
2009-11-01 12:44:08 +00:00
|
|
|
|
2009-11-01 10:49:31 +00:00
|
|
|
<copy todir="${work.dir}">
|
|
|
|
<fileset dir="${extra.dir}" includes="start.bat apps.properties
|
|
|
|
server.properties launcher.jar"/>
|
|
|
|
</copy>
|
2009-11-01 12:44:08 +00:00
|
|
|
<copy todir="${antville.dir}">
|
2009-11-01 10:49:31 +00:00
|
|
|
<fileset dir="${extra.dir}" includes="antclick/**"/>
|
|
|
|
</copy>
|
|
|
|
<copy file="${extra.dir}/helma.jar" todir="${work.dir}/lib"/>
|
|
|
|
<copy file="${extra.dir}/h2.jar" todir="${work.dir}/lib/ext"/>
|
2009-11-01 12:03:32 +00:00
|
|
|
<copy todir="${work.dir}/db">
|
2009-11-01 11:47:47 +00:00
|
|
|
<fileset dir="${extra.dir}" includes="antville.*.db"/>
|
|
|
|
</copy>
|
2009-11-01 10:49:31 +00:00
|
|
|
<move file="${work.dir}/license.txt" todir="${work.dir}/licenses/helma.txt"/>
|
2004-05-13 22:44:11 +00:00
|
|
|
|
2009-11-01 12:44:08 +00:00
|
|
|
<delete>
|
|
|
|
<fileset dir="${modules.dir}" includes="test/**"/>
|
|
|
|
</delete>
|
|
|
|
<delete>
|
|
|
|
<fileset dir="${modules.dir}/helma" includes="*.jar Search.js Ssh.js Chart.js"/>
|
|
|
|
</delete>
|
|
|
|
<delete>
|
|
|
|
<fileset dir="${modules.dir}/jala" includes="lib/** tests/** docs/** util/**"/>
|
|
|
|
</delete>
|
|
|
|
<delete includeemptydirs="true">
|
|
|
|
<fileset dir="${antville.dir}" includes="build/** compat/** db/** extra/**"/>
|
|
|
|
</delete>
|
|
|
|
|
2009-11-01 11:47:47 +00:00
|
|
|
<antcall target="make-zip">
|
|
|
|
<param name="filename" value="antclick-${version}"/>
|
2009-11-01 12:44:08 +00:00
|
|
|
<param name="path" value="${work.dir}"/>
|
2004-05-13 13:06:21 +00:00
|
|
|
</antcall>
|
2009-11-01 11:47:47 +00:00
|
|
|
<antcall target="make-tar">
|
|
|
|
<param name="filename" value="antclick-${version}"/>
|
2009-11-01 12:44:08 +00:00
|
|
|
<param name="path" value="${work.dir}"/>
|
2004-05-11 17:46:01 +00:00
|
|
|
</antcall>
|
2004-06-05 13:54:36 +00:00
|
|
|
</target>
|
2004-05-11 17:46:01 +00:00
|
|
|
|
2009-11-01 12:03:32 +00:00
|
|
|
<target name="make-tar" depends="init">
|
|
|
|
<mkdir dir="${dist.dir}" />
|
|
|
|
<fixcrlf srcdir="${path}" eol="lf" eof="remove" includes="**/*.txt,
|
|
|
|
**/*.properties, **/*.hac, **/*.js, **/*.skin, **/.xml, **/.sh" />
|
|
|
|
<tar tarfile="${dist.dir}/${filename}.tar" basedir="${path}" excludes="**">
|
|
|
|
<tarfileset prefix="${filename}" dir="${path}" mode="755">
|
|
|
|
<include name="**/*.sh"/>
|
|
|
|
</tarfileset>
|
|
|
|
<tarfileset prefix="${filename}" dir="${path}">
|
|
|
|
<include name="**"/>
|
|
|
|
<exclude name="**/*.sh"/>
|
|
|
|
</tarfileset>
|
|
|
|
</tar>
|
|
|
|
<bzip2 zipfile="${dist.dir}/${filename}.bz2" src="${dist.dir}/${filename}.tar"/>
|
|
|
|
<delete file="${dist.dir}/${filename}.tar"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="make-zip" depends="init">
|
|
|
|
<mkdir dir="${dist.dir}" />
|
|
|
|
<fixcrlf srcdir="${path}" eol="crlf" includes="**/*.txt, **/*.properties,
|
|
|
|
**/*.hac, **/*.js, **/*.skin, **/*.xml, **/.bat" />
|
|
|
|
<zip zipfile="${dist.dir}/${filename}.zip">
|
|
|
|
<zipfileset dir="${path}" prefix="${filename}" includes="**" />
|
|
|
|
</zip>
|
2004-06-05 13:54:36 +00:00
|
|
|
</target>
|
2009-11-01 12:03:32 +00:00
|
|
|
|
2009-11-01 10:49:31 +00:00
|
|
|
<target name="clean" depends="init">
|
|
|
|
<delete dir="${work.dir}"/>
|
2009-11-01 11:22:33 +00:00
|
|
|
<delete dir="${dist.dir}"/>
|
2009-11-01 10:49:31 +00:00
|
|
|
</target>
|
2004-06-05 13:54:36 +00:00
|
|
|
|
2004-05-11 17:46:01 +00:00
|
|
|
</project>
|