Change how the project version is defined.

This commit is contained in:
Guillaume Jacquemin 2023-10-29 10:40:02 +01:00
parent bb85c3d6b0
commit e634ef037d
Signed by: williamjcm
SSH Key Fingerprint: SHA256:AYLOg+iTV0ElElnlu4vqM4edFazVdRiuQB0Y5LoKc4A
4 changed files with 10 additions and 6 deletions

View File

@ -109,9 +109,13 @@ if(CMAKE_BUILD_TYPE STREQUAL Debug)
target_compile_definitions(MassBuilderSaveTool PRIVATE SAVETOOL_DEBUG_BUILD)
endif()
target_compile_definitions(MassBuilderSaveTool PRIVATE
SAVETOOL_VERSION="${SAVETOOL_PROJECT_VERSION}"
SAVETOOL_VERSION_STRING="${SAVETOOL_PROJECT_VERSION}"
SAVETOOL_VERSION_MAJOR=1
SAVETOOL_VERSION_MINOR=5
SAVETOOL_VERSION_PATCH=0
SAVETOOL_VERSION_PRERELEASE=true
SAVETOOL_CODENAME="Friendly Valkyrie"
SUPPORTED_GAME_VERSION="0.9.x"
SAVETOOL_SUPPORTED_GAME_VERSION="0.10.x"
)
if(CMAKE_BUILD_TYPE STREQUAL Release)

View File

@ -48,7 +48,7 @@ Utility::Tweakable tweak;
SaveTool::SaveTool(const Arguments& arguments):
Platform::Sdl2Application{arguments,
Configuration{}.setTitle("M.A.S.S. Builder Save Tool " SAVETOOL_VERSION " (\"" SAVETOOL_CODENAME "\")")
Configuration{}.setTitle("M.A.S.S. Builder Save Tool " SAVETOOL_VERSION_STRING " (\"" SAVETOOL_CODENAME "\")")
.setSize({960, 720})}
{
#ifdef SAVETOOL_DEBUG_BUILD
@ -339,7 +339,7 @@ SaveTool::drawDisclaimer() {
ImGui::Bullet();
ImGui::SameLine();
ImGui::TextUnformatted("This version of the application was tested on M.A.S.S. Builder early access version " SUPPORTED_GAME_VERSION ". It may or may not work with other versions of the game.");
ImGui::TextUnformatted("This version of the application was tested on M.A.S.S. Builder early access version " SAVETOOL_SUPPORTED_GAME_VERSION ". It may or may not work with other versions of the game.");
if(conf().isRunningInWine()) {
ImGui::Bullet();

View File

@ -387,7 +387,7 @@ SaveTool::drawUnavailableMaterialRow(Containers::StringView name, std::int32_t t
ImGui::TableSetColumnIndex(1);
ImGui::TextUnformatted(name.begin(), name.end());
ImGui::TableSetColumnIndex(2);
ImGui::TextDisabled("Unavailable as of game version " SUPPORTED_GAME_VERSION);
ImGui::TextDisabled("Unavailable as of game version " SAVETOOL_SUPPORTED_GAME_VERSION);
}
void

View File

@ -39,7 +39,7 @@ int main(int argc, char** argv) {
logger().initialise();
LOG_INFO("Initialising M.A.S.S. Builder Save Tool version " SAVETOOL_VERSION ".");
LOG_INFO("Initialising M.A.S.S. Builder Save Tool version " SAVETOOL_VERSION_STRING ".");
auto str = setlocale(LC_ALL, ".utf-8");
if(str) {