Commit Graph

20 Commits

Author SHA1 Message Date
Gerald Combs 17604f15a1 CMake+macOS: Make sure we're using the right Qt tools.
Qt5CoreConfigExtras.cmake sets Qt5::qmake. Use it to find the
corresponding path to macdeployqt and use those in osx-app.sh.

Change-Id: I2e67f0126e272fc95d40476b9bfc83ab38d73cee
Reviewed-on: https://code.wireshark.org/review/28359
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-06-21 03:32:27 +00:00
Gerald Combs 43a88c230f Fixup a couple of shellcheck "fixes".
Change-Id: If3e6acf28c22cbc98a26c7e12c449e27fdc1321e
Reviewed-on: https://code.wireshark.org/review/28164
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-06-08 23:18:57 +00:00
Gerald Combs f76f9a51b8 Fix a comparison.
Change-Id: Ibecdf6be6c6957afc176e6eb97f60f19b090b40c
Reviewed-on: https://code.wireshark.org/review/28091
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-06-07 21:25:39 +00:00
Gerald Combs 4905983845 More shellcheck checks and fixes.
Remove a libtool check while we're here.

Change-Id: I813add2031480f34ce89f268b541f8939016c2c7
Reviewed-on: https://code.wireshark.org/review/28066
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-06-07 18:11:12 +00:00
Guy Harris 1c1498834d Squelch some warning noise when dsymifying.
Change-Id: I1e6c05ce9d2f08abb7e3f86a95cc7b8f8af56ab2
Reviewed-on: https://code.wireshark.org/review/26124
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-26 21:52:35 +00:00
Guy Harris 7b3ce599ec Dsymify binary files.
See if that makes it possible for CrashReporter to fully symbolicate
crash dumps, so the user gets line numbers and the like in crash dumps
from the OS, and we get them if the user sends a crash dump to us.

Change-Id: I8bb48b2d2f6b3e23fea43c1a3bd3a5a9a97a5c2c
Reviewed-on: https://code.wireshark.org/review/26123
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-26 21:20:10 +00:00
Guy Harris eb2e910124 Remove more cruft.
There's no Wireshark.app/Contents/Resources/bin directory; remove the
variable containing its path, and the part of an error message that
refers to it.

Change-Id: Id41cc00a2671925c50b2075dd3e9d0f84d5bd921
Reviewed-on: https://code.wireshark.org/review/26039
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-23 04:55:37 +00:00
Guy Harris dfe22ab861 Get rid of the -sdkroot option; it doesn't affect anything.
Change-Id: I9797eea30594f5e48b21f1c2daede18777e690b1
Reviewed-on: https://code.wireshark.org/review/26036
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-23 04:44:47 +00:00
Guy Harris 316b858d28 Fix stripping of binaries.
Instead of using the never-defined $binpath (undefined going back to at
least Wireshark 1.0.0 - is it a leftover from the Inkscape version?),
use $bundle_binary_list, to strip all the executables with strip -ur.

(Not that we want to strip anything - we don't even want the debugging
symbols stripped! - but for cleanliness.)

Change-Id: I9c3520ffb418bf9dc206d3ccb55d347c208f3be2
Reviewed-on: https://code.wireshark.org/review/26033
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-23 04:39:02 +00:00
Guy Harris 434d1c9759 Remove a bunch of obsolete code.
We no longer have the code to create a bundle, as we rely on CMake
having done so, at least to the extent of populating the bundle with all
the files we've generated.  Get rid of the code that used to support it,
and the command-line options that are no longer necessary now that we no
longer build code bundles.

Don't have explicit lists of CLI or extcap binaries; instead, just look
for all plain files in Wireshark.app/Contents/MacOS that have read and
execute permissions for owner/group/user.  That way, we don't have to
update the script if we add new binaries or new directories of binaries.

