diff --git a/CMakeLists.txt b/CMakeLists.txt
index e20cb784cb..7dd8581f1d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -352,12 +352,9 @@ else()
set(VERSION_FLAVOR "Development Build")
endif()
-# These are required in .rc files and manifests
-set(VERSION_MAJOR ${PROJECT_MAJOR_VERSION})
-set(VERSION_MINOR ${PROJECT_MINOR_VERSION})
-set(VERSION_MICRO ${PROJECT_PATCH_VERSION})
-set(VERSION_BUILD ${PROJECT_BUILD_VERSION})
+# Used in .rc files and manifests
set(RC_VERSION ${PROJECT_MAJOR_VERSION},${PROJECT_MINOR_VERSION},${PROJECT_PATCH_VERSION},${PROJECT_BUILD_VERSION})
+set(LOG_RC_VERSION ${LOG_PROJECT_MAJOR_VERSION},${LOG_PROJECT_MINOR_VERSION},${PROJECT_PATCH_VERSION},${PROJECT_BUILD_VERSION})
message(STATUS "V: ${PROJECT_VERSION}, MaV: ${PROJECT_MAJOR_VERSION}, MiV: ${PROJECT_MINOR_VERSION}, PL: ${PROJECT_PATCH_VERSION}, EV: ${PROJECT_VERSION_EXTENSION}.")
@@ -1688,7 +1685,6 @@ foreach(_plugin_src_dir ${PLUGIN_SRC_DIRS} ${LOGWOLF_PLUGIN_SRC_DIRS})
add_subdirectory( ${_plugin_src_dir} )
endforeach()
-set( VERSION ${PROJECT_VERSION} )
if(VCSVERSION_OVERRIDE)
# Allow distributors to override detection of the Git tag and version.
string(CONFIGURE "#define VCSVERSION \"@VCSVERSION_OVERRIDE@\"\n"
@@ -2182,7 +2178,7 @@ if(USE_REPOSITORY)
if(ZIP_EXECUTABLE)
add_custom_target(pdb_zip_package COMMENT "This packages .PDBs but will not create them.")
set_target_properties(pdb_zip_package PROPERTIES FOLDER "Packaging")
- set(_pdb_zip "${CMAKE_BINARY_DIR}/Wireshark-pdb-${WIRESHARK_TARGET_PLATFORM}-${VERSION}.zip")
+ set(_pdb_zip "${CMAKE_BINARY_DIR}/Wireshark-pdb-${WIRESHARK_TARGET_PLATFORM}-${PROJECT_VERSION}.zip")
file(TO_NATIVE_PATH "${_pdb_zip}" _pdb_zip_win)
add_custom_command(TARGET pdb_zip_package POST_BUILD
COMMAND ${CMAKE_COMMAND} -E remove -f "${_pdb_zip}"
@@ -3420,7 +3416,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
endif()
-string(REPLACE "-" "_" RPM_VERSION "${VERSION}")
+string(REPLACE "-" "_" RPM_VERSION "${PROJECT_VERSION}")
configure_file(packaging/rpm/wireshark.spec.in ${CMAKE_BINARY_DIR}/packaging/rpm/SPECS/wireshark.spec)
if(RPMBUILD_EXECUTABLE)
foreach(_rpm_dir BUILD RPMS SOURCES SPECS SRPMS)
diff --git a/doxygen.cfg.in b/doxygen.cfg.in
index 0027078c43..8b73ab5137 100644
--- a/doxygen.cfg.in
+++ b/doxygen.cfg.in
@@ -38,7 +38,7 @@ PROJECT_NAME = "Wireshark"
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = @VERSION@
+PROJECT_NUMBER = @PROJECT_VERSION@
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
diff --git a/packaging/macosx/LogwolfInfo.plist.in b/packaging/macosx/LogwolfInfo.plist.in
index 622340becf..da6ecc9560 100644
--- a/packaging/macosx/LogwolfInfo.plist.in
+++ b/packaging/macosx/LogwolfInfo.plist.in
@@ -7,7 +7,7 @@
CFBundleExecutable
Logwolf
CFBundleGetInfoString
- @VERSION@, Copyright 1998-2022 Wireshark Development Team
+ @LOG_PROJECT_VERSION@, Copyright 1998-2022 Wireshark Development Team
CFBundleIconFile
Wireshark.icns
CFBundleIdentifier
@@ -34,11 +34,11 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- @VERSION@
+ @LOG_PROJECT_VERSION@
CFBundleSignature
Lshk
CFBundleVersion
- @VERSION@
+ @LOG_PROJECT_VERSION@
NSHumanReadableCopyright
Copyright 1998-2022 Wireshark Developers, GNU General Public License.
NSPrincipalClass
@@ -53,7 +53,7 @@
SUFeedURL
- https://www.wireshark.org/update/0/Logwolf/@PROJECT_MAJOR_VERSION@.@PROJECT_MINOR_VERSION@.@PROJECT_PATCH_VERSION@/macOS/x86-64/en-US/stable.xml
+ https://www.wireshark.org/update/0/Logwolf/@LOG_PROJECT_MAJOR_VERSION@.@LOG_PROJECT_MINOR_VERSION@.@PROJECT_PATCH_VERSION@/macOS/x86-64/en-US/stable.xml
SUEnableAutomaticChecks
SUPublicEDKey
diff --git a/packaging/macosx/WiresharkInfo.plist.in b/packaging/macosx/WiresharkInfo.plist.in
index 66f2808cc3..ad8acf7d80 100644
--- a/packaging/macosx/WiresharkInfo.plist.in
+++ b/packaging/macosx/WiresharkInfo.plist.in
@@ -7,7 +7,7 @@
CFBundleExecutable
Wireshark
CFBundleGetInfoString
- @VERSION@, Copyright 1998-2022 Wireshark Development Team
+ @PROJECT_VERSION@, Copyright 1998-2022 Wireshark Development Team
CFBundleIconFile
Wireshark.icns
CFBundleIdentifier
@@ -224,11 +224,11 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- @VERSION@
+ @PROJECT_VERSION@
CFBundleSignature
Wshk
CFBundleVersion
- @VERSION@
+ @PROJECT_VERSION@
NSHumanReadableCopyright
Copyright 1998-2022 Wireshark Developers, GNU General Public License.
NSPrincipalClass
diff --git a/packaging/macosx/logwolf-app.dmgbuild.in b/packaging/macosx/logwolf-app.dmgbuild.in
index daa88c03b7..a10af3f5c5 100644
--- a/packaging/macosx/logwolf-app.dmgbuild.in
+++ b/packaging/macosx/logwolf-app.dmgbuild.in
@@ -18,7 +18,7 @@ import os.path
# .. Useful stuff ..............................................................
-lw_version = '@VERSION@'
+lw_version = '@LOG_PROJECT_VERSION@'
lw_volname = 'Logwolf ' + lw_version
lw_srcdir = '@CMAKE_SOURCE_DIR@'
lw_bindir = '@CMAKE_BINARY_DIR@'
diff --git a/packaging/macosx/logwolf-dsym.dmgbuild.in b/packaging/macosx/logwolf-dsym.dmgbuild.in
index ae1a65ea88..98ce4706b5 100644
--- a/packaging/macosx/logwolf-dsym.dmgbuild.in
+++ b/packaging/macosx/logwolf-dsym.dmgbuild.in
@@ -18,7 +18,7 @@ import os.path
# .. Useful stuff ..............................................................
-lw_version = '@VERSION@'
+lw_version = '@LOG_PROJECT_VERSION@'
lw_volname = 'Logwolf Debugging Symbols' + lw_version
lw_srcdir = '@CMAKE_SOURCE_DIR@'
lw_bindir = '@CMAKE_BINARY_DIR@'
diff --git a/packaging/macosx/osx-dmg.sh.in b/packaging/macosx/osx-dmg.sh.in
index ed7105d964..855cd1ee55 100755
--- a/packaging/macosx/osx-dmg.sh.in
+++ b/packaging/macosx/osx-dmg.sh.in
@@ -6,7 +6,7 @@ set -e
# Defaults
dmgbuild="@DMGBUILD_EXECUTABLE@"
-version="@VERSION@"
+version="@PROJECT_VERSION@"
app_settings_file="@CMAKE_BINARY_DIR@/packaging/macosx/wireshark-app.dmgbuild"
dsym_settings_file="@CMAKE_BINARY_DIR@/packaging/macosx/wireshark-dsym.dmgbuild"
architecture=""
diff --git a/packaging/macosx/wireshark-app.dmgbuild.in b/packaging/macosx/wireshark-app.dmgbuild.in
index d8776c1b4d..cc2a3cd482 100644
--- a/packaging/macosx/wireshark-app.dmgbuild.in
+++ b/packaging/macosx/wireshark-app.dmgbuild.in
@@ -18,7 +18,7 @@ import os.path
# .. Useful stuff ..............................................................
-ws_version = '@VERSION@'
+ws_version = '@PROJECT_VERSION@'
ws_volname = 'Wireshark ' + ws_version
ws_srcdir = '@CMAKE_SOURCE_DIR@'
ws_bindir = '@CMAKE_BINARY_DIR@'
diff --git a/packaging/macosx/wireshark-dsym.dmgbuild.in b/packaging/macosx/wireshark-dsym.dmgbuild.in
index f92b2ff581..e2470d4fac 100644
--- a/packaging/macosx/wireshark-dsym.dmgbuild.in
+++ b/packaging/macosx/wireshark-dsym.dmgbuild.in
@@ -18,7 +18,7 @@ import os.path
# .. Useful stuff ..............................................................
-ws_version = '@VERSION@'
+ws_version = '@PROJECT_VERSION@'
ws_volname = 'Wireshark Debugging Symbols' + ws_version
ws_srcdir = '@CMAKE_SOURCE_DIR@'
ws_bindir = '@CMAKE_BINARY_DIR@'
diff --git a/packaging/nsis/wireshark-config.nsh.in b/packaging/nsis/wireshark-config.nsh.in
index bfb5cf6a10..73a81e75a0 100644
--- a/packaging/nsis/wireshark-config.nsh.in
+++ b/packaging/nsis/wireshark-config.nsh.in
@@ -12,9 +12,9 @@
#define EXTRA_INSTALLER_DIR "@EXTRA_INSTALLER_DIR@"
#define NPCAP_PACKAGE_VERSION @NPCAP_PACKAGE_VERSION@
#define USBPCAP_PACKAGE_VERSION @USBPCAP_PACKAGE_VERSION@
-#define VERSION @VERSION@
-#define VERSION_MAJOR @VERSION_MAJOR@
-#define VERSION_MINOR @VERSION_MINOR@
+#define VERSION @PROJECT_VERSION@
+#define VERSION_MAJOR @PROJECT_VERSION_MAJOR@
+#define VERSION_MINOR @PROJECT_VERSION_MINOR@
#define PRODUCT_VERSION @PRODUCT_VERSION@
#define VCREDIST_DIR "@VCREDIST_DIR@"
diff --git a/packaging/portableapps/appinfo.tmpl b/packaging/portableapps/appinfo.tmpl
index 2dba02a9d6..1e690e2f36 100644
--- a/packaging/portableapps/appinfo.tmpl
+++ b/packaging/portableapps/appinfo.tmpl
@@ -20,7 +20,7 @@ CommercialUse=true
[Version]
PackageVersion=@PORTABLEAPPS_PACKAGE_VERSION@
-DisplayVersion=@VERSION@
+DisplayVersion=@PROJECT_VERSION@
[Control]
Icons=1
diff --git a/packaging/rpm/wireshark.spec.in b/packaging/rpm/wireshark.spec.in
index cc9ac8a15e..a478b98563 100644
--- a/packaging/rpm/wireshark.spec.in
+++ b/packaging/rpm/wireshark.spec.in
@@ -43,7 +43,7 @@
# are set.
%global use_wireshark_group 1
-%global package_version @VERSION@
+%global package_version @PROJECT_VERSION@
Summary: The world's foremost protocol analyzer
diff --git a/packaging/source/git-export-release.sh.in b/packaging/source/git-export-release.sh.in
index 0ab93dc7a1..f0ebde4039 100755
--- a/packaging/source/git-export-release.sh.in
+++ b/packaging/source/git-export-release.sh.in
@@ -34,12 +34,12 @@ shift $(( OPTIND - 1 ))
# The remaining parameter, if set, is a package version such as 3.4.5
# or 3.4.5-67-gabcd4321
# By default the version from make-version.pl + CMake is used.
-VERSION=@VERSION@
+PROJECT_VERSION=@PROJECT_VERSION@
if test -n "${1-}"; then
- VERSION="$1"
+ PROJECT_VERSION="$1"
fi
-TARBALL="${DESTDIR}/wireshark-${VERSION}.tar.xz"
+TARBALL="${DESTDIR}/wireshark-${PROJECT_VERSION}.tar.xz"
# A tarball produced by 'git archive' will have the $Format string
# substituted due to the use of 'export-subst' in .gitattributes.
@@ -65,7 +65,7 @@ if [[ $COMMIT != \$F* ]] ; then
echo ""
echo "The build system cannot produce a source tarball outside of a git repository."
echo "If you are trying to build an RPM package from source extracted from a tarball,"
- echo "copy it (i.e., wireshark-${VERSION}.tar.xz) to"
+ echo "copy it (i.e., wireshark-${PROJECT_VERSION}.tar.xz) to"
echo "$DESTDIR"
echo "and run the build command again."
@@ -94,4 +94,4 @@ echo "Creating $TARBALL from $COMMIT"
XZ_OPTS=
echo . | xz --threads=0 > /dev/null 2>&1 && XZ_OPTS=--threads=0
-git archive --prefix="wireshark-${VERSION}/" "$COMMIT" | xz $XZ_OPTS > "$TARBALL"
+git archive --prefix="wireshark-${PROJECT_VERSION}/" "$COMMIT" | xz $XZ_OPTS > "$TARBALL"
diff --git a/resources/cli_template.rc.in b/resources/cli_template.rc.in
index 9fbd343580..8cef96eaee 100644
--- a/resources/cli_template.rc.in
+++ b/resources/cli_template.rc.in
@@ -22,12 +22,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "The Wireshark developer community\0"
VALUE "FileDescription", "@PROGRAM_NAME@\0"
- VALUE "FileVersion", "@VERSION@\0"
- VALUE "InternalName", "@PROGRAM_NAME@ @VERSION@\0"
+ VALUE "FileVersion", "@PROJECT_VERSION@\0"
+ VALUE "InternalName", "@PROGRAM_NAME@ @PROJECT_VERSION@\0"
VALUE "LegalCopyright", "Copyright © @COPYRIGHT_INFO@\0"
VALUE "OriginalFilename", "@EXE_NAME@.exe\0"
VALUE "ProductName", "@PROGRAM_NAME@\0"
- VALUE "ProductVersion", "@VERSION@\0"
+ VALUE "ProductVersion", "@PROJECT_VERSION@\0"
END
END
BLOCK "VarFileInfo"
diff --git a/resources/dumpcap.rc.in b/resources/dumpcap.rc.in
index 37eb6fd8d4..4666ac4786 100644
--- a/resources/dumpcap.rc.in
+++ b/resources/dumpcap.rc.in
@@ -22,12 +22,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "The Wireshark developer community\0"
VALUE "FileDescription", "Dumpcap\0"
- VALUE "FileVersion", "@VERSION@\0"
- VALUE "InternalName", "Dumpcap @VERSION@\0"
+ VALUE "FileVersion", "@PROJECT_VERSION@\0"
+ VALUE "InternalName", "Dumpcap @PROJECT_VERSION@\0"
VALUE "LegalCopyright", "Copyright © 2000 Gerald Combs , Gilbert Ramirez and others\0"
VALUE "OriginalFilename", "Dumpcap.exe\0"
VALUE "ProductName", "Dumpcap\0"
- VALUE "ProductVersion", "@VERSION@\0"
+ VALUE "ProductVersion", "@PROJECT_VERSION@\0"
END
END
BLOCK "VarFileInfo"
diff --git a/resources/libwireshark.rc.in b/resources/libwireshark.rc.in
index 6a52b9acbc..c8a2982d56 100644
--- a/resources/libwireshark.rc.in
+++ b/resources/libwireshark.rc.in
@@ -20,12 +20,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "The Wireshark developer community, https://www.wireshark.org/\0"
VALUE "FileDescription", "Wireshark dissector library\0"
- VALUE "FileVersion", "@VERSION@\0"
- VALUE "InternalName", "libwireshark @VERSION@\0"
+ VALUE "FileVersion", "@PROJECT_VERSION@\0"
+ VALUE "InternalName", "libwireshark @PROJECT_VERSION@\0"
VALUE "LegalCopyright", "Copyright © 2000 Gerald Combs , Gilbert Ramirez and others\0"
VALUE "OriginalFilename", "libwireshark.dll\0"
VALUE "ProductName", "Wireshark\0"
- VALUE "ProductVersion", "@VERSION@\0"
+ VALUE "ProductVersion", "@PROJECT_VERSION@\0"
END
END
BLOCK "VarFileInfo"
diff --git a/resources/libwiretap.rc.in b/resources/libwiretap.rc.in
index 31ed0a0245..4e35a76797 100644
--- a/resources/libwiretap.rc.in
+++ b/resources/libwiretap.rc.in
@@ -20,12 +20,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "The Wireshark developer community, https://www.wireshark.org/\0"
VALUE "FileDescription", "Wireshark capture file library\0"
- VALUE "FileVersion", "@VERSION@\0"
- VALUE "InternalName", "wiretap @VERSION@\0"
+ VALUE "FileVersion", "@PROJECT_VERSION@\0"
+ VALUE "InternalName", "wiretap @PROJECT_VERSION@\0"
VALUE "LegalCopyright", "Copyright © 2000 Gerald Combs , Gilbert Ramirez and others\0"
VALUE "OriginalFilename", "libwiretap.dll\0"
VALUE "ProductName", "Wireshark\0"
- VALUE "ProductVersion", "@VERSION@\0"
+ VALUE "ProductVersion", "@PROJECT_VERSION@\0"
END
END
BLOCK "VarFileInfo"
diff --git a/resources/libwsutil.rc.in b/resources/libwsutil.rc.in
index 54d1e9a888..545a2f331d 100644
--- a/resources/libwsutil.rc.in
+++ b/resources/libwsutil.rc.in
@@ -20,12 +20,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "The Wireshark developer community, https://www.wireshark.org/\0"
VALUE "FileDescription", "Wireshark utility library\0"
- VALUE "FileVersion", "@VERSION@\0"
- VALUE "InternalName", "libwsutil @VERSION@\0"
+ VALUE "FileVersion", "@PROJECT_VERSION@\0"
+ VALUE "InternalName", "libwsutil @PROJECT_VERSION@\0"
VALUE "LegalCopyright", "Copyright © 2000 Gerald Combs , Gilbert Ramirez and others\0"
VALUE "OriginalFilename", "libwsutil.dll\0"
VALUE "ProductName", "Wireshark\0"
- VALUE "ProductVersion", "@VERSION@\0"
+ VALUE "ProductVersion", "@PROJECT_VERSION@\0"
END
END
BLOCK "VarFileInfo"
diff --git a/resources/logwolf.exe.manifest.in b/resources/logwolf.exe.manifest.in
index e040098a95..ee3722220f 100644
--- a/resources/logwolf.exe.manifest.in
+++ b/resources/logwolf.exe.manifest.in
@@ -1,7 +1,7 @@
, Gerald Combs and others\0"
VALUE "OriginalFilename", "Logwolf.exe\0"
VALUE "ProductName", "Logwolf\0"
- VALUE "ProductVersion", "@VERSION@\0"
+ VALUE "ProductVersion", "@LOG_PROJECT_VERSION@\0"
END
END
BLOCK "VarFileInfo"
diff --git a/resources/tshark.rc.in b/resources/tshark.rc.in
index e995cf3f6d..2a90867cf1 100644
--- a/resources/tshark.rc.in
+++ b/resources/tshark.rc.in
@@ -22,12 +22,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "The Wireshark developer community\0"
VALUE "FileDescription", "TShark\0"
- VALUE "FileVersion", "@VERSION@\0"
- VALUE "InternalName", "TShark @VERSION@\0"
+ VALUE "FileVersion", "@PROJECT_VERSION@\0"
+ VALUE "InternalName", "TShark @PROJECT_VERSION@\0"
VALUE "LegalCopyright", "Copyright © 2000 Gerald Combs , Gilbert Ramirez and others\0"
VALUE "OriginalFilename", "TShark.exe\0"
VALUE "ProductName", "TShark\0"
- VALUE "ProductVersion", "@VERSION@\0"
+ VALUE "ProductVersion", "@PROJECT_VERSION@\0"
END
END
BLOCK "VarFileInfo"
diff --git a/resources/wireshark.exe.manifest.in b/resources/wireshark.exe.manifest.in
index 2cb3d4a1da..39e601f981 100644
--- a/resources/wireshark.exe.manifest.in
+++ b/resources/wireshark.exe.manifest.in
@@ -1,7 +1,7 @@
, Gilbert Ramirez and others\0"
VALUE "OriginalFilename", "Wireshark.exe\0"
VALUE "ProductName", "Wireshark\0"
- VALUE "ProductVersion", "@VERSION@\0"
+ VALUE "ProductVersion", "@PROJECT_VERSION@\0"
END
END
BLOCK "VarFileInfo"
diff --git a/wireshark.pc.in b/wireshark.pc.in
index e755614bba..55b4f935cb 100644
--- a/wireshark.pc.in
+++ b/wireshark.pc.in
@@ -7,7 +7,7 @@ plugindir=@plugindir@
Name: Wireshark
Description: Network Packet Dissection Library
-Version: @VERSION@
+Version: @PROJECT_VERSION@
Requires: glib-2.0, gmodule-2.0, gthread-2.0
Libs: -L${libdir} -lwireshark -lwsutil