Commit Graph

568 Commits

Author SHA1 Message Date
Peter Wu fdef405782 cmake: fix "cmake -E env" compatibility with older CMake
"cmake -E env" was added in CMake 3.1, but we currently support 2.8.12
at minimum. Add a best-effort replacement for older versions. There are
some limitations from CMake (see comments), but these should not affect
the current user (FindAsciidoctor.cmake).

Change-Id: I56c92aa9ad42fb3950dbdfd955d4ff902111e0d7
Fixes: v2.5.1rc0-76-g94a0f7c641 ("Switch from AsciiDoc to Asciidoctor.")
Reviewed-on: https://code.wireshark.org/review/26658
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-03-27 21:11:37 +00:00
Gerald Combs 1915ce6133 CMake: Skip some header checks on Windows.
Skip some header checks on Windows when we're sure they will always
be true.

Change-Id: I4ff7c867b9268a53692085553055dcbc0f90ae1d
Reviewed-on: https://code.wireshark.org/review/26452
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-13 06:07:25 +00:00
Pascal Quantin 4e6d989df4 Add MaxMindDB 1.3.2 library to Windows
Change-Id: I328b6a05cc356be59ac63e80eae55a832bf76a47
Reviewed-on: https://code.wireshark.org/review/26347
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-03-09 11:20:41 +00:00
Dario Lombardo fdd426e410 spdx: more licenses converted.
Change-Id: Ia1650bc02511f7bd47fb90be91b623177f05bcbd
Reviewed-on: https://code.wireshark.org/review/26337
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-09 04:48:20 +00:00
Gerald Combs f52bb2bf27 CMake: Fixup our Chocolatey bin path discovery.
Search for choco.exe directly instead of using PATHS + PATH_SUFFIXES.
Look in %ChocolateyInstall%\bin first. CHOCOLATEY_BIN_PATH is the binary
path. There's no need to append /bin to it.

Change-Id: I732db398bd989bf12222a5cee2c79c0bd4161638
Reviewed-on: https://code.wireshark.org/review/26276
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-03-06 19:00:56 +00:00
Gerald Combs a1da75c554 Transition from GeoIP Legacy to MaxMindDB.
MaxMind is discontinuing its legacy databases in April in favor of
GeoIP2, which use a newer database format (MaxMind DB). The reference C
library (libmaxminddb) is available under the Apache 2.0 license which
isn't quite compatible with ours.

Add mmdbresolve, a utility that reads IPv4 and IPv6 addresses on stdin
and prints resolved information on stdout. Place it under a liberal
license (MIT) so that we can keep libmaxminddb at arm's length. Add
epan/maxmind_db.[ch], which spawns mmdbresolve and communicates with it
via stdio.

Migrate the preferences and documentation to MaxMindDB.

Change the IPv4 and IPv6 asnum fields to FT_UINT32s. Change the
geographic coordinate fields to FT_DOUBLEs.

Bug: 10658
Change-Id: I24aeed637bea1b41d173270bda413af230f4425f
Reviewed-on: https://code.wireshark.org/review/26214
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-03-06 18:02:21 +00:00
Gerald Combs b2d3680558 CMake: Remove FindSH.
We haven't used SH_EXECUTABLE since the Asciidoctor migration.

Change-Id: I93e8245ea02ed994ebb62942d5ea4ec890e35a97
Reviewed-on: https://code.wireshark.org/review/26277
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-03-06 18:00:42 +00:00
Gerald Combs f5cd52c0fb Docs: Reduce our TOC depth.
Reduce the TOC depth so that it's not quite so huge.

Change-Id: I5748edf0e715961da57eff7e0ade6fad175ab24b
Reviewed-on: https://code.wireshark.org/review/26110
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-26 02:42:54 +00:00
Gerald Combs bfedd74e99 CMake: Try to avoid Strawberry Perl's xsltproc.
Search for Chocolatey's and Cygwin's respective xsltprocs before searching
%PATH%. Strawberry Perl doesn't include DocBook, which makes it useless
as far as we're concerned.

Another approach would be to look in various locations for an XML catalog
files and set %XML_CATALOG_FILES%. However, Cygwin's /etc/xml/catalog
contains Cygwin-specific URLs, e.g. file:///etc/xml/docbook and can't
be used with a non-Cygwin xsltproc.

Change-Id: Iaebfdff922a6574581b9bd207625f03598c166e0
Reviewed-on: https://code.wireshark.org/review/25794
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-14 20:23:43 +00:00
Gerald Combs 9cc4a3b967 CMake: Install the HTML guides.
Add a "FileInstall.cmake" module that installs files and directories.
Use it to install the chunked HTML guides.

Install the guides into CMAKE_INSTALL_FULL_DOCDIR. By default this is
/usr/local/share/doc/Wireshark. Define DOC_DIR to match.

Add explicit file and directory permissions to the default install
targets.

Remove the PDF install target.

Bug: 14258
Change-Id: I4712a4047a54627b7520b5bf5f191e0761d19606
Reviewed-on: https://code.wireshark.org/review/25737
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-13 06:18:34 +00:00
Gerald Combs 8ebbf99173 Remove Lynx.
Use tools/html2text.py to convert HTML to text.

Remove some now-obsolete documentation.

Change-Id: Ib21a1ab10c789182da5fcc68e98917a00f2fa650
Reviewed-on: https://code.wireshark.org/review/25733
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-12 19:19:11 +00:00
Gerald Combs 86376e8447 Fix ASCIIDOCTORJ_OPTS.
Avoid excessive quoting.

Change-Id: I0dd7593d464851bd34cfc7a5a99a21a2a826dd7a
Reviewed-on: https://code.wireshark.org/review/25732
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-11 19:06:39 +00:00
Gerald Combs 94a0f7c641 Switch from AsciiDoc to Asciidoctor.
Switch the markup text processor for files in the docbook directory from
AsciiDoc to Asciidoctor. Asciidoctor has several useful features (such
as direct PDF output) and is actively developed. It's written in Ruby
but that dependency can be sidestepped with AsciidoctorJ, a
self-contained bundle that only depends on the JRE.

The current toolchain targets require Python, AsciiDoc, DocBook XML,
DocBook XSL, Java, FOP, xsltproc, lynx, and the HTMLHelp compiler:

HTML: AsciiDoc → DocBook XML → xsltproc + DocBook XSL
Chunked HTML: AsciiDoc → DocBook XML → xsltproc + DocBook XSL
PDF: AsciiDoc → DocBook XML → xsltproc + DocBook XSL → FOP
HTMLHelp: AsciiDoc → DocBook XML → xsltproc + DocBook XSL → HHC

This change removes the AsciiDoc and FOP requirements and adds either
AsciidoctorJ or Asciidoctor + Ruby:

HTML: Asciidoctor → DocBook XML → xsltproc + DocBook XSL
Chunked HTML: Asciidoctor → DocBook XML → xsltproc + DocBook XSL
PDF: Asciidoctor
HTMLHelp: Asciidoctor → DocBook XML → xsltproc + DocBook XSL → HHC

Ideally we could generate all of these using AsciidoctorJ, Java, and
lynx. Unfortunately we're not there yet.

The release notes depend on several macros (ws-buglink, ws-salink,
cve-idlink, sort-and-group). Add Asciidoctor (Ruby) equivalents.

Remove the BUILD_xxx_GUIDES CMake options and add various output targets
automatically. This means that you have to build the various documentation
targets explicitly.

Change-Id: I31930677a656b99b1c6839bb6c33a13db951eb9a
Reviewed-on: https://code.wireshark.org/review/25668
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-11 18:22:09 +00:00
Guy Harris 121abba1a2 Have individual plugin CMakeLists.txt files add library dependencies.
This removes any knowledge of plugin types from
cmake/modules/WiresharkPlugin.cmake, so that it doesn't have to be
changed if we add a new plugin type.  Revert to the second argument to
add_plugin_library() and install_plugin() being the subfolder.

Change-Id: I668ab90b28c73a8b12ca8e3e906b8de2f9395ca5
Reviewed-on: https://code.wireshark.org/review/25585
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-04 02:03:58 +00:00
Guy Harris d5f52cfaf5 Don't link wiretap plugins with libwireshark.
Make the second argument to add_plugin_library() and install_plugin() be
a plugin type - currently, either "epan" or "wiretap" - and, based on
its value, set the subfolder and required libraries in
add_plugin_library() and the subfolder in install_plugin().  If it's not
one of the known values, fail.

Change-Id: I556863772c59330d2854fbb4673f544f8359dcd2
Reviewed-on: https://code.wireshark.org/review/25579
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-03 21:04:14 +00:00
Gerald Combs 787b93fd07 Docbook: Generate one PDF paper size.
Generate a single PA4-sized PDF. PA4 is the approximate intersection of
A4 and Letter[1]. This gives us one less file to build and distribute.

If you're printing out hard copies of the guides this wastes a few pages
compared to an A4-sized PDF, but if you're printing out hard copies of
the guides you've already made a strong commitment to waste paper.

Page counts:

    Guide    Size      Pages

    WSDG     A4        203
    WSDG     Letter    217
    WSDG     PA4       217

    WSUG     A4        192
    WSUG     Letter    204
    WSUG     PA4       205

[1] https://en.wikipedia.org/wiki/Paper_size#PA4_or_L4

Change-Id: If43d4b19947c77a51b3943a2b329dbab45025d79
Reviewed-on: https://code.wireshark.org/review/25438
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-23 22:15:01 +00:00
Gerald Combs 064bec8797 CMake: File copy updates.
Switch from `xcopy`-ing single files to `cmake -E copy_if_different`-ing
multiple files on Windows. Add a comment about using copy_if_different
for our data files.

Switch from `cmake -E copy` to `cmake -E copy_if_different` in a couple
of other places.

Change-Id: I6bf72f02a66c46a4440280305479f41ffb4e987a
Reviewed-on: https://code.wireshark.org/review/25402
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-21 13:14:52 +00:00
João Valverde 5352ef42f9 plugins: Add source tree subfolder for plugin library
This allows some simplification and makes things more consistent,
particularly for loading plugins from the build dir.

Also fixes the issue reported here:

https://www.wireshark.org/lists/wireshark-dev/201801/msg00061.html

Change-Id: I0d8a000ee679172bccad546a3b0c47a79486f44d
Reviewed-on: https://code.wireshark.org/review/25329
Petri-Dish: João Valverde <j@v6e.pt>
Reviewed-by: João Valverde <j@v6e.pt>
2018-01-16 08:51:37 +00:00
João Valverde e502d933c5 CMake: Remove incorrect comment
Change-Id: Ie58b172f5c465d92d8100ac39cfd8c905586e9f7
Reviewed-on: https://code.wireshark.org/review/25331
Reviewed-by: João Valverde <j@v6e.pt>
2018-01-15 22:03:05 +00:00
Gerald Combs 5639b8014a Use an enum for plugin types.
Make plugins.c the source of truth for plugin names. Where plugins
reside and what they do are two different things, so split the plugin
directory and description into two separate elements.

CMake creates portable[1] builds on Windows and macOS. That is, the
build-time directory layout is the same as the installation directory
layout. Adjust various plugin paths macOS accordingly.

[1] You have to run osx-app.sh on macOS to prepare the application
bundle, but the goal is to create a directory/bundle that can be moved
or copied to a different system and run in the new location.

Change-Id: Icf9d02e61918fdf1404468baf52542910edf2743
Reviewed-on: https://code.wireshark.org/review/25166
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-11 00:58:43 +00:00
Gizem Yurdagul fbeca26f03 CMake: Additional default Cygwin location
On 64bit Windows, Cygwin installer sets the installation path as
"C:/tools/cygwin64", add this to the set of default locations when searching
for Cygwin.

Change-Id: I2d6ff0dfb18f24a595583c5a9c4b05d573e05e75
Reviewed-on: https://code.wireshark.org/review/25029
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2017-12-28 10:47:40 +00:00
João Valverde 6159c2be18 CMake: Replace generator expression with variable
Should fix OSX buildbot.

Change-Id: I52abdeab8c547079edc8aec6a0c6e12e928838c6
Reviewed-on: https://code.wireshark.org/review/24873
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-12-17 13:03:14 +00:00
João Valverde f3444ed0f9 plugins: Remove moduleinfo.h
Micro version bump for mate to homogenize it between CMake and autotools.
The cmake macro doesn't handle the "a" suffix and it doesn't seem worth
implementing.

