From b8708cb73c63fe136af7eb94715982ede219fbf0 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Sun, 18 Dec 2022 19:27:53 -0500 Subject: [PATCH] Add APP_OS_NAME and APP_CPU_NAME. Display OS and CPU in Help menu. --- include/common.hpp | 2 ++ src/app/MenuBar.cpp | 2 ++ src/common.cpp | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/include/common.hpp b/include/common.hpp index de6d2be2..0c0d4698 100644 --- a/include/common.hpp +++ b/include/common.hpp @@ -259,7 +259,9 @@ extern const std::string APP_EDITION_NAME; extern const std::string APP_VERSION_MAJOR; extern const std::string APP_VERSION; extern const std::string APP_OS; +extern const std::string APP_OS_NAME; extern const std::string APP_CPU; +extern const std::string APP_CPU_NAME; extern const std::string API_URL; diff --git a/src/app/MenuBar.cpp b/src/app/MenuBar.cpp index 122c92e6..84e2b44f 100644 --- a/src/app/MenuBar.cpp +++ b/src/app/MenuBar.cpp @@ -844,6 +844,8 @@ struct HelpButton : MenuButton { menu->addChild(createMenuLabel(APP_NAME + " " + APP_EDITION_NAME + " " + APP_VERSION)); + menu->addChild(createMenuLabel(APP_OS_NAME + " " + APP_CPU_NAME)); + menu->addChild(createMenuItem("Open user folder", "", [=]() { system::openDirectory(asset::user("")); })); diff --git a/src/common.cpp b/src/common.cpp index 538637de..4f2869c0 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -22,15 +22,20 @@ const std::string APP_VERSION_MAJOR = "2"; const std::string APP_VERSION = TOSTRING(_APP_VERSION); #if defined ARCH_WIN const std::string APP_OS = "win"; + const std::string APP_OS_NAME = "Windows"; #elif defined ARCH_MAC const std::string APP_OS = "mac"; + const std::string APP_OS_NAME = "macOS"; #elif defined ARCH_LIN const std::string APP_OS = "lin"; + const std::string APP_OS_NAME = "Linux"; #endif #if defined ARCH_X64 const std::string APP_CPU = "x64"; + const std::string APP_CPU_NAME = "x64"; #elif defined ARCH_ARM64 const std::string APP_CPU = "arm64"; + const std::string APP_CPU_NAME = "ARM64"; #endif const std::string API_URL = "https://api.vcvrack.com";