106 lines
5.7 KiB
C++
106 lines
5.7 KiB
C++
/**************************************************************************/
|
|
/* version.h */
|
|
/**************************************************************************/
|
|
/* This file is part of: */
|
|
/* AETHEX ENGINE */
|
|
/* https://github.com/AeThex-LABS */
|
|
/**************************************************************************/
|
|
/* Copyright (c) 2024-present AeThex Engine contributors. */
|
|
/* Based on AETHEX ENGINE (c) 2014-present AETHEX ENGINE contributors. */
|
|
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
|
|
/* */
|
|
/* Permission is hereby granted, free of charge, to any person obtaining */
|
|
/* a copy of this software and associated documentation files (the */
|
|
/* "Software"), to deal in the Software without restriction, including */
|
|
/* without limitation the rights to use, copy, modify, merge, publish, */
|
|
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
|
/* permit persons to whom the Software is furnished to do so, subject to */
|
|
/* the following conditions: */
|
|
/* */
|
|
/* The above copyright notice and this permission notice shall be */
|
|
/* included in all copies or substantial portions of the Software. */
|
|
/* */
|
|
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
|
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
|
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
|
|
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
|
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
|
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
|
/**************************************************************************/
|
|
|
|
#pragma once
|
|
|
|
#include "core/version_generated.gen.h" // IWYU pragma: export
|
|
|
|
#include <stdint.h> // NOLINT(modernize-deprecated-headers) FIXME: MinGW compilation fails when changing to C++ Header.
|
|
|
|
// Copied from typedefs.h to stay lean.
|
|
#ifndef _STR
|
|
#define _STR(m_x) #m_x
|
|
#define _MKSTR(m_x) _STR(m_x)
|
|
#endif
|
|
|
|
// AeThex versions are of the form <major>.<minor> for the initial release,
|
|
// and then <major>.<minor>.<patch> for subsequent bugfix releases where <patch> != 0
|
|
|
|
// Defines the main "branch" version. Patch versions in this branch should be
|
|
// forward-compatible.
|
|
// Example: "4.7"
|
|
#define AETHEX_VERSION_BRANCH _MKSTR(AETHEX_VERSION_MAJOR) "." _MKSTR(AETHEX_VERSION_MINOR)
|
|
#if AETHEX_VERSION_PATCH
|
|
// Example: "4.7.1"
|
|
#define AETHEX_VERSION_NUMBER AETHEX_VERSION_BRANCH "." _MKSTR(AETHEX_VERSION_PATCH)
|
|
#else // patch is 0, we don't include it in the "pretty" version number.
|
|
// Example: "4.7" instead of "4.7.0"
|
|
#define AETHEX_VERSION_NUMBER AETHEX_VERSION_BRANCH
|
|
#endif // AETHEX_VERSION_PATCH
|
|
|
|
// Version number encoded as hexadecimal int with one byte for each number,
|
|
// for easy comparison from code.
|
|
// Example: 4.7.0 will be 0x040700, making comparison easy from script.
|
|
#define AETHEX_VERSION_HEX 0x10000 * AETHEX_VERSION_MAJOR + 0x100 * AETHEX_VERSION_MINOR + AETHEX_VERSION_PATCH
|
|
|
|
// Describes the full configuration of this AeThex version, including the version number,
|
|
// the status (beta, stable, dev, etc.), potential module-specific features
|
|
// and double-precision status.
|
|
// Example: "4.7.0.dev.double"
|
|
#ifdef REAL_T_IS_DOUBLE
|
|
#define AETHEX_VERSION_FULL_CONFIG AETHEX_VERSION_NUMBER "." AETHEX_VERSION_STATUS AETHEX_VERSION_MODULE_CONFIG ".double"
|
|
#else
|
|
#define AETHEX_VERSION_FULL_CONFIG AETHEX_VERSION_NUMBER "." AETHEX_VERSION_STATUS AETHEX_VERSION_MODULE_CONFIG
|
|
#endif
|
|
|
|
// Similar to AETHEX_VERSION_FULL_CONFIG, but also includes the (potentially custom) AETHEX_VERSION_BUILD
|
|
// description (e.g. official, custom_build, etc.).
|
|
// Example: "4.7.0.dev.custom_build"
|
|
#define AETHEX_VERSION_FULL_BUILD AETHEX_VERSION_FULL_CONFIG "." AETHEX_VERSION_BUILD
|
|
|
|
// Same as above, but prepended with AeThex's name and a cosmetic "v" for "version".
|
|
// Example: "AeThex Engine v4.7.0.dev.custom_build"
|
|
#define AETHEX_VERSION_FULL_NAME AETHEX_VERSION_NAME " v" AETHEX_VERSION_FULL_BUILD
|
|
|
|
// Git commit hash, generated at build time in `core/version_hash.gen.cpp`.
|
|
extern const char *const AETHEX_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 AETHEX_VERSION_TIMESTAMP;
|
|
|
|
// Backward compatibility for third-party code using Godot version macros
|
|
#define GODOT_VERSION_MAJOR AETHEX_VERSION_MAJOR
|
|
#define GODOT_VERSION_MINOR AETHEX_VERSION_MINOR
|
|
#define GODOT_VERSION_PATCH AETHEX_VERSION_PATCH
|
|
#define GODOT_VERSION_STATUS AETHEX_VERSION_STATUS
|
|
#define GODOT_VERSION_BUILD AETHEX_VERSION_BUILD
|
|
#define GODOT_VERSION_FULL_CONFIG AETHEX_VERSION_FULL_CONFIG
|
|
#define GODOT_VERSION_FULL_BUILD AETHEX_VERSION_FULL_BUILD
|
|
#define GODOT_VERSION_NUMBER AETHEX_VERSION_NUMBER
|
|
#define GODOT_VERSION_BRANCH AETHEX_VERSION_BRANCH
|
|
#define GODOT_VERSION_SHORT_NAME AETHEX_VERSION_SHORT_NAME
|
|
#define GODOT_VERSION_NAME AETHEX_VERSION_NAME
|
|
#define GODOT_VERSION_WEBSITE AETHEX_VERSION_WEBSITE
|
|
#define GODOT_VERSION_DOCS_BRANCH AETHEX_VERSION_DOCS_BRANCH
|
|
#define GODOT_VERSION_DOCS_URL AETHEX_VERSION_DOCS_URL
|
|
#define GODOT_VERSION_MODULE_CONFIG AETHEX_VERSION_MODULE_CONFIG
|
|
#define GODOT_VERSION_HEX AETHEX_VERSION_HEX
|