aboutsummaryrefslogtreecommitdiff
path: root/src/samples/Dtf/Documents/Guide/Content/cabs.htm
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2022-07-14 15:19:53 -0700
committerRob Mensching <rob@firegiant.com>2022-07-14 16:02:24 -0700
commit229242cf7c328b89b5aa65ed7a04e33c8b93b393 (patch)
treede0a9547e73e46490b0946d6850228d5b30258b8 /src/samples/Dtf/Documents/Guide/Content/cabs.htm
parentf46ca6a9dce91607ffc9855270dd6998216e1a8b (diff)
downloadwix-229242cf7c328b89b5aa65ed7a04e33c8b93b393.tar.gz
wix-229242cf7c328b89b5aa65ed7a04e33c8b93b393.tar.bz2
wix-229242cf7c328b89b5aa65ed7a04e33c8b93b393.zip
Rename "samples" segment to "tools"
This segment is a bit of a "miscellaneous section" in the WiX repo. As such it has been difficult to name. I originally eschewed the name "tools" because what is in the "wix" segment was once called "tools". However, now that wix.exe is firmly established as the entry point for WiX operations, I've become comfortable with its segment being named "wix". That meant "tools" was again available and "tools" better describes the content of this section.
Diffstat (limited to 'src/samples/Dtf/Documents/Guide/Content/cabs.htm')
-rw-r--r--src/samples/Dtf/Documents/Guide/Content/cabs.htm101
1 files changed, 0 insertions, 101 deletions
diff --git a/src/samples/Dtf/Documents/Guide/Content/cabs.htm b/src/samples/Dtf/Documents/Guide/Content/cabs.htm
deleted file mode 100644
index e88d1e15..00000000
--- a/src/samples/Dtf/Documents/Guide/Content/cabs.htm
+++ /dev/null
@@ -1,101 +0,0 @@
1<html xmlns="http://www.w3.org/1999/xhtml">
2<head>
3 <title>Working with Cabinet Files</title>
4 <link rel="stylesheet" type="text/css" href="../styles/presentation.css" />
5 <link rel="stylesheet" type="text/css" href="ms-help://Hx/HxRuntime/HxLink.css" />
6</head>
7
8<body>
9
10 <div id="control">
11 <span class="productTitle">Deployment Tools Foundation</span><br />
12 <span class="topicTitle">Working with Cabinet Files</span><br />
13 <div id="toolbar">
14 <span id="chickenFeet">
15 <a href="using.htm">Development Guide</a> &gt;
16 <span class="nolink">Cabinet Files</span>
17 </span>
18 </div>
19 </div>
20 <div id="main">
21 <div id="header">
22 </div>
23 <div class="summary">
24
25 <h3>Creating a cabinet</h3>
26 <pre><font face="Consolas, Courier New"> CabInfo cabInfo = <font color="blue">new</font> CabInfo(<font color="purple">"package.cab"</font>);
27 cabInfo.Pack(<font color="purple">"D:\\FilesToCompress"</font>);</font></pre><br />
28 <p>1.&nbsp; Create a <a href="DTFAPI.chm::/html/M_Microsoft_Deployment_Compression_Cab_CabInfo__ctor_1.htm">new CabInfo</a> instance referring to the (future) location of the .cab file.</p>
29 <p>2.&nbsp; Compress files:</p><ul>
30 <li>Easily compress an entire directory with the <a href="DTFAPI.chm::/html/Overload_Microsoft_Deployment_Compression_ArchiveInfo_Pack.htm">Pack</a> method.</li>
31 <li>Compress a specific list of exernal and internal filenames with the <a href="DTFAPI.chm::/html/Overload_Microsoft_Deployment_Compression_ArchiveInfo_PackFiles.htm">PackFiles</a> method.</li>
32 <li>Compress a dictionary mapping of internal to external filenames with the <a href="DTFAPI.chm::/html/Overload_Microsoft_Deployment_Compression_ArchiveInfo_PackFileSet.htm">PackFileSet</a> method.</li>
33 </ul>
34
35 <p><br/></p>
36 <h3>Listing a cabinet</h3>
37 <pre><font face="Consolas, Courier New"> CabInfo cabInfo = <font color="blue">new</font> CabInfo(<font color="purple">"package.cab"</font>);
38 <font color="blue">foreach</font> (CabFileInfo fileInfo <font color="blue">in</font> cabInfo.GetFiles())
39 Console.WriteLine(fileInfo.Name + <font color="purple">"\t"</font> + fileInfo.Length);</font></pre><br />
40 <p>1.&nbsp; Create a <a href="DTFAPI.chm::/html/M_Microsoft_Deployment_Compression_Cab_CabInfo__ctor_1.htm">new CabInfo</a> instance referring to the location of the .cab file.</p>
41 <p>2.&nbsp; Enumerate files returned by the <a href="DTFAPI.chm::/html/Overload_Microsoft_Deployment_Compression_Cab_CabInfo_GetFiles.htm">GetFiles</a> method.</p><ul>
42 <li>Each <a href="DTFAPI.chm::/html/T_Microsoft_Deployment_Compression_Cab_CabFileInfo.htm">CabFileInfo</a> instance contains metadata about one file.</li>
43 </ul>
44
45 <p><br/></p>
46 <h3>Extracting a cabinet</h3>
47 <pre><font face="Consolas, Courier New"> CabInfo cabInfo = <font color="blue">new</font> CabInfo(<font color="purple">"package.cab"</font>);
48 cabInfo.Unpack(<font color="purple">"D:\\ExtractedFiles"</font>);</font></pre><br />
49 <p>1.&nbsp; Create a <a href="DTFAPI.chm::/html/M_Microsoft_Deployment_Compression_Cab_CabInfo__ctor_1.htm">new CabInfo</a> instance referring to the location of the .cab file.</p>
50 <p>2.&nbsp; Extract files:</p><ul>
51 <li>Easily extract all files to a directory with the <a href="DTFAPI.chm::/html/Overload_Microsoft_Deployment_Compression_ArchiveInfo_Unpack.htm">Unpack</a> method.</li>
52 <li>Easily extract a single file with the <a href="DTFAPI.chm::/html/M_Microsoft_Deployment_Compression_ArchiveInfo_UnpackFile.htm">UnpackFile</a> method.</li>
53 <li>Extract a specific list of filenames with the <a href="DTFAPI.chm::/html/Overload_Microsoft_Deployment_Compression_ArchiveInfo_UnpackFiles.htm">UnpackFiles</a> method.</li>
54 <li>Extract a dictionary mapping of internal to external filenames with the <a href="DTFAPI.chm::/html/Overload_Microsoft_Deployment_Compression_ArchiveInfo_UnpackFileSet.htm">UnpackFileSet</a> method.</li>
55 </ul>
56
57 <p><br/></p>
58 <h3>Getting progress</h3>
59 Most cabinet operation methods have an overload that allows you to specify a event handler
60 for receiving <a href="DTFAPI.chm::/html/T_Microsoft_Deployment_Compression_ArchiveProgressEventArgs.htm">archive
61 progress events</a>. The <a href="cabpack.htm">XPack sample</a>
62 demonstrates use of the callback to report detailed progress to the console.
63
64 <p><br/></p>
65 <h3>Stream-based compression</h3>
66 The CabEngine class contains static methods for performing compression/decompression operations directly
67 on any kind of Stream. However these methods are more difficult to use, since the caller must implement a
68 <a href="DTFAPI.chm::/html/T_Microsoft_Deployment_Compression_ArchiveFileStreamContext.htm">stream context</a>
69 that provides the file metadata which would otherwise have been provided by the filesystem. The CabInfo class
70 uses the CabEngine class with FileStreams to provide the more traditional file-based interface.
71
72 <p><br/></p>
73 <p><b>See also:</b></p>
74 <ul>
75 <li><a href="DTFAPI.chm::/html/T_Microsoft_Deployment_Compression_Cab_CabInfo.htm">CabInfo class</a></li>
76 <li><a href="DTFAPI.chm::/html/T_Microsoft_Deployment_Compression_Cab_CabEngine.htm">CabEngine class</a></li>
77 <li><a href="cabpack.htm">XPack Sample Tool</a></li>
78 </ul>
79 <p><br/></p>
80
81 </div>
82
83 <div id="footer">
84 <p />
85 Send comments on this topic to <a id="HT_MailLink" href="mailto:wix-users%40lists.sourceforge.net?Subject=Deployment Tools Foundation Documentation">
86 wix-users@lists.sourceforge.net</a>
87
88 <script type="text/javascript">
89 var HT_mailLink = document.getElementById("HT_MailLink");
90 var HT_mailLinkText = HT_mailLink.innerHTML;
91 HT_mailLink.href += ": " + document.title;
92 HT_mailLink.innerHTML = HT_mailLinkText;
93 </script>
94
95 <p />
96
97 </div>
98 </div>
99
100</body>
101</html>