1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 11:32: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!

Commits 21101c739 and 2eb952ca3 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:
Simon Tatham
2017-01-21 14:55:53 +00:00
parent 960ad594a3
commit 7e14730b83
18 changed files with 127 additions and 28 deletions

View File

@ -36,14 +36,14 @@ BEGIN
END
/* Accelerators used: cl */
213 DIALOG DISCARDABLE 140, 40, 214, 74
213 DIALOG DISCARDABLE 140, 40, 214, 90
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About Pageant"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "&Close", IDOK, 160, 56, 48, 14
PUSHBUTTON "View &Licence", 101, 6, 56, 70, 14
EDITTEXT 1000, 10, 6, 194, 48, ES_READONLY | ES_MULTILINE | ES_CENTER, WS_EX_STATICEDGE
DEFPUSHBUTTON "&Close", IDOK, 160, 72, 48, 14
PUSHBUTTON "View &Licence", 101, 6, 72, 70, 14
EDITTEXT 1000, 10, 6, 194, 64, ES_READONLY | ES_MULTILINE | ES_CENTER, WS_EX_STATICEDGE
END
/* No accelerators used */

View File

@ -29,14 +29,14 @@ BEGIN
END
/* Accelerators used: cl */
213 DIALOG DISCARDABLE 140, 40, 214, 74
213 DIALOG DISCARDABLE 140, 40, 214, 90
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About PuTTYgen"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "&Close", IDOK, 160, 56, 48, 14
PUSHBUTTON "View &Licence", 101, 6, 56, 70, 14
EDITTEXT 1000, 10, 6, 194, 48, ES_READONLY | ES_MULTILINE | ES_CENTER, WS_EX_STATICEDGE
DEFPUSHBUTTON "&Close", IDOK, 160, 72, 48, 14
PUSHBUTTON "View &Licence", 101, 6, 72, 70, 14
EDITTEXT 1000, 10, 6, 194, 64, ES_READONLY | ES_MULTILINE | ES_CENTER, WS_EX_STATICEDGE
END
/* No accelerators used */

View File

@ -16,15 +16,15 @@ IDI_MAINICON ICON "putty.ico"
IDI_CFGICON ICON "puttycfg.ico"
/* Accelerators used: clw */
IDD_ABOUTBOX DIALOG DISCARDABLE 140, 40, 214, 74
IDD_ABOUTBOX DIALOG DISCARDABLE 140, 40, 270, 106
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About PuTTY"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "&Close", IDOK, 160, 56, 48, 14
PUSHBUTTON "View &Licence", IDA_LICENCE, 6, 56, 70, 14
PUSHBUTTON "Visit &Web Site", IDA_WEB, 84, 56, 70, 14
EDITTEXT IDA_TEXT, 10, 6, 194, 48, ES_READONLY | ES_MULTILINE | ES_CENTER, WS_EX_STATICEDGE
DEFPUSHBUTTON "&Close", IDOK, 216, 88, 48, 14
PUSHBUTTON "View &Licence", IDA_LICENCE, 6, 88, 70, 14
PUSHBUTTON "Visit &Web Site", IDA_WEB, 140, 88, 70, 14
EDITTEXT IDA_TEXT, 10, 6, 250, 80, ES_READONLY | ES_MULTILINE | ES_CENTER, WS_EX_STATICEDGE
END
/* Accelerators used: aco */

View File

@ -200,10 +200,12 @@ static INT_PTR CALLBACK AboutProc(HWND hwnd, UINT msg,
SetWindowText(hwnd, str);
sfree(str);
{
char *buildinfo_text = buildinfo("\r\n");
char *text = dupprintf
("%s\r\n\r\n%s\r\n\r\n%s",
appname, ver,
("%s\r\n\r\n%s\r\n\r\n%s\r\n\r\n%s",
appname, ver, buildinfo_text,
"\251 " SHORT_COPYRIGHT_DETAILS ". All rights reserved.");
sfree(buildinfo_text);
SetDlgItemText(hwnd, IDA_TEXT, text);
sfree(text);
}

View File

@ -297,10 +297,12 @@ static INT_PTR CALLBACK AboutProc(HWND hwnd, UINT msg,
}
{
char *buildinfo_text = buildinfo("\r\n");
char *text = dupprintf
("PuTTYgen\r\n\r\n%s\r\n\r\n%s",
ver,
("PuTTYgen\r\n\r\n%s\r\n\r\n%s\r\n\r\n%s",
ver, buildinfo_text,
"\251 " SHORT_COPYRIGHT_DETAILS ". All rights reserved.");
sfree(buildinfo_text);
SetDlgItemText(hwnd, 1000, text);
sfree(text);
}

View File

@ -152,10 +152,12 @@ static INT_PTR CALLBACK AboutProc(HWND hwnd, UINT msg,
switch (msg) {
case WM_INITDIALOG:
{
char *buildinfo_text = buildinfo("\r\n");
char *text = dupprintf
("Pageant\r\n\r\n%s\r\n\r\n%s",
ver,
("Pageant\r\n\r\n%s\r\n\r\n%s\r\n\r\n%s",
ver, buildinfo_text,
"\251 " SHORT_COPYRIGHT_DETAILS ". All rights reserved.");
sfree(buildinfo_text);
SetDlgItemText(hwnd, 1000, text);
sfree(text);
}

View File

@ -223,7 +223,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);
}

View File

@ -27,6 +27,8 @@
#include "winhelp.h"
#define BUILDINFO_PLATFORM "Windows"
struct Filename {
char *path;
};