diff options
| author | Rémi Verschelde | 2018-02-23 19:48:49 +0100 |
|---|---|---|
| committer | Hein-Pieter van Braam | 2018-02-24 01:34:34 +0100 |
| commit | d79a7a27735fde30a843bbd931a663ffaa5884c9 (patch) | |
| tree | 23cf2551b422ba9e4508ae38f900030841748fd3 /editor/project_manager.cpp | |
| parent | 05fec82f313b31d3a5cbdcd8a25afcddfbef424a (diff) | |
| download | godot-d79a7a27735fde30a843bbd931a663ffaa5884c9.tar.gz godot-d79a7a27735fde30a843bbd931a663ffaa5884c9.tar.zst godot-d79a7a27735fde30a843bbd931a663ffaa5884c9.zip | |
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.
(cherry picked from commit 23ebae01dc7e3df9c842ca7d017f7b233837721d)
Diffstat (limited to 'editor/project_manager.cpp')
| -rw-r--r-- | editor/project_manager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 9c3b09608..cfdfb0a34 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -1541,7 +1541,7 @@ ProjectManager::ProjectManager() { String hash = String(VERSION_HASH); if (hash.length() != 0) hash = "." + hash.left(7); - l->set_text("v" VERSION_MKSTRING "" + hash); + l->set_text("v" VERSION_FULL_BUILD "" + hash); l->set_align(Label::ALIGN_CENTER); top_hb->add_child(l); |
