Browse Source

only force APP_VERSION_MAJOR in modules as necessary (#884)

* force APP_VERSION_MAJOR to module version

* compare first digit before forcing

* compare like in Rack

* Cleanup

Signed-off-by: falkTX <falktx@falktx.com>

* use rack-like var names

Signed-off-by: falkTX <falktx@falktx.com>

---------

Signed-off-by: falkTX <falktx@falktx.com>
Co-authored-by: falkTX <falktx@falktx.com>
tags/26.01
dreamer GitHub 1 month ago
parent
commit
de385782f0
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 11 additions and 4 deletions
  1. +11
    -4
      plugins/plugins.cpp

+ 11
- 4
plugins/plugins.cpp View File

@@ -1069,10 +1069,17 @@ struct StaticPluginLoader {
return;
}

// force ABI, we use static plugins so this doesnt matter as long as it builds
json_t* const version = json_string((APP_VERSION_MAJOR + ".0").c_str());
json_object_set(rootJ, "version", version);
json_decref(version);
std::string version;
if (json_t* const versionJ = json_object_get(rootJ, "version"))
version = json_string_value(versionJ);

if (!string::startsWith(version, APP_VERSION_MAJOR + "."))
{
// force ABI, we use static plugins so this doesnt matter as long as it builds
json_t* const versionJ = json_string((APP_VERSION_MAJOR + ".0").c_str());
json_object_set(rootJ, "version", versionJ);
json_decref(versionJ);
}

// Load manifest
p->fromJson(rootJ);


Loading…
Cancel
Save