Change-Id: Ib022c6aa170623b83a9700e4fa098c60a9cddfab
Reviewed-on: https://code.wireshark.org/review/24847
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-12-17 11:47:17 +00:00
João Valverde ee8ca2e1d7 plugin.rc.in: Cleanup some unnecessary code
Also add comment noting that MSVC_VARIANT is not the same thing as
CMAKE_GENERATOR.

Change-Id: Icc0f4a491786e4045c650509957655ef41352b29
Reviewed-on: https://code.wireshark.org/review/24846
Reviewed-by: João Valverde <j@v6e.pt>
2017-12-17 11:47:07 +00:00
João Valverde adde937ed7 plugins: Remove redundant plugin.rc.in files
plugin.rc is Windows specific, also add condition to reflect that.

Change-Id: Ibbb7dab77dd1f277e2302c8f931218ca433f8c72
Reviewed-on: https://code.wireshark.org/review/24833
Reviewed-by: João Valverde <j@v6e.pt>
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-12-15 22:09:04 +00:00
João Valverde 995812c5f1 Refactor plugin registration and loading
Put different types of plugins (libwiretap, libwireshark) in different
subdirectories, give libwiretap and libwireshark init routines that
load the plugins, and have them scan the appropriate subdirectories
so that we don't even *try* to, for example, load libwireshark plugins
in programs that only use libwiretap.

Compiled plugins are stored in subfolders of the plugin folders, with
the subfolder name being the Wireshark minor version number (X.Y). There is
another hierarchical level for each Wireshark library (libwireshark, libwscodecs
and libwiretap).

The folder names are respectively plugins/X.Y/{epan,codecs,wiretap}.

Currently we only distribute "epan" (libwireshark) plugins.

Change-Id: I3438787a6f45820d64ba4ca91cbe3c8864708acb
Reviewed-on: https://code.wireshark.org/review/23983
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-12-14 08:43:57 +00:00
João Valverde 5fc43fe63a Rewrite make-tap-reg.py in C
Change-Id: Ief5b1fffecc9712c01ff10292c403b7c84a5908a
Reviewed-on: https://code.wireshark.org/review/24756
Reviewed-by: João Valverde <j@v6e.pt>
2017-12-11 02:52:28 +00:00
Guy Harris 40fc796818 Fix the configuration check for remote-capture support in libpcap.
In autotools, if we find pcap_open(), define HAVE_PCAP_REMOTE, so we
build the remote capture support.

In both autotools and CMake, only check for pcap_setsampling() if we
have pcap_open(), as the compile fails if we have pcap_setsampling() but
don't have remote capture.

Change-Id: I0e7b78a2d372ea658a19ed2f6493532928c36872
Reviewed-on: https://code.wireshark.org/review/24680
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-03 06:24:30 +00:00
João Valverde 5968fc1cae Rename UseMakeDissectorReg.cmake
Change-Id: I2723e7f0309dbe21f23b65818fbea3a7eadf13d4
Reviewed-on: https://code.wireshark.org/review/24514
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-11-20 21:31:38 +00:00
João Valverde fe0c2b0485 Rewrite make-dissector-reg.py in C
The output compares equal to make-dissector-reg.py and the regex
should be more robust (multiline, complete start of function definition).

The primary motivation is to clean up the python script. This small
binary results in much cleaner code. The python script is used only
to generate plugin code, therefore it is renamed.

Also in my casual measurements the C code is much faster (without cache)
than the python script with the cache.

Change-Id: Id4e8cac3c836d56775aba4819357a95ef19bcb85
Reviewed-on: https://code.wireshark.org/review/24497
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-20 06:03:08 +00:00
João Valverde 262a84c384 Fix (and chop) static build option
This sets the scope of the static build option to Wireshark support
libraries only.

Before the patch:

Static plugins don't work with CMake and autotools.

autotools static build is broken, and most likely will always be, as
building Wireshark all-static is difficult and time-consuming.

After the patch:

For CMake Wireshark will be built with static or shared libraries and
dynamic plugins. Everything just works. CMake apparently doesn't want
you building static and shared libraries at the same time.

For autotools Wireshark will be built with shared libraries by default.
--disable-shared and --enable-static options work as usual. Dlopened
plugins are not built if --disable-shared is given to configure (to
disable shared libraries). This is a limitations imposed by libtool.

Tested on Linux. This removes broken support for building plugins
statically.

Change-Id: Ib8e8176976f136eea93a2ce8f9857b6cf9bec64c
Reviewed-on: https://code.wireshark.org/review/24241
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-11-19 20:16:50 +00:00
Graham Bloice d6b3fcfeab CMake: Fix error from bab9abfb7d
Fix a cut and paste error

Change-Id: I28fa3644d5b7969c8009f5722f270c8fa566dd34
Reviewed-on: https://code.wireshark.org/review/24491
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2017-11-19 12:20:29 +00:00
Graham Bloice bab9abfb7d CMake: Clean up Windows build
Remove options that aren't supported on Windows
Don't use pkgconfig on Windows

Change-Id: I79718a1c43f56a9ec88f690490931b80b727dd68
Reviewed-on: https://code.wireshark.org/review/24481
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-18 20:58:31 +00:00
Graham Bloice b6d6eb9097 CMake: Detection of HTMHelp
CMake erroneously reports that HTMLHelp wasn't found

The override of FindHTMLHelp.cmake now uses
FIND_PACKAGE_HANDLE_STANDARD_ARGS to do this correctly.

Change-Id: I1bd24964365dea00af213092872e24cbfb5ee07d
Reviewed-on: https://code.wireshark.org/review/24281
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-07 23:01:44 +00:00
Peter Wu ddf6526256 FindPOD.cmake: look for pod2man.bat
Strawberryperl 5.26.1.1 installs "pod2man.bat" but not "pod2man" so
find_program cannot locate it.

Change-Id: Iebfe2efec220085b15a4d73681da9cc7ea6a5360
Reviewed-on: https://code.wireshark.org/review/23913
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-15 00:12:57 +00:00
João Valverde 9bba3866ff CMake: Allow user build flags to override default build flags
Autotools has the very useful feature by design of allowing the user
to override the default build flags (you break it you keep it).

Apparently CMake applies COMPILE_OPTIONS target property after
CMAKE_{C,CXX}_FLAGS so that doesn't work here. Prepend our flags to those
variables instead to make it work then.

Specific target flag overrides can still be added with COMPILER_OPTIONS
(e.g: generated files with -Wno-warning) but this is less effective and
then we're back at the point where this overrides user flags. It's less
of a concern though.

Change-Id: I44761a79be4289238e02d4e781fef0099628817b
Reviewed-on: https://code.wireshark.org/review/23675
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-10-13 21:32:18 +00:00
João Valverde f0e12f0fd3 Remove TPG plugin and dependencies
It doesn't build with autotools and CMake.

Under-documented and unmaintained. Seems to be a work-in-progress
that stalled.

Introduces spurious CMake dependency on yapp.

Change-Id: I0dca1ccbdfd683586c05765437d4b7804ab5cc70
Reviewed-on: https://code.wireshark.org/review/23758
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-09-28 12:26:01 +00:00
João Valverde fd4dc6f115 plugins: Fixups for g9260461f4f
Put plugins in CMake build dir with a version subdir. This avoids some
weird special cases, however running with autotools from build dir
displays the wrong global folder in about->folders. Unfortunately
the hack to run from the autotools build dir is troublesome.

Various fixes for Windows builds.

Try to fix also build dir issue loading plugins on macOS with
ENABLE_APPLICATION_BUNDLE (blind).

Change-Id: Ic3c7c21f5850c12a53844202d61fa0592b45739c
Reviewed-on: https://code.wireshark.org/review/23657
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: João Valverde <j@v6e.pt>
2017-09-23 17:49:08 +00:00
Guy Harris df21aa9025 Use cmake_push_check_state() and cmake_pop_check_state().
Change-Id: I70528d5f54f62a51bf6f438669cd70d5f0296ae5
Reviewed-on: https://code.wireshark.org/review/23435
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-08 11:34:29 +00:00
João Valverde a338f87f33 CMake: Use GNUInstallDirs module instead of our own
Change-Id: I42f62824f226b091ff9bb86ce5c222333f98d783
Reviewed-on: https://code.wireshark.org/review/23379
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2017-09-03 20:13:44 +00:00
Gerald Combs f8d0a7f003 CMake: We no longer support Visual C++ 2005 or 2008.
Change-Id: Ide3688366aa3c38d48ff29224dbfc0fdb7bf1b7a
Reviewed-on: https://code.wireshark.org/review/23277
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-08-29 01:55:00 +00:00
Ahmad Fatoum aca55a29f7 Add hardware timestamping support
pcap provides a pcap_set_tstamp_type function, which can be used to request
hardware timestamps from a supporting kernel.

This patch adds support for aforementioned function as well as two new
command line options to dumpcap, wireshark and tshark:

    --list-time-stamp-types
                             List time stamp types supported for the interface
    --time-stamp-type <type>
                             Change the interface's timestamp method

Name choice mimics those used by tcpdump(1), which already supports this
feature. However, unlike tcpdump, we provide both options unconditionally.
If Wireshark was configured without pcap_set_tstamp_type being available,
--list-time-stamp-types reports an empty list.

Change-Id: I418a4b2b84cb01949cd262aad0ad8427f5ac0652
Signed-off-by: Ahmad Fatoum <ahmad.fatoum@siemens.com>
Reviewed-on: https://code.wireshark.org/review/23113
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-08-22 07:55:26 +00:00
Gerald Combs 9f7f401f32 CMake: Remove an unused variable.
Remove a variable apparently left over from the DocBook→AsciiDoc
transition.

Change-Id: Ieb6e2fd282ab71227bc5d33c200f04051acf529b
Reviewed-on: https://code.wireshark.org/review/23077
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-08-14 20:28:10 +00:00
Gerald Combs dc69a8446e CMake: Don't look in WOW6432Node.
CMake should check both the 32-bit and 64-bit views automatically.

Change-Id: I856814efcd660260c734c7956ad00ee43a8f666f
Reviewed-on: https://code.wireshark.org/review/22936
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-08-04 05:56:46 +00:00
Gerald Combs 7c5ff646dc Look for Cygwin in one more place.
Add "HKLM\SOFTWARE\WOW6432Node\Cygwin\setup" to the Cygwin search paths.

Change-Id: I302ecea67dd580449b450136c027ac37adf586d3
Reviewed-on: https://code.wireshark.org/review/22893
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-08-01 22:28:29 +00:00
Pascal Quantin 3e54cabf81 Add G.729 decoding based on bcg729 library
Bug: 13635
Change-Id: Ic22a0719a59da13e51425aeb747e88caca0d6512
Reviewed-on: https://code.wireshark.org/review/22808
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-07-30 05:22:35 +00:00
Ike Gilbert 76762d69b5 Windows: fix generation with CMake 3.9.0
By using CMake FindPerl.cmake module, CYGWIN_INSTALL_PATH variable
gets overwritten, bypassing our modified FindCygwin.cmake.
Let's package our own version FindPerl.cmake to avoid this.

Bug: 13922
Change-Id: If68e96ba312c2c6fa417721e7aec2ae6e5179a81
Reviewed-on: https://code.wireshark.org/review/22834
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-07-29 19:52:20 +00:00
Guy Harris 9ea364c389 Require at least c-ares 1.5.0 when configuring.
That way, if you have an older version, we fail at configure time, with
what should be a message indicating that your c-ares is too old, rather
than at compile time, with what might provoke users to ask "what am I
doing wrong?" or "what do I need to fix?" or "why is my compile
failing?" or....

Change-Id: I911574c4d90174b6bd074c5ef537557d47b199dc
Reviewed-on: https://code.wireshark.org/review/22752
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-07-21 12:39:26 +00:00
Gerald Combs ab0b3ecf86 CMake: Escape shell command quotes.
Escape shell command quotes so that what appears to be "unquoted_legacy"
behavior doesn't kick in.

