plugins: Use minor version number for plugin install path

Wireshark patch releases (X.Y.Z) are binary compatible so reflect
that in the plugin installation path.

By installing to $pkglibdir/plugins/X.Y out-of-tree plugins don't
need to be reinstalled with every patch release.

Change-Id: I9d1728e6fb12bcb51d2a723af22c750cb7a966cf
Reviewed-on: https://code.wireshark.org/review/23497
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
This commit is contained in:
João Valverde 2017-09-10 23:08:14 +01:00 committed by João Valverde
parent 978f6b4e1a
commit 9260461f4f
4 changed files with 7 additions and 5 deletions

View File

@ -1360,7 +1360,7 @@ if(LIBSSH_FOUND)
endif()
# Directory where plugins and Lua dissectors can be found.
set(PLUGIN_VERSION_DIR "plugins/${CPACK_PACKAGE_VERSION}")
set(PLUGIN_VERSION_DIR "plugins/${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}")
set(PLUGIN_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${CPACK_PACKAGE_NAME}/${PLUGIN_VERSION_DIR}")
# Used by the WiresharkConfig.cmake.in module
if (WIN32)

View File

@ -2608,7 +2608,7 @@ dnl check whether plugins should be enabled and, if they should be,
dnl check for plugins directory - stolen from Amanda's configure.ac
dnl
dnl we don't wish to expand ${libdir} yet
plugindir="\${libdir}/wireshark/plugins/${VERSION}"
plugindir="\${libdir}/wireshark/plugins/version_major.version_minor"
AC_ARG_WITH(plugins,
AC_HELP_STRING( [--with-plugins@<:@=DIR@:>@],
[support plugins (installed in DIR, if supplied) @<:@default=yes, if possible@:>@]),

View File

@ -461,7 +461,7 @@ machine code.
Wireshark looks for plugins in both a personal plugin folder and a
global plugin folder. Lua plugins are stored in the plugin folders;
compiled plugins are stored in subfolders of the plugin folders, with
the subfolder name being the Wireshark version number.
the subfolder name being the Wireshark minor version number (X.Y).
On Windows:

View File

@ -341,7 +341,8 @@ scan_plugins(plugin_load_failure_mode mode)
}
else
{
plugin_dir_path = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", get_plugin_dir(), VERSION);
plugin_dir_path = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%d.%d",
get_plugin_dir(), VERSION_MAJOR, VERSION_MINOR);
plugins_scan_dir(plugin_dir_path, mode);
g_free(plugin_dir_path);
}
@ -356,7 +357,8 @@ scan_plugins(plugin_load_failure_mode mode)
*/
if (!started_with_special_privs())
{
plugin_dir_path = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", get_plugins_pers_dir(), VERSION);
plugin_dir_path = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%d.%d",
get_plugins_pers_dir(), VERSION_MAJOR, VERSION_MINOR);
plugins_scan_dir(plugin_dir_path, mode);
g_free(plugin_dir_path);
}