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) target_compile_definitions(MassBuilderSaveTool PRIVATE SAVETOOL_DEBUG_BUILD)
endif() endif()
target_compile_definitions(MassBuilderSaveTool PRIVATE 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" SAVETOOL_CODENAME="Friendly Valkyrie"
SUPPORTED_GAME_VERSION="0.9.x" SAVETOOL_SUPPORTED_GAME_VERSION="0.10.x"
) )
if(CMAKE_BUILD_TYPE STREQUAL Release) if(CMAKE_BUILD_TYPE STREQUAL Release)

View file

@ -48,7 +48,7 @@ Utility::Tweakable tweak;
SaveTool::SaveTool(const Arguments& arguments): SaveTool::SaveTool(const Arguments& arguments):
Platform::Sdl2Application{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})} .setSize({960, 720})}
{ {
#ifdef SAVETOOL_DEBUG_BUILD #ifdef SAVETOOL_DEBUG_BUILD
@ -339,7 +339,7 @@ SaveTool::drawDisclaimer() {
ImGui::Bullet(); ImGui::Bullet();
ImGui::SameLine(); 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()) { if(conf().isRunningInWine()) {
ImGui::Bullet(); ImGui::Bullet();

View file

@ -387,7 +387,7 @@ SaveTool::drawUnavailableMaterialRow(Containers::StringView name, std::int32_t t
ImGui::TableSetColumnIndex(1); ImGui::TableSetColumnIndex(1);
ImGui::TextUnformatted(name.begin(), name.end()); ImGui::TextUnformatted(name.begin(), name.end());
ImGui::TableSetColumnIndex(2); 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 void

View file

@ -39,7 +39,7 @@ int main(int argc, char** argv) {
logger().initialise(); 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"); auto str = setlocale(LC_ALL, ".utf-8");
if(str) { if(str) {