123 lines
4.8 KiB
XML
123 lines
4.8 KiB
XML
|
<?xml version="1.0"?>
|
||
|
|
||
|
<!--
|
||
|
Copyright 2004 Sun Microsystems, Inc. All rights reserved.
|
||
|
SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
||
|
-->
|
||
|
|
||
|
<project name="javainstaller2" default="build" basedir=".">
|
||
|
|
||
|
<!-- build output directory -->
|
||
|
<property name="name" value="JavaSetup"/>
|
||
|
<property name="out" value="build"/>
|
||
|
<property name="classes.dir" value="classes"/>
|
||
|
<property name="source.dir" location="${basedir}/src/${name}"/>
|
||
|
<property name="build.dir" location="${out}/misc"/>
|
||
|
<property name="dist.dir" location="${out}/bin"/>
|
||
|
<property name="compile.debug" value="true"/>
|
||
|
<property name="compile.optimize" value="false"/>
|
||
|
<property name="lib.dir" location="{$basedir}/lib"/>
|
||
|
<property name="verbose" value="false"/>
|
||
|
<property name="javainstaller.jar.file" location="{$basedir}/lib"/>
|
||
|
|
||
|
<!-- MAIN TARGET -->
|
||
|
<target name="build" depends="prepare, info_uptodate, info_notuptodate, compile-javainstaller, jar-javainstaller, clean">
|
||
|
<echo message="Done"/>
|
||
|
</target>
|
||
|
|
||
|
<!-- INITIALIZATION TASKS -->
|
||
|
<target name="init">
|
||
|
<!-- up to date checks -->
|
||
|
<uptodate property="jarFile.uptodate" targetfile="${dist.dir}/${name}.jar">
|
||
|
<srcfiles dir="${source.dir}" includes="**/*.gif,**/*.png,**/*.java"/>
|
||
|
<srcfiles dir="${build.dir}" includes="**/*.properties"/>
|
||
|
</uptodate>
|
||
|
</target>
|
||
|
|
||
|
<target name="prepare" depends="init" unless="jarFile.uptodate">
|
||
|
<mkdir dir="${build.dir}"/>
|
||
|
<mkdir dir="${build.dir}/${classes.dir}"/>
|
||
|
<mkdir dir="${build.dir}/${classes.dir}/${name}"/>
|
||
|
<mkdir dir="${dist.dir}"/>
|
||
|
</target>
|
||
|
|
||
|
<!-- show information about current sub target in recursive builds -->
|
||
|
<target name="info_uptodate" depends="init" if="jarFile.uptodate">
|
||
|
<tstamp prefix="start"/>
|
||
|
<echo message="--------------------------------------------------------------------------------" />
|
||
|
<echo message="Nothing to do. ${dist.dir}/${name}.jar is up to date."/>
|
||
|
<echo message="--------------------------------------------------------------------------------" />
|
||
|
</target>
|
||
|
|
||
|
<!-- show information about current sub target in recursive builds -->
|
||
|
<target name="info_notuptodate" depends="init" unless="jarFile.uptodate">
|
||
|
<tstamp prefix="start"/>
|
||
|
<echo message="--------------------------------------------------------------------------------" />
|
||
|
<echo message="Source dir: ${source.dir}"/>
|
||
|
<echo message="Build dir: ${build.dir}"/>
|
||
|
<echo message="Dist dir: ${dist.dir}"/>
|
||
|
<echo message="Debug is ${debug}"/>
|
||
|
<echo message="--------------------------------------------------------------------------------" />
|
||
|
</target>
|
||
|
|
||
|
<target name="compile-javainstaller" depends="prepare" unless="jarFile.uptodate">
|
||
|
<javac srcdir="${source.dir}" source="1.4" target="1.4"
|
||
|
destdir="${build.dir}/${classes.dir}/${name}"
|
||
|
debug="${compile.debug}"
|
||
|
optimize="${compile.optimize}">
|
||
|
</javac>
|
||
|
<copy todir="${build.dir}/${classes.dir}/${name}/org/openoffice/setup">
|
||
|
<fileset dir="${build.dir}" includes="*.properties"/>
|
||
|
</copy>
|
||
|
<copy todir="${build.dir}/${classes.dir}/${name}/org/openoffice/setup/Icons">
|
||
|
<fileset dir="${source.dir}/org/openoffice/setup/Icons" includes="*.gif,*.png"/>
|
||
|
</copy>
|
||
|
</target>
|
||
|
|
||
|
<target name="jar-javainstaller" depends="compile-javainstaller" unless="jarFile.uptodate">
|
||
|
<jar file="${dist.dir}/${name}.jar">
|
||
|
<fileset dir="${build.dir}/${classes.dir}/${name}" includes="**/*"/>
|
||
|
<manifest>
|
||
|
<attribute name="Main-Class" value="org.openoffice.setup.Main"/>
|
||
|
</manifest>
|
||
|
</jar>
|
||
|
</target>
|
||
|
|
||
|
<!--
|
||
|
<target name="test-javainstaller" depends="build-javainstaller">
|
||
|
<java classname="com.sun.soserv.staroffice.CoreTest" fork="true">
|
||
|
<classpath>
|
||
|
<pathelement location="${build.dir}/${classes.dir}/client"/>
|
||
|
<pathelement location="/soserv-core.jar"/>
|
||
|
<pathelement location="${basedir}/lib/juh.jar"/>
|
||
|
</classpath>
|
||
|
<sysproperty key="verbose" value="true"/>
|
||
|
<arg value="file:///tausch/lo/test.odt"/>
|
||
|
<arg value="file:///tausch/lo/"/>
|
||
|
<arg value="/export/home/lo/m145"/>
|
||
|
<arg value=":12"/>
|
||
|
</java>
|
||
|
</target>
|
||
|
-->
|
||
|
|
||
|
<!-- CLEAN UP OUTPUT TREES -->
|
||
|
<target name="clean" unless="jarFile.uptodate">
|
||
|
<!-- <delete dir="${build.dir}"/> -->
|
||
|
</target>
|
||
|
|
||
|
<!-- execution section -->
|
||
|
<target name="run" depends="jar-javainstaller">
|
||
|
<echo message="Starting: java -jar ${dist.dir}/${name}.jar" />
|
||
|
<java jar="${dist.dir}/${name}.jar" fork="true"/>
|
||
|
<!-- </java> -->
|
||
|
</target>
|
||
|
|
||
|
<target name="debug" depends="jar-javainstaller">
|
||
|
<echo message="Starting for debugging: java -jar ${dist.dir}/${name}.jar" />
|
||
|
<java jar="${dist.dir}/${name}.jar" fork="true"/>
|
||
|
<!-- </java> -->
|
||
|
</target>
|
||
|
|
||
|
|
||
|
</project>
|