Ping-Bug: 12305
Change-Id: I4763df2fbc58b80d6e4e3ec15f78c16fa1cf3853
Reviewed-on: https://code.wireshark.org/review/22732
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-07-20 18:00:43 +00:00
Gerald Combs a6652a2778 CMake: Fix the WiX search path.
Look for WiX executables in $WIX/bin instead of $WIX.

Change-Id: Id55eb8e73403d2beed55d64e9bdc6812308c359f
Reviewed-on: https://code.wireshark.org/review/22423
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-06-27 17:34:22 +00:00
Guy Harris e61d2f6243 On UN*X, make sure we can find inflate() in libz.
For example, on at least some versions of Fedora, if you have a 64-bit
machine, have both the 32-bit and 64-bit versions of the run-time zlib
package installed, and have only the *32-bit* version of the zlib
development package installed, it'll find the header, and think it can
use zlib, and will use it in subsequent tests, but it'll try and link
64-bit test programs with the 32-bit library, causing those tests to
falsely fail.  Hilarity ensues.

Change-Id: Ic2536e8a652ef96e2a3923c1faa61f6c8c06bf58
Reviewed-on: https://code.wireshark.org/review/22417
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-27 07:48:58 +00:00
Guy Harris 9a1d16b553 Don't check for inflatePrime() on Windows.
On Windows, we build libz as part of the Wireshark build process, so we
don't necessarily *have* a libz library to search or inflatePrime() at
this point; the search fails on the buildbots, for example.

So, on Windows, we just assume we have a new enough version of libz, so
that it has inflatePrime().

Bug: 13850
Change-Id: Ied0909f4a591ff3312d83a2a2ed41e3cd12218e8
Reviewed-on: https://code.wireshark.org/review/22413
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-27 03:16:04 +00:00
Guy Harris a0dfbccdfc Rename FindOS_X_FRAMEWORKS.cmake for the new OS name.
It's now FindMACOS_FRAMEWORKS.cmake.

(But is it actually *used*?  CMakeLists.txt does the check itself.)

Change-Id: I6e972869b94da959dc7c9a3fccacfbd35e0e992c
Reviewed-on: https://code.wireshark.org/review/22163
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-16 08:55:57 +00:00
Guy Harris 5039d0e576 Change some names to reflect Apple's new UNIX-for-Macs name.
{OS_X,os_x} -> {MACOS,macos}.

Change-Id: Icebea6ab566c65996ee97bacb88fac7e84ec32de
Reviewed-on: https://code.wireshark.org/review/22161
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-16 08:50:22 +00:00
Anders 0dc32776d0 Simplify the search for HTMLHelp.
Change updated as per https://gitlab.kitware.com/cmake/cmake/issues/16950#note_277462

Change-Id: I794e6cf7af3d1affa7ee5182374b6f22d9acdf33
Reviewed-on: https://code.wireshark.org/review/22051
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-06-10 16:11:12 +00:00
Gerald Combs 6a16f158c8 CMake: Look for Python in more places.
According to PEP 514, Python.org's Windows installer stores its
installation path in

HKEY_LOCAL_MACHINE\Software\Python\<Company>\<Tag>\InstallPath

where <Tag> is the value of sys.winver. Newer versions of python add "-32"
and "-64" to the version in order to allow side by side installations.
Adjust LocatePythonExecutable accordingly.

Change-Id: I8c7f8b4c31b37e7f687ce9909f97d62a779cfa91
Reviewed-on: https://code.wireshark.org/review/22048
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-06-08 22:41:20 +00:00
Graham Bloice fce2f2bb1f CMake: Add local copy of FindHTMLHelp.cmake
Add a local copy of FindHTMLHelp.cmake to search for hhc.exe that
includes the 32 bit program files locations "Program Files (x86)"
as this is where hhc.exe normally lives.

Change-Id: Ic5917a0765786ac483a7d4ef457043319d0e8501
Reviewed-on: https://code.wireshark.org/review/22037
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2017-06-08 13:30:54 +00:00
Gerald Combs 027aae1cd3 Revert "More 2.4 initialization."
This reverts commit c60a6580c9.

Wrong branch.

Change-Id: I846b26d09bf1ab99d3f42baf35f1a63f1dd806d2
Reviewed-on: https://code.wireshark.org/review/21967
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-06-05 15:03:58 +00:00
Gerald Combs c60a6580c9 More 2.4 initialization.
Change-Id: Iac4c02068eb462854b66c1561f4dfa2601bb18bf
Reviewed-on: https://code.wireshark.org/review/21966
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-06-05 15:03:06 +00:00
Pascal Quantin 46ef2dabfd Windows: update LZ4 to 1.7.5 and USBPcap to 1.2.0.1
Change-Id: I02eb4c255a0794b650f566abdadcac16e97196af
Reviewed-on: https://code.wireshark.org/review/21609
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-12 03:07:31 +00:00
Guy Harris 6f1e6d24c6 Revert "Revert "Get rid of HAVE_REMOTE.""
This reverts commit 8cd1fd0c99.

Making HAVE_REMOTE a config.h #define is a really horrible idea.  It's *NOT* a configuration option.

Instead, HAVE_REMOTE should be defined by other mechanisms, as was done in 79eab8ca07.

Change-Id: I4632b63bd73a25a27c5f4686d2baf3e0beddecb3
Reviewed-on: https://code.wireshark.org/review/21604
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-11 18:19:12 +00:00
Jörg Mayer 8cd1fd0c99 Revert "Get rid of HAVE_REMOTE."
This reverts commit d13b8ea13c.

This will only work with git HEAD of libpcap, but not with any release versions of libpcap or winpcap (the *pcap includes require the define, not Wireshark).

Change-Id: I08e5ec66e3642dc02f793c83ffc4363bb348202c
Reviewed-on: https://code.wireshark.org/review/21603
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2017-05-11 18:09:04 +00:00
Guy Harris d13b8ea13c Get rid of HAVE_REMOTE.
We never test for it - we test for HAVE_PCAP_REMOTE - so there's no need
to set it in config.h.

While we're at it, note that "PCAP" in "HAVE_PCAP_REMOTE" can refer to
libpcap as well as WinPcap, given that, at least in the tip of the
master branch, you can configure remote support in libpcap, although
it's not enabled by default (it needs to be vetted for security, as it
increases the attack surface of a machine running the server *and* of an
application using libpcap with remote support).

Change-Id: I3c96cf16bbda19ec7c085f74cffc6f125198d45b
Reviewed-on: https://code.wireshark.org/review/21589
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-10 21:16:29 +00:00
Peter Wu 50a1f90398 FindPOD.cmake: look for pod2html.bat
Strawberryperl 5.24.1.1 installs "pod2man", "pod2man.bat" and
"pod2html.bat", but not "pod2html" so find_program cannot locate it.

Change-Id: Id52ee7e77bbbfc8c2fcc6ab66c498d4818f54bf8
Reviewed-on: https://code.wireshark.org/review/21350
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-26 21:52:34 +00:00
Peter Wu 35f620c533 cmake: make Cygwin optional
Cygwin is not needed if the documentation is not built (i.e. asciidoc,
docbook, xsltproc are not needed). Via Chocolatey the following packages
can be installed: git, winflexbison, strawberryperl.

Change-Id: Ib13d144321cf6d2ed5c3346a2ae271de983deada
Reviewed-on: https://code.wireshark.org/review/21316
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-26 21:52:15 +00:00
Peter Wu 46b105d513 Remove runlex.sh script, just run lex directly
This removes the need for sh (and Cygwin) on Windows to build Wireshark.

runlex.sh (added in commits 5be4499a and 517d6d57) was added because
older flex had quirks with its options (and the --header(-file) option
was not available). The minimum required flex version for reentrant
scanners (2.5.6) does not have these issues though, so remove the step.

Change-Id: I73c82bb329e2130481efca94809dc60b86dcbafe
Reviewed-on: https://code.wireshark.org/review/21315
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-26 21:51:18 +00:00
Peter Wu a8d9777161 cmake: remove dependency on sed
runlex.sh does not need sed anymore since v2.3.0rc0-2386-g64f83641ad.
Since building docs already depends on Perl, let's use Perl instead.

Change-Id: Id7e923e47001cfd32c8cef89960377026464f2ee
Reviewed-on: https://code.wireshark.org/review/21314
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-26 21:50:44 +00:00
Roland Knall 39167ab2c9 cmake: FixLibXML2 include
Add default setting for the libraries entry, to satisfy windows builds,
if no libxml2 has been found

Change-Id: I3db026b6b8446eb42c7f30ee63c00a07600948fa
Reviewed-on: https://code.wireshark.org/review/21221
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-04-19 13:24:24 +00:00
Ahmad Fatoum cfab5ef035 Add libxml2 as optional dependency
This can be used by dissectors that need to parse out-of-band
configuration.

Change-Id: I13c0a2f408fb5c21bad7ab3d7971e0fa8ed7d783
Reviewed-on: https://code.wireshark.org/review/20912
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-04-19 10:41:55 +00:00
Pascal Quantin 74784bdb3e Update Windows binaries to GeoIP 1.6.10 with a local GeoIP_free function
This solves a crash occurring when trying to free memory allocated by
GeoIP (cross-compiled with mingw(32|64)) with MSVC function

Bug: 13598
Change-Id: I757cff13660bd485d7ea91d10660e9bf86404728
Reviewed-on: https://code.wireshark.org/review/21090
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-14 17:53:09 +00:00
Peter Wu aa9a0b3bf8 cmake: fix sporadic WSDG build failure on Windows
The Windows builds (using msbuild) fail sporadically when building
documentation (target developer_guides). The problem is that the targets
"developer_guide_pdf_a4" and "developer_guide_html" both depend on
developer-guide.xml and msbuild does not notice that the file has
already been generated by the generate_developer-guide.xml target.

For a discussion of the problem, see
https://gitlab.kitware.com/cmake/cmake/issues/16767

To fix this, remove the "developer-guide.xml" dependency from
"developer_guide_xyz" (to prevent these targets from triggering building
"developer-guide.xml"). Instead, depend on a generated
"developer-guide.xml-stamp" file which is created by the
"generate_developer-guide.xml" target (but do *not* add it as output of
this target, otherwise we will have the original problem again).

This workaround is restricted to the MSVC generators because otherwise
it would trigger a CMP0058 policy warning when used with Ninja.

Change-Id: Idb3975cde35be2601b038a500d4886bbd3a684d7
Reviewed-on: https://code.wireshark.org/review/20812
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-04-12 04:18:18 +00:00
Guy Harris 357cfd3b03 A bunch of "{Mac} OS X" -> "macOS" changes.
Avoid anachronisms, however; there was no "macOS 10.0" or even "OS X
10.0", for example.  It was "Mac OS X" until 10.8 (although 10.7 was
sometimes called "OS X" and sometimes called "Mac OS X"), and it was "OS
X" from 10.8 to 10.11.

Change-Id: Ie4a848997dcc6c45c2245c1fb84ec526032375c3
Reviewed-on: https://code.wireshark.org/review/20933
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-05 19:16:22 +00:00
Gerald Combs b59c87f94a CMake: Move the search for libgcc_s to GLib.
Move the search for the libgcc_s_seh and _sjlj DLLs to the GLib directory.
That's the only place it currently exists on the 64-bit builder.

Change-Id: Icf55dacf061d9423e78cabeaf16aa539ccb619bb
Reviewed-on: https://code.wireshark.org/review/20162
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-02-17 20:27:03 +00:00
Gerald Combs a5a8fce06e Qt: Warn the user about DBAR 1.8 on Windows.
At startup, dig through the registry looking for shell extensions. If
any of them match known Dell Backup and Recovery DLL names and the DLL
version matches 1.8.*.*, show the user a warning dialog.

This is a bit extreme but I'm not sure what else to do. Dell is a popular
computer manufacturer and bug reports keep trickling in.

Change-Id: I6d1bd6c56850279356570154d231b07facb30cff
Bug: 12036
Ping-bug: 12701
Ping-bug: 13414
Reviewed-on: https://code.wireshark.org/review/16861
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-02-16 16:58:12 +00:00
Mark Phillips 64f83641ad Cleanup runlex.sh to use builtin POSIX functions instead of sed
Bug: 13412

