simon-git: puzzles (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Sun Nov 19 15:16:44 GMT 2023
TL;DR:
595338f Windows: leave puzzles.rc out of auxiliary GUI tools.
08365fb Windows: add a VERSIONINFO resource to the puzzle binaries.
Repository: https://git.tartarus.org/simon/puzzles.git
On the web: https://git.tartarus.org/?p=simon/puzzles.git
Branch updated: main
Committer: Simon Tatham <anakin at pobox.com>
Date: 2023-11-19 15:16:44
commit 595338fa43d40f356f04b8704f72f060651669e8
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=595338fa43d40f356f04b8704f72f060651669e8;hp=cb8dcc34f7c656b8603a510617e35492a0d16b8c
Author: Simon Tatham <anakin at pobox.com>
Date: Sun Nov 19 15:03:40 2023 +0000
Windows: leave puzzles.rc out of auxiliary GUI tools.
There's no reason to put the .rc file into developer tools like
galaxieseditor at all. Its current job is to add an icon, and those
tools don't have any. I'm about to add version information, and they
won't have that either (in particular, no description string like the
games do).
The CLI developer tools already don't include puzzles.rc, and GUI dev
tools are more like those than they are like puzzles.
puzzles.rc was being added to an aux GUI tool's source file list by
get_platform_puzzle_extra_source_files(), which is called for aux GUI
tools as well as for puzzles proper. However, it's not as simple as
just eliminating that call, because on Unix, we _do_ need to add the
same extra source files to GUI dev tools that we do for puzzles,
because gtk.c contains external references to either an array of the
puzzle's icons or an empty array indicating that there aren't any, so
_something_ has to provide that.
So instead, get_platform_puzzle_extra_source_files now takes an extra
argument saying whether the program is a real puzzle or an aux tool;
windows.cmake leaves out puzzles.rc in the latter case, but unix.cmake
puts the icon array in unconditionally.
cmake/platforms/emscripten.cmake | 2 +-
cmake/platforms/nestedvm.cmake | 2 +-
cmake/platforms/osx.cmake | 2 +-
cmake/platforms/unix.cmake | 2 +-
cmake/platforms/windows.cmake | 6 ++++--
cmake/setup.cmake | 4 ++--
6 files changed, 10 insertions(+), 8 deletions(-)
commit 08365fb260ae6e32442dd9f196e65d13facb4b33
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=08365fb260ae6e32442dd9f196e65d13facb4b33;hp=595338fa43d40f356f04b8704f72f060651669e8
Author: Simon Tatham <anakin at pobox.com>
Date: Sun Nov 19 11:54:48 2023 +0000
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.
Buildscr | 1 +
cmake/platforms/windows.cmake | 38 ++++++++++++++++++++++++++++++++++++++
cmake/toolchain-mingw.cmake | 2 --
puzzles.rc | 41 ++++++++++++++++++++++++++++++++++-------
version.h | 2 ++
5 files changed, 75 insertions(+), 9 deletions(-)
More information about the tartarus-commits
mailing list