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 4.7 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>Apache Ant User Manual</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">Yes</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 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 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>Examples</h3>
  92. <blockquote><pre>
  93. &lt;cab cabfile=&quot;${dist}/manual.cab&quot;
  94. basedir=&quot;htdocs/manual&quot;
  95. /&gt;
  96. </pre></blockquote>
  97. <p>cabs all files in the htdocs/manual directory into a file called
  98. manual.cab in the ${dist} directory.</p>
  99. <blockquote><pre>
  100. &lt;cab cabfile=&quot;${dist}/manual.cab&quot;
  101. basedir=&quot;htdocs/manual&quot;
  102. excludes=&quot;mydocs/**, **/todo.html&quot;
  103. /&gt;
  104. </pre></blockquote>
  105. <p>cabs all files in the htdocs/manual directory into a file called
  106. manual.cab in the ${dist} directory. Files in the directory mydocs,
  107. or files with the name todo.html are excluded.</p>
  108. <blockquote><pre>
  109. &lt;cab cabfile=&quot;${dist}/manual.cab&quot;
  110. basedir=&quot;htdocs/manual&quot;
  111. includes=&quot;api/**/*.html&quot;
  112. excludes=&quot;**/todo.html&quot;
  113. verbose=&quot;yes&quot;
  114. /&gt;
  115. </pre></blockquote>
  116. <p>Cab all files in the htdocs/manual directory into a file called
  117. manual.cab in the ${dist} directory. Only html files under the
  118. directory api are archived, and files with the name todo.html are
  119. excluded. Output from the cabarc tool is displayed in the build
  120. output.</p>
  121. <hr>
  122. <p align="center">Copyright &copy; 2000,2001 Apache Software Foundation. All rights
  123. Reserved.</p>
  124. </body>
  125. </html>