Minor - Adds build versioning to the engine - V14.1.0

Implements a build versioning system to track and display the engine's build information.

- Adds a version header file defining version constants.
- Increments the build number automatically from a configuration file on each build in the binary folder.
- Displays the build version in the ImGui menu bar for easy identification.
- Persists version information by reading/writing to the config file

This provides better tracking and identification of specific engine builds.
This commit is contained in:
2025-09-18 01:58:18 +02:00
parent 2346625afb
commit 29db39910c
8 changed files with 178 additions and 15 deletions

View File

@@ -0,0 +1,24 @@
#pragma once
#include "imgui.h"
#define BUILD_VERSION_MAJOR 14
#define BUILD_VERSION_MINOR 0
#define BUILD_VERSION_PATCH 3
// BUILD_VERSION_VER est un int persist<73> dans un fichier, <20> charger au lancement et incr<63>menter <20> chaque build (voir point 3)
extern int BUILD_VERSION_VER;
#ifdef _DEBUG
#define BUILD_VERSION_TYPE "Debug"
#define BUILD_VERSION_INVERSE "Release"
// define a color for debug mode (dark yellow)
#define DEBUG_MODE_COLOR IM_COL32(204, 153, 0, 255)
#else
#define BUILD_VERSION_TYPE "Release"
#define BUILD_VERSION_INVERSE "Debug"
// define a color for release mode (rouge bordeau)
#define DEBUG_MODE_COLOR IM_COL32(128, 0, 32, 255)
#endif
// BUILD_VERSION_STATE est d<>fini manuellement (ex "Dev" ou "Stable")
#define BUILD_VERSION_STATE "Dev"
//#define BUILD_VERSION_STATE "Stable"