You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Rename version defines to GODOT_VERSION_* to match GDExtension godot-cpp
This commit is contained in:
@@ -47,37 +47,60 @@
|
||||
// Defines the main "branch" version. Patch versions in this branch should be
|
||||
// forward-compatible.
|
||||
// Example: "3.1"
|
||||
#define VERSION_BRANCH _MKSTR(VERSION_MAJOR) "." _MKSTR(VERSION_MINOR)
|
||||
#if VERSION_PATCH
|
||||
#define GODOT_VERSION_BRANCH _MKSTR(GODOT_VERSION_MAJOR) "." _MKSTR(GODOT_VERSION_MINOR)
|
||||
#if GODOT_VERSION_PATCH
|
||||
// Example: "3.1.4"
|
||||
#define VERSION_NUMBER VERSION_BRANCH "." _MKSTR(VERSION_PATCH)
|
||||
#define GODOT_VERSION_NUMBER GODOT_VERSION_BRANCH "." _MKSTR(GODOT_VERSION_PATCH)
|
||||
#else // patch is 0, we don't include it in the "pretty" version number.
|
||||
// Example: "3.1" instead of "3.1.0"
|
||||
#define VERSION_NUMBER VERSION_BRANCH
|
||||
#endif // VERSION_PATCH
|
||||
#define GODOT_VERSION_NUMBER GODOT_VERSION_BRANCH
|
||||
#endif // GODOT_VERSION_PATCH
|
||||
|
||||
// Version number encoded as hexadecimal int with one byte for each number,
|
||||
// for easy comparison from code.
|
||||
// Example: 3.1.4 will be 0x030104, making comparison easy from script.
|
||||
#define VERSION_HEX 0x10000 * VERSION_MAJOR + 0x100 * VERSION_MINOR + VERSION_PATCH
|
||||
#define GODOT_VERSION_HEX 0x10000 * GODOT_VERSION_MAJOR + 0x100 * GODOT_VERSION_MINOR + GODOT_VERSION_PATCH
|
||||
|
||||
// Describes the full configuration of that Godot version, including the version number,
|
||||
// the status (beta, stable, etc.) and potential module-specific features (e.g. mono).
|
||||
// Example: "3.1.4.stable.mono"
|
||||
#define VERSION_FULL_CONFIG VERSION_NUMBER "." VERSION_STATUS VERSION_MODULE_CONFIG
|
||||
#define GODOT_VERSION_FULL_CONFIG GODOT_VERSION_NUMBER "." GODOT_VERSION_STATUS GODOT_VERSION_MODULE_CONFIG
|
||||
|
||||
// Similar to VERSION_FULL_CONFIG, but also includes the (potentially custom) VERSION_BUILD
|
||||
// Similar to GODOT_VERSION_FULL_CONFIG, but also includes the (potentially custom) GODOT_VERSION_BUILD
|
||||
// description (e.g. official, custom_build, etc.).
|
||||
// Example: "3.1.4.stable.mono.official"
|
||||
#define VERSION_FULL_BUILD VERSION_FULL_CONFIG "." VERSION_BUILD
|
||||
#define GODOT_VERSION_FULL_BUILD GODOT_VERSION_FULL_CONFIG "." GODOT_VERSION_BUILD
|
||||
|
||||
// Same as above, but prepended with Godot's name and a cosmetic "v" for "version".
|
||||
// Example: "Godot v3.1.4.stable.official.mono"
|
||||
#define VERSION_FULL_NAME VERSION_NAME " v" VERSION_FULL_BUILD
|
||||
#define GODOT_VERSION_FULL_NAME GODOT_VERSION_NAME " v" GODOT_VERSION_FULL_BUILD
|
||||
|
||||
// Git commit hash, generated at build time in `core/version_hash.gen.cpp`.
|
||||
extern const char *const VERSION_HASH;
|
||||
extern const char *const GODOT_VERSION_HASH;
|
||||
|
||||
// Git commit date UNIX timestamp (in seconds), generated at build time in `core/version_hash.gen.cpp`.
|
||||
// Set to 0 if unknown.
|
||||
extern const uint64_t VERSION_TIMESTAMP;
|
||||
extern const uint64_t GODOT_VERSION_TIMESTAMP;
|
||||
|
||||
#ifndef DISABLE_DEPRECATED
|
||||
// Compatibility with pre-4.5 modules.
|
||||
#define VERSION_SHORT_NAME GODOT_VERSION_SHORT_NAME
|
||||
#define VERSION_NAME GODOT_VERSION_NAME
|
||||
#define VERSION_MAJOR GODOT_VERSION_MAJOR
|
||||
#define VERSION_MINOR GODOT_VERSION_MINOR
|
||||
#define VERSION_PATCH GODOT_VERSION_PATCH
|
||||
#define VERSION_STATUS GODOT_VERSION_STATUS
|
||||
#define VERSION_BUILD GODOT_VERSION_BUILD
|
||||
#define VERSION_MODULE_CONFIG GODOT_VERSION_MODULE_CONFIG
|
||||
#define VERSION_WEBSITE GODOT_VERSION_WEBSITE
|
||||
#define VERSION_DOCS_BRANCH GODOT_VERSION_DOCS_BRANCH
|
||||
#define VERSION_DOCS_URL GODOT_VERSION_DOCS_URL
|
||||
#define VERSION_BRANCH GODOT_VERSION_BRANCH
|
||||
#define VERSION_NUMBER GODOT_VERSION_NUMBER
|
||||
#define VERSION_HEX GODOT_VERSION_HEX
|
||||
#define VERSION_FULL_CONFIG GODOT_VERSION_FULL_CONFIG
|
||||
#define VERSION_FULL_BUILD GODOT_VERSION_FULL_BUILD
|
||||
#define VERSION_FULL_NAME GODOT_VERSION_FULL_NAME
|
||||
#define VERSION_HASH GODOT_VERSION_HASH
|
||||
#define VERSION_TIMESTAMP GODOT_VERSION_TIMESTAMP
|
||||
#endif // DISABLE_DEPRECATED
|
||||
|
||||
Reference in New Issue
Block a user