2006-09-11 04:19:00 +00:00
|
|
|
<!--
|
|
|
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
contributor license agreements. See the NOTICE file distributed with
|
|
|
|
this work for additional information regarding copyright ownership.
|
|
|
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
(the "License"); you may not use this file except in compliance with
|
|
|
|
the License. You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
-->
|
2001-02-13 12:32:01 +00:00
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Language" content="en-us">
|
2005-04-29 18:58:16 +00:00
|
|
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
2002-02-03 22:11:39 +00:00
|
|
|
<title>Cab Task</title>
|
2001-02-13 12:32:01 +00:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
2018-01-22 23:52:21 +01:00
|
|
|
<h2 id="cab">Cab</h2>
|
2001-02-13 12:32:01 +00:00
|
|
|
<h3>Description</h3>
|
2018-02-28 07:58:59 +01:00
|
|
|
<p>The cab task creates Microsoft cabinet archive files. It is invoked similar to
|
|
|
|
the <a href="../Tasks/jar.html">jar</a> or <a href="../Tasks/zip.html">zip</a> tasks. This task
|
2018-03-10 20:17:33 +01:00
|
|
|
will work on Windows using the external <kbd>cabarc</kbd> tool (provided by Microsoft) which must
|
2018-02-28 07:58:59 +01:00
|
|
|
be located in your executable path.</p>
|
|
|
|
<p>To use this task on other platforms you need to download and compile <code>libcabinet</code>
|
2018-03-08 07:43:53 +01:00
|
|
|
from <a href="https://www.freshports.org/archivers/libcabinet/"
|
|
|
|
target="_top">https://www.freshports.org/archivers/libcabinet/</a>.</p>
|
2018-02-28 07:58:59 +01:00
|
|
|
<p>See the section on <a href="../dirtasks.html#directorybasedtasks">directory based tasks</a>, on
|
|
|
|
how the inclusion/exclusion of files works, and how to write patterns.</p>
|
|
|
|
<p>This task forms an implicit <a href="../Types/fileset.html">FileSet</a> and supports most
|
|
|
|
attributes of <code><fileset></code> (<var>dir</var> becomes <var>basedir</var>) as well as
|
|
|
|
the nested <code><include></code>, <code><exclude></code>
|
|
|
|
and <code><patternset></code> elements.</p>
|
2001-02-13 12:32:01 +00:00
|
|
|
<h3>Parameters</h3>
|
2018-02-28 07:58:59 +01:00
|
|
|
<table class="attr">
|
2001-02-13 12:32:01 +00:00
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<th>Attribute</th>
|
|
|
|
<th>Description</th>
|
|
|
|
<th>Required</th>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>cabfile</td>
|
|
|
|
<td>the name of the cab file to create.</td>
|
|
|
|
<td>Yes</td>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>basedir</td>
|
|
|
|
<td>the directory to start archiving files from.</td>
|
|
|
|
<td>No</td>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>verbose</td>
|
|
|
|
<td>set to <q>yes</q> if you want to see the output from the <code>cabarc</code> tool.</td>
|
|
|
|
<td>No; defaults to <q>no</q></td>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>compress</td>
|
|
|
|
<td>set to <q>no</q> to store files without compressing.</td>
|
|
|
|
<td>No; defaults to <q>yes</q></td>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>options</td>
|
2018-03-01 23:14:03 +01:00
|
|
|
<td>set additional command-line options for the <code>cabarc</code> tool. Should not
|
2018-02-28 07:58:59 +01:00
|
|
|
normally be necessary.</td>
|
|
|
|
<td>No</td>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>includes</td>
|
|
|
|
<td>comma- or space-separated list of patterns of files that must be included.</td>
|
|
|
|
<td>No; defaults to all (<q>**</q>)</td>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>includesfile</td>
|
|
|
|
<td>name of a file. Each line of this file is taken to be an include pattern</td>
|
|
|
|
<td>No</td>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>excludes</td>
|
|
|
|
<td>comma- or space-separated list of patterns of files that must be excluded.</td>
|
|
|
|
<td>No; defaults to default excludes or none if <var>defaultexcludes</var> is <q>no</q></td>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>excludesfile</td>
|
|
|
|
<td>name of a file. Each line of this file is taken to be an exclude pattern</td>
|
|
|
|
<td>No</td>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>defaultexcludes</td>
|
|
|
|
<td>indicates whether default excludes should be used or not (<q>yes|no</q>).</td>
|
|
|
|
<td>No; defaults to <q>yes</q></td>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
2003-03-19 10:48:01 +00:00
|
|
|
<h3>Parameters specified as nested elements</h3>
|
|
|
|
<h4>fileset</h4>
|
|
|
|
|
2018-02-28 07:58:59 +01:00
|
|
|
<p>The cab task supports one nested <a href="../Types/fileset.html"><code><fileset></code></a>
|
|
|
|
element to specify the files to be included in the archive. If this is specified,
|
|
|
|
the <var>basedir</var> attribute cannot be used.</p>
|
2003-03-19 10:48:01 +00:00
|
|
|
|
2001-02-13 12:32:01 +00:00
|
|
|
<h3>Examples</h3>
|
2018-02-09 06:54:03 +01:00
|
|
|
<pre>
|
2001-02-13 12:32:01 +00:00
|
|
|
<cab cabfile="${dist}/manual.cab"
|
2018-02-28 07:58:59 +01:00
|
|
|
basedir="htdocs/manual"/></pre>
|
|
|
|
<p>cabs all files in the <samp>htdocs/manual</samp> directory into a file
|
|
|
|
called <samp>manual.cab</samp> in the <samp>${dist}</samp> directory.</p>
|
2018-02-09 06:54:03 +01:00
|
|
|
<pre>
|
2001-02-13 12:32:01 +00:00
|
|
|
<cab cabfile="${dist}/manual.cab"
|
|
|
|
basedir="htdocs/manual"
|
2018-02-28 07:58:59 +01:00
|
|
|
excludes="mydocs/**, **/todo.html"/></pre>
|
|
|
|
<p>cabs all files in the <samp>htdocs/manual</samp> directory into a file
|
|
|
|
called <samp>manual.cab</samp> in the <samp>${dist}</samp> directory. Files in the
|
|
|
|
directory <samp>mydocs</samp>, or files with the name <samp>todo.html</samp> are excluded.</p>
|
2018-02-09 06:54:03 +01:00
|
|
|
<pre>
|
2001-02-13 12:32:01 +00:00
|
|
|
<cab cabfile="${dist}/manual.cab"
|
|
|
|
basedir="htdocs/manual"
|
|
|
|
includes="api/**/*.html"
|
|
|
|
excludes="**/todo.html"
|
2018-02-28 07:58:59 +01:00
|
|
|
verbose="yes"/></pre>
|
|
|
|
<p>Cab all files in the <samp>htdocs/manual</samp> directory into a file
|
|
|
|
called <samp>manual.cab</samp> in the <samp>${dist}</samp> directory. Only <samp>.html</samp> files
|
|
|
|
under the directory <samp>api</samp> are archived, and files with the name <samp>todo.html</samp>
|
|
|
|
are excluded. Output from the <code>cabarc</code> tool is displayed in the build output.</p>
|
2003-03-19 10:48:01 +00:00
|
|
|
|
2018-02-09 06:54:03 +01:00
|
|
|
<pre>
|
2003-03-19 10:48:01 +00:00
|
|
|
<cab cabfile="${dist}/manual.cab"
|
|
|
|
verbose="yes">
|
|
|
|
<fileset
|
|
|
|
dir="htdocs/manual"
|
|
|
|
includes="api/**/*.html"
|
2018-01-22 23:52:21 +01:00
|
|
|
excludes="**/todo.html"/>
|
2018-02-28 07:58:59 +01:00
|
|
|
</cab></pre>
|
2003-03-19 10:48:01 +00:00
|
|
|
<p>is equivalent to the example above.</p>
|
|
|
|
|
2001-02-13 12:32:01 +00:00
|
|
|
</body>
|
|
|
|
</html>
|