add version follows versioning similar to SDL
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android-23]) (push) Has been cancelled
ContinuousDelivery / windows (push) Has been cancelled
ContinuousDelivery / windows-asan (push) Has been cancelled
ContinuousDelivery / dumpsyms (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
ContinuousIntegration / linux (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android-23]) (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled

odd patch is dev version
This commit is contained in:
Green Sky
2025-04-09 23:18:18 +02:00
parent c1bfed50b6
commit 241c6c2f8e
6 changed files with 24 additions and 5 deletions

View File

@ -169,6 +169,9 @@ if (TOMATO_TOX_AV)
target_compile_definitions(tomato PUBLIC TOMATO_TOX_AV)
endif()
configure_file(./version.hpp.in version.hpp @ONLY)
target_include_directories(tomato PRIVATE "${CMAKE_CURRENT_BINARY_DIR}")
target_compile_features(tomato PUBLIC cxx_std_17)
target_link_libraries(tomato PUBLIC
solanaceae_util

View File

@ -6,6 +6,8 @@
#include <imgui/backends/imgui_impl_sdlrenderer3.h>
#include <implot.h>
#include "version.hpp"
#include "./theme.hpp"
#include "./chat_gui/theme.hpp"
@ -27,6 +29,8 @@
int main(int argc, char** argv) {
runSysCheck();
std::cout << "tomato " TOMATO_VERSION_STR "\n";
#ifdef TOMATO_BREAKPAD
// TODO: maybe run before sys check?
BREAKPAD_MAIN_INIT;
@ -40,7 +44,7 @@ int main(int argc, char** argv) {
}
SDL_SetAppMetadata("tomato", "0.0.4-wip", nullptr);
SDL_SetAppMetadata("tomato", TOMATO_VERSION_STR, nullptr);
#ifdef __ANDROID__
// change current working dir to internal storage

8
src/version.hpp.in Normal file
View File

@ -0,0 +1,8 @@
#pragma once
#define TOMATO_VERSION_MAJOR @tomato_VERSION_MAJOR@
#define TOMATO_VERSION_MINOR @tomato_VERSION_MINOR@
#define TOMATO_VERSION_PATCH @tomato_VERSION_PATCH@
#define TOMATO_VERSION_STR "@tomato_VERSION_MAJOR@.@tomato_VERSION_MINOR@.@tomato_VERSION_PATCH@"