source: other-projects/trunk/realistic-books/packages/AntInstaller/web/manual/manual/OptionalTasks/cab.html@ 19253

Last change on this file since 19253 was 19253, checked in by davidb, 15 years ago

Establishing a source code repository for Veronica's Realistic Book's software

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