WSDG: Update the Windows docs and add a CMake section.

Update the Windows section for Visual Studio 2015. Copy the content from
README.cmake to its own WSDG section and remove README.cmake.

Remove the PowerShell sections. Our required version (2.0) ships with
every supported version of Windows. Remove the sed section.

Change-Id: Id37c6e71bacc247a3ed1992adb1408ec13f6a187
Reviewed-on: https://code.wireshark.org/review/22940
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
Gerald Combs 2017-08-04 13:53:14 -07:00
parent 1cabeea9b8
commit cdeb6f122a
5 changed files with 163 additions and 395 deletions

View File

@ -871,7 +871,6 @@ EXTRA_DIST = \
CMakeListsCustom.txt.example \
cmakeconfig.h.in \
CMakeOptions.txt \
README.cmake \
ConfigureChecks.cmake \
cmake \
CPackConfig.txt

View File

@ -1,217 +0,0 @@
Explain the cmake build system for wireshark
Notice
To find out the current state of the cmake implementation for
Wireshark, please take a look at "What needs to be done?" below.
Table of contents
=================
How to get started with cmake (Unix/Linux and Win32/64)?
Why cmake?
Why not cmake?
What needs to be done?
Links regarding cmake
How to get started with cmake (Unix/Linux and Win32/64)?
========================================================
You can find documentation on cmake at: http://www.cmake.org/
cmake is designed to support out of tree builds. So much so, that
in tree builds do not work properly in all cases.
How to do out of tree build (Unix/Linux):
1) Install cmake.
2) Assuming, you are in the top directory of the wireshark source
cd ..
3) mkdir build
4) cd build
5) cmake [options] ../<Name_of_WS_source_dir>
6) make (or cmake --build .)
7) (as root) umask 0022 && make install
Note 1:
In step 5) you may need to override the defaults for features. Common
options include:
# Disable the POSIX capabilities check
-DENABLE_CAP=OFF
# Enable debugging symbols
-DCMAKE_BUILD_TYPE=Debug
# Disable GTK+ 3
-DENABLE_GTK3=OFF
# Build documentation
-DENABLE_HTML_GUIDES=ON
-DENABLE_PDF_GUIDES=ON
# Make ccache and clang work together
-DCMAKE_C_FLAGS='-Qunused-arguments'
# Force Python path on Windows. May be needed if Cygwin's
# /usr/bin/python is present and is a symlink
# http://public.kitware.com/Bug/view.php?id=13818
-DPYTHON_EXECUTABLE=c:/Python27/python
# Disable building an application bundle (Wireshark.app) on macOS
-DENABLE_APPLICATION_BUNDLE=OFF
# Qt Creator expects .cbp files when used with CMake.
-G "CodeBlocks - Unix Makefiles"
-G "CodeBlocks - NMake Makefiles"
# We call try_compile many times, particularly via ConfigureChecks.cmake.
# Setting a lightweight try_compile configuration can speed up cmake,
# particularly for MSBuild.
-DCMAKE_TRY_COMPILE_CONFIGURATION=Release
You can list all build variables (with help) using
cmake -LH [options] ../<Name_of_WS_source_dir>
This lists the cache of build variables after the cmake run.
To only view the current cache, add option -N.
Note 2:
After running cmake, you can always run "make help" to see
a list of all possible make targets.
Note 3:
Cmake honors user umask for creating directories as of now:
http://public.kitware.com/Bug/view.php?id=9620
To get predictable results please set umask explicitly.
How to do an out of tree build using Visual C++ 2013:
[This is used for the 2.x release builds, support for VS2010 and VS2012
is included, but hasn't been tested.]
0) Install cmake (currently 3.1.3 or later is recommended). You can use chocolatey,
choco inst cmake.
1) Follow https://www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.html
Steps 1-9
1a) Set the library search path.
If you set WIRESHARK_BASE_DIR,
%WIRESHARK_BASE_DIR%\wireshark-%WIRESHARK_TARGET_PLATFORM%-libs will
be used as the top-level library directory.
If you set WIRESHARK_LIB_DIR, it will be used as the top-level library
directory. This definition will require changing for different builds (x86 & x64).
1b) set WIRESHARK_TARGET_PLATFORM=win32 (or win64)
1c) set QT5_BASE_DIR=C:\Qt\5.4.1\5.4\msvc2013_opengl (must match the Qt component path
on your system)
1d) If you want to use Visual Studio to build rather than msbuild from the command line,
make sure that the path to Cygwin is available to GUI applications.
2) mkdir c:\wireshark\build or as appropriate for you.
You will need one build directory for each bitness (win32, win64) you wish to build.
3) cd into the directory from 2) above.
4) Run the following to generate the build files:
cmake -DENABLE_CHM_GUIDES=on xxx path\to\sources
where path\to\sources is the absolute or relative path to the wireshark source tree
and xxx is replaced with one of the following:
nothing - This will build a VS solution for win32 using the latest version of VS found (preferred).
-G "Visual Studio 12" ("12" builds for VS2013. Use "11" for VS2012 or "10" for VS2010.)
-G "NMake Makefiles" - to build an nmake makefile.
-G "Visual Studio 12 Win64" (to build an x64 version you must add the "Win64", Win32 is the default)
5) Run one of the following to build Wireshark:
msbuild /m /p:Configuration=RelWithDebInfo wireshark.sln (preferred).
Open Wireshark.sln in Windows Explorer to build in Visual Studio
nmake /X- VERBOSE=1 (or cmake --build . -- VERBOSE=1 ) (if you generated nmake files).
Subsequent changes to source files and CMakeLists.txt will be automagically detected
and new build files generated, i.e. step 4) doesn't need to be run again.
Changes to the build environment, e.g. QT_BASE_DIR aren't detected so you must delete the
build dir and start form step 2) again.
6) The executables can be run from the appropriate directory, e.g. run\RelWithDebInfo for VS solutions
or run\ for NMake files.
On macOS CMake creates an application bundle by default and places executables in
run/Wireshark.app/Contents/MacOS. It also creates a convenience wrapper script
(run/wireshark) which will run the Wireshark executable in the bundle.
7) To build an installer, build the nsis_package_prep and then the nsis_package projects, e.g.
msbuild /m /p:Configuration=RelWithDebInfo nsis_package_prep.vcxproj
msbuild /m /p:Configuration=RelWithDebInfo nsis_package.vcxproj
nmake ???
Why cmake?
==========
- Can create project files for many IDEs including Qt Creator, Visual Studio,
and XCode.
- Fast, builds in parallel in Visual Studio or msbuild with the /m flag
- Easier to understand/learn
- Doesn't create any files in the source tree in case of out of tree builds
- One build infrastructure for all of our tier 1 platforms (including Windows)
- Out of tree builds permits both Win32 and Win64 builds without requiring a "clean" when swapping.
Why not cmake?
==============
- Lots of work to do
- Everyone who wants to build from source needs cmake
- Current state of documentation isn't really better than
Autotools documentation. In some respects it's even worse
(you need to buy a book to get an explanation as to how
cmake really works).
...
What works?
===========
All the executables now build from clean source on:
* 32 bit openSUSE 11.3: (gnu)make and gcc
* 64 bit FedoraXXX
* 32 bit Ubuntu 9.04
* 32 bit Ubuntu 10.04
* 64 bit Ubuntu 14.04
* 64 bit Debian Wheezy
* 32 bit Mac OS X
* 64 bit {Mac} OS X/macOS
* 32 bit Windows using Visual C++ 2013
* 64 bit Windows using Visual C++ 2013
* 64 bit Solaris 10
The Buildbot runs CMake steps on Ubuntu, Win32, Win64, macOS, and Solaris.
Windows packages are built using CMake steps.
What needs to be done?
======================
- Add back platform specific objects.
- Fix places in the cmake files marked as todo.
- Guides are not installed.
- Build source package (using CPack).
This is obsolete if we decide to release VCS snapshots instead
- Build packages using CPack: tarball, Windows installer + PortableApps, macOS
installer dmg, RPM, SVR4. This includes setting OS target version stuff
appropriately for macOS. We currently use NSIS for the Windows installer but
should probably use WiX instead.
- Add support for cmake configurations.
- Get cross-compilation working (or ensure it does). It works with autofoo--and
people use it.
- Handle -DFORTIFY_SOURCE=2 appropriately. (Do a Web search for
"cmake fortify" for some information.)
- Define the GTK_DISABLE_ and GDK_DISABLE_ values as appropriate if we
care about supporting the GTK+ version.
...
Links regarding cmake
=====================
The home page of the cmake project
http://www.cmake.org/
The home page of the cmake project documentation
http://www.cmake.org/Wiki/CMake
About cmake in general and why KDE4 uses it
http://lwn.net/Articles/188693/
Introductory/tutorial presentation
http://ait.web.psi.ch/services/linux/hpc/hpc_user_cookbook/tools/cmake/docs/Cmake_VM_2007.pdf
Introductory article in Linux Journal
http://www.linuxjournal.com/node/6700/print
Useful variables
http://www.cmake.org/Wiki/CMake_Useful_Variables
cmake FAQ
http://www.cmake.org/Wiki/CMake_FAQ
Additional cmake modules
http://code.google.com/p/cmake-modules/

