1 ++++++++++++++++++++++++++++++++++++++
2 <!-- WSDG Chapter Tools -->
3 ++++++++++++++++++++++++++++++++++++++
13 This chapter will provide you with information about the
14 various tools needed for Wireshark development.
16 None of the tools mentioned in this chapter are needed to
17 run Wireshark; they are only needed to build it.
19 Most of these tools have their roots on UNIX like
20 platforms, but Windows ports are also available. Therefore the
21 tools are available in different "flavours":
23 * UNIX (or Windows Cygwin): the tools should be commonly available on the
24 supported UNIX platforms, and for Windows platforms by using the Cygwin UNIX
27 * Windows native: some tools are available as native Windows tools, no special
31 .Follow the directions
33 Unless you know exactly what you are doing, you should strictly follow the recommendations given in <<ChapterSetup>>.
36 The following sections give a very brief description of
37 what a particular tool is doing, how it is used in the
38 Wireshark project and how it can be installed and
41 Documentation for these tools is outside the scope of this document. If you need
42 further information on using a specific tool you should find lots of useful
43 information on the web, as these tools are commonly used. You can also get help
44 for the UNIX based tools with `toolname --help` or the man page via `man
47 You will find explanations of the tool usage for some of the specific
48 development tasks in <<ChapterSources>>.
54 Cygwin provides a lot of UNIX based tools on the Windows platform. It uses a UNIX
55 emulation layer which might be a bit slower compared to the native Windows tools,
56 but at an acceptable level. The installation and update is pretty easy and done
57 through a single utility, 'setup-x86.exe' for 32-bit Windows and
58 'setup-x86_64.exe' for 64-bit Windows.
60 The native Windows tools will typically be a bit faster but more complicated to
61 install, as you would have to download the tools from different web sites and
62 install and configure them them individually.
66 .You must have Cygwin installed
68 As there's no Windows native bash version available, at least a basic installation
69 of Cygwin is required in any case. This may change in the future as packaging
70 systems such as NuGet and Chocolatey mature.
73 Although Cygwin consists of several separate packages, the installation
74 and update is done through a single utility, 'setup-x86.exe' or
75 'setup-x86_64.exe', which acts similarly to other web based installers.
76 All tools will be installed into one base folder. The default is
79 You will find 'setup-x86.exe', for 32-bit systems, and
80 'setup-x86_64.exe', for 64-bit systems, at
81 http://www.cygwin.com/install.html[]. Click on the link for the
82 appropriate setup utility to download it. After the download completes,
85 The setup utility will ask you for some settings. The defaults
86 should usually work well, at least initially.
88 If, at the "Choose A Download Source" page, you use the default "Install
89 from Internet" setting, you will need to choose a download site at the
90 "Choose A Download Site" page. See the list of mirror sites at
91 http://cygwin.com/mirrors.html[] to choose a download site appropriate
94 At the "Select Packages" page, you'll need to select some additional
95 packages, which are not installed by default. Navigate to the required
96 Category/Package row and click on the "Skip" item in the "New" column so
97 it shows a version number for the required package.
99 After clicking the Next button several times the setup
100 will then download and install the selected packages (this may
101 take a while, depending on the package size).
103 Under: 'Start→Programs→Cygwin→Cygwin Bash Shell' you should now be able to start
104 a new Cygwin bash shell, which is similar to the standard Windows command line
105 interpreters (command.com / cmd.exe) but much more powerful.
107 [[ChToolsCygwinPackages]]
109 ==== Add/Update/Remove Cygwin Packages
111 If you want to add, update, or remove packages later you can do so by
112 running the setup utility again. At the "Select Packages" page, the
113 entry in the "New" column will control what is done (or not) with the
114 package. If a new version of a package is available, the new version
115 number will be displayed, so it will be automatically updated. You can
116 change the current setting by simply clicking at it, it will change
119 * 'A specific version number.' This specific package version will be installed.
121 * 'Skip.' Not installed, no changes.
123 * 'Keep.' Already installed, no changes.
125 * 'Uninstall.' Uninstall this package.
127 * 'Reinstall.' Reinstall this package.
131 === GNU compiler toolchain (UNIX only)
135 ==== gcc (GNU compiler collection)
137 The GCC C compiler is available for most of the
138 UNIX-like platforms and as the Devel/gcc package from the
139 <<ChToolsCygwin,Cygwin setup>>.
141 If GCC isn't already installed or available
142 as a package for your platform, you can get it at:
143 http://gcc.gnu.org/[].
145 After correct installation, typing at the
146 bash command line prompt:
152 should result in something like
155 gcc (GCC) 3.4.4 (cygwin special) (gdc 0.12, using dmd 0.125)
156 Copyright (C) 2004 Free Software Foundation, Inc.
157 This is free software; see the source for copying conditions. There is NO
158 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
161 Your version string may vary, of course.
165 ==== gdb (GNU project debugger)
167 GDB is the debugger for the GCC compiler. It is
168 available for many (if not all) UNIX-like platforms and as
169 the Devel/gdb package from the
170 <<ChToolsCygwin,Cygwin setup>>
172 If you don't like debugging using the command line
173 there are some GUI frontends for it available, most notably
176 If gdb isn't already installed or available
177 as a package for your platform, you can get it at:
178 http://www.gnu.org/software/gdb/gdb.html[].
180 After correct installation:
186 should result in something like:
189 GNU gdb 6.5.50.20060706-cvs (cygwin-special)
190 Copyright 2003 Free Software Foundation, Inc.
191 GDB is free software, covered by the GNU General Public License, and you are
192 welcome to change it and/or distribute copies of it under certain conditions.
193 Type "show copying" to see the conditions.
194 There is absolutely no warranty for GDB. Type "show warranty" for details.
195 This GDB was configured as "i686-pc-cygwin".
198 Your version string may vary, of course.
203 ==== ddd (GNU Data Display Debugger)
205 The GNU Data Display Debugger is a good GUI frontend
206 for GDB (and a lot of other command line debuggers), so you
207 have to install GDB first. It is available for many UNIX-like
208 platforms and as the ddd package from the
209 <<ChToolsCygwin,Cygwin setup>>.
211 If GNU DDD isn't already installed or
212 available as a package for your platform, you can get it at:
213 http://www.gnu.org/software/ddd/[].
220 .GNU make isn't supported either
222 Although some effort is made to use make from the
223 Cygwin environment, the mainline is still using Microsoft
224 Visual Studio's nmake.
227 GNU Make is available for most of the UNIX-like
228 platforms and also as the Devel/make package from the
229 <<ChToolsCygwin,Cygwin setup>>.
231 If GNU Make isn't already installed or
232 available as a package for your platform, you can get it at:
233 http://www.gnu.org/software/make/[].
235 After correct installation:
241 should result in something like:
245 Copyright (C) 2006 Free Software Foundation, Inc.
246 This is free software; see the source for copying conditions.
247 There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
251 Your version string may vary, of course.
255 === Microsoft compiler toolchain (Windows native)
257 To compile Wireshark on Windows using the Microsoft C/$$C++$$
258 compiler, you'll need:
260 . C compiler (`cl.exe`)
262 . Assembler (`ml.exe` for 32-bit targets and `ml64.exe` for 64-bit targets)
264 . Linker (`link.exe`)
268 . C runtime headers and libraries (e.g. 'stdio.h', 'msvcrt.lib')
270 . Windows platform headers and libraries (e.g.
271 'windows.h', 'WSock32.lib')
273 // Can we drop support for CHM?
274 . HTML help headers and libraries ('htmlhelp.h', 'htmlhelp.lib')
276 ==== Toolchain Package Alternatives
278 The official Wireshark 1.12.x and 1.10.x releases are compiled using
279 Microsoft Visual $$C++$$ 2010 SP1.
280 The official 1.8 releases were compiled using
281 Microsoft Visual $$C++$$ 2010 SP1 as well.
282 The official 1.6, 1.4, and 1.2 releases were compiled using
283 Microsoft Visual $$C++$$ 2008 SP1.
284 Other past releases, including the 1.0 branch,
285 were compiled using Microsoft Visual $$C++$$ 6.0. Using the release
286 compilers is recommended for Wireshark development work. "Express
287 Edition" compilers such as Visual $$C++$$ 2010 Express Edition SP1 can be
288 used but any PortableApps packages you create with them
289 will require the installation of a separate Visual $$C++$$
290 Redistributable package on any machine on which the PortableApps
291 package is to be used. See
292 <<msvc-runtime-redistributable>> below for more details.
294 However, you might already have a different Microsoft $$C++$$ compiler
295 installed. It should be possible to use any of the following with the considerations listed:
298 .Visual C++ 2010 Express Edition (recommended)
300 IDE + Debugger?:: Yes
302 Purchase required?:: http://www.microsoft.com/express/Downloads/#Visual_Studio_2010_Express_Downloads[Free Download]
304 SDK required for 64-bit builds?:: Yes.
306 config.nmake MSVC_VARIANT:: MSVC2010EE
308 32-bit environment setup:: `%PROGRAMFILES%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat x86`
310 64-bit environment setup:: `%PROGRAMFILES%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat x64`
312 Remarks:: Installers created using express editions require a $$C++$$ redistributable
313 ('$$vcredist_x86.exe$$' or
314 '$$vcredist_x86.exe$$').footnoteref[vcredist,'$$vcredist_x86.exe$$' (3MB free
315 download) is required to build
316 Wireshark-win32-wireshark-major-minor-version:[].x.exe, and
317 '$$vcredist_x64.exe$$' is required to build
318 Wireshark-win64-wireshark-major-minor-version:[].x.exe. The version of
319 '$$vcredist_x86.exe$$' or '$$vcredist_x64.exe$$' _must_ match the version for your
320 compiler including any service packs installed for the compiler.]
325 IDE + Debugger?:: Yes
327 Purchase required?:: Yes
329 SDK required for 64-bit builds?:: No
331 config.nmake MSVC_VARIANT:: MSVC2010
333 32-bit environment setup:: `%PROGRAMFILES%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat x86`
335 64-bit environment setup:: `%PROGRAMFILES%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat x64_`
337 Remarks:: Default compiler in 'config.nmake'. Building a 64-bit installer
338 requires a a $$C++$$ redistributable
339 ('$$vcredist_x86.exe$$').footnoteref[vcredist]
342 .Visual C++ 2008 Express Edition SP1
344 IDE + Debugger?:: Yes
346 Purchase required?:: http://www.microsoft.com/download/details.aspx?id=14597[Free Download]
348 SDK required for 64-bit builds?:: 64-bit build not supported
350 config.nmake MSVC_VARIANT:: MSVC2008EE
352 32-bit environment setup:: `%PROGRAMFILES%\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat`
354 Remarks:: Installers created using express editions require a $$C++$$ redistributable
355 ('$$vcredist_x86.exe$$').footnoteref[vcredist]
360 IDE + Debugger?:: Yes
362 Purchase required?:: Yes
364 SDK required for 64-bit builds?:: 64-bit build not supported
366 config.nmake MSVC_VARIANT:: MSVC2008
368 32-bit environment setup:: `%PROGRAMFILES%\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat`
371 .Visual C++ 2005 Express Edition
373 IDE + Debugger?:: Yes
375 Purchase required?:: Free Download (link disappeared)
377 SDK required for 64-bit builds?:: 64-bit build not supported
379 config.nmake MSVC_VARIANT:: MSVC2005EE
381 32-bit environment setup:: `%PROGRAMFILES%\Microsoft Visual Studio 8\VC\bin\vcvars32.bat`
383 Remarks:: Installers created using express editions require a $$C++$$ redistributable
384 ('$$vcredist_x86.exe$$').footnoteref[vcredist]
389 IDE + Debugger?:: Yes
391 Purchase required?:: Yes
393 SDK required for 64-bit builds?:: 64-bit build not supported
395 config.nmake MSVC_VARIANT:: MSVC2005
397 32-bit environment setup:: `%PROGRAMFILES%\Microsoft Visual Studio 8\VC\bin\vcvars32.bat`
399 ==== Legal issues with MSVC > V6?
401 Please note: The following is not legal advice - ask your preferred lawyer
402 instead. It's the author's view, but this view might be wrong.
404 The myriad of http://anonsvn.wireshark.org/wireshark-win32-libs/tags/[Win32
405 support lib] port projects all seem to believe there are legal issues involved
406 in using newer versions of Visual Studio. This FUD essentially stems from two
409 . Unfortunately, it is believed by many that the Microsoft Visual Studio 2003
410 EULA explicitly forbids linking with GPL'ed programs. This belief is probably
411 due to an improper interpretation of the
412 http://msdn.microsoft.com/visualc/vctoolkit2003/eula.aspx[Visual Studio 2003
413 Toolkit EULA], which places redistribution restrictions only on SOURCE CODE
414 SAMPLES which accompany the toolkit.
416 . Other maintainers believe that the GPL itself forbids using Visual Studio 2003
417 since one of the required support libraries (MSVCR71.DLL) does not ship with the
418 Windows operating system. This is also a wrongful interpretation, and the
419 http://www.gnu.org/licenses/gpl-faq.html#WindowsRuntimeAndGPL[GPL FAQ]
420 explicitly addresses this issue.
422 The situation is similar for Visual Studio 2005 and later.
424 It should be perfectly legal to compile
425 Wireshark, distribute, run it if it was compiled with any
428 ==== cl.exe (C Compiler)
430 The following table gives an overview of the possible
431 Microsoft toolchain variants and their specific C compiler
432 versions ordered by release date.
435 |Compiler Package|cl.exe|_MSC_VER|CRT DLL
436 |Visual Studio 2005|8.0|1400|msvcr80.dll
437 |Visual $$C++$$ 2005 Express Edition
438 |.NET Framework 2.0 SDK
439 |Windows SDK for Windows Vista and
440 .NET Framework 3.0 Runtime Components
441 |Visual Studio 2008|9.0|1500|msvcr90.dll
442 |Visual Studio 2008 Express Edition
443 |Visual Studio 2010|10.0|1600|msvcr100.dll
444 |Visual Studio 2010 Express Edition
447 After correct installation of the toolchain, typing
448 at the command line prompt (cmd.exe):
454 should result in something like:
457 Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86
458 Copyright (C) Microsoft Corp. All rights reserved.
460 usage: cl [ option... ] filename... [ /link linkoption...
463 However, the version string may vary.
467 ==== nmake.exe (Make)
469 Nmake is part of the toolchain packages described
472 Instead of using the workspace (.dsw) and projects (.dsp) files, the traditional
473 nmake makefiles are used. This has one main reason: it makes it much easier to
474 maintain changes simultaneously with the GCC toolchain makefile.am files as both
475 file formats are similar. However, as no Visual Studio workspace/project files
476 are available, this makes it hard to use the Visual Studio IDE e.g. for using
477 the integrated debugging feature.
479 After correct installation, typing at the command line prompt (cmd.exe):
485 should result in something like:
488 Microsoft (R) Program Maintenance Utility Version 6.00.9782.0
489 Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
491 NMAKE : fatal error U1064: MAKEFILE not found and no target specified
495 However, the version string may vary.
497 Documentation on nmake can be found at
498 http://msdn2.microsoft.com/library/dd9y37ha(VS.71).aspx[Microsoft MSDN]
500 ==== link.exe (Linker)
503 This section not yet written
506 [[msvc-runtime-redistributable]]
509 ==== C-Runtime "Redistributable" Files
511 Please note: The following is not legal advice - ask your preferred lawyer
512 instead. It's the authors view and this view might be wrong.
514 Depending on the Microsoft compiler version you use, some binary files coming
515 from Microsoft might be required to be installed on Windows machine to run
516 Wireshark. On a developer machine, the compiler setup installs these files so
517 they are available - but they might not be available on a user machine!
519 This is especially true for the C runtime DLL (msvcr*.dll), which contains the
520 implementation of ANSI and alike functions, e.g.: fopen(), malloc(). The DLL is
521 named like: msvcr'version'.dll, an abbreviation for "MicroSoft Visual C
522 Runtime". For Wireshark to work, this DLL must be available on the users
525 Starting with MSVC7, it is necessary to ship the C runtime DLL
526 (msvcr'version'.dll) together with the application installer somehow, as that
527 DLL is possibly not available on the target system.
531 .Make sure you're allowed to distribute this file
533 The files to redistribute must be mentioned in the
534 redist.txt file of the compiler package. Otherwise it
535 can't be legally redistributed by third parties like
539 The following MSDN links are recommended for the
542 * http://msdn2.microsoft.com/library/ms235299(VS.80).aspx[Redistributing Visual C++ Files]
544 * http://msdn2.microsoft.com/library/ms235291(VS.80).aspx[How to: Deploy using XCopy]
546 * http://support.microsoft.com/?scid=kb%3Ben-us%3B326922&x=10&y=13[Redistribution
547 of the shared C runtime component in Visual $$C++$$ 2005 and in Visual $$C++$$
550 In all cases where '$$vcredist_x86.exe$$' or '$$vcredist_x64.exe$$' is
551 downloaded it should be downloaded to the directory into which the support
552 libraries for Wireshark have been downloaded and installed. This directory is
553 specified by the WIRESHARK_LIB_DIR setting in the 'config.nmake'. By default it
554 is 'C:\wireshark-win32-libs'. It need not, and should not, be run after being
557 ===== msvcr80.dll / vcredist_x86.exe - Version 8.0 (2005)
559 There are three redistribution methods that MSDN
560 mentions for MSVC 8 (see
561 http://msdn.microsoft.com/library/ms235316(VS.80).aspx["Choosing a Deployment Method"]):
563 . 'Using Visual $$C++$$ Redistributable Merge Modules'.
564 (Loadable modules for building msi installers.
565 Not suitable for Wireshark's NSIS based installer)
567 . 'Using Visual $$C++$$ Redistributable Package'. The Microsoft libraries are
568 installed by copying '$$vcredist_x86.exe$$', '$$vcredist_x64.exe$$', or
569 '$$vcredist_ia64.exe$$' to the target machine and executing it on that machine
570 (MSDN recommends this for applications built with Visual Studio 2005 Express
573 . 'Install a particular Visual $$C++$$ assembly as a private assembly for the
574 application'. The Microsoft libraries are installed by copying the folder
575 content of 'Microsoft.VC80.CRT' to the target directory (e.g. 'C:\Program
578 To save installer size, and to make a portable
579 version of Wireshark (which must be completely self-contained,
580 on a medium such as a flash drive, and not require that an
581 installer be run to install anything on the target machine)
582 possible, when building 32-bit Wireshark with MSVC2005, method
583 3 (copying the content of 'Microsoft.VC80.CRT')
584 is used (this produces the smallest package).
586 As MSVC2005EE and DOTNET20 don't provide the folder
587 'Microsoft.VC80.CRT', when 32-bit Wireshark
588 is built with either of them method 2 is used.
589 You'll have to download the appropriate version of
590 '$$vcredist_x86.exe$$' from Microsoft for your
593 A portable version of 64-bit Wireshark is not built, so method 3 is used for all
594 64-bit builds. You'll have to download the appropriate version of
595 '$$vcredist_x64.exe$$' or '$$vcredist_ia64.exe$$' from Microsoft for your target
596 processor and compiler version.
598 * For 32-bit builds using Microsoft Visual $$C++$$ 2005
599 Express Edition without Service Pack 1, you need
601 from: "Microsoft Visual $$C++$$ 2005 Redistributable Package (x86)":
602 http://www.microsoft.com/download/details.aspx?id=3387[].
604 * For 64-bit x86 (x64) builds using Microsoft Visual $$C++$$
605 2005, any edition, without Service Pack 1, you need
607 from: "Microsoft Visual $$C++$$ 2005 Redistributable Package (x64)":
608 http://www.microsoft.com/download/details.aspx?id=21254[].
610 * For IA-64 builds using Microsoft Visual $$C++$$ 2005, any
611 edition, without Service Pack 1, you need
613 from: "Microsoft Visual $$C++$$ 2005 Redistributable Package (IA64)":
614 http://www.microsoft.com/download/details.aspx?id=16326[].
616 * For 32-bit builds using Microsoft Visual $$C++$$ 2005
617 Express Edition with Service Pack 1, you need
618 '8.0.50727.762', from: "Microsoft
619 Visual $$C++$$ 2005 SP1 Redistributable Package (x86)":
620 http://www.microsoft.com/download/details.aspx?id=5638[].
622 * For 64-bit x86 builds using Microsoft Visual $$C++$$ 2005,
623 any edition, with Service Pack 1, you need
624 '{fill this in}', from: "Microsoft
625 Visual $$C++$$ 2005 SP1 Redistributable Package (x64)":
626 http://www.microsoft.com/download/details.aspx?id=18471[].
628 Please send a message to the wireshark-dev mailing list if you
629 find a different version number.
631 ===== msvcr90.dll / vcredist_x86.exe / vcredist_x64.exe - Version 9.0 (2008)
633 There are three redistribution methods that MSDN
634 mentions for MSVC 9 (see:
635 http://msdn.microsoft.com/en-US/library/ms235316(v=vs.90).aspx["Choosing a Deployment Method"]):
637 . 'Using Visual $$C++$$ Redistributable Merge Modules'.
638 (Loadable modules for building msi installers.
639 Not suitable for Wireshark's NSIS based installer)
641 . 'Using Visual $$C++$$ Redistributable Package'. The Microsoft
642 libraries are installed by copying '$$vcredist_x64.exe$$' or
643 '$$vcredist_x86.exe$$' to the target machine and executing it on that machine
644 (MSDN recommends this for applications built with Visual Studio 2008 Express
647 . 'Install a particular Visual $$C++$$ assembly as a private assembly for the
648 application'. The Microsoft libraries are installed by copying the folder
649 content of _Microsoft.VC90.CRT_to the target directory (e.g. 'C:\Program
652 To save installer size and to make a portable version of Wireshark (which must
653 be completely self-contained, on a medium such as a flash drive, and not require
654 that an installer be run to install anything on the target machine) possible,
655 when building 32-bit Wireshark with MSVC2008, method 3 (copying the content of
656 'Microsoft.VC90.CRT') is used (this produces the smallest package).
658 As MSVC2008EE doesn't provide the folder 'Microsoft.VC90.CRT', when 32-bit
659 Wireshark is built with it method 2 is used. You'll have to download the
660 appropriate version of '$$vcredist_x64.exe$$' from Microsoft for your compiler
663 A portable version of 64-bit Wireshark is not built, so method 2 is used for all
664 64-bit builds. You'll have to download the appropriate version of
665 '$$vcredist_x86.exe$$' from Microsoft for your compiler version.
668 * For 32-bit builds using Microsoft Visual $$C++$$ 2008
669 Express Edition without Service Pack 1, you need
671 "Microsoft Visual $$C++$$ 2008 Redistributable Package (x86)":
672 http://www.microsoft.com/download/details.aspx?id=29[].
674 * For 64-bit builds using Microsoft Visual $$C++$$ 2008,
675 any edition, without Service Pack 1, you need
677 "Microsoft Visual $$C++$$ 2008 Redistributable Package (x64)":
678 http://www.microsoft.com/download/details.aspx?id=15336[].
680 * For 32-bit builds with Microsoft Visual $$C++$$ 2008
681 Express Edition with Service Pack 1, you need
682 '9.0.30729.17', from:
683 "Microsoft Visual $$C++$$ 2008 SP1 Redistributable Package (x86)":
684 http://www.microsoft.com/download/details.aspx?id=5582[].
686 * For 64-bit builds with Microsoft Visual $$C++$$ 2008,
687 any edition, with Service Pack 1, you need
688 '9.0.30729.17', from:
689 "Microsoft Visual $$C++$$ 2008 SP1 Redistributable Package (x64)":
690 http://www.microsoft.com/download/details.aspx?id=2092[].
692 Please send a message to the wireshark-dev mailing list if you
693 find a different version number.
695 ===== msvcr100.dll / vcredist_x86.exe / vcredist_x64.exe - Version 10.0 (2010)
697 There are three redistribution methods that MSDN
698 mentions for MSVC 10 (see:
699 http://msdn.microsoft.com/en-US/library/ms235316(v=vs.100).aspx["Choosing a Deployment Method"]):
701 . 'Using Visual $$C++$$ Redistributable Package'.
702 The Microsoft libraries are installed by copying
703 '$$vcredist_x64.exe$$' or
704 '$$vcredist_x86.exe$$' to the target
705 machine and executing it on that machine (MSDN recommends
706 this for applications built with Visual Studio 2010,
707 both Express Edition and non-Express editions)
709 . 'Using Visual $$C++$$ Redistributable Merge Modules'.
710 (Loadable modules for building msi installers.
711 Not suitable for Wireshark's NSIS based installer)
713 . 'Install a particular Visual $$C++$$ assembly as a
714 private assembly for the application'. The
715 Microsoft libraries are installed by copying the folder
716 content of 'Microsoft.VC100.CRT' to
717 the target directory (e.g. 'C:\Program Files\Wireshark')
719 To save installer size, and to make a portable
720 version of Wireshark (which must be completely self-contained,
721 on a medium such as a flash drive, and not require that an
722 installer be run to install anything on the target machine)
723 possible, when building 32-bit Wireshark with MSVC2010, method
724 3 (copying the content of 'Microsoft.VC100.CRT')
725 is used (this produces the smallest package).
727 As MSVC20010EE doesn't provide the folder 'Microsoft.VC100.CRT', when 32-bit
728 Wireshark is built with it method 1 is used. You'll have to download the
729 appropriate version of '$$vcredist_x64.exe$$' from Microsoft that corresponds to
730 your compiler version.
732 A portable version of 64-bit Wireshark is not built, so method
733 1 is used for all 64-bit builds. You'll have to download the
734 appropriate version of '$$vcredist_x86.exe$$' from Microsoft for your compiler version.
736 * For 32-bit builds using Microsoft Visual $$C++$$ 2010
737 Express Edition without Service Pack 1, you need
738 '10.0.30319.1', from: "Microsoft Visual
739 $$C++$$ 2010 Redistributable Package (x86)":
740 http://www.microsoft.com/download/en/details.aspx?id=5555[].
742 * For 64-bit builds using Microsoft Visual $$C++$$ 2010,
743 any edition, without Service Pack 1, you need
744 '10.0.30319.1', from: "Microsoft Visual
745 $$C++$$ 2010 Redistributable Package (x64)":
746 http://www.microsoft.com/download/details.aspx?id=14632[].
748 * For 32-bit builds using Microsoft Visual $$C++$$ 2010
749 Express Edition with Service Pack 1, you need
750 '10.0.40219.1', from: "Microsoft Visual
751 $$C++$$ 2010 SP1 Redistributable Package (x86)":
752 http://www.microsoft.com/download/en/details.aspx?id=8328[].
754 * For 64-bit builds using Microsoft Visual $$C++$$ 2010,
755 any edition, with Service Pack 1, you need
756 '10.0.40219.1', from: "Microsoft Visual
757 $$C++$$ 2010 SP1 Redistributable Package (x64)":
758 http://www.microsoft.com/download/details.aspx?id=13523[].
760 Please report to the developer mailing list, if you
761 find a different version number!
763 ==== Windows (Platform) SDK
765 The Windows Platform SDK (PSDK) or Windows SDK is a free
766 (as in beer) download and contains platform specific headers and
767 libraries (e.g. 'windows.h', 'WSock32.lib', etc.). As new Windows
768 features evolve in time, updated SDK's become available that
769 include new and updated APIs.
771 When you purchase a commercial Visual Studio, it will
772 include an SDK. The free (as in beer) downloadable C compiler
773 versions (V$$C++$$ 2012 Express, V$$C++$$ 2012 Express, etc.) do not
774 contain an SDK -- you'll need to download a PSDK in order to
775 have the required C header files and libraries.
777 Older versions of the SDK should also work. However, the
778 command to set the environment settings will be different, try
779 search for SetEnv.* in the SDK directory.
781 Prior to Windows Vista, the name "Platform SDK" was used;
782 starting with Vista, the name was changed just to "Windows
783 Software Development Kit" or "Windows SDK". The full names of the
784 SDKs can be misleading; for example, the SDK for Vista was called
785 the "Microsoft Windows Software Development Kit for Windows Vista
786 and .NET Framework 3.0 Runtime Components", which really means the
787 Windows SDK for Windows Vista and Platforms (like WinXP) that have
788 the .NET 3.0 runtime installed.
792 HTML Help is used to create the User's and Developer's Guide in .chm format and
793 to show the User's Guide as the Wireshark "Online Help".
795 Both features are currently optional, and might be removed in future versions.
797 ===== HTML Help Compiler (hhc.exe)
799 This compiler is used to generate a .chm file from a bunch of HTML files -- in
800 our case to generate the User's and Developer's Guide in .chm format.
802 The compiler is only available as the free (as in beer) "HTML Help Workshop"
803 download. If you want to compile the guides yourself, you need to download and
804 install this. If you don't install it into the default directory, you may also
805 have a look at the HHC_DIR setting in the file docbook/Makefile.
807 ===== HTML Help Build Files (htmlhelp.c / htmlhelp.lib)
809 The files 'htmlhelp.c' and 'htmlhelp.lib' are required to
810 be able to open .chm files from Wireshark and show the
811 online help. Both files are part of the SDK (standalone (P)SDK or MSVC
814 Simply set HHC_DIR in 'config.nmake' to use it.
820 Using a good debugger can save you a lot of development time.
822 The debugger you use must match the C compiler Wireshark was compiled with,
823 otherwise the debugger will simply fail or you will only see a lot of garbage.
825 [[ChToolsMSVCDebugger]]
827 ===== Visual Studio integrated debugger
829 You can use the integrated debugger of Visual Studio if your toolchain includes
830 it. However, setting up the environment is a bit tricky, as the Windows build
831 process uses makefiles instead of the .dsp/.dsw files usually used.
834 This section not yet written
837 [[ChToolsMSDebuggingTools]]
839 ===== Debugging Tools for Windows
841 You can also use the Microsoft Debugging Tools for Windows toolkit, which is a
842 standalone GUI debugger. Although it's not that comfortable compared to
843 debugging with the Visual Studio integrated debugger it can be helpful if you
844 have to debug on a machine where an integrated debugger is not available.
846 You can get it free of charge at:
847 http://www.microsoft.com/whdc/devtools/debugging/default.mspx[] (as
848 links to Microsoft pages change from time to time, search
849 for "Debugging Tools" at their page if this link happens to be
857 The bash shell is needed to run several shell scripts.
861 ==== UNIX and Cygwin: GNU bash
863 The bash shell is available for most of the UNIX-like
864 platforms and as the bash package from the
865 <<ChToolsCygwin,Cygwin setup>>.
867 If bash isn't already installed or
868 available as a package for your platform, you can get it at
869 http://www.gnu.org/software/bash/bash.html[].
871 After correct installation, typing at the bash command line prompt:
877 should result in something like:
880 GNU bash, version 3.1.17(6)-release (i686-pc-cygwin)
881 Copyright (C) 2005 Free Software Foundation, Inc.
884 However, the version string may vary.
886 [[ChToolsWindowsBash]]
890 // MinGW? PowerShell?
892 This section not yet written
899 Python is an interpreted programming language. The homepage of the Python
900 project is http://python.org/[]. It is used to generate some source files.
901 Python 2.5 or later (including Python 3) should work fine but Python 2.7 is
904 Python is either included or available as a package on most UNIX-like platforms.
905 Windows packages and source are available at http://python.org/download/[].
906 The Cygwin Python package is *not* recommended since `/usr/bin/python` is
907 a symbolic link, which causes confusion outside Cygwin.
909 You can verify your Python version by running
915 on UNIX and Linux and
919 C:\Python27> python --version
922 on Windows. You should see something like
928 Your version string may vary of course.
934 Perl is an interpreted programming language. The
935 homepage of the Perl project is
936 http://www.perl.com[]. Perl is used to convert
937 various text files into usable source code. Perl version 5.6
938 and above should work fine.
942 ==== UNIX and Cygwin: Perl
944 Perl is available for most of the UNIX-like platforms
945 and as the perl package from the
946 <<ChToolsCygwin,Cygwin setup>>.
948 If perl isn't already installed or available
949 as a package for your platform, you can get it at
950 http://www.perl.com/[].
952 After correct installation, typing at the
953 bash command line prompt:
959 should result in something like:
962 This is perl, v5.8.7 built for cygwin-thread-multi-64int
963 (with 1 registered patch, see perl -V for more detail)
965 Copyright 1987-2005, Larry Wall
967 Perl may be copied only under the terms of either the Artistic License or the
968 GNU General Public License, which may be found in the Perl 5 source kit.
970 Complete documentation for Perl, including FAQ lists, should be found on
971 this system using `man perl' or `perldoc perl'. If you have access to the
972 Internet, point your browser at http://www.perl.com/, the Perl Home Page.
975 However, the version string may vary.
977 [[ChToolsWindowsPerl]]
979 ==== Windows native: Perl
982 A native Windows Perl package can be obtained from
983 http://www.ActiveState.com[]. The installation
984 should be straightforward.
986 After correct installation, typing at the command
987 line prompt (cmd.exe):
993 should result in something like:
996 This is perl, v5.8.0 built for MSWin32-x86-multi-thread
997 (with 1 registered patch, see perl -V for more detail)
999 Copyright 1987-2002, Larry Wall
1001 Binary build 805 provided by ActiveState Corp. http://www.ActiveState.com
1002 Built 18:08:02 Feb 4 2003
1006 However, the version string may vary.
1012 Sed it the streaming editor. It makes it easy for example
1013 to replace text inside a source code file.
1014 The Wireshark build process uses this to stamp version strings
1019 ==== UNIX and Cygwin: sed
1021 Sed is available for most of the UNIX-like platforms
1022 and as the sed package from the
1023 <<ChToolsCygwin,Cygwin setup>>.
1025 If sed isn't already installed or available
1026 as a package for your platform, you can get it at
1027 http://directory.fsf.org/GNU/sed.html[]
1029 After correct installation, typing at the
1030 bash command line prompt:
1036 should result in something like:
1039 GNU sed version 4.1.5
1040 Copyright (C) 2003 Free Software Foundation, Inc.
1041 This is free software; see the source for copying conditions. There is NO
1042 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
1043 to the extent permitted by law.
1046 However, the version string may vary.
1048 [[ChToolsWindowsSed]]
1050 ==== Windows native: sed
1052 A native Windows sed package can be obtained from
1053 http://gnuwin32.sourceforge.net/[]. The
1054 installation should be straightforward.
1060 Bison is a parser generator used for some of Wireshark's file format support.
1062 [[ChToolsUnixBison]]
1064 ==== UNIX or Cygwin: bison
1066 Bison is available for most UNIX-like platforms and as the bison package from
1067 <<ChToolsCygwin,Cygwin>>. See the next section for native Windows options.
1069 If GNU Bison isn't already installed or available as a package for your
1070 platform you can get it at: http://www.gnu.org/software/bison/bison.html[].
1072 After correct installation running the following
1078 should result in something like:
1081 bison (GNU Bison) 2.3
1082 Written by Robert Corbett and Richard Stallman.
1084 Copyright (C) 2006 Free Software Foundation, Inc.
1085 This is free software; see the source for copying conditions. There is NO
1086 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1089 Your version string may vary.
1091 [[ChToolsWindowsBison]]
1093 ==== Windows Native: Win flex-bison and bison
1095 A native Windows version of bison is available in the _winflexbison_
1096 https://chocolatey.org/[Chocolatey] package. Note that the executable is named
1099 Native packages are available from other sources such as
1100 http://gnuwin32.sourceforge.net/packages/bison.htm[GnuWin]. They aren't
1101 officially supported but _should_ work.
1107 Flex is a lexical analyzer generator used for Wireshark's display filters, some
1108 file formats, and other features.
1112 ==== UNIX or Cygwin: flex
1114 Flex is available for most UNIX-like platforms and as the flex package from
1115 <<ChToolsCygwin,Cygwin>>. See the next section for native Windows options.
1117 If GNU flex isn't already installed or available as a package for your platform
1118 you can get it at http://www.gnu.org/software/flex/[].
1120 After correct installation running the following
1126 should result in something like:
1132 Your version string may vary.
1134 [[ChToolsWindowsFlex]]
1136 ==== Windows Native: Win flex-bison and flex
1138 A native Windows version of flex is available in the _winflexbison_
1139 https://chocolatey.org/[Chocolatey] package. Note that the executable is named
1142 Native packages are available from other sources such as
1143 http://gnuwin32.sourceforge.net/packages/flex.htm[GnuWin]. They aren't
1144 officially supported but _should_ work.
1150 The Wireshark project uses its own Git repository
1151 to keep track of all the changes done to the source
1152 code. Details about the usage of Git in the Wireshark
1153 project can be found in
1154 <<ChSrcGitRepository>>.
1156 If you want to work with the source code and are planning to
1157 commit your changes back to the Wireshark community, it is
1158 recommended to use a Git client to get the latest source files.
1159 For detailed information about the different ways to obtain the
1160 Wireshark sources, see
1163 You will find more instructions in
1164 <<ChSrcGit>> on how to use the Git
1169 ==== UNIX or Cygwin: git
1171 Git is available for most of the UNIX-like platforms
1172 and as the Git package from the
1173 <<ChToolsCygwin,Cygwin setup>>
1175 If Git isn't already installed or available as a package for your platform, you
1176 can get it at: http://git-scm.com/[].
1178 After correct installation, typing at the bash command line prompt:
1184 should result in something like:
1190 Your version will likely be different.
1192 [[ChToolsWindowsGit]]
1194 ==== Windows native: git
1196 The Git command line tools for Windows can be found at
1197 http://git-scm.com/download/win[].
1199 After correct installation, typing at the command
1200 line prompt (cmd.exe):
1206 should result in something like:
1212 However, the version string may vary.
1216 === Git GUI client (optional)
1218 Along with the traditional command-line client, several
1219 GUI clients are available for a number of platforms. See
1220 http://git-scm.com/downloads/guis[] for details.
1222 // [[ChToolsUnixGitGUI]]
1223 // XXX Add Gui client section
1227 === patch (optional)
1229 The patch utility is used to merge a diff file into your own source tree. This
1230 tool is only needed, if you want to apply a patch (diff file) from someone else
1231 (probably from the developer mailing list) to try out in your own private source
1234 It most cases you may not need the patch tool installed. Git and Gerrit should
1235 handle patches for you.
1237 You will find more instructions in <<ChSrcPatchApply>>on how to use the patch
1240 [[ChToolsUnixPatch]]
1242 ==== UNIX and Cygwin: patch
1244 Patch is available for most of the UNIX-like platforms
1245 and as the patch package from the
1246 <<ChToolsCygwin,Cygwin setup>>.
1248 If GNU patch isn't already installed or
1249 available as a package for your platform, you can get it at
1250 http://www.gnu.org/software/patch/patch.html[].
1252 After correct installation, typing at the
1253 bash command line prompt:
1259 should result in something like:
1263 Copyright (C) 1988 Larry Wall
1264 Copyright (C) 2002 Free Software Foundation, Inc.
1266 This program comes with NO WARRANTY, to the extent permitted by law.
1267 You may redistribute copies of this program
1268 under the terms of the GNU General Public License.
1269 For more information about these matters, see the file named COPYING.
1271 written by Larry Wall and Paul Eggert
1274 However, the version string may vary.
1276 [[ChToolsWindowsPatch]]
1278 ==== Windows native: patch
1280 A native Windows patch package can be obtained from
1281 http://gnuwin32.sourceforge.net/[]. The
1282 installation should be straightforward.
1284 [[ChToolsWindowsPowerShell]]
1286 === Windows PowerShell
1288 If you are running Windows Vista you may need to install Windows Powershell 2.0.
1289 You can download it from https://www.microsoft.com/powershell[]
1293 === Windows: GNU wget (optional)
1295 GNU wget is used to download files from the internet using the command line.
1297 GNU wget is available for most of the UNIX-like platforms and as the wget
1298 package from the <<ChToolsCygwin,Cygwin setup>>.
1300 You will only need wget, if you want to use the Windows automated library
1301 download, see <<ChLibsSetup>>for details.
1303 If GNU wget isn't already installed or available as a package for your platform
1304 (well, for Windows it is available as a Cygwin package), you can get it at
1305 http://www.gnu.org/software/wget/wget.html[].
1307 If wget is trying to download files but fails to do so, your Internet connection
1308 might use an HTTP proxy. Some Internet providers use such a proxy and it is
1309 common in many company networks today. Wireshark's setup script will try to
1310 discover your proxy settings automatically, but you may need to set the
1311 environment variable 'HTTP_PROXY' by hand before using wget. For example, if you
1312 are behind proxy.com which is listening on port 8080, you have to set it to
1316 set HTTP_PROXY=http://proxy.com:8080/
1319 If you are unsure about the settings, you might ask your system administrator.
1323 === Windows: GNU unzip (optional)
1325 GNU unzip is used to, well, unzip the zip files downloaded using the wget tool.
1327 GNU unzip is available for most of the UNIX-like platforms and as the unzip
1328 package from the <<ChToolsCygwin,Cygwin setup>>.
1330 You will only need unzip, if you want to use the Windows automated library
1331 download, see <<ChLibsSetup>>for details.
1333 If GNU unzip isn't already installed or available as a package for your platform
1334 (well, for Windows it is available as a Cygwin package), you can get it at
1335 http://gnuwin32.sourceforge.net/packages/unzip.htm[].
1339 === Windows: NSIS (optional)
1341 The NSIS (Nullsoft Scriptable Install System) is used to generate
1342 'wireshark-win32-wireshark-major-minor-version:[].x.exe' from all the files
1343 needed to be installed, including all required DLLs, plugins, and supporting
1346 To install it, simply download the latest released version (currently 2.46)
1347 from http://nsis.sourceforge.net[] and start the downloaded installer. You will
1348 need NSIS version 2. Version 3 is not yet supported.
1350 You can find more instructions on using NSIS in <<ChSrcNSIS>>.
1352 === Windows: PortableApps (optional)
1354 The PortableApps.com Installer is used to generate
1355 'WiresharkPortable-wireshark-major-minor-version:[].paf.exe' from all the files
1356 needed to be installed, including all required DLLs, plugins, and supporting
1359 To install it, do the following:
1361 * Download the latest PortableApps.com Platform release from
1362 http://portableapps.com/[]. `config.nmake` uses the ``Local
1363 All Users'' install location (`C:\`) by default.
1365 * Install the following applications in the PortableApps.com environment:
1367 ** PortableApps.com Installer
1369 ** PortableApps.com Launcher
1371 ** NSIS Portable (Unicode)
1373 ** PortableApps.com AppCompactor
1375 You can find more instructions on using the PortableApps.com Installer in
1376 <<ChSrcPortableApps>>.
1378 ++++++++++++++++++++++++++++++++++++++
1379 <!-- End of WSDG Chapter Tools -->
1380 ++++++++++++++++++++++++++++++++++++++
1382 // vim: set syntax=asciidoc: