Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / odk / examples / DevelopersGuide / FirstSteps / build_FirstUnoContact.xml
blob0e2e55ce0525be7276a61b1a768d03d1c169e7b4
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  *   Licensed to the Apache Software Foundation (ASF) under one or more
12  *   contributor license agreements. See the NOTICE file distributed
13  *   with this work for additional information regarding copyright
14  *   ownership. The ASF licenses this file to you under the Apache
15  *   License, Version 2.0 (the "License"); you may not use this file
16  *   except in compliance with the License. You may obtain a copy of
17  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 -->
19 <project basedir="." default="all" name="FirstUnoContact">
21     <property environment="env"/>
22     <property name="OFFICE_HOME" value="${env.OFFICE_HOME}"/>
23     <property name="OO_SDK_HOME" value="${env.OO_SDK_HOME}"/>
25     <target name="init">
26         <property name="OUTDIR" value="${OO_SDK_HOME}/WINExample.out/class/FirstUnoContact"/>
27     </target>
29     <path id="office.class.path">
30         <filelist dir="${OFFICE_HOME}/program/classes"
31             files="jurt.jar,unoil.jar,ridl.jar,juh.jar"/>
32     </path>
34     <fileset id="bootstrap.glue.code" dir="${OO_SDK_HOME}/classes">
35         <patternset>
36             <include name="com/sun/star/lib/loader/*.class"/>
37             <include name="win/unowinreg.dll"/>
38         </patternset>
39     </fileset>
41     <target name="compile" depends="init">
42         <mkdir dir="${OUTDIR}"/>
43         <javac debug="true" deprecation="true" destdir="${OUTDIR}" srcdir=".">
44             <classpath refid="office.class.path"/>
45         </javac>
46     </target>
48     <target name="jar" depends="init,compile">
49         <jar basedir="${OUTDIR}" compress="true"
50             jarfile="${OUTDIR}/FirstUnoContact.jar">
51             <exclude name="**/*.java"/>
52             <exclude name="*.jar"/>
53             <fileset refid="bootstrap.glue.code"/>
54             <manifest>
55                 <attribute name="Main-Class" value="com.sun.star.lib.loader.Loader"/>
56                 <section name="com/sun/star/lib/loader/Loader.class">
57                 <attribute name="Application-Class" value="FirstUnoContact"/>
58                 </section>
59             </manifest>
60         </jar>
61     </target>
63     <target name="all"  description="Build everything." depends="init,compile,jar">
64         <echo message="Application built. FirstUnoContact!"/>
65     </target>
67     <target name="run" description="Try running it." depends="init,all">
68         <java jar="${OUTDIR}/FirstUnoContact.jar" failonerror="true" fork="true">
69         </java>
70     </target>
72     <target  name="clean" description="Clean all build products." depends="init">
73         <delete>
74             <fileset dir="${OUTDIR}">
75                 <include name="**/*.class"/>
76             </fileset>
77         </delete>
78         <delete file="${OUTDIR}/FirstUnoContact.jar"/>
79     </target>
81 </project>