Delivering binary packages makes it much easier for the end-users to install Wireshark on their target system. This section will explain how the binary packages are made.
The Debian Package is built using dpkg-buildpackage, based on information found in the source tree under debian. See http://www.debian-administration.org/articles/336 for a more in-depth discussion of the build process.
In the wireshark directory, type:
$ dpkg-buildpackage -rfakeroot -us -uc
to build the Debian Package.
You can build an RPM package using the rpm-package
target. The package
version is derived from the current git HEAD, so you must build from a
git checkout.
The package is built using rpmbuild, which comes as standard on many flavours of Linux, including Red Hat, Fedora, and openSUSE. The process creates a clean build environment in ${CMAKE_BINARY_DIR}/packaging/rpm/BUILD each time the RPM is built. The settings that control the build are in ${CMAKE_SOURCE_DIR}/packaging/rpm/wireshark.spec.in. The generated SPEC file contains CMake flags and other settings for the RPM build environment. Many of these come from the parent CMake environment. Notable ones are:
-DCMAKE_INSTALL_PREFIX=/usr
to create a package
that installs into /usr.
-DBUILD_wireshark
).
-DENABLE_...
).
-G Ninja
).
In your build directory, type:
$ ninja rpm-package # ...or, if you're using GNU make... $ make rpm-package
to build the binary and source RPMs. When it is finished there will be a message stating where the built RPM can be found.
This might take a while | |
---|---|
This creates a tarball, extracts it, compiles Wireshark, and constructs
a package. This can take quite a long time. You can speed up the process
by using Ninja. If you’re using GNU make you can add the following to
your %_smp_mflags -j %(grep -c processor /proc/cpuinfo) |
Building the RPM package requires quite a few packages and libraries
including GLib, gcc
, bison
, flex
, Asciidoctor, and Qt development
tools such as uic
and moc
. The required Qt packages can usually be
obtained by installing the qt5-devel package. For a complete list of
build requirements, look for the “BuildRequires” lines in
packaging/rpm/wireshark.spec.in.
The macOS Package is built using macOS packaging tools, based on information found in the source tree under packaging/macosx. It must be built using CMake. In your build directory, type:
$ make dmg_package
to build the macOS Package.
The Nullsoft Install System is a free installer generator for Windows systems. Instructions on installing it can be found in Section 4.17, “Windows: NSIS (optional)”. NSIS is script based. You can find the main Wireshark installer generation script at packaging/nsis/wireshark.nsi.
When building with CMake you must first build the nsis_package_prep target, followed by the nsis_package target, e.g.
> msbuild /m /p:Configuration=RelWithDebInfo nsis_package_prep.vcxproj > msbuild /m /p:Configuration=RelWithDebInfo nsis_package.vcxproj
Splitting the packaging projects in this way allows for code signing.
This might take a while | |
---|---|
Please be patient while the package is compressed. It might take some time, even on fast machines. |
If everything went well, you will now find something like: wireshark-setup-2.6.5.exe in the packaging/nsis directory in your build directory.
PortableApps.com is an environment that lets users run popular applications from portable media such as flash drives and cloud drive services.
Install the PortableApps.com Platform. Install for “all users”, which
will place it in C:\PortableApps
. Add the following apps:
When building with CMake you must first build the nsis_package_prep target (which takes care of general packaging dependencies), followed by the portableapps_package target, e.g.
> msbuild /m /p:Configuration=RelWithDebInfo nsis_package_prep.vcxproj > msbuild /m /p:Configuration=RelWithDebInfo portableapps_package.vcxproj
This might take a while | |
---|---|
Please be patient while the package is compressed. It might take some time, even on fast machines. |
If everything went well, you will now find something like: WiresharkPortable2.6.5.paf.exe_ in the packaging/portableapps directory.