aboutsummaryrefslogtreecommitdiffstats
path: root/README.msys2
blob: 23ba8b353f01a2aac79f41243a4aebde5b273419 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
This document contains instructions to build Wireshark natively on Windows
using GCC and MinGW-w64 with the MSYS2 distribution.

Steps to setup the build environment:

1. Download and install MSYS2 from https://www.msys2.org.

2. Open the MSYS2 MSYS shell.

3. Update with "pacman -Syu" as many times as necessary. You may also wish
   to install base-devel at this point: pacman -S base-devel. Anytime you
   want to run pacman it's recommended to do so from the MSYS shell.

4. Install pactoys for convenience:

     $ pacman -S pactoys

5. Install the dependencies. From the source directory run:

     $ ./tools/msys2-setup.sh --install-all
   
   Individual packages can be installed using pacboy:

     $ pacboy -S toolchain:x cmake:x ninja:x ccache:x

   There isn't a native git package provided with MSYS2 so it's recommended that
   you continue using the Git-For-Windows installer (or see [1]).

From this point on it's a typical ninja build:

1. Open the MSYS2 MINGW64 shell.

2. Create the build directory. This example will assume the build directory
   is under the source directory:

     $ cd $srcdir && mkdir build && cd build

3. Run cmake:

     $ cmake -DENABLE_CCACHE=Yes -DENABLE_WERROR=No ..

4. Build by running "ninja" in the build directory:

     $ ninja

Currently the Wireshark MinGW-w64 build using MSYS2 has the following
limitations:

* The ETW extcap (etwdump) does not build.

* Some optional dependencies are not available in the official MSYS2
  repositories. These are:

    - AirPcap
    - libsmi
    - Kerberos
    - Lua-unicode (Lua 5.1 is available and can be used instead)
    - SBC codec
    - BCG729 codec

* There is no Wireshark binary package available. More work is
  needed to implement this. To be decided if it will use NSIS or something
  else.

* Many compiler warnings to be fixed.

References:

[1]https://github.com/git-for-windows/git/wiki/Install-inside-MSYS2-proper