mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Include 'build info' in all --version text and About boxes.
This shows the build platform (32- vs 64-bit in particular, and also whether Unix GTK builds were compiled with or without the X11 pieces), what compiler was used to build the binary, and any interesting build options that might have been set on the make command line (especially, but not limited to, the security-damaging ones like NO_SECURITY or UNPROTECT). This will probably be useful all over the place, but in particular it should allow the different Windows binaries to be told apart! Commits21101c739
and2eb952ca3
laid the groundwork for this, by allowing the various About boxes to contain free text and also ensuring they could be copied and pasted easily as part of a bug report.
This commit is contained in:
@ -3701,9 +3701,10 @@ void about_box(void *window)
|
||||
gtk_widget_show(w);
|
||||
|
||||
{
|
||||
char *buildinfo_text = buildinfo("\n");
|
||||
char *label_text = dupprintf
|
||||
("%s\n\n%s\n\n%s",
|
||||
appname, ver,
|
||||
("%s\n\n%s\n\n%s\n\n%s",
|
||||
appname, ver, buildinfo_text,
|
||||
"Copyright " SHORT_COPYRIGHT_DETAILS ". All rights reserved");
|
||||
w = gtk_label_new(label_text);
|
||||
gtk_label_set_justify(GTK_LABEL(w), GTK_JUSTIFY_CENTER);
|
||||
|
@ -287,10 +287,13 @@ static void help(FILE *fp) {
|
||||
}
|
||||
|
||||
static void version(FILE *fp) {
|
||||
if(fprintf(fp, "%s: %s\n", appname, ver) < 0 || fflush(fp) < 0) {
|
||||
char *buildinfo_text = buildinfo("\n");
|
||||
if(fprintf(fp, "%s: %s\n%s\n", appname, ver, buildinfo_text) < 0 ||
|
||||
fflush(fp) < 0) {
|
||||
perror("output error");
|
||||
exit(1);
|
||||
}
|
||||
sfree(buildinfo_text);
|
||||
}
|
||||
|
||||
static struct gui_data *the_inst;
|
||||
|
11
unix/unix.h
11
unix/unix.h
@ -30,6 +30,17 @@
|
||||
#define META_MANUAL_MASK (GDK_MOD1_MASK)
|
||||
#define JUST_USE_GTK_CLIPBOARD_UTF8 /* low-level gdk_selection_* fails */
|
||||
#define DEFAULT_CLIPBOARD GDK_SELECTION_CLIPBOARD /* OS X has no PRIMARY */
|
||||
|
||||
#define BUILDINFO_PLATFORM "OS X (GTK)"
|
||||
|
||||
#elif defined NOT_X_WINDOWS
|
||||
|
||||
#define BUILDINFO_PLATFORM "Unix (pure GTK)"
|
||||
|
||||
#else
|
||||
|
||||
#define BUILDINFO_PLATFORM "Unix (GTK + X11)"
|
||||
|
||||
#endif
|
||||
|
||||
struct Filename {
|
||||
|
@ -141,7 +141,9 @@ static void usage(void)
|
||||
|
||||
static void version(void)
|
||||
{
|
||||
printf("pageant: %s\n", ver);
|
||||
char *buildinfo_text = buildinfo("\n");
|
||||
printf("pageant: %s\n%s\n", ver, buildinfo_text);
|
||||
sfree(buildinfo_text);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
@ -594,7 +594,9 @@ static void usage(void)
|
||||
|
||||
static void version(void)
|
||||
{
|
||||
printf("plink: %s\n", ver);
|
||||
char *buildinfo_text = buildinfo("\n");
|
||||
printf("plink: %s\n%s\n", ver, buildinfo_text);
|
||||
sfree(buildinfo_text);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user