<!-- build.xml without Neatbans dependencies. by Ismael Olea <ismael@olea.org>, public domain --> <project name="OmegaT" default="dist" basedir="."> <description> OmegaT </description> <!-- set global properties for this build --> <target name="init"> <!-- Create the time stamp --> <tstamp/> <!-- Create the build directory structure used by compile --> <property file="src/org/omegat/Version.properties"/> <condition property="updatenr" value="0${update}" else="${update}"> <length string="${update}" length="1"/> </condition> <condition property="distversion" value="${version}" else="${version}_${updatenr}"> <equals arg1="${updatenr}" arg2="00"/> </condition> <property name="src" location="src"/> <property name="build" location="build"/> <property name="build.dir" location="build"/> <property name="jar" location="dist"/> <property name="dist" location="dist"/> <mkdir dir="${build}"/> <filter filtersfile="src/org/omegat/Version.properties"/> <copy file="manifest-template.mf" tofile="manifest.mf" filtering="true"/> </target> <target name="compile" depends="init" description="compile the source " > <!-- Compile the java code from ${src} into ${build} --> <javac srcdir="${src}" destdir="${build}" verbose="yes"> <classpath> <pathelement path="${classpath}"/> <pathelement location="/usr/share/java/htmlparser-1.6.jar"/> <pathelement location="/usr/share/java/vldocking.jar"/> <pathelement location="/usr/share/java/jna.jar"/> <pathelement location="lib-mnemonics/dist/lib-mnemonics.jar"/> <pathelement location="/usr/share/java/jaxme2.jar"/> <pathelement location="/usr/share/java/jaxme2-rt.jar"/> <pathelement location="/usr/share/java/jaxmejs.jar"/> <pathelement location="/usr/share/java/jaxmepm.jar"/> <pathelement location="/usr/share/java/jaxmexs.jar"/> <pathelement location="/usr/share/java/swing-layout.jar"/> </classpath> </javac> </target> <target name="dist" depends="jar"> </target> <target name="jar" depends="compile,l10n-pack" description="generate the distribution" > <!-- Create the distribution directory --> <mkdir dir="${dist}"/> <copy todir="${build}" > <fileset dir="${src}"> <include name="**/*"/> <exclude name="**/*.java"/> </fileset> </copy> <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file --> <jar jarfile="${dist}/OmegaT.jar" basedir="${build}" manifest="manifest.mf" /> </target> <target name="clean" description="clean up" > <!-- Delete the ${build} and ${dist} directory trees --> <delete dir="${build}"/> <delete dir="${dist}"/> </target> <target name="l10n-pack" depends="init" description="Build a distribution of localizable files"> <property file="src/org/omegat/Version.properties"/> <mkdir dir="${dist}"/> <property name="l10n.project.dir" value="release/l10n-project"/> <property name="l10n.dir" value="${build.dir}/l10n"/> <mkdir dir="${l10n.dir}"/> <!-- minimal --> <property name="l10n.min" value="OmegaT_${distversion}_L10N_Minimal"/> <property name="l10n.min.dir" value="${l10n.dir}/${l10n.min}"/> <mkdir dir="${l10n.min.dir}"/> <copy todir="${l10n.min.dir}"> <fileset dir="${l10n.project.dir}"/> </copy> <copy todir="${l10n.min.dir}/source"> <fileset dir="." includes="docs/en/instantStartGuideNoTOC.html src/**/Bundle.properties"/> </copy> <copy file="release/readme.txt" tofile="${l10n.min.dir}/source/readme.utf8" encoding="UTF-8" outputencoding="UTF-8"> <filterset begintoken="@@" endtoken="@@"> <filter token="TRANSLATION_NOTICE" value="This translation is the work of [insert your name], copyright© [insert year]."/> </filterset> </copy> <zip destfile="${dist}/${l10n.min}.zip" basedir="${l10n.dir}" includes="${l10n.min}/**" /> <!-- full --> <property name="l10n.max" value="OmegaT_${distversion}_L10N_Full"/> <property name="l10n.max.dir" value="${l10n.dir}/${l10n.max}"/> <mkdir dir="${l10n.max.dir}"/> <copy todir="${l10n.max.dir}"> <fileset dir="${l10n.project.dir}"/> </copy> <copy todir="${l10n.max.dir}/source"> <!-- Copy all files except legalNotices.html --> <fileset dir="." includes="docs/en/** src/**/Bundle.properties" excludes="docs/en/legalNotices.html"/> </copy> <copy file="release/readme.txt" tofile="${l10n.max.dir}/source/readme.utf8" encoding="UTF-8" outputencoding="UTF-8"> <filterset begintoken="@@" endtoken="@@"> <filter token="TRANSLATION_NOTICE" value="This translation is the work of [insert your name], copyright© [insert year]."/> </filterset> </copy> <copy todir="${l10n.max.dir}/source" encoding="UTF-8" outputencoding="UTF-8"> <fileset dir="." includes="docs/en/legalNotices.html"/> <filterset begintoken="@@" endtoken="@@"> <filter token="TRANSLATION_NOTICE" value="<p>This translation is the work of [insert your name], copyright© [insert year].</p>"/> </filterset> </copy> <zip destfile="${dist}/${l10n.max}.zip" basedir="${l10n.dir}" includes="${l10n.max}/**" /> </target> </project>