Change-Id: If43b30a33dcc4f23ba2bcb3cce3d0feea0d9fe40
Reviewed-on: https://code.wireshark.org/review/20120
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-02-15 20:58:43 +00:00
Pascal Quantin 0b8a12fd51 Windows: update GnuTLS to 3.4.11 and Libgcrypt to 1.7.6
Also switch some third party libraries to stripped version to reduce size

Change-Id: If0fd06a85fb17fb3e35543bcc714c8a8a1ce20c6
Reviewed-on: https://code.wireshark.org/review/20117
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-02-15 17:32:36 +00:00
Graham Bloice 8234de5350 Fix release-notes.html generation
The ASCIIDOC_CONF_FILES setting for asciidoc was only generated
if any of the guides were being built.

Clean up a dup setting and some and blank lines in FindASCIIDOC

Change-Id: Ie8ab97db09e18cdb8d7e2a7bd4dcf8c288dd036f
Reviewed-on: https://code.wireshark.org/review/19291
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2016-12-15 20:56:21 +00:00
Gerald Combs dd816a1218 Update to WinSparkle 0.5.3.
Update our WinSparkle package to 0.5.3. This fixes a file deletion bug.
Note that WinSparkle now supports application shutdown callbacks, which
should let us fix bugs 9687 and 12989.

Bug: 13217
Change-Id: I4b5f325c6dc251ce167f7bd344bbf3ca5ad3fe14
Reviewed-on: https://code.wireshark.org/review/19230
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-12-13 01:52:16 +00:00
Pascal Quantin fc4bb7eb74 Change SpanDSP capitalization
Many capitalization can be found for this library (spandsp, Spandsp, SpanDSP),
let's use the one found in the library README and in its spec file.

Change-Id: Ia66b723e5d582a6218da1b6366b7d4859272f80c
Reviewed-on: https://code.wireshark.org/review/19122
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-12-07 00:51:14 +00:00
Peter Wu f5e22a1487 codecs: Add support for G.722 and G.726
Integrate the Spandsp library for G.722 and G.726 support. Adds support
for G.722 and all eight variants of G.726.

Note: this also fixes a crash in Qt (buffer overrun, reading too much
data) caused by confusion of the larger output buffer (resample_buff)
with the smaller input buffer (decode_buff). It was not triggered before
because the sample rate was always 8k, but with the addition of the new
codecs, a different sample rate became possible (16k).

Fix also a crash which occurs when the RTP_STREAM_DEBUG macro is enabled
and the VOIP Calls dialog is opened (the begin frame, start_fd, is not
yet known and therfore a NULL dereference could occur).

Passes testing (plays normally without bad RTP timing errors) with
SampleCaptures files: sip-rtp-g722.pcap and sip-rtp-g726.pcap. Tested
with cmake (Qt), autotools (Qt and GTK+) with ASAN enabled.

Bug: 5619
Change-Id: I5661908d193927bba50901079119eeff0c04991f
Reviewed-on: https://code.wireshark.org/review/18939
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-12-06 17:51:47 +00:00
Gerald Combs 7b5e77406d CMake: Update FindWiX.
The WiX Toolset installer sets the WIX environment variable. Search for
our WiX executables there first.

Change-Id: I5acc9cb369dc2bdbb071d35b5a39498c6db117a3
Reviewed-on: https://code.wireshark.org/review/19096
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-12-05 20:21:23 +00:00
Dario Lombardo 035e404fff cmake: add creation of version.conf to be shipped in tarball.
Change-Id: I2bb66844b29cd4805d201891ffba342d26ee475f
Reviewed-on: https://code.wireshark.org/review/18731
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-11-21 09:02:11 +00:00
Peter Wu 58c4a4e018 cmake/FindPCAP: fix use of bad cached function checks
When libpcap-dev is not installed, do not look for functions like
pcap_datalink_name_to_val since the negative result would be cached.
Then after installing libpcap-dev, the build would fail due to
redeclaration of functions.

Change-Id: Ifdbad09e9cf160383b16b6459693f7ea5d65b9c3
Reviewed-on: https://code.wireshark.org/review/18834
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-11-18 17:33:53 +00:00
Martin Kaiser 4e95d5fa8e cmake: fix the linker flags test for Visual Studio
ddd1c87d43 modified the order
of linker command line options. This broke the tests and made
invalid linker flags seem valid.

(Link target) ->
  LINK : warning LNK4044: unrecognized option '/Wl,--as-needed'; ignored [C:\wireshark\build3\wsutil\wsutil.vcxproj]
  LINK : warning LNK4044: unrecognized option '/pie'; ignored [C:\wireshark\build3\wsutil\wsutil.vcxproj]

The simple fix is to add specific options for Visual Studio and clang at the beginning of
the linker's command line options rather than at the end.

Change-Id: I6492ea1271e18be0d190e7579f47baecf6ac4d61
Reviewed-on: https://code.wireshark.org/review/18709
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2016-11-08 16:22:30 +00:00
Martin Kaiser ddd1c87d43 cmake: avoid leading space in linker options
This causes problems with cmake 2.8.9, which ships with Debian Wheezy.

Reorder the linker options to avoid a leading space. According to GNU
ld's manual, the order of linker options on the command line does not
matter. This should be the same for Visual Studio's cl.exe and for
clang's linker.

See
https://www.wireshark.org/lists/wireshark-dev/201604/msg00141.html
for more details about the problem.

Change-Id: Ieaf7425600d394f365b01747747665233693fea2
Reviewed-on: https://code.wireshark.org/review/18581
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2016-11-07 21:16:30 +00:00
Pascal Quantin 28bbd56591 Add SBC decoding support to Windows
Change-Id: Ibef872dff26c22e2834e958c496c33a5695bb131
Reviewed-on: https://code.wireshark.org/review/18394
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-22 17:35:54 +00:00
Peter Wu 53400e0d33 cmake/FindPOD: improve parallelism
HTML and manual pages can be generated in parallel.

Change-Id: I2301e8bdc5ae1179a8ac0c24f412e5435993a764
Reviewed-on: https://code.wireshark.org/review/18281
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-10-20 23:36:24 +00:00
Peter Wu d399bfaa07 cmake/FindPOD: improve formatting, add modelines
CMake standard style is to use lowercase function names, do that.

Change-Id: I893825cfac0cc402177ffb1a0f43f0ffc6341c45
Reviewed-on: https://code.wireshark.org/review/18312
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-10-19 11:33:33 +00:00
Pascal Quantin 303948500f CQL: add LZ4/Snappy decompression support on Windows
Change-Id: I34374cf29357e2ed5062da1a5245b9adbabf732d
Reviewed-on: https://code.wireshark.org/review/18249
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-18 04:00:35 +00:00
Benoît Canet 47649d1c7f cql: add lz4 and snappy decompression
We do not use the STARTUP negotiation since a stream
can be captured in its middle but try to decompress
if the flag is present and fallback if it fails.

Change-Id: Iecbf49a45220b04be7808869c9884548eb1e7694
Signed-off-by: Benoît Canet <benoit@scylladb.com>
Reviewed-on: https://code.wireshark.org/review/17952
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-10-17 18:28:45 +00:00
Peter Wu a30dcd9951 cmake: fix missing docbook dependency
Running "ninja developer_guide_html" somehow did not produce a new HTML
docbook once wsluarm.ascii (a dependency of developer-guide.xml) was
modified.

It turns out that output file docbook/wsdg_html/index.html only had a
ordering-only dependency on target generate_developer-guide.xml. An
extra dependency is needed on the output file to ensure that the HTML
file gets rebuild on changes.

See the last note on
https://samthursfield.wordpress.com/2015/11/21/cmake-dependencies-between-targets-and-files-and-custom-commands/

Fixes v2.1.0rc0-2137-gd544ecd ("cmake: fix parallel docbook build").