View File

@ -7,7 +7,7 @@ This directory contains the source files needed to build the:
- Release notes (NEWS)
- Lua Reference
To build everything, just run `make` (for Windows see README.cmake).
To build everything, just run `make` or `msbuild all_guides.vcxproj`.
Requirements are listed below.
The guides and release notes are written in AsciiDoc (http://asciidoc.org),
@ -261,4 +261,4 @@ migrate to AsciiDoctor. To do so we'd have to do the following at a minimum:
support hexadecimal ones:
https://github.com/asciidoctor/asciidoctorj/issues/439
- Choose a "compat" mode: http://asciidoctor.org/docs/migration/
- Choose a "compat" mode: http://asciidoctor.org/docs/migration/

View File

@ -42,19 +42,6 @@ Known traps are:
====
[[ChSetupPowerShell]]
==== Install PowerShell
PowerShell 2.0 or later is required for building Wireshark and the NSIS package.
Windows 7 and later include compatible versions. It is also required by
Chocolatey.
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[]
[[ChSetupChocolatey]]
==== Optional: Install Chocolatey
@ -78,21 +65,20 @@ You need to install, in exactly this order:
. C compiler:
http://go.microsoft.com/?linkid=9863608[Download]
and install "Microsoft Visual Studio 2013 Community Edition." This is a small download that then downloads all the other required parts (which are quite large).
and install "Microsoft Visual Studio 2015 Community Edition." This is a small download that then downloads all the other required parts (which are quite large).
Uncheck all the optional components (unless you want to use them for purposes other than Wireshark).
You can use Chocolatey to install Visual Studio:
----
PS$>choco install VisualStudioCommunity2013
PS$>choco install VisualStudioCommunity2015
----
You can use other Microsoft C compiler variants, but VS2013 is used
to build the development releases and is the preferred option.
It's possible to compile Wireshark with a wide range
of Microsoft C compiler variants. For details see
<<ChToolsMSChain>>.
You can use other Microsoft C compiler variants, but VS2015 is used to
build the development releases and is the preferred option. It's
possible to compile Wireshark with a wide range of Microsoft C compiler
variants. For details see <<ChToolsMSChain>>.
You may have to do this as Administrator.
@ -107,9 +93,9 @@ of Visual Studio add more cross-platform support.
// required components
Why is this recommended? While this is a huge download,
Visual Studio 2013 Community Edition is the only free (as in beer)
Visual Studio 2015 Community Edition is the only free (as in beer)
versions that includes the Visual Studio integrated
debugger. Visual Studio 2013 is also used to create official
debugger. Visual Studio 2015 is also used to create official
Wireshark builds, so it will likely have fewer development-related
problems.
@ -157,21 +143,22 @@ sure it doesn't install Visual Studio 2010 SP1 out of order.
The main Wireshark application uses the Qt windowing toolkit. To install
Qt download the *Qt Online Installer for Windows* from the Qt Project
https://www.qt.io/download-open-source/["Download Open Source" page] and
select a component that matches your target system and compiler. For example,
the ``msvc2013 64-bit'' component is used to build the official 64-bit packages.
select a component that matches your target system and compiler. For
example, the ``msvc2015 64-bit'' component is used to build the official
64-bit packages.
Note that separate installations (into different directories) of Qt
are required for 32 bit and 64 bit builds. The environment variable
Note that separate installations (into different directories) of Qt are
required for 32 bit and 64 bit builds. The environment variable
`QT5_BASE_DIR` should be set as appropriate for your environment and
should point to the Qt directory that contains the bin directory, e.g.
`C:\Qt\5.6\msvc2013_64`
`C:\Qt\5.9.2\msvc2015_64`
[[ChSetupCygwin]]
==== Install Cygwin
On 32-bit Windows, http://www.cygwin.com/setup-x86.exe[download the
32-bit Cygwin installer] and start it. On 64-bit Windows,
32-bit Cygwin installer] and start it. On 64-bit Windows,
http://www.cygwin.com/setup-x86_64.exe[download the 64-bit Cygwin
installer] and start it.
@ -181,8 +168,6 @@ Navigate to the required Category/Package row and, if the package
has a "Skip" item in the "New" column, click on the "Skip" item
so it shows a version number for:
* Archive/unzip (not needed if using CMake)
* Devel/bison (or install Win flex-bison - see Chocolatey below)
* Devel/flex (or install Win flex-bison - see Chocolatey below)
@ -212,10 +197,6 @@ After clicking the Next button several times, the setup
will then download and install the selected packages (this
may take a while).
Why is this recommended? Cygwin's bash version is required, as no native Win32
version is available. As additional packages can easily be added, Perl and
other packages are also used.
Alternatively you can install Cygwin and its packages using Chocolatey:
----
@ -380,10 +361,8 @@ Make sure your repository path doesn't contain spaces.
==== Open a Visual Studio Command Prompt
From the Start Menu (or Start Screen), navigate to the Visual Studio 2013 ->
Visual Studio Tools directory and choose the Command Prompt appropriate for
the build you wish to make, e.g. VS2013 x86 Native Tools Command Prompt for a 32-bit version,
VS2013 x64 Native Tools Command Prompt for a 64-bit version.
From the Start Menu (or Start Screen), navigate to the `Visual Studio 2015 ->
Visual Studio Tools' directory and choose `Developer Command Prompt for VS2015'.
[TIP]
.Pin the items to the Task Bar
@ -399,18 +378,24 @@ All subsequent operations take place in this Command Prompt window.
Set the following environment variables, using paths and values suitable for your installation:
----
> set CYGWIN=nodosfilewarning
> set WIRESHARK_BASE_DIR=C:\Development or set WIRESHARK_LIB_DIR to the appropriate library directory for your build.
> set WIRESHARK_TARGET_PLATFORM=win32 or win64 as required
> set QT5_BASE_DIR=C:\Qt\5.6\msvc2013_64
> rem Populate the VS build environment. Default is x86.
> "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64
> rem Set the library download directory using WIRESHARK_LIB_DIR...
> set WIRESHARK_LIB_DIR=c:\wireshark-win64-libs
> rem ...or by using WIRESHARK_BASE_DIR
> set WIRESHARK_BASE_DIR=C:\Development
> rem Set the Qt installation directory
> set QT5_BASE_DIR=C:\Qt\5.9.2\msvc2015_64
> rem Append a custom string to the package version. Optional.
> set WIRESHARK_VERSION_EXTRA=-YourExtraVersionInfo
----
If your Cygwin installation path is not automatically detected by CMake, you can explicitly specify it with the following
environment variable:
If your Cygwin installation path is not automatically detected by CMake,
you can explicitly specify it with the following environment variable:
----
> set WIRESHARK_CYGWIN_INSTALL_PATH=c:\cygwin or whatever other path that is applicable to your setup
> rem Chocolatey installs Cygwin in an odd location
> set WIRESHARK_CYGWIN_INSTALL_PATH=C:\ProgramData\chocolatey\lib\Cygwin\tools\cygwin
----
If you are using a version of Visual Studio earlier than VS2012 then you must set an additional env var,
@ -418,13 +403,14 @@ e.g. for VS2010 set the following:
----
> set VisualStudioVersion=10.0
----
Setting these variables could be added to a batch file to be run after you open
the Visual Studio Tools Command Prompt.
[TIP]
====
Qt 5.6 is a "long term support" branch of Qt5. We recommend using it
to compile Wireshark on Windows.
Qt 5.9 is a "long term support" branch of Qt5. We recommend using it to
compile Wireshark on Windows.
====
--
@ -461,17 +447,19 @@ If you've closed the Visual Studio Command Prompt <<ChSetupPrepareCommandCom,pre
To generate the build files enter the following at the Visual Studio command prompt:
----
> cmake -DENABLE_CHM_GUIDES=on -G "Visual Studio 12" ..\wireshark
> cmake -DENABLE_CHM_GUIDES=on -G "Visual Studio 14 2015" ..\wireshark
----
Adjusting the paths as required to Python and the wireshark source tree. To use a different generator
modify the -G parameter, cmake -G lists all the CMake supported generators, but only Visual Studio is
supported for Wireshark builds.
Adjusting the paths as required to Python and the wireshark source tree.
To use a different generator modify the `-G` parameter. `cmake -G` lists
all the CMake supported generators, but only Visual Studio is supported
for Wireshark builds.
To build an x64 version, the -G parameter must have a Win64 suffix, e.g. -G "Visual Studio 12 Win64", e.g.
To build an x64 version, the `-G` parameter must have a Win64 suffix,
e.g. `-G "Visual Studio 14 2015 Win64"`:
----
> cmake -DENABLE_CHM_GUIDES=on -G "Visual Studio 12 Win64" ..\wireshark
> cmake -DENABLE_CHM_GUIDES=on -G "Visual Studio 14 2015 Win64" ..\wireshark
----
The CMake generation process will download the required 3rd party libraries (apart from Qt)
@ -485,8 +473,8 @@ At the end of the CMake generation process the following should be displayed:
----
If you get any other output, there is an issue in your envirnment that must be rectified before building.
Check the parameters passed to CMake, especially the -G option and the path to the Wireshark sources and
the environment variables WIRESHARK_BASE_DIR, WIRESHARK_TARGET_PLATFORM and QT5_BASE_DIR.
Check the parameters passed to CMake, especially the `-G` option and the path to the Wireshark sources and
the environment variables WIRESHARK_BASE_DIR and QT5_BASE_DIR.
[[ChWin32Build]]
@ -509,8 +497,6 @@ to build Wireshark.
. For the Qt version run `C:\Development\wsbuild32\run\RelWithDebInfo\Wireshark.exe` and make sure it starts.
. For the older GTK version run `C:\Development\wsbuild32\run\RelWithDebInfo\wireshark-gtk.exe`.
. Open 'Help -> About'. If it shows your "private" program
version, e.g.: Version {wireshark-version}-myprotocol123
congratulations! You have compiled your own version of Wireshark!

