Browse Source

Merge branch 'v2' of github.com:VCVRack/Rack-private into v2

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
13690a8757
6 changed files with 22 additions and 5 deletions
  1. +1
    -1
      adapters/standalone.cpp
  2. +1
    -1
      helper.py
  3. +1
    -0
      include/window/Window.hpp
  4. +12
    -3
      src/library.cpp
  5. +2
    -0
      src/network.cpp
  6. +5
    -0
      src/window/Window.cpp

+ 1
- 1
adapters/standalone.cpp View File

@@ -128,7 +128,7 @@ int main(int argc, char* argv[]) {
}

// Log environment
INFO("%s %s v%s", APP_NAME.c_str(), APP_EDITION.c_str(), APP_VERSION.c_str());
INFO("%s %s v%s", APP_NAME.c_str(), APP_EDITION_NAME.c_str(), APP_VERSION.c_str());
INFO("%s", system::getOperatingSystemInfo().c_str());
std::string argsList;
for (int i = 0; i < argc; i++) {


+ 1
- 1
helper.py View File

@@ -169,7 +169,7 @@ def create_manifest(slug, plugin_dir="."):

# Query manifest information
manifest['name'] = input_default("Plugin name", manifest.get('name', slug))
manifest['version'] = input_default("Version", manifest.get('version', "1.0.0"))
manifest['version'] = input_default("Version", manifest.get('version', "2.0.0"))
manifest['license'] = input_default("License (if open-source, use license identifier from https://spdx.org/licenses/)", manifest.get('license', "proprietary"))
manifest['brand'] = input_default("Brand (prefix for all module names)", manifest.get('brand', manifest['name']))
manifest['author'] = input_default("Author", manifest.get('author', ""))


+ 1
- 0
include/window/Window.hpp View File

@@ -71,6 +71,7 @@ struct Window {
void setSize(math::Vec size);
void run();
void step();
void activateContext();
/** Takes a screenshot of the screen and saves it to a PNG file. */
void screenshot(const std::string& screenshotPath);
/** Saves a PNG image of all modules to `screenshotsDir/<plugin slug>/<module slug>.png`.


+ 12
- 3
src/library.cpp View File

@@ -154,6 +154,15 @@ void checkUpdates() {

updateStatus = "Querying for updates...";

// Check user token
std::string userUrl = API_URL + "/user";
json_t* userResJ = network::requestJson(network::METHOD_GET, userUrl, NULL, getTokenCookies());
if (!userResJ) {
DEBUG("User failed");
return;
}
DEFER({json_decref(userResJ);});

// Get user's plugins list
std::string pluginsUrl = API_URL + "/plugins";
json_t* pluginsResJ = network::requestJson(network::METHOD_GET, pluginsUrl, NULL, getTokenCookies());
@@ -219,9 +228,9 @@ void checkUpdates() {
}
update.version = json_string_value(versionJ);
// Reject plugins with ABI mismatch
// if (!string::startsWith(update.version, APP_VERSION_MAJOR + ".")) {
// continue;
// }
if (!string::startsWith(update.version, APP_VERSION_MAJOR + ".")) {
continue;
}

// Check if update is needed
plugin::Plugin* p = plugin::getPlugin(slug);


+ 2
- 0
src/network.cpp View File

@@ -138,6 +138,8 @@ json_t* requestJson(Method method, const std::string& url, json_t* dataJ, const
curl_easy_cleanup(curl);
curl_slist_free_all(headers);

DEBUG("response: %s", resText.c_str());

if (res != CURLE_OK) {
WARN("Could not request %s: %s", urlS.c_str(), curl_easy_strerror(res));
return NULL;


+ 5
- 0
src/window/Window.cpp View File

@@ -517,6 +517,11 @@ void Window::step() {
}


void Window::activateContext() {
glfwMakeContextCurrent(win);
}


static void flipBitmap(uint8_t* pixels, int width, int height, int depth) {
for (int y = 0; y < height / 2; y++) {
int flipY = height - y - 1;


Loading…
Cancel
Save