forked from osmocom/wireshark
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>
This commit is contained in:
parent
a70dea1956
commit
c46329c27b
17
dumpcap.c
17
dumpcap.c
|
@ -69,6 +69,7 @@
|
|||
|
||||
#include <wsutil/crash_info.h>
|
||||
#include <wsutil/copyright_info.h>
|
||||
#include <wsutil/ws_version_info.h>
|
||||
|
||||
#ifndef HAVE_GETOPT
|
||||
#include "wsutil/wsgetopt.h"
|
||||
|
@ -477,10 +478,10 @@ print_usage(gboolean print_ver)
|
|||
if (print_ver) {
|
||||
output = stdout;
|
||||
fprintf(output,
|
||||
"Dumpcap " VERSION "%s\n"
|
||||
"Dumpcap %s\n"
|
||||
"Capture network packets and dump them into a pcapng file.\n"
|
||||
"See http://www.wireshark.org for more information.\n",
|
||||
wireshark_gitversion);
|
||||
get_ws_vcs_version_info());
|
||||
} else {
|
||||
output = stderr;
|
||||
}
|
||||
|
@ -564,13 +565,13 @@ static void
|
|||
show_version(GString *comp_info_str, GString *runtime_info_str)
|
||||
{
|
||||
printf(
|
||||
"Dumpcap " VERSION "%s\n"
|
||||
"Dumpcap %s\n"
|
||||
"\n"
|
||||
"%s\n"
|
||||
"%s\n"
|
||||
"%s\n"
|
||||
"See http://www.wireshark.org for more information.\n",
|
||||
wireshark_gitversion, get_copyright_info(), comp_info_str->str, runtime_info_str->str);
|
||||
get_ws_vcs_version_info(), get_copyright_info(), comp_info_str->str, runtime_info_str->str);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2877,7 +2878,7 @@ capture_loop_init_output(capture_options *capture_opts, loop_data *ld, char *err
|
|||
os_info_str = g_string_new("");
|
||||
get_os_version_info(os_info_str);
|
||||
|
||||
g_snprintf(appname, sizeof(appname), "Dumpcap " VERSION "%s", wireshark_gitversion);
|
||||
g_snprintf(appname, sizeof(appname), "Dumpcap %s", get_ws_vcs_version_info());
|
||||
successful = pcapng_write_session_header_block(ld->pdh,
|
||||
(const char *)capture_opts->capture_comment, /* Comment*/
|
||||
NULL, /* HW*/
|
||||
|
@ -3370,7 +3371,7 @@ do_file_switch_or_stop(capture_options *capture_opts,
|
|||
os_info_str = g_string_new("");
|
||||
get_os_version_info(os_info_str);
|
||||
|
||||
g_snprintf(appname, sizeof(appname), "Dumpcap " VERSION "%s", wireshark_gitversion);
|
||||
g_snprintf(appname, sizeof(appname), "Dumpcap %s", get_ws_vcs_version_info());
|
||||
successful = pcapng_write_session_header_block(global_ld.pdh,
|
||||
NULL, /* Comment */
|
||||
NULL, /* HW */
|
||||
|
@ -4223,12 +4224,12 @@ main(int argc, char *argv[])
|
|||
get_runtime_version_info(runtime_info_str, NULL);
|
||||
|
||||
/* Add it to the information to be reported on a crash. */
|
||||
ws_add_crash_info("Dumpcap " VERSION "%s\n"
|
||||
ws_add_crash_info("Dumpcap %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);
|
||||
|
||||
#ifdef _WIN32
|
||||
arg_list_utf_16to8(argc, argv);
|
||||
|
|
|
@ -495,8 +495,8 @@ static void preinit_epan(char* argv0, int (*main)(int, char **)) {
|
|||
}
|
||||
|
||||
/* Add it to the information to be reported on a crash. */
|
||||
ws_add_crash_info("Echld " VERSION "%s\n%s\n%s",
|
||||
wireshark_gitversion, comp_info_str->str, runtime_info_str->str);
|
||||
ws_add_crash_info("Echld %s\n%s\n%s",
|
||||
ws_get_version_info(), comp_info_str->str, runtime_info_str->str);
|
||||
|
||||
init_stuff();
|
||||
|
||||
|
|
|
@ -1232,7 +1232,7 @@ print_preamble_ps(print_stream_t *self, gchar *filename, const char *version_str
|
|||
|
||||
fputs("%% the page title\n", output->fh);
|
||||
ps_clean_string(psbuffer, filename, MAX_PS_LINE_LENGTH);
|
||||
fprintf(output->fh, "/ws_pagetitle (%s - Wireshark " VERSION "%s) def\n", psbuffer, version_string);
|
||||
fprintf(output->fh, "/ws_pagetitle (%s - Wireshark %s) def\n", psbuffer, version_string);
|
||||
fputs("\n", output->fh);
|
||||
return !ferror(output->fh);
|
||||
}
|
||||
|
|
5
file.c
5
file.c
|
@ -42,6 +42,7 @@
|
|||
#include <wsutil/tempfile.h>
|
||||
#include <wsutil/file_util.h>
|
||||
#include <wsutil/filesystem.h>
|
||||
#include <wsutil/ws_version_info.h>
|
||||
|
||||
#include <wiretap/merge.h>
|
||||
|
||||
|
@ -76,8 +77,6 @@
|
|||
#include "ui/progress_dlg.h"
|
||||
#include "ui/ui_util.h"
|
||||
|
||||
#include "version_info.h"
|
||||
|
||||
/* Needed for addrinfo */
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
|
@ -2622,7 +2621,7 @@ cf_print_packets(capture_file *cf, print_args_t *print_args)
|
|||
callback_args.num_visible_cols = 0;
|
||||
callback_args.visible_cols = NULL;
|
||||
|
||||
if (!print_preamble(print_args->stream, cf->filename, wireshark_gitversion)) {
|
||||
if (!print_preamble(print_args->stream, cf->filename, get_ws_vcs_version_info())) {
|
||||
destroy_print_stream(print_args->stream);
|
||||
return CF_PRINT_WRITE_ERROR;
|
||||
}
|
||||
|
|
14
rawshark.c
14
rawshark.c
|
@ -102,6 +102,8 @@
|
|||
#include <wiretap/libpcap.h>
|
||||
#include <wiretap/pcap-encap.h>
|
||||
|
||||
#include <wsutil/ws_version_info.h>
|
||||
|
||||
#ifdef HAVE_LIBPCAP
|
||||
#include <setjmp.h>
|
||||
#include "capture-pcap-util.h"
|
||||
|
@ -189,12 +191,12 @@ print_usage(gboolean print_ver)
|
|||
if (print_ver) {
|
||||
output = stdout;
|
||||
fprintf(output,
|
||||
"Rawshark " VERSION "%s\n"
|
||||
"Rawshark %s\n"
|
||||
"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;
|
||||
}
|
||||
|
@ -427,14 +429,14 @@ set_link_type(const char *lt_arg) {
|
|||
static void
|
||||
show_version(GString *comp_info_str, GString *runtime_info_str)
|
||||
{
|
||||
printf("Rawshark " VERSION "%s\n"
|
||||
printf("Rawshark %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);
|
||||
}
|
||||
|
||||
|
@ -480,12 +482,12 @@ main(int argc, char *argv[])
|
|||
get_runtime_version_info(runtime_info_str, NULL);
|
||||
|
||||
/* Add it to the information to be reported on a crash. */
|
||||
ws_add_crash_info("Rawshark " VERSION "%s\n"
|
||||
ws_add_crash_info("Rawshark %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);
|
||||
|
||||
#ifdef _WIN32
|
||||
arg_list_utf_16to8(argc, argv);
|
||||
|
|
19
tshark.c
19
tshark.c
|
@ -67,6 +67,7 @@
|
|||
#include <wsutil/report_err.h>
|
||||
#include <wsutil/copyright_info.h>
|
||||
#include <wsutil/os_version_info.h>
|
||||
#include <wsutil/ws_version_info.h>
|
||||
|
||||
#include "globals.h"
|
||||
#include <epan/timestamp.h>
|
||||
|
@ -276,12 +277,12 @@ print_usage(gboolean print_ver)
|
|||
if (print_ver) {
|
||||
output = stdout;
|
||||
fprintf(output,
|
||||
"TShark " VERSION "%s\n"
|
||||
"TShark %s\n"
|
||||
"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;
|
||||
}
|
||||
|
@ -403,7 +404,7 @@ glossary_option_help(void)
|
|||
|
||||
output = stdout;
|
||||
|
||||
fprintf(output, "TShark " VERSION "%s\n", wireshark_gitversion);
|
||||
fprintf(output, "TShark %s\n", get_ws_vcs_version_info());
|
||||
|
||||
fprintf(output, "\n");
|
||||
fprintf(output, "Usage: tshark -G [report]\n");
|
||||
|
@ -906,14 +907,14 @@ check_capture_privs(void) {
|
|||
static void
|
||||
show_version(GString *comp_info_str, GString *runtime_info_str)
|
||||
{
|
||||
printf("TShark " VERSION "%s\n"
|
||||
printf("TShark %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);
|
||||
}
|
||||
|
||||
|
@ -991,12 +992,12 @@ main(int argc, char *argv[])
|
|||
get_runtime_version_info(runtime_info_str, NULL);
|
||||
|
||||
/* Add it to the information to be reported on a crash. */
|
||||
ws_add_crash_info("TShark " VERSION "%s\n"
|
||||
ws_add_crash_info("TShark %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);
|
||||
|
||||
#ifdef _WIN32
|
||||
arg_list_utf_16to8(argc, argv);
|
||||
|
@ -3084,7 +3085,7 @@ load_cap_file(capture_file *cf, char *save_file, int out_file_type,
|
|||
}
|
||||
/* If we don't have an application name add Tshark */
|
||||
if (shb_hdr->shb_user_appl == NULL) {
|
||||
g_snprintf(appname, sizeof(appname), "TShark " VERSION "%s", wireshark_gitversion);
|
||||
g_snprintf(appname, sizeof(appname), "TShark %s", get_ws_vcs_version_info());
|
||||
shb_hdr->shb_user_appl = appname;
|
||||
}
|
||||
|
||||
|
@ -3584,7 +3585,7 @@ write_preamble(capture_file *cf)
|
|||
switch (output_action) {
|
||||
|
||||
case WRITE_TEXT:
|
||||
return print_preamble(print_stream, cf ? cf->filename : NULL, wireshark_gitversion);
|
||||
return print_preamble(print_stream, cf ? cf->filename : NULL, get_ws_vcs_version_info());
|
||||
|
||||
case WRITE_XML:
|
||||
if (print_details)
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <wsutil/filesystem.h>
|
||||
#include <wsutil/plugins.h>
|
||||
#include <wsutil/copyright_info.h>
|
||||
#include <wsutil/ws_version_info.h>
|
||||
#ifdef HAVE_LIBSMI
|
||||
#include <epan/oids.h>
|
||||
#endif
|
||||
|
@ -41,7 +42,6 @@
|
|||
#endif
|
||||
|
||||
#include "../log.h"
|
||||
#include "../version_info.h"
|
||||
#include "../register.h"
|
||||
|
||||
#include "ui/last_open_dir.h"
|
||||
|
@ -314,7 +314,7 @@ about_wireshark_page_new(void)
|
|||
|
||||
/* Construct the message string */
|
||||
message = g_strdup_printf(
|
||||
"Version " VERSION "%s\n"
|
||||
"Version %s\n"
|
||||
"\n"
|
||||
"%s"
|
||||
"\n"
|
||||
|
@ -325,7 +325,7 @@ about_wireshark_page_new(void)
|
|||
"Wireshark is Open Source Software released under the GNU General Public License.\n"
|
||||
"\n"
|
||||
"Check the man page and http://www.wireshark.org for more information.",
|
||||
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);
|
||||
|
||||
msg_label = gtk_label_new(message);
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "globals.h"
|
||||
#include "wtap.h"
|
||||
#include "pcap-encap.h"
|
||||
#include "version_info.h"
|
||||
|
||||
#include "ui/simple_dialog.h"
|
||||
#include "ui/alert_box.h"
|
||||
|
@ -51,6 +50,7 @@
|
|||
#include "wsutil/file_util.h"
|
||||
#include "wsutil/tempfile.h"
|
||||
#include "wsutil/os_version_info.h"
|
||||
#include "wsutil/ws_version_info.h"
|
||||
|
||||
#define INPUT_FRM_KEY "input_frame"
|
||||
|
||||
|
@ -474,7 +474,7 @@ file_import_open(text_import_info_t *info)
|
|||
os_info_str = g_string_new("");
|
||||
get_os_version_info(os_info_str);
|
||||
|
||||
g_snprintf(appname, sizeof(appname), "Wireshark " VERSION "%s", wireshark_gitversion);
|
||||
g_snprintf(appname, sizeof(appname), "Wireshark %s", get_ws_vcs_version_info());
|
||||
|
||||
shb_hdr = g_new(wtapng_section_t,1);
|
||||
shb_hdr->section_length = -1;
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include <ui/simple_dialog.h>
|
||||
|
||||
#include <wsutil/file_util.h>
|
||||
#include <wsutil/ws_version_info.h>
|
||||
|
||||
#include "ui/gtk/color_utils.h"
|
||||
#include "ui/gtk/stock_icons.h"
|
||||
|
@ -61,8 +62,6 @@
|
|||
#include "ui/win32/print_win32.h"
|
||||
#endif
|
||||
|
||||
#include "version_info.h"
|
||||
|
||||
/* static variable declarations to speed up the performance
|
||||
* of follow_load_text and follow_add_to_gtk_text
|
||||
*/
|
||||
|
@ -458,7 +457,7 @@ follow_print_stream(GtkWidget * w _U_, gpointer data)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!print_preamble(stream, cfile.filename, wireshark_gitversion))
|
||||
if (!print_preamble(stream, cfile.filename, get_ws_vcs_version_info()))
|
||||
goto print_error;
|
||||
|
||||
switch (follow_read_stream(follow_info, follow_print_text, stream)) {
|
||||
|
|
|
@ -64,6 +64,7 @@
|
|||
#include <wsutil/u3.h>
|
||||
#include <wsutil/copyright_info.h>
|
||||
#include <wsutil/os_version_info.h>
|
||||
#include <wsutil/ws_version_info.h>
|
||||
|
||||
#include <wiretap/merge.h>
|
||||
|
||||
|
@ -1165,12 +1166,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;
|
||||
}
|
||||
|
@ -1260,14 +1261,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);
|
||||
}
|
||||
|
||||
|
@ -2253,12 +2254,12 @@ main(int argc, char *argv[])
|
|||
get_runtime_version_info(runtime_info_str, get_gui_runtime_info);
|
||||
|
||||
#ifdef _WIN32
|
||||
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);
|
||||
|
||||
/* Start windows sockets */
|
||||
WSAStartup( MAKEWORD( 1, 1 ), &wsaData );
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "gui_utils.h"
|
||||
#include "main_titlebar.h"
|
||||
|
||||
#include "../version_info.h"
|
||||
#include <wsutil/ws_version_info.h>
|
||||
|
||||
/*
|
||||
* Key to attach the "un-decorated" title to the window, so that if the
|
||||
|
@ -76,7 +76,7 @@ main_titlebar_update(void)
|
|||
if ((prefs.gui_version_placement == version_title_only) ||
|
||||
(prefs.gui_version_placement == version_both)) {
|
||||
gchar *old_title = title;
|
||||
title = g_strdup_printf("%s [Wireshark %s %s]", title, VERSION, wireshark_gitversion);
|
||||
title = g_strdup_printf("%s [Wireshark %s]", title, get_ws_vcs_version_info());
|
||||
g_free(old_title);
|
||||
}
|
||||
gtk_window_set_title(GTK_WINDOW(top_level), title);
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
#include <wsutil/file_util.h>
|
||||
#include <wsutil/str_util.h>
|
||||
#include <wsutil/ws_version_info.h>
|
||||
|
||||
#ifdef HAVE_LIBPCAP
|
||||
#include "ui/iface_lists.h"
|
||||
|
@ -65,7 +66,6 @@
|
|||
#include "ui/gtk/webbrowser.h"
|
||||
#endif
|
||||
#endif /* HAVE_LIBPCAP */
|
||||
#include "../version_info.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <tchar.h>
|
||||
|
@ -335,8 +335,8 @@ welcome_header_set_message(gchar *msg) {
|
|||
|
||||
if ((prefs.gui_version_placement == version_welcome_only) ||
|
||||
(prefs.gui_version_placement == version_both)) {
|
||||
g_string_append_printf(message, "</span>\n<span size=\"large\" foreground=\"white\">Version " VERSION "%s",
|
||||
wireshark_gitversion);
|
||||
g_string_append_printf(message, "</span>\n<span size=\"large\" foreground=\"white\">Version %s",
|
||||
get_ws_vcs_version_info());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,11 +31,12 @@
|
|||
|
||||
#include <wiretap/wtap.h>
|
||||
|
||||
#include <wsutil/ws_version_info.h>
|
||||
|
||||
#include "../globals.h"
|
||||
#include "../file.h"
|
||||
#include "../summary.h"
|
||||
#include "../capture-pcap-util.h"
|
||||
#include "../version_info.h"
|
||||
|
||||
#ifdef HAVE_LIBPCAP
|
||||
#include "../capture.h"
|
||||
|
@ -666,7 +667,7 @@ summary_to_texbuff(GtkTextBuffer *buffer)
|
|||
#endif
|
||||
|
||||
/* Add Wireshark version*/
|
||||
g_snprintf(string_buff, SUM_STR_MAX, "Summary created by Wireshark %s\n\n", wireshark_gitversion);
|
||||
g_snprintf(string_buff, SUM_STR_MAX, "Summary created by Wireshark %s\n\n", get_ws_vcs_version_info());
|
||||
gtk_text_buffer_insert_at_cursor (buffer, string_buff, -1);
|
||||
|
||||
/* Info about file */
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
#endif
|
||||
|
||||
#include "../log.h"
|
||||
#include "../version_info.h"
|
||||
#include "../register.h"
|
||||
|
||||
#include "ui/text_import_scanner.h"
|
||||
|
@ -51,6 +50,7 @@
|
|||
#include "wsutil/tempfile.h"
|
||||
#include "wsutil/plugins.h"
|
||||
#include "wsutil/copyright_info.h"
|
||||
#include "wsutil/ws_version_info.h"
|
||||
|
||||
#include "qt_ui_utils.h"
|
||||
|
||||
|
@ -136,7 +136,7 @@ AboutDialog::AboutDialog(QWidget *parent) :
|
|||
|
||||
/* Construct the message string */
|
||||
message = QString(
|
||||
"Version " VERSION "%1\n"
|
||||
"Version %1\n"
|
||||
"\n"
|
||||
"%2"
|
||||
"\n"
|
||||
|
@ -147,7 +147,7 @@ AboutDialog::AboutDialog(QWidget *parent) :
|
|||
"Wireshark is Open Source Software released under the GNU General Public License.\n"
|
||||
"\n"
|
||||
"Check the man page and http://www.wireshark.org for more information.")
|
||||
.arg(wireshark_gitversion).arg(get_copyright_info()).arg(comp_info_str->str)
|
||||
.arg(get_ws_vcs_version_info()).arg(get_copyright_info()).arg(comp_info_str->str)
|
||||
.arg(runtime_info_str->str);
|
||||
|
||||
ui->label_wireshark->setTextInteractionFlags(Qt::TextSelectableByMouse);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
|
||||
#include "wireshark_application.h"
|
||||
|
||||
#include <wsutil/ws_version_info.h>
|
||||
|
||||
#include <QtGui>
|
||||
#include <QPushButton>
|
||||
|
||||
|
@ -125,7 +127,7 @@ QString SummaryDialog::SummaryToString()
|
|||
QString summaryStr;
|
||||
QTextStream out(&summaryStr);
|
||||
|
||||
out << tr("Summary created by Wireshark %1\n\n").arg(wireshark_gitversion);
|
||||
out << tr("Summary created by Wireshark %1\n\n").arg(get_ws_vcs_version_info());
|
||||
|
||||
// File Section
|
||||
out << tr("File: \n");
|
||||
|
|
|
@ -38,8 +38,6 @@
|
|||
#include "file.h"
|
||||
#include "summary.h"
|
||||
|
||||
#include "version_info.h"
|
||||
|
||||
#ifdef HAVE_LIBPCAP
|
||||
#include "capture.h"
|
||||
#include "ui/capture_globals.h"
|
||||
|
|
|
@ -27,9 +27,9 @@
|
|||
#include "globals.h"
|
||||
#include "wtap.h"
|
||||
#include "pcap-encap.h"
|
||||
#include "version_info.h"
|
||||
#include "wsutil/tempfile.h"
|
||||
#include "wsutil/os_version_info.h"
|
||||
#include "wsutil/ws_version_info.h"
|
||||
|
||||
#include <epan/tap.h>
|
||||
#include <epan/exported_pdu.h>
|
||||
|
@ -102,7 +102,7 @@ exp_pdu_file_open(exp_pdu_t *exp_pdu_tap_data)
|
|||
os_info_str = g_string_new("");
|
||||
get_os_version_info(os_info_str);
|
||||
|
||||
g_snprintf(appname, sizeof(appname), "Wireshark " VERSION "%s", wireshark_gitversion);
|
||||
g_snprintf(appname, sizeof(appname), "Wireshark %s", get_ws_vcs_version_info());
|
||||
|
||||
shb_hdr = g_new(wtapng_section_t,1);
|
||||
shb_hdr->section_length = -1;
|
||||
|
|
|
@ -38,18 +38,10 @@
|
|||
#include <wsutil/cpu_info.h>
|
||||
#include <wsutil/mem_info.h>
|
||||
|
||||
#include "version.h"
|
||||
|
||||
#ifdef HAVE_LIBCAP
|
||||
# include <sys/capability.h>
|
||||
#endif
|
||||
|
||||
#ifdef GITVERSION
|
||||
const char *wireshark_gitversion = " (" GITVERSION " from " GITBRANCH ")";
|
||||
#else
|
||||
const char *wireshark_gitversion = "";
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If the string doesn't end with a newline, append one.
|
||||
* Then word-wrap it to 80 columns.
|
||||
|
|
|
@ -28,11 +28,6 @@
|
|||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*
|
||||
* The Git version string or ""
|
||||
*/
|
||||
extern const gchar *wireshark_gitversion;
|
||||
|
||||
/*
|
||||
* Get various library compile-time versions and append them to
|
||||
* the specified GString.
|
||||
|
|
|
@ -83,6 +83,7 @@ set(WSUTIL_FILES
|
|||
unicode-utils.c
|
||||
ws_mempbrk.c
|
||||
ws_mempbrk_sse42.c
|
||||
ws_version_info.c
|
||||
nghttp2/nghttp2_buf.c
|
||||
nghttp2/nghttp2_hd.c
|
||||
nghttp2/nghttp2_hd_huffman.c
|
||||
|
|
|
@ -69,7 +69,8 @@ LIBWSUTIL_SRC = \
|
|||
type_util.c \
|
||||
ws_mempbrk.c \
|
||||
u3.c \
|
||||
unicode-utils.c
|
||||
unicode-utils.c \
|
||||
ws_version_info.c
|
||||
|
||||
# Header files that are not generated from other files
|
||||
LIBWSUTIL_INCLUDES = \
|
||||
|
@ -119,8 +120,8 @@ LIBWSUTIL_INCLUDES = \
|
|||
u3.h \
|
||||
unicode-utils.h \
|
||||
ws_cpuid.h \
|
||||
ws_mempbrk.h
|
||||
|
||||
ws_mempbrk.h \
|
||||
ws_version_info.h
|
||||
|
||||
#
|
||||
# Editor modelines - http://www.wireshark.org/tools/modelines.html
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
/* ws_version_info.c
|
||||
* Routines to report version information for Wireshark programs
|
||||
*
|
||||
* Wireshark - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@wireshark.org>
|
||||
* Copyright 1998 Gerald Combs
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include "version.h"
|
||||
|
||||
#include <wsutil/ws_version_info.h>
|
||||
|
||||
/*
|
||||
* Return a version number string for Wireshark, including, for builds
|
||||
* from a tree checked out from Wireshark's version control system,
|
||||
* something identifying what version was checked out.
|
||||
*/
|
||||
const char *
|
||||
get_ws_vcs_version_info(void)
|
||||
{
|
||||
#ifdef GITVERSION
|
||||
return VERSION " (" GITVERSION " from " GITBRANCH ")";
|
||||
#else
|
||||
return VERSION;
|
||||
#endif
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
/* ws_version_info.h
|
||||
* Declarations of routines to report version information for Wireshark
|
||||
* programs
|
||||
*
|
||||
* Wireshark - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@wireshark.org>
|
||||
* Copyright 1998 Gerald Combs
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef __WSUTIL_WS_VERSION_INFO_H__
|
||||
#define __WSUTIL_WS_VERSION_INFO_H__
|
||||
|
||||
#include "ws_symbol_export.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*
|
||||
* Return a version number string for Wireshark, including, for builds
|
||||
* from a tree checked out from Wireshark's version control system,
|
||||
* something identifying what version was checked out.
|
||||
*/
|
||||
WS_DLL_PUBLIC const char *get_ws_vcs_version_info(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __WSUTIL_WS_VERSION_INFO_H__ */
|
Loading…
Reference in New Issue