diff options
| author | Simon Tatham <anakin@pobox.com> | 2023-11-19 11:54:48 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2023-11-19 15:12:47 +0000 |
| commit | 08365fb260ae6e32442dd9f196e65d13facb4b33 (patch) | |
| tree | 553b14f09a856d6138bee090b6bf236672f14ab3 /puzzles.rc | |
| parent | 595338fa43d40f356f04b8704f72f060651669e8 (diff) | |
| download | puzzles-08365fb260ae6e32442dd9f196e65d13facb4b33.zip puzzles-08365fb260ae6e32442dd9f196e65d13facb4b33.tar.gz puzzles-08365fb260ae6e32442dd9f196e65d13facb4b33.tar.bz2 puzzles-08365fb260ae6e32442dd9f196e65d13facb4b33.tar.xz | |
Windows: add a VERSIONINFO resource to the puzzle binaries.
This includes the textual version number in its existing
form (yyyymmdd followed by an abbreviated git hash). The four-part
binary version is set to 1 followed by year, month and day; if I ever
want to change that, I can increment the initial 1.
FileDescription is taken from the existing DESCRIPTION string provided
to each puzzle() statement in CMakeLists.txt.
This means that puzzles.rc now always defines at least one resource,
so we can remove the workaround for MinGW's windres not being able to
cope with an empty .rc file, which added a dummy resource in the
absence of an icon.
Diffstat (limited to 'puzzles.rc')
| -rw-r--r-- | puzzles.rc | 41 |
1 files changed, 34 insertions, 7 deletions
@@ -1,12 +1,39 @@ /* Windows resource file for all puzzles. */ +#include "version.h" +#include "gamedetails.h" + #if defined ICON_FILE 200 ICON ICON_FILE -#else -#ifdef MINGW32_FIX -/* XXX The MinGW toolchain (specifically, windres) doesn't like a resource - * file with no resources. Give it a dummy one. - * This can go if/when VERSIONINFO resources are added. */ -200 RCDATA { 0 } -#endif #endif + +1 VERSIONINFO +FILEVERSION VERSIONINFO_BINARY_VERSION /* version of this file */ +PRODUCTVERSION VERSIONINFO_BINARY_VERSION /* version of whole suite */ +FILEFLAGSMASK 0 +FILEFLAGS 0 +FILEOS 4 /* Win32 */ +FILETYPE 1 /* application */ +FILESUBTYPE 0 /* applications have no subtypes */ +BEGIN + BLOCK "StringFileInfo" + BEGIN + /* "lang-charset" LLLLCCCC = (UK English, Unicode) */ + BLOCK "080904B0" + BEGIN + VALUE "CompanyName", L"Simon Tatham" + VALUE "ProductName", L"Portable Puzzle Collection" + VALUE "FileDescription", VERSIONINFO_GAMEDESC + VALUE "InternalName", VERSIONINFO_GAMENAME + VALUE "OriginalFilename", VERSIONINFO_EXENAME + VALUE "FileVersion", VER + VALUE "ProductVersion", VER + VALUE "LegalCopyright", VERSIONINFO_COPYRIGHT + END + END + BLOCK "VarFileInfo" + BEGIN + /* Once again -- same meanings -- apparently necessary */ + VALUE "Translation", 0x809, 1200 + END +END |