1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 09:27:59 +00:00

Include the compile-time GTK version in the build info.

It's obvious to the trained eye whether GTK PuTTY was compiled against
GTK2 or GTK3, but the untrained eye would probably appreciate a little
help, and even the trained eye probably can't tell GTK 3.18 from 3.19
at a glance :-)
This commit is contained in:
Simon Tatham 2017-02-15 19:29:05 +00:00
parent 2fb3e26584
commit fb839a27fb
5 changed files with 39 additions and 6 deletions

12
Recipe
View File

@ -319,17 +319,17 @@ puttytel : [X] GTKTERM uxmisc misc ldisc settings uxsel U_BE_NOSSH
+ nogss gtkmain
plink : [U] uxplink uxcons NONSSH UXSSH U_BE_ALL logging UXMISC uxsignal
+ ux_x11 noterm
+ ux_x11 noterm uxnogtk
PUTTYGEN_UNIX = sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
+ sshrand uxnoise sshsha misc sshrsa sshdss uxcons uxstore uxmisc
+ sshpubk sshaes sshsh256 sshsh512 IMPORT puttygen.res time tree234
+ uxgen notiming conf sshecc sshecdsag
+ uxgen notiming conf sshecc sshecdsag uxnogtk
puttygen : [U] cmdgen PUTTYGEN_UNIX
cgtest : [UT] cgtest PUTTYGEN_UNIX
pscp : [U] pscp uxsftp uxcons UXSSH BE_SSH SFTP wildcard UXMISC
psftp : [U] psftp uxsftp uxcons UXSSH BE_SSH SFTP wildcard UXMISC
pscp : [U] pscp uxsftp uxcons UXSSH BE_SSH SFTP wildcard UXMISC uxnogtk
psftp : [U] psftp uxsftp uxcons UXSSH BE_SSH SFTP wildcard UXMISC uxnogtk
pageant : [X] uxpgnt uxagentc aqsync pageant sshrsa sshpubk sshdes sshbn
+ sshmd5 version tree234 misc sshaes sshsha sshdss sshsh256 sshsh512
@ -345,8 +345,8 @@ puttyapp : [XT] GTKTERM uxmisc misc ldisc settings uxsel U_BE_ALL uxstore
osxlaunch : [UT] osxlaunch
fuzzterm : [UT] UXTERM CHARSET misc version uxmisc uxucs fuzzterm time settings
+ uxstore be_none
testbn : [UT] testbn sshbn misc version conf tree234 uxmisc
+ uxstore be_none uxnogtk
testbn : [UT] testbn sshbn misc version conf tree234 uxmisc uxnogtk
testbn : [C] testbn sshbn misc version conf tree234 winmisc LIBS
# ----------------------------------------------------------------------

11
misc.c
View File

@ -1183,6 +1183,17 @@ char *buildinfo(const char *newline)
strbuf_catf(buf, " (_MSC_VER=%d)", (int)_MSC_VER);
#endif
#ifdef BUILDINFO_GTK
{
char *gtk_buildinfo = buildinfo_gtk_version();
if (gtk_buildinfo) {
strbuf_catf(buf, "%sCompiled against GTK version %s",
newline, gtk_buildinfo);
sfree(gtk_buildinfo);
}
}
#endif
#ifdef NO_SECURITY
strbuf_catf(buf, "%sBuild option: NO_SECURITY", newline);
#endif

View File

@ -200,3 +200,9 @@ void our_dialog_add_to_content_area(GtkWindow *dlg, GtkWidget *w,
w, expand, fill, padding);
#endif
}
char *buildinfo_gtk_version(void)
{
return dupprintf("%d.%d.%d",
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
}

View File

@ -32,17 +32,22 @@
#define DEFAULT_CLIPBOARD GDK_SELECTION_CLIPBOARD /* OS X has no PRIMARY */
#define BUILDINFO_PLATFORM "OS X (GTK)"
#define BUILDINFO_GTK
#elif defined NOT_X_WINDOWS
#define BUILDINFO_PLATFORM "Unix (pure GTK)"
#define BUILDINFO_GTK
#else
#define BUILDINFO_PLATFORM "Unix (GTK + X11)"
#define BUILDINFO_GTK
#endif
char *buildinfo_gtk_version(void);
struct Filename {
char *path;
};

11
unix/uxnogtk.c Normal file
View File

@ -0,0 +1,11 @@
/*
* uxnogtk.c: link into non-GUI Unix programs so that they can tell
* buildinfo about a lack of GTK.
*/
#include "putty.h"
char *buildinfo_gtk_version(void)
{
return NULL;
}