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:

    # Discover version information
    version = (lexillaDir / "version.txt").read_text().strip()
    versionDotted = version[0] + '.' + version[1] + '.' + version[2]
    versionCommad = versionDotted.replace(".", ", ") + ', 0'

or Scintilla's:

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

Ah!

#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"


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany/repo-discussions/3108/comments/2023230@github.com>