Browse Source

Rename APP_EDITION to APP_EDITION_NAME. Add APP_EDITION with abbreviated edition.

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
d00e79c7fb
7 changed files with 14 additions and 8 deletions
  1. +1
    -0
      .gitignore
  2. +2
    -1
      include/common.hpp
  3. +1
    -1
      src/Window.cpp
  4. +1
    -1
      src/app/MenuBar.cpp
  5. +1
    -1
      src/app/TipWindow.cpp
  6. +3
    -3
      src/common.cpp
  7. +5
    -1
      src/library.cpp

+ 1
- 0
.gitignore View File

@@ -12,6 +12,7 @@
/Rack
/dep
/plugins
/disabledplugins
/build
/dist
/patches


+ 2
- 1
include/common.hpp View File

@@ -261,8 +261,9 @@ typename C::mapped_type get(const C& m, const typename C::key_type& key, const t

extern const std::string APP_NAME;
extern const std::string APP_EDITION;
extern const std::string APP_VERSION;
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_ARCH;
extern const std::string API_URL;



+ 1
- 1
src/Window.cpp View File

@@ -423,7 +423,7 @@ void Window::step() {
gamepad::step();

// Set window title
std::string windowTitle = APP_NAME + " " + APP_EDITION + " " + APP_VERSION;
std::string windowTitle = APP_NAME + " " + APP_EDITION_NAME + " " + APP_VERSION;
if (APP->patch->path != "") {
windowTitle += " - ";
if (!APP->history->isSaved())


+ 1
- 1
src/app/MenuBar.cpp View File

@@ -780,7 +780,7 @@ struct HelpButton : MenuButton {

menu->addChild(new ui::MenuSeparator);

menu->addChild(createMenuLabel(APP_EDITION));
menu->addChild(createMenuLabel(APP_EDITION_NAME));

menu->addChild(createMenuLabel(APP_VERSION));
}


+ 1
- 1
src/app/TipWindow.cpp View File

@@ -73,7 +73,7 @@ struct TipWindow : widget::OpaqueWidget {
// header->box.size.x = box.size.x - 2*margin;
header->box.size.y = 20;
header->fontSize = 20;
header->text = "Welcome to " + APP_NAME + " " + APP_EDITION + " " + APP_VERSION;
header->text = "Welcome to " + APP_NAME + " " + APP_EDITION_NAME + " " + APP_VERSION;
layout->addChild(header);

label = new ui::Label;


+ 3
- 3
src/common.cpp View File

@@ -16,9 +16,10 @@ namespace rack {


const std::string APP_NAME = "VCV Rack";
const std::string APP_EDITION = "Community Edition";
const std::string APP_VERSION = TOSTRING(VERSION);
const std::string APP_EDITION = "CE";
const std::string APP_EDITION_NAME = "Community Edition";
const std::string APP_VERSION_MAJOR = "2";
const std::string APP_VERSION = TOSTRING(VERSION);
#if defined ARCH_WIN
const std::string APP_ARCH = "win";
#elif ARCH_MAC
@@ -26,7 +27,6 @@ const std::string APP_VERSION_MAJOR = "2";
#elif defined ARCH_LIN
const std::string APP_ARCH = "lin";
#endif

const std::string API_URL = "https://api.vcvrack.com";




+ 5
- 1
src/library.cpp View File

@@ -65,7 +65,11 @@ void destroy() {

void checkAppUpdate() {
std::string versionUrl = API_URL + "/version";
json_t* resJ = network::requestJson(network::METHOD_GET, versionUrl, NULL);
json_t* reqJ = json_object();
json_object_set(reqJ, "edition", json_string(APP_EDITION.c_str()));
DEFER({json_decref(reqJ);});

json_t* resJ = network::requestJson(network::METHOD_GET, versionUrl, reqJ);
if (!resJ) {
WARN("Request for version failed");
return;


Loading…
Cancel
Save