Fix directory containing compiled plugins in macOS.

They weren't getting put in the version-number subdirectory, so the
plugin loader wasn't finding them.

If that causes problems with codesign, then we need to either

	1) figure out how to make it work with codesign

or

	2) for macOS, not put plugins in a version-number subdirectory
	   ***AND*** change the plugin loading process not to look for
	   compiled in a version-number subdirectory.

Change-Id: I58d344b728d05369d35edef4e4e530f10034e930
Reviewed-on: https://code.wireshark.org/review/32000
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2019-02-12 19:02:07 -08:00
parent 80e33fffce
commit aa1f314464
2 changed files with 12 additions and 7 deletions

View File

@ -1409,14 +1409,19 @@ else()
endif()
if(ENABLE_APPLICATION_BUNDLE)
# codesign barfs if we put our plugins in a dotted version subdirectory,
# e.g. PlugIns/Wireshark/3.1/epan so leave the version component out
# for now.
#
# XXX - codesign barfs if we put our plugins in a dotted version
# subdirectory, e.g. PlugIns/Wireshark/3.1/epan, so we either
# need to figure out how to make it work, or need to leave the
# version component out *AND*, on macOS, look for compiled
# plugins in the plugins directory rather than in the dotted
# version subdirectory.
#
if(CMAKE_CFG_INTDIR STREQUAL ".")
set(_plugin_dir "${CMAKE_BINARY_DIR}/run/Wireshark.app/Contents/PlugIns/wireshark")
set(_plugin_dir "${CMAKE_BINARY_DIR}/run/Wireshark.app/Contents/PlugIns/wireshark/${PROJECT_RELEASE_VERSION}")
else()
# Xcode
set(_plugin_dir "${CMAKE_BINARY_DIR}/run/$<CONFIG>/Wireshark.app/Contents/PlugIns/wireshark")
# Xcode
set(_plugin_dir "${CMAKE_BINARY_DIR}/run/$<CONFIG>/Wireshark.app/Contents/PlugIns/wireshark/${PROJECT_RELEASE_VERSION}")
endif()
elseif(WIN32 AND NOT CMAKE_CFG_INTDIR STREQUAL ".")
set(_plugin_dir "${CMAKE_BINARY_DIR}/run/$<CONFIG>/${PLUGIN_VERSION_DIR}")

View File

@ -123,7 +123,7 @@ exclude_prefixes="$exclude_prefixes|$qt_frameworks_dir"
pkgexec="$bundle/Contents/MacOS"
#pkgres="$bundle/Contents/Resources"
pkglib="$bundle/Contents/Frameworks"
pkgplugin="$bundle/Contents/PlugIns/wireshark"
pkgplugin="$bundle/Contents/PlugIns/wireshark/@VERSION_MAJOR@.@VERSION_MINOR@"
# Set the 'macosx' directory, usually the current directory.
#resdir=$( pwd )