af9d95b6690416637346fac2663949e629338700
[obnox/wireshark/wip.git] / docbook / edg_src / EDG_chapter_libraries.xml
1 <!-- EDG Chapter Libraries -->
2 <!-- $Id$ -->
3
4 <chapter id="ChapterLibraries">
5   <title>Libraries</title>
6   
7   <section id="ChLibIntro">
8         <title>Introduction</title>
9         <para>
10         Several libraries are needed to build / run Ethereal. Most of the
11         libraries are splitted into three packages:
12         <orderedlist>
13         <listitem>
14         <para>
15         Runtime package: binaries (e.g. win32 DLL's) and alike
16         </para>
17         </listitem>
18         <listitem>
19         <para>
20         Developer package: documentation, header files and alike
21         </para>
22         </listitem>
23         <listitem>
24         <para>
25         Source package: library sources, usually not required to
26         build ethereal
27         </para>
28         </listitem>
29         </orderedlist>
30         <tip><title>Tip!</title>
31         <para>
32         Win32: All required libraries for the MSVC
33         generation are available at: 
34         <ulink  url="http://www.ethereal.com/distribution/win32/development/"/>,
35         but see <xref linkend="ChLibsSetup"/> for an easier way to install the 
36         libraries.
37         </para>
38         </tip>
39         </para>
40   </section>
41         
42   <section id="ChLibsFormat">
43     <title>Binary library formats</title>
44         <para>
45         Binary libraries are available in different formats, depending on the C 
46         compiler (see <xref linkend="ChToolsCompiler"/>) used to build it and of 
47         course the platform they were build for.
48         </para>
49         
50         <section id="ChLibsFormatUnix">
51         <title>Unix</title>
52         <para>
53         If you have installed unix binary libraries on your system, they will 
54         match the C compiler. If not already installed, the libraries should be
55         available as a package from the platform installer, or you can download
56         and compile the source and install that binaries then.
57         </para>
58         </section>
59
60         <section id="ChLibsFormatWin32MSVC6">
61         <title>Win32: MSVC V6</title>
62         <para>
63         Recommended for current Win32 Ethereal releases.
64         Most of the Win32 binary libraries you will find on the web are in this
65         format. You will recognize MSVC libraries by the .lib/.dll file extension.
66         </para>
67         </section>
68
69         <section id="ChLibsFormatWin32MSVC2003">
70         <title>Win32: MSVC 2003</title>
71         <para>
72         Currently not widely available, but the first libraries in that format can 
73         be seen on the web. These libraries have the same .lib/.dll file 
74         extension, but unfortunately they are not completely compatible as they 
75         are linked with different dependant libraries, see <xref 
76         linkend="ChToolsCompiler"/> for some further explanations.
77         </para>
78         </section>
79
80         <section id="ChLibsFormatWin32Cygwin">
81         <title>Win32: cygwin gcc</title>
82         <para>
83         Cygwin provides most of the required libraries (with file extension .a/.lib) 
84         for Wireshark suitable for cygwin's gcc compiler.
85         </para>
86         </section>
87   </section>
88         
89   <section id="ChLibsSetup">
90         <title>Win32: Automated library download</title>
91         <para>
92         You can download/install all required libraries by using the setup target 
93         of the <filename>Makefile.nmake</filename> from the source package.
94         </para>
95         <tip><title>Tip!</title>
96         <para>
97         It's a really good idea to use the Win32 automated library download to 
98         install the required libraries as it makes this download very easy.
99         </para>
100         </tip>
101         <note><title>Note!</title>
102         <para>
103         Before you start the download, you must have installed both
104         the required tools (see <xref linkend="ChapterTools"/>) and also the 
105         Ethereal sources (see <xref linkend="ChSrcObtain"/>).
106         </para>
107         </note>
108         <para>
109         By default the libraries will be downloaded and installed into 
110         <filename>C:\ethereal-win32-libs</filename>.
111         You can change this to any other location by editing the file
112         <filename>config.nmake</filename> and changing the line containing 
113         the WIRESHARK_LIBS setting to your favourite place (use an absolute path 
114         here).
115         </para>
116         <para>
117         Then enter at the command line:
118         </para>
119         <para>
120         <prompt>&gt;</prompt> <userinput>nmake -f Makefile.nmake setup</userinput>
121         </para>
122         <para>
123         This will first check for all the various tools needed to build Ethereal,
124         as described already in <xref linkend="ChToolsWin32Verify"/>.
125         </para>
126         <para>
127         Then it will download the zipped libraries into the directory specified by 
128         WIRESHARK_LIBS and install (unzip) all required library files there.
129         </para>
130         <para>
131         If you have problems downloading the library files, see the wget proxy 
132         comment in <xref linkend="ChToolsWget"/>.
133         </para>
134
135         <section id="ChLibsSetupUpdate">
136         <title>Update of a previous download</title>
137         <para>
138         As new versions of the libraries become available, maybe with bugfixes or
139         some new functionality, your libraries get outdated.
140         </para>
141         <para>
142         You could simply remove everything in the WIRESHARK_LIBS dir and call the 
143         setup target again, but that would require to download every file again 
144         (currently about 33MB), which isn't necessary.
145         </para>
146         <para>
147         The following will bring your libraries up to date:
148         </para>
149         <itemizedlist>
150         <listitem>
151         <para>
152         Update your Ethereal sources to the latest SVN files (see <xref 
153         linkend="ChSrcObtain"/>), so the zip filenames in the setup target 
154         of Makefile.nmake is in sync with the library zip files on the server.
155         </para>
156         </listitem>
157         <listitem>
158         <para>  
159         Remove all files previously unzipped from the downloaded files in your 
160         WIRESHARK_LIBS library path (all the subdirs, e.g. 
161         <filename>c:\ethereal_libs\gtk+</filename>), 
162         except for the zip files located at the toplevel, which are the files 
163         downloaded the last time(s). You could do this, be entering at the command line:
164         </para>
165         <para>
166         <prompt>&gt;</prompt> <userinput>nmake -f Makefile.nmake clean_setup</userinput>
167         </para>
168         </listitem>
169         <listitem>
170         <para>
171         Start the setup target described above. As wget will download only the 
172         missing files, existing zip files in the WIRESHARK_LIBS dir won't be 
173         downloaded again. Remaining (outdated) zip files shouldn't do any harm.
174         </para>
175         </listitem>
176         </itemizedlist>
177         </section>
178         
179   </section>
180
181   <section id="ChLibsGtk">
182         <title>GTK+ / GLib / GDK / Pango / ATK / GNU gettext / GNU libiconv</title>
183         <para>
184         The Glib library is used as a basic platform abstraction library, it's 
185         not related to graphical user interface (GUI) things. For a detailed 
186         description about GLib, see <xref linkend="ChCodeGLib"/>.
187         </para>
188         <para>
189         The GTK and it's dependant libraries are used to build Ethereal's GUI. 
190         For a detailed description of the GTK libraries, see <xref 
191         linkend="ChUIGTK"/>.
192         </para>
193         <para>
194         All other libraries are dependant on the two libraries mentioned above, 
195         you will typically not come in touch with these while doing Ethereal 
196         development. 
197         </para>
198         <para>
199         As the requirements for the GLib/GTK libraries increased in the past, it 
200         depends on the GLib/GTK versions you have, which additional libraries are 
201         required. The 1.x versions only needed GLib/GDK/GTK+, while the 2.x 
202         versions require all mentioned libs.
203         </para>
204
205         <section id="ChLibsUnixGTK">
206         <title>Unix</title>
207         <para>
208         The GLib/GTK+ libraries are available for many unix-like platforms and 
209         cygwin.
210         </para>
211         <para>
212         If these libraries aren't already installed and also not available as a 
213         package for your platform, you can get them at: 
214         <ulink url="http://www.gtk.org"/>.
215         </para>
216         </section>
217
218         <section id="ChLibsWin32GTK">
219         <title>Win32 MSVC</title>
220         <para>
221         You can get the latest version at: 
222         <ulink url="http://www.gimp.org/%7Etml/gimp/win32/downloads.html"/>.
223         </para>
224         </section>
225   </section>
226   
227   <section id="ChLibsSNMP">
228         <title>Net SNMP (previously known as "ucd-snmp")</title>
229         <para>
230         "Various tools relating to the Simple Network Management Protocol"
231         </para>
232         
233         <section id="ChLibsUnixSNMP">
234         <title>Unix</title>
235         <para>
236         If this library isn't already installed and also not available as a 
237         package for your platform, you can get it at: 
238         <ulink url="http://sourceforge.net/projects/net-snmp/"/>.
239         </para>
240         </section>
241
242         <section id="ChLibsWin32SNMP">
243         <title>Win32 MSVC</title>
244         <para>
245         Ethereal uses the source Net-SNMP distribution at 
246         <ulink url="http://sourceforge.net/projects/net-snmp/"/>.
247         Then libsnmp is compiled with the "libsnmp - Win32 Release" project 
248         using MSVC++ 6.0. A file called "README.ethereal" has been placed in the 
249         net-snmp zip archive at <ulink 
250         url="http://anonsvn.ethereal.com/ethereal-win32-libs/trunk/packages/"/>
251         describing the changes in more detail.
252         </para>
253         </section>
254                 
255   </section>
256   
257
258   <section id="ChLibsADNS">
259         <title>GNU ADNS (optional)</title>
260         <para>
261         "Advanced, easy to use, asynchronous-capable DNS client library and
262 utilities."
263         </para>
264         
265         <section id="ChLibsUnixADNS">
266         <title>Unix</title>
267         <para>
268         If this library isn't already installed and also not available as a 
269         package for your platform, you can get it at: 
270         <ulink url="http://www.gnu.org/software/adns/"/>.
271         </para>
272         </section>
273
274         <section id="ChLibsWin32ADNS">
275         <title>Win32 MSVC</title>
276         <para>
277         You can get the latest version at: 
278         <ulink url="http://adns.jgaa.com/"/>
279         </para>
280         </section>
281         
282   </section>
283   
284
285   <section id="ChLibsPCRE">
286         <title>PCRE(optional)</title>
287         <para>
288         "Perl compatible regular expressions"
289         </para>
290         
291         <section id="ChLibsUnixPCRE">
292         <title>Unix</title>
293         <para>
294         If this library isn't already installed and also not available as a 
295         package for your platform, you can get it at: 
296         <ulink url="http://www.pcre.org/"/>.
297         </para>
298         </section>
299
300         <section id="ChLibsWin32PCRE">
301         <title>Win32 MSVC</title>
302         <para>
303         You can get the latest version at: 
304         <ulink url="http://gnuwin32.sourceforge.net/packages/pcre.htm"/>
305         </para>
306         </section>
307                 
308   </section>
309   
310   
311   <section id="ChLibsZlib">
312         <title>zlib (optional)</title>
313         <para>
314         "zlib is designed to be a 
315         <ulink url="http://www.gzip.org/zlib/zlib_license.html">free</ulink>,
316         general-purpose, legally unencumbered -- that is, not covered by any
317         patents -- lossless data-compression library for use on virtually any computer
318         hardware and operating system."
319         </para>
320
321         <section id="ChLibsUnixZlib">
322         <title>Unix</title>
323         <para>
324         If this library isn't already installed and also not available as a 
325         package for your platform, you can get it at: 
326         <ulink url="http://www.gzip.org/zlib/"/>.
327         </para>
328         </section>
329
330         <section id="ChLibsWin32Zlib">
331         <title>Win32 MSVC</title>
332         <para>
333         You can get the latest version at: 
334         <ulink url="http://gnuwin32.sourceforge.net/packages/zlib.htm"/>
335         </para>
336         <para>
337         (A version for the MSVC2003 compiler can be found at:
338         <ulink url="http://www.winimage.com/zLibDll/"/>)
339         </para>
340         </section>
341
342   </section>
343   
344   
345   <section id="ChLibsPcap">
346         <title>libpcap/WinPcap (optional)</title>
347         <para>
348         "packet capture library"
349         </para>
350         
351         <section id="ChLibsLibpcap">
352         <title>Unix: libpcap</title>
353         <para>
354         If this library isn't already installed and also not available as a 
355         package for your platform, you can get it at: 
356         <ulink url="http://www.tcpdump.org/"/>.
357         </para>
358         </section>
359
360         <section id="ChLibsWinpPcap">
361         <title>Win32 MSVC: WinPcap</title>
362         <para>
363         You can get the "Windows packet capture library" at:
364         <ulink url="http://www.winpcap.org/install/default.htm"/>
365         </para>
366         </section>
367
368   </section>
369
370
371   <section id="ChLibsWimp">
372         <title>Win32: GTK WIMP (optional) for GTK 2.x only</title>
373         <para>
374         "GTK-Wimp ("Windows impersonator") is a GTK theme that blends well into
375         the Windows desktop environment."
376         </para>
377         <para>
378         Wimp is only available for the GTK2.x versions at: 
379         <ulink url="http://gtk-wimp.sourceforge.net/"/>.
380         </para>
381
382   </section>
383
384   
385 </chapter>
386 <!-- End of EDG Chapter Libraries -->