1 | <?xml version="1.0"?>
|
---|
2 | <!--
|
---|
3 | This is a normal Ant build file to build the release for sourceforge
|
---|
4 | -->
|
---|
5 | <project name="Installation Build" default="build" basedir="..">
|
---|
6 |
|
---|
7 | <!-- Project properties -->
|
---|
8 | <property name="prepareDir" value="artifacts/prepare"/>
|
---|
9 | <property name="antlib" value="antlib"/>
|
---|
10 |
|
---|
11 |
|
---|
12 | <!-- Classpaths - start -->
|
---|
13 | <!-- Classpaths for compilation - start -->
|
---|
14 |
|
---|
15 | <path id="project.cp">
|
---|
16 | <fileset dir="${antlib}" includes="ant.jar,ant-launcher.jar"/>
|
---|
17 | </path>
|
---|
18 | <path id="project.ext.cp">
|
---|
19 | <fileset dir="lib">
|
---|
20 | <include name="ant-installer.jar"/>
|
---|
21 | </fileset>
|
---|
22 | <fileset dir="${antlib}" includes="ant.jar,ant-launcher.jar"/>
|
---|
23 | </path>
|
---|
24 | <!-- Classpaths for compilation - end -->
|
---|
25 |
|
---|
26 | <path id="taskdef.cp">
|
---|
27 | <fileset dir="./lib">
|
---|
28 | <include name="ant-installer-ext.jar"/>
|
---|
29 | <include name="ant-installer.jar"/>
|
---|
30 | </fileset>
|
---|
31 | </path>
|
---|
32 | <!-- Classpaths - end -->
|
---|
33 |
|
---|
34 |
|
---|
35 | <!-- Task definitions - start -->
|
---|
36 | <!-- AntInstaller installer task definition.
|
---|
37 | Defined within target as it depends upon files that aren't
|
---|
38 | available at the start of a clean build -->
|
---|
39 | <target name="_set-installer-taskdef" unless="installer.taskdef.defined">
|
---|
40 | <taskdef
|
---|
41 | name="installer"
|
---|
42 | classname="org.tp23.antinstaller.taskdefs.Installer"
|
---|
43 | classpathref="taskdef.cp"/>
|
---|
44 | <property name="installer.taskdef.defined" value="true"/>
|
---|
45 | </target>
|
---|
46 | <!-- Task definitions - end -->
|
---|
47 |
|
---|
48 |
|
---|
49 | <!-- =============================== -->
|
---|
50 | <!-- ==== Public Runnable Targets == -->
|
---|
51 | <!-- =============================== -->
|
---|
52 |
|
---|
53 | <target name="clean-build" depends="clean, _build-ai-jars, clean-demo, _build-demo">
|
---|
54 | <!-- this build is pretty much everything other than the installers -->
|
---|
55 | </target>
|
---|
56 |
|
---|
57 | <target name="build" depends="_build-ai-jars, _build-demo">
|
---|
58 | <!-- this build should be enough to run the unittests without having to build a release package -->
|
---|
59 | </target>
|
---|
60 |
|
---|
61 | <target name="clean" description="Clean out compiled and generated files">
|
---|
62 | <echo message="*** *** Cleaning artifacts *** *** "/>
|
---|
63 | <echo message="*** ***"/>
|
---|
64 | <delete dir="${prepareDir}"/>
|
---|
65 | <delete file="./lib/ant-installer.jar"/>
|
---|
66 | <delete file="./lib/ant-installer-ext.jar"/>
|
---|
67 | </target>
|
---|
68 |
|
---|
69 | <target name="clean-demo" description="Clean out demo files">
|
---|
70 | <ant dir="demo" antfile="build-demo.xml" target="clean">
|
---|
71 | <property name="${installDir}" value="demo"/>
|
---|
72 | </ant>
|
---|
73 | </target>
|
---|
74 |
|
---|
75 |
|
---|
76 | <!-- =============================== -->
|
---|
77 | <!-- ======= Internal Targets ====== -->
|
---|
78 | <!-- =============================== -->
|
---|
79 |
|
---|
80 | <!--
|
---|
81 | tests that the following has been run locally
|
---|
82 | This does not need to be run repeatedly but unittests depend on it
|
---|
83 | # ant -buildfile demo/build-demo.xml
|
---|
84 | -->
|
---|
85 | <target name="_check-demo">
|
---|
86 | <condition property="installpack.missing">
|
---|
87 | <not>
|
---|
88 | <available file="demo/artifacts/installpack.zip" type="file"/>
|
---|
89 | </not>
|
---|
90 | </condition>
|
---|
91 | </target>
|
---|
92 |
|
---|
93 | <target name="_build-demo" if="installpack.missing" depends="_check-demo">
|
---|
94 | <echo message="requires demo build: ${installpack.missing}"/>
|
---|
95 | <ant dir="demo" antfile="build-demo.xml" target="selfextract">
|
---|
96 | <property name="${installDir}" value="demo"/>
|
---|
97 | </ant>
|
---|
98 | </target>
|
---|
99 |
|
---|
100 |
|
---|
101 | <target name="_build-ai-jars" depends="_ant-installer.jar, _ant-installer-ext.jar">
|
---|
102 | <!-- AntInstaller JARs are built in ./lib-->
|
---|
103 | <!-- (checked-in) JARs should not be used -->
|
---|
104 | </target>
|
---|
105 |
|
---|
106 | <target name="_ant-installer.jar">
|
---|
107 | <echo message="*** *** Building ant-installer.jar *** *** "/>
|
---|
108 | <echo message="*** ***"/>
|
---|
109 | <echo message="Initing the build directory - ${prepareDir}"/>
|
---|
110 | <mkdir dir="${prepareDir}/classes"/>
|
---|
111 |
|
---|
112 | <echo message="*** Building ant-installer.jar ***"/>
|
---|
113 | <mkdir dir="./lib"/>
|
---|
114 | <javac destdir="${prepareDir}/classes" srcdir="src" classpathref="project.cp" debug="true"/>
|
---|
115 | <jar file="./lib/ant-installer.jar" whenempty="fail">
|
---|
116 | <fileset dir="./src/resources">
|
---|
117 | <include name="LICENSE-ant-install.txt"/>
|
---|
118 | </fileset>
|
---|
119 | <fileset dir="${prepareDir}/classes"/>
|
---|
120 | <fileset dir="./src">
|
---|
121 | <include name="**/*.dtd"/>
|
---|
122 | <include name="**/*.properties"/>
|
---|
123 | <include name="**/*.fconfig"/>
|
---|
124 | <include name="resources/extract-image.png"/>
|
---|
125 | <include name="resources/gkmain_inv.png"/>
|
---|
126 | <include name="resources/antbar.png"/>
|
---|
127 | </fileset>
|
---|
128 | <manifest>
|
---|
129 | <attribute name="AntInstaller-Version" value="${ant.install.version}"/>
|
---|
130 | </manifest>
|
---|
131 | </jar>
|
---|
132 | </target>
|
---|
133 |
|
---|
134 | <target name="_ant-installer-ext.jar">
|
---|
135 | <echo message="*** *** Building ant-installer-ext.jar *** *** "/>
|
---|
136 | <echo message="*** ***"/>
|
---|
137 | <mkdir dir="${prepareDir}/classes_ext"/>
|
---|
138 | <javac destdir="${prepareDir}/classes_ext" srcdir="src_ext" classpathref="project.ext.cp" debug="true"/>
|
---|
139 | <jar file="./lib/ant-installer-ext.jar" whenempty="fail">
|
---|
140 | <fileset dir="./src/resources">
|
---|
141 | <include name="LICENSE-ant-install.txt"/>
|
---|
142 | </fileset>
|
---|
143 | <fileset dir="${prepareDir}/classes_ext"/>
|
---|
144 | <manifest>
|
---|
145 | <attribute name="AntInstaller-Version" value="${ant.install.version}"/>
|
---|
146 | </manifest>
|
---|
147 | </jar>
|
---|
148 | </target>
|
---|
149 |
|
---|
150 | <target name="setEn"></target>
|
---|
151 | <target name="setFr"></target>
|
---|
152 | <target name="setEs"></target>
|
---|
153 | <target name="setRu"></target>
|
---|
154 |
|
---|
155 |
|
---|
156 | </project>
|
---|