Change-Id: I7689c71994f13b29cf7f8561f7c993aa8298632d
Reviewed-on: https://code.wireshark.org/review/18225
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-10-17 14:33:04 +00:00
Balint Reczey b1cc056b12 Remove nghttp2 code and use system' nghttp2
Update debian, macos (setup / homebrew) download script
Update testsuite (don't try HPACK when build without nghttp2)

Change-Id: I365e5e17bc4fab4acd81b4c39ea7189a5d1ee112
Reviewed-on: https://code.wireshark.org/review/17347
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-13 19:26:10 +00:00
Graham Bloice 7514f98f56 Make Winflex\bison the preferred option
Cygwin flex\bison generate shortening warnings due to size_t on
Win 64.  The win flex\bison versions don't so find them first.

Change-Id: Ib68c84435f859325612410b72b6cf21cf106ecc2
Reviewed-on: https://code.wireshark.org/review/17763
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2016-09-18 09:57:06 +00:00
Gerald Combs 3c163637d6 WSUG: Fixup PDF images.
Pass relative image directory paths to xsltproc. The DocBook documentation
says you can use a URI, but trying to get that to work with CMake
and Windows appears to be a path to tears and undignified wails of
frustration.

Add attributes for our different types of images and use them so that
the PDFs don't scale our screenshots to an unusable size.

Change-Id: I786d09d9ef9be3d423b2af426a8867739ae12c1a
Reviewed-on: https://code.wireshark.org/review/17688
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-09-13 21:02:54 +00:00
Peter Wu e079862fad cmake: fix breakage with libnl2
I accidentally assumed that libnl2 works fine with just libnl.so, but
apparently the other libraries are also necessary.

Change-Id: I1636710ea3f41ed10a5ccb37106cae9e688abec9
Reviewed-on: https://code.wireshark.org/review/17654
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-09-12 12:10:19 +00:00
Peter Wu 7471b46768 cmake: fix libnl caching issue, make it more robust
Dario reported that the cmake build fails after installing libnl3-devel
(libnl-devel was already present). This results from a name collision
for NL_LIBRARY and NL_INCLUDE_DIR variables.

Initially these variables contained the values for libnl-1. When libnl3
is installed, these variables were not updated (because it was cached),
but HAVE_LIBNL3 would still be set, resulting in a header and feature
mismatch. Use separate variables for libnl1 and libnl3 to fix this.

Other fixes: also set HAVE_LIBNL for libnl1; fallback to libnl1 if
libnl3 is unusable (e.g. because libnl-route-3.0 is missing).

Change-Id: Icf0a03843ea870347ddf365f69bacf4883d07f6d
Reviewed-on: https://code.wireshark.org/review/17449
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-09-03 13:57:59 +00:00
João Valverde 640382c743 CMake: Allow setting per target compiler warnings
Setting our compiler warning flags in CMAKE_C_FLAGS does not allow
using different flags per target.

Allow for that possibility by setting the internal WS_WARNINGS_{C,CXX}_FLAGS
and using the COMPILE_OPTIONS property to set them.

This change is just setting mechanism and there should be no difference
in generated warnings.

The check_X_compiler_flag cmake test is changed to test each flag individually.
We need a list, not a space separated string, and the aggregate test is not
significant.

Change-Id: I59fc5cd7e130c7a5e001c598e3df3e13f83a6a25
Reviewed-on: https://code.wireshark.org/review/17150
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-08-23 21:33:09 +00:00
Pascal Quantin 8e1cc70fd5 Fix detection of NSIS/WiX install path when running a win64 CMake
On x86 system:
System32\cmd.exe
ProgramFiles=C:\Program Files

On x64 system:
System32\cmd.exe
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
Syswow64\cmd.exe
ProgramFiles=C:\Program Files (x86)
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files

Change-Id: I32d52219366b299f1e8099dc6d7737970dc398dd
Reviewed-on: https://code.wireshark.org/review/16346
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-07-09 07:22:09 +00:00
João Valverde a16d401b25 Remove Makefile.common files
Now that nmake build system has been removed they are not needed anymore.

Change-Id: I88075f955bb4349185859c1af4be22e53de5850f
Reviewed-on: https://code.wireshark.org/review/16050
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-06-30 11:04:17 +00:00
Pascal Quantin 6baa1b544c Remove Nmake build system
Change-Id: I3bd474f3cda9667dec66426b5729449953df3e61
Reviewed-on: https://code.wireshark.org/review/15777
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2016-06-15 19:21:57 +00:00
Guy Harris eb4ed5a53c Clean up some messages.
We're checking for more than just a 64-bit off_t; we're checking for the
ability to do 64-bit seeks in files, even if, as on Windows, the APIs
are different.

Remove trailing white space and clean up some comments while we're at
it.

Change-Id: I6122b6d6b44ff5dd3a4d8268f9793193e65817ce
Reviewed-on: https://code.wireshark.org/review/15912
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-15 00:36:34 +00:00
Michael Mann c34996f970 Create a Wix Installer
This is intended to replace the NSIS installer for Windows.
It does not include installing WinPcap or USBPcap.  From the research I've done, it seems to make more sense to "bundle" them with Wix ("wrapper" installer that would include Wireshark, WinPcap and USBPcap installers together)

TODO:
1. Customize installer with Wireshark graphics
2. Better handling flexibility of installing VC CRT Merge module (need build script to provide appropriate macros).  Something like (or modifying existing) FindMSVC_REDIST.cmake.
3. Use Wireshark UpgradeProductCode for install/uninstall. Previous NSIS installer did not have an upgrade code, so there are some backwards compatibility concerns.
4. Uninstall considerations (removing whole directories - plugins, configuration profiles?).  NSIS needed to do more things "manually" than Wix does by default.  Need to merge as best as possible to handle backwards compatibility.

Many thanks to Brian Pratt for all the Wix help.

Change-Id: Ib50780214fc7707ba2a46fd96ba8797a1763fa0c
Reviewed-on: https://code.wireshark.org/review/14858
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-11 13:09:17 +00:00
Peter Wu 27646e1cb4 cmake: fix GTK3 detection via pkg-config
Put QUIET before the module name, otherwise FindPkgConfig tries to
locate a module named QUIET. This fixes a build failure that complains
about missing pango/pango.h.

Tested with GTK 3.20, CMake 3.5.2 on Arch Linux.

Change-Id: I76e487d0f4b7f9fbac4105521c349b392b680923
Reviewed-on: https://code.wireshark.org/review/15314
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-05-09 20:01:20 +00:00
Graham Bloice 2e23b506c7 Add checkAPI calls to CMake.
This generates a top level target, checkAPI, that is
excluded from the ALL build target, so must be run separately.

On Windows using a Visual Studio generator, call
msbuild /p:Configuration=RelWithDebInfo checkAPI.vcxproj

Change-Id: I44a57c564dcfc75499463b942436f4b920a82478
Reviewed-on: https://code.wireshark.org/review/14873
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2016-05-02 12:01:24 +00:00
Pascal Quantin ae316e2d88 Compile sshdump and ciscodump for Windows
Use libSSH 0.7.2 compiled with MinGW(32|64) and linked with zlib and gcrypt support

Change-Id: I7c17d1ba3dd1890e2f83c119f5ea851834807e43
Reviewed-on: https://code.wireshark.org/review/12117
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-04-25 07:22:28 +00:00
João Valverde ed6eecd79e [GTK] Check for xdg-open at run time
Remove HTML_VIEWER compile-time setting.

If xdg-open doesn't exist use user web browser preference as fallback.

Change-Id: I3b4a4a1a36b0192d75f2c97595f37d0d88a0941e
Reviewed-on: https://code.wireshark.org/review/14805
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: João Valverde <j@v6e.pt>
2016-04-09 23:40:51 +00:00
Guy Harris 59816ef00c Make the Flex scanners and YACC parser in libraries reentrant.
master-branch libpcap now generates a reentrant Flex scanner and
Bison/Berkeley YACC parser for capture filter expressions, so it
requires versions of Flex and Bison/Berkeley YACC that support that.

We might as well do the same.  For libwiretap, it means we could
actually have multiple K12 text or Ascend/Lucent text files open at the
same time.  For libwireshark, it might not be as useful, as we only read
configuration files at startup (which should only happen once, in one
thread) or on demand (in which case, if we ever support multiple threads
running libwireshark, we'd need a mutex to ensure that only one file
reads it), but it's still the right thing to do.

We also require a version of Flex that can write out a header file, so
we change the runlex script to generate the header file ourselves. This
means we require a version of Flex new enough to support --header-file.

Clean up some other stuff encountered in the process.

Change-Id: Id23078c6acea549a52fc687779bb55d715b55c16
Reviewed-on: https://code.wireshark.org/review/14719
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-04-03 22:21:29 +00:00
Gerald Combs 1e41221f31 CMake: Find asn2wrs.py once.
Load LocatePythonModule and use it to find asn2wrs once instead of every
time we cal the ASN2WRS function. This reduces the cmake run time by
about 3 to 4 seconds here.

Change-Id: I85f7dcca0b5891c9b4b23a76d017f8e504d6af60
Reviewed-on: https://code.wireshark.org/review/14614
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-03-24 18:41:39 +00:00
João Valverde 7a1d3f67ac Remove ADNS support
Relevant mailing list message:

  https://www.wireshark.org/lists/wireshark-dev/201503/msg00007.html

Change-Id: I0cff6d4d64fb52a651bcf6b28c183e43653b1cc2
Reviewed-on: https://code.wireshark.org/review/14519
Reviewed-by: João Valverde <j@v6e.pt>
2016-03-21 19:32:00 +00:00
Graham Bloice 92db934c7c Fix CMake target FOLDER properties
Add FOLDER properties to targets to clean up the presentation
in Visual Studio.

Change-Id: I35a175175db055443572c58a069879061fdcf0a3
Reviewed-on: https://code.wireshark.org/review/14528
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-03-20 14:03:12 +00:00
Gerald Combs a183726370 DocBook: Don't require xmllint.
Remove dependencies on xmllint. We don't write DocBook by hand any more
and we haven't used it in a long time in the CMake builds.

Change-Id: Ic07f03b00c4554c058eece0462b0925d565b6da1
Reviewed-on: https://code.wireshark.org/review/14506
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-03-18 23:26:51 +00:00
Gerald Combs ea42011e26 Add missing hints.
Change-Id: I49ee3080339e75e69e96e97c2a9069136772e3a0
Reviewed-on: https://code.wireshark.org/review/14296
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-03-02 18:57:31 +00:00
Gerald Combs 429c840fc9 Add Fop 2.1 to FindFOP.cmake.
Change-Id: I3d3bb3e6ae5cefb4bc439b922d228cb202f4f446
Reviewed-on: https://code.wireshark.org/review/14292
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-03-02 18:03:00 +00:00
Peter Wu d544ecd0ec cmake: fix parallel docbook build
Let targets depend on the generate_developer-guide.xml target instead of
the developer-guide.xml output file.

Change-Id: I66106ad69c9baedbd58a008b4dbbbf93b787c2c2
Reviewed-on: https://code.wireshark.org/review/14156
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-02-26 19:52:09 +00:00
Peter Wu 8d256d26d3 cmake: fix docbook dependency
After changing an asciidoc source file, the html files were not rebuilt
via 'ninja developer_guides'. It turns out that the
developer_guide_docbook target has an order-only dependency on
developer-guide.xml (and not the developer-guide.xml dependencies).

Fix this by adding an explicit dependency on the generated .xml file.

Change-Id: I4bdc0ebca8909caaab9cc0797cc35cc6260bfe43
Reviewed-on: https://code.wireshark.org/review/14065
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2016-02-23 23:31:11 +00:00
David Morsberger da5594744e Get Clang to report errors for unused vs. unknown linker flags
Change-Id: Iabe497d88239c1e15d7ef6d44c6fca79c8be2d1c
Reviewed-on: https://code.wireshark.org/review/13569
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-28 02:44:14 +00:00
Guy Harris 8049df7943 Get Clang to report errors for unknown linker flags.
Change-Id: Id8e77b6b521acc1ba684823211d6c09d0e5c111c
Reviewed-on: https://code.wireshark.org/review/13566
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-27 18:27:55 +00:00
Guy Harris 54e3b32027 Don't treat Visual Studio specially for linker flags.
Have CHECK_C_LINKER_FLAG pass /WX to the linker if we're using MSVC, to
force the link to fail if the linker doesn't recognize the flag.

Add flags to WIRESHARK_LD_FLAGS even with MSVC; let CHECK_C_LINKER_FLAG
figure out whether the flag should be used.

While we're at it, fix CHECK_C_LINKER_FLAG to save and restore
CMAKE_REQUIRED_LIBRARIES.

Change-Id: I7f73b4cc3a28eb14e46c2e1e9ad69f5303754f01
Reviewed-on: https://code.wireshark.org/review/13558
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-27 05:24:50 +00:00
Guy Harris dc91ac5241 Make CHECK_C_LINKER_FLAG work with, at least, the Xcode generator.
As per a suggestion from a Kitware person in bug 0015934:

	https://cmake.org/Bug/view.php?id=15934

We also don't need to check whether the resulting code *runs* -
check_c_source_compiles not only compiles, it links as well.

Change-Id: Ied09b9da7c88ac46f14df14f6a6260037abdbef4
Reviewed-on: https://code.wireshark.org/review/13556
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-27 00:55:07 +00:00
Graham Bloice 619a7a35b7 Docbook: Revert part of change 13160
Remove the file dependency on the xml file as this causes
build failures due to parallel building.

There is still an issue with the build of *.hhp if the corresponding
*.xml file is rebuilt.

Change-Id: I738c687be50daebcf93576be8a43dbb6475f4fc8
Reviewed-on: https://code.wireshark.org/review/13217
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2016-01-12 08:49:59 +00:00
Graham Bloice 25bfbaa0cf CMake: Fix docbook dependencies
unset accumulator variables after use so that successive uses are
not carried forward.
add MAIN_DEPENDENCY for chm generation so that it is correctly
rebuilt when the sources change.

Change-Id: I3b0c47a775f398346cc3a3bbd39d4fab2b0ec000
Reviewed-on: https://code.wireshark.org/review/13160
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-01-10 07:04:11 +00:00
Guy Harris ba3aa03dcf Move more capture device handling to the caputils library.
Move the code to open capture devices and get properties of capture
devices there, joining the code to get a list of capture devices.

This lets us do a better job of handling pcap_create() in WinPcap,
including handling both WinPcap with pcap_create() and WinPcap without
pcap_create() at run time, just in case somebody tries using WinPcap 3.x
with a Wireshark built with WinPcap 4.x.

It also could make it easier to use libpcap/WinPcap directly in
Wireshark and TShark, if we have versions of libpcap/WinPcap that run
small helper utilities to do privileged functions, allowing programs
using them never to need elevated privileges themselves.  That might
make it easier to fix some issues with running TShark when not saving to
a file (we could avoid the file entirely) and with delays when stopping
a capture in Wireshark (Wireshark could stop writing to the file as soon
as you click the stop button, rather than letting dumpcap do so when the
signal gets to it).

It might also make it easier to handle future versions of
libpcap/WinPcap that support using pcap_create()/pcap_activate() for
remote captures, and other future extensions to libpcap/WinPcap.

Rename some XXX_linktype routines to XXX_datalink to indicate that they
work with DLT_ values rather than LINKTYPE_ values; future versions of
libpcap might use LINKTYPE_ values in newer APIs.

Check for pcap_create() on all platforms in CMake.

Change-Id: Ia12e1692c96ec945c07a135d246958771a29c817
Reviewed-on: https://code.wireshark.org/review/13062
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-07 04:38:39 +00:00
Graham Bloice 40a21c0236 Build: On Windows, ensure we have found Cygwin bash
git can be installed (or the path manually set) so that the msys
unix utilities supplied with git (expecially bash) are on the path
and then picked up by CMake.  These utilities are not compatible with
the build and will fail.

This change checks the output of the --version option to the found
executable and ensures "cygwin" is found in the result.  If not found
a FATAL_ERROR message is issued and the CMake generation is stopped.

Change-Id: I0eca014ae194862abbc8dee56d347526691e72cb
Reviewed-on: https://code.wireshark.org/review/13008
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2016-01-02 22:59:03 +00:00
Gerald Combs 6084c21d74 CPack: Fixup plugin paths on Windows.
Fix the per-configuration output directories for plugins. Fixes the following
when running CPack:

----
CMake Error at C:/Development/wireshark/cmbuild/plugins/docsis/cmake_install.cmake:32 (file):
  file INSTALL cannot find
  "C:/Development/wireshark/cmbuild/run/$(Configuration)/plugins/docsis.dll".
Call Stack (most recent call first):
  C:/Development/wireshark/cmbuild/cmake_install.cmake:329 (include)
----

Change-Id: I8d97722cc0d54e9ef26aeaeb311522e161c428e5
Reviewed-on: https://code.wireshark.org/review/12953
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-12-30 22:40:00 +00:00
Gerald Combs 42333aa353 CMake+PortableApps: Include the VC runtime (second try).
Move the code that finds the Visual C++ redistributable DLLs to its
own module. Run it before we create our NSIS and PortableApps targets.
Add a PortableApps target that copies the redistributable

This reverts commit 403fa9fbe0cdba3f443ec4674cda40092525ffe4.

Bug: 11800
Change-Id: I081d8fd3f5f37dd590659ca8f2bd309642a9a9df
Reviewed-on: https://code.wireshark.org/review/12431
Reviewed-by: Gerald Combs <gerald@wireshark.org>
(cherry picked from commit 5b580834aeeee8477039bc099c49c21aeeb3b71f)
Reviewed-on: https://code.wireshark.org/review/12432
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
2015-12-04 22:32:32 +00:00
Peter Wu a198f47c06 cmake: add asn1 target, avoid unnecessary rebuilds
Add an "asn1" build target that rebuilds all ASN.1 dissectors.

Do not always generate the ASN.1 dissector when invoking the
"generate_dissector-PROTO" target. Use a special "packet-PROTO-stamp"
file to detect whether the dissector is out of date.

This indirection is needed because cmake removes output files from
add_custom_command in the clean target, but we would like to keep the
generated packet-PROTO.c files.

Make all EXTRA_CNF and EXPORT_DEPENDS point to absolute paths for
generated exported configs (PROTO-exp.cnf). This is done by automake too
and is needed for proper dependency tracking. Example: when h225.cnf is
updated, h225-exp.cnf needs to be generated. That is the purpose of the
"generate-h225-exp.cnf" target. Now h235 (and other) dissectors need to
be regenerated as well because the h225-exp.cnf is updated. This is why
there is a separate add_custom_command and add_custom_target.

Change-Id: I8cfc1f8f43cea595267b21eae30b4548f3407c0b
Reviewed-on: https://code.wireshark.org/review/12080
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-26 12:37:21 +00:00
Peter Wu 5afbf7e0e5 cmake: fix "multiple rules generate abi-descriptor.template" warning
Fixes warning with "cmake -GNinja && ninja":

    ninja: warning: multiple rules generate
    /tmp/wireshark/abi-descriptor.template. builds involving this target
    will not be correct; continuing anyway [-w dupbuild=warn]

Change-Id: I82ed3aefd32852e6a98060c1a175df855062531d
Reviewed-on: https://code.wireshark.org/review/12009
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-11-23 17:22:44 +00:00
Dario Lombardo d6da95231e extcap: add sshdump.
sshdump is an extcap module that allows dumping from a remote host using an ssh connection.
It goes with the existing extcap plugin interface.

Change-Id: I8987614fdd817b8173a50130812bc643a4833bca
Reviewed-on: https://code.wireshark.org/review/11402
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-19 15:29:18 +00:00
Gerald Combs 9a7973770e CMake: Add "C:/tools/cygwin" to FindCygwin.cmake.
Add C:\tools\cygwin to the list of search paths in FindCygwin.cmake.
This matches the behavior of config.nmake and is where Chocolatey
installs Cygwin.

Change-Id: I87a3cd64aae410b9c9abdc87c56d29aa3c4d5946
Reviewed-on: https://code.wireshark.org/review/11885
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-11-17 01:37:00 +00:00
Peter Wu 67ad1de0d0 FindLUA.cmake: reject version 5.3
Lua 5.3 could still be used when located at /usr/include/lua.h. Detect
and reject it in that case.

Rename LUA_VERSION to LUA_VERSION_NUM to avoid a conflict with
pkg-config (which uses a different version format). Ensure that the
regex matches a number only.

Bug: 11706
Change-Id: Idb7e3e1a8d9c6e4ab9ab1816c4dedea7de9dde8e
Reviewed-on: https://code.wireshark.org/review/11836
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-11-15 20:15:41 +00:00
Pascal Quantin 654d4abf71 CMake: add our own FindCygwin module
The one from official CMake (3.3.2) does not look for the default 64bits installation path. Let's add it.
Also add a WIRESHARK_CYGWIN_INSTALL_PATH environment variable allowing to force it.
For reference, registry based detection fails to detect a 64bits installation because it gets redirected to the Wow6432 node.

Change-Id: If3172494e3ab232e094389b493e6b67023662ae5
Reviewed-on: https://code.wireshark.org/review/11769
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-11-13 14:24:05 +00:00
Guy Harris 6375df2da4 Put a newline at the end of the file.
Change-Id: Ic04e9a4afdceb1e36ad8367dd0d7bf6bd0674844
Reviewed-on: https://code.wireshark.org/review/11514
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-03 01:46:41 +00:00
Gerald Combs 5c5cc228fc Revert the last two CMake changes.
get_filename_component returns "/regstry" if the query is unsuccessful.
We'll have to add a check for that if we query "Add Paths".

Revert "CMake: Pass ABSOLUTE to get_filename_component."

This reverts commit 4c03f4be00.

Revert "CMake: Look for Python using the "App Paths" key."

This reverts commit 6d1b6cd39d.

Change-Id: Ida17608467fa3652f4219e4eaf01edfa48120b1d
Reviewed-on: https://code.wireshark.org/review/11512
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-11-03 01:35:28 +00:00
Gerald Combs 4c03f4be00 CMake: Pass ABSOLUTE to get_filename_component.
Change-Id: Iecfc4aabe332cac930a7fa5bb6e342a55e7bc7b3
Reviewed-on: https://code.wireshark.org/review/11510
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-11-03 01:09:23 +00:00
Gerald Combs 6d1b6cd39d CMake: Look for Python using the "App Paths" key.
Query HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\Python.exe
and HKCU\Software\Microsoft\Windows\CurrentVersion\App Paths\Python.exe
first before trying other methods.

Change-Id: I83f54f6833149c68f1626c3c17f25ffe54d8ea5d
Reviewed-on: https://code.wireshark.org/review/11506
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-11-03 00:37:29 +00:00
Peter Wu fe1ab42f16 Require GnuTLS 2.12.0, add cmake version detection
Since v2.1.0rc0-17-g877fd03 and v2.0.0rc0-23-g263ff53 ("ssl-utils:
load RSA keys based on their modulus+exponent"), GnuTLS 2.12.0 is
needed.

Add a version check to cmake as well, tested on CentOS6 (with
pkg-config check disabled to verify the code path). Note that RHEL6
has GnuTLS 2.8.5 and thus SSL decryption with a RSA private key is no
longer supported on that version.

Change-Id: I99fdfe6790107f48629dd435794fe8880263063d
Reviewed-on: https://code.wireshark.org/review/11044
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-10-25 14:05:07 +00:00
Peter Wu 82ec0bb0fc Require libgcrypt 1.4.2, add cmake version detection
libgcrypt 1.4.2 is required since since v1.11.0-rc1-2787-g23f9100
("Really add support for AEAD ciphers (GCM)") due to the use of
gcry_cipher_setctr. Bump the version in configure.ac too.

Add version check for gcrypt to cmake. Tested with CentOS 6 (cmake
2.8.12.2, libgcrypt 1.4.5).

Change-Id: I93c3ed902a764d9d14675779e866230d073c96d5
Reviewed-on: https://code.wireshark.org/review/11043
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-10-20 03:28:55 +00:00
Gerald Combs 7682ae4887 Keep CMake from finding Cygwin's Python.
Try to find Python and set PYTHON_EXECUTABLE on Windows via the registry
prior to calling FindPythonInterp. This works around a bug in CMake that
prefers Cygwin's Python, which is a symlink, which by default is a text
file that contains a Cygwin-specific cookie, which is therefore useless
outside of Cygwin.

This is avoids the need to pass -DPYTHON_EXECUTABLE=... to CMake.

Change-Id: Ife37221b61d920682c20357b6d139a93067a5ad1
Reviewed-on: https://code.wireshark.org/review/11071
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-16 20:40:28 +00:00
Peter Wu 14085e043a Revert "Another message from Clang for unknown -f and -m flags."
This reverts commit 5e5e2019ee.

This change was proposed in https://cmake.org/Bug/view.php?id=13194 to
catch some Clang warnings concerning invalid -m flags, but it is causing
legitimate breakage when setting CMAKE_C_FLAGS=-gsplit-dwarf.
CMakeFiles/CMakeError.log shows:

    /usr/bin/clang  -gsplit-dwarf -DC__W_VALID    CMakeFiles/cmTC_04cc8.dir/src.c.o  -o cmTC_04cc8 -rdynamic
    clang-3.7: warning: argument unused during compilation: '-gsplit-dwarf'

With the additional regex, basic checks (like -Wall but also -fPIE) are
incorrectly reported as unsupported. Follow upstreams action here and
remove it, it is still not present as of CMake 3.3.2.

Change-Id: I8a1e97b16c2bb929436cca669fdb42f33612c490
Reviewed-on: https://code.wireshark.org/review/10880
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-10-14 16:53:36 +00:00
Peter Wu 01f82ee84c cmake: fix kerberos library lookup, support Heimdal
A build with the gold linker broke with:

    run/libwireshark.so.0.0.0: error: undefined reference to 'krb5_c_decrypt'

Fix this my restructuring the FindKERBEROS module to use the libraries
found by pkg-config.

While at it, check for MIT and Heimdal instead of assuming MIT. Remove
HAVE_KEYTYPE_ARCFOUR_56 as this macro is not used.

Change-Id: Iab23d79bc3f25e9c0fd7203b6f050f875fb4a2b5
Reviewed-on: https://code.wireshark.org/review/10907
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-10-13 07:36:30 +00:00
Gerald Combs 81d8b7dcdc CMake: Don't clobber ZLIB_*.
On Windows we set a few (but not all) ZLIB_* variables, then depend on
FindZLIB to fill in the rest. Make sure FindZLIB doesn't unset everything
the first time we run CMake.

Bug: 11569
Change-Id: I199c83570c29343466b9ff63080b6a964dfd8d73
Reviewed-on: https://code.wireshark.org/review/10843
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-06 21:41:25 +00:00
Guy Harris 12c83d02cc Report an error if we don't find fop and are going to try to use it.
Change-Id: Ide5c43b797a2fa07c7d3c7f986d306a158d68c6b
Reviewed-on: https://code.wireshark.org/review/10840
Reviewed-by: Guy Harris <guy@alum.mit.edu>
(cherry picked from commit 6c45d217d9d4fbf2a4dbc17d0b92334e3bc93052)
Reviewed-on: https://code.wireshark.org/review/10841
2015-10-06 18:46:00 +00:00
Graham Bloice 1e8ad87d46 Cosmetic tidy up for the projects in the Visual Studio solution
Change-Id: Ie4ed28ee7e59def2e8a15433334988b4d0225d1d
Reviewed-on: https://code.wireshark.org/review/10675
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-09-28 20:26:20 +00:00
Gerald Combs 7f60878be1 Add FOP 2.0 to the search list.
Change-Id: Ifc462a69e28b875f05770c453b06689c69008c52
Reviewed-on: https://code.wireshark.org/review/10235
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-24 16:04:10 +00:00
Gerald Combs c4b93e9496 CMake: Fixup appending to WS_WIN_LIBS
In the world of CMake calling "set" with multiple values creates a
semicolon-separated list. For WS_WIN_LIBS we want a single string so we
need to call "set" with a single, quoted value.

Change-Id: I96c5085af58adfb97ce16195eb27cc8ddb612d6a
Reviewed-on: https://code.wireshark.org/review/10158
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-08-20 19:56:22 +00:00
Hadriel Kaplan ba69473c87 Link setargv.obj for Windows in CMake so mergecap works
Try it again.

Change-Id: I511dd3d7d70fa33e246085c8cb79925e92945ebc
Reviewed-on: https://code.wireshark.org/review/10148
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-08-20 12:49:41 +00:00
Hadriel Kaplan 3b5a1f257f Link setargv.obj for Windows in CMake so mergecap works
Mergecap needs setargv.obj in order to get wildcard support. This is linked
in nmake but not cmake.

Bug: 10354
Change-Id: Icccf6b36495ac4b376f651d689b4a1f9e2c6042d
Reviewed-on: https://code.wireshark.org/review/10143
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-08-20 03:33:29 +00:00
Gerald Combs c643cbfb81 Run abicheck commands at compile time.
The CMake dumpbabi targets collectively copy over 800 files. Do
that when when we build the actual targets instead of at configure
time. Hopefully this will speed up initial CMake runs.

Change-Id: I6e4d691e24c73ea05d638a0f897f570541c84e38
Reviewed-on: https://code.wireshark.org/review/10052
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-16 16:04:47 +00:00
Gerald Combs 394773ccae Switch the guides back to html output.
DocBook's xhtml5 stylesheet output didn't render correctly in Firefox.

This reverts commit dc09d18e8e.
This reverts commit 62e56ad92a.
This reverts commit 53a80334bc.

Change-Id: Iafcf18cfce25772146fc2e155728401fd105a44b
Reviewed-on: https://code.wireshark.org/review/9944
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-09 16:16:24 +00:00
Gerald Combs 0626e766cf CMake: Try to fix generated docbook dependencies.
Add custom {developer,user}_guide_docbook targets for docbook output. Make
sure the HTML, PDF, and CHM outputs depend on their associated docbook
target and not on the output .xml file. This keeps us from running a2x
instances in parallel.

Change-Id: I73b0db50ae92f62eb08ae284d498cdf2d697ac00
Reviewed-on: https://code.wireshark.org/review/9920
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-08 21:51:56 +00:00
Gerald Combs 62e56ad92a Make sure we use "*.html" in our chunked output.
Change-Id: Idb441084ec50ec336b7f514895aba799832e8f66
Reviewed-on: https://code.wireshark.org/review/9879
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-05 18:01:28 +00:00
Gerald Combs 53a80334bc Generate XHTML5 documentation.
When converting from DocBook to HTML, use DocBook's xhtml5 XSL
stylesheets.

Change-Id: I7a49d60c46a17e1e639b78ee10c4b9fa832d4a77
Reviewed-on: https://code.wireshark.org/review/9878
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-05 16:42:03 +00:00
Joerg Mayer 8fdd49aaa1 Duplicate CheckCCompilerFlag for CXX.
Correctly detect that XCode7Beta1 does not support -fno-delete-null-pointer-checks
  by adding a new regex.

Change-Id: I76e0b6bb72094e6e75dae9be97bc7ee8e7051792
Reviewed-on: https://code.wireshark.org/review/9552
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-07-08 07:16:01 +00:00
Alexis La Goutte 9d8b810127 Lemon: Update lemon tools
Update from SQLite trunk (19 April 2015)

Add include <config.h>

Fix warning: unused parameter 'argc' [-Wunused-parameter] (using _U_)

Fix implicit conversion loses integer precision

Fix comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]

Fix function declaration isn’t a prototype [-Wstrict-prototypes]

Fix warning: old-style function definition [-Wold-style-definition]

Fix trailing whitespace

Fix use -T for template for epan\Makefile.nmake, epan\dfilter\Makefile.nmake, plugins\mate\Makefile.nmake, plugins\tpg\Makefile.nmake and cmake/modules/UseLemon.cmake

Fix -Wmissing-prototypes Remove unused function (acttab_free)

Add basename the filename with only filename (no path...)

Fix lemon.c:3435: warning: implicit conversion shortens 64-bit value into a 32-bit value

Add "new" version of lempar.c (3 November 2009).

LEMPAR: fix trailing whitespace

LEMPAR: fix -Wunused-parameter

Change-Id: I2df7e39c9a6846de26743a981fb76aca423fe813
Reviewed-on: https://code.wireshark.org/review/6502
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-02 08:49:02 +00:00
Peter Wu cb0ee6447b cmake/add_lemon_files: depend on lemon and lempar
Add a dependency on the lemon binary and lempar.c files because the
output depends on these tools. This is already done for autotools and
nmake.

In addition, clean up the generated .h and .out files.

Change-Id: Ic1fa2c23949abf05e976a67d226c90293b2ce834
Reviewed-on: https://code.wireshark.org/review/9139
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-06-25 18:52:20 +00:00
Joerg Mayer 0a28aa4a1d Revert commit cc8ed845ed
Author: Maarten Bezemer <maarten.bezemer@gmail.com>
Date:   Wed Nov 12 13:39:07 2014 +0100

    Invoke asn2wrs.py using a custom command

Fixes  bugid 11304

Once there is a better solution feel free to revert the revert.

Change-Id: Id64b621c5f3b8a934ce9ec5c3c127326efab46f2
Reviewed-on: https://code.wireshark.org/review/9122
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-06-25 07:40:05 +00:00
Graham Bloice 97dfbf565c Add PortAudio to Windows CMake build
Change-Id: I774ff0bf858280f2a5aa551ae1a5e23eedf8dc20
Reviewed-on: https://code.wireshark.org/review/8848
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-06-09 13:12:19 +00:00
Jeff Morriss 032ad5a7aa Update how we search for Lua with pkg-config.
First, search for packages with the version number without the period (bug
11219).

Second, don't look for Lua 5.3 because we don't work with it.  If what we find
(without pkg-config's help) is Lua 5.3, disable Lua support (bug 10881).

Cmake support by Peter Wu (originally Ie73e5b53640f10432881a9671c0a605f7f027ed8):
Note the check for "lua<=5.2.99" instead of "lua<5.3" since cmake does not
support the latter syntax. Tested with lua5.2, lua5.1 and lua (5.3) installed.

Bug: 11219
Ping-Bug: 10881
Change-Id: I382d07ca00eafc6111cd4e9faa2b66f6b8f95b6e
Reviewed-on: https://code.wireshark.org/review/8783
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-06-08 08:13:09 +00:00
Graham Bloice e15513be9d Fix Windows asciidoc build
Replace some unixisms with CMake equivalents

Change-Id: I8dc125e830cdf7c31b13539c0a86df736097afef
Reviewed-on: https://code.wireshark.org/review/8208
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-04-28 15:43:48 +00:00
Graham Bloice 4e9ff477d9 CMake minor updates
Fix up generation messages for Windows build
Remove some superfluous Lua messages

Change-Id: I405e7edfcb043fc842fe4f0cca8d23d5755527f9
Reviewed-on: https://code.wireshark.org/review/8138
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-04-20 16:46:38 +00:00
Gerald Combs 495740f801 CMake: Initial PortableApps targets.
Add portableapps_app_dir and portableapps_package targets.

Change-Id: Ifea3d952eef0e267de6364999d45807236d99102
Reviewed-on: https://code.wireshark.org/review/8025
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-04-14 19:11:50 +00:00
Gerald Combs 1404605513 Start moving win-setup to PowerShell.
Add win-setup.ps1, which duplicates the following tasks performed by
config.nmake + Makefile.nmake + win-setup.sh:

- Create the windows library directory.
- Download files.
- Download and unpack zip files.
- Check and set current-tag.txt

Don't verify applications or libraries. CMakeLists.txt does that.

Update the Developer's Guide.

Have POWERSHELL_COMMAND use dot sourcing instead of "-File", which
appears to be a synonym for "-IgnoreTheExitStatusReturnedByThisScript".

This removes our dependencies on unzip and wget and reduces our dependency
on bash.

Change-Id: Ia9def24acbe183d81b9d477fa42e655e4a3a6614
Reviewed-on: https://code.wireshark.org/review/7990
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-04-14 19:09:30 +00:00
Graham Bloice 01947acc5a CMake updates for Windows build
Removed the redundant setpath batch file and associated macro
and updated docs.

Change-Id: I5ddab6bad2d14ed3443194d7269f1890e4aa608e
Reviewed-on: https://code.wireshark.org/review/7826
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-03-26 16:58:53 +00:00
Graham Bloice 680dfc1e2f CMake cleanup for VS solution
Add FOLDER properties to targets to tidy up the VS solution

Change-Id: Ia42e0e89fb490cd3dcd33b7c5f59eb0a27b74c7a
Reviewed-on: https://code.wireshark.org/review/7822
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-03-26 10:35:30 +00:00
Peter Wu ffecd088dd FindPOD: fix link to CSS
docbook/Makefile.am uses --stylesheet=ws.css too, without this change
the generated HTML will point to the source directory...

Change-Id: I351cb658c404a08655201933158f91765f8d9c35
Reviewed-on: https://code.wireshark.org/review/7503
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-25 14:32:00 +00:00
Peter Wu 68698db8cc Always use html2text.py for FAQ, improve output
A recent commit broke compilation with Python 3. The original author of
html2text.py is deceased and the fork has increased the number of files
for this "simple" helper.

The html2text.py script in this patch was rewritten and its output
matches with lynx (except for a few newlines around lists). This means
that indentation has been added for headings, paragraphs and lists.
Also, since it was written from scratch, a new license could be chosen
that matches Wireshark.

Since now the in-tree html2text.py script provides nicer output, remove
detection of the alternative programs (elinks, links). lynx/w3m is
somehow still necessary for asciidoc though.

(I also looked into reusing html2text.py for the release notes to
replace asciidoc, but the --format=html output produces different output
(HTML adds a ToC and section numbers). For now still require lynx for
release notes)

Tested with Python 2.6.6, 2.7.9, 3.2.6 and 3.4.3 under LC_ALL=C and
LC_ALL=en_US.UTF-8 on Linux. Tested reading from stdin and file, writing
to file, pipe and tty. Tested with cmake (Ninja) and autotools on Arch
Linux x86_64. Test:

    # For each $PATH per python version, execute (with varying LC_ALL)
    help/faq.py -b | tools/html2text.py /dev/stdin | md5sum
    help/faq.py -b | tools/html2text.py | md5sum
    help/faq.py -b | tools/html2text.py
    help/faq.py -b | tools/html2text.py >/dev/null

Change-Id: I6409450a3e6c8b010ca082251f9db7358b0cc2fd
Reviewed-on: https://code.wireshark.org/review/7779
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-25 07:08:52 +00:00
Guy Harris 083f6b6e6d Have a #define for whether the capture buffer size can be set.
It can be set if either 1) this is Windows (where we're assumed to be
using WinPcap, which includes calls to set the buffer size) or 2) we
have pcap_create() (in which case we also have pcap_set_buffer_size(),
at least in a normal libpcap release).

