1 | <?xml version="1.0"?>
|
---|
2 | <!DOCTYPE installer PUBLIC "-//tp23 //DTD Ant Installer Config//EN" "http://antinstaller.sf.net/dtd/antinstall-config-0.8.dtd">
|
---|
3 |
|
---|
4 | <installer
|
---|
5 | ui="swing,text"
|
---|
6 | verbose="true"
|
---|
7 | debug="true"
|
---|
8 | lookAndFeel="org.tp23.jgoodies.plaf.plastic.PlasticXPLookAndFeel"
|
---|
9 | antialiased="true"
|
---|
10 | name="Test Installer"
|
---|
11 | windowIcon="/resources/gkmain_inv.png"
|
---|
12 | defaultImageResource="/resources/antbar.png"
|
---|
13 | minJavaVersion="1.4"
|
---|
14 | finishButtonText="Build">
|
---|
15 | <page
|
---|
16 | type="input"
|
---|
17 | name="intro"
|
---|
18 | displayText="ifProperty and ifTarget tests">
|
---|
19 | <comment
|
---|
20 | displayText="ifProperty and ifTarget tests"
|
---|
21 | title="true"/>
|
---|
22 | </page>
|
---|
23 | <page
|
---|
24 | type="input"
|
---|
25 | name="color-properties"
|
---|
26 | displayText="Test Color">
|
---|
27 | <select
|
---|
28 | property="test.colour"
|
---|
29 | defaultValue="#FF0000"
|
---|
30 | displayText="Select your favorite colour">
|
---|
31 | <option text="Red" value="#FF0000"/>
|
---|
32 | <option text="Green" value="#00FF00"/>
|
---|
33 | <option text="Blue" value="#0000FF"/>
|
---|
34 | </select>
|
---|
35 | <comment
|
---|
36 | displayText="Green results in next page"
|
---|
37 | title="true"/>
|
---|
38 | </page>
|
---|
39 | <page
|
---|
40 | type="input"
|
---|
41 | name="test.colour.1"
|
---|
42 | displayText="GREEN"
|
---|
43 | ifProperty="${test.colour}==#00FF00">
|
---|
44 | <comment displayText="WEHEY! GREEN" title="true"/>
|
---|
45 | </page>
|
---|
46 | <page
|
---|
47 | type="input"
|
---|
48 | name="test.colour.2"
|
---|
49 | displayText="GREEN"
|
---|
50 | ifProperty="${test.colour}!=#00FF00">
|
---|
51 | <comment displayText="OOOOH NOT GREEN" title="true"/>
|
---|
52 | </page>
|
---|
53 | <page
|
---|
54 | type="input"
|
---|
55 | name="test-select-number"
|
---|
56 | displayText="Test Number">
|
---|
57 | <select
|
---|
58 | property="test.number"
|
---|
59 | defaultValue="1"
|
---|
60 | displayText="Select a Number">
|
---|
61 | <option text="One" value="1"/>
|
---|
62 | <option text="Two" value="2"/>
|
---|
63 | <option text="Three" value="3"/>
|
---|
64 | </select>
|
---|
65 | </page>
|
---|
66 | <page
|
---|
67 | type="input"
|
---|
68 | name="selector.1"
|
---|
69 | displayText="Number += 2"
|
---|
70 | ifProperty="${test.number}+=2"
|
---|
71 | target="runifpagerunornot">
|
---|
72 | </page>
|
---|
73 | <page
|
---|
74 | type="input"
|
---|
75 | name="selector.2"
|
---|
76 | displayText="Number -= 2"
|
---|
77 | ifProperty="${test.number}-=2"
|
---|
78 | postDisplayTarget="antinstaller-setcondprop">
|
---|
79 | </page>
|
---|
80 | <page
|
---|
81 | type="input"
|
---|
82 | name="properties.1"
|
---|
83 | displayText="Test Validated Number">
|
---|
84 | <validated
|
---|
85 | property="test.number.validated"
|
---|
86 | displayText="Enter a Double"
|
---|
87 | defaultValue="0.0"
|
---|
88 | regex="[0-9]+\.*[0-9]*"/>
|
---|
89 | </page>
|
---|
90 | <page
|
---|
91 | type="input"
|
---|
92 | name="selector.3"
|
---|
93 | displayText="Number += 23"
|
---|
94 | ifProperty="${test.number.validated}+=23.0">
|
---|
95 | </page>
|
---|
96 | <page
|
---|
97 | type="input"
|
---|
98 | name="selector.4"
|
---|
99 | displayText="Number -= 23"
|
---|
100 | ifProperty="${test.number.validated}-=23.0">
|
---|
101 | </page>
|
---|
102 |
|
---|
103 | <page
|
---|
104 | type="input"
|
---|
105 | name="text.properties"
|
---|
106 | displayText="Test Text">
|
---|
107 | <text
|
---|
108 | property="test.text.startend"
|
---|
109 | displayText="Enter some text"
|
---|
110 | defaultValue="start and end"/>
|
---|
111 | </page>
|
---|
112 | <page
|
---|
113 | type="input"
|
---|
114 | name="selector.5"
|
---|
115 | displayText="Text ^=start (startsWith)"
|
---|
116 | ifProperty="${test.text.startend}^=start">
|
---|
117 | </page>
|
---|
118 | <page
|
---|
119 | type="input"
|
---|
120 | name="selector.6"
|
---|
121 | displayText="Text $=end (endsWith)"
|
---|
122 | ifProperty="${test.text.startend}$=end">
|
---|
123 | </page>
|
---|
124 |
|
---|
125 | <page
|
---|
126 | type="input"
|
---|
127 | name="selector.7"
|
---|
128 | displayText="non.existent.property is null"
|
---|
129 | ifProperty="${non.existent.property}==null">
|
---|
130 | </page>
|
---|
131 | <page
|
---|
132 | type="input"
|
---|
133 | name="selector.8"
|
---|
134 | displayText="test.text.startend is NOT null (or blank)"
|
---|
135 | ifProperty="${test.text.startend}!=null">
|
---|
136 | </page>
|
---|
137 |
|
---|
138 | <page
|
---|
139 | type="input"
|
---|
140 | name="selector.9"
|
---|
141 | displayText="Select components to install">
|
---|
142 | <target
|
---|
143 | displayText="Source code"
|
---|
144 | target="tgsrc"
|
---|
145 | defaultValue="true"
|
---|
146 | force="false"/>
|
---|
147 | <large-select
|
---|
148 | property="lang"
|
---|
149 | defaultValue="uk"
|
---|
150 | displayText="Select your favorite language">
|
---|
151 | <option text="Spanish" value="es"/>
|
---|
152 | <option text="Catalan" value="ca"/>
|
---|
153 | <option text="English" value="uk"/>
|
---|
154 | <option text="French" value="fr"/>
|
---|
155 | <option text="Japanese" value="jp"/>
|
---|
156 | <option text="Persian" value="pe"/>
|
---|
157 | <option text="Urdu" value="ur"/>
|
---|
158 | <option text="Flemish" value="fl"/>
|
---|
159 | <option text="German" value="de"/>
|
---|
160 | <option text="Greek" value="gk"/>
|
---|
161 | <option text="Turkish" value="tk"/>
|
---|
162 | <option text="Slav" value="sv"/>
|
---|
163 | <option text="Euskera" value="ek"/>
|
---|
164 | <option text="Welsh" value="we"/>
|
---|
165 | <option text="Jamaican patoi" value="ra"/>
|
---|
166 | <option text="Mockney" value="??"/>
|
---|
167 | <option text="Giberish" value="¿¿"/>
|
---|
168 | <option text="Love" value="lv"/>
|
---|
169 | <option text="Sign" value=":)"/>
|
---|
170 | <option text="Java" value="jv"/>
|
---|
171 | <option text="C++" value="++"/>
|
---|
172 | <option text="American" value="us"/>
|
---|
173 | </large-select>
|
---|
174 | <target
|
---|
175 | displayText="OS Specific target"
|
---|
176 | osSpecific="true"
|
---|
177 | target="myOsSpecific"
|
---|
178 | defaultValue="true"
|
---|
179 | force="false"/>
|
---|
180 | </page>
|
---|
181 | <page
|
---|
182 | ifProperty="${lang}=lv"
|
---|
183 | type="input"
|
---|
184 | name="Language of Love"
|
---|
185 | displayText="Language of Love">
|
---|
186 | <comment
|
---|
187 | displayText="Aaaarrr, how sweet"
|
---|
188 | bold="true"/>
|
---|
189 | </page>
|
---|
190 | <page
|
---|
191 | ifProperty="${lang}=us"
|
---|
192 | type="input"
|
---|
193 | name="American"
|
---|
194 | displayText="Hey Yankiee">
|
---|
195 | <comment
|
---|
196 | displayText="It totaliser and initialise, with Ss you know, but never mind"
|
---|
197 | bold="true"/>
|
---|
198 | </page>
|
---|
199 | <page
|
---|
200 | ifTarget="tgsrc"
|
---|
201 | type="input"
|
---|
202 | name="properties.2"
|
---|
203 | displayText="Source code selected">
|
---|
204 | <comment
|
---|
205 | displayText="Source Code Selected"
|
---|
206 | bold="true"/>
|
---|
207 | </page>
|
---|
208 | <page
|
---|
209 | type="input"
|
---|
210 | name="contrib"
|
---|
211 | displayText="Contributions">
|
---|
212 | <comment
|
---|
213 | displayText="target-select (Tested Via Properies)"
|
---|
214 | bold="true"/>
|
---|
215 | <target-select
|
---|
216 | property="colourtarget"
|
---|
217 | defaultValue="#FF0000"
|
---|
218 | displayText="Select a target"
|
---|
219 | explanatoryText="only one target available">
|
---|
220 | <option text="target-red" value="#FF0000"/>
|
---|
221 | <option text="target-green" value="#00FF00"/>
|
---|
222 | <option text="target-blue" value="#0000FF"/>
|
---|
223 | </target-select>
|
---|
224 | </page>
|
---|
225 | <page
|
---|
226 | type="input"
|
---|
227 | name="propcond.1"
|
---|
228 | displayText="Blue Conditional"
|
---|
229 | ifProperty="${colourtarget}=#0000FF">
|
---|
230 | <comment
|
---|
231 | displayText="original syntax no longer valid"
|
---|
232 | explanatoryText="use syntax including $ to denominate variables"
|
---|
233 | bold="false"/>
|
---|
234 | <comment
|
---|
235 | displayText="colourtarget is Blue"
|
---|
236 | bold="false"/>
|
---|
237 | </page>
|
---|
238 | <page
|
---|
239 | type="input"
|
---|
240 | name="propcond.2"
|
---|
241 | displayText="Red Conditional"
|
---|
242 | ifProperty="${colourtarget}=#FF0000">
|
---|
243 | <comment
|
---|
244 | displayText="preferred syntax"
|
---|
245 | bold="false"/>
|
---|
246 | <comment
|
---|
247 | displayText="This page only shows if colourtarget is RED"
|
---|
248 | bold="false"/>
|
---|
249 | </page>
|
---|
250 | <page
|
---|
251 | type="input"
|
---|
252 | name="envcond"
|
---|
253 | displayText="Environment Conditional"
|
---|
254 | ifProperty="${env.DISPLAY}=:0.0">
|
---|
255 | <comment
|
---|
256 | displayText="This page only shows if DISPLAY=:0.0"
|
---|
257 | bold="false"/>
|
---|
258 | </page>
|
---|
259 | <page
|
---|
260 | type="input"
|
---|
261 | name="multiplecond"
|
---|
262 | displayText="Multiple Conditions"
|
---|
263 | ifProperty="(${env.DISPLAY}=:0.0) AND (${colourtarget}=#FF0000)">
|
---|
264 | <comment
|
---|
265 | displayText="This page only shows if DISPLAY=:0.0 and colourtarget is RED"
|
---|
266 | bold="false"/>
|
---|
267 | </page>
|
---|
268 | <page
|
---|
269 | type="progress"
|
---|
270 | name="progress"
|
---|
271 | displayText="Installation progress"
|
---|
272 | showTargets="true"
|
---|
273 | target="cleanuptarget">
|
---|
274 | </page>
|
---|
275 | </installer>
|
---|
276 |
|
---|
277 |
|
---|