void CtActions::dialog_about() shows dialog with the version 1.01 line.
void CtActions::check_for_newer_version() shows "Info" dialog with message "A Newer Version Is Available! (1.0.4)"
Both methods get the version from PACKAGE_VERSION in config.h.
I do find it strange that the filenames have the correct version, but not the binary, because this appears to be extracted from config.h by build.sh, for some packaging targets, e.g.
CMakeLists.txt, line 124, calls configure_file() to create config.h from config.h.cmake, with input variables PROJECT_NAME and CT_VERSION, resolving all ${NAME} expressions to literal text.
Maybe config.h is stale because configure_file sees that config.h.cmake has not changed there, so config.h must always be deleting and the above line called before every binary build. Alternatively, if separate, the build and packaging environments may be out-of-sync, which may explain the version discrepancies.
Version, Operative system 1.0.4, Linux Mint 21.3 MATE 64-bit; I've tried Ubuntu ppa deb, AppImage and FlatPak installations.
Describe the bug
Help
->About
->Version
-- shows a dialog with a mismatching 1.0.1 version line.Help
->Check Newer Version
-- shows a dialog with "A Newer Version is Available! (1.0.4)".This was confusing and annoying because it caused uncertainty that this really is version 1.0.4, and suggests inadequate pre-release checks.
To Reproduce
Help
->About
->Version
, to see confusing 1.0.1 line.Help
->Check Newer Version
, to see confusing 1.0.4 message.Screenshots
Investigation
https://github.com/giuspen/cherrytree/blob/master/src/ct/ct_actions_help.cc
void CtActions::dialog_about()
shows dialog with the version 1.01 line.void CtActions::check_for_newer_version()
shows "Info" dialog with message "A Newer Version Is Available! (1.0.4)"I do find it strange that the filenames have the correct version, but not the binary, because this appears to be extracted from
config.h
bybuild.sh
, for some packaging targets, e.g.CMakeLists.txt
, line 124, calls configure_file() to createconfig.h
fromconfig.h.cmake
, with input variablesPROJECT_NAME
andCT_VERSION
, resolving all ${NAME} expressions to literal text.Maybe config.h is stale because configure_file sees that
config.h.cmake
has not changed there, soconfig.h
must always be deleting and the above line called before every binary build. Alternatively, if separate, the build and packaging environments may be out-of-sync, which may explain the version discrepancies.