Use that rather than testing "defined(_WIN32) ||
defined(HAVE_PCAP_CREATE)"; that makes it a bit more obvious what's
being tested.

Change-Id: Id9f8455019d19206b04dd6820a748cb97ae5ad12
Reviewed-on: https://code.wireshark.org/review/7816
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-25 03:22:33 +00:00
Gerald Combs 2ef72cb7aa CMake: Add a top-level nsis_package target.
Add packaging/nsis/CMakeLists.txt and use it to generate each NSIS include
file. Add macros to generate packaging-related targets and invoke them
from the top-level CMakeLists.txt.

Add a top-level "plugins" target. Copy plugins to "plugins" in each of
our staging directories instead of "plugins/$VERSION".

Add missing files to the copy_data_files and copy_cli_dlls targets.

Add all files in the NSIS package from the staging directory.

Drop a bunch of no-longer-needed defines, e.g. MSVC_VARIANT.

Change-Id: Ib1079260d164c65118050f1431af8e582cd577fa
Reviewed-on: https://code.wireshark.org/review/6459
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-12 22:47:42 +00:00
Gerald Combs 9a5cd7d92b Fix the exec call and paths in the test wrapper.
Change-Id: Ie36e9c7dc9a60715248aea300cffde8040cb0768
Reviewed-on: https://code.wireshark.org/review/7574
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-07 05:04:32 +00:00
Gerald Combs b6ecff700f Try adding "set -o igncr".
Maybe the test wrapper should be a Python script.

