Browse Source

Add APP_OS_NAME and APP_CPU_NAME. Display OS and CPU in Help menu.

tags/v2.2.2
Andrew Belt 1 year ago
parent
commit
b8708cb73c
3 changed files with 9 additions and 0 deletions
  1. +2
    -0
      include/common.hpp
  2. +2
    -0
      src/app/MenuBar.cpp
  3. +5
    -0
      src/common.cpp

+ 2
- 0
include/common.hpp View File

@@ -259,7 +259,9 @@ extern const std::string APP_EDITION_NAME;
extern const std::string APP_VERSION_MAJOR; extern const std::string APP_VERSION_MAJOR;
extern const std::string APP_VERSION; extern const std::string APP_VERSION;
extern const std::string APP_OS; 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;
extern const std::string APP_CPU_NAME;
extern const std::string API_URL; extern const std::string API_URL;






+ 2
- 0
src/app/MenuBar.cpp View File

@@ -844,6 +844,8 @@ struct HelpButton : MenuButton {


menu->addChild(createMenuLabel(APP_NAME + " " + APP_EDITION_NAME + " " + APP_VERSION)); 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", "", [=]() { menu->addChild(createMenuItem("Open user folder", "", [=]() {
system::openDirectory(asset::user("")); system::openDirectory(asset::user(""));
})); }));


+ 5
- 0
src/common.cpp View File

@@ -22,15 +22,20 @@ const std::string APP_VERSION_MAJOR = "2";
const std::string APP_VERSION = TOSTRING(_APP_VERSION); const std::string APP_VERSION = TOSTRING(_APP_VERSION);
#if defined ARCH_WIN #if defined ARCH_WIN
const std::string APP_OS = "win"; const std::string APP_OS = "win";
const std::string APP_OS_NAME = "Windows";
#elif defined ARCH_MAC #elif defined ARCH_MAC
const std::string APP_OS = "mac"; const std::string APP_OS = "mac";
const std::string APP_OS_NAME = "macOS";
#elif defined ARCH_LIN #elif defined ARCH_LIN
const std::string APP_OS = "lin"; const std::string APP_OS = "lin";
const std::string APP_OS_NAME = "Linux";
#endif #endif
#if defined ARCH_X64 #if defined ARCH_X64
const std::string APP_CPU = "x64"; const std::string APP_CPU = "x64";
const std::string APP_CPU_NAME = "x64";
#elif defined ARCH_ARM64 #elif defined ARCH_ARM64
const std::string APP_CPU = "arm64"; const std::string APP_CPU = "arm64";
const std::string APP_CPU_NAME = "ARM64";
#endif #endif
const std::string API_URL = "https://api.vcvrack.com"; const std::string API_URL = "https://api.vcvrack.com";




Loading…
Cancel
Save