xref: /trunk/test/smoketestdoc/build.xml (revision 6ad462b0)
1<?xml version="1.0" encoding="UTF-8"?>
2<!--***********************************************************
3 *
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements.  See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership.  The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License.  You may obtain a copy of the License at
11 *
12 *   http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied.  See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 *
21 ***********************************************************-->
22
23
24<project name="smoketest" default="smoketest" xmlns:if="ant:if" xmlns:unless="ant:unless">
25    <dirname property="project.dir" file="${ant.file.smoketest}"/>
26
27    <property name="SRC_ROOT" value="${project.dir}/../../main" />
28    <property name="data.dir" value="${project.dir}/data"/>
29    <property name="build.base.dir" value="${project.dir}/target"/>
30    <property name="jar.dir" value="${build.base.dir}/TestExtension"/>
31
32    <import file="${project.dir}/aoo-ant.xml"/>
33
34    <target name="init-project">
35        <property name="jar.name" value="TestExtension"/>
36        <property name="jar.manifest" value="${project.dir}/MANIFEST.MF"/>
37        <mkdir dir="${build.base.dir}/TestExtension"/>
38
39        <path id="main.classpath">
40            <pathelement location="${openoffice.home}/program/classes/juh.jar"/>
41            <pathelement location="${openoffice.home}/program/classes/jurt.jar"/>
42            <pathelement location="${openoffice.home}/program/classes/ridl.jar"/>
43            <pathelement location="${openoffice.home}/program/classes/unoil.jar"/>
44        </path>
45    </target>
46
47    <target name="pre-clean">
48        <delete dir="${project.dir}/target"/>
49    </target>
50
51    <target name="smoketestdoc">
52        <mkdir dir="${project.dir}/target/smoketestdoc"/>
53        <copy todir="${project.dir}/target/smoketestdoc">
54            <resources>
55                <file name="${data.dir}/content.xml"/>
56                <file name="${data.dir}/meta.xml"/>
57                <file name="${data.dir}/settings.xml"/>
58                <file name="${data.dir}/styles.xml"/>
59            </resources>
60        </copy>
61        <echo message="application/vnd.sun.xml.writer" file="${project.dir}/target/smoketestdoc/mimetype"/>
62        <mkdir dir="${project.dir}/target/smoketestdoc/META-INF"/>
63        <copy file="${data.dir}/manifest.xml" todir="${project.dir}/target/smoketestdoc/META-INF"/>
64        <mkdir dir="${project.dir}/target/smoketestdoc/Basic"/>
65        <copy file="${data.dir}/script-lc.xml" todir="${project.dir}/target/smoketestdoc/Basic"/>
66        <mkdir dir="${project.dir}/target/smoketestdoc/Basic/Standard"/>
67        <copy todir="${project.dir}/target/smoketestdoc/Basic/Standard">
68            <resources>
69                <file name="${data.dir}/script-lb.xml"/>
70                <file name="${data.dir}/Events.xml"/>
71                <file name="${data.dir}/Global.xml"/>
72                <file name="${data.dir}/Test_10er.xml"/>
73                <file name="${data.dir}/Test_DB.xml"/>
74                <file name="${data.dir}/Test_Ext.xml"/>
75            </resources>
76        </copy>
77        <mkdir dir="${project.dir}/target/smoketestdoc/Dialogs"/>
78        <copy file="${data.dir}/dialog-lc.xml" todir="${project.dir}/target/smoketestdoc/Dialogs"/>
79        <mkdir dir="${project.dir}/target/smoketestdoc/Dialogs/Standard"/>
80        <copy todir="${project.dir}/target/smoketestdoc/Dialogs/Standard">
81            <resources>
82                <file name="${data.dir}/dialog-lb.xml"/>
83                <file name="${data.dir}/OptionsDlg.xml"/>
84            </resources>
85        </copy>
86        <zip destfile="${project.dir}/target/smoketestdoc.odt" basedir="${project.dir}/target/smoketestdoc" filesonly="true"/>
87    </target>
88
89    <target name="TestExtension" depends="main,smoketestdoc">
90        <copy tofile="${build.base.dir}/TestExtension/TestExtension.rdb" file="${idl.build.dir}/registry.rdb"/>
91        <mkdir dir="${build.base.dir}/TestExtension/META-INF"/>
92        <copy todir="${build.base.dir}/TestExtension/META-INF" file="${project.dir}/manifest.xml"/>
93        <zip destfile="${build.base.dir}/TestExtension.oxt" basedir="${build.base.dir}/TestExtension"/>
94    </target>
95
96    <target name="smoketest" depends="smoketestdoc,TestExtension"/>
97
98</project>
99
100