From 055d64b12543809610a23952fbba2d05dca9b986 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sun, 31 Dec 2023 23:18:17 -0600 Subject: [PATCH] [olympic] Add support for an AppLib app specific version --- src/olympic/applib/applib.cpp | 6 ++++++ src/olympic/studio/applib/src/aboutpopup.cpp | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/olympic/applib/applib.cpp b/src/olympic/applib/applib.cpp index 25b1cdfa..db8e3222 100644 --- a/src/olympic/applib/applib.cpp +++ b/src/olympic/applib/applib.cpp @@ -13,6 +13,10 @@ #define OLYMPIC_APP_NAME "App" #endif +#ifndef OLYMPIC_APP_VERSION +#define OLYMPIC_APP_VERSION "dev build" +#endif + #ifndef OLYMPIC_PROJECT_NAMESPACE #define OLYMPIC_PROJECT_NAMESPACE project #endif @@ -31,6 +35,8 @@ namespace olympic { +ox::String s_version = ox::String(OLYMPIC_APP_VERSION); + ox::Error run( ox::StringView project, ox::StringView appName, diff --git a/src/olympic/studio/applib/src/aboutpopup.cpp b/src/olympic/studio/applib/src/aboutpopup.cpp index d60f71a7..2f718784 100644 --- a/src/olympic/studio/applib/src/aboutpopup.cpp +++ b/src/olympic/studio/applib/src/aboutpopup.cpp @@ -7,10 +7,14 @@ #include #include "aboutpopup.hpp" +namespace olympic { +extern ox::String s_version; +} + namespace studio { AboutPopup::AboutPopup(turbine::Context &ctx) noexcept { - m_text = ox::sfmt("{} - dev build", keelCtx(ctx).appName); + m_text = ox::sfmt("{} - {}", keelCtx(ctx).appName, olympic::s_version); } void AboutPopup::open() noexcept {