[Github-comments] [geany/geany] RFC: Include Scintilla version in debug info (Discussion #3108)
Robert Di Pardo
notifications at xxxxx
Sat Jan 22 15:09:50 UTC 2022
> As for directly including the version files, I think something less ugly can be worked out
I was too harsh. The earlier suggestion was really no worse than the version parsing you'll find in Lexilla's [development scripts]:
```python
# Discover version information
version = (lexillaDir / "version.txt").read_text().strip()
versionDotted = version[0] + '.' + version[1] + '.' + version[2]
versionCommad = versionDotted.replace(".", ", ") + ', 0'
```
or [Scintilla's]:
```python
class ScintillaData:
def __init__(self, scintillaRoot):
# Discover version information
self.version = (scintillaRoot / "version.txt").read_text().strip()
self.versionDotted = self.version[0] + '.' + self.version[1] + '.' + \
self.version[2]
self.versionCommad = self.versionDotted.replace(".", ", ") + ', 0'
```
But then, how does SciTE manage all those version numbers in the About dialog?
![scite_516_show_versions](https://user-images.githubusercontent.com/59004801/150643789-97dd70d0-e816-4384-b3cc-928fef0af7a8.png)
[Ah!]
```cpp
#ifndef SCITE_H
#define SCITE_H
// Version numbers and dates
#define VERSION_SCITE "5.1.6"
#define VERSION_WORDS 5, 1, 6, 0
#define COPYRIGHT_DATES "December 1998-December 2021"
#define COPYRIGHT_YEARS "1998-2021"
#define VERSION_SCINTILLA "5.1.5"
#define VERSION_LEXILLA "5.1.4"
```
[development scripts]: https://github.com/ScintillaOrg/lexilla/blob/a35a59845e793d9d37d249cf097e71fecc5f4bcd/scripts/LexillaGen.py#L106-L109
[Scintilla's]: https://sourceforge.net/p/scintilla/code/ci/da6ead58cc1bdb16a4ee063497c3d25e10b5e586/tree/scripts/ScintillaData.py
[Ah!]: https://sourceforge.net/p/scintilla/scite/ci/93067c476e2c34e8620ad73cdfe842cfcc49cafe/tree/src/SciTE.h
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/discussions/3108#discussioncomment-2023230
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/repo-discussions/3108/comments/2023230 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20220122/ac8d55c0/attachment.htm>
More information about the Github-comments
mailing list