source: release-kits/lirk3/bin/ant-installer/web/manual/manual/OptionalTasks/antinstaller.html@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 8.5 KB
Line 
1<!--
2 Licensed to the Apache Software Foundation (ASF) under one or more
3 contributor license agreements. See the NOTICE file distributed with
4 this work for additional information regarding copyright ownership.
5 The ASF licenses this file to You under the Apache License, Version 2.0
6 (the "License"); you may not use this file except in compliance with
7 the License. You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16-->
17<html>
18
19<head>
20<meta http-equiv="Content-Language" content="en-us">
21<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
22<title>AntInstaller Task</title>
23</head>
24
25<body>
26
27<h2><a name="installer">Installer</a></h2>
28<h3>Description</h3>
29<p>An extension of the <a href="../CoreTasks/jar.html">Jar</a> task for creating
30installers.</p>
31<p>This task will correctly package the AntInstaller classes, the Ant classes,
32the antinstall-config.xml, the build.xml file, the default LookAndFeel classes, the button icons
33and create the required MANIFEST.mf to execute the Jar.</p>
34<p>Nested filesets should
35be used to specify other resources required by the install (e.g. License.txt)
36and the files required to run the application being installed. </p>
37
38<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>
39
40<h3>Parameters</h3>
41<table border="1" cellpadding="2" cellspacing="0">
42<tbody>
43 <tr class="tpheader">
44 <td><b>Attribute</b></td>
45 <td><b>Description</b></td>
46 <td><b>Required</b></td>
47 </tr>
48 <tr>
49 <td valign="top"><a name="file"></a>file</td>
50 <td valign="top">the JAR file to create.</td>
51
52 <td align="center" valign="top">Yes</td>
53 </tr>
54 <tr>
55 <td valign="top"><a name="buildFile"></a>buildFile</td>
56 <td valign="top">The build.xml file to use when AntInstaller is run.</td>
57 <td valign="top" align="center">Yes, unless update is set to true</td>
58 </tr>
59
60 <tr>
61 <td valign="top"><a name="installConfig"></a>installConfig</td>
62 <td valign="top">The antinstall-config.xml file to use when AntInstaller is run.</td>
63 <td valign="top" align="center">Yes, unless update is set to true</td>
64 </tr>
65 <tr>
66 <td valign="top"><a name="extractType"></a>extractType</td>
67
68 <td valign="top">Either NonExtractor or SelfExtractor.</td>
69 <td valign="top" align="center">Yes</td>
70 </tr>
71 <tr>
72 <td valign="top"><a name="antInstallLib"></a>antInstallLib</td>
73 <td valign="top">The location of the AntInstaller jars.</td>
74 <td valign="top" align="center">Yes</td>
75
76 </tr>
77 <tr>
78 <td valign="top"><a name="antLib"></a>antLib</td>
79 <td valign="top">The location of the Ant jars. N.B. Ant 1.6.2 or above is required.</td>
80 <td valign="top" align="center">Yes</td>
81 </tr>
82 <tr>
83 <td valign="top"><a name="icons"></a>icons</td>
84
85 <td valign="top">The <a target="_top" 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>
86 <td valign="top" align="center">No</td>
87 </tr>
88 <tr>
89 <td valign="top"><a name="validateConfig"></a>validateConfig</td>
90 <td valign="top">when true the AntInstaller config file is validated and errors and
91 warnings are printed to System.out, defaults to false</td>
92
93 <td valign="top" align="center">No</td>
94 </tr>
95 <tr>
96 <td valign="top"><a name="failOnError"></a>failOnError</td>
97 <td valign="top">if a known error is found during validation the build will stop.</td>
98 <td valign="top" align="center">No</td>
99 </tr>
100
101 <tr>
102 <td valign="top"><a name="basedir"></a>basedir</td>
103 <td valign="top">the directory from which to jar the files.</td>
104 <td valign="top" align="center">No</td>
105 </tr>
106 <tr>
107 <td valign="top"><a name="compress"></a>compress</td>
108
109 <td valign="top">Not only store data but also compress them,
110 defaults to true. Unless you set the <em>keepcompression</em>
111 attribute to false, this will apply to the entire archive, not
112 only the files you've added while updating.</td>
113 <td align="center" valign="top">No</td>
114 </tr>
115 <tr>
116 <td valign="top"><a name="keepcompression"></a>keepcompression</td>
117
118 <td valign="top">For entries coming from existing archives (like
119 nested <em>zipfileset</em>s or while updating the archive), keep
120 the compression as it has been originally instead of using the
121 <em>compress</em> attribute. Defaults false.</td>
122 <td align="center" valign="top">No</td>
123 </tr>
124 <tr>
125 <td valign="top"><a name="encoding"></a>encoding</td>
126
127 <td valign="top">The character encoding to use for filenames
128 inside the archive. Defaults to UTF8. <strong>It is not
129 recommended to change this value as the created archive will most
130 likely be unreadable for Java otherwise.</strong></td>
131 <td align="center" valign="top">No</td>
132 </tr>
133 <tr>
134 <td valign="top"><a name="filesonly"></a>filesonly</td>
135 <td valign="top">Store only file entries, defaults to false</td>
136
137 <td align="center" valign="top">No</td>
138 </tr>
139 <tr>
140
141 <td valign="top"><a name="includes"></a>includes</td>
142 <td valign="top">comma- or space-separated list of patterns of files that must be
143 included. All files are included when omitted.</td>
144 <td valign="top" align="center">No</td>
145
146 </tr>
147 <tr>
148 <td valign="top"><a name="includesfile"></a>includesfile</td>
149 <td valign="top">the name of a file. Each line of this file is
150 taken to be an include pattern</td>
151 <td valign="top" align="center">No</td>
152 </tr>
153 <tr>
154
155 <td valign="top"><a name="excludes"></a>excludes</td>
156 <td valign="top">comma- or space-separated list of patterns of files that must be
157 excluded. No files (except default excludes) are excluded when omitted.</td>
158 <td valign="top" align="center">No</td>
159 </tr>
160 <tr>
161 <td valign="top"><a name="excludesfile"></a>excludesfile</td>
162 <td valign="top">the name of a file. Each line of this file is
163 taken to be an exclude pattern</td>
164
165 <td valign="top" align="center">No</td>
166 </tr>
167 <tr>
168 <td valign="top"><a name="defaultexcludes"></a>defaultexcludes</td>
169 <td valign="top">indicates whether default excludes should be used or not
170 (&quot;yes&quot;/&quot;no&quot;). Default excludes are used when omitted.</td>
171
172 <td valign="top" align="center">No</td>
173 </tr>
174 <tr>
175 <td valign="top"><a name="manifest"></a>manifest</td>
176 <td valign="top">The manifest file to use if you wish to manually set the MANIFEST.MF (not recommended).</td>
177 <td valign="top" align="center">No</td>
178 </tr>
179
180 <tr>
181 <td valign="top"><a name="update"></a>update</td>
182 <td valign="top">indicates whether to update or overwrite
183 the destination file if it already exists. Default is &quot;false&quot;.</td>
184 <td valign="top" align="center">No</td>
185 </tr>
186 <tr>
187
188 <td valign="top"><a name="duplicate"></a>duplicate</td>
189 <td valign="top">behavior when a duplicate file is found. Valid values are &quot;add&quot;, &quot;preserve&quot;, and &quot;fail&quot;. The default value is &quot;add&quot;. </td>
190 <td valign="top" align="center">No</td>
191
192 </tr>
193</tbody>
194</table>
195
196<h3>Examples</h3>
197<p>
198Creates a compressed self-extracting jar, validating the configuration file myprojects-antinstall-config.xml
199</p>
200<pre>
201&lt;installer
202 file="./MyProject-installer.jar"
203 compress="true"
204 extractType="SelfExtractor"
205 installConfig="myprojects-antinstall-config.xml"
206 buildFile="myprojects-build.xml"
207 antInstallLib="${AntInstaller.home}/lib"
208 antLib="${AntInstaller.home}/antlib"
209 validateConfig="true"
210 failOnError="true"
211 icons="bluecurve"&gt;
212
213 &lt;!--
214 include the images for your installer
215 and license texts
216 --&gt;
217 &lt;fileset dir="extra-install-classpath" includes="resources/*"/&gt;
218
219 &lt;!--
220 add you application binaries and resources
221 to the installer here, for example
222 --&gt;
223 &lt;fileset dir="myproject" includes="myproject.jar"/&gt;
224 &lt;fileset dir="myproject" includes="myproject.properties"/&gt;
225 &lt;fileset dir="myproject" includes="mydefaultdata/*"/&gt;
226
227&lt;/installer&gt;
228</pre>
229
230</body>
231</html>
Note: See TracBrowser for help on using the repository browser.