View File

@ -48,22 +48,10 @@ toolname`.
You will find explanations of the tool usage for some of the specific
development tasks in <<ChapterSources>>.
[[ChToolsWindowsPowerShell]]
=== Windows 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
Chocolatey is a Windows package manager that can be used to install (and update)
many of the packages required for Wireshark development. Chocolatey can be
many of the packages required for Wireshark development. Chocolatey can be
obtained from the http://chocolatey.org[website] or from a DOS command prompt:
----
@ -76,6 +64,10 @@ or a Powershell prompt:
PS:\>iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
----
Chocolatey sometimes installs packages in unexpected locations. Cygwin is a notable
example -- recent versions of the Cygwin package are installed in `C:\ProgramData\chocolatey\lib\Cygwin\tools\cygwin` instead of Cygwin's default location
(`C:\cygwin` or `C:\cygwin64`).
[[ChToolsCygwin]]
=== Windows: Cygwin
@ -86,41 +78,34 @@ but at an acceptable level. The installation and update is pretty easy and done
through a single utility, 'setup-x86.exe' for 32-bit Windows and
'setup-x86_64.exe' for 64-bit Windows.
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 individually.
[NOTE]
.You must have Cygwin installed
====
As there's no Windows native bash version available, at least a basic installation
of Cygwin is required in any case. This may change in the future as packaging
systems such as NuGet and Chocolatey mature.
====
Over time the Wireshark development toolchain has been migrating away from Cygwin
toward native tools and we hope to eliminate it as a requirement someday.
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.
Alternatively you can install Cygwin and its packages using Chocolatey.
You can install Cygwin and its packages using Chocolatey, but this is not
recommended due to Chocolatey's default installation location, described
in the previous section.
==== 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
http://www.cygwin.com/install.html[]. Click on the link for the
appropriate setup utility to download it. After the download completes,
http://www.cygwin.com/install.html[]. Click on the link for the
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'.
All tools will be installed into one base folder. The default is
'C:\cygwin' for the 32-bit installer and `C:\cygwin64` for the 64-bit
installer.
The setup utility will ask you for some settings. The defaults
should usually work well, at least initially.
If, at the "Choose A Download Source" page, you use the default "Install
from Internet" setting, you will need to choose a download site at the
"Choose A Download Site" page. See the list of mirror sites at
"Choose A Download Site" page. See the list of mirror sites at
http://cygwin.com/mirrors.html[] to choose a download site appropriate
to your location.
@ -170,7 +155,7 @@ PS$>choco install cygwin
PS$>choco install cyg-get
----
Chocolatey installs Cygwin in 'C:\tools\cygwin' by default.
Chocolatey installs Cygwin in 'C:\ProgramData\chocolatey\lib\Cygwin\tools\cygwin' by default.
One or more Cygwin packages can be installed using "cyg-get":
@ -211,6 +196,81 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Your version string may vary, of course.
[[ChToolsCMake]]
Wireshark's build environment can be configured using CMake on Windows
and either CMake or Autotools on Linux, macOS, and UNIX. CMake is designed
to support out of tree builds. So much so, that in tree builds do not work
properly in all cases. Along with being cross-platform, CMake supports
many build tools and environments including traditional make, Ninja, and
MSBuild. Our Buildbot runs CMake steps on Ubuntu, Win32, Win64, and macOS.
In particular, the macOS and Windows packages are built using CMake.
Building with CMake typically includes creating a build directory and
specifying a *generator*, aka a build tool. For example, to build
Wireshark using Ninja in the directory `wireshark-ninja` you might
run the following commands:
----
# Starting from your Wireshark source directory, create a build directory
# alongside it.
$ cd ..
$ mkdir wsbuild
$ cd wsbuild
# Assumes your source directory is named "wireshark".
$ cmake -G Ninja ../wireshark
$ ninja (or cmake --build .)
----
Using CMake on Windows is described further in <<ChWin32Generate>>.
Along with specifying a generator with the `-G` flag you can set variables
using the `-D` flag. Useful variables and generators include the following:
-DENABLE_CAP=OFF:: Disable the POSIX capabilities check
-DCMAKE_BUILD_TYPE=Debug:: Enable debugging symbols
-DENABLE_GTK3=ON:: Enable GTK+ 3
-DENABLE_HTML_GUIDES=ON -DENABLE_PDF_GUIDES=ON:: Build documentation
-DCMAKE_C_FLAGS='-Qunused-arguments':: Make ccache and clang work together
-DPYTHON_EXECUTABLE=c:/Python27/python:: Force the Python path. Useful on Windows since Cygwin's /usrbin/python is a symlink.
-DENABLE_APPLICATION_BUNDLE=OFF:: Disable building an application bundle (Wireshark.app) on macOS
You can list all build variables (with help) using `cmake -LH [options]
../<Name_of_WS_source_dir>`. This lists the cache of build variables
after the cmake run. To only view the current cache, add option `-N`.
After running cmake, you can always run "make help" to see a list of all possible make targets.
Note that CMake honors user umask for creating directories as of now. You should set
the umask explicitly before running the `install` target.
CMake links:
The home page of the CMake project: http://www.cmake.org/
Official documentation: https://cmake.org/documentation/
About CMake in general and why KDE4 uses it: http://lwn.net/Articles/188693/
Introductory tutorial/presentation:
http://ait.web.psi.ch/services/linux/hpc/hpc_user_cookbook/tools/cmake/docs/Cmake_VM_2007.pdf
Introductory article in the Linux Journal:
http://www.linuxjournal.com/node/6700/print
Useful variables: http://www.cmake.org/Wiki/CMake_Useful_Variables
Frequently Asked Questions: http://www.cmake.org/Wiki/CMake_FAQ
// 2017-08-04 dead
//Additional cmake modules: http://code.google.com/p/cmake-modules/
[[ChToolsGDB]]
==== gdb (GNU project debugger)
@ -313,6 +373,8 @@ compiler, you'll need:
. Linker (`link.exe`)
. Resource Compiler (`rc.exe`)
. C runtime headers and libraries (e.g. 'stdio.h', 'msvcrt.lib')
. Windows platform headers and libraries (e.g.
@ -321,20 +383,20 @@ compiler, you'll need:
// Can we drop support for CHM?
. HTML help headers and libraries ('htmlhelp.h', 'htmlhelp.lib')
==== Toolchain Package Alternatives
==== Official Toolchain Packages And Alternatives
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
The official Wireshark 2.4.x releases are compiled using Microsoft Visual $$C++$$ 2015.
The Wireshark 2.2.x and 2.0.x releases are compiled using Microsoft Visual $$C++$$ 2013.
The Wireshark 1.12.x and 1.10.x releases were compiled using
Microsoft Visual $$C++$$ 2010 SP1.
The official 1.8 releases were compiled using
The 1.8 releases were compiled using
Microsoft Visual $$C++$$ 2010 SP1 as well.
The official 1.6, 1.4, and 1.2 releases were compiled using
The 1.6, 1.4, and 1.2 releases were compiled using
Microsoft Visual $$C++$$ 2008 SP1.
Other past releases, including the 1.0 branch,
were compiled using Microsoft Visual $$C++$$ 6.0.
Using the release
compilers is recommended for Wireshark development work.
Using the release compilers is recommended for Wireshark development work.
The older "Express
Edition" compilers such as Visual $$C++$$ 2010 Express Edition SP1 can be
@ -404,9 +466,10 @@ versions ordered by release date.
|===============
|Compiler Package|cl.exe|_MSC_VER|CRT DLL
|Visual Studio 2015|14.0|1900|msvcr140.dll
|Visual Studio 2013|12.0|1800|msvcr120.dll
|Visual Studio 2012|11.0|1700|msvcr110.dll
|Visual Studio 2010|10.0|1600|msvcr100.dll
|Visual Studio 2010 Express Edition
|===============
After correct installation of the toolchain, typing
@ -684,21 +747,15 @@ However, the version string may vary.
[[ChToolsWindowsBash]]
==== Windows native:
// MinGW? PowerShell?
****
This section not yet written
****
[[ChToolsPython]]
=== Python
Python is an interpreted programming language. The homepage of the Python
project is http://python.org/[]. It is used to generate some source files.
http://python.org/[Python] is an interpreted programming language. It is
used to generate some source files, documenation, and other tasks.
Python 2.5 or later (including Python 3) should work fine and Python 3.5 and
2.7 are recommended.
2.7 are recommended. If you're building documentation you must have Python
2 installed since AsciiDoc doesn't support Python 3.
Python is either included or available as a package on most UNIX-like platforms.
Windows packages and source are available at http://python.org/download/[].
@ -833,60 +890,8 @@ However, the version string may vary.
//
//However, the version string may vary.
[[ChToolsSed]]
=== sed
Sed it the streaming editor. It makes it easy for example
to replace text inside a source code file.
The Wireshark build process uses this to stamp version strings
in various places.
[[ChToolsUnixSed]]
==== UNIX and Cygwin: sed
Sed is available for most of the UNIX-like platforms
and as the sed package from the
<<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
http://directory.fsf.org/GNU/sed.html[]
After correct installation, typing at the
bash command line prompt:
----
$ sed --version
----
should result in something like:
----
GNU sed version 4.1.5
Copyright (C) 2003 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,
to the extent permitted by law.
----
However, the version string may vary.
[[ChToolsWindowsSed]]
==== Windows native: sed
A native Windows sed package can be obtained from
http://gnuwin32.sourceforge.net/[]. The
installation should be straightforward. A Chocolatey package
(devbox-sed) is available but has not been tested.
// Sed is no longer required.
//[[ChToolsSed]]
[[ChToolsBison]]
@ -986,21 +991,16 @@ officially supported but _should_ work.
=== Git client
The Wireshark project uses its own Git repository
to keep track of all the changes done to the source
code. Details about the usage of Git in the Wireshark
project can be found in
<<ChSrcGitRepository>>.
The Wireshark project uses its own Git repository to keep track of all
the changes done to the source code. Details about the usage of Git in
the Wireshark project can be found in <<ChSrcGitRepository>>.
If you want to work with the source code and are planning to
commit your changes back to the Wireshark community, it is
recommended to use a Git client to get the latest source files.
For detailed information about the different ways to obtain the
Wireshark sources, see
<<ChSrcObtain>>.
If you want to work with the source code and are planning to commit your
changes back to the Wireshark community, it is recommended to use a Git
client to get the latest source files. For detailed information about
the different ways to obtain the Wireshark sources, see <<ChSrcObtain>>.
You will find more instructions in
<<ChSrcGit>> on how to use the Git
You will find more instructions in <<ChSrcGit>> on how to use the Git
client.
[[ChToolsUnixGit]]