Closed geoffmcl closed 6 years ago
All changes now pushed to branch set-vers
...
Now each control in the About dialog has an ID, so the handle for each can be obtained, and the control text updated to show both the Tidy2.dll
version/date, exposed through cmake
from the version.txt
file in the source, and the library tidy version in use by using its APIs, tidyReleaseDate()
, and tidyLibraryVersion()
...
The libtidy versions presented a small wrinkle, in that this data is returned as ASCII/UTF-8, while the About dialog is in MS Unicode, UTF-16, but this was handled by using the WIN32 API MultiByteToWideChar
to convert the strings appropriately...
I have added this dialog text setting code into void AboutDialog::doDialog()
, but now see maybe it could have been put in the CALLBACK AboutDialog::run_dlgProc
, in the case WM_INITDIALOG:
, where I think normally such setup code would reside... but that can wait until next time...
Have now tested this in my fork of notepad-plus-plus
github repo, built with MSVC14.x64, an install of release 7.5.3 64-bits notepad++, and my 32-bit install of older v5.9, my day-to-day working notepad++
- note to self - TODO: must get around to updating this, but so far in my usage have found no problems, but...
So this version 2.0.2
of Tidy2.dll
, presently only in the set-vers
branch, looks to be a good release candidate... will work on that as time permits...
One way would be to use cmake
configure_file
to copy a file, or files, substituting version values generated in cmake, from say aversion.txt
file...The problem is the
Tidy2/VersionAndAbout.rc
, and its associatedresource.h
are encoded in MS Unicode (UTF-16), and it seemscmake
does not support this character encoding. And searching around it seems it never will, despite its extensive use by MS Windows...Additionally, since these files are in
UTF-16
, with aBOM
, github treats the files as binary, thus to update the version strings manually each time would cause full file re-writes in the repository... also a no-no!But that does not stop the
Tidy2.dll
generating and setting these dialog text strings, during the creation of the dialog...Have created a
set_vers
branch to explore this forTidy2.dll
, and forked notepad-plus-plus, myhnppf.bat
, and built with MSVC 14.x64, in anext1
branch, to be able to use MSVC to Debug thePlugins
load and setup... and installed npp 64-bit release 7.5.3, myhnpp-7.5.3.bat
, to test the newTidy2.dll
... quite a learning curve...Seems to be working. Still to push these changes...