plugins: Fixups for g9260461f4f
Put plugins in CMake build dir with a version subdir. This avoids some weird special cases, however running with autotools from build dir displays the wrong global folder in about->folders. Unfortunately the hack to run from the autotools build dir is troublesome. Various fixes for Windows builds. Try to fix also build dir issue loading plugins on macOS with ENABLE_APPLICATION_BUNDLE (blind). Change-Id: Ic3c7c21f5850c12a53844202d61fa0592b45739c Reviewed-on: https://code.wireshark.org/review/23657 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: João Valverde <j@v6e.pt>
This commit is contained in:
parent
caa9b19107
commit
fd4dc6f115
@ -1425,13 +1425,12 @@ else()
|
||||
endif()
|
||||
|
||||
if(ENABLE_APPLICATION_BUNDLE)
|
||||
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_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}")
|
||||
else()
|
||||
get_target_property(_libwireshark_location epan LOCATION)
|
||||
get_filename_component(_plugin_dir "${_libwireshark_location}" PATH)
|
||||
set(_plugin_dir "${_plugin_dir}/plugins")
|
||||
set(_plugin_dir "${_plugin_dir}/${PLUGIN_VERSION_DIR}")
|
||||
endif()
|
||||
# XXX The NMake environment appends the version. Should we do so here?
|
||||
set (PLUGIN_DIR ${_plugin_dir} CACHE INTERNAL "Build time plugin location.")
|
||||
|
||||
foreach(_plugin_src_dir ${PLUGIN_SRC_DIRS})
|
||||
|
@ -50,7 +50,7 @@ macro(ADD_PLUGIN_LIBRARY _plugin)
|
||||
foreach(_config_type ${CMAKE_CONFIGURATION_TYPES})
|
||||
string(TOUPPER ${_config_type} _config_upper)
|
||||
set_target_properties(${_plugin} PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY_${_config_upper} ${CMAKE_BINARY_DIR}/run/${_config_type}/plugins
|
||||
LIBRARY_OUTPUT_DIRECTORY_${_config_upper} ${CMAKE_BINARY_DIR}/run/${_config_type}/${PLUGIN_VERSION_DIR}
|
||||
)
|
||||
endforeach()
|
||||
|
||||
|
@ -1009,7 +1009,7 @@ SectionGroup "Plugins & Extensions" SecPluginsGroup
|
||||
|
||||
Section "Dissector Plugins" SecPlugins
|
||||
;-------------------------------------------
|
||||
SetOutPath '$INSTDIR\plugins\${VERSION}'
|
||||
SetOutPath '$INSTDIR\plugins\${VERSION_MAJOR}.${VERSION_MINOR}'
|
||||
File "${STAGING_DIR}\plugins\docsis.dll"
|
||||
File "${STAGING_DIR}\plugins\ethercat.dll"
|
||||
File "${STAGING_DIR}\plugins\gryphon.dll"
|
||||
@ -1026,20 +1026,20 @@ SectionEnd
|
||||
|
||||
Section "Tree Statistics Plugin" SecStatsTree
|
||||
;-------------------------------------------
|
||||
SetOutPath '$INSTDIR\plugins\${VERSION}'
|
||||
SetOutPath '$INSTDIR\plugins\${VERSION_MAJOR}.${VERSION_MINOR}'
|
||||
File "${STAGING_DIR}\plugins\stats_tree.dll"
|
||||
SectionEnd
|
||||
|
||||
Section "Mate - Meta Analysis and Tracing Engine" SecMate
|
||||
;-------------------------------------------
|
||||
SetOutPath '$INSTDIR\plugins\${VERSION}'
|
||||
SetOutPath '$INSTDIR\plugins\${VERSION_MAJOR}.${VERSION_MINOR}'
|
||||
File "${STAGING_DIR}\plugins\mate.dll"
|
||||
SectionEnd
|
||||
|
||||
|
||||
Section "TRANSUM - network and application performance analysis" SecTransum
|
||||
;-------------------------------------------
|
||||
SetOutPath '$INSTDIR\plugins\${VERSION}'
|
||||
SetOutPath '$INSTDIR\plugins\${VERSION_MAJOR}.${VERSION_MINOR}'
|
||||
File "${STAGING_DIR}\plugins\transum.dll"
|
||||
SectionEnd
|
||||
|
||||
|
@ -308,6 +308,8 @@ set(WIX_CANDLE_DEFINES
|
||||
-dPlatform=${TARGET_MACHINE}
|
||||
-dWiresharkName=${CMAKE_PROJECT_NAME}
|
||||
-dWiresharkVersion=${PRODUCT_VERSION}
|
||||
-dWiresharkMajorVersion=${PROJECT_MAJOR_VERSION}
|
||||
-dWiresharkMinorVersion=${PROJECT_MINOR_VERSION}
|
||||
-dAssetDir=${CMAKE_SOURCE_DIR}/packaging/wix
|
||||
-dBuildOutputDir=${EXECUTABLE_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}
|
||||
-dDiameterDir=${ARCHIVE_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}/diameter
|
||||
|
@ -28,7 +28,7 @@
|
||||
</Directory>
|
||||
<Directory Id="dirRadius" Name="radius"/>
|
||||
<Directory Id="dirPlugins" Name="plugins">
|
||||
<Directory Id="dirPluginsVersion" Name="$(var.WiresharkVersion)"/>
|
||||
<Directory Id="dirPluginsVersion" Name="$(var.WiresharkMajorVersion).$(var.WiresharkMinorVersion)"/>
|
||||
</Directory>
|
||||
<Directory Id="dirProfiles" Name="profiles"/>
|
||||
<Directory Id="dirSnmp" Name="snmp">
|
||||
|
@ -975,7 +975,7 @@ init_plugin_dir(void)
|
||||
* on Windows, the data file directory is the directory
|
||||
* in which the Wireshark binary resides.
|
||||
*/
|
||||
plugin_dir = g_build_filename(get_datafile_dir(), "plugins", VERSION, (gchar *)NULL);
|
||||
plugin_dir = g_build_filename(get_datafile_dir(), "plugins", (gchar *)NULL);
|
||||
|
||||
/*
|
||||
* Make sure that pathname refers to a directory.
|
||||
|
Loading…
x
Reference in New Issue
Block a user