Change-Id: I047296a7889bea71165eebde10f34bec6ea96cc5
Reviewed-on: https://code.wireshark.org/review/26032
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-23 04:23:04 +00:00
Guy Harris 529bb04910 Don't use find to find files to check for dependencies.
It may find files that aren't Mach-O binary files.  Instead, rename
cs_binary_list to bundle_binary_list, and use it when checking for
dependencies as well as when code-signing binaries.

Change-Id: I9d17a4ba137e494fbd38db1b62f5cc7e4b620fc9
Reviewed-on: https://code.wireshark.org/review/26028
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-23 01:09:45 +00:00
Guy Harris 9dcded61a1 Code-sign extcap binaries.
Change-Id: Icfca94774b929767560a06f873fbf90c3d0bebef
Reviewed-on: https://code.wireshark.org/review/26024
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-23 00:03:33 +00:00
Guy Harris eb2b8dd98a Check for dependencies in all subdirectories of $pkglib and $pkgexec.
Just use "find" to find plain files under $pkglib and $pkgexec; this
avoids trying to run otool on directories, which can cause it to stop
looking in $pkgexec/* past the extcap directory, and does try to run it
on the Qt frameworks in subdirectories under $pkglib.

Add a comment giving more details about the big command to find
dependencies.

Change-Id: Ife3c3a8493ca0b6ea28f1bb108f63714366abeed
Reviewed-on: https://code.wireshark.org/review/26003
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-22 20:00:36 +00:00
Guy Harris 05cd2b6c1c Update comments to reflect current reality.
Change-Id: Ie0fcc197ed8841b5f7098a5129b774507646f2de
Reviewed-on: https://code.wireshark.org/review/26001
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-22 18:53:54 +00:00
Guy Harris 0161a5ba52 Don't strip debugging symbols from the binaries in the macOS image.
Unstripped binaries should allow better stack traces in the
CrashReporter files.

Change-Id: Idb2f11cd664dc62331f3394dee09abcd4e88f897
Reviewed-on: https://code.wireshark.org/review/25977
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-22 00:01:50 +00:00
Guy Harris 70554429a6 Fix detection of file type.
Some versions of otool print the file name as the first line when you
run it with -hv, so that the line containing the file type is the fourth
line; others don't print it, so that it's the third line.  Instead, look
for the line that has MH_MAGIC.

Change-Id: Ib14f6b24f14069532263332e53a1e9895663641a
Reviewed-on: https://code.wireshark.org/review/25968
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-21 18:09:30 +00:00
Guy Harris 656c42646a Process all subdirectories of $pkgplugin as directories of plugins.
That way we don't have to change the script if we add new plugin
subdirectories.

Change-Id: Ic788807c723306e461b7c1f8721b48a46d4fff96
Reviewed-on: https://code.wireshark.org/review/25584
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-04 00:58:58 +00:00
Guy Harris d8551c4247 Handle separate directories for libwireshark and libwiretap plugins.
We now have "epan" and "wiretap" subdirectories of the plugin directory,
with the first containing libwireshark plugins and the second containing
libwiretap plugins.  Look for plugins in those directories, rather than
in the top-level plugin directory.

Bug: 14389
Change-Id: Ia3bd4d27e82215207e7a7dcfc8f91042bbc61737
Reviewed-on: https://code.wireshark.org/review/25577
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-03 18:39:51 +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
Gerald Combs 6172627534 Make osx-app.sh a configured file and remove Autotools targets.
Rename osx-app.sh to osx-app.sh.in and add the version to the plugin
path at configure time.

Instead up updating Autotools accordingly just remove the macOS
packaging targets. gf61c381b5a removed support for Autotools in
osx-app.sh and if anyone wants to build macOS packages I'd prefer that
they use the same toolchain as the buildbot.

Change-Id: Ide5205265bf8859a85b1afab68fa8f8285952bd3
Reviewed-on: https://code.wireshark.org/review/23839
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-10-06 04:33:55 +00:00