diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-06-21 18:02:27 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-06-22 01:06:25 +0000 |
commit | c46329c27b8c31729d2d51dc4f69da9b3923de04 (patch) | |
tree | 196522550c36225b4248bc8c6ed2fb86d5b0ddab /ui/qt/main.cpp | |
parent | a70dea195625f32a026d10d937345d177f81aead (diff) |
Add a routine to return a version string including VCS information.
Add a routine get_ws_vcs_version_info() that, for builds from a tree
checked out from Wireshark's version control system, returns a string
that includes both the Wireshark version number and an indication of
what particular VCS version was checked out, and just returns
Wireshark's version number for other builds.
Use that routine rather than manually gluing VERSION and the Git version
number together.
("vcs", not "git", just in case we do something bizarre or mercurial
some day. :-))
Change-Id: Ie5c6dc83b9d3f56655eaef30fec3ec9916b6320d
Reviewed-on: https://code.wireshark.org/review/2529
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/qt/main.cpp')
-rw-r--r-- | ui/qt/main.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/ui/qt/main.cpp b/ui/qt/main.cpp index 20b06ae0c7..bcf4f62634 100644 --- a/ui/qt/main.cpp +++ b/ui/qt/main.cpp @@ -47,6 +47,7 @@ #include <wsutil/report_err.h> #include <wsutil/u3.h> #include <wsutil/copyright_info.h> +#include <wsutil/ws_version_info.h> #include <wiretap/merge.h> @@ -206,12 +207,12 @@ print_usage(gboolean print_ver) { if (print_ver) { output = stdout; - fprintf(output, "Wireshark " VERSION "%s\n" + fprintf(output, "Wireshark %s\n" "Interactively dump and analyze network traffic.\n" "See http://www.wireshark.org for more information.\n" "\n" "%s", - wireshark_gitversion, get_copyright_info()); + get_ws_vcs_version_info(), get_copyright_info()); } else { output = stderr; } @@ -296,14 +297,14 @@ print_usage(gboolean print_ver) { static void show_version(void) { - printf(PACKAGE " " VERSION "%s\n" + printf(PACKAGE " %s\n" "\n" "%s" "\n" "%s" "\n" "%s", - wireshark_gitversion, get_copyright_info(), comp_info_str->str, + get_ws_vcs_version_info(), get_copyright_info(), comp_info_str->str, runtime_info_str->str); } @@ -521,12 +522,12 @@ int main(int argc, char *argv[]) // xxx qtshark get_runtime_version_info(runtime_info_str, get_gui_runtime_info); - ws_add_crash_info(PACKAGE " " VERSION "%s\n" + ws_add_crash_info(PACKAGE " %s\n" "\n" "%s" "\n" "%s", - wireshark_gitversion, comp_info_str->str, runtime_info_str->str); + get_ws_vcs_version_info(), comp_info_str->str, runtime_info_str->str); /* * Get credential information for later use, and drop privileges |