mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Added automatic version distinguishing code, to differentiate releases
from nightly builds from random development builds [originally from svn r28]
This commit is contained in:
parent
0fc1c0c9c9
commit
3b1389a474
25
Makefile
25
Makefile
@ -1,26 +1,32 @@
|
||||
# Makefile for PuTTY. Use `FWHACK=/DFWHACK' to cause the firewall hack
|
||||
# to be built in. (requires rebuild of ssh.obj only)
|
||||
|
||||
# Can also build with `VER=/DSNAPSHOT=1999-01-25' or
|
||||
# `VER=/DRELEASE=0.43' to get version numbering; otherwise you'll
|
||||
# get `Unidentified build'.
|
||||
|
||||
CFLAGS = /nologo /W3 /YX /O2 /Yd /D_WINDOWS /DDEBUG /ML /Fd
|
||||
|
||||
.c.obj:
|
||||
cl $(FWHACK) $(CFLAGS) /c $*.c
|
||||
|
||||
OBJS1 = window.obj windlg.obj terminal.obj telnet.obj misc.obj noise.obj
|
||||
PUTTYOBJS = window.obj windlg.obj terminal.obj telnet.obj
|
||||
OBJS1 = misc.obj noise.obj
|
||||
OBJS2 = ssh.obj sshcrc.obj sshdes.obj sshmd5.obj sshrsa.obj sshrand.obj
|
||||
OBJS3 = sshsha.obj
|
||||
OBJS3 = sshsha.obj version.obj
|
||||
RESRC = win_res.res
|
||||
LIBS1 = advapi32.lib user32.lib gdi32.lib
|
||||
LIBS2 = wsock32.lib comctl32.lib comdlg32.lib
|
||||
LIBS2 = ws2_32.lib comctl32.lib comdlg32.lib
|
||||
|
||||
putty.exe: $(OBJS1) $(OBJS2) $(OBJS3) $(RESRC) link.rsp
|
||||
putty.exe: $(PUTTYOBJS) $(OBJS1) $(OBJS2) $(OBJS3) $(RESRC) link.rsp
|
||||
link /debug -out:putty.exe @link.rsp
|
||||
|
||||
puttyd.exe: $(OBJS1) $(OBJS2) $(OBJS3) $(RESRC) link.rsp
|
||||
puttyd.exe: $(PUTTYOBJS) $(OBJS1) $(OBJS2) $(OBJS3) $(RESRC) link.rsp
|
||||
link /debug -out:puttyd.exe @link.rsp
|
||||
|
||||
link.rsp: makefile
|
||||
echo /nologo /subsystem:windows > link.rsp
|
||||
echo $(PUTTYOBJS) >> link.rsp
|
||||
echo $(OBJS1) >> link.rsp
|
||||
echo $(OBJS2) >> link.rsp
|
||||
echo $(OBJS3) >> link.rsp
|
||||
@ -41,9 +47,14 @@ sshmd5.obj: sshmd5.c ssh.h
|
||||
sshrsa.obj: sshrsa.c ssh.h
|
||||
sshsha.obj: sshsha.c ssh.h
|
||||
sshrand.obj: sshrand.c ssh.h
|
||||
version.obj: versionpseudotarget
|
||||
|
||||
# Hack to force version.obj to be rebuilt always
|
||||
versionpseudotarget:
|
||||
cl $(FWHACK) $(VER) $(CFLAGS) /c version.c
|
||||
|
||||
win_res.res: win_res.rc win_res.h putty.ico
|
||||
rc $(FWHACK) -r win_res.rc
|
||||
rc $(FWHACK) -r -DWIN32 -D_WIN32 -DWINVER=0x0400 win_res.rc
|
||||
|
||||
clean:
|
||||
del *.obj
|
||||
@ -53,4 +64,4 @@ clean:
|
||||
del *.aps
|
||||
del *.ilk
|
||||
del *.pdb
|
||||
del link.rsp
|
||||
del *.rsp
|
||||
|
5
putty.h
5
putty.h
@ -226,6 +226,11 @@ void *safemalloc(size_t);
|
||||
void *saferealloc(void *, size_t);
|
||||
void safefree(void *);
|
||||
|
||||
/*
|
||||
* Exports from version.c.
|
||||
*/
|
||||
extern char ver[];
|
||||
|
||||
/*
|
||||
* A debug system.
|
||||
*/
|
||||
|
20
version.c
Normal file
20
version.c
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* PuTTY version numbering
|
||||
*/
|
||||
|
||||
#define STR1(x) #x
|
||||
#define STR(x) STR1(x)
|
||||
|
||||
#if defined SNAPSHOT
|
||||
|
||||
char ver[] = "Development snapshot " STR(SNAPSHOT);
|
||||
|
||||
#elif defined RELEASE
|
||||
|
||||
char ver[] = "Release " STR(RELEASE);
|
||||
|
||||
#else
|
||||
|
||||
char ver[] = "Unidentified build, " __DATE__ " " __TIME__;
|
||||
|
||||
#endif
|
@ -19,8 +19,10 @@
|
||||
#define IDN_LIST 1001
|
||||
|
||||
#define IDA_ICON 1001
|
||||
#define IDA_TEXT 1002
|
||||
#define IDA_LICENCE 1003
|
||||
#define IDA_TEXT1 1002
|
||||
#define IDA_VERSION 1003
|
||||
#define IDA_TEXT2 1004
|
||||
#define IDA_LICENCE 1005
|
||||
|
||||
#define IDC_TAB 1001
|
||||
#define IDC_ABOUT 1002
|
||||
|
17
win_res.rc
17
win_res.rc
@ -4,18 +4,17 @@
|
||||
|
||||
#include "win_res.h"
|
||||
|
||||
IDI_MAINICON ICON "putty.ico"
|
||||
|
||||
IDD_ABOUTBOX DIALOG DISCARDABLE 140, 40, 136, 58
|
||||
IDD_ABOUTBOX DIALOG DISCARDABLE 140, 40, 136, 70
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "About PuTTY"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Close", IDOK, 82, 40, 48, 14
|
||||
PUSHBUTTON "View &Licence", IDA_LICENCE, 6, 40, 70, 14
|
||||
ICON IDI_MAINICON, IDA_ICON, 10, 10, 0, 0
|
||||
LTEXT "PuTTY Beta 0.45\n\251 1997-8 Simon Tatham\nAll rights reserved.",
|
||||
IDA_TEXT, 40, 6, 96, 24
|
||||
DEFPUSHBUTTON "&Close", IDOK, 82, 52, 48, 14
|
||||
PUSHBUTTON "View &Licence", IDA_LICENCE, 6, 52, 70, 14
|
||||
CTEXT "PuTTY", IDA_TEXT1, 10, 6, 120, 8
|
||||
CTEXT "", IDA_VERSION, 10, 16, 120, 16
|
||||
CTEXT "\251 1997-9 Simon Tatham. All rights reserved.",
|
||||
IDA_TEXT2, 10, 34, 120, 16
|
||||
END
|
||||
|
||||
IDD_MAINBOX DIALOG DISCARDABLE 0, 0, 180, 216
|
||||
@ -210,7 +209,7 @@ FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK", IDOK, 98, 211, 44, 14
|
||||
|
||||
LTEXT "Copyright \251 1998 Simon Tatham", 1000, 10, 10, 206, 8
|
||||
LTEXT "Copyright \251 1997-9 Simon Tatham", 1000, 10, 10, 206, 8
|
||||
LTEXT "Portions copyright Gary S. Brown and Eric Young", 1100, 10, 18, 206, 8
|
||||
|
||||
LTEXT "Permission is hereby granted, free of charge, to any person", 1002, 10, 34, 206, 8
|
||||
|
Loading…
Reference in New Issue
Block a user