You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

cab.html 5.3 KiB

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