Refactor version macros and fix related bugs
The previous logic with VERSION_MKSTRING was a bit unwieldy, so there were several places hardcoding their own variant of the version string, potentially with bugs (e.g. forgetting the patch number when defined). The new logic defines: - VERSION_BRANCH, the main 'major.minor' version (e.g. 3.1) - VERSION_NUMBER, which can be 'major.minor' or 'major.minor.patch', depending on whether the latter is defined (e.g. 3.1.4) - VERSION_FULL_CONFIG, which contains the version status (e.g. stable) and the module-specific suffix (e.g. mono) - VERSION_FULL_BUILD, same as above but with build/reference name (e.g. official, custom_build, mageia, etc.) Note: Slight change here, as the previous format had the build name *before* the module-specific suffix; now it's after - VERSION_FULL_NAME, same as before, so VERSION_FULL_BUILD prefixed with "Godot v" for readability Bugs fixed thanks to that: - Export templates version matching now properly takes VERSION_PATCH into account by relying on VERSION_FULL_CONFIG. - ClassDB hash no longer takes the build name into account, but limits itself to VERSION_FULL_CONFIG (build name is cosmetic, not relevant for the API hash). - Docs XML no longer hardcode the VERSION_STATUS, this was annoying. - Small cleanup in Windows .rc file thanks to new macros.
This commit is contained in:
parent
b6bf572e02
commit
23ebae01dc
13 changed files with 43 additions and 23 deletions
|
|
@ -3,11 +3,9 @@
|
|||
#define _STR(m_x) #m_x
|
||||
#define _MKSTR(m_x) _STR(m_x)
|
||||
#endif
|
||||
|
||||
#ifndef VERSION_PATCH
|
||||
#define VERSION_PATCH 0
|
||||
#define PATCH_STRING
|
||||
#else
|
||||
#define PATCH_STRING "." _MKSTR(VERSION_PATCH)
|
||||
#endif
|
||||
|
||||
GODOT_ICON ICON platform/windows/godot.ico
|
||||
|
|
@ -24,12 +22,12 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "Godot Engine"
|
||||
VALUE "FileDescription", VERSION_NAME " Editor"
|
||||
VALUE "FileVersion", _MKSTR(VERSION_MAJOR) "." _MKSTR(VERSION_MINOR) "." _MKSTR(VERSION_PATCH)
|
||||
VALUE "FileVersion", VERSION_NUMBER
|
||||
VALUE "ProductName", VERSION_NAME
|
||||
VALUE "Licence", "MIT"
|
||||
VALUE "LegalCopyright", "Copyright (c) 2007-" _MKSTR(VERSION_YEAR) " Juan Linietsky, Ariel Manzur"
|
||||
VALUE "LegalCopyright", "Copyright (c) 2007-" _MKSTR(VERSION_YEAR) " Juan Linietsky, Ariel Manzur and contributors"
|
||||
VALUE "Info", "https://godotengine.org"
|
||||
VALUE "ProductVersion", _MKSTR(VERSION_MAJOR) "." _MKSTR(VERSION_MINOR) PATCH_STRING "." VERSION_BUILD
|
||||
VALUE "ProductVersion", VERSION_FULL_BUILD
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue