1 | <?xml version="1.0"?>
|
---|
2 | <!--
|
---|
3 |
|
---|
4 | This is the build.xml run by AntInstaller for the demo app
|
---|
5 |
|
---|
6 | It is a normal Ant build script, but remember that it is run in a similar
|
---|
7 | way to running
|
---|
8 | > ant -buildfile build.xml default,tgdoc,tgsrc
|
---|
9 |
|
---|
10 | this is targets selected in the selector page have dependencies those
|
---|
11 | dependencies may be run once for each target selected
|
---|
12 | e.g. if tgdoc had depends="default" and the installer passed
|
---|
13 | default,tgdoc ant would run default then default again then tgdoc
|
---|
14 |
|
---|
15 | To avoid this problem targets can be forced in the gui using the following
|
---|
16 | input in the page to choose components to install
|
---|
17 | <input
|
---|
18 | type="target"
|
---|
19 | displayText="Core components"
|
---|
20 | target="default"
|
---|
21 | defaultValue="true"
|
---|
22 | force="true"/>
|
---|
23 |
|
---|
24 | -->
|
---|
25 |
|
---|
26 | <project name="Installation Build" default="default" basedir="${basedir}">
|
---|
27 |
|
---|
28 | <property file="${basedir}/ant.install.properties"/>
|
---|
29 |
|
---|
30 |
|
---|
31 | <target name="default" depends="">
|
---|
32 |
|
---|
33 | <echo message="IF ANY OF THE FOLLOWING ARE MISSING THERE IS A PROBLEM"/>
|
---|
34 |
|
---|
35 | <echo message="(or you entered blank in an unvalidated field)"/>
|
---|
36 | <echo message="Installation Directory [${installDir}]"/>
|
---|
37 | <echo message="Entered Property [${myProperty}]"/>
|
---|
38 | <echo message="Checkbox Property [${truefalseprop}]"/>
|
---|
39 | <echo message="Colour selected [${colour}]"/>
|
---|
40 | <echo message="File [${selectedfile}]"/>
|
---|
41 |
|
---|
42 | <echo message="Installer JAR:${antinstaller.jar}"/>
|
---|
43 | <mkdir dir="${installDir}"/>
|
---|
44 | <mkdir dir="${installDir}/classes"/>
|
---|
45 | <mkdir dir="${installDir}/config"/>
|
---|
46 | <mkdir dir="${installDir}/lib"/>
|
---|
47 | <unjar src="${antinstaller.jar}" dest="${basedir}">
|
---|
48 | <patternset>
|
---|
49 | <include name="installpack.zip"/>
|
---|
50 | </patternset>
|
---|
51 | </unjar>
|
---|
52 | <unzip src="${basedir}/installpack.zip" dest="${installDir}">
|
---|
53 | <patternset>
|
---|
54 | <include name="**/*"/>
|
---|
55 | <exclude name="doc/*"/>
|
---|
56 | <exclude name="src/*"/>
|
---|
57 | </patternset>
|
---|
58 | </unzip>
|
---|
59 | <copy file="${installDir}/bin/run.sh" tofile="${installDir}/run.sh"/>
|
---|
60 | <copy file="${installDir}/bin/run.cmd" tofile="${installDir}/run.cmd"/>
|
---|
61 | <chmod file="${installDir}/run.sh" perm="774">
|
---|
62 | </chmod>
|
---|
63 | <replace file="${installDir}/config/example-config.xml">
|
---|
64 | <replacefilter token="@TextProperty@" value="${myProperty}"/>
|
---|
65 | <replacefilter token="@SelectedFile@" value="${selectedfile}"/>
|
---|
66 | <replacefilter token="@Colour@" value="${colour}"/>
|
---|
67 | <replacefilter token="@BooleanProperty@" value="${truefalseprop}"/>
|
---|
68 | </replace>
|
---|
69 | </target>
|
---|
70 |
|
---|
71 | <target name="tgdoc" depends="">
|
---|
72 | <echo message="Installing documentation files"/>
|
---|
73 | <mkdir dir="${installDir}/doc"/>
|
---|
74 | <unzip src="${basedir}/installpack.zip" dest="${installDir}/doc">
|
---|
75 | <patternset>
|
---|
76 | <include name="doc/*"/>
|
---|
77 | </patternset>
|
---|
78 | </unzip>
|
---|
79 | </target>
|
---|
80 |
|
---|
81 | <target name="tgsrc" depends="">
|
---|
82 | <echo message="Installing Source files"/>
|
---|
83 | <mkdir dir="${installDir}/src"/>
|
---|
84 | <unzip src="${basedir}/installpack.zip" dest="${installDir}/src">
|
---|
85 | <patternset>
|
---|
86 | <include name="src/*"/>
|
---|
87 | </patternset>
|
---|
88 | </unzip>
|
---|
89 | </target>
|
---|
90 |
|
---|
91 | </project>
|
---|