aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/nsis
diff options
context:
space:
mode:
authorJoão Valverde <j@v6e.pt>2023-12-13 02:14:33 +0000
committerJoão Valverde <j@v6e.pt>2023-12-14 14:28:30 +0000
commitb52d9173f8f0201a360bc1d5ada38297a6e13553 (patch)
tree1b425618898ee981be3d38830c403944c382d1f7 /packaging/nsis
parentb51a3933ba8ace3f583259f5fd420a47912c86ad (diff)
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 90b16b40921b737aadf9186685d866fd80e37ee6.
Diffstat (limited to 'packaging/nsis')
-rw-r--r--packaging/nsis/custom_plugins.txt2
-rw-r--r--packaging/nsis/logray-config.nsh.in3
-rw-r--r--packaging/nsis/logray.nsi16
-rw-r--r--packaging/nsis/wireshark-config.nsh.in4
-rw-r--r--packaging/nsis/wireshark.nsi54
5 files changed, 43 insertions, 36 deletions
diff --git a/packaging/nsis/custom_plugins.txt b/packaging/nsis/custom_plugins.txt
index 12338056e7..6c71b57dc5 100644
--- a/packaging/nsis/custom_plugins.txt
+++ b/packaging/nsis/custom_plugins.txt
@@ -1,3 +1,3 @@
;Add your custom plugins directives here
; Example:
-;File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\foo.dll"
+;File "${STAGING_DIR}\plugins\epan\foo.dll.${ABI_VERSION_EPAN}"
diff --git a/packaging/nsis/logray-config.nsh.in b/packaging/nsis/logray-config.nsh.in
index 484ed0568a..c881483bc9 100644
--- a/packaging/nsis/logray-config.nsh.in
+++ b/packaging/nsis/logray-config.nsh.in
@@ -11,6 +11,9 @@
#define EXTRA_INSTALLER_DIR "@EXTRA_INSTALLER_DIR@"
#define VERSION @LOG_PROJECT_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
#define MAJOR_VERSION @PROJECT_MAJOR_VERSION@
#define MINOR_VERSION @PROJECT_MINOR_VERSION@
diff --git a/packaging/nsis/logray.nsi b/packaging/nsis/logray.nsi
index db54521779..e59e1992d3 100644
--- a/packaging/nsis/logray.nsi
+++ b/packaging/nsis/logray.nsi
@@ -890,23 +890,23 @@ SectionGroup "Plugins & Extensions" SecPluginsGroup
Section "Dissector Plugins" SecPlugins
;-------------------------------------------
-SetOutPath '$INSTDIR\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan'
-File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\falco-bridge.dll"
-SetOutPath '$INSTDIR\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\falco'
-File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\falco\cloudtrail.dll"
+SetOutPath '$INSTDIR\plugins\epan'
+File "${STAGING_DIR}\plugins\epan\falco-bridge.dll.${ABI_VERSION_EPAN}"
+SetOutPath '$INSTDIR\plugins\falco'
+File "${STAGING_DIR}\plugins\falco\cloudtrail.dll.${ABI_VERSION_EPAN}"
!include "custom_plugins.txt"
SectionEnd
Section "Tree Statistics Plugin" SecStatsTree
;-------------------------------------------
-SetOutPath '$INSTDIR\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan'
-File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\stats_tree.dll"
+SetOutPath '$INSTDIR\plugins\epan'
+File "${STAGING_DIR}\plugins\epan\stats_tree.dll.${ABI_VERSION_EPAN}"
SectionEnd
Section "Mate - Meta Analysis and Tracing Engine" SecMate
;-------------------------------------------
-SetOutPath '$INSTDIR\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan'
-File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\mate.dll"
+SetOutPath '$INSTDIR\plugins\epan'
+File "${STAGING_DIR}\plugins\epan\mate.dll.${ABI_VERSION_EPAN}"
SectionEnd
Section "Configuration Profiles" SecProfiles
diff --git a/packaging/nsis/wireshark-config.nsh.in b/packaging/nsis/wireshark-config.nsh.in
index 10485cca03..0e3b0b13ab 100644
--- a/packaging/nsis/wireshark-config.nsh.in
+++ b/packaging/nsis/wireshark-config.nsh.in
@@ -16,6 +16,10 @@
#define MINOR_VERSION @PROJECT_MINOR_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_EXE "@VCREDIST_EXE@"
diff --git a/packaging/nsis/wireshark.nsi b/packaging/nsis/wireshark.nsi
index 75c104117b..46f9534e74 100644
--- a/packaging/nsis/wireshark.nsi
+++ b/packaging/nsis/wireshark.nsi
@@ -1039,24 +1039,24 @@ SectionEnd
Section "-Plugins & Extensions"
-SetOutPath '$INSTDIR\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\codecs'
-File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\codecs\g711.dll"
+SetOutPath '$INSTDIR\plugins\codecs'
+File "${STAGING_DIR}\plugins\codecs\g711.dll.${ABI_VERSION_CODEC}"
!ifdef SPANDSP_FOUND
-File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\codecs\g722.dll"
-File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\codecs\g726.dll"
+File "${STAGING_DIR}\plugins\codecs\g722.dll.${ABI_VERSION_CODEC}"
+File "${STAGING_DIR}\plugins\codecs\g726.dll.${ABI_VERSION_CODEC}"
!endif
!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
-File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\codecs\l16mono.dll"
+File "${STAGING_DIR}\plugins\codecs\l16mono.dll.${ABI_VERSION_CODEC}"
!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
!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
!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
; This should be a function or macro
@@ -1068,23 +1068,23 @@ File "${STAGING_DIR}\profiles\Classic\colorfilters"
SetOutPath '$INSTDIR\profiles\No Reassembly'
File "${STAGING_DIR}\profiles\No Reassembly\preferences"
-SetOutPath '$INSTDIR\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan'
-File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\ethercat.dll"
-File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\gryphon.dll"
-File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\irda.dll"
-File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\opcua.dll"
-File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\profinet.dll"
-File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\unistim.dll"
-File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\wimax.dll"
-File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\wimaxasncp.dll"
-File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\wimaxmacphy.dll"
+SetOutPath '$INSTDIR\plugins\epan'
+File "${STAGING_DIR}\plugins\epan\ethercat.dll.${ABI_VERSION_EPAN}"
+File "${STAGING_DIR}\plugins\epan\gryphon.dll.${ABI_VERSION_EPAN}"
+File "${STAGING_DIR}\plugins\epan\irda.dll.${ABI_VERSION_EPAN}"
+File "${STAGING_DIR}\plugins\epan\opcua.dll.${ABI_VERSION_EPAN}"
+File "${STAGING_DIR}\plugins\epan\profinet.dll.${ABI_VERSION_EPAN}"
+File "${STAGING_DIR}\plugins\epan\unistim.dll.${ABI_VERSION_EPAN}"
+File "${STAGING_DIR}\plugins\epan\wimax.dll.${ABI_VERSION_EPAN}"
+File "${STAGING_DIR}\plugins\epan\wimaxasncp.dll.${ABI_VERSION_EPAN}"
+File "${STAGING_DIR}\plugins\epan\wimaxmacphy.dll.${ABI_VERSION_EPAN}"
!include "custom_plugins.txt"
-SetOutPath '$INSTDIR\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\wiretap'
-File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\wiretap\usbdump.dll"
+SetOutPath '$INSTDIR\plugins\wiretap'
+File "${STAGING_DIR}\plugins\wiretap\usbdump.dll.${ABI_VERSION_WIRETAP}"
-SetOutPath '$INSTDIR\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan'
-File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\mate.dll"
+SetOutPath '$INSTDIR\plugins\epan'
+File "${STAGING_DIR}\plugins\epan\mate.dll.${ABI_VERSION_EPAN}"
!ifdef SMI_DIR
SetOutPath '$INSTDIR\snmp\mibs'
@@ -1097,11 +1097,11 @@ File "${SMI_DIR}\share\yang\*.yang"
!include "custom_mibs.txt"
!endif
-SetOutPath '$INSTDIR\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan'
-File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\transum.dll"
+SetOutPath '$INSTDIR\plugins\epan'
+File "${STAGING_DIR}\plugins\epan\transum.dll.${ABI_VERSION_EPAN}"
-SetOutPath '$INSTDIR\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan'
-File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\stats_tree.dll"
+SetOutPath '$INSTDIR\plugins\epan'
+File "${STAGING_DIR}\plugins\epan\stats_tree.dll.${ABI_VERSION_EPAN}"
SectionEnd ; "Plugins / Extensions"