* Windows native: some tools are available as native Windows tools, no special
emulation is required. Many of these tools can be installed (and updated)
using http://chocolatey.org[Chocolatey], a Windows package manager similar
- to the linux package managers apt-get or yum.
+ to the Linux package managers apt-get or yum.
[WARNING]
.Follow the directions
=== Windows PowerShell
-If you are running Windows Vista you may need to install at least Windows Powershell
-2.0, although later versions will also work.
-You can download it from https://www.microsoft.com/powershell[]
+PowerShell 2.0 or later is required for building Wireshark and the NSIS package.
+Windows 7 and later include compatible versions.
+
+If you are running Windows Vista and have thus far managed to not install
+PowerShell 2.0, either directly or via anything that requires it, you must now
+install PowerShell 2.0. You can download it from
+https://www.microsoft.com/powershell[]
=== Chocolatey
The native Windows tools will typically be a bit faster but more complicated to
install, as you would have to download the tools from different web sites and
-install and configure them them individually.
+install and configure them individually.
[NOTE]
Although Cygwin consists of several separate packages, the installation
and update is done through a single utility, 'setup-x86.exe' or
'setup-x86_64.exe', which acts similarly to other web based installers.
-All tools will be installed into one base folder. The default is
-'C:\cygwin'.
+Alternatively you can install Cygwin and its packages using Chocolatey.
+
+==== Installing Cygwin using the Cygwin installer
You will find 'setup-x86.exe', for 32-bit systems, and
'setup-x86_64.exe', for 64-bit systems, at
appropriate setup utility to download it. After the download completes,
run it.
+All tools will be installed into one base folder. The default is
+'C:\cygwin'.
+
The setup utility will ask you for some settings. The defaults
should usually work well, at least initially.
* 'Reinstall.' Reinstall this package.
+==== Installing Cygwin using Chocolatey
+
+Chocolatey supports Cygwin as an external package source.
+To install Cygwin itself run
+
+----
+PS$>choco install cygwin
+# You might also need to install cyg-get:
+PS$>choco install cyg-get
+----
+
+Chocolatey installs Cygwin in 'C:\tools\cygwin' by default.
+
+One or more Cygwin packages can be installed using "cyg-get":
+
+----
+PS$>cyg-get sed asciidoc
+----
+
[[ChToolsGNUChain]]
=== GNU compiler toolchain (UNIX only)
==== gcc (GNU compiler collection)
The GCC C compiler is available for most of the
-UNIX-like platforms and as the Devel/gcc package from the
-<<ChToolsCygwin,Cygwin setup>>.
+UNIX-like platforms.
If GCC isn't already installed or available
as a package for your platform, you can get it at:
should result in something like
----
-gcc (GCC) 3.4.4 (cygwin special) (gdc 0.12, using dmd 0.125)
-Copyright (C) 2004 Free Software Foundation, Inc.
+gcc (Ubuntu 4.9.1-16ubuntu6) 4.9.1
+Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
----
==== gdb (GNU project debugger)
GDB is the debugger for the GCC compiler. It is
-available for many (if not all) UNIX-like platforms and as
-the Devel/gdb package from the
-<<ChToolsCygwin,Cygwin setup>>
+available for many (if not all) UNIX-like platforms.
If you don't like debugging using the command line
there are some GUI frontends for it available, most notably
should result in something like:
----
-GNU gdb 6.5.50.20060706-cvs (cygwin-special)
-Copyright 2003 Free Software Foundation, Inc.
-GDB is free software, covered by the GNU General Public License, and you are
-welcome to change it and/or distribute copies of it under certain conditions.
-Type "show copying" to see the conditions.
-There is absolutely no warranty for GDB. Type "show warranty" for details.
-This GDB was configured as "i686-pc-cygwin".
+GNU gdb (Ubuntu 7.8-1ubuntu4) 7.8.0.20141001-cvs
+Copyright (C) 2014 Free Software Foundation, Inc.
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law. Type "show copying"
+and "show warranty" for details.
+This GDB was configured as "x86_64-linux-gnu".
+Type "show configuration" for configuration details.
+For bug reporting instructions, please see:
+<http://www.gnu.org/software/gdb/bugs/>.
+Find the GDB manual and other documentation resources online at:
+<http://www.gnu.org/software/gdb/documentation/>.
+For help, type "help".
+Type "apropos word" to search for commands related to "word".
----
Your version string may vary, of course.
The GNU Data Display Debugger is a good GUI frontend
for GDB (and a lot of other command line debuggers), so you
have to install GDB first. It is available for many UNIX-like
-platforms and as the ddd package from the
-<<ChToolsCygwin,Cygwin setup>>.
+platforms.
If GNU DDD isn't already installed or
available as a package for your platform, you can get it at:
should result in something like:
----
-GNU Make 3.81
-Copyright (C) 2006 Free Software Foundation, Inc.
-This is free software; see the source for copying conditions.
-There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
-PARTICULAR PURPOSE.
+GNU Make 4.0
+Built for x86_64-pc-linux-gnu
+Copyright (C) 1988-2013 Free Software Foundation, Inc.
+Licence GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
----
Your version string may vary, of course.
. Linker (`link.exe`)
-. Make (`nmake.exe`)
-
. C runtime headers and libraries (e.g. 'stdio.h', 'msvcrt.lib')
. Windows platform headers and libraries (e.g.
==== Toolchain Package Alternatives
-The Wireshark 1.99.x releases are compiled using Microsoft Visual $$C++$$ 2013.
+The Wireshark 2.0.x releases are compiled using Microsoft Visual $$C++$$ 2013.
The official Wireshark 1.12.x and 1.10.x releases are compiled using
Microsoft Visual $$C++$$ 2010 SP1.
The official 1.8 releases were compiled using
SDK required for 64-bit builds?:: No
-config.nmake MSVC_VARIANT:: MSVC2013
+CMake Generator: `Visual Studio 12`
.Visual C++ 2010 Express Edition
SDK required for 64-bit builds?:: Yes.
-config.nmake MSVC_VARIANT:: MSVC2010EE
+CMake Generator: `Visual Studio 10`
Remarks:: Installers created using express editions require a $$C++$$ redistributable
'$$vcredist_x86.exe$$' (3MB free
SDK required for 64-bit builds?:: No
-config.nmake MSVC_VARIANT:: MSVC2010
+CMake Generator: `Visual Studio 10`
Remarks:: Building a 64-bit installer
requires a a $$C++$$ redistributable
You can use Chocolatey to install Visual Studio, e.g:
----
-PS:\> cinst VisualStudioCommunity2013
+PS:\> choco install VisualStudioCommunity2013
----
==== cl.exe (C Compiler)
Documentation on the compiler can be found at
http://msdn.microsoft.com/en-us/library/wk21sfcf.aspx[Microsoft MSDN]
-[[ChToolsNMake]]
-
-==== nmake.exe (Make)
-
-Nmake is part of the toolchain packages described
-above.
-
-Instead of using the workspace (.dsw) and projects (.dsp) files, the traditional
-nmake makefiles are used. This has one main reason: it makes it much easier to
-maintain changes simultaneously with the GCC toolchain makefile.am files as both
-file formats are similar. However, as no Visual Studio workspace/project files
-are available, this makes it hard to use the Visual Studio IDE e.g. for using
-the integrated debugging feature.
-
-After correct installation, typing at the Visual Studio Command line prompt (cmd.exe):
-
-----
-> nmake
-----
-
-should result in something like:
-
-----
-Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
-Copyright (C) Microsoft Corporation. All rights reserved.
-
-NMAKE : fatal error U1064: MAKEFILE not found and no target specified
-Stop.
-----
-
-However, the version string may vary.
-
-Documentation on nmake can be found at
-http://msdn.microsoft.com/en-us/library/dd9y37ha.aspx[Microsoft MSDN]
-
==== link.exe (Linker)
After correct installation, typing at the Visual Studio Command line prompt (cmd.exe):
In all cases where '$$vcredist_x86.exe$$' or '$$vcredist_x64.exe$$' is
downloaded it should be downloaded to the directory into which the support
libraries for Wireshark have been downloaded and installed. This directory is
-specified by the WIRESHARK_LIB_DIR setting in the 'config.nmake'. By default it
-is 'C:\Development\wireshark-win32-libs'. It need not, and should not, be run after being
-downloaded.
+specified by the WIRESHARK_BASE_DIR or WIRESHARK_LIB_DIR environment variables.
+It need not, and should not, be run after being downloaded.
===== msvcr120.dll / vcredist_x86.exe / vcredist_x64.exe - Version 12.0 (2013)
online help. Both files are part of the SDK (standalone (P)SDK or MSVC
since 2002).
-Simply set HHC_DIR in 'config.nmake' to use it.
-
[[ChToolsDebugger]]
==== Debugger
===== Visual Studio integrated debugger
You can use the integrated debugger of Visual Studio if your toolchain includes
-it. However, setting up the environment is a bit tricky, as the Windows build
-process uses makefiles instead of the .dsp/.dsw files usually used.
+it. Open the solution in your build directory and build and debug as normal with a
+Visual Studio solution.
-****
-This section not yet written
-****
+The normal build is an optimised release version so debugging can be a bit
+difficult as variables are optimised out into registers and the execution
+order of statements can jump around.
+
+If you require a non-optimised version, then build using a debug configuration.
[[ChToolsMSDebuggingTools]]
debugging with the Visual Studio integrated debugger it can be helpful if you
have to debug on a machine where an integrated debugger is not available.
-You can get it free of charge from Microsoft in several ways, see the http://msdn.microsoft.com/en-us/library/windows/hardware/ff551063%28v=vs.85%29.aspx)[Debugging tools for Windows] page.
+You can get it free of charge from Microsoft in several ways, see the
+http://msdn.microsoft.com/en-us/library/windows/hardware/ff551063%28v=vs.85%29.aspx)[Debugging tools for Windows] page.
You can also use Chocolatey to install WinDbg:
----
-PS:\> cinst windbg
+PS:\> choco install windbg
----
+To debug Wireshark using WinDbg, open the built copy of Wireshark using
+the File -> Open Executable... menu,
+i.e. C:\Development\wsbuild32\run\RelWithDebInfo\Wireshark.exe. To set a
+breakpoint open the required source file using the File -> Open Source File...
+menu and then click on the required line and press F9. To run the program,
+press F5.
+
+If you require a non-optimised version, then build using a debug configuration, e.g.
+`msbuild /m /p:Configuration=Debug Wireshark.sln`. The build products will be found
+in C:\Development\wsbuild32\run\RelWithDebInfo\.
+
[[ChToolsBash]]
=== bash
You can also use Chocolatey to install Python:
----
-PS:\> cinst Python2
+PS:\> choco install Python2
----
-You can verify your Python version by running
+Chocolatey installs Python 2 into 'C:\tools\python2' by default. You can
+verify your Python version by running
----
$ python --version
on UNIX and Linux and
----
+rem Official package
C:> cd python27
C:Python27> python --version
+
+rem Chocolatey
+C:> cd \tools\python2
+C:\tools\python2> python --version
----
on Windows. You should see something like
----
-Python 2.7.3
+Python 2.7.9
----
Your version string may vary of course.
However, the version string may vary.
-[[ChToolsWindowsPerl]]
-
-==== Windows native: Perl
-
-A native Windows Perl package can be obtained from
-http://www.ActiveState.com[Active State] or http://strawberryperl.com/[Strawberry Perl]. The installation
-should be straightforward.
-
-You may also use Chocolatey to install either package:
-
-----
-PS:\> cinst ActivePerl
-----
-
-or
-
-----
-PS:\> cinst StrawberryPerl
-----
-
-After correct installation, typing at the command
-line prompt (cmd.exe):
-
-----
-> perl -v
-----
-
-should result in something like:
-
-----
-This is perl, v5.8.0 built for MSWin32-x86-multi-thread
-(with 1 registered patch, see perl -V for more detail)
-
-Copyright 1987-2002, Larry Wall
-
-Binary build 805 provided by ActiveState Corp. http://www.ActiveState.com
-Built 18:08:02 Feb 4 2003
-...
-----
-
-However, the version string may vary.
+//[[ChToolsWindowsPerl]]
+//
+//==== Windows native: Perl
+//
+//A native Windows Perl package can be obtained from
+//http://www.ActiveState.com[Active State] or http://strawberryperl.com/[Strawberry Perl]. The installation
+//should be straightforward.
+//
+//You may also use Chocolatey to install either package:
+//
+//----
+//PS:\> choco install ActivePerl
+//----
+//
+//or
+//
+//----
+//PS:\> choco install StrawberryPerl
+//----
+//
+//After correct installation, typing at the command
+//line prompt (cmd.exe):
+//
+//----
+//> perl -v
+//----
+//
+//should result in something like:
+//
+//----
+//This is perl, v5.8.0 built for MSWin32-x86-multi-thread
+//(with 1 registered patch, see perl -V for more detail)
+//
+//Copyright 1987-2002, Larry Wall
+//
+//Binary build 805 provided by ActiveState Corp. http://www.ActiveState.com
+//Built 18:08:02 Feb 4 2003
+//...
+//----
+//
+//However, the version string may vary.
[[ChToolsSed]]
Sed is available for most of the UNIX-like platforms
and as the sed package from the
-<<ChToolsCygwin,Cygwin setup>>.
+<<ChToolsCygwin,Cygwin setup>>. It is also available via Chocolatey:
+
+// XXX Is sed part of the base Cygwin install?
+
+----
+PS$>cyg-get sed
+----
If sed isn't already installed or available
as a package for your platform, you can get it at
A native Windows sed package can be obtained from
http://gnuwin32.sourceforge.net/[]. The
-installation should be straightforward.
+installation should be straightforward. A Chocolatey package
+(devbox-sed) is available but has not been tested.
[[ChToolsBison]]
`win_flex`.
----
-PS:\>cinst winflexbison
+PS:\>choco install winflexbison
----
Native packages are available from other sources such as
http://git-scm.com/download/win[] and can also be installed using Chocolatey:
----
-PS:\> cinst git
+PS:\> choco install git
----
After correct installation, typing at the command
copy status. You can install it using Chocolatey:
----
-PS:\>cinst poshgit
+PS:\>choco install poshgit
----
[[ChToolsGitGUI]]
==== Windows native: patch
-The Windows native Git tools provide patch. A native Windows patch package can be obtained from
+The Windows native Git tools provide patch. A native Windows patch package can be obtained from
http://gnuwin32.sourceforge.net/[]. The
installation should be straightforward.
-[[ChToolsWget]]
-
-=== Windows: GNU wget (optional)
-
-GNU wget is used to download files from the internet using the command line.
-
-GNU wget is available for most of the UNIX-like platforms and as the wget
-package from the <<ChToolsCygwin,Cygwin setup>> and also using Chocolatey:
-
-----
-PS$> cinst Wget
-----
-
-You will only need wget, if you want to use the Windows automated library
-download, see <<ChLibsSetup>>for details.
-
-If GNU wget isn't already installed or available as a package for your platform
-(well, for Windows it is available as a Cygwin package), you can get it at
-http://www.gnu.org/software/wget/wget.html[].
-
-If wget is trying to download files but fails to do so, your Internet connection
-might use an HTTP proxy. Some Internet providers use such a proxy and it is
-common in many company networks today. Wireshark's setup script will try to
-discover your proxy settings automatically, but you may need to set the
-environment variable 'HTTP_PROXY' by hand before using wget. For example, if you
-are behind proxy.com which is listening on port 8080, you have to set it to
-something like:
-
-----
-set HTTP_PROXY=http://proxy.com:8080/
-----
-
-If you are unsure about the settings, you might ask your system administrator.
-
-[[ChToolsUnzip]]
-
-=== Windows: GNU unzip (optional)
-
-GNU unzip is used to, well, unzip the zip files downloaded using the wget tool.
-
-GNU unzip is available for most of the UNIX-like platforms and as the unzip
-package from the <<ChToolsCygwin,Cygwin setup>>.
-
-You will only need unzip, if you want to use the Windows automated library
-download, see <<ChLibsSetup>>for details.
-
-If GNU unzip isn't already installed or available as a package for your platform
-(well, for Windows it is available as a Cygwin package), you can get it at
-http://gnuwin32.sourceforge.net/packages/unzip.htm[].
-
[[ChToolsNSIS]]
=== Windows: NSIS (optional)
needed to be installed, including all required DLLs, plugins, and supporting
files.
-To install it, simply download the latest released version (currently 2.46)
-from http://nsis.sourceforge.net[] and start the downloaded installer. You will
-need NSIS version 2. Version 3 is not yet supported.
+To install it, download the latest released version (currently 2.46) from
+http://nsis.sourceforge.net[] and start the downloaded installer. You will
+need NSIS version 2. Version 3 is not yet supported. You can also install it
+using Chocolatey:
+
+----
+PS$> choco install nsis
+----
You can find more instructions on using NSIS in <<ChSrcNSIS>>.
To install it, do the following:
* Download the latest PortableApps.com Platform release from
- http://portableapps.com/[]. `config.nmake` uses the ``Local
- All Users'' install location (`C:`) by default.
+ http://portableapps.com/[].
* Install the following applications in the PortableApps.com environment: