1 <?xml version="1.0" encoding="UTF-8"?>
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
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}"/>
26 <property name="OUTDIR" value="${OO_SDK_HOME}/WINExample.out/class/FirstUnoContact"/>
29 <path id="office.class.path">
30 <filelist dir="${OFFICE_HOME}/program/classes"
31 files="libreoffice.jar"/>
34 <fileset id="bootstrap.glue.code" dir="${OO_SDK_HOME}/classes">
36 <include name="com/sun/star/lib/loader/*.class"/>
40 <target name="compile" depends="init">
41 <mkdir dir="${OUTDIR}"/>
42 <javac debug="true" deprecation="true" destdir="${OUTDIR}" srcdir=".">
43 <classpath refid="office.class.path"/>
47 <target name="jar" depends="init,compile">
48 <jar basedir="${OUTDIR}" compress="true"
49 jarfile="${OUTDIR}/FirstUnoContact.jar">
50 <exclude name="**/*.java"/>
51 <exclude name="*.jar"/>
52 <fileset refid="bootstrap.glue.code"/>
54 <attribute name="Main-Class" value="com.sun.star.lib.loader.Loader"/>
55 <section name="com/sun/star/lib/loader/Loader.class">
56 <attribute name="Application-Class" value="FirstUnoContact"/>
62 <target name="all" description="Build everything." depends="init,compile,jar">
63 <echo message="Application built. FirstUnoContact!"/>
66 <target name="run" description="Try running it." depends="init,all">
67 <java jar="${OUTDIR}/FirstUnoContact.jar" failonerror="true" fork="true">
71 <target name="clean" description="Clean all build products." depends="init">
73 <fileset dir="${OUTDIR}">
74 <include name="**/*.class"/>
77 <delete file="${OUTDIR}/FirstUnoContact.jar"/>