Change-Id: I38a5089c83ef643fb6c7c76acd599cef6aba39f4
Reviewed-on: https://code.wireshark.org/review/7572
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-07 04:31:02 +00:00
Gerald Combs acb62f1c7f CMake: Generate a wrapper for test.sh.
Create a wrapper script that cd's to the test directory and execs
test.sh. We need to handle build configurations so the path is a bit
roundabout.

Change-Id: I4c2a48c041bce2479422830110b1251b3f2c5a94
Reviewed-on: https://code.wireshark.org/review/7570
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-07 02:02:19 +00:00
Gerald Combs 6e6a1291d0 CMake: Set an output directory for plugins.
Redefine PLUGIN_DIR similar to DATAFILE_DIR and use it on all
platforms. Add WiresharkPlugin.cmake so that we can start defining common
macros for plugins/*/CMakeLists.txt. Load plugins in out-of-tree builds.

Change-Id: I8c1359ed3cf8a71788b8320ff89dfe2d3969def2
Reviewed-on: https://code.wireshark.org/review/6640
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-20 16:12:20 +00:00
Gerald Combs 7abb10341b CMake: Copy data files to the run directory.
Set DATAFILE_DIR to a value that includes the build configuration. Add a
copy_data_files target that copies AUTHORS-SHORT, the default filters,
and other support files to the run directory. Add FindPowerShell.cmake
and require it on Windows. Remove some OS X BUNDLE_RESOURCE_
declarations which are now covered by copy_data_files.

Change-Id: Iade74946dd5ed2c54239036aa4970f9ffc4681a4
Reviewed-on: https://code.wireshark.org/review/6561
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-18 20:09:23 +00:00
Gerald Combs 9a19d6de54 CMake: Look for FOP and HHC only when needed.
FOP is only required for generating PDF output and HHC is only needed
for CHM output. Don't look for them unconditionally.

Change-Id: I7bec7d061c9e9e8b99431cab873e8c719469552c
Reviewed-on: https://code.wireshark.org/review/6539
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-14 23:27:41 +00:00
Gerald Combs 86fde7857f CMake: Copy wireshark-gtk dependent DLLs to the target directory.
Add a "copy_gtk_dlls" target similar to "copy_cli_dlls".

Change-Id: Id1df1d0ec00c46fccec90c4b8c0c8a2d2a14766a
Reviewed-on: https://code.wireshark.org/review/6527
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-14 17:32:15 +00:00
Gerald Combs a988253fef CMake: Copy libwireshark dependent DLLs to the target directory.
Add a "copy_cli_dlls" target which copies the DLLs required to run our
command line programs to the run directory.

Fix the spelling of "KERBEROS". Start filling in variables so that we
can populate config.nsh.

Change-Id: I9b3ed912dfbffecbf09f2893efa2c9d82e709521
Reviewed-on: https://code.wireshark.org/review/6513
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-13 19:25:10 +00:00
Jörg Mayer 63d8e44580 Fix ASCIIDOC detection broken by commit ae2888aeb2
Change-Id: I36cd42a9040e8f8ab2b11ff4211a1298663909a2
Reviewed-on: https://code.wireshark.org/review/6512
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-01-13 01:39:28 +00:00
Pascal Quantin 7d004dc887 Revert "Lemon: Update lemon tools"
This reverts commit 5855dd8d53.

This Lemon update fails to compile on OSX and triggers asserts on other platforms

Change-Id: I12a8a2bf32db31e5a9b0cb1a67a39724e30f3e91
Reviewed-on: https://code.wireshark.org/review/6496
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-01-11 19:57:45 +00:00
Alexis La Goutte 5855dd8d53 Lemon: Update lemon tools
Fix warning: declaration shadows a variable in the global scope [-Wshadow]

Add include <config.h>

Fix warning: unused parameter 'argc' [-Wunused-parameter] (using _U_)

Fix implicit conversion loses integer precision

Fix comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]

Fix function declaration isn’t a prototype [-Wstrict-prototypes]

Fix warning: old-style function definition [-Wold-style-definition]

Fix trailing whitespace

Fix use -T for template for epan\Makefile.nmake, epan\dfilter\Makefile.nmake, plugins\mate\Makefile.nmake, plugins\tpg\Makefile.nmake and cmake/modules/UseLemon.cmake

Fix -Wmissing-prototypes

Remove unused function (acttab_free)

Add basename the filename with only filename (no path...)

Change-Id: Ia79f61e29f828575df61cc89134c6c553044e86d
Reviewed-on: https://code.wireshark.org/review/3976
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-01-11 18:56:08 +00:00
Gerald Combs ae2888aeb2 CMake: Try to fix Cygwin a2x discovery.
Change-Id: I46ddd10ab533ff7114aa6a4241a9a261da19329c
Reviewed-on: https://code.wireshark.org/review/6487
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-11 17:44:17 +00:00
Graham Bloice b4f5b6e72b Update CMake "Project names" and Folders
This gives a more structured layout in Visual Studio

Change-Id: I0da87a3e5ec759c69aeee031366cf287485cdac2
Reviewed-on: https://code.wireshark.org/review/6485
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Graham Bloice <graham.bloice@trihedral.com>
2015-01-11 00:09:14 +00:00
Gerald Combs e54b5f052d CMake: Copy admonition graphics to the correct directory.
Change-Id: Iecba4000c487a90efedfc7547771539c3748a7f0
Reviewed-on: https://code.wireshark.org/review/6454
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-09 22:59:38 +00:00
Gerald Combs 8bd80e0191 CMake: Set WIRESHARK_TARGET_PLATFORM.
Set WIRESHARK_TARGET_PLATFORM near the top of CMakeLists.txt.  It's used
by a couple of our modules and will be used for NSIS packaging.

Change-Id: Ief43733bdf162998cd54ff3732f94c8baa3d1e11
Reviewed-on: https://code.wireshark.org/review/6458
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-09 22:21:41 +00:00
Gerald Combs 2bb26eaf2c CMake: Copy CHM graphics from the correct source.
Change-Id: Iea67bdaf8d83009c808bd39693fe273b3181ff76
Reviewed-on: https://code.wireshark.org/review/6452
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-09 18:29:13 +00:00
Gerald Combs 4f658999e6 CMake: Migrate to hhc.cmake.
Remove FindHHC.cmake in favor of CMake's FindHTMLHelp. Remove the
hhc.cmd wrapper.

Change-Id: I548e58d2264c74596e9067d5053b056c35089b3c
Reviewed-on: https://code.wireshark.org/review/6449
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-09 17:49:37 +00:00
Gerald Combs ffb6f10f4e CMake: Cygwin-ify the xmllint path as well.
Change-Id: I5e62ed6baeed3fcb76cdffd30666ad01713acd2a
Reviewed-on: https://code.wireshark.org/review/6439
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-09 17:02:21 +00:00
Joerg Mayer fb40fd31c3 Add a possible replacement for the cmd hack to work around hhc.exe
returning non-null on success.
To be invoked via "cmake -P hhc.cmake <single-arg>".

Change-Id: Ib2584379c512cbd7f437f36ef932b372fe02203a
Reviewed-on: https://code.wireshark.org/review/6440
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-01-09 01:36:33 +00:00
Gerald Combs 4bc8d0f9a8 CMake: Try to fix the xsltproc path.
Try to make the xsltproc path compatible with Cygwin. This is a blind
attempt to fix the Windows 8 buildbot. It works fine locally.

Change-Id: Ib9d55dd07c6b17cfddf313716227d347109d2103
Reviewed-on: https://code.wireshark.org/review/6438
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-09 01:11:29 +00:00
Joerg Mayer a2abf8b37f Fix CMake Warning "Argument not separated from preceding token by whitespace."
Change-Id: I1ecd3bd0081c2f69d4e4f21f84cb46d086b657a2
Reviewed-on: https://code.wireshark.org/review/6437
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-01-09 01:07:59 +00:00
Joerg Mayer ab717f222a Use the FindHTMLHelp.cmake provided by cmake to find the hhc.
Lower case some function/macro calls.

Change-Id: I57532e3b4701963b88a536a7ecfe7dfaf4be3d4c
Reviewed-on: https://code.wireshark.org/review/6436
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-01-09 01:04:14 +00:00
Gerald Combs 03f273a5ee HTML Help: Fix titles.
AsciiDoc converts single quotes into curly quote entities, which HTML
Help doesn't support. Use sed to fixup the title string.

We might want to drop HTML Help at some point.

Change-Id: I0c7d3be90c0de7dbac0f1367cc6ba323c7380939
Reviewed-on: https://code.wireshark.org/review/6435
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-09 00:35:19 +00:00
Gerald Combs 315cc729a8 CMake: Revert the release notes xsltproc command.
Should fix the release_notes_txt target.

Change-Id: Ie930c49ad34ad70070b8f7d28d79bee55f263c40
Reviewed-on: https://code.wireshark.org/review/6434
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-09 00:29:49 +00:00
Gerald Combs cd7408e526 CMake: Enable DocBook on Windows.
Add a wrapper script and CMake macros which lets us run Cygwin's a2x
from Windows. Add *another* wrapper script that ignores the return value
of hhc.exe.

Move the ASCIIDOC2DOCBOOK macro to FindASCIIDOC.cmake. Add FindHHC.cmake.
Add hints to FindFOP.cmake.

Use unique file names in the HTML Help chain in an attempt to avoid a
race condition.

To do:
- Fix curly quote in HHC title.

Change-Id: I9b154b7fbd02703656e2ab380199ec0a6db4e36d
Reviewed-on: https://code.wireshark.org/review/6379
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-08 22:05:38 +00:00
Guy Harris 5653fcedca No *pcap should have pcap_open() without the other remote extensions.
WinPcap 3.0 introduced pcap_open(); it also introduced
pcap_findalldevs_ex() and pcap_createsrcstr().  If you're going to put
pcap_open() in libpcap, there's not much point to doing so but not also
putting pcap_findalldevs_ex() and pcap_createsrcstr() there.

(And, in the future, there'll be support for remote capturing with
pcap_create() and pcap_activate(), with no need for pcap_createsrcstr(),
and a replacement for pcap_findalldevs() and pcap_findalldevs_ex(),
which we'll also check for.)

So there's no need to check for pcap_findalldevs_ex() or
pcap_createsrcstr().

Change-Id: I9323aad20136684d05d1e909326792a2f1408887
Reviewed-on: https://code.wireshark.org/review/6311
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-04 20:59:14 +00:00
Graham Bloice e7c4241ca8 Fix Windows x64 CMake build
Unfortunately Kerberos for Windows (kfw) has a different lib
name for x86 & x64.  Fix FindKERBEROS.cmake to check for both
lib names.

Change-Id: I525df6de099d4e50322226317bda8d93d7a8dd23
Reviewed-on: https://code.wireshark.org/review/6246
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-03 15:45:06 +00:00
Alexis La Goutte b5ff13ab61 UseLemon (CMake): Fix indent (use space)
Change-Id: I619d64d62d2fb96ab904d5ea15e3c37aa0319540
Reviewed-on: https://code.wireshark.org/review/5982
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-23 07:08:10 +00:00
Peter Wu fda12fb66d Fix Python 3 compatibility in LocatePythonModule
Regression introduced with cb345eb4bd.

Change-Id: I625432ac4572d2449cb6981a158e46c560a81f1a
Reviewed-on: https://code.wireshark.org/review/5883
Reviewed-by: Maarten Bezemer <maarten.bezemer@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-12-21 08:54:24 +00:00
Maarten Bezemer a73b89bec1 Use LocatePythonModule to locate asn2wrs.py
This reuses existing functionality and thereby making FindAsn2Wrs.cmake obsolete, resulting in a reduction of the cmake module maintaince load

Change-Id: Ic6ae53e65236246c0cbe86f8c2f066a2d034e0b9
Reviewed-on: https://code.wireshark.org/review/5805
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-18 07:43:22 +00:00
Maarten Bezemer cb345eb4bd Use LocatePythonModule to find make-dissector-reg.py in order to make UseMakeDissectorReg.cmake more generally (out-of-source) usable.
Add make-dissector-reg.py to the Debian packages.

Making it possible to generate out-of-source wireshark plugins.

Change-Id: I0bbe5b46205d39e229d31812341540b26a7336d6
Reviewed-on: https://code.wireshark.org/review/5802
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-18 07:42:39 +00:00
Maarten Bezemer 24965c608b Fix missing space
Change-Id: Ia56ff1d78d584ca062a714aac097c05034279e34
Reviewed-on: https://code.wireshark.org/review/5807
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-17 15:29:18 +00:00