merge the formfield patch from ooo-build
[ooovba.git] / odk / examples / DevelopersGuide / FirstSteps / build_FirstUnoContact.xml
blobe2b534f8b4984aaca785a9d5619087b5d0d142ee
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project basedir="." default="all" name="FirstUnoContact">
4     <property environment="env"/>
5     <property name="OFFICE_HOME" value="${env.OFFICE_HOME}"/>
6     <property name="OO_SDK_HOME" value="${env.OO_SDK_HOME}"/>
7     
8     <target name="init">
9         <property name="OUTDIR" value="${OO_SDK_HOME}/WINExample.out/class/FirstUnoContact"/>
10     </target>
12     <path id="office.class.path"> 
13         <filelist dir="${OFFICE_HOME}/program/classes"
14             files="jurt.jar,unoil.jar,ridl.jar,juh.jar"/>
15     </path> 
16     
17     <fileset id="bootstrap.glue.code" dir="${OO_SDK_HOME}/classes">
18         <patternset>
19             <include name="com/sun/star/lib/loader/*.class"/>
20             <include name="win/unowinreg.dll"/>
21         </patternset>
22     </fileset>    
23            
24     <target name="compile" depends="init">
25         <mkdir dir="${OUTDIR}"/>
26         <javac debug="true" deprecation="true" destdir="${OUTDIR}" srcdir=".">
27             <classpath refid="office.class.path"/>
28         </javac>
29     </target>
31     <target name="jar" depends="init,compile">
32         <jar basedir="${OUTDIR}" compress="true" 
33             jarfile="${OUTDIR}/FirstUnoContact.jar">
34             <exclude name="**/*.java"/>
35             <exclude name="*.jar"/>
36             <fileset refid="bootstrap.glue.code"/>
37             <manifest>
38                 <attribute name="Main-Class" value="com.sun.star.lib.loader.Loader"/>
39                 <section name="com/sun/star/lib/loader/Loader.class">
40                 <attribute name="Application-Class" value="FirstUnoContact"/>
41                 </section>
42             </manifest>
43         </jar>
44     </target>
46     <target name="all"  description="Build everything." depends="init,compile,jar">
47         <echo message="Application built. FirstUnoContact!"/>
48     </target>
50     <target name="run" description="Try running it." depends="init,all">
51         <java jar="${OUTDIR}/FirstUnoContact.jar" failonerror="true" fork="true">
52         </java>
53     </target>
55     <target  name="clean" description="Clean all build products." depends="init">
56         <delete>
57             <fileset dir="${OUTDIR}">
58                 <include name="**/*.class"/>
59             </fileset>
60         </delete>
61         <delete file="${OUTDIR}/FirstUnoContact.jar"/>
62     </target>
64 </project>