Add "Apply as filter" button to Coloring Rules Dialog
[metze/wireshark/wip.git] / README.macos
1 This file tries to help building Wireshark for macOS (The Operating
2 System Formerly Known As Mac OS X And Then OS X) (Wireshark does not
3 work on the classic Mac OS).
4
5 You must have the developer tools (called Xcode) installed.  For
6 versions of macOS up to and including Snow Leopard, Xcode 3 should be
7 available on the install DVD; Xcode 4 is available for download from
8 developer.apple.com and, for Lion and later releases, from the Mac App
9 Store.  See
10
11         http://guide.macports.org/chunked/installing.xcode.html
12
13 for details.  For Xcode 4, you will need to install the command-line
14 tools; select Preferences from the Xcode menu, select Downloads in the
15 Preferences window, and install Command Line Tools.
16
17 You must also have GLib and, if you want to build Wireshark as well as
18 TShark, you must have also Qt installed.  You can download precompiled
19 Qt packages and source code from
20
21         https://www.qt.io/download-open-source/
22
23 or use the tools/macos-setup.sh script described below.
24
25 You should have CMake installed; you can download binary distributions
26 for macOS from
27
28         https://cmake.org/download/
29
30 The Wireshark source includes an autoconf configure script; however,
31 that script cannot find recent versions of Qt for macOS, and will not
32 try to find macOS frameworks that Wireshark can use to improve the user
33 experience, so we don't recomment using the configure script.
34
35 The tools/macos-setup.sh script can be used to download, patch as
36 necessary, build as necessary, and install those libraries and the
37 libraries on which they depend, along with tools such as CMake; it will,
38 by default, also install other libraries that can be used by Wireshark
39 and TShark.  The versions of libraries and tools to download are
40 specified by variables set early in the script; you can comment out the
41 settings of optional libraries if you don't want them downloaded and
42 installed.  Before running the tools/macos-setup.sh script, and before
43 attempting to build Wireshark, make sure your PKG_CONFIG_PATH
44 environment variable's setting includes both /usr/X11/lib/pkgconfig and
45 /usr/local/lib/pkgconfig.
46
47 The tools/macos-setup.sh script must be run from the top-level source
48 directory.
49
50 If you wish to build the legacy (GTK+) UI you must have X11 and the X11
51 developer headers and libraries installed, as well as the Pango, ATK,
52 and GTK+ libraries; otherwise, you will not be able to build or install
53 GTK+.  The X11 and X11 SDK that come with macOS releases for releases
54 from Panther to Lion can be used to build and run Wireshark.  Mountain
55 Lion and later do not include X11; you should install X11 from
56 elsewhere, such as
57
58         http://xquartz.macosforge.org/
59
60 After you have installed those libraries:
61
62         make a directory in which Wireshark is to be built, separate
63         from the top-level source directory for Wireshark - it can be a
64         subdirectory of that top-level source directory;
65
66         cd to that directory, and run CMake, with an argument that is a
67         path to the top-level source directory;
68
69         when CMake finishes, run make to build Wireshark.
70
71 For example, to build Wireshark in a subdirectory of the top-level
72 source directory, named "build", do, from the top-level source
73 directory;
74
75         mkdir build
76         cd build
77         cmake ..
78         make
79
80 If you upgrade the major release of macOS on which you are building
81 Wireshark, we advise that, before you do any builds after the upgrade,
82 you remove the build directory and all its subdiretories, and repeat the
83 above process, re-running CMake and rebuilding from scratch.
84
85 On Snow Leopard (10.6) and later releases, if you are building on a
86 machine with a 64-bit processor (with the exception of the early Intel
87 Core Duo and Intel Core Solo machines, all Apple machines with Intel
88 processors have 64-bit processors), the C/C++/Objective-C compiler will
89 build 64-bit by default.
90
91 This means that you will, by default, get a 64-bit version of Wireshark.
92
93 One consequence of this is that, if you built and installed any required
94 or optional libraries for Wireshark on an earlier release of macOS, those
95 are probably 32-bit versions of the libraries, and you will need to
96 un-install them and rebuild them on your current version of macOS, to get
97 64-bit versions.
98
99 Some required and optional libraries require special attention if you
100 install them by building from source code on Snow Leopard and later
101 releases; the tools/macos-setup.sh script will handle that for you.
102
103 GLib - the GLib configuration script determines whether the system's
104 libiconv is GNU iconv or not by checking whether it has libiconv_open(),
105 and the compile will fail if that test doesn't correctly indicate
106 whether libiconv is GNU iconv.  In macOS, libiconv is GNU iconv, but the
107 64-bit version doesn't have libiconv_open(); a workaround for this is to
108 replace all occurrences of "libiconv_open" with "iconv_open" in the
109 configure script before running the script.  The tools/macos-setup.sh
110 setup script will patch GLib to work around this.
111
112 GTK+ - GTK+ 2.24.10, at least, doesn't build on Mountain Lion with the
113 CUPS printing backend - either the CUPS API changed incompatibly or the
114 backend was depending on non-API implementation details.  The
115 tools/macos-setup.sh setup script will, on Mountain Lion and later,
116 configure GTK+ with the CUPS printing backend disabled.
117
118 libgcrypt - the libgcrypt configuration script attempts to determine
119 which flavor of assembler-language routines to use based on the platform
120 type determined by standard autoconf code.  That code uses uname to
121 determine the processor type; however, in macOS, uname always reports
122 "i386" as the processor type on Intel machines, even Intel machines with
123 64-bit processors, so it will attempt to assemble the 32-bit x86
124 assembler-language routines, which will fail.  The workaround for this
125 is to run the configure script with the --disable-asm argument, so that
126 the assembler-language routines are not used.  The tools/macos-setup.sh
127 will configure libgcrypt with that option.
128
129 PortAudio - when compiling on macOS, the configure script for the
130 pa_stable_v19_20071207 version of PortAudio will cause certain
131 platform-dependent build environment #defines to be set in the Makefile
132 rules, and to cause a universal build to be done; those #defines will be
133 incorrect for all but one of the architectures for which the build is
134 being done, and that will cause a compile-time error on Snow Leopard.
135 Newer versions don't have this problem, but still fail to build on Lion
136 if a universal build is attempted.  The tools/macos-setup.sh script
137 downloads a newer version, and also suppresses the universal build.
138
139 GeoIP - Their man pages "helpfully" have an ISO 8859-1 copyright symbol
140 in the copyright notice, but macOS's default character encoding is
141 UTF-8.  sed on Mountain Lion barfs at the "illegal character sequence"
142 represented by an ISO 8859-1 copyright symbol, as it's not a valid UTF-8
143 sequence.  The tools/macos-setup.sh script uses iconv to convert the man
144 page files from ISO 8859-1 to UTF-8.
145
146 If you want to build Wireshark installer packages on a system that
147 doesn't include Xcode 3.x or earlier, you will need to install some
148 additional tools.  From the Xcode menu, select the Open Developer Tool
149 menu, and then select More Developer Tools... from that menu.  That will
150 open up a page on the Apple Developer Connection Web site; you may need
151 a developer account to download the additional tools.  Download the
152 Auxiliary Tools for Xcode package; when the dmg opens, drag all its
153 contents to the Contents/Applications subdirectory of the Xcode.app
154 directory (normally /Applications/Xcode.app/Contents/Applications); then
155 copy .../Contents/Applications/PackageMaker.app/Contents/MacOS/PackageMaker
156 to /usr/bin/packagemaker (the PackageMaker app, when run from the
157 command line rather than as a double-clicked app, is the packagemaker
158 command).