source: release-kits/lirk3/resources/gs3-release-maker/apache-ant-1.6.5/docs/manual/OptionalTasks/cab.html@ 14982

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

initial import of LiRK3

File size: 5.4 KB
Line 
1<html>
2
3<head>
4<meta http-equiv="Content-Language" content="en-us">
5<title>Cab Task</title>
6<link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
7</head>
8
9<body>
10
11<h2><a name="cab">Cab</a></h2>
12<h3>Description</h3>
13<p>The cab task creates Microsoft cab archive files. It is invoked
14similar to the <a href="../CoreTasks/jar.html">jar</a> or <a href="../CoreTasks/zip.html">zip</a> tasks.
15This task will work on Windows using the external cabarc tool (provided by Microsoft)
16which must be located in your executable path.</p>
17<p>To use this task on other platforms you need to download and compile libcabinet from
18<a href="http://trill.cis.fordham.edu/~barbacha/cabinet_library/">
19http://trill.cis.fordham.edu/~barbacha/cabinet_library/</a>.</p>
20<p>See the section on <a href="../dirtasks.html#directorybasedtasks">directory based
21tasks</a>, on how the inclusion/exclusion of files works, and how to
22write patterns.</p>
23<p>This task forms an implicit <a href="../CoreTypes/fileset.html">FileSet</a> and
24supports all attributes of <code>&lt;fileset&gt;</code>
25(<code>dir</code> becomes <code>basedir</code>) as well as the nested
26<code>&lt;include&gt;</code>, <code>&lt;exclude&gt;</code> and
27<code>&lt;patternset&gt;</code> elements.</p>
28<h3>Parameters</h3>
29<table border="1" cellpadding="2" cellspacing="0">
30 <tr>
31 <td valign="top"><b>Attribute</b></td>
32 <td valign="top"><b>Description</b></td>
33 <td align="center" valign="top"><b>Required</b></td>
34 </tr>
35 <tr>
36 <td valign="top">cabfile</td>
37 <td valign="top">the name of the cab file to create.</td>
38 <td valign="top" align="center">Yes</td>
39 </tr>
40 <tr>
41 <td valign="top">basedir</td>
42 <td valign="top">the directory to start archiving files from.</td>
43 <td valign="top" align="center">No</td>
44 </tr>
45 <tr>
46 <td valign="top">verbose</td>
47 <td valign="top">set to &quot;yes&quot; if you want to see the output from
48 the cabarc tool. defaults to &quot;no&quot;.</td>
49 <td valign="top" align="center">No</td>
50 </tr>
51 <tr>
52 <td valign="top">compress</td>
53 <td valign="top">set to &quot;no&quot; to store files without compressing.
54 defaults to &quot;yes&quot;.</td>
55 <td valign="top" align="center">No</td>
56 </tr>
57 <tr>
58 <td valign="top">options</td>
59 <td valign="top">use to set additional command-line options for
60 the cabarc tool. should not normally be necessary.</td>
61 <td valign="top" align="center">No</td>
62 </tr>
63 <tr>
64 <td valign="top">includes</td>
65 <td valign="top">comma- or space-separated list of patterns of files that
66 must be included. All files are included when omitted.</td>
67 <td valign="top" align="center">No</td>
68 </tr>
69 <tr>
70 <td valign="top">includesfile</td>
71 <td valign="top">the name of a file. Each line of this file is
72 taken to be an include pattern</td>
73 <td valign="top" align="center">No</td>
74 </tr>
75 <tr>
76 <td valign="top">excludes</td>
77 <td valign="top">comma- or space-separated list of patterns of files that
78 must be excluded. No files (except default excludes) are excluded
79 when omitted.</td>
80 <td valign="top" align="center">No</td>
81 </tr>
82 <tr>
83 <td valign="top">excludesfile</td>
84 <td valign="top">the name of a file. Each line of this file is
85 taken to be an exclude pattern</td>
86 <td valign="top" align="center">No</td>
87 </tr>
88 <tr>
89 <td valign="top">defaultexcludes</td>
90 <td valign="top">indicates whether default excludes should be used
91 or not (&quot;yes&quot;/&quot;no&quot;). Default excludes are used when omitted.</td>
92 <td valign="top" align="center">No</td>
93 </tr>
94</table>
95<h3>Parameters specified as nested elements</h3>
96<h4>fileset</h4>
97
98<p>The cab task supports any number of nested <a
99href="../CoreTypes/fileset.html"><code>&lt;fileset&gt;</code></a>
100elements to specify the files to be included in the archive.</p>
101
102<h3>Examples</h3>
103<blockquote><pre>
104&lt;cab cabfile=&quot;${dist}/manual.cab&quot;
105 basedir=&quot;htdocs/manual&quot;
106 /&gt;
107</pre></blockquote>
108<p>cabs all files in the htdocs/manual directory into a file called
109manual.cab in the ${dist} directory.</p>
110<blockquote><pre>
111&lt;cab cabfile=&quot;${dist}/manual.cab&quot;
112 basedir=&quot;htdocs/manual&quot;
113 excludes=&quot;mydocs/**, **/todo.html&quot;
114 /&gt;
115</pre></blockquote>
116<p>cabs all files in the htdocs/manual directory into a file called
117manual.cab in the ${dist} directory. Files in the directory mydocs,
118or files with the name todo.html are excluded.</p>
119<blockquote><pre>
120&lt;cab cabfile=&quot;${dist}/manual.cab&quot;
121 basedir=&quot;htdocs/manual&quot;
122 includes=&quot;api/**/*.html&quot;
123 excludes=&quot;**/todo.html&quot;
124 verbose=&quot;yes&quot;
125 /&gt;
126</pre></blockquote>
127<p>Cab all files in the htdocs/manual directory into a file called
128manual.cab in the ${dist} directory. Only html files under the
129directory api are archived, and files with the name todo.html are
130excluded. Output from the cabarc tool is displayed in the build
131output.</p>
132
133<blockquote><pre>
134&lt;cab cabfile=&quot;${dist}/manual.cab&quot;
135 verbose=&quot;yes&quot;&gt;
136 &lt;fileset
137 dir=&quot;htdocs/manual&quot;
138 includes=&quot;api/**/*.html&quot;
139 excludes=&quot;**/todo.html&quot;
140 /&gt;
141&lt;/cab&gt;
142</pre></blockquote>
143<p>is equivalent to the example above.</p>
144
145<hr>
146<p align="center">Copyright &copy; 2000-2004 The Apache Software Foundation. All rights
147Reserved.</p>
148
149</body>
150</html>
151
Note: See TracBrowser for help on using the repository browser.