Remove version component from plugin path
Remove the major.minor version from the plugin path, i.e:
lib/plugins/X.Y/{epan,wiretap,codecs}
and use an unversioned path:
lib/plugins/{epan,wiretap,codecs}
Introduce a new naming policy for plugins that requires
name.so.ABI_VERSION.
This is a simplified filesystem layoutfor plugins some
important benefits such as:
* improves compatibility between Wireshark versions, because
a plugin that wasn't recompiled will be automatically picked
up, but only if it has a compatible ABI version in the file name.
* does not clash with Apple guidelines
* simpler for users to understand and apply
* just overall simpler and easier to maintain, removes a lot
of complexity from CMake code
It does impose more requirements on the plugin naming scheme
but this should be handled completely transparently
by the build system.
It would also be possible to add support for unversioned *.so file
extensions at the same time, although in ths case it is not possible
to support multiple Wireshark ABI versions with only *.so, of course.
This wasn't done here but it may or may not be a useful enhancement
in the future.
Follow-up to 90b16b4092
.
This commit is contained in:
parent
b51a3933ba
commit
b52d9173f8
|
@ -1609,24 +1609,6 @@ else()
|
||||||
endif()
|
endif()
|
||||||
set(EXTCAP_INSTALL_FULL_LIBDIR "${CMAKE_INSTALL_PREFIX}/${EXTCAP_INSTALL_LIBDIR}")
|
set(EXTCAP_INSTALL_FULL_LIBDIR "${CMAKE_INSTALL_PREFIX}/${EXTCAP_INSTALL_LIBDIR}")
|
||||||
|
|
||||||
if(APPLE)
|
|
||||||
#
|
|
||||||
# As https://developer.apple.com/library/archive/technotes/tn2206/_index.html
|
|
||||||
# says,
|
|
||||||
#
|
|
||||||
# "Note that a location where code is expected to reside cannot generally
|
|
||||||
# contain directories full of nested code, because those directories tend
|
|
||||||
# to be interpreted as bundles. So this occasional practice is not
|
|
||||||
# recommended and not officially supported. If you do do this, do not use
|
|
||||||
# periods in the directory names. The code signing machinery interprets
|
|
||||||
# directories with periods in their names as code bundles and will reject
|
|
||||||
# them if they don't conform to the expected code bundle layout."
|
|
||||||
#
|
|
||||||
set(PLUGIN_PATH_ID "${PROJECT_MAJOR_VERSION}-${PROJECT_MINOR_VERSION}")
|
|
||||||
else()
|
|
||||||
set(PLUGIN_PATH_ID "${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Directory where plugins and Lua dissectors can be found.
|
# Directory where plugins and Lua dissectors can be found.
|
||||||
if(WIN32 AND NOT USE_MSYSTEM)
|
if(WIN32 AND NOT USE_MSYSTEM)
|
||||||
set(PLUGIN_INSTALL_LIBDIR "plugins" CACHE INTERNAL "The plugin dir")
|
set(PLUGIN_INSTALL_LIBDIR "plugins" CACHE INTERNAL "The plugin dir")
|
||||||
|
@ -1634,8 +1616,6 @@ else()
|
||||||
set(PLUGIN_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/plugins" CACHE INTERNAL "The plugin dir")
|
set(PLUGIN_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/plugins" CACHE INTERNAL "The plugin dir")
|
||||||
endif()
|
endif()
|
||||||
set(PLUGIN_INSTALL_FULL_LIBDIR "${CMAKE_INSTALL_PREFIX}/${PLUGIN_INSTALL_LIBDIR}")
|
set(PLUGIN_INSTALL_FULL_LIBDIR "${CMAKE_INSTALL_PREFIX}/${PLUGIN_INSTALL_LIBDIR}")
|
||||||
set(PLUGIN_INSTALL_VERSION_LIBDIR "${PLUGIN_INSTALL_LIBDIR}/${PLUGIN_PATH_ID}")
|
|
||||||
set(PLUGIN_VERSION_DIR "plugins/${PLUGIN_PATH_ID}")
|
|
||||||
|
|
||||||
add_subdirectory( capture )
|
add_subdirectory( capture )
|
||||||
add_subdirectory( doc )
|
add_subdirectory( doc )
|
||||||
|
@ -1788,22 +1768,22 @@ endif()
|
||||||
|
|
||||||
if(ENABLE_APPLICATION_BUNDLE)
|
if(ENABLE_APPLICATION_BUNDLE)
|
||||||
if(CMAKE_CFG_INTDIR STREQUAL ".")
|
if(CMAKE_CFG_INTDIR STREQUAL ".")
|
||||||
set(_plugin_dir "${CMAKE_BINARY_DIR}/run/Wireshark.app/Contents/PlugIns/wireshark/${PLUGIN_PATH_ID}")
|
set(_plugin_dir "${CMAKE_BINARY_DIR}/run/Wireshark.app/Contents/PlugIns/wireshark")
|
||||||
else()
|
else()
|
||||||
# Xcode
|
# Xcode
|
||||||
set(_plugin_dir "${CMAKE_BINARY_DIR}/run/$<CONFIG>/Wireshark.app/Contents/PlugIns/wireshark/${PLUGIN_PATH_ID}")
|
set(_plugin_dir "${CMAKE_BINARY_DIR}/run/$<CONFIG>/Wireshark.app/Contents/PlugIns/wireshark")
|
||||||
endif()
|
endif()
|
||||||
if(CMAKE_CFG_INTDIR STREQUAL ".")
|
if(CMAKE_CFG_INTDIR STREQUAL ".")
|
||||||
set(_logray_plugin_dir "${CMAKE_BINARY_DIR}/run/Logray.app/Contents/PlugIns/logray/${PLUGIN_PATH_ID}")
|
set(_logray_plugin_dir "${CMAKE_BINARY_DIR}/run/Logray.app/Contents/PlugIns/logray")
|
||||||
else()
|
else()
|
||||||
# Xcode
|
# Xcode
|
||||||
set(_logray_plugin_dir "${CMAKE_BINARY_DIR}/run/$<CONFIG>/Logray.app/Contents/PlugIns/logray/${PLUGIN_PATH_ID}")
|
set(_logray_plugin_dir "${CMAKE_BINARY_DIR}/run/$<CONFIG>/Logray.app/Contents/PlugIns/logray")
|
||||||
endif()
|
endif()
|
||||||
elseif(MSVC AND NOT CMAKE_CFG_INTDIR STREQUAL ".")
|
elseif(MSVC AND NOT CMAKE_CFG_INTDIR STREQUAL ".")
|
||||||
set(_plugin_dir "${CMAKE_BINARY_DIR}/run/$<CONFIG>/${PLUGIN_VERSION_DIR}")
|
set(_plugin_dir "${CMAKE_BINARY_DIR}/run/$<CONFIG>/plugins")
|
||||||
set(_logray_plugin_dir ${_plugin_dir})
|
set(_logray_plugin_dir ${_plugin_dir})
|
||||||
else()
|
else()
|
||||||
set(_plugin_dir "${DATAFILE_DIR}/${PLUGIN_VERSION_DIR}")
|
set(_plugin_dir "${DATAFILE_DIR}/plugins")
|
||||||
set(_logray_plugin_dir ${_plugin_dir})
|
set(_logray_plugin_dir ${_plugin_dir})
|
||||||
endif()
|
endif()
|
||||||
set (PLUGIN_DIR ${_plugin_dir} CACHE INTERNAL "Build time plugin location.")
|
set (PLUGIN_DIR ${_plugin_dir} CACHE INTERNAL "Build time plugin location.")
|
||||||
|
@ -4103,7 +4083,7 @@ configure_package_config_file(WiresharkConfig.cmake.in
|
||||||
PATH_VARS
|
PATH_VARS
|
||||||
CMAKE_INSTALL_LIBDIR
|
CMAKE_INSTALL_LIBDIR
|
||||||
CMAKE_INSTALL_INCLUDEDIR
|
CMAKE_INSTALL_INCLUDEDIR
|
||||||
PLUGIN_INSTALL_VERSION_LIBDIR
|
PLUGIN_INSTALL_LIBDIR
|
||||||
EXTCAP_INSTALL_LIBDIR
|
EXTCAP_INSTALL_LIBDIR
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,15 @@ set(Wireshark_MINOR_VERSION @PROJECT_MINOR_VERSION@)
|
||||||
set(Wireshark_PATCH_VERSION @PROJECT_PATCH_VERSION@)
|
set(Wireshark_PATCH_VERSION @PROJECT_PATCH_VERSION@)
|
||||||
set(Wireshark_VERSION "@PROJECT_VERSION@")
|
set(Wireshark_VERSION "@PROJECT_VERSION@")
|
||||||
|
|
||||||
|
set(Wireshark_ABI_VERSION_EPAN @PROJECT_ABI_VERSION_EPAN@)
|
||||||
|
set(Wireshark_ABI_VERSION_WIRETAP @PROJECT_ABI_VERSION_WIRETAP@)
|
||||||
|
set(Wireshark_ABI_VERSION_CODEC @PROJECT_ABI_VERSION_CODEC@)
|
||||||
|
|
||||||
set(Wireshark_PLUGINS_ENABLED @HAVE_PLUGINS@)
|
set(Wireshark_PLUGINS_ENABLED @HAVE_PLUGINS@)
|
||||||
set(Wireshark_PLUGIN_LIBDIR "@PLUGIN_INSTALL_VERSION_LIBDIR@")
|
set(Wireshark_PLUGIN_SUFFIX_EPAN "${CMAKE_SHARED_MODULE_SUFFIX}.${Wireshark_ABI_VERSION_EPAN}")
|
||||||
|
set(Wireshark_PLUGIN_SUFFIX_WIRETAP "${CMAKE_SHARED_MODULE_SUFFIX}.${Wireshark_ABI_VERSION_WIRETAP}")
|
||||||
|
set(Wireshark_PLUGIN_SUFFIX_CODEC "${CMAKE_SHARED_MODULE_SUFFIX}.${Wireshark_ABI_VERSION_CODEC}")
|
||||||
|
set(Wireshark_PLUGIN_LIBDIR "@PLUGIN_INSTALL_LIBDIR@")
|
||||||
|
|
||||||
@PACKAGE_INIT@
|
@PACKAGE_INIT@
|
||||||
|
|
||||||
|
@ -18,9 +25,7 @@ set_and_check(Wireshark_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@/w
|
||||||
# which is not helpful because the variable is correct, it's just that the empty directories
|
# which is not helpful because the variable is correct, it's just that the empty directories
|
||||||
# were not created (also correctly, empty directories are just noise).
|
# were not created (also correctly, empty directories are just noise).
|
||||||
#
|
#
|
||||||
if(Wireshark_PLUGINS_ENABLED)
|
set(Wireshark_PLUGIN_INSTALL_DIR "@PACKAGE_PLUGIN_INSTALL_LIBDIR@")
|
||||||
set(Wireshark_PLUGIN_INSTALL_DIR "@PACKAGE_PLUGIN_INSTALL_VERSION_LIBDIR@")
|
|
||||||
endif()
|
|
||||||
set(Wireshark_EXTCAP_INSTALL_DIR "@PACKAGE_EXTCAP_INSTALL_LIBDIR@")
|
set(Wireshark_EXTCAP_INSTALL_DIR "@PACKAGE_EXTCAP_INSTALL_LIBDIR@")
|
||||||
|
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/WiresharkTargets.cmake")
|
include("${CMAKE_CURRENT_LIST_DIR}/WiresharkTargets.cmake")
|
||||||
|
|
|
@ -28,7 +28,7 @@ macro(SET_MODULE_INFO _plugin _ver_major _ver_minor _ver_micro _ver_extra)
|
||||||
add_definitions(-DPLUGIN_VERSION=\"${PLUGIN_VERSION}\")
|
add_definitions(-DPLUGIN_VERSION=\"${PLUGIN_VERSION}\")
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro(ADD_PLUGIN_LIBRARY _plugin _output_dir)
|
macro(ADD_PLUGIN_LIBRARY _plugin _output_dir _abi_version)
|
||||||
add_library(${_plugin} MODULE
|
add_library(${_plugin} MODULE
|
||||||
${PLUGIN_FILES}
|
${PLUGIN_FILES}
|
||||||
${PLUGIN_RC_FILE}
|
${PLUGIN_RC_FILE}
|
||||||
|
@ -38,6 +38,7 @@ macro(ADD_PLUGIN_LIBRARY _plugin _output_dir)
|
||||||
|
|
||||||
set_target_properties(${_plugin} PROPERTIES
|
set_target_properties(${_plugin} PROPERTIES
|
||||||
PREFIX ""
|
PREFIX ""
|
||||||
|
SUFFIX "${CMAKE_SHARED_MODULE_SUFFIX}.${_abi_version}"
|
||||||
LINK_FLAGS "${WS_LINK_FLAGS}"
|
LINK_FLAGS "${WS_LINK_FLAGS}"
|
||||||
FOLDER "Plugins"
|
FOLDER "Plugins"
|
||||||
LIBRARY_OUTPUT_DIRECTORY ${_output_dir}
|
LIBRARY_OUTPUT_DIRECTORY ${_output_dir}
|
||||||
|
@ -51,25 +52,25 @@ macro(ADD_PLUGIN_LIBRARY _plugin _output_dir)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro(ADD_WIRESHARK_EPAN_PLUGIN_LIBRARY _plugin)
|
macro(ADD_WIRESHARK_EPAN_PLUGIN_LIBRARY _plugin)
|
||||||
ADD_PLUGIN_LIBRARY(${_plugin} "${PLUGIN_DIR}/epan")
|
ADD_PLUGIN_LIBRARY(${_plugin} "${PLUGIN_DIR}/epan" ${PROJECT_ABI_VERSION_EPAN})
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro(ADD_WIRESHARK_WIRETAP_PLUGIN_LIBRARY _plugin)
|
macro(ADD_WIRESHARK_WIRETAP_PLUGIN_LIBRARY _plugin)
|
||||||
ADD_PLUGIN_LIBRARY(${_plugin} "${PLUGIN_DIR}/wiretap")
|
ADD_PLUGIN_LIBRARY(${_plugin} "${PLUGIN_DIR}/wiretap" ${PROJECT_ABI_VERSION_WIRETAP})
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro(ADD_WIRESHARK_CODEC_PLUGIN_LIBRARY _plugin)
|
macro(ADD_WIRESHARK_CODEC_PLUGIN_LIBRARY _plugin)
|
||||||
ADD_PLUGIN_LIBRARY(${_plugin} "${PLUGIN_DIR}/codecs")
|
ADD_PLUGIN_LIBRARY(${_plugin} "${PLUGIN_DIR}/codecs" ${PROJECT_ABI_VERSION_CODEC})
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro(ADD_LOGRAY_EPAN_PLUGIN_LIBRARY _plugin)
|
macro(ADD_LOGRAY_EPAN_PLUGIN_LIBRARY _plugin)
|
||||||
ADD_PLUGIN_LIBRARY(${_plugin} "${LOGRAY_PLUGIN_DIR}/epan")
|
ADD_PLUGIN_LIBRARY(${_plugin} "${LOGRAY_PLUGIN_DIR}/epan" ${PROJECT_ABI_VERSION_EPAN})
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro(INSTALL_PLUGIN _plugin _subfolder)
|
macro(INSTALL_PLUGIN _plugin _subfolder)
|
||||||
install(TARGETS ${_plugin}
|
install(TARGETS ${_plugin}
|
||||||
LIBRARY DESTINATION ${PLUGIN_INSTALL_VERSION_LIBDIR}/${_subfolder} NAMELINK_SKIP
|
LIBRARY DESTINATION ${PLUGIN_INSTALL_LIBDIR}/${_subfolder} NAMELINK_SKIP
|
||||||
RUNTIME DESTINATION ${PLUGIN_INSTALL_VERSION_LIBDIR}
|
RUNTIME DESTINATION ${PLUGIN_INSTALL_LIBDIR}
|
||||||
ARCHIVE DESTINATION ${PLUGIN_INSTALL_VERSION_LIBDIR}
|
ARCHIVE DESTINATION ${PLUGIN_INSTALL_LIBDIR}
|
||||||
)
|
)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
|
@ -19,9 +19,10 @@
|
||||||
/* Version number of Logray and associated utilities */
|
/* Version number of Logray and associated utilities */
|
||||||
#define LOG_VERSION "${LOG_PROJECT_VERSION}${VERSION_EXTRA}"
|
#define LOG_VERSION "${LOG_PROJECT_VERSION}${VERSION_EXTRA}"
|
||||||
|
|
||||||
#define PLUGIN_PATH_ID "${PLUGIN_PATH_ID}"
|
|
||||||
#define VERSION_FLAVOR "${VERSION_FLAVOR}"
|
#define VERSION_FLAVOR "${VERSION_FLAVOR}"
|
||||||
|
|
||||||
|
#define SHARED_MODULE_SUFFIX "${CMAKE_SHARED_MODULE_SUFFIX}"
|
||||||
|
|
||||||
/* Build wsutil with SIMD optimization */
|
/* Build wsutil with SIMD optimization */
|
||||||
#cmakedefine HAVE_SSE4_2 1
|
#cmakedefine HAVE_SSE4_2 1
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,11 @@ add_compile_definitions(
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(hello MODULE hello.c)
|
add_library(hello MODULE hello.c)
|
||||||
set_target_properties(hello PROPERTIES PREFIX "" DEFINE_SYMBOL "")
|
set_target_properties(hello PROPERTIES
|
||||||
|
PREFIX ""
|
||||||
|
SUFFIX "${Wireshark_PLUGIN_SUFFIX_EPAN}"
|
||||||
|
DEFINE_SYMBOL ""
|
||||||
|
)
|
||||||
target_link_libraries(hello epan)
|
target_link_libraries(hello epan)
|
||||||
|
|
||||||
# This is the normal installation target to CMAKE_INSTALL_PREFIX. It is relocatable
|
# This is the normal installation target to CMAKE_INSTALL_PREFIX. It is relocatable
|
||||||
|
|
|
@ -111,6 +111,9 @@ The following features are new (or have been significantly updated) since versio
|
||||||
* The personal binary plugins folder now has higher priority than the global
|
* The personal binary plugins folder now has higher priority than the global
|
||||||
folder.
|
folder.
|
||||||
|
|
||||||
|
* The binary plugins folder path no longer uses an X.Y version component. Plugins
|
||||||
|
are required to add the ABI version to the file name.
|
||||||
|
|
||||||
//=== Removed Features and Support
|
//=== Removed Features and Support
|
||||||
|
|
||||||
// === Removed Dissectors
|
// === Removed Dissectors
|
||||||
|
|
|
@ -551,12 +551,16 @@ machine code.
|
||||||
Wireshark looks for plugins in both a personal plugin folder and a
|
Wireshark looks for plugins in both a personal plugin folder and a
|
||||||
global plugin folder. Lua plugins are stored in the plugin folders;
|
global plugin folder. Lua plugins are stored in the plugin folders;
|
||||||
compiled plugins are stored in subfolders of the plugin folders, with
|
compiled plugins are stored in subfolders of the plugin folders, with
|
||||||
the subfolder name being the Wireshark minor version number (X.Y). There is
|
the subfolder name being the plugin binary type. Each Wireshark binary plugin
|
||||||
another hierarchical level for each Wireshark plugin type (libwireshark,
|
has one of three distinct types (libwireshark, libwiretap and codecs).
|
||||||
libwiretap and codecs). So for example the location for a libwireshark plugin
|
So for example the location for a libwireshark plugin
|
||||||
_foo.so_ (_foo.dll_ on Windows) would be _PLUGINDIR/X.Y/epan_
|
_foo.so_ (_foo.dll_ on Windows) would be _PLUGINDIR/epan_
|
||||||
(libwireshark used to be called libepan; the other folder names are _codecs_
|
(libwireshark used to be called libepan), for libwiretap it would be
|
||||||
and _wiretap_).
|
_PLUGINDIR/wiretap_ and for codecs _PLUGINDIR/codecs_.
|
||||||
|
|
||||||
|
Plugins should come with the ABI version appended to the filename, so the
|
||||||
|
complete example for an epan binary plugin would be _PLUGINDIR/epan_/foo.so.1_
|
||||||
|
for epan ABI version 1.
|
||||||
|
|
||||||
On Windows:
|
On Windows:
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,7 @@ app_lower=$(echo "$app_name" | tr '[:upper:]' '[:lower:]')
|
||||||
pkgexec="$bundle/Contents/MacOS"
|
pkgexec="$bundle/Contents/MacOS"
|
||||||
#pkgres="$bundle/Contents/Resources"
|
#pkgres="$bundle/Contents/Resources"
|
||||||
pkglib="$bundle/Contents/Frameworks"
|
pkglib="$bundle/Contents/Frameworks"
|
||||||
pkgplugin="$bundle/Contents/PlugIns/$app_lower/@PLUGIN_PATH_ID@"
|
pkgplugin="$bundle/Contents/PlugIns/$app_lower"
|
||||||
|
|
||||||
# Set the 'macosx' directory, usually the current directory.
|
# Set the 'macosx' directory, usually the current directory.
|
||||||
#resdir=$( pwd )
|
#resdir=$( pwd )
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
;Add your custom plugins directives here
|
;Add your custom plugins directives here
|
||||||
; Example:
|
; Example:
|
||||||
;File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\foo.dll"
|
;File "${STAGING_DIR}\plugins\epan\foo.dll.${ABI_VERSION_EPAN}"
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
#define EXTRA_INSTALLER_DIR "@EXTRA_INSTALLER_DIR@"
|
#define EXTRA_INSTALLER_DIR "@EXTRA_INSTALLER_DIR@"
|
||||||
#define VERSION @LOG_PROJECT_VERSION@
|
#define VERSION @LOG_PROJECT_VERSION@
|
||||||
#define PRODUCT_VERSION @LOG_PRODUCT_VERSION@
|
#define PRODUCT_VERSION @LOG_PRODUCT_VERSION@
|
||||||
|
#define ABI_VERSION_EPAN @PROJECT_ABI_VERSION_EPAN@
|
||||||
|
#define ABI_VERSION_WIRETAP @PROJECT_ABI_VERSION_WIRETAP@
|
||||||
|
#define ABI_VERSION_CODEC @PROJECT_ABI_VERSION_CODEC@
|
||||||
# Plugins
|
# Plugins
|
||||||
#define MAJOR_VERSION @PROJECT_MAJOR_VERSION@
|
#define MAJOR_VERSION @PROJECT_MAJOR_VERSION@
|
||||||
#define MINOR_VERSION @PROJECT_MINOR_VERSION@
|
#define MINOR_VERSION @PROJECT_MINOR_VERSION@
|
||||||
|
|
|
@ -890,23 +890,23 @@ SectionGroup "Plugins & Extensions" SecPluginsGroup
|
||||||
|
|
||||||
Section "Dissector Plugins" SecPlugins
|
Section "Dissector Plugins" SecPlugins
|
||||||
;-------------------------------------------
|
;-------------------------------------------
|
||||||
SetOutPath '$INSTDIR\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan'
|
SetOutPath '$INSTDIR\plugins\epan'
|
||||||
File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\falco-bridge.dll"
|
File "${STAGING_DIR}\plugins\epan\falco-bridge.dll.${ABI_VERSION_EPAN}"
|
||||||
SetOutPath '$INSTDIR\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\falco'
|
SetOutPath '$INSTDIR\plugins\falco'
|
||||||
File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\falco\cloudtrail.dll"
|
File "${STAGING_DIR}\plugins\falco\cloudtrail.dll.${ABI_VERSION_EPAN}"
|
||||||
!include "custom_plugins.txt"
|
!include "custom_plugins.txt"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "Tree Statistics Plugin" SecStatsTree
|
Section "Tree Statistics Plugin" SecStatsTree
|
||||||
;-------------------------------------------
|
;-------------------------------------------
|
||||||
SetOutPath '$INSTDIR\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan'
|
SetOutPath '$INSTDIR\plugins\epan'
|
||||||
File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\stats_tree.dll"
|
File "${STAGING_DIR}\plugins\epan\stats_tree.dll.${ABI_VERSION_EPAN}"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "Mate - Meta Analysis and Tracing Engine" SecMate
|
Section "Mate - Meta Analysis and Tracing Engine" SecMate
|
||||||
;-------------------------------------------
|
;-------------------------------------------
|
||||||
SetOutPath '$INSTDIR\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan'
|
SetOutPath '$INSTDIR\plugins\epan'
|
||||||
File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\mate.dll"
|
File "${STAGING_DIR}\plugins\epan\mate.dll.${ABI_VERSION_EPAN}"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "Configuration Profiles" SecProfiles
|
Section "Configuration Profiles" SecProfiles
|
||||||
|
|
|
@ -16,6 +16,10 @@
|
||||||
#define MINOR_VERSION @PROJECT_MINOR_VERSION@
|
#define MINOR_VERSION @PROJECT_MINOR_VERSION@
|
||||||
#define PRODUCT_VERSION @PRODUCT_VERSION@
|
#define PRODUCT_VERSION @PRODUCT_VERSION@
|
||||||
|
|
||||||
|
#define ABI_VERSION_EPAN @PROJECT_ABI_VERSION_EPAN@
|
||||||
|
#define ABI_VERSION_WIRETAP @PROJECT_ABI_VERSION_WIRETAP@
|
||||||
|
#define ABI_VERSION_CODEC @PROJECT_ABI_VERSION_CODEC@
|
||||||
|
|
||||||
#define VCREDIST_DIR "@VCREDIST_DIR@"
|
#define VCREDIST_DIR "@VCREDIST_DIR@"
|
||||||
#define VCREDIST_EXE "@VCREDIST_EXE@"
|
#define VCREDIST_EXE "@VCREDIST_EXE@"
|
||||||
|
|
||||||
|
|
|
@ -1039,24 +1039,24 @@ SectionEnd
|
||||||
|
|
||||||
Section "-Plugins & Extensions"
|
Section "-Plugins & Extensions"
|
||||||
|
|
||||||
SetOutPath '$INSTDIR\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\codecs'
|
SetOutPath '$INSTDIR\plugins\codecs'
|
||||||
File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\codecs\g711.dll"
|
File "${STAGING_DIR}\plugins\codecs\g711.dll.${ABI_VERSION_CODEC}"
|
||||||
!ifdef SPANDSP_FOUND
|
!ifdef SPANDSP_FOUND
|
||||||
File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\codecs\g722.dll"
|
File "${STAGING_DIR}\plugins\codecs\g722.dll.${ABI_VERSION_CODEC}"
|
||||||
File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\codecs\g726.dll"
|
File "${STAGING_DIR}\plugins\codecs\g726.dll.${ABI_VERSION_CODEC}"
|
||||||
!endif
|
!endif
|
||||||
!ifdef BCG729_FOUND
|
!ifdef BCG729_FOUND
|
||||||
File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\codecs\g729.dll"
|
File "${STAGING_DIR}\plugins\codecs\g729.dll.${ABI_VERSION_CODEC}"
|
||||||
!endif
|
!endif
|
||||||
File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\codecs\l16mono.dll"
|
File "${STAGING_DIR}\plugins\codecs\l16mono.dll.${ABI_VERSION_CODEC}"
|
||||||
!ifdef SBC_FOUND
|
!ifdef SBC_FOUND
|
||||||
File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\codecs\sbc.dll"
|
File "${STAGING_DIR}\plugins\codecs\sbc.dll.${ABI_VERSION_CODEC}"
|
||||||
!endif
|
!endif
|
||||||
!ifdef ILBC_FOUND
|
!ifdef ILBC_FOUND
|
||||||
File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\codecs\ilbc.dll"
|
File "${STAGING_DIR}\plugins\codecs\ilbc.dll.${ABI_VERSION_CODEC}"
|
||||||
!endif
|
!endif
|
||||||
!ifdef OPUS_FOUND
|
!ifdef OPUS_FOUND
|
||||||
File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\codecs\opus_dec.dll"
|
File "${STAGING_DIR}\plugins\codecs\opus_dec.dll.${ABI_VERSION_CODEC}"
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
; This should be a function or macro
|
; This should be a function or macro
|
||||||
|
@ -1068,23 +1068,23 @@ File "${STAGING_DIR}\profiles\Classic\colorfilters"
|
||||||
SetOutPath '$INSTDIR\profiles\No Reassembly'
|
SetOutPath '$INSTDIR\profiles\No Reassembly'
|
||||||
File "${STAGING_DIR}\profiles\No Reassembly\preferences"
|
File "${STAGING_DIR}\profiles\No Reassembly\preferences"
|
||||||
|
|
||||||
SetOutPath '$INSTDIR\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan'
|
SetOutPath '$INSTDIR\plugins\epan'
|
||||||
File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\ethercat.dll"
|
File "${STAGING_DIR}\plugins\epan\ethercat.dll.${ABI_VERSION_EPAN}"
|
||||||
File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\gryphon.dll"
|
File "${STAGING_DIR}\plugins\epan\gryphon.dll.${ABI_VERSION_EPAN}"
|
||||||
File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\irda.dll"
|
File "${STAGING_DIR}\plugins\epan\irda.dll.${ABI_VERSION_EPAN}"
|
||||||
File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\opcua.dll"
|
File "${STAGING_DIR}\plugins\epan\opcua.dll.${ABI_VERSION_EPAN}"
|
||||||
File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\profinet.dll"
|
File "${STAGING_DIR}\plugins\epan\profinet.dll.${ABI_VERSION_EPAN}"
|
||||||
File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\unistim.dll"
|
File "${STAGING_DIR}\plugins\epan\unistim.dll.${ABI_VERSION_EPAN}"
|
||||||
File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\wimax.dll"
|
File "${STAGING_DIR}\plugins\epan\wimax.dll.${ABI_VERSION_EPAN}"
|
||||||
File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\wimaxasncp.dll"
|
File "${STAGING_DIR}\plugins\epan\wimaxasncp.dll.${ABI_VERSION_EPAN}"
|
||||||
File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\wimaxmacphy.dll"
|
File "${STAGING_DIR}\plugins\epan\wimaxmacphy.dll.${ABI_VERSION_EPAN}"
|
||||||
!include "custom_plugins.txt"
|
!include "custom_plugins.txt"
|
||||||
|
|
||||||
SetOutPath '$INSTDIR\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\wiretap'
|
SetOutPath '$INSTDIR\plugins\wiretap'
|
||||||
File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\wiretap\usbdump.dll"
|
File "${STAGING_DIR}\plugins\wiretap\usbdump.dll.${ABI_VERSION_WIRETAP}"
|
||||||
|
|
||||||
SetOutPath '$INSTDIR\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan'
|
SetOutPath '$INSTDIR\plugins\epan'
|
||||||
File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\mate.dll"
|
File "${STAGING_DIR}\plugins\epan\mate.dll.${ABI_VERSION_EPAN}"
|
||||||
|
|
||||||
!ifdef SMI_DIR
|
!ifdef SMI_DIR
|
||||||
SetOutPath '$INSTDIR\snmp\mibs'
|
SetOutPath '$INSTDIR\snmp\mibs'
|
||||||
|
@ -1097,11 +1097,11 @@ File "${SMI_DIR}\share\yang\*.yang"
|
||||||
!include "custom_mibs.txt"
|
!include "custom_mibs.txt"
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
SetOutPath '$INSTDIR\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan'
|
SetOutPath '$INSTDIR\plugins\epan'
|
||||||
File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\transum.dll"
|
File "${STAGING_DIR}\plugins\epan\transum.dll.${ABI_VERSION_EPAN}"
|
||||||
|
|
||||||
SetOutPath '$INSTDIR\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan'
|
SetOutPath '$INSTDIR\plugins\epan'
|
||||||
File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\stats_tree.dll"
|
File "${STAGING_DIR}\plugins\epan\stats_tree.dll.${ABI_VERSION_EPAN}"
|
||||||
|
|
||||||
SectionEnd ; "Plugins / Extensions"
|
SectionEnd ; "Plugins / Extensions"
|
||||||
|
|
||||||
|
|
|
@ -188,8 +188,9 @@ set(WIX_CANDLE_DEFINES
|
||||||
-dPlatform=${WIRESHARK_TARGET_PLATFORM}
|
-dPlatform=${WIRESHARK_TARGET_PLATFORM}
|
||||||
-dWiresharkName=${CMAKE_PROJECT_NAME}
|
-dWiresharkName=${CMAKE_PROJECT_NAME}
|
||||||
-dWiresharkVersion=${PRODUCT_VERSION}
|
-dWiresharkVersion=${PRODUCT_VERSION}
|
||||||
-dWiresharkMajorVersion=${PROJECT_MAJOR_VERSION}
|
-dWiresharkAbiVersionEpan=${PROJECT_ABI_VERSION_EPAN}
|
||||||
-dWiresharkMinorVersion=${PROJECT_MINOR_VERSION}
|
-dWiresharkAbiVersionWtap=${PROJECT_ABI_VERSION_WIRETAP}
|
||||||
|
-dWiresharkAbiVersionCodec=${PROJECT_ABI_VERSION_CODEC}
|
||||||
-dAssetDir=${CMAKE_SOURCE_DIR}/packaging/wix
|
-dAssetDir=${CMAKE_SOURCE_DIR}/packaging/wix
|
||||||
-dBuildOutputDir=${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}
|
-dBuildOutputDir=${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}
|
||||||
-dDiameterDir=${ARCHIVE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/diameter
|
-dDiameterDir=${ARCHIVE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/diameter
|
||||||
|
|
|
@ -5,31 +5,31 @@
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<DirectoryRef Id="dirPluginsVersionEpan">
|
<DirectoryRef Id="dirPluginsVersionEpan">
|
||||||
<Component Id="cmpEthercat_dll" Guid="*">
|
<Component Id="cmpEthercat_dll" Guid="*">
|
||||||
<File Id="filEthercat_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\$(var.WiresharkMajorVersion).$(var.WiresharkMinorVersion)\epan\ethercat.dll" />
|
<File Id="filEthercat_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\epan\ethercat.dll.$(var.WiresharkAbiVersionEpan)" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmpGryphon_dll" Guid="*">
|
<Component Id="cmpGryphon_dll" Guid="*">
|
||||||
<File Id="filGryphon_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\$(var.WiresharkMajorVersion).$(var.WiresharkMinorVersion)\epan\gryphon.dll" />
|
<File Id="filGryphon_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\epan\gryphon.dll.$(var.WiresharkAbiVersionEpan)" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmpIrda_dll" Guid="*">
|
<Component Id="cmpIrda_dll" Guid="*">
|
||||||
<File Id="filIrda_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\$(var.WiresharkMajorVersion).$(var.WiresharkMinorVersion)\epan\irda.dll" />
|
<File Id="filIrda_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\epan\irda.dll.$(var.WiresharkAbiVersionEpan)" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmpOpcua_dll" Guid="*">
|
<Component Id="cmpOpcua_dll" Guid="*">
|
||||||
<File Id="filOpcua_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\$(var.WiresharkMajorVersion).$(var.WiresharkMinorVersion)\epan\opcua.dll" />
|
<File Id="filOpcua_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\epan\opcua.dll.$(var.WiresharkAbiVersionEpan)" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmpProfinet_dll" Guid="*">
|
<Component Id="cmpProfinet_dll" Guid="*">
|
||||||
<File Id="filProfinet_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\$(var.WiresharkMajorVersion).$(var.WiresharkMinorVersion)\epan\profinet.dll" />
|
<File Id="filProfinet_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\epan\profinet.dll.$(var.WiresharkAbiVersionEpan)" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmpUnistim_dll" Guid="*">
|
<Component Id="cmpUnistim_dll" Guid="*">
|
||||||
<File Id="filUnistim_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\$(var.WiresharkMajorVersion).$(var.WiresharkMinorVersion)\epan\unistim.dll" />
|
<File Id="filUnistim_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\epan\unistim.dll.$(var.WiresharkAbiVersionEpan)" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmpWimax_dll" Guid="*">
|
<Component Id="cmpWimax_dll" Guid="*">
|
||||||
<File Id="filWimax_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\$(var.WiresharkMajorVersion).$(var.WiresharkMinorVersion)\epan\wimax.dll" />
|
<File Id="filWimax_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\epan\wimax.dll.$(var.WiresharkAbiVersionEpan)" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmpWimaxasmcp_dll" Guid="*">
|
<Component Id="cmpWimaxasmcp_dll" Guid="*">
|
||||||
<File Id="filWimaxasmcp_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\$(var.WiresharkMajorVersion).$(var.WiresharkMinorVersion)\epan\wimaxasncp.dll" />
|
<File Id="filWimaxasmcp_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\epan\wimaxasncp.dll.$(var.WiresharkAbiVersionEpan)" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmpWimaxmacphy_dll" Guid="*">
|
<Component Id="cmpWimaxmacphy_dll" Guid="*">
|
||||||
<File Id="filWimaxmacphy_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\$(var.WiresharkMajorVersion).$(var.WiresharkMinorVersion)\epan\wimaxmacphy.dll" />
|
<File Id="filWimaxmacphy_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\epan\wimaxmacphy.dll.$(var.WiresharkAbiVersionEpan)" />
|
||||||
</Component>
|
</Component>
|
||||||
<!-- Add custom plugin Components here -->
|
<!-- Add custom plugin Components here -->
|
||||||
</DirectoryRef>
|
</DirectoryRef>
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<DirectoryRef Id="dirPluginsVersionEpan">
|
<DirectoryRef Id="dirPluginsVersionEpan">
|
||||||
<Component Id="cmpStatsTree_dll" Guid="*">
|
<Component Id="cmpStatsTree_dll" Guid="*">
|
||||||
<File Id="filStatsTree_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\$(var.WiresharkMajorVersion).$(var.WiresharkMinorVersion)\epan\stats_tree.dll" />
|
<File Id="filStatsTree_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\epan\stats_tree.dll.$(var.WiresharkAbiVersionEpan)" />
|
||||||
</Component>
|
</Component>
|
||||||
</DirectoryRef>
|
</DirectoryRef>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<DirectoryRef Id="dirPluginsVersionEpan">
|
<DirectoryRef Id="dirPluginsVersionEpan">
|
||||||
<Component Id="cmpMate_dll" Guid="*">
|
<Component Id="cmpMate_dll" Guid="*">
|
||||||
<File Id="filMate_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\$(var.WiresharkMajorVersion).$(var.WiresharkMinorVersion)\epan\mate.dll" />
|
<File Id="filMate_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\epan\mate.dll.$(var.WiresharkAbiVersionEpan)" />
|
||||||
</Component>
|
</Component>
|
||||||
</DirectoryRef>
|
</DirectoryRef>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<DirectoryRef Id="dirPluginsVersionEpan">
|
<DirectoryRef Id="dirPluginsVersionEpan">
|
||||||
<Component Id="cmpTransum_dll" Guid="*">
|
<Component Id="cmpTransum_dll" Guid="*">
|
||||||
<File Id="filTransum_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\$(var.WiresharkMajorVersion).$(var.WiresharkMinorVersion)\epan\transum.dll" />
|
<File Id="filTransum_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\epan\transum.dll.$(var.WiresharkAbiVersionEpan)" />
|
||||||
</Component>
|
</Component>
|
||||||
</DirectoryRef>
|
</DirectoryRef>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
@ -95,7 +95,7 @@
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<DirectoryRef Id="dirPluginsVersionWtap">
|
<DirectoryRef Id="dirPluginsVersionWtap">
|
||||||
<Component Id="cmpUsbdump_dll" Guid="*">
|
<Component Id="cmpUsbdump_dll" Guid="*">
|
||||||
<File Id="filUsbdump_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\$(var.WiresharkMajorVersion).$(var.WiresharkMinorVersion)\wiretap\usbdump.dll" />
|
<File Id="filUsbdump_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\wiretap\usbdump.dll.$(var.WiresharkAbiVersionWtap)" />
|
||||||
</Component>
|
</Component>
|
||||||
</DirectoryRef>
|
</DirectoryRef>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
@ -109,28 +109,28 @@
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<DirectoryRef Id="dirPluginsVersionCodecs">
|
<DirectoryRef Id="dirPluginsVersionCodecs">
|
||||||
<Component Id="cmpG711_dll" Guid="*">
|
<Component Id="cmpG711_dll" Guid="*">
|
||||||
<File Id="filG711_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\$(var.WiresharkMajorVersion).$(var.WiresharkMinorVersion)\codecs\g711.dll" />
|
<File Id="filG711_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\codecs\g711.dll.$(var.WiresharkAbiVersionCodec)" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmpG722_dll" Guid="*">
|
<Component Id="cmpG722_dll" Guid="*">
|
||||||
<File Id="filG722_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\$(var.WiresharkMajorVersion).$(var.WiresharkMinorVersion)\codecs\g722.dll" />
|
<File Id="filG722_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\codecs\g722.dll.$(var.WiresharkAbiVersionCodec)" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmpG726_dll" Guid="*">
|
<Component Id="cmpG726_dll" Guid="*">
|
||||||
<File Id="filG726_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\$(var.WiresharkMajorVersion).$(var.WiresharkMinorVersion)\codecs\g726.dll" />
|
<File Id="filG726_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\codecs\g726.dll.$(var.WiresharkAbiVersionCodec)" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmpG729_dll" Guid="*">
|
<Component Id="cmpG729_dll" Guid="*">
|
||||||
<File Id="filG729_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\$(var.WiresharkMajorVersion).$(var.WiresharkMinorVersion)\codecs\g729.dll" />
|
<File Id="filG729_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\codecs\g729.dll.$(var.WiresharkAbiVersionCodec)" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmpL16mono_dll" Guid="*">
|
<Component Id="cmpL16mono_dll" Guid="*">
|
||||||
<File Id="filL16mono_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\$(var.WiresharkMajorVersion).$(var.WiresharkMinorVersion)\codecs\l16mono.dll" />
|
<File Id="filL16mono_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\codecs\l16mono.dll.$(var.WiresharkAbiVersionCodec)" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmpSBC_dll" Guid="*">
|
<Component Id="cmpSBC_dll" Guid="*">
|
||||||
<File Id="filSBC_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\$(var.WiresharkMajorVersion).$(var.WiresharkMinorVersion)\codecs\sbc.dll" />
|
<File Id="filSBC_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\codecs\sbc.dll.$(var.WiresharkAbiVersionCodec)" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmpILBC_dll" Guid="*">
|
<Component Id="cmpILBC_dll" Guid="*">
|
||||||
<File Id="filILBC_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\$(var.WiresharkMajorVersion).$(var.WiresharkMinorVersion)\codecs\ilbc.dll" />
|
<File Id="filILBC_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\codecs\ilbc.dll.$(var.WiresharkAbiVersionCodec)" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmpOPUS_dll" Guid="*">
|
<Component Id="cmpOPUS_dll" Guid="*">
|
||||||
<File Id="filOPUS_dec_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\$(var.WiresharkMajorVersion).$(var.WiresharkMinorVersion)\codecs\opus_dec.dll" />
|
<File Id="filOPUS_dec_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\codecs\opus_dec.dll.$(var.WiresharkAbiVersionCodec)" />
|
||||||
</Component>
|
</Component>
|
||||||
</DirectoryRef>
|
</DirectoryRef>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
|
|
@ -3,7 +3,7 @@ exec_prefix=${prefix}
|
||||||
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
|
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
|
||||||
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
|
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
|
||||||
sharedlibdir=${libdir}
|
sharedlibdir=${libdir}
|
||||||
plugindir=${libdir}/wireshark/@PLUGIN_VERSION_DIR@
|
plugindir=${libdir}/wireshark/plugins
|
||||||
|
|
||||||
Name: Wireshark
|
Name: Wireshark
|
||||||
Description: Network Protocol Analyzer (Packet Dissection Library)
|
Description: Network Protocol Analyzer (Packet Dissection Library)
|
||||||
|
|
12
tshark.c
12
tshark.c
|
@ -797,13 +797,13 @@ about_folders(void)
|
||||||
constpath = get_progfile_dir();
|
constpath = get_progfile_dir();
|
||||||
printf("%-21s\t%s\n", "Program:", constpath);
|
printf("%-21s\t%s\n", "Program:", constpath);
|
||||||
|
|
||||||
#ifdef HAVE_PLUGINS
|
if (plugins_supported()) {
|
||||||
/* pers plugins */
|
/* pers plugins */
|
||||||
printf("%-21s\t%s\n", "Personal Plugins:", get_plugins_pers_dir_with_version());
|
printf("%-21s\t%s\n", "Personal Plugins:", get_plugins_pers_dir());
|
||||||
|
|
||||||
/* global plugins */
|
/* global plugins */
|
||||||
printf("%-21s\t%s\n", "Global Plugins:", get_plugins_dir_with_version());
|
printf("%-21s\t%s\n", "Global Plugins:", get_plugins_dir());
|
||||||
#endif
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LUA
|
#ifdef HAVE_LUA
|
||||||
/* pers lua plugins */
|
/* pers lua plugins */
|
||||||
|
|
|
@ -267,13 +267,13 @@ FolderListModel::FolderListModel(QObject * parent):
|
||||||
/* program */
|
/* program */
|
||||||
appendRow(QStringList() << tr("Program") << get_progfile_dir() << tr("program files"));
|
appendRow(QStringList() << tr("Program") << get_progfile_dir() << tr("program files"));
|
||||||
|
|
||||||
#ifdef HAVE_PLUGINS
|
if (plugins_supported()) {
|
||||||
/* pers plugins */
|
/* pers plugins */
|
||||||
appendRow(QStringList() << tr("Personal Plugins") << get_plugins_pers_dir_with_version() << tr("binary plugins"));
|
appendRow(QStringList() << tr("Personal Plugins") << get_plugins_pers_dir() << tr("binary plugins"));
|
||||||
|
|
||||||
/* global plugins */
|
/* global plugins */
|
||||||
appendRow(QStringList() << tr("Global Plugins") << get_plugins_dir_with_version() << tr("binary plugins"));
|
appendRow(QStringList() << tr("Global Plugins") << get_plugins_dir() << tr("binary plugins"));
|
||||||
#endif
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LUA
|
#ifdef HAVE_LUA
|
||||||
/* pers plugins */
|
/* pers plugins */
|
||||||
|
|
|
@ -3301,7 +3301,7 @@ void WiresharkMainWindow::installPersonalBinaryPlugin()
|
||||||
QString caption = mainApp->windowTitleString(tr("Install plugin"));
|
QString caption = mainApp->windowTitleString(tr("Install plugin"));
|
||||||
|
|
||||||
// Get the plugin file path to install
|
// Get the plugin file path to install
|
||||||
QString plugin_filter = tr("Binary plugin (*%1)").arg(WS_PLUGIN_MODULE_SUFFIX);
|
QString plugin_filter = tr("Binary plugin (*%1 *%1.[0-9]*)").arg(WS_PLUGIN_MODULE_SUFFIX);
|
||||||
QString src_path = WiresharkFileDialog::getOpenFileName(this, caption, "", plugin_filter);
|
QString src_path = WiresharkFileDialog::getOpenFileName(this, caption, "", plugin_filter);
|
||||||
if (src_path.isEmpty()) {
|
if (src_path.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
|
@ -3341,6 +3341,10 @@ void WiresharkMainWindow::installPersonalBinaryPlugin()
|
||||||
// a way to load and unload plugins without having to restart the program.
|
// a way to load and unload plugins without having to restart the program.
|
||||||
QFileInfo file_info(src_path);
|
QFileInfo file_info(src_path);
|
||||||
QString file_name = file_info.fileName();
|
QString file_name = file_info.fileName();
|
||||||
|
if (file_name.endsWith(WS_PLUGIN_MODULE_SUFFIX)) {
|
||||||
|
// Append the version to our destination name
|
||||||
|
file_name = QString("%1.%2").arg(file_name).arg(plugins_abi_version(have_type));
|
||||||
|
}
|
||||||
if (type_dir.exists(file_name)) {
|
if (type_dir.exists(file_name)) {
|
||||||
reply = QMessageBox::question(this, caption,
|
reply = QMessageBox::question(this, caption,
|
||||||
tr("The file already exists. Do you want to overwrite it?"));
|
tr("The file already exists. Do you want to overwrite it?"));
|
||||||
|
|
|
@ -1139,9 +1139,7 @@ get_doc_dir(void)
|
||||||
* configure script.
|
* configure script.
|
||||||
*/
|
*/
|
||||||
static char *plugin_dir = NULL;
|
static char *plugin_dir = NULL;
|
||||||
static char *plugin_dir_with_version = NULL;
|
|
||||||
static char *plugin_pers_dir = NULL;
|
static char *plugin_pers_dir = NULL;
|
||||||
static char *plugin_pers_dir_with_version = NULL;
|
|
||||||
static char *extcap_pers_dir = NULL;
|
static char *extcap_pers_dir = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1252,16 +1250,6 @@ get_plugins_dir(void)
|
||||||
return plugin_dir;
|
return plugin_dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *
|
|
||||||
get_plugins_dir_with_version(void)
|
|
||||||
{
|
|
||||||
if (!plugin_dir)
|
|
||||||
init_plugin_dir();
|
|
||||||
if (plugin_dir && !plugin_dir_with_version)
|
|
||||||
plugin_dir_with_version = g_build_filename(plugin_dir, PLUGIN_PATH_ID, (char *)NULL);
|
|
||||||
return plugin_dir_with_version;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get the personal plugin dir */
|
/* Get the personal plugin dir */
|
||||||
const char *
|
const char *
|
||||||
get_plugins_pers_dir(void)
|
get_plugins_pers_dir(void)
|
||||||
|
@ -1271,16 +1259,6 @@ get_plugins_pers_dir(void)
|
||||||
return plugin_pers_dir;
|
return plugin_pers_dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *
|
|
||||||
get_plugins_pers_dir_with_version(void)
|
|
||||||
{
|
|
||||||
if (!plugin_pers_dir)
|
|
||||||
init_plugin_pers_dir();
|
|
||||||
if (plugin_pers_dir && !plugin_pers_dir_with_version)
|
|
||||||
plugin_pers_dir_with_version = g_build_filename(plugin_pers_dir, PLUGIN_PATH_ID, (char *)NULL);
|
|
||||||
return plugin_pers_dir_with_version;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Find the directory where the extcap hooks are stored.
|
* Find the directory where the extcap hooks are stored.
|
||||||
*
|
*
|
||||||
|
@ -2695,12 +2673,8 @@ free_progdirs(void)
|
||||||
#if defined(HAVE_PLUGINS) || defined(HAVE_LUA)
|
#if defined(HAVE_PLUGINS) || defined(HAVE_LUA)
|
||||||
g_free(plugin_dir);
|
g_free(plugin_dir);
|
||||||
plugin_dir = NULL;
|
plugin_dir = NULL;
|
||||||
g_free(plugin_dir_with_version);
|
|
||||||
plugin_dir_with_version = NULL;
|
|
||||||
g_free(plugin_pers_dir);
|
g_free(plugin_pers_dir);
|
||||||
plugin_pers_dir = NULL;
|
plugin_pers_dir = NULL;
|
||||||
g_free(plugin_pers_dir_with_version);
|
|
||||||
plugin_pers_dir_with_version = NULL;
|
|
||||||
#endif
|
#endif
|
||||||
g_free(extcap_dir);
|
g_free(extcap_dir);
|
||||||
extcap_dir = NULL;
|
extcap_dir = NULL;
|
||||||
|
|
|
@ -80,21 +80,11 @@ WS_DLL_PUBLIC char *get_executable_path(const char *filename);
|
||||||
*/
|
*/
|
||||||
WS_DLL_PUBLIC const char *get_plugins_dir(void);
|
WS_DLL_PUBLIC const char *get_plugins_dir(void);
|
||||||
|
|
||||||
/*
|
|
||||||
* Append VERSION_MAJOR.VERSION_MINOR to the plugin dir.
|
|
||||||
*/
|
|
||||||
WS_DLL_PUBLIC const char *get_plugins_dir_with_version(void);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get the personal plugin dir.
|
* Get the personal plugin dir.
|
||||||
*/
|
*/
|
||||||
WS_DLL_PUBLIC const char *get_plugins_pers_dir(void);
|
WS_DLL_PUBLIC const char *get_plugins_pers_dir(void);
|
||||||
|
|
||||||
/*
|
|
||||||
* Append VERSION_MAJOR.VERSION_MINOR to the plugin personal dir.
|
|
||||||
*/
|
|
||||||
WS_DLL_PUBLIC const char *get_plugins_pers_dir_with_version(void);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get the directory in which extcap hooks are stored; this must not be called
|
* Get the directory in which extcap hooks are stored; this must not be called
|
||||||
* before configuration_init() is called, as they might be stored in a
|
* before configuration_init() is called, as they might be stored in a
|
||||||
|
|
|
@ -130,12 +130,14 @@ scan_plugins_dir(GHashTable *plugins_module, const char *dirpath,
|
||||||
const char *name; /* current file name */
|
const char *name; /* current file name */
|
||||||
char *plugin_folder;
|
char *plugin_folder;
|
||||||
char *plugin_file; /* current file full path */
|
char *plugin_file; /* current file full path */
|
||||||
|
char *plugin_ext; /* plugin file extension */
|
||||||
GModule *handle; /* handle returned by g_module_open */
|
GModule *handle; /* handle returned by g_module_open */
|
||||||
void *symbol;
|
void *symbol;
|
||||||
plugin *new_plug;
|
plugin *new_plug;
|
||||||
plugin_type_e have_type;
|
plugin_type_e have_type;
|
||||||
int abi_version;
|
int abi_version;
|
||||||
struct ws_module *module;
|
struct ws_module *module;
|
||||||
|
char *s;
|
||||||
|
|
||||||
plugin_folder = g_build_filename(dirpath, type_to_dir(type), (char *)NULL);
|
plugin_folder = g_build_filename(dirpath, type_to_dir(type), (char *)NULL);
|
||||||
|
|
||||||
|
@ -145,11 +147,13 @@ scan_plugins_dir(GHashTable *plugins_module, const char *dirpath,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ws_debug("Scanning plugins folder \"%s\"", plugin_folder);
|
plugin_ext = plugins_file_suffix(type);
|
||||||
|
|
||||||
|
ws_debug("Scanning plugins folder \"%s\" for *%s", plugin_folder, plugin_ext);
|
||||||
|
|
||||||
while ((name = g_dir_read_name(dir)) != NULL) {
|
while ((name = g_dir_read_name(dir)) != NULL) {
|
||||||
/* Skip anything but files with .dll or .so. */
|
/* Skip anything but files with .dll or .so. */
|
||||||
if (!g_str_has_suffix(name, WS_PLUGIN_MODULE_SUFFIX))
|
if (!g_str_has_suffix(name, plugin_ext))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
plugin_file = g_build_filename(plugin_folder, name, (char *)NULL);
|
plugin_file = g_build_filename(plugin_folder, name, (char *)NULL);
|
||||||
|
@ -219,14 +223,20 @@ DIAG_ON_PEDANTIC
|
||||||
new_plug->module = module;
|
new_plug->module = module;
|
||||||
new_plug->scope = scope;
|
new_plug->scope = scope;
|
||||||
|
|
||||||
|
// Strip version from plugin display name
|
||||||
|
s = strrchr(new_plug->name, '.');
|
||||||
|
if (s != NULL && g_ascii_isdigit(*(s+1)))
|
||||||
|
*s = '\0';
|
||||||
|
|
||||||
/* Add it to the list of plugins. */
|
/* Add it to the list of plugins. */
|
||||||
g_hash_table_replace(plugins_module, new_plug->name, new_plug);
|
g_hash_table_replace(plugins_module, g_strdup(name), new_plug);
|
||||||
ws_info("Registered plugin: %s (%s)", new_plug->name, plugin_file);
|
ws_info("Registered plugin: %s (%s)", new_plug->name, plugin_file);
|
||||||
ws_debug("plugin '%s' meta data: version = %s, flags = 0x%"PRIu32", spdx = %s, blurb = %s",
|
ws_debug("plugin '%s' meta data: version = %s, flags = 0x%"PRIu32", spdx = %s, blurb = %s",
|
||||||
name, module->version, module->flags, module->spdx_id, module->blurb);
|
name, module->version, module->flags, module->spdx_id, module->blurb);
|
||||||
g_free(plugin_file);
|
g_free(plugin_file);
|
||||||
}
|
}
|
||||||
ws_dir_close(dir);
|
ws_dir_close(dir);
|
||||||
|
wmem_free(NULL, plugin_ext);
|
||||||
g_free(plugin_folder);
|
g_free(plugin_folder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -239,7 +249,7 @@ plugins_init(plugin_type_e type)
|
||||||
if (!plugins_supported())
|
if (!plugins_supported())
|
||||||
return NULL; /* nothing to do */
|
return NULL; /* nothing to do */
|
||||||
|
|
||||||
GHashTable *plugins_module = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, free_plugin);
|
GHashTable *plugins_module = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, free_plugin);
|
||||||
|
|
||||||
/* Scan the users plugins directory first, giving it priority over the
|
/* Scan the users plugins directory first, giving it priority over the
|
||||||
* global plugins folder. Only scan it if we weren't started with special
|
* global plugins folder. Only scan it if we weren't started with special
|
||||||
|
@ -249,7 +259,7 @@ plugins_init(plugin_type_e type)
|
||||||
* if we need privileges to start capturing, we'd need to
|
* if we need privileges to start capturing, we'd need to
|
||||||
* reclaim them before each time we start capturing.)
|
* reclaim them before each time we start capturing.)
|
||||||
*/
|
*/
|
||||||
const char *user_dir = get_plugins_pers_dir_with_version();
|
const char *user_dir = get_plugins_pers_dir();
|
||||||
if (!started_with_special_privs()) {
|
if (!started_with_special_privs()) {
|
||||||
scan_plugins_dir(plugins_module, user_dir, type, WS_PLUGIN_SCOPE_USER);
|
scan_plugins_dir(plugins_module, user_dir, type, WS_PLUGIN_SCOPE_USER);
|
||||||
}
|
}
|
||||||
|
@ -262,7 +272,7 @@ plugins_init(plugin_type_e type)
|
||||||
* Scan the global plugin directory. Make sure we don't scan the same directory
|
* Scan the global plugin directory. Make sure we don't scan the same directory
|
||||||
* twice (under some unusual install configurations).
|
* twice (under some unusual install configurations).
|
||||||
*/
|
*/
|
||||||
const char *global_dir = get_plugins_dir_with_version();
|
const char *global_dir = get_plugins_dir();
|
||||||
if (strcmp(global_dir, user_dir) != 0) {
|
if (strcmp(global_dir, user_dir) != 0) {
|
||||||
scan_plugins_dir(plugins_module, global_dir, type, WS_PLUGIN_SCOPE_GLOBAL);
|
scan_plugins_dir(plugins_module, global_dir, type, WS_PLUGIN_SCOPE_GLOBAL);
|
||||||
}
|
}
|
||||||
|
@ -392,10 +402,16 @@ DIAG_ON_PEDANTIC
|
||||||
char *
|
char *
|
||||||
plugins_pers_type_folder(plugin_type_e type)
|
plugins_pers_type_folder(plugin_type_e type)
|
||||||
{
|
{
|
||||||
return g_build_filename(get_plugins_pers_dir_with_version(),
|
return g_build_filename(get_plugins_pers_dir(),
|
||||||
type_to_dir(type), (const char *)NULL);
|
type_to_dir(type), (const char *)NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char *
|
||||||
|
plugins_file_suffix(plugin_type_e type)
|
||||||
|
{
|
||||||
|
return ws_strdup_printf("%s.%d", WS_PLUGIN_MODULE_SUFFIX, plugins_abi_version(type));
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
plugins_abi_version(plugin_type_e type)
|
plugins_abi_version(plugin_type_e type)
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,8 +41,9 @@ typedef enum {
|
||||||
#define WS_PLUGIN_DESC_TAP_LISTENER (1UL << 4)
|
#define WS_PLUGIN_DESC_TAP_LISTENER (1UL << 4)
|
||||||
#define WS_PLUGIN_DESC_DFUNCTION (1UL << 5)
|
#define WS_PLUGIN_DESC_DFUNCTION (1UL << 5)
|
||||||
|
|
||||||
// GLib and Qt allow ".dylib" and ".so" on macOS. Should we do the same?
|
#if defined(SHARED_MODULE_SUFFIX)
|
||||||
#ifdef _WIN32
|
#define WS_PLUGIN_MODULE_SUFFIX SHARED_MODULE_SUFFIX
|
||||||
|
#elif defined(_WIN32)
|
||||||
#define WS_PLUGIN_MODULE_SUFFIX ".dll"
|
#define WS_PLUGIN_MODULE_SUFFIX ".dll"
|
||||||
#else
|
#else
|
||||||
#define WS_PLUGIN_MODULE_SUFFIX ".so"
|
#define WS_PLUGIN_MODULE_SUFFIX ".so"
|
||||||
|
@ -91,6 +92,8 @@ WS_DLL_PUBLIC plugin_type_e plugins_check_file(const char *path);
|
||||||
|
|
||||||
WS_DLL_PUBLIC char *plugins_pers_type_folder(plugin_type_e type);
|
WS_DLL_PUBLIC char *plugins_pers_type_folder(plugin_type_e type);
|
||||||
|
|
||||||
|
WS_DLL_PUBLIC char *plugins_file_suffix(plugin_type_e type);
|
||||||
|
|
||||||
WS_DLL_PUBLIC
|
WS_DLL_PUBLIC
|
||||||
int plugins_abi_version(plugin_type_e type);
|
int plugins_abi_version(plugin_type_e type);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue