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.4 KiB

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