1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
---|
2 | <html>
|
---|
3 | <head>
|
---|
4 | <title>Ant Installer</title>
|
---|
5 | <link href="style.css" type="text/css" rel="stylesheet">
|
---|
6 | <link href="css/nav.css" rel="stylesheet" type="text/css">
|
---|
7 | <link rel="SHORTCUT ICON" type="image/png" href="images/antinstaller-icon.png">
|
---|
8 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
---|
9 | <meta name="keywords"
|
---|
10 | content="Ant, installer, AntInstall, gui, console, input, parameters, properties, swing, user interface, validation, configuration">
|
---|
11 | <script type="text/javascript" src="js/menu.js"></script>
|
---|
12 | <script type="text/javascript" src="js/sstree.js"></script>
|
---|
13 | <script type="text/javascript" src="js/winfix.js"></script>
|
---|
14 | </head>
|
---|
15 | <body onload="collapseAll('contents-panel', ['ol']); "><div id="tpallcontent">
|
---|
16 | <table cellspacing="0" width="100%">
|
---|
17 | <tbody>
|
---|
18 | <tr class="tpheader">
|
---|
19 | <th class="tpleft">
|
---|
20 | <a target="_top" href="index.html" title="home"><img src="images/ant-install-small.png" alt="AntInstaller" id="logo" width="76" height="50"/></a>
|
---|
21 | <script type="text/javascript">winFix();</script>
|
---|
22 | </th>
|
---|
23 | <th class="tptop" valign="bottom">
|
---|
24 | <img src="space.gif" height="1" width="440" alt="spacer"/><br/>
|
---|
25 |
|
---|
26 | <table>
|
---|
27 | <tr>
|
---|
28 | <td valign="top">
|
---|
29 | <div class="tpheadertitle">AntInstaller</div>
|
---|
30 | <!--img src="images/ant-install-title.png" alt="AntInstaller"/-->
|
---|
31 | </td>
|
---|
32 | <td width="100%" align="right" valign="bottom" nowrap="NOWRAP">
|
---|
33 | <div class="tpraised">
|
---|
34 | <a class="tpbutton" target="_top" href="index.html">home</a>
|
---|
35 | <a class="tpbutton" target="_top" href="http://sourceforge.net/project/showfiles.php?group_id=123466&package_id=134917">download</a>
|
---|
36 | <a class="tpbutton" target="_top" href="http://sf.net">sourceforge</a>
|
---|
37 | <a class="tpbutton" target="_top" href="manual-ant.html">antmanual</a>
|
---|
38 | <a class="tpbutton" target="_top" href="http://sourceforge.net/tracker/?group_id=123466&atid=696615">RFEs</a>
|
---|
39 | <a class="tpbutton" target="_top" href="http://sourceforge.net/tracker/?group_id=123466&atid=696612">Bugs</a></div>
|
---|
40 | </td>
|
---|
41 | </tr>
|
---|
42 | </table>
|
---|
43 | </th>
|
---|
44 | </tr>
|
---|
45 | <tr class="tpbody">
|
---|
46 | <td class="tpleft" valign="bottom">
|
---|
47 | <br/>
|
---|
48 | <div id="logoset">
|
---|
49 | <a target="_top" href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=123466&type=2" alt="SourceForge.net Logo" border="0" height="37" width="125"></a>
|
---|
50 | <br/><br/>
|
---|
51 | <a target="_top" href="http://sourceforge.net/donate/index.php?group_id=123466">
|
---|
52 | <img src="http://sourceforge.net/images/project-support.jpg" alt="donate to AntInstaller"/>
|
---|
53 | </a>
|
---|
54 | </div>
|
---|
55 | </td>
|
---|
56 | <td class="tpright" valign="top">
|
---|
57 | <div class="tpcontent">
|
---|
58 | <!--[segment-content] page content start -->
|
---|
59 | <h2>Installer Ant Task</h2>
|
---|
60 |
|
---|
61 | As of version beta0.7.4 there is an Ant task provided to help create the installer Jars.
|
---|
62 | The task def is provided in the <code>lib/ant-installer-ext.jar</code> file.<br/>
|
---|
63 | The Task is similar to the core Ant Jar and War tasks.
|
---|
64 | To define the task use the following at the top of a <code>build.xml</code> used to create the installer.
|
---|
65 | <pre>
|
---|
66 |
|
---|
67 | <path id="taskdef.cp">
|
---|
68 | <fileset dir="${AntInstaller.home}">
|
---|
69 | <include name="ant-installer-ext.jar"/>
|
---|
70 | <include name="ant-installer.jar"/>
|
---|
71 | </fileset>
|
---|
72 | </path>
|
---|
73 |
|
---|
74 | <taskdef
|
---|
75 | name="installer"
|
---|
76 | classname="org.tp23.antinstaller.taskdefs.Installer"
|
---|
77 | classpathref="taskdef.cp"/>
|
---|
78 | </pre>
|
---|
79 |
|
---|
80 | From there on in the <code>build.xml</code> file the installer task can be referenced with the <code>installer</code> element.
|
---|
81 | This example should be self explanatory, but full details are provided below for each attribute.
|
---|
82 | <pre>
|
---|
83 | <installer
|
---|
84 | <a href="#file" title="file">file</a>="./MyProject-installer.jar"
|
---|
85 | <a href="#compress" title="compress">compress</a>="true"
|
---|
86 | <a href="#extractType" title="extractType">extractType</a>="SelfExtractor"
|
---|
87 | <a href="#installConfig" title="installConfig">installConfig</a>="myprojects-antinstall-config.xml"
|
---|
88 | <a href="#buildFile" title="buildFile">buildFile</a>="myprojects-build.xml"
|
---|
89 | <a href="#antInstallLib" title="antInstallLib">antInstallLib</a>="${AntInstaller.home}/lib"
|
---|
90 | <a href="#antLib" title="antLib">antLib</a>="${AntInstaller.home}/antlib"
|
---|
91 | <a href="#validateConfig" title="validateConfig">validateConfig</a>="true"
|
---|
92 | <a href="#failOnError" title="failOnError">failOnError</a>="true"
|
---|
93 | <a href="#icons" title="icons">icons</a>="<a href="icons.html" title="icons">bluecurve</a>">
|
---|
94 | <!--
|
---|
95 | include the images for your installer
|
---|
96 | and license texts
|
---|
97 | -->
|
---|
98 | <fileset dir="extra-install-classpath" includes="resources/*"/>
|
---|
99 |
|
---|
100 | <!--
|
---|
101 | add you application binaries and resources
|
---|
102 | to the installer here, for example
|
---|
103 | -->
|
---|
104 | <fileset dir="myproject" includes="myproject.jar"/>
|
---|
105 | <fileset dir="myproject" includes="myproject.properties"/>
|
---|
106 | <fileset dir="myproject" includes="mydefaultdata/*"/>
|
---|
107 |
|
---|
108 | </installer>
|
---|
109 | </pre>
|
---|
110 |
|
---|
111 |
|
---|
112 |
|
---|
113 | <h2><a name="war">Installer</a></h2>
|
---|
114 | <h3>Description</h3>
|
---|
115 | <p>An extension of the <a href="jar.html">Jar</a> task for creating
|
---|
116 | installers.</p>
|
---|
117 | <p>This task will correctly package the AntInstaller classes, the Ant classes,
|
---|
118 | the antinstall-config.xml, the build.xml file, the default LookAndFeel classes, the button icons
|
---|
119 | and create the required MANIFEST.mf to execute the Jar.</p>
|
---|
120 | <p>Nested filesets should
|
---|
121 | be used to specify other resources required by the install (e.g. License.txt)
|
---|
122 | and the files required to run the application being installed. </p>
|
---|
123 |
|
---|
124 | <p>The extended zipfileset element from the zip task (with attributes <i>prefix</i>, <i>fullpath</i>, and <i>src</i>) is available in the Installer task.</p>
|
---|
125 |
|
---|
126 | <h3>Parameters</h3>
|
---|
127 | <table class="manual" cellspacing="0">
|
---|
128 | <tbody>
|
---|
129 | <tr class="tpheader">
|
---|
130 | <th class="manual2">Attribute</th>
|
---|
131 |
|
---|
132 | <th class="manual2">Description</th>
|
---|
133 | <th class="manual2">Required</th>
|
---|
134 | </tr>
|
---|
135 | <tr>
|
---|
136 | <td valign="top"><a name="file"></a>file</td>
|
---|
137 | <td valign="top">the JAR file to create.</td>
|
---|
138 | <td align="center" valign="top">Yes</td>
|
---|
139 | </tr>
|
---|
140 | <tr>
|
---|
141 | <td valign="top"><a name="buildFile"></a>buildFile</td>
|
---|
142 | <td valign="top">The build.xml file to use when AntInstaller is run.</td>
|
---|
143 | <td valign="top" align="center">Yes, unless update is set to true</td>
|
---|
144 | </tr>
|
---|
145 | <tr>
|
---|
146 | <td valign="top"><a name="installConfig"></a>installConfig</td>
|
---|
147 | <td valign="top">The antinstall-config.xml file to use when AntInstaller is run.</td>
|
---|
148 | <td valign="top" align="center">Yes, unless update is set to true</td>
|
---|
149 | </tr>
|
---|
150 | <tr>
|
---|
151 | <td valign="top"><a name="extractType"></a>extractType</td>
|
---|
152 | <td valign="top">Either NonExtractor or SelfExtractor.</td>
|
---|
153 | <td valign="top" align="center">Yes</td>
|
---|
154 | </tr>
|
---|
155 | <tr>
|
---|
156 | <td valign="top"><a name="antInstallLib"></a>antInstallLib</td>
|
---|
157 | <td valign="top">The location of the AntInstaller jars.</td>
|
---|
158 | <td valign="top" align="center">Yes</td>
|
---|
159 | </tr>
|
---|
160 | <tr>
|
---|
161 | <td valign="top"><a name="antLib"></a>antLib</td>
|
---|
162 | <td valign="top">The location of the Ant jars. N.B. Ant 1.6.2 or above is required.</td>
|
---|
163 | <td valign="top" align="center">Yes</td>
|
---|
164 | </tr>
|
---|
165 | <tr>
|
---|
166 | <td valign="top"><a name="icons"></a>icons</td>
|
---|
167 | <td valign="top">The <a href="icons.html">icon set to be used</a>. One of bluecurve, crystalsvg, amaranth, krystaline or eclipse, new icons can be created and should be packed into a Jar with the name ai-icons-[name].jar with the png files in the resources/icons directory inside the jar.</td>
|
---|
168 | <td valign="top" align="center">No</td>
|
---|
169 | </tr>
|
---|
170 | <tr>
|
---|
171 | <td valign="top"><a name="validateConfig"></a>validateConfig</td>
|
---|
172 | <td valign="top">when true the AntInstaller config file is validated and errors and
|
---|
173 | warnings are printed to System.out, defaults to false</td>
|
---|
174 | <td valign="top" align="center">No</td>
|
---|
175 | </tr>
|
---|
176 | <tr>
|
---|
177 | <td valign="top"><a name="failOnError"></a>failOnError</td>
|
---|
178 | <td valign="top">if a known error is found during validation the build will stop.</td>
|
---|
179 | <td valign="top" align="center">No</td>
|
---|
180 | </tr>
|
---|
181 | <tr>
|
---|
182 | <td valign="top"><a name="basedir"></a>basedir</td>
|
---|
183 | <td valign="top">the directory from which to jar the files.</td>
|
---|
184 | <td valign="top" align="center">No</td>
|
---|
185 | </tr>
|
---|
186 | <tr>
|
---|
187 | <td valign="top"><a name="compress"></a>compress</td>
|
---|
188 | <td valign="top">Not only store data but also compress them,
|
---|
189 | defaults to true. Unless you set the <em>keepcompression</em>
|
---|
190 | attribute to false, this will apply to the entire archive, not
|
---|
191 | only the files you've added while updating.</td>
|
---|
192 | <td align="center" valign="top">No</td>
|
---|
193 | </tr>
|
---|
194 | <tr>
|
---|
195 | <td valign="top"><a name="keepcompression"></a>keepcompression</td>
|
---|
196 | <td valign="top">For entries coming from existing archives (like
|
---|
197 | nested <em>zipfileset</em>s or while updating the archive), keep
|
---|
198 | the compression as it has been originally instead of using the
|
---|
199 | <em>compress</em> attribute. Defaults false.</td>
|
---|
200 | <td align="center" valign="top">No</td>
|
---|
201 | </tr>
|
---|
202 | <tr>
|
---|
203 | <td valign="top"><a name="encoding"></a>encoding</td>
|
---|
204 | <td valign="top">The character encoding to use for filenames
|
---|
205 | inside the archive. Defaults to UTF8. <strong>It is not
|
---|
206 | recommended to change this value as the created archive will most
|
---|
207 | likely be unreadable for Java otherwise.</strong></td>
|
---|
208 | <td align="center" valign="top">No</td>
|
---|
209 | </tr>
|
---|
210 | <tr>
|
---|
211 | <td valign="top"><a name="filesonly"></a>filesonly</td>
|
---|
212 | <td valign="top">Store only file entries, defaults to false</td>
|
---|
213 | <td align="center" valign="top">No</td>
|
---|
214 | </tr>
|
---|
215 | <tr>
|
---|
216 |
|
---|
217 | <td valign="top"><a name="includes"></a>includes</td>
|
---|
218 | <td valign="top">comma- or space-separated list of patterns of files that must be
|
---|
219 | included. All files are included when omitted.</td>
|
---|
220 | <td valign="top" align="center">No</td>
|
---|
221 | </tr>
|
---|
222 | <tr>
|
---|
223 | <td valign="top"><a name="includesfile"></a>includesfile</td>
|
---|
224 | <td valign="top">the name of a file. Each line of this file is
|
---|
225 | taken to be an include pattern</td>
|
---|
226 | <td valign="top" align="center">No</td>
|
---|
227 | </tr>
|
---|
228 | <tr>
|
---|
229 | <td valign="top"><a name="excludes"></a>excludes</td>
|
---|
230 | <td valign="top">comma- or space-separated list of patterns of files that must be
|
---|
231 | excluded. No files (except default excludes) are excluded when omitted.</td>
|
---|
232 | <td valign="top" align="center">No</td>
|
---|
233 | </tr>
|
---|
234 | <tr>
|
---|
235 | <td valign="top"><a name="excludesfile"></a>excludesfile</td>
|
---|
236 | <td valign="top">the name of a file. Each line of this file is
|
---|
237 | taken to be an exclude pattern</td>
|
---|
238 | <td valign="top" align="center">No</td>
|
---|
239 | </tr>
|
---|
240 | <tr>
|
---|
241 | <td valign="top"><a name="defaultexcludes"></a>defaultexcludes</td>
|
---|
242 | <td valign="top">indicates whether default excludes should be used or not
|
---|
243 | ("yes"/"no"). Default excludes are used when omitted.</td>
|
---|
244 | <td valign="top" align="center">No</td>
|
---|
245 | </tr>
|
---|
246 | <tr>
|
---|
247 | <td valign="top"><a name="manifest"></a>manifest</td>
|
---|
248 | <td valign="top">The manifest file to use if you wish to manually set the MANIFEST.MF (not recommended).</td>
|
---|
249 | <td valign="top" align="center">No</td>
|
---|
250 | </tr>
|
---|
251 | <tr>
|
---|
252 | <td valign="top"><a name="update"></a>update</td>
|
---|
253 | <td valign="top">indicates whether to update or overwrite
|
---|
254 | the destination file if it already exists. Default is "false".</td>
|
---|
255 | <td valign="top" align="center">No</td>
|
---|
256 | </tr>
|
---|
257 | <tr>
|
---|
258 | <td valign="top"><a name="duplicate"></a>duplicate</td>
|
---|
259 | <td valign="top">behavior when a duplicate file is found. Valid values are "add", "preserve", and "fail". The default value is "add". </td>
|
---|
260 | <td valign="top" align="center">No</td>
|
---|
261 | </tr>
|
---|
262 | </tbody>
|
---|
263 | </table>
|
---|
264 | <hr>
|
---|
265 | <p align="center">Copyright © 2000-2004 The Apache Software Foundation. All rights
|
---|
266 | Reserved.
|
---|
267 | <br/>
|
---|
268 | (lifted and altered from the WAR document)</p>
|
---|
269 |
|
---|
270 | <!-- content end [segment-end]-->
|
---|
271 | </div>
|
---|
272 | </td>
|
---|
273 | </tr>
|
---|
274 | </tbody>
|
---|
275 | </table>
|
---|
276 | <div id="contents-panel">
|
---|
277 | <!--[segment-file://contents-include.html] menu start -->
|
---|
278 | <div id="contents-menu">
|
---|
279 | <ol class="sidebar" id="root">
|
---|
280 | <li class="panel"><a href="#default" class="folder" onclick="toggle(this)"></a><b>Site map</b>
|
---|
281 | <ol>
|
---|
282 | <li class="sidebar"><a href="introduction.html">Introduction</a></li>
|
---|
283 | <li class="panel"><a href="#default" class="folder" onclick="toggle(this)"></a><b>Developer References</b>
|
---|
284 | <ol>
|
---|
285 | <li class="sidebar"><a href="quickstart.html">Quick Start</a></li>
|
---|
286 | <li class="panel"><a href="#default" class="folder" onclick="toggle(this)"></a><a href="manual.html">Manual</a>
|
---|
287 | <ol class="init-hidden">
|
---|
288 | <li class="sidebar"><a href="manual.html#config">antinstall-config.xml</a></li>
|
---|
289 | <li class="panel"><a href="#default" class="folder" onclick="toggle(this)"></a><a href="manual.html#page">Pages</a>
|
---|
290 | <ol class="init-hidden">
|
---|
291 | <li class="sidebar"><a href="manual.html#pagesplash">Splash Page</a></li>
|
---|
292 | <li class="sidebar"><a href="manual.html#pagetext">Text Page</a></li>
|
---|
293 | <li class="sidebar"><a href="manual.html#pagelicense">License Page</a></li>
|
---|
294 | <li class="sidebar"><a href="manual.html#pageinput">Input Page</a></li>
|
---|
295 | <li class="sidebar"><a href="manual.html#pageprogress">Progress Page</a></li>
|
---|
296 | </ol>
|
---|
297 | </li>
|
---|
298 | <li class="panel"><a href="#default" class="folder" onclick="toggle(this)"></a><a href="manual.html#inputtypes">Input types</a>
|
---|
299 | <ol class="init-hidden">
|
---|
300 | <li class="sidebar"><a href="manual.html#app-root">Application Root</a></li>
|
---|
301 | <li class="sidebar"><a href="manual.html#checkbox">Checkbox</a></li>
|
---|
302 | <li class="sidebar"><a href="manual.html#comment">Comment</a></li>
|
---|
303 | <li class="sidebar"><a href="manual.html#date">Date</a></li>
|
---|
304 | <li class="sidebar"><a href="manual.html#directory">Directory</a></li>
|
---|
305 | <li class="sidebar"><a href="manual.html#file">File</a></li>
|
---|
306 | <li class="sidebar"><a href="manual.html#large-select">Large Select</a></li>
|
---|
307 | <li class="sidebar"><a href="manual.html#password">Password Text</a></li>
|
---|
308 | <li class="sidebar"><a href="manual.html#password-confirm">Confirm Password</a></li>
|
---|
309 | <li class="sidebar"><a href="manual.html#select">Select</a></li>
|
---|
310 | <li class="sidebar"><a href="manual.html#target">Target</a></li>
|
---|
311 | <li class="sidebar"><a href="manual.html#target-select">Target Select</a></li>
|
---|
312 | <li class="sidebar"><a href="manual.html#text">Unvalidated Text</a></li>
|
---|
313 | <li class="sidebar"><a href="manual.html#validated">Validated Text</a></li>
|
---|
314 | <li class="sidebar"><a href="manual.html#extvalidated">Externally Validated Text</a></li>
|
---|
315 | </ol>
|
---|
316 | </li>
|
---|
317 | <li class="sidebar"><a href="manual.html#extractor">Self Extractor</a></li>
|
---|
318 | <li class="sidebar"><a href="manual.html#non-extractor">Non Extractor</a></li>
|
---|
319 | <li class="sidebar"><a href="manual.html#scripts">Start Scripts</a></li>
|
---|
320 | <li class="sidebar"><a href="manual.html#refs">Dynamic References</a></li>
|
---|
321 | <li class="sidebar"><a href="manual.html#pagedisplay">Page Displaying</a></li>
|
---|
322 | </ol>
|
---|
323 | </li>
|
---|
324 | <li class="sidebar"><a href="installertask.html">Installer Ant task</a></li>
|
---|
325 | <li class="sidebar"><a href="validationofconfig.html">Validation of config</a></li>
|
---|
326 | <li class="sidebar"><a href="lookandfeels.html">LookAndFeels</a> <br/>(inc screenshots)</li>
|
---|
327 | <li class="sidebar"><a href="classpathresources.html">Resources/Classpath issues</a></li>
|
---|
328 | <li class="sidebar"><a href="i18n.html">Internationalisation</a></li>
|
---|
329 | <li class="sidebar"><a href="auto.html">Automated installs</a></li>
|
---|
330 | <li class="sidebar"><a href="installtypes.html">Multiple install types</a></li>
|
---|
331 | <li class="sidebar"><a href="posttargets.html">Post display targets</a></li>
|
---|
332 | <li class="sidebar"><a href="icons.html">Button Icons</a></li>
|
---|
333 | <li class="sidebar"><a href="antinstall-config-example.html">Example antinstall-config.xml</a></li>
|
---|
334 | </ol>
|
---|
335 | </li>
|
---|
336 | <li class="sidebar"><a href="manual-ant.html">Ant Manual</a></li>
|
---|
337 | <li class="sidebar"><a href="antlinks.html">Ant links</a></li>
|
---|
338 | <li class="sidebar"><a href="userusage.html">User usage</a></li>
|
---|
339 | <li class="sidebar"><a href="licenses.html">Licenses</a></li>
|
---|
340 | <li class="sidebar"><a href="potentialuses.html">Potential uses</a></li>
|
---|
341 | <li class="sidebar"><a href="roadmap.html">Road Map</a></li>
|
---|
342 | <li class="sidebar"><a href="wanted.html">Wanted</a></li>
|
---|
343 | <li class="sidebar"><a href="dtds.html">DTDs</a></li>
|
---|
344 | <li class="sidebar"><a href="changelog.html">Changelog</a></li>
|
---|
345 | <li class="sidebar"><a href="http://sourceforge.net/projects/antinstaller">Project page on SourceForge</a></li>
|
---|
346 | <li class="sidebar"><a href="java2html/antinstaller/index.html">Java2HTML (main)</a></li>
|
---|
347 | <li class="sidebar"><a href="java2html/ext/index.html">Java2HTML (extensions)</a></li>
|
---|
348 | <li class="sidebar"><a href="http://antinstaller.cvs.sourceforge.net/antinstaller">Public CVS over HTTP</a></li>
|
---|
349 | <li class="sidebar"><a href="http://sourceforge.net/sendmessage.php?touser=616485">Contact AntInstaller Admin</a></li>
|
---|
350 | </ol>
|
---|
351 | </li>
|
---|
352 | </ol>
|
---|
353 | <br/>
|
---|
354 | <br/>
|
---|
355 | </div>
|
---|
356 |
|
---|
357 |
|
---|
358 | <!-- menu end [segment-end]-->
|
---|
359 | </div>
|
---|
360 | <div id="contents-options">
|
---|
361 | <a id="toggle" href="#" onclick="toggleMenu(); return false;">show menu</a>
|
---|
362 | </div>
|
---|
363 |
|
---|
364 | </div>
|
---|
365 | </body>
|
---|
366 | </html>
|
---|