1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 03:52:49 -05:00

`win-versioninfo': all builds of all Windows binaries now contain

a VERSIONINFO resource. The versioning scheme is described in
windows/version.rc2.

Some .rc files are now #included in others. In order to keep MSVC
project files working, these have been renamed to .rc2; there may exist
a better solution.

(This checkin also includes the documentation tweak missing from r6367.)

Testing performed:
 - MinGW (cross-compiler): works
 - VC nmake: works (tested with VC6)
 - VC project files: builds with VERSIONINFO resource (no VER variable though)
 - Borland: an old version of this patch was tested with it and more or
   less worked, except that some of the VERSIONINFO strings were apparently
   not terminated properly. Not attempted to work around this.
 - LCC: not tested. Some fixes are in there from the last time we tried
   this, but then the build ultimately failed and I haven't tried this
   since that was fixed.
 - Dev-C++: untested. (Haven't done anything special.)
 - Unix Gtk/autoconf Makefiles work as before.

[originally from svn r6374]
[r6367 == f86ad059db]
[this svn revision also touched putty-wishlist]
This commit is contained in:
Jacob Nevins
2005-10-04 14:13:28 +00:00
parent 9d3ab46800
commit 4d48ba62e8
13 changed files with 314 additions and 48 deletions

View File

@ -4,6 +4,9 @@
#include "rcstuff.h"
#define APPNAME "Pageant"
#define APPDESC "PuTTY SSH authentication agent"
200 ICON "pageant.ico"
201 ICON "pageants.ico"
@ -85,6 +88,8 @@ BEGIN
END
#include "version.rc2"
#ifndef NO_MANIFESTS
1 RT_MANIFEST "pageant.mft"
#endif /* NO_MANIFESTS */

View File

@ -1 +1,8 @@
#include "rcstuff.h"
#define APPNAME "Plink"
#define APPDESC "Command-line SSH, Telnet, and Rlogin client"
200 ICON "putty.ico"
#include "version.rc2"

View File

@ -1,2 +1,8 @@
#include "rcstuff.h"
#define APPNAME "PSCP"
#define APPDESC "Command-line SCP/SFTP client"
200 ICON "pscp.ico"
#include "version.rc2"

8
windows/psftp.rc Normal file
View File

@ -0,0 +1,8 @@
#include "rcstuff.h"
#define APPNAME "PSFTP"
#define APPDESC "Command-line interactive SFTP client"
200 ICON "pscp.ico"
#include "version.rc2"

10
windows/putty.rc Normal file
View File

@ -0,0 +1,10 @@
#include "rcstuff.h"
#define APPNAME "PuTTY"
#define APPDESC "SSH, Telnet and Rlogin client"
#include "win_res.rc2"
#ifndef NO_MANIFESTS
1 RT_MANIFEST "putty.mft"
#endif /* NO_MANIFESTS */

View File

@ -4,6 +4,9 @@
#include "rcstuff.h"
#define APPNAME "PuTTYgen"
#define APPDESC "PuTTY SSH key generation utility"
200 ICON "puttygen.ico"
201 DIALOG DISCARDABLE 0, 0, 318, 270
@ -78,6 +81,8 @@ BEGIN
END
#include "version.rc2"
#ifndef NO_MANIFESTS
1 RT_MANIFEST "puttygen.mft"
#endif /* NO_MANIFESTS */

11
windows/puttytel.rc Normal file
View File

@ -0,0 +1,11 @@
#include "rcstuff.h"
#define APPNAME "PuTTYtel"
#define APPDESC "Telnet and Rlogin client"
#include "win_res.rc2"
#ifndef NO_MANIFESTS
/* FIXME */
1 RT_MANIFEST "putty.mft"
#endif /* NO_MANIFESTS */

View File

@ -30,4 +30,21 @@
#define RT_MANIFEST 24
#endif
/* LCC is the offender here. */
#ifndef VS_FF_DEBUG
#define VS_FF_DEBUG 1
#endif
#ifndef VS_FF_PRERELEASE
#define VS_FF_PRERELEASE 2
#endif
#ifndef VS_FF_PRIVATEBUILD
#define VS_FF_PRIVATEBUILD 8
#endif
#ifndef VOS__WINDOWS32
#define VOS__WINDOWS32 4
#endif
#ifndef VFT_APP
#define VFT_APP 1
#endif
#endif /* PUTTY_RCSTUFF_H */

121
windows/version.rc2 Normal file
View File

@ -0,0 +1,121 @@
/*
* Standard Windows version information.
* (For inclusion in other .rc files with appropriate macro definitions.)
* FIXME: This file is called '.rc2' rather than '.rc' to avoid MSVC trying
* to compile it on its own when using the project files. Nicer solutions
* welcome.
*/
/*
* Binary versions in Windows are major.minor.build.revision. Each
* component is 16-bit.
* Here we have:
* major.minor
* PuTTY version number (e.g. 0.58). (We've made a policy decision
* that these will be numeric from now on.)
* Present in releases and snapshots (for the sake of monotonicity
* in version numbers).
* build
* In releases, always 0.
* In snapshots, nearest Subversion revision. (It shouldn't be
* assumed that only one binary will have a given build number, of
* course.)
* revision
* Reserved; always 0.
*
* Examples of these version numbers:
* Release: 0.58.0.0 (but 0.58 didn't have a VERSIONINFO resource)
* Snapshot: 0.58.6356.0 (between 0.58 and the next release)
* Local: 0.0.0.0
*/
/*
* Mechanics of version naming/numbering.
* (This is a ripoff of ../version.c.)
*/
#define STR1(x) #x
#define STR(x) STR1(x)
/* We keep this around even for snapshots, for monotonicity of version
* numbering. It needs to be kept up to date. NB _comma_-separated. */
#define BASE_VERSION 0,58
#if defined SNAPSHOT
/* Make SVN_REV mandatory for snapshots, to avoid issuing binary
* version numbers that look like full releases. */
#if (!defined SVN_REV) || (SVN_REV == 0)
#error SVN_REV not defined/nonzero for snapshot build
#endif
#define VERSION_TEXT "Development snapshot " STR(SNAPSHOT) ":r" STR(SVN_REV)
#define BINARY_VERSION BASE_VERSION,SVN_REV,0
#elif defined RELEASE
#define VERSION_TEXT "Release " STR(RELEASE)
#define BINARY_VERSION BASE_VERSION,0,0
#else
/* We can't reliably get the same date and time as version.c, so
* we won't bother trying. */
#define VERSION_TEXT "Unidentified build"
#define BINARY_VERSION 0,0,0,0
#endif
/*
* The actual VERSIONINFO resource.
*/
VS_VERSION_INFO VERSIONINFO
/* (None of this "fixed" info appears to be trivially user-visible on
* Win98SE. The binary version does show up on Win2K.) */
FILEVERSION BINARY_VERSION
PRODUCTVERSION BINARY_VERSION /* version of whole suite */
FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE | VS_FF_PRIVATEBUILD
FILEFLAGS 0x0L
#if defined DEBUG
| VS_FF_DEBUG
#endif
#if defined SNAPSHOT
| VS_FF_PRERELEASE
#elif !defined RELEASE
| VS_FF_PRIVATEBUILD
#endif
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE 0x0L /* n/a for VFT_APP */
BEGIN
/* (On Win98SE and Win2K, we can see most of this on the Version tab
* in the file properties in Explorer.) */
BLOCK "StringFileInfo"
BEGIN
/* "lang-charset" LLLLCCCC = (UK English, Unicode) */
BLOCK "080904B0"
BEGIN
VALUE "CompanyName", "Simon Tatham" /* required :/ */
VALUE "ProductName", "PuTTY suite"
VALUE "FileDescription", APPDESC
VALUE "InternalName", APPNAME
VALUE "OriginalFilename", APPNAME
VALUE "FileVersion", VERSION_TEXT
VALUE "ProductVersion", VERSION_TEXT
VALUE "LegalCopyright", "Copyright \251 1997-2005 Simon Tatham."
#if (!defined SNAPSHOT) && (!defined RELEASE)
/* Only if VS_FF_PRIVATEBUILD. */
VALUE "PrivateBuild", VERSION_TEXT /* NBI */
#endif
END
END
BLOCK "VarFileInfo"
BEGIN
/* Once again -- same meanings -- apparently necessary */
VALUE "Translation", 0x809, 1200
END
END
#undef VERSION_TEXT
#undef BASE_VERSION
#undef BINARY_VERSION

View File

@ -1,8 +1,14 @@
/*
* Windows resources for PuTTY and PuTTYtel.
* Windows resources shared between PuTTY and PuTTYtel, to be #include'd
* after defining appropriate macros.
* Note that many of these strings mention PuTTY. Due to restrictions in
* VC's handling of string concatenation, this can't easily be fixed.
* It's fixed up at runtime.
* FIXME: This file is called '.rc2' rather than '.rc' to avoid MSVC trying
* to compile it on its own when using the project files. Nicer solutions
* welcome.
*/
#include "rcstuff.h"
#include "win_res.h"
IDI_MAINICON ICON "putty.ico"
@ -83,6 +89,4 @@ BEGIN
END
#ifndef NO_MANIFESTS
1 RT_MANIFEST "putty.mft"
#endif /* NO_MANIFESTS */
#